CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Fri Nov 30 05:49:23 UTC 2018 Modified Files: src/sys/dev/ic: nslm7x.c Log Message: Use pmf_device_{register,deregister}(). To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/dev/ic/nslm7x.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/nslm7x.c diff -u src/sys/dev/ic/nslm7x.c:1.71 src/sys/dev/ic/nslm7x.c:1.72 --- src/sys/dev/ic/nslm7x.c:1.71 Wed Mar 7 09:25:56 2018 +++ src/sys/dev/ic/nslm7x.c Fri Nov 30 05:49:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nslm7x.c,v 1.71 2018/03/07 09:25:56 msaitoh Exp $ */ +/* $NetBSD: nslm7x.c,v 1.72 2018/11/30 05:49:23 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.71 2018/03/07 09:25:56 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.72 2018/11/30 05:49:23 msaitoh Exp $"); #include #include @@ -2270,6 +2270,9 @@ lm_attach(struct lm_softc *lmsc) "unable to register with sysmon\n"); sysmon_envsys_destroy(lmsc->sc_sme); } + if (!pmf_device_register(lmsc->sc_dev, NULL, NULL)) + aprint_error_dev(lmsc->sc_dev, + "couldn't establish power handler\n"); } /* @@ -2282,6 +2285,7 @@ lm_detach(struct lm_softc *lmsc) callout_halt(>sc_callout, NULL); callout_destroy(>sc_callout); sysmon_envsys_unregister(lmsc->sc_sme); + pmf_device_deregister(lmsc->sc_dev); } static void
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Fri Nov 30 05:49:23 UTC 2018 Modified Files: src/sys/dev/ic: nslm7x.c Log Message: Use pmf_device_{register,deregister}(). To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/dev/ic/nslm7x.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: msaitoh Date: Fri Nov 30 05:20:34 UTC 2018 Modified Files: src/sys/dev/wscons: wsdisplay_vconsvar.h Log Message: Remove extra whitespaces. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/wscons/wsdisplay_vconsvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/wscons/wsdisplay_vconsvar.h diff -u src/sys/dev/wscons/wsdisplay_vconsvar.h:1.26 src/sys/dev/wscons/wsdisplay_vconsvar.h:1.27 --- src/sys/dev/wscons/wsdisplay_vconsvar.h:1.26 Fri Jun 2 19:33:51 2017 +++ src/sys/dev/wscons/wsdisplay_vconsvar.h Fri Nov 30 05:20:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_vconsvar.h,v 1.26 2017/06/02 19:33:51 macallan Exp $ */ +/* $NetBSD: wsdisplay_vconsvar.h,v 1.27 2018/11/30 05:20:34 msaitoh Exp $ */ /*- * Copyright (c) 2005, 2006 Michael Lorenz @@ -57,7 +57,7 @@ struct vcons_screen { * drawing */ #define VCONS_DONT_DRAW 8 /* don't draw on this screen at all */ /* - * the following flags are for drivers which either can't accelerate (all) copy + * the following flags are for drivers which either can't accelerate (all) copy * operations or where drawing characters is faster than the blitter * for example, Sun's Creator boards can't accelerate copycols() */ @@ -97,13 +97,13 @@ struct vcons_screen { struct vcons_data { /* usually the drivers softc */ void *cookie; - + /* * setup the rasops part of the passed vcons_screen, like * geometry, framebuffer address, font, characters, acceleration. * we pass the cookie as 1st parameter */ - void (*init_screen)(void *, struct vcons_screen *, int, + void (*init_screen)(void *, struct vcons_screen *, int, long *); /* accessops */
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: msaitoh Date: Fri Nov 30 05:20:34 UTC 2018 Modified Files: src/sys/dev/wscons: wsdisplay_vconsvar.h Log Message: Remove extra whitespaces. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/wscons/wsdisplay_vconsvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libcurses
Module Name:src Committed By: blymn Date: Fri Nov 30 04:57:02 UTC 2018 Added Files: src/tests/lib/libcurses: debug_test Log Message: Add script for assisting with debugging curses tests. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/debug_test Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/tests/lib/libcurses/debug_test diff -u /dev/null src/tests/lib/libcurses/debug_test:1.1 --- /dev/null Fri Nov 30 04:57:02 2018 +++ src/tests/lib/libcurses/debug_test Fri Nov 30 04:57:02 2018 @@ -0,0 +1,51 @@ +#!/bin/sh +# +# Set up the environment to run the test frame. Option flags: +# +# -c : Set up curses tracing, assumes the curses lib has been built with +# debug enabled. Default trace mask traces input, can be overridden +# by setting the trace mask in the environment before calling the +# script. +# -s : Specify the slave command. Defaults to "../slave/slave" +# -v : Enable verbose output +# +BASEDIR="/usr/tests/lib/libcurses" +CHECK_PATH="${BASEDIR}/check_files/" +export CHECK_PATH +INCLUDE_PATH="${BASEDIR}/tests/" +export INCLUDE_PATH +# +SLAVE="${BASEDIR}/slave" +# +ARGS="" +# +while /usr/bin/true +do +case $1 in + -c) + CURSES_TRACE_FILE="/tmp/ctrace" + if [ "X$CURSES_TRACE_MASK" = "X" ]; then + CURSES_TRACE_MASK=0x0082 + fi + export CURSES_TRACE_FILE + export CURSES_TRACE_MASK + ;; + + -s) + SLAVE=$2 + shift + ;; + + -v) + ARGS="-v" + ;; + + *) + break + ;; +esac + +shift +done +# +exec ${BASEDIR}/director ${ARGS} -s ${SLAVE} ${INCLUDE_PATH}/$@
CVS commit: src/tests/lib/libcurses
Module Name:src Committed By: blymn Date: Fri Nov 30 04:57:02 UTC 2018 Added Files: src/tests/lib/libcurses: debug_test Log Message: Add script for assisting with debugging curses tests. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/debug_test Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Fri Nov 30 04:38:14 UTC 2018 Modified Files: src/lib/libcurses: refresh.c Log Message: curses: Fix inverted logic when drawing LR corner with auto margins Thanks to M. Levinson. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/lib/libcurses/refresh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Fri Nov 30 04:38:14 UTC 2018 Modified Files: src/lib/libcurses: refresh.c Log Message: curses: Fix inverted logic when drawing LR corner with auto margins Thanks to M. Levinson. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/lib/libcurses/refresh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/refresh.c diff -u src/lib/libcurses/refresh.c:1.101 src/lib/libcurses/refresh.c:1.102 --- src/lib/libcurses/refresh.c:1.101 Sun Nov 18 02:46:24 2018 +++ src/lib/libcurses/refresh.c Fri Nov 30 04:38:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.101 2018/11/18 02:46:24 uwe Exp $ */ +/* $NetBSD: refresh.c,v 1.102 2018/11/30 04:38:14 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94"; #else -__RCSID("$NetBSD: refresh.c,v 1.101 2018/11/18 02:46:24 uwe Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.102 2018/11/30 04:38:14 roy Exp $"); #endif #endif/* not lint */ @@ -1033,9 +1033,9 @@ putchbr(__LDATA *nsp, __LDATA *csp, __LD /* Disable auto margins temporarily. */ if (enter_am_mode && exit_am_mode) { - tputs(enter_am_mode, 0, __cputchar); - error = putch(nsp, csp, wy, wx); tputs(exit_am_mode, 0, __cputchar); + error = putch(nsp, csp, wy, wx); + tputs(enter_am_mode, 0, __cputchar); return error; }
CVS commit: src/tests/bin/tar
Module Name:src Committed By: christos Date: Fri Nov 30 00:53:41 UTC 2018 Modified Files: src/tests/bin/tar: t_tar.sh Log Message: Add base-256 test (Micha Gorny) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/bin/tar/t_tar.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/bin/tar
Module Name:src Committed By: christos Date: Fri Nov 30 00:53:41 UTC 2018 Modified Files: src/tests/bin/tar: t_tar.sh Log Message: Add base-256 test (Micha Gorny) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/bin/tar/t_tar.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/bin/tar/t_tar.sh diff -u src/tests/bin/tar/t_tar.sh:1.1 src/tests/bin/tar/t_tar.sh:1.2 --- src/tests/bin/tar/t_tar.sh:1.1 Sat Mar 17 12:33:11 2012 +++ src/tests/bin/tar/t_tar.sh Thu Nov 29 19:53:41 2018 @@ -1,4 +1,4 @@ -# $NetBSD: t_tar.sh,v 1.1 2012/03/17 16:33:11 jruoho Exp $ +# $NetBSD: t_tar.sh,v 1.2 2018/11/30 00:53:41 christos Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -45,7 +45,53 @@ append_body() { atf_check -s eq:0 -o empty -e empty cmp file1.tar file2.tar } +atf_test_case rd_base256_size +rd_base256_size_head() { + atf_set "descr" "Test extracting an archive whose member size" \ + "is encoded as base-256 number (GNU style)" +} +rd_base256_size_body() { + # prepare random file data for comparison + # take 0x1200CF bytes in order to test that we: + # - handle multiple bytes of size field correctly + # - do not fail on NUL bytes + # - do not fail on char values > 0x80 (with signed char) + dd if=/dev/urandom of=reference.bin bs=1179855 count=1 + # write test archive header + # - filename + printf 'output.bin' > test.tar + # - pad to 100 octets + head -c 90 /dev/zero >> test.tar + # - mode, uid, gid + printf '%07d\0%07d\0%07d\0' 644 16 15 >> test.tar + # - size (base-256) + printf '\x80\0\0\0\0\0\0\0\0\x12\x00\xCF' >> test.tar + # - timestamp, checksum + printf '%011d\0%06d\0 0' 13377546642 12460 >> test.tar + # - pad empty linkname (100 octets) + head -c 100 /dev/zero >> test.tar + # - magic, user name + printf 'ustar \0nobody' >> test.tar + # - pad user name field to 32 bytes + head -c 26 /dev/zero >> test.tar + # - group name + printf 'nogroup' >> test.tar + # - pad to full block + head -c 208 /dev/zero >> test.tar + # append file data to the test archive + cat reference.bin >> test.tar + # pad to full block + append two terminating null blocks + head -c 1450 /dev/zero >> test.tar + + # test extracting the test archive + atf_check -s eq:0 -o empty -e empty tar -xf test.tar + + # ensure that output.bin is equal to reference.bin + atf_check -s eq:0 -o empty -e empty cmp output.bin reference.bin +} + atf_init_test_cases() { atf_add_test_case append + atf_add_test_case rd_base256_size }
CVS commit: src/bin/pax
Module Name:src Committed By: christos Date: Fri Nov 30 00:53:11 UTC 2018 Modified Files: src/bin/pax: gen_subs.c tar.c Log Message: Add base-256 decoding support (Micha Gorny) To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/bin/pax/gen_subs.c cvs rdiff -u -r1.73 -r1.74 src/bin/pax/tar.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/bin/pax
Module Name:src Committed By: christos Date: Fri Nov 30 00:53:11 UTC 2018 Modified Files: src/bin/pax: gen_subs.c tar.c Log Message: Add base-256 decoding support (Micha Gorny) To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/bin/pax/gen_subs.c cvs rdiff -u -r1.73 -r1.74 src/bin/pax/tar.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/pax/gen_subs.c diff -u src/bin/pax/gen_subs.c:1.36 src/bin/pax/gen_subs.c:1.37 --- src/bin/pax/gen_subs.c:1.36 Thu Aug 9 04:09:21 2012 +++ src/bin/pax/gen_subs.c Thu Nov 29 19:53:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gen_subs.c,v 1.36 2012/08/09 08:09:21 christos Exp $ */ +/* $NetBSD: gen_subs.c,v 1.37 2018/11/30 00:53:11 christos Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)gen_subs.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: gen_subs.c,v 1.36 2012/08/09 08:09:21 christos Exp $"); +__RCSID("$NetBSD: gen_subs.c,v 1.37 2018/11/30 00:53:11 christos Exp $"); #endif #endif /* not lint */ @@ -306,12 +306,10 @@ u32_asc(uintmax_t val, char *str, int le /* * asc_umax() - * convert hex/octal character string into a uintmax. We do - * not have to to check for overflow! (the headers in all supported - * formats are not large enough to create an overflow). + * convert hex/octal/base-256 value into a uintmax. * NOTE: strings passed to us are NOT TERMINATED. * Return: - * uintmax_t value + * uintmax_t value; UINTMAX_MAX for overflow/negative */ uintmax_t @@ -323,6 +321,30 @@ asc_umax(char *str, int len, int base) stop = str + len; /* + * if the highest bit of first byte is set, it's base-256 encoded + * (base-256 is basically (n-1)-bit big endian signed + */ + if (str < stop && (*str & 0x80)) { + /* + * uintmax_t can't be negative, so fail on negative numbers + */ + if (*str & 0x40) + return UINTMAX_MAX; + + tval = *str++ & 0x3f; + while (str < stop) { + /* + * check for overflow + */ + if (tval > (UINTMAX_MAX/256)) +return UINTMAX_MAX; + tval = (tval << 8) | ((*str++) & 0xFF); + } + + return tval; + } + + /* * skip over leading blanks and zeros */ while ((str < stop) && ((*str == ' ') || (*str == '0'))) Index: src/bin/pax/tar.c diff -u src/bin/pax/tar.c:1.73 src/bin/pax/tar.c:1.74 --- src/bin/pax/tar.c:1.73 Sat Dec 19 13:28:54 2015 +++ src/bin/pax/tar.c Thu Nov 29 19:53:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: tar.c,v 1.73 2015/12/19 18:28:54 christos Exp $ */ +/* $NetBSD: tar.c,v 1.74 2018/11/30 00:53:11 christos Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94"; #else -__RCSID("$NetBSD: tar.c,v 1.73 2015/12/19 18:28:54 christos Exp $"); +__RCSID("$NetBSD: tar.c,v 1.74 2018/11/30 00:53:11 christos Exp $"); #endif #endif /* not lint */ @@ -486,6 +486,8 @@ tar_rd(ARCHD *arcn, char *buf) arcn->sb.st_uid = (uid_t)asc_u32(hd->uid, sizeof(hd->uid), OCT); arcn->sb.st_gid = (gid_t)asc_u32(hd->gid, sizeof(hd->gid), OCT); arcn->sb.st_size = (off_t)ASC_OFFT(hd->size, sizeof(hd->size), OCT); + if (arcn->sb.st_size == -1) + return -1; arcn->sb.st_mtime = (time_t)(int32_t)asc_u32(hd->mtime, sizeof(hd->mtime), OCT); arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime; @@ -860,6 +862,8 @@ ustar_rd(ARCHD *arcn, char *buf) arcn->sb.st_mode = (mode_t)(asc_u32(hd->mode, sizeof(hd->mode), OCT) & 0xfff); arcn->sb.st_size = (off_t)ASC_OFFT(hd->size, sizeof(hd->size), OCT); + if (arcn->sb.st_size == -1) + return -1; arcn->sb.st_mtime = (time_t)(int32_t)asc_u32(hd->mtime, sizeof(hd->mtime), OCT); arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Thu Nov 29 23:53:44 UTC 2018 Modified Files: src/sys/dev/pci: pucdata.c Log Message: Add Amazon.com EC2 virtual 16650-compatible PCI serial device To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/dev/pci/pucdata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pucdata.c diff -u src/sys/dev/pci/pucdata.c:1.102 src/sys/dev/pci/pucdata.c:1.103 --- src/sys/dev/pci/pucdata.c:1.102 Mon May 21 03:56:21 2018 +++ src/sys/dev/pci/pucdata.c Thu Nov 29 23:53:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pucdata.c,v 1.102 2018/05/21 03:56:21 jnemeth Exp $ */ +/* $NetBSD: pucdata.c,v 1.103 2018/11/29 23:53:44 jmcneill Exp $ */ /* * Copyright (c) 1998, 1999 Christopher G. Demetriou. All rights reserved. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.102 2018/05/21 03:56:21 jnemeth Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.103 2018/11/29 23:53:44 jmcneill Exp $"); #include #include @@ -131,6 +131,17 @@ const struct puc_device_description puc_ }, }, + /* + * Amazon.com EC2 virtual 16650-compatible PCI serial device. + */ + { "Amazon.com EC2 Serial", + { PCI_VENDOR_AMAZON, PCI_PRODUCT_AMAZON_UART, 0, 0 }, + { 0x, 0x, 0, 0 }, + { + { PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ }, + } + }, + /* Avlab Technology, Inc. PCI 2 Serial: 2S */ { "Avlab PCI 2 Serial", { PCI_VENDOR_AVLAB, PCI_PRODUCT_AVLAB_PCI2S, 0, 0 },
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Thu Nov 29 23:53:44 UTC 2018 Modified Files: src/sys/dev/pci: pucdata.c Log Message: Add Amazon.com EC2 virtual 16650-compatible PCI serial device To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/dev/pci/pucdata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Thu Nov 29 23:53:15 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.1343 -r1.1344 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1342 -r1.1343 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Thu Nov 29 23:52:49 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add Amazon.com UART, NVMe, and ENA PCI IDs. To generate a diff of this commit: cvs rdiff -u -r1.1354 -r1.1355 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1354 src/sys/dev/pci/pcidevs:1.1355 --- src/sys/dev/pci/pcidevs:1.1354 Sat Nov 24 14:41:56 2018 +++ src/sys/dev/pci/pcidevs Thu Nov 29 23:52:49 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1354 2018/11/24 14:41:56 skrll Exp $ +$NetBSD: pcidevs,v 1.1355 2018/11/29 23:52:49 jmcneill Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -649,6 +649,7 @@ vendor QINHENG2 0x1c00 Nanjing QinHeng vendor SYMPHONY2 0x1c1c Symphony Labs (2nd PCI Vendor ID) vendor HGST 0x1c58 HGST, Inc. vendor BEIJING_MEMBLAZE 0x1c5f Beijing Memblaze Technology Co. Ltd. +vendor AMAZON 0x1d0f Amazon.com, Inc. vendor ROCKCHIP 0x1d87 Rockchip vendor TEKRAM2 0x1de1 Tekram Technology (2nd PCI Vendor ID) vendor SUNIX2 0x1fd4 SUNIX Co @@ -954,6 +955,11 @@ product ALTIMA AC1001 0x03e9 AC1001 Giga product ALTIMA AC9100 0x03ea AC9100 Gigabit Ethernet product ALTIMA AC1003 0x03eb AC1003 Gigabit Ethernet +/* Amazon.com, Inc. products */ +product AMAZON UART 0x8250 16650-compatible UART +product AMAZON NVME 0x8061 NVMe SSD +product AMAZON ENA 0xec20 Elastic Network Adapter + /* AMD products */ product AMD AMD64_HT 0x1100 K8 AMD64 HyperTransport Configuration product AMD AMD64_ADDR 0x1101 K8 AMD64 Address Map Configuration
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Thu Nov 29 23:52:49 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add Amazon.com UART, NVMe, and ENA PCI IDs. To generate a diff of this commit: cvs rdiff -u -r1.1354 -r1.1355 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Thu Nov 29 23:53:15 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.1343 -r1.1344 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1342 -r1.1343 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: macallan Date: Thu Nov 29 23:44:50 UTC 2018 Modified Files: src/sys/dev/rasops: rasops.c Log Message: rasops_do_cursor(): - simplify & sanitize the unaligned case - use only 32bit accesses ... no longer crash with odd sized fonts in 8bit To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.77 src/sys/dev/rasops/rasops.c:1.78 --- src/sys/dev/rasops/rasops.c:1.77 Thu Jun 1 02:45:11 2017 +++ src/sys/dev/rasops/rasops.c Thu Nov 29 23:44:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.77 2017/06/01 02:45:11 chs Exp $ */ +/* $NetBSD: rasops.c,v 1.78 2018/11/29 23:44:50 macallan Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.77 2017/06/01 02:45:11 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.78 2018/11/29 23:44:50 macallan Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -995,7 +995,7 @@ static void rasops_do_cursor(struct rasops_info *ri) { int full1, height, cnt, slop1, slop2, row, col; - u_char *dp, *rp, *hrp, *hp, tmp = 0; + u_char *dp, *rp, *hrp, *hp; hrp = hp = NULL; @@ -1055,33 +1055,26 @@ rasops_do_cursor(struct rasops_info *ri) } } } else { - uint16_t tmp16; - uint32_t tmp32; - /* XXX this is stupid.. use masks instead */ + uint32_t tmp32, msk1, msk2; + + msk1 = be32toh(0x >> (32 - (8 * slop1))); + msk2 = be32toh(0x << (32 - (8 * slop2))); + while (height--) { - dp = rp; + dp = (u_char *)((uintptr_t)rp & ~3); rp += ri->ri_stride; if (ri->ri_hwbits) { -hp = hrp; +hp = (u_char *)((uintptr_t)hrp & ~3); hrp += ri->ri_stride; } - if (slop1 & 1) { -tmp = *dp ^ ~0; -*dp = tmp; -dp++; -if (ri->ri_hwbits) { - *hp++ = tmp; -} - } - - if (slop1 & 2) { -tmp16 = *(int16_t *)dp ^ ~0; -*(uint16_t *)dp = tmp16; -dp += 2; + if (msk1 != 0) { +tmp32 = *(int32_t *)dp ^ msk1; +*(uint32_t *)dp = tmp32; +dp += 4; if (ri->ri_hwbits) { - *(int16_t *)hp = tmp16; - hp += 2; + *(int32_t *)hp = tmp32; + hp += 4; } } @@ -1095,19 +1088,11 @@ rasops_do_cursor(struct rasops_info *ri) } } - if (slop2 & 1) { -tmp = *dp ^ ~0; -*dp = tmp; -dp++; -if (ri->ri_hwbits) - *hp++ = tmp; - } - - if (slop2 & 2) { -tmp16 = *(int16_t *)dp ^ ~0; -*(uint16_t *)dp = tmp16; + if (msk2 != 0) { +tmp32 = *(int32_t *)dp ^ msk2; +*(uint32_t *)dp = tmp32; if (ri->ri_hwbits) - *(int16_t *)hp = tmp16; + *(int32_t *)hp = tmp32; } } }
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: macallan Date: Thu Nov 29 23:44:50 UTC 2018 Modified Files: src/sys/dev/rasops: rasops.c Log Message: rasops_do_cursor(): - simplify & sanitize the unaligned case - use only 32bit accesses ... no longer crash with odd sized fonts in 8bit To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Thu Nov 29 23:18:40 UTC 2018 Modified Files: src/sys/dev/wscons: wsdisplay.c Log Message: Add hw.wsdisplay.multicons sysctl that can be used to disable mirroring wsdisplay output to serial port. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/dev/wscons/wsdisplay.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/wscons/wsdisplay.c diff -u src/sys/dev/wscons/wsdisplay.c:1.148 src/sys/dev/wscons/wsdisplay.c:1.149 --- src/sys/dev/wscons/wsdisplay.c:1.148 Thu Nov 15 13:50:51 2018 +++ src/sys/dev/wscons/wsdisplay.c Thu Nov 29 23:18:40 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay.c,v 1.148 2018/11/15 13:50:51 jmcneill Exp $ */ +/* $NetBSD: wsdisplay.c,v 1.149 2018/11/29 23:18:40 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.148 2018/11/15 13:50:51 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.149 2018/11/29 23:18:40 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_wsdisplay_compat.h" @@ -58,6 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: wsdisplay.c, #include #include #include +#include #include #include @@ -71,6 +72,10 @@ __KERNEL_RCSID(0, "$NetBSD: wsdisplay.c, #include "locators.h" +#ifdef WSDISPLAY_MULTICONS +static bool wsdisplay_multicons_enable = true; +#endif + /* Console device before replaced by wsdisplay */ static struct consdev *wsdisplay_ocn; @@ -277,7 +282,8 @@ wsscreen_getc_poll(void *priv) struct wsscreen *scr = priv; int c; - if (wsdisplay_ocn && wsdisplay_ocn->cn_getc && + if (wsdisplay_multicons_enable && + wsdisplay_ocn && wsdisplay_ocn->cn_getc && WSSCREEN_HAS_EMULATOR(scr) && WSSCREEN_HAS_TTY(scr)) { struct tty *tp = scr->scr_tty; do { @@ -1670,7 +1676,8 @@ wsdisplaystart(struct tty *tp) (*scr->scr_dconf->wsemul->output)(scr->scr_dconf->wsemulcookie, tbuf, n, 0); #ifdef WSDISPLAY_MULTICONS - if (scr->scr_dconf == _console_conf && + if (wsdisplay_multicons_enable && + scr->scr_dconf == _console_conf && wsdisplay_ocn && wsdisplay_ocn->cn_putc) { for (int i = 0; i < n; i++) wsdisplay_ocn->cn_putc( @@ -1689,7 +1696,8 @@ wsdisplaystart(struct tty *tp) (scr->scr_dconf->wsemulcookie, tbuf, n, 0); #ifdef WSDISPLAY_MULTICONS - if (scr->scr_dconf == _console_conf && + if (wsdisplay_multicons_enable && + scr->scr_dconf == _console_conf && wsdisplay_ocn && wsdisplay_ocn->cn_putc) { for (int i = 0; i < n; i++) wsdisplay_ocn->cn_putc( @@ -2293,7 +2301,7 @@ wsdisplay_cnputc(dev_t dev, int i) (*dc->wsemul->output)(dc->wsemulcookie, , 1, 1); #ifdef WSDISPLAY_MULTICONS - if (wsdisplay_ocn && wsdisplay_ocn->cn_putc) + if (wsdisplay_multicons_enable && wsdisplay_ocn && wsdisplay_ocn->cn_putc) wsdisplay_ocn->cn_putc(wsdisplay_ocn->cn_dev, i); #endif } @@ -2310,7 +2318,7 @@ wsdisplay_getc(dev_t dev) } #ifdef WSDISPLAY_MULTICONS - if (wsdisplay_ocn && wsdisplay_ocn->cn_getc) { + if (wsdisplay_multicons_enable && wsdisplay_ocn && wsdisplay_ocn->cn_getc) { c = wsdisplay_ocn->cn_getc(wsdisplay_ocn->cn_dev); if (c >= 0) return c; @@ -2337,7 +2345,7 @@ wsdisplay_pollc(dev_t dev, int on) #ifdef WSDISPLAY_MULTICONS /* notify to old console driver */ - if (wsdisplay_ocn && wsdisplay_ocn->cn_pollc) + if (wsdisplay_multicons_enable && wsdisplay_ocn && wsdisplay_ocn->cn_pollc) wsdisplay_ocn->cn_pollc(wsdisplay_ocn->cn_dev, on); #endif } @@ -2358,3 +2366,24 @@ wsdisplay_unset_cons_kbd(void) wsdisplay_cons_kbd_getc = NULL; wsdisplay_cons_kbd_pollc = NULL; } + +#ifdef WSDISPLAY_MULTICONS +SYSCTL_SETUP(sysctl_hw_wsdisplay_setup, "sysctl hw.wsdisplay subtree setup") +{ + const struct sysctlnode *wsdisplay_node; + + if (sysctl_createv(clog, 0, NULL, _node, + CTLFLAG_PERMANENT, + CTLTYPE_NODE, "wsdisplay", NULL, + NULL, 0, NULL, 0, + CTL_HW, CTL_CREATE, CTL_EOL) != 0) + return; + + sysctl_createv(clog, 0, NULL, NULL, + CTLFLAG_READWRITE, + CTLTYPE_BOOL, "multicons", + SYSCTL_DESCR("Enable wsdisplay multicons"), + NULL, 0, _multicons_enable, 0, + CTL_HW, wsdisplay_node->sysctl_num, CTL_CREATE, CTL_EOL); +} +#endif
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Thu Nov 29 23:18:40 UTC 2018 Modified Files: src/sys/dev/wscons: wsdisplay.c Log Message: Add hw.wsdisplay.multicons sysctl that can be used to disable mirroring wsdisplay output to serial port. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/dev/wscons/wsdisplay.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys
In article , Maxime Villard wrote: >Le 29/11/2018 à 19:51, Christos Zoulas a écrit : >> In article <20181129174012.9ad90f...@cvs.netbsd.org>, >> Maxime Villard wrote: >>> -=-=-=-=-=- >>> >>> Module Name:src >>> Committed By: maxv >>> Date: Thu Nov 29 17:40:12 UTC 2018 >>> >>> Modified Files: >>> src/sys/compat/linux/common: linux_misc_notalpha.c >>> src/sys/kern: kern_time.c >>> >>> Log Message: >>> Improve my kern_time.c::rev1.192, systematically clear the buffers we get >>>from 'ptimer_pool' to prevent more leaks. >> >> Shouldn't those pools be converted to pool_cache_*() so that we can use >> constructors to avoid sprinking memset() all over the place? >> >> christos > >I thought about it, but I ended up telling myself that it was better not to >completely modify the allocator just add a memset constructor, and that it >was easier to add the memset after the allocation rather than inside. > >The pool is just called three times, so it's not a big deal. I don't know, from reading the manual page using the pool_cache_ api seems to be the preferred way... Plus I don't think that a language deficiency should be visible in many places in the code (these memsets appear unnecessary) and if we do them using the pool_cache code we pay the cost once (at construction), not every use (however minor that cost is). christos
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: palle Date: Thu Nov 29 20:58:36 UTC 2018 Modified Files: src/sys/arch/sparc64/sparc64: pmap.c Log Message: sun4v: fix incorrect calculation of phys addr for the mdesc - now the virtual-devices can (again) be detected (worked previously...) To generate a diff of this commit: cvs rdiff -u -r1.308 -r1.309 src/sys/arch/sparc64/sparc64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/pmap.c diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.308 src/sys/arch/sparc64/sparc64/pmap.c:1.309 --- src/sys/arch/sparc64/sparc64/pmap.c:1.308 Sat Jan 27 23:07:36 2018 +++ src/sys/arch/sparc64/sparc64/pmap.c Thu Nov 29 20:58:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.308 2018/01/27 23:07:36 chs Exp $ */ +/* $NetBSD: pmap.c,v 1.309 2018/11/29 20:58:36 palle Exp $ */ /* * * Copyright (C) 1996-1999 Eduardo Horvath. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.308 2018/01/27 23:07:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.309 2018/11/29 20:58:36 palle Exp $"); #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ #define HWREF @@ -765,7 +765,7 @@ pmap_bootstrap(u_long kernelstart, u_lon m_len = mdesc_get_len(); m_va = kdata_alloc(m_len, 16); - m_pa = kdatap + (m_va - kdata); + m_pa = pmap_kextract(m_va); mdesc_init(m_va, m_pa, m_len); }
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: palle Date: Thu Nov 29 20:58:36 UTC 2018 Modified Files: src/sys/arch/sparc64/sparc64: pmap.c Log Message: sun4v: fix incorrect calculation of phys addr for the mdesc - now the virtual-devices can (again) be detected (worked previously...) To generate a diff of this commit: cvs rdiff -u -r1.308 -r1.309 src/sys/arch/sparc64/sparc64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jakllsch Date: Thu Nov 29 20:33:09 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_ccu.c Log Message: use %u for u_int, rather than %d; corrects printing of frequencies at or above 2**31 Hz To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sunxi/sunxi_ccu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_ccu.c diff -u src/sys/arch/arm/sunxi/sunxi_ccu.c:1.12 src/sys/arch/arm/sunxi/sunxi_ccu.c:1.13 --- src/sys/arch/arm/sunxi/sunxi_ccu.c:1.12 Fri Sep 21 12:04:07 2018 +++ src/sys/arch/arm/sunxi/sunxi_ccu.c Thu Nov 29 20:33:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_ccu.c,v 1.12 2018/09/21 12:04:07 skrll Exp $ */ +/* $NetBSD: sunxi_ccu.c,v 1.13 2018/11/29 20:33:09 jakllsch Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -31,7 +31,7 @@ #include "opt_console.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu.c,v 1.12 2018/09/21 12:04:07 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu.c,v 1.13 2018/11/29 20:33:09 jakllsch Exp $"); #include #include @@ -369,6 +369,6 @@ sunxi_ccu_print(struct sunxi_ccu_softc * clkp_parent ? "<-" : "", clkp_parent ? clkp_parent->name : "", type); - aprint_debug("%10d Hz\n", clk_get_rate(>base)); + aprint_debug("%10u Hz\n", clk_get_rate(>base)); } }
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jakllsch Date: Thu Nov 29 20:33:09 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_ccu.c Log Message: use %u for u_int, rather than %d; corrects printing of frequencies at or above 2**31 Hz To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sunxi/sunxi_ccu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libnvmm
Module Name:src Committed By: maxv Date: Thu Nov 29 19:55:21 UTC 2018 Modified Files: src/lib/libnvmm: libnvmm.c nvmm.h Log Message: Rewrite the gpa map/unmap functions. Dig holes in the mapped areas when there is an overlap. Close to what Qemu expects. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libnvmm/libnvmm.c cvs rdiff -u -r1.1 -r1.2 src/lib/libnvmm/nvmm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libnvmm/libnvmm.c diff -u src/lib/libnvmm/libnvmm.c:1.2 src/lib/libnvmm/libnvmm.c:1.3 --- src/lib/libnvmm/libnvmm.c:1.2 Mon Nov 19 21:45:37 2018 +++ src/lib/libnvmm/libnvmm.c Thu Nov 29 19:55:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: libnvmm.c,v 1.2 2018/11/19 21:45:37 maxv Exp $ */ +/* $NetBSD: libnvmm.c,v 1.3 2018/11/29 19:55:20 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -39,78 +39,145 @@ #include #include #include +#include #include "nvmm.h" +typedef struct __area { + LIST_ENTRY(__area) list; + gpaddr_t gpa; + uintptr_t hva; + size_t size; +} area_t; + +typedef LIST_HEAD(, __area) area_list_t; + static int nvmm_fd = -1; static size_t nvmm_page_size = 0; /* -- */ static int -_nvmm_area_add(struct nvmm_machine *mach, gpaddr_t gpa, uintptr_t hva, +__area_unmap(struct nvmm_machine *mach, uintptr_t hva, gpaddr_t gpa, + size_t size) +{ + struct nvmm_ioc_gpa_unmap args; + int ret; + + args.machid = mach->machid; + args.gpa = gpa; + args.size = size; + + ret = ioctl(nvmm_fd, NVMM_IOC_GPA_UNMAP, ); + if (ret == -1) + return -1; + + ret = munmap((void *)hva, size); + + return ret; +} + +static int +__area_dig_hole(struct nvmm_machine *mach, uintptr_t hva, gpaddr_t gpa, size_t size) { - struct nvmm_area *area; - void *ptr; - size_t i; - - for (i = 0; i < mach->nareas; i++) { - if (gpa >= mach->areas[i].gpa && - gpa < mach->areas[i].gpa + mach->areas[i].size) { - goto error; + area_list_t *areas = mach->areas; + area_t *ent, *tmp, *nxt; + size_t diff; + + LIST_FOREACH_SAFE(ent, areas, list, nxt) { + /* Case 1. */ + if ((gpa < ent->gpa) && (gpa + size > ent->gpa)) { + diff = (gpa + size) - ent->gpa; + if (__area_unmap(mach, ent->hva, ent->gpa, diff) == -1) { +return -1; + } + ent->gpa += diff; + ent->hva += diff; + ent->size -= diff; } - if (gpa + size > mach->areas[i].gpa && - gpa + size <= mach->areas[i].gpa + mach->areas[i].size) { - goto error; + + /* Case 2. */ + if ((gpa >= ent->gpa) && (gpa + size <= ent->gpa + ent->size)) { + /* First half. */ + tmp = malloc(sizeof(*tmp)); + tmp->gpa = ent->gpa; + tmp->hva = ent->hva; + tmp->size = (gpa - ent->gpa); + LIST_INSERT_BEFORE(ent, tmp, list); + /* Second half. */ + ent->gpa += tmp->size; + ent->hva += tmp->size; + ent->size -= tmp->size; + diff = size; + if (__area_unmap(mach, ent->hva, ent->gpa, diff) == -1) { +return -1; + } + ent->gpa += diff; + ent->hva += diff; + ent->size -= diff; } - if (gpa < mach->areas[i].gpa && - gpa + size >= mach->areas[i].gpa + mach->areas[i].size) { - goto error; + + /* Case 3. */ + if ((gpa < ent->gpa + ent->size) && + (gpa + size > ent->gpa + ent->size)) { + diff = (ent->gpa + ent->size) - gpa; + if (__area_unmap(mach, hva, gpa, diff) == -1) { +return -1; + } + ent->size -= diff; + } + + /* Case 4. */ + if ((gpa < ent->gpa + ent->size) && + (gpa + size > ent->gpa + ent->size)) { + if (__area_unmap(mach, ent->hva, ent->gpa, ent->size) == -1) { +return -1; + } + LIST_REMOVE(ent, list); + free(ent); } } - ptr = realloc(mach->areas, (mach->nareas + 1) * - sizeof(struct nvmm_area)); - if (ptr == NULL) - return -1; - mach->areas = ptr; + return 0; +} + +static int +__area_add(struct nvmm_machine *mach, uintptr_t hva, gpaddr_t gpa, size_t size) +{ + area_list_t *areas = mach->areas; + area_t *area; + int ret; - area = >areas[mach->nareas++]; + area = malloc(sizeof(*area)); + if (area == NULL) + return -1; area->gpa = gpa; area->hva = hva; area->size = size; - return 0; + ret = __area_dig_hole(mach, hva, gpa, size); + if (ret == -1) { + free(area); + return -1; + } -error: - errno = EEXIST; - return -1; + LIST_INSERT_HEAD(areas, area, list); + return 0; } -static int -_nvmm_area_delete(struct nvmm_machine *mach, gpaddr_t gpa, uintptr_t hva, -size_t size) +static void +__area_remove_all(struct nvmm_machine *mach) { - size_t i; + area_list_t *areas = mach->areas; + area_t *ent; - for (i = 0; i < mach->nareas; i++) { - if (gpa == mach->areas[i].gpa && - hva == mach->areas[i].hva && - size == mach->areas[i].size) { - break; - } - } - if (i == mach->nareas) { - errno = ENOENT; - return -1; + while ((ent = LIST_FIRST(areas)) != NULL) { + LIST_REMOVE(ent, list); + free(ent); } -
CVS commit: src/lib/libnvmm
Module Name:src Committed By: maxv Date: Thu Nov 29 19:55:21 UTC 2018 Modified Files: src/lib/libnvmm: libnvmm.c nvmm.h Log Message: Rewrite the gpa map/unmap functions. Dig holes in the mapped areas when there is an overlap. Close to what Qemu expects. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libnvmm/libnvmm.c cvs rdiff -u -r1.1 -r1.2 src/lib/libnvmm/nvmm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys
Le 29/11/2018 à 19:51, Christos Zoulas a écrit : In article <20181129174012.9ad90f...@cvs.netbsd.org>, Maxime Villard wrote: -=-=-=-=-=- Module Name:src Committed By: maxv Date: Thu Nov 29 17:40:12 UTC 2018 Modified Files: src/sys/compat/linux/common: linux_misc_notalpha.c src/sys/kern: kern_time.c Log Message: Improve my kern_time.c::rev1.192, systematically clear the buffers we get from 'ptimer_pool' to prevent more leaks. Shouldn't those pools be converted to pool_cache_*() so that we can use constructors to avoid sprinking memset() all over the place? christos I thought about it, but I ended up telling myself that it was better not to completely modify the allocator just add a memset constructor, and that it was easier to add the memset after the allocation rather than inside. The pool is just called three times, so it's not a big deal.
Re: CVS commit: src/sys
In article <20181129174012.9ad90f...@cvs.netbsd.org>, Maxime Villard wrote: >-=-=-=-=-=- > >Module Name: src >Committed By: maxv >Date: Thu Nov 29 17:40:12 UTC 2018 > >Modified Files: > src/sys/compat/linux/common: linux_misc_notalpha.c > src/sys/kern: kern_time.c > >Log Message: >Improve my kern_time.c::rev1.192, systematically clear the buffers we get >from 'ptimer_pool' to prevent more leaks. Shouldn't those pools be converted to pool_cache_*() so that we can use constructors to avoid sprinking memset() all over the place? christos
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Thu Nov 29 18:53:42 UTC 2018 Modified Files: src/sys/dev/usb: if_run.c Log Message: Correct abuses of aprint_error_dev(9). To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/if_run.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_run.c diff -u src/sys/dev/usb/if_run.c:1.30 src/sys/dev/usb/if_run.c:1.31 --- src/sys/dev/usb/if_run.c:1.30 Wed Sep 12 21:57:18 2018 +++ src/sys/dev/usb/if_run.c Thu Nov 29 18:53:42 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_run.c,v 1.30 2018/09/12 21:57:18 christos Exp $ */ +/* $NetBSD: if_run.c,v 1.31 2018/11/29 18:53:42 jakllsch Exp $ */ /* $OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $ */ /*- @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.30 2018/09/12 21:57:18 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.31 2018/11/29 18:53:42 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -638,7 +638,7 @@ run_attach(device_t parent, device_t sel /* retrieve RF rev. no and various other things from EEPROM */ run_read_eeprom(sc); - aprint_error_dev(sc->sc_dev, + aprint_verbose_dev(sc->sc_dev, "MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), address %s\n", sc->mac_ver, sc->mac_rev, run_get_rf(sc->rf_rev), sc->ntxchains, sc->nrxchains, ether_sprintf(ic->ic_myaddr)); @@ -915,12 +915,12 @@ run_load_microcode(struct run_softc *sc) fwname = "run-rt2870"; if ((error = firmware_load("run", fwname, , )) != 0) { - aprint_error_dev(sc->sc_dev, + device_printf(sc->sc_dev, "error %d, could not read firmware %s\n", error, fwname); return error; } if (size != 4096) { - aprint_error_dev(sc->sc_dev, + device_printf(sc->sc_dev, "invalid firmware size (should be 4KB)\n"); firmware_free(ucode, size); return EINVAL; @@ -955,7 +955,7 @@ run_load_microcode(struct run_softc *sc) usbd_delay_ms(sc->sc_udev, 10); } if (ntries == 1000) { - aprint_error_dev(sc->sc_dev, + device_printf(sc->sc_dev, "timeout waiting for MCU to initialize\n"); return ETIMEDOUT; } @@ -2646,7 +2646,7 @@ run_watchdog(struct ifnet *ifp) if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { - aprint_error_dev(sc->sc_dev, "device timeout\n"); + device_printf(sc->sc_dev, "device timeout\n"); /* run_init(ifp); XXX needs a process context! */ ifp->if_oerrors++; return; @@ -4516,7 +4516,7 @@ run_init(struct ifnet *ifp) if ((sc->sc_flags & RUN_FWLOADED) == 0 && (error = run_load_microcode(sc)) != 0) { - aprint_error_dev(sc->sc_dev, + device_printf(sc->sc_dev, "could not load 8051 microcode\n"); goto fail; } @@ -4547,7 +4547,7 @@ run_init(struct ifnet *ifp) usbd_delay_ms(sc->sc_udev, 10); } if (ntries == 100) { - aprint_error_dev(sc->sc_dev, + device_printf(sc->sc_dev, "timeout waiting for DMA engine\n"); error = ETIMEDOUT; goto fail; @@ -4565,7 +4565,7 @@ run_init(struct ifnet *ifp) run_write(sc, RT2860_USB_DMA_CFG, 0); if ((error = run_reset(sc)) != 0) { - aprint_error_dev(sc->sc_dev, "could not reset chipset\n"); + device_printf(sc->sc_dev, "could not reset chipset\n"); goto fail; } @@ -4625,7 +4625,7 @@ run_init(struct ifnet *ifp) usbd_delay_ms(sc->sc_udev, 10); if ((error = run_bbp_init(sc)) != 0) { - aprint_error_dev(sc->sc_dev, "could not initialize BBP\n"); + device_printf(sc->sc_dev, "could not initialize BBP\n"); goto fail; }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Thu Nov 29 18:53:42 UTC 2018 Modified Files: src/sys/dev/usb: if_run.c Log Message: Correct abuses of aprint_error_dev(9). To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/if_run.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Thu Nov 29 17:40:12 UTC 2018 Modified Files: src/sys/compat/linux/common: linux_misc_notalpha.c src/sys/kern: kern_time.c Log Message: Improve my kern_time.c::rev1.192, systematically clear the buffers we get from 'ptimer_pool' to prevent more leaks. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 \ src/sys/compat/linux/common/linux_misc_notalpha.c cvs rdiff -u -r1.192 -r1.193 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_misc_notalpha.c diff -u src/sys/compat/linux/common/linux_misc_notalpha.c:1.109 src/sys/compat/linux/common/linux_misc_notalpha.c:1.110 --- src/sys/compat/linux/common/linux_misc_notalpha.c:1.109 Sun Nov 9 17:48:08 2014 +++ src/sys/compat/linux/common/linux_misc_notalpha.c Thu Nov 29 17:40:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc_notalpha.c,v 1.109 2014/11/09 17:48:08 maxv Exp $ */ +/* $NetBSD: linux_misc_notalpha.c,v 1.110 2018/11/29 17:40:12 maxv Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.109 2014/11/09 17:48:08 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.110 2018/11/29 17:40:12 maxv Exp $"); /* * Note that we must NOT include "opt_compat_linux32.h" here, @@ -161,6 +161,7 @@ linux_sys_alarm(struct lwp *l, const str if (spare == NULL) { mutex_spin_exit(_lock); spare = pool_get(_pool, PR_WAITOK); + memset(spare, 0, sizeof(*spare)); goto retry; } ptp = spare; Index: src/sys/kern/kern_time.c diff -u src/sys/kern/kern_time.c:1.192 src/sys/kern/kern_time.c:1.193 --- src/sys/kern/kern_time.c:1.192 Wed Nov 28 15:10:40 2018 +++ src/sys/kern/kern_time.c Thu Nov 29 17:40:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time.c,v 1.192 2018/11/28 15:10:40 maxv Exp $ */ +/* $NetBSD: kern_time.c,v 1.193 2018/11/29 17:40:12 maxv Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.192 2018/11/28 15:10:40 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.193 2018/11/29 17:40:12 maxv Exp $"); #include #include @@ -1166,6 +1166,7 @@ dosetitimer(struct proc *p, int which, s if (spare == NULL) { mutex_spin_exit(_lock); spare = pool_get(_pool, PR_WAITOK); + memset(spare, 0, sizeof(*spare)); goto retry; } pt = spare;
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Thu Nov 29 17:40:12 UTC 2018 Modified Files: src/sys/compat/linux/common: linux_misc_notalpha.c src/sys/kern: kern_time.c Log Message: Improve my kern_time.c::rev1.192, systematically clear the buffers we get from 'ptimer_pool' to prevent more leaks. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 \ src/sys/compat/linux/common/linux_misc_notalpha.c cvs rdiff -u -r1.192 -r1.193 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Thu Nov 29 16:04:21 UTC 2018 Modified Files: src/doc: 3RDPARTY Log Message: new openssl versions out To generate a diff of this commit: cvs rdiff -u -r1.1572 -r1.1573 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Thu Nov 29 16:04:21 UTC 2018 Modified Files: src/doc: 3RDPARTY Log Message: new openssl versions out To generate a diff of this commit: cvs rdiff -u -r1.1572 -r1.1573 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1572 src/doc/3RDPARTY:1.1573 --- src/doc/3RDPARTY:1.1572 Sun Nov 11 23:04:27 2018 +++ src/doc/3RDPARTY Thu Nov 29 16:04:21 2018 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1572 2018/11/11 23:04:27 mrg Exp $ +# $NetBSD: 3RDPARTY,v 1.1573 2018/11/29 16:04:21 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1072,7 +1072,7 @@ markus is very cooperative about it): Package: OpenSSL Version: 1.0.2o/1.1.0i -Current Vers: 1.0.2p/1.1.0i +Current Vers: 1.0.2q/1.1.0j Maintainer: The OpenSSL Project Archive Site: ftp://ftp.openssl.org/source/ Home Page: http://www.openssl.org/
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 15:00:45 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1112 and #1113 To generate a diff of this commit: cvs rdiff -u -r1.1.2.65 -r1.1.2.66 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.65 src/doc/CHANGES-8.1:1.1.2.66 --- src/doc/CHANGES-8.1:1.1.2.65 Thu Nov 29 08:52:08 2018 +++ src/doc/CHANGES-8.1 Thu Nov 29 15:00:45 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.65 2018/11/29 08:52:08 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.66 2018/11/29 15:00:45 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -1835,3 +1835,13 @@ sys/arch/amd64/amd64/machdep.c 1.321 Fix stack info leak. [maxv, ticket #] +sys/kern/sys_ptrace_common.c 1.46 + + Fix stack info leak. + [maxv, ticket #1112] + +sys/kern/kern_sig.c1.350 + + Fix kernel info leak. + [maxv, ticket #1113] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 15:00:45 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1112 and #1113 To generate a diff of this commit: cvs rdiff -u -r1.1.2.65 -r1.1.2.66 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 14:59:56 UTC 2018 Modified Files: src/sys/kern [netbsd-8]: kern_sig.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1113): sys/kern/kern_sig.c: revision 1.350 Fix kernel info leak, 4 bytes of padding at the end of struct sigaction. + Possible info leak: [len=32, leaked=4] | #0 0x80baf327 in kleak_copyout | #1 0x80bd9ca8 in sys___sigaction_sigtramp | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.336.4.2 -r1.336.4.3 src/sys/kern/kern_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_sig.c diff -u src/sys/kern/kern_sig.c:1.336.4.2 src/sys/kern/kern_sig.c:1.336.4.3 --- src/sys/kern/kern_sig.c:1.336.4.2 Thu Apr 12 13:42:48 2018 +++ src/sys/kern/kern_sig.c Thu Nov 29 14:59:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.336.4.2 2018/04/12 13:42:48 martin Exp $ */ +/* $NetBSD: kern_sig.c,v 1.336.4.3 2018/11/29 14:59:56 martin Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.336.4.2 2018/04/12 13:42:48 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.336.4.3 2018/11/29 14:59:56 martin Exp $"); #include "opt_ptrace.h" #include "opt_dtrace.h" @@ -189,6 +189,13 @@ signal_listener_cb(kauth_cred_t cred, ka return result; } +static int +sigacts_ctor(void *arg __unused, void *obj, int flags __unused) +{ + memset(obj, 0, sizeof(struct sigacts)); + return 0; +} + /* * signal_init: * @@ -202,7 +209,7 @@ signal_init(void) sigacts_cache = pool_cache_init(sizeof(struct sigacts), 0, 0, 0, "sigacts", sizeof(struct sigacts) > PAGE_SIZE ? - _allocator : NULL, IPL_NONE, NULL, NULL, NULL); + _allocator : NULL, IPL_NONE, sigacts_ctor, NULL, NULL); ksiginfo_cache = pool_cache_init(sizeof(ksiginfo_t), 0, 0, 0, "ksiginfo", NULL, IPL_VM, NULL, NULL, NULL);
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 14:59:56 UTC 2018 Modified Files: src/sys/kern [netbsd-8]: kern_sig.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1113): sys/kern/kern_sig.c: revision 1.350 Fix kernel info leak, 4 bytes of padding at the end of struct sigaction. + Possible info leak: [len=32, leaked=4] | #0 0x80baf327 in kleak_copyout | #1 0x80bd9ca8 in sys___sigaction_sigtramp | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.336.4.2 -r1.336.4.3 src/sys/kern/kern_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 14:58:25 UTC 2018 Modified Files: src/sys/kern [netbsd-8]: sys_ptrace_common.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1112): sys/kern/sys_ptrace_common.c: revision 1.46 Fix stack info leak. + Possible info leak: [len=136, leaked=92] | #0 0x80baf397 in kleak_copyout | #1 0x80bd4155 in ptrace_copyout_siginfo | #2 0x80bd5348 in do_ptrace | #3 0x80bd40fe in sys_ptrace | #4 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.22.2.3 -r1.22.2.4 src/sys/kern/sys_ptrace_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_ptrace_common.c diff -u src/sys/kern/sys_ptrace_common.c:1.22.2.3 src/sys/kern/sys_ptrace_common.c:1.22.2.4 --- src/sys/kern/sys_ptrace_common.c:1.22.2.3 Sat May 5 19:13:21 2018 +++ src/sys/kern/sys_ptrace_common.c Thu Nov 29 14:58:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace_common.c,v 1.22.2.3 2018/05/05 19:13:21 martin Exp $ */ +/* $NetBSD: sys_ptrace_common.c,v 1.22.2.4 2018/11/29 14:58:25 martin Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.22.2.3 2018/05/05 19:13:21 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.22.2.4 2018/11/29 14:58:25 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -553,6 +553,7 @@ ptrace_get_siginfo(struct proc *t, struc { struct ptrace_siginfo psi; + memset(, 0, sizeof(psi)); psi.psi_siginfo._info = t->p_sigctx.ps_info; psi.psi_lwpid = t->p_sigctx.ps_lwp;
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 14:58:25 UTC 2018 Modified Files: src/sys/kern [netbsd-8]: sys_ptrace_common.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1112): sys/kern/sys_ptrace_common.c: revision 1.46 Fix stack info leak. + Possible info leak: [len=136, leaked=92] | #0 0x80baf397 in kleak_copyout | #1 0x80bd4155 in ptrace_copyout_siginfo | #2 0x80bd5348 in do_ptrace | #3 0x80bd40fe in sys_ptrace | #4 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.22.2.3 -r1.22.2.4 src/sys/kern/sys_ptrace_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Thu Nov 29 12:37:22 UTC 2018 Modified Files: src/sys/kern: kern_exit.c Log Message: Fix info leak. There is one branch where 'status' is not initialized at all. + Possible info leak: [len=4, leaked=4] | #0 0x80baf397 in kleak_copyout | #1 0x80b56d0c in sys_wait6 | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.272 -r1.273 src/sys/kern/kern_exit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Thu Nov 29 12:37:22 UTC 2018 Modified Files: src/sys/kern: kern_exit.c Log Message: Fix info leak. There is one branch where 'status' is not initialized at all. + Possible info leak: [len=4, leaked=4] | #0 0x80baf397 in kleak_copyout | #1 0x80b56d0c in sys_wait6 | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.272 -r1.273 src/sys/kern/kern_exit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_exit.c diff -u src/sys/kern/kern_exit.c:1.272 src/sys/kern/kern_exit.c:1.273 --- src/sys/kern/kern_exit.c:1.272 Thu Jul 12 10:46:48 2018 +++ src/sys/kern/kern_exit.c Thu Nov 29 12:37:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.272 2018/07/12 10:46:48 maxv Exp $ */ +/* $NetBSD: kern_exit.c,v 1.273 2018/11/29 12:37:22 maxv Exp $ */ /*- * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.272 2018/07/12 10:46:48 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.273 2018/11/29 12:37:22 maxv Exp $"); #include "opt_ktrace.h" #include "opt_dtrace.h" @@ -647,6 +647,7 @@ do_sys_waitid(idtype_t idtype, id_t id, if (child == NULL) { mutex_exit(proc_lock); *pid = 0; + *status = 0; return error; } *pid = child->p_pid;
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Thu Nov 29 11:45:52 UTC 2018 Modified Files: src/sys/kern: sys_ptrace_common.c Log Message: Fix stack info leak. + Possible info leak: [len=136, leaked=92] | #0 0x80baf397 in kleak_copyout | #1 0x80bd4155 in ptrace_copyout_siginfo | #2 0x80bd5348 in do_ptrace | #3 0x80bd40fe in sys_ptrace | #4 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/kern/sys_ptrace_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_ptrace_common.c diff -u src/sys/kern/sys_ptrace_common.c:1.45 src/sys/kern/sys_ptrace_common.c:1.46 --- src/sys/kern/sys_ptrace_common.c:1.45 Sat Jun 23 03:32:48 2018 +++ src/sys/kern/sys_ptrace_common.c Thu Nov 29 11:45:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace_common.c,v 1.45 2018/06/23 03:32:48 christos Exp $ */ +/* $NetBSD: sys_ptrace_common.c,v 1.46 2018/11/29 11:45:52 maxv Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.45 2018/06/23 03:32:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.46 2018/11/29 11:45:52 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -570,6 +570,7 @@ ptrace_get_siginfo(struct proc *t, struc { struct ptrace_siginfo psi; + memset(, 0, sizeof(psi)); psi.psi_siginfo._info = t->p_sigctx.ps_info; psi.psi_lwpid = t->p_sigctx.ps_lwp; DPRINTF(("%s: lwp=%d signal=%d\n", __func__, psi.psi_lwpid,
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Thu Nov 29 11:45:52 UTC 2018 Modified Files: src/sys/kern: sys_ptrace_common.c Log Message: Fix stack info leak. + Possible info leak: [len=136, leaked=92] | #0 0x80baf397 in kleak_copyout | #1 0x80bd4155 in ptrace_copyout_siginfo | #2 0x80bd5348 in do_ptrace | #3 0x80bd40fe in sys_ptrace | #4 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/kern/sys_ptrace_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Thu Nov 29 11:23:49 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 Log Message: Add nvme at pci To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/evbarm/conf/GENERIC64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Thu Nov 29 11:23:49 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 Log Message: Add nvme at pci To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/evbarm/conf/GENERIC64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.66 src/sys/arch/evbarm/conf/GENERIC64:1.67 --- src/sys/arch/evbarm/conf/GENERIC64:1.66 Fri Nov 23 12:15:14 2018 +++ src/sys/arch/evbarm/conf/GENERIC64 Thu Nov 29 11:23:49 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.66 2018/11/23 12:15:14 skrll Exp $ +# $NetBSD: GENERIC64,v 1.67 2018/11/29 11:23:49 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -322,6 +322,10 @@ atapibus* at atapi? wd* at atabus? drive ? cd* at atapibus? drive ? +# NVMe +nvme* at pci? dev ? function ? +ld* at nvme? nsid ? + # SPI controllers bcmspi* at fdt? # Broadcom BCM283x SPI spi* at spibus?
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Thu Nov 29 10:27:36 UTC 2018 Modified Files: src/sys/kern: kern_sig.c Log Message: Fix kernel info leak, 4 bytes of padding at the end of struct sigaction. + Possible info leak: [len=32, leaked=4] | #0 0x80baf327 in kleak_copyout | #1 0x80bd9ca8 in sys___sigaction_sigtramp | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.349 -r1.350 src/sys/kern/kern_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_sig.c diff -u src/sys/kern/kern_sig.c:1.349 src/sys/kern/kern_sig.c:1.350 --- src/sys/kern/kern_sig.c:1.349 Mon May 28 14:07:37 2018 +++ src/sys/kern/kern_sig.c Thu Nov 29 10:27:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.349 2018/05/28 14:07:37 kamil Exp $ */ +/* $NetBSD: kern_sig.c,v 1.350 2018/11/29 10:27:36 maxv Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.349 2018/05/28 14:07:37 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.350 2018/11/29 10:27:36 maxv Exp $"); #include "opt_ptrace.h" #include "opt_dtrace.h" @@ -190,6 +190,13 @@ signal_listener_cb(kauth_cred_t cred, ka return result; } +static int +sigacts_ctor(void *arg __unused, void *obj, int flags __unused) +{ + memset(obj, 0, sizeof(struct sigacts)); + return 0; +} + /* * signal_init: * @@ -203,7 +210,7 @@ signal_init(void) sigacts_cache = pool_cache_init(sizeof(struct sigacts), 0, 0, 0, "sigacts", sizeof(struct sigacts) > PAGE_SIZE ? - _allocator : NULL, IPL_NONE, NULL, NULL, NULL); + _allocator : NULL, IPL_NONE, sigacts_ctor, NULL, NULL); ksiginfo_cache = pool_cache_init(sizeof(ksiginfo_t), 0, 0, 0, "ksiginfo", NULL, IPL_VM, NULL, NULL, NULL);
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Thu Nov 29 10:27:36 UTC 2018 Modified Files: src/sys/kern: kern_sig.c Log Message: Fix kernel info leak, 4 bytes of padding at the end of struct sigaction. + Possible info leak: [len=32, leaked=4] | #0 0x80baf327 in kleak_copyout | #1 0x80bd9ca8 in sys___sigaction_sigtramp | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.349 -r1.350 src/sys/kern/kern_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Thu Nov 29 10:02:52 UTC 2018 Modified Files: src/sys/netinet6: ip6_output.c Log Message: Don't validate the source address of forwarding IPv6 packets (same as IPv4) To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/sys/netinet6/ip6_output.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Thu Nov 29 10:02:52 UTC 2018 Modified Files: src/sys/netinet6: ip6_output.c Log Message: Don't validate the source address of forwarding IPv6 packets (same as IPv4) To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/sys/netinet6/ip6_output.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_output.c diff -u src/sys/netinet6/ip6_output.c:1.212 src/sys/netinet6/ip6_output.c:1.213 --- src/sys/netinet6/ip6_output.c:1.212 Fri Aug 10 06:46:09 2018 +++ src/sys/netinet6/ip6_output.c Thu Nov 29 10:02:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_output.c,v 1.212 2018/08/10 06:46:09 maxv Exp $ */ +/* $NetBSD: ip6_output.c,v 1.213 2018/11/29 10:02:52 ozaki-r Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.212 2018/08/10 06:46:09 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.213 2018/11/29 10:02:52 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -578,6 +578,7 @@ ip6_output( /* Ensure we only send from a valid address. */ if ((ifp->if_flags & IFF_LOOPBACK) == 0 && + (flags & IPV6_FORWARDING) == 0 && (error = ip6_ifaddrvalid(, )) != 0) { char ip6buf[INET6_ADDRSTRLEN];
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Thu Nov 29 09:54:23 UTC 2018 Modified Files: src/sys/netinet: in.c src/sys/netinet6: in6.c Log Message: Don't run DAD on link-up if it's explicitly disabled To generate a diff of this commit: cvs rdiff -u -r1.232 -r1.233 src/sys/netinet/in.c cvs rdiff -u -r1.271 -r1.272 src/sys/netinet6/in6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/in.c diff -u src/sys/netinet/in.c:1.232 src/sys/netinet/in.c:1.233 --- src/sys/netinet/in.c:1.232 Thu Nov 29 09:51:20 2018 +++ src/sys/netinet/in.c Thu Nov 29 09:54:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.232 2018/11/29 09:51:20 ozaki-r Exp $ */ +/* $NetBSD: in.c,v 1.233 2018/11/29 09:54:22 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.232 2018/11/29 09:51:20 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.233 2018/11/29 09:54:22 ozaki-r Exp $"); #include "arp.h" @@ -1470,7 +1470,8 @@ in_if_link_up(struct ifnet *ifp) /* If detached then mark as tentative */ if (ia->ia4_flags & IN_IFF_DETACHED) { ia->ia4_flags &= ~IN_IFF_DETACHED; - if (if_do_dad(ifp) && ia->ia_dad_start != NULL) + if (ip_dad_enabled() && if_do_dad(ifp) && + ia->ia_dad_start != NULL) ia->ia4_flags |= IN_IFF_TENTATIVE; else if ((ia->ia4_flags & IN_IFF_TENTATIVE) == 0) rt_newaddrmsg(RTM_NEWADDR, ifa, 0, NULL); Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.271 src/sys/netinet6/in6.c:1.272 --- src/sys/netinet6/in6.c:1.271 Thu Nov 29 09:51:21 2018 +++ src/sys/netinet6/in6.c Thu Nov 29 09:54:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.271 2018/11/29 09:51:21 ozaki-r Exp $ */ +/* $NetBSD: in6.c,v 1.272 2018/11/29 09:54:23 ozaki-r Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.271 2018/11/29 09:51:21 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.272 2018/11/29 09:54:23 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2204,7 +2204,7 @@ in6_if_link_up(struct ifnet *ifp) /* If detached then mark as tentative */ if (ia->ia6_flags & IN6_IFF_DETACHED) { ia->ia6_flags &= ~IN6_IFF_DETACHED; - if (if_do_dad(ifp)) { + if (ip6_dad_enabled() && if_do_dad(ifp)) { ia->ia6_flags |= IN6_IFF_TENTATIVE; nd6log(LOG_ERR, "%s marked tentative\n", IN6_PRINT(ip6buf,
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Thu Nov 29 09:54:23 UTC 2018 Modified Files: src/sys/netinet: in.c src/sys/netinet6: in6.c Log Message: Don't run DAD on link-up if it's explicitly disabled To generate a diff of this commit: cvs rdiff -u -r1.232 -r1.233 src/sys/netinet/in.c cvs rdiff -u -r1.271 -r1.272 src/sys/netinet6/in6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Thu Nov 29 09:51:21 UTC 2018 Modified Files: src/sys/netinet: if_arp.c in.c in_var.h src/sys/netinet6: in6.c ip6_var.h nd6_nbr.c Log Message: Introduce and use ip_dad_enabled() and ip6_dad_enabled() functions To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/netinet/if_arp.c cvs rdiff -u -r1.231 -r1.232 src/sys/netinet/in.c cvs rdiff -u -r1.96 -r1.97 src/sys/netinet/in_var.h cvs rdiff -u -r1.270 -r1.271 src/sys/netinet6/in6.c cvs rdiff -u -r1.80 -r1.81 src/sys/netinet6/ip6_var.h cvs rdiff -u -r1.156 -r1.157 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Thu Nov 29 09:51:21 UTC 2018 Modified Files: src/sys/netinet: if_arp.c in.c in_var.h src/sys/netinet6: in6.c ip6_var.h nd6_nbr.c Log Message: Introduce and use ip_dad_enabled() and ip6_dad_enabled() functions To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/netinet/if_arp.c cvs rdiff -u -r1.231 -r1.232 src/sys/netinet/in.c cvs rdiff -u -r1.96 -r1.97 src/sys/netinet/in_var.h cvs rdiff -u -r1.270 -r1.271 src/sys/netinet6/in6.c cvs rdiff -u -r1.80 -r1.81 src/sys/netinet6/ip6_var.h cvs rdiff -u -r1.156 -r1.157 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.276 src/sys/netinet/if_arp.c:1.277 --- src/sys/netinet/if_arp.c:1.276 Tue Oct 30 05:54:41 2018 +++ src/sys/netinet/if_arp.c Thu Nov 29 09:51:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.276 2018/10/30 05:54:41 ozaki-r Exp $ */ +/* $NetBSD: if_arp.c,v 1.277 2018/11/29 09:51:20 ozaki-r Exp $ */ /* * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.276 2018/10/30 05:54:41 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.277 2018/11/29 09:51:20 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1491,7 +1491,7 @@ arp_ifinit(struct ifnet *ifp, struct ifa } else { ia->ia_dad_start = arp_dad_start; ia->ia_dad_stop = arp_dad_stop; - if (ia->ia4_flags & IN_IFF_TRYTENTATIVE && ip_dad_count > 0) + if (ia->ia4_flags & IN_IFF_TRYTENTATIVE && ip_dad_enabled()) ia->ia4_flags |= IN_IFF_TENTATIVE; else arpannounce1(ifa); @@ -1597,7 +1597,7 @@ arp_dad_start(struct ifaddr *ifa) /* * If we don't need DAD, don't do it. - * - DAD is disabled (ip_dad_count == 0) + * - DAD is disabled */ if (!(ia->ia4_flags & IN_IFF_TENTATIVE)) { log(LOG_DEBUG, @@ -1606,7 +1606,7 @@ arp_dad_start(struct ifaddr *ifa) ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???"); return; } - if (!ip_dad_count) { + if (!ip_dad_enabled()) { ia->ia4_flags &= ~IN_IFF_TENTATIVE; rt_newaddrmsg(RTM_NEWADDR, ifa, 0, NULL); arpannounce1(ifa); @@ -1806,7 +1806,7 @@ arp_dad_duplicated(struct ifaddr *ifa, c return; } else { /* If DAD is disabled, just report the duplicate. */ - if (ip_dad_count == 0) { + if (!ip_dad_enabled()) { log(LOG_ERR, "%s: DAD ignoring duplicate address %s from %s\n", if_name(ifp), iastr, sha); Index: src/sys/netinet/in.c diff -u src/sys/netinet/in.c:1.231 src/sys/netinet/in.c:1.232 --- src/sys/netinet/in.c:1.231 Sun May 13 22:42:51 2018 +++ src/sys/netinet/in.c Thu Nov 29 09:51:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.231 2018/05/13 22:42:51 khorben Exp $ */ +/* $NetBSD: in.c,v 1.232 2018/11/29 09:51:20 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.231 2018/05/13 22:42:51 khorben Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.232 2018/11/29 09:51:20 ozaki-r Exp $"); #include "arp.h" @@ -1155,11 +1155,7 @@ in_ifinit(struct ifnet *ifp, struct in_i if (ifp->if_link_state == LINK_STATE_DOWN) { ia->ia4_flags |= IN_IFF_DETACHED; ia->ia4_flags &= ~IN_IFF_TENTATIVE; - } else if (hostIsNew && if_do_dad(ifp) -#if NARP > 0 - && ip_dad_count > 0 -#endif - ) + } else if (hostIsNew && if_do_dad(ifp) && ip_dad_enabled()) ia->ia4_flags |= IN_IFF_TRYTENTATIVE; /* Index: src/sys/netinet/in_var.h diff -u src/sys/netinet/in_var.h:1.96 src/sys/netinet/in_var.h:1.97 --- src/sys/netinet/in_var.h:1.96 Thu Apr 19 21:21:44 2018 +++ src/sys/netinet/in_var.h Thu Nov 29 09:51:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in_var.h,v 1.96 2018/04/19 21:21:44 christos Exp $ */ +/* $NetBSD: in_var.h,v 1.97 2018/11/29 09:51:20 ozaki-r Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -378,6 +378,17 @@ struct in_multi { extern pktqueue_t *ip_pktq; extern int ip_dad_count; /* Duplicate Address Detection probes */ + +static inline bool +ip_dad_enabled(void) +{ +#if NARP > 0 + return ip_dad_count > 0; +#else + return false; +#endif +} + #if defined(INET) && NARP > 0 extern int arp_debug; #define ARPLOGADDR(a) IN_PRINT(_ipbuf, a) Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.270 src/sys/netinet6/in6.c:1.271 --- src/sys/netinet6/in6.c:1.270 Tue Oct 30 05:56:02 2018 +++ src/sys/netinet6/in6.c Thu Nov 29 09:51:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.270 2018/10/30 05:56:02 ozaki-r Exp $ */ +/* $NetBSD: in6.c,v 1.271 2018/11/29 09:51:21 ozaki-r Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.270 2018/10/30 05:56:02 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.271
Re: CVS commit: src/sys
On Thu, Nov 29, 2018 at 03:28:33PM +1300, Mark Davies wrote: > > > On 25/11/18 07:23, Manuel Bouyer wrote: > > Log Message: > > Add mpii(4), a driver for LSI Megaraid Fusion controllers. > > Ported from OpenBSD. This driver is MP-safe. > > Yay. Any chance of this being pulled up to 8? Sure, actually I did the work on -8, and then forward-ported to HEAD :) I just want to test the server under load and fix remaining bugs, if any, before requesting the pullup. -- Manuel Bouyer NetBSD: 26 ans d'experience feront toujours la difference --
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 09:01:07 UTC 2018 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: Ticket #1660 To generate a diff of this commit: cvs rdiff -u -r1.1.2.117 -r1.1.2.118 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 09:01:07 UTC 2018 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: Ticket #1660 To generate a diff of this commit: cvs rdiff -u -r1.1.2.117 -r1.1.2.118 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.117 src/doc/CHANGES-7.0.3:1.1.2.118 --- src/doc/CHANGES-7.0.3:1.1.2.117 Wed Nov 28 19:58:15 2018 +++ src/doc/CHANGES-7.0.3 Thu Nov 29 09:01:07 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.117 2018/11/28 19:58:15 martin Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.118 2018/11/29 09:01:07 martin Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -5604,3 +5604,8 @@ libexec/httpd/main.c1.22 Fix -X option parsing and miscelaneous cleanup. [mrg, ticket #1659] +sys/kern/kern_time.c1.192 + + Fix kernel info leak. + [maxv, ticket #1660] +
CVS commit: [netbsd-7-0] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 09:00:14 UTC 2018 Modified Files: src/sys/kern [netbsd-7-0]: kern_time.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1660): sys/kern/kern_time.c: revision 1.192 Fix kernel info leak. + Possible info leak: [len=32, leaked=16] | #0 0x80baf3a7 in kleak_copyout | #1 0x80b940f8 in sys___timer_settime50 | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.179.12.1 -r1.179.12.2 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_time.c diff -u src/sys/kern/kern_time.c:1.179.12.1 src/sys/kern/kern_time.c:1.179.12.2 --- src/sys/kern/kern_time.c:1.179.12.1 Thu Mar 3 15:41:35 2016 +++ src/sys/kern/kern_time.c Thu Nov 29 09:00:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time.c,v 1.179.12.1 2016/03/03 15:41:35 martin Exp $ */ +/* $NetBSD: kern_time.c,v 1.179.12.2 2018/11/29 09:00:14 martin Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.12.1 2016/03/03 15:41:35 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.12.2 2018/11/29 09:00:14 martin Exp $"); #include #include @@ -566,6 +566,7 @@ timer_create1(timer_t *tid, clockid_t id pts = timers_alloc(p); pt = pool_get(_pool, PR_WAITOK); + memset(pt, 0, sizeof(*pt)); if (evp != NULL) { if (((error = (*fetch_event)(evp, >pt_ev, sizeof(pt->pt_ev))) != 0) ||
CVS commit: [netbsd-7-0] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 09:00:14 UTC 2018 Modified Files: src/sys/kern [netbsd-7-0]: kern_time.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1660): sys/kern/kern_time.c: revision 1.192 Fix kernel info leak. + Possible info leak: [len=32, leaked=16] | #0 0x80baf3a7 in kleak_copyout | #1 0x80b940f8 in sys___timer_settime50 | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.179.12.1 -r1.179.12.2 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-1] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 08:59:26 UTC 2018 Modified Files: src/sys/kern [netbsd-7-1]: kern_time.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1660): sys/kern/kern_time.c: revision 1.192 Fix kernel info leak. + Possible info leak: [len=32, leaked=16] | #0 0x80baf3a7 in kleak_copyout | #1 0x80b940f8 in sys___timer_settime50 | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.179.8.1 -r1.179.8.1.4.1 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_time.c diff -u src/sys/kern/kern_time.c:1.179.8.1 src/sys/kern/kern_time.c:1.179.8.1.4.1 --- src/sys/kern/kern_time.c:1.179.8.1 Thu Mar 3 15:42:26 2016 +++ src/sys/kern/kern_time.c Thu Nov 29 08:59:26 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time.c,v 1.179.8.1 2016/03/03 15:42:26 martin Exp $ */ +/* $NetBSD: kern_time.c,v 1.179.8.1.4.1 2018/11/29 08:59:26 martin Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.1 2016/03/03 15:42:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.1.4.1 2018/11/29 08:59:26 martin Exp $"); #include #include @@ -566,6 +566,7 @@ timer_create1(timer_t *tid, clockid_t id pts = timers_alloc(p); pt = pool_get(_pool, PR_WAITOK); + memset(pt, 0, sizeof(*pt)); if (evp != NULL) { if (((error = (*fetch_event)(evp, >pt_ev, sizeof(pt->pt_ev))) != 0) ||
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 08:59:49 UTC 2018 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.3 Log Message: Ticket #1660 To generate a diff of this commit: cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-7.1.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1.3 diff -u src/doc/CHANGES-7.1.3:1.1.2.24 src/doc/CHANGES-7.1.3:1.1.2.25 --- src/doc/CHANGES-7.1.3:1.1.2.24 Wed Nov 28 19:56:34 2018 +++ src/doc/CHANGES-7.1.3 Thu Nov 29 08:59:49 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.3,v 1.1.2.24 2018/11/28 19:56:34 martin Exp $ +# $NetBSD: CHANGES-7.1.3,v 1.1.2.25 2018/11/29 08:59:49 martin Exp $ A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3 release: @@ -296,3 +296,8 @@ libexec/httpd/main.c1.22 Fix -X option parsing and miscelaneous cleanup. [mrg, ticket #1659] +sys/kern/kern_time.c1.192 + + Fix kernel info leak. + [maxv, ticket #1660] +
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 08:59:49 UTC 2018 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.3 Log Message: Ticket #1660 To generate a diff of this commit: cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-7.1.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-1] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 08:59:26 UTC 2018 Modified Files: src/sys/kern [netbsd-7-1]: kern_time.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1660): sys/kern/kern_time.c: revision 1.192 Fix kernel info leak. + Possible info leak: [len=32, leaked=16] | #0 0x80baf3a7 in kleak_copyout | #1 0x80b940f8 in sys___timer_settime50 | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.179.8.1 -r1.179.8.1.4.1 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 08:57:16 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1660 To generate a diff of this commit: cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.19 src/doc/CHANGES-7.3:1.1.2.20 --- src/doc/CHANGES-7.3:1.1.2.19 Thu Nov 29 08:37:12 2018 +++ src/doc/CHANGES-7.3 Thu Nov 29 08:57:16 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.19 2018/11/29 08:37:12 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.20 2018/11/29 08:57:16 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -304,3 +304,8 @@ libexec/httpd/main.c1.22 Fix -X option parsing and miscelaneous cleanup. [mrg, ticket #1659] +sys/kern/kern_time.c1.192 + + Fix kernel info leak. + [maxv, ticket #1660] +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 08:57:16 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1660 To generate a diff of this commit: cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 08:56:45 UTC 2018 Modified Files: src/sys/kern [netbsd-7]: kern_time.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1660): sys/kern/kern_time.c: revision 1.192 Fix kernel info leak. + Possible info leak: [len=32, leaked=16] | #0 0x80baf3a7 in kleak_copyout | #1 0x80b940f8 in sys___timer_settime50 | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.179.8.1 -r1.179.8.2 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 08:52:08 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1110 and # To generate a diff of this commit: cvs rdiff -u -r1.1.2.64 -r1.1.2.65 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.64 src/doc/CHANGES-8.1:1.1.2.65 --- src/doc/CHANGES-8.1:1.1.2.64 Wed Nov 28 19:51:30 2018 +++ src/doc/CHANGES-8.1 Thu Nov 29 08:52:08 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.64 2018/11/28 19:51:30 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.65 2018/11/29 08:52:08 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -1825,3 +1825,13 @@ libexec/httpd/main.c1.22 Fix -X option parsing and miscelaneous cleanup. [mrg, ticket #1109] +sys/kern/kern_time.c1.192 + + Fix kernel info leak. + [maxv, ticket #1110] + +sys/arch/amd64/amd64/machdep.c 1.321 + + Fix stack info leak. + [maxv, ticket #] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 08:52:08 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1110 and # To generate a diff of this commit: cvs rdiff -u -r1.1.2.64 -r1.1.2.65 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/amd64/amd64
Module Name:src Committed By: martin Date: Thu Nov 29 08:51:01 UTC 2018 Modified Files: src/sys/arch/amd64/amd64 [netbsd-8]: machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #): sys/arch/amd64/amd64/machdep.c: revision 1.321 Fix stack info leak. There is a big padding in struct sigframe_siginfo. [ 224.006287] kleak: Possible leak in copyout: [len=920, leaked=92] [ 224.016977] #0 0x80224d0a in kleak_note [ 224.026268] #1 0x80224d8a in kleak_copyout [ 224.026268] #2 0x802224b5 in sendsig_siginfo [ 224.036261] #3 0x80b51564 in sendsig [ 224.046475] #4 0x80b51282 in postsig [ 224.046475] #5 0x80b2fc5d in lwp_userret [ 224.056273] #6 0x8025a951 in mi_userret [ 224.066277] #7 0x8025ab89 in syscall To generate a diff of this commit: cvs rdiff -u -r1.255.6.7 -r1.255.6.8 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/amd64/amd64
Module Name:src Committed By: martin Date: Thu Nov 29 08:51:01 UTC 2018 Modified Files: src/sys/arch/amd64/amd64 [netbsd-8]: machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #): sys/arch/amd64/amd64/machdep.c: revision 1.321 Fix stack info leak. There is a big padding in struct sigframe_siginfo. [ 224.006287] kleak: Possible leak in copyout: [len=920, leaked=92] [ 224.016977] #0 0x80224d0a in kleak_note [ 224.026268] #1 0x80224d8a in kleak_copyout [ 224.026268] #2 0x802224b5 in sendsig_siginfo [ 224.036261] #3 0x80b51564 in sendsig [ 224.046475] #4 0x80b51282 in postsig [ 224.046475] #5 0x80b2fc5d in lwp_userret [ 224.056273] #6 0x8025a951 in mi_userret [ 224.066277] #7 0x8025ab89 in syscall To generate a diff of this commit: cvs rdiff -u -r1.255.6.7 -r1.255.6.8 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.255.6.7 src/sys/arch/amd64/amd64/machdep.c:1.255.6.8 --- src/sys/arch/amd64/amd64/machdep.c:1.255.6.7 Sat Jun 9 15:12:21 2018 +++ src/sys/arch/amd64/amd64/machdep.c Thu Nov 29 08:51:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.255.6.7 2018/06/09 15:12:21 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.255.6.8 2018/11/29 08:51:01 martin Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.255.6.7 2018/06/09 15:12:21 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.255.6.8 2018/11/29 08:51:01 martin Exp $"); /* #define XENDEBUG_LOW */ @@ -606,6 +606,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, c /* Round down the stackpointer to a multiple of 16 for the ABI. */ fp = (struct sigframe_siginfo *)(((unsigned long)sp & ~15) - 8); + memset(, 0, sizeof(frame)); frame.sf_ra = (uint64_t)ps->sa_sigdesc[sig].sd_tramp; frame.sf_si._info = ksi->ksi_info; frame.sf_uc.uc_flags = _UC_SIGMASK; @@ -613,7 +614,6 @@ sendsig_siginfo(const ksiginfo_t *ksi, c frame.sf_uc.uc_link = l->l_ctxlink; frame.sf_uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK) ? _UC_SETSTACK : _UC_CLRSTACK; - memset(_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack)); sendsig_reset(l, sig); mutex_exit(p->p_lock);
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 08:48:38 UTC 2018 Modified Files: src/sys/kern [netbsd-8]: kern_time.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1110): sys/kern/kern_time.c: revision 1.192 Fix kernel info leak. + Possible info leak: [len=32, leaked=16] | #0 0x80baf3a7 in kleak_copyout | #1 0x80b940f8 in sys___timer_settime50 | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.189.8.1 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_time.c diff -u src/sys/kern/kern_time.c:1.189 src/sys/kern/kern_time.c:1.189.8.1 --- src/sys/kern/kern_time.c:1.189 Fri Nov 11 15:29:36 2016 +++ src/sys/kern/kern_time.c Thu Nov 29 08:48:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time.c,v 1.189 2016/11/11 15:29:36 njoly Exp $ */ +/* $NetBSD: kern_time.c,v 1.189.8.1 2018/11/29 08:48:38 martin Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.189 2016/11/11 15:29:36 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.189.8.1 2018/11/29 08:48:38 martin Exp $"); #include #include @@ -602,6 +602,7 @@ timer_create1(timer_t *tid, clockid_t id pts = timers_alloc(p); pt = pool_get(_pool, PR_WAITOK); + memset(pt, 0, sizeof(*pt)); if (evp != NULL) { if (((error = (*fetch_event)(evp, >pt_ev, sizeof(pt->pt_ev))) != 0) ||
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Thu Nov 29 08:48:38 UTC 2018 Modified Files: src/sys/kern [netbsd-8]: kern_time.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1110): sys/kern/kern_time.c: revision 1.192 Fix kernel info leak. + Possible info leak: [len=32, leaked=16] | #0 0x80baf3a7 in kleak_copyout | #1 0x80b940f8 in sys___timer_settime50 | #2 0x80259c42 in syscall To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.189.8.1 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 08:37:12 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Better log entry for ticket #1656 To generate a diff of this commit: cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.18 src/doc/CHANGES-7.3:1.1.2.19 --- src/doc/CHANGES-7.3:1.1.2.18 Wed Nov 28 19:54:54 2018 +++ src/doc/CHANGES-7.3 Thu Nov 29 08:37:12 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.18 2018/11/28 19:54:54 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.19 2018/11/29 08:37:12 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -282,8 +282,7 @@ libexec/httpd/testsuite/test-simple sys/dev/pci/if_wm.c1.599 - - Fix a bug that i82578 PHY can't detect correctly. - - Print PHY OUI and model number if a PHY's can't be identified. + Fix a bug that i82578 workarounds didn't work correctly. [msaitoh, ticket #1656] sys/net/rtsock.c1.244 (adapted)
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Nov 29 08:37:12 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Better log entry for ticket #1656 To generate a diff of this commit: cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.