CVS commit: src
Module Name:src Committed By: pooka Date: Sun Nov 15 13:50:10 UTC 2015 Modified Files: src/share/mk: bsd.own.mk src/sys/rump: Makefile.rump Log Message: describe => rumpdescribe To generate a diff of this commit: cvs rdiff -u -r1.879 -r1.880 src/share/mk/bsd.own.mk cvs rdiff -u -r1.119 -r1.120 src/sys/rump/Makefile.rump Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.879 src/share/mk/bsd.own.mk:1.880 --- src/share/mk/bsd.own.mk:1.879 Fri Nov 6 01:17:08 2015 +++ src/share/mk/bsd.own.mk Sun Nov 15 13:50:10 2015 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.879 2015/11/06 01:17:08 jmcneill Exp $ +# $NetBSD: bsd.own.mk,v 1.880 2015/11/15 13:50:10 pooka Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -842,11 +842,13 @@ ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :} TARGETS+= all clean cleandir depend dependall includes \ - install lint obj regress tags html analyze describe + install lint obj regress tags html analyze describe \ + rumpdescribe PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ install lint obj regress beforedepend afterdepend \ beforeinstall afterinstall realinstall realdepend realall \ - html subdir-all subdir-install subdir-depend analyze describe + html subdir-all subdir-install subdir-depend analyze describe \ + rumpdescribe .PHONY: ${PHONY_NOTMAIN} .NOTMAIN: ${PHONY_NOTMAIN} Index: src/sys/rump/Makefile.rump diff -u src/sys/rump/Makefile.rump:1.119 src/sys/rump/Makefile.rump:1.120 --- src/sys/rump/Makefile.rump:1.119 Mon Oct 19 16:16:32 2015 +++ src/sys/rump/Makefile.rump Sun Nov 15 13:50:10 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rump,v 1.119 2015/10/19 16:16:32 pooka Exp $ +# $NetBSD: Makefile.rump,v 1.120 2015/11/15 13:50:10 pooka Exp $ # .if !defined(_RUMP_MK) @@ -243,7 +243,7 @@ __archivebuild: .USE .endif COMMENT?= (no description) -describe: .PHONY +rumpdescribe: .PHONY @printf '%-24s %s\n' '${LIB}' '${COMMENT}' _BSD_IOCONF_MK_USER_=1
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Sun Nov 15 13:59:52 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: ohci.c Log Message: Remove unused fields from ohci_pipe To generate a diff of this commit: cvs rdiff -u -r1.254.2.27 -r1.254.2.28 src/sys/dev/usb/ohci.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/ohci.c diff -u src/sys/dev/usb/ohci.c:1.254.2.27 src/sys/dev/usb/ohci.c:1.254.2.28 --- src/sys/dev/usb/ohci.c:1.254.2.27 Sat Nov 14 10:05:47 2015 +++ src/sys/dev/usb/ohci.c Sun Nov 15 13:59:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.254.2.27 2015/11/14 10:05:47 skrll Exp $ */ +/* $NetBSD: ohci.c,v 1.254.2.28 2015/11/15 13:59:52 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.27 2015/11/14 10:05:47 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.28 2015/11/15 13:59:52 skrll Exp $"); #include "opt_usb.h" @@ -256,19 +256,12 @@ struct ohci_pipe { /* Control pipe */ struct { usb_dma_t reqdma; - u_int length; - ohci_soft_td_t *setup, *data, *stat; } ctrl; /* Interrupt pipe */ struct { int nslots; int pos; } intr; - /* Bulk pipe */ - struct { - u_int length; - int isread; - } bulk; /* Isochronous pipe */ struct isoc { int next, inuse; @@ -2611,7 +2604,6 @@ ohci_device_ctrl_start(struct usbd_xfer tail->xfer = NULL; sed = opipe->sed; - opipe->ctrl.length = len; KASSERTMSG(OHCI_ED_GET_FA(O32TOH(sed->ed.ed_flags)) == dev->ud_addr, "address ED %d pipe %d\n", @@ -2820,9 +2812,6 @@ ohci_device_bulk_start(struct usbd_xfer xfer->ux_flags); DPRINTFN(4, "endpt=%d", endpt, 0, 0, 0); - opipe->bulk.isread = isread; - opipe->bulk.length = len; - usb_syncmem(&sed->dma, sed->offs, sizeof(sed->ed), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); /* Update device address */
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun Nov 15 14:39:12 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_drm_mode.c Log Message: If we are going to be doing read/modify/write in triple-buffered mode, make sure we don't read back the buffered values and not the active ones To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/nvidia/tegra_drm_mode.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/nvidia/tegra_drm_mode.c diff -u src/sys/arch/arm/nvidia/tegra_drm_mode.c:1.7 src/sys/arch/arm/nvidia/tegra_drm_mode.c:1.8 --- src/sys/arch/arm/nvidia/tegra_drm_mode.c:1.7 Sat Nov 14 23:16:41 2015 +++ src/sys/arch/arm/nvidia/tegra_drm_mode.c Sun Nov 15 14:39:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_drm_mode.c,v 1.7 2015/11/14 23:16:41 jmcneill Exp $ */ +/* $NetBSD: tegra_drm_mode.c,v 1.8 2015/11/15 14:39:12 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.7 2015/11/14 23:16:41 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.8 2015/11/15 14:39:12 jmcneill Exp $"); #include #include @@ -680,8 +680,8 @@ tegra_crtc_prepare(struct drm_crtc *crtc struct tegra_crtc *tegra_crtc = to_tegra_crtc(crtc); /* Access control */ - DC_WRITE(tegra_crtc, DC_CMD_STATE_ACCESS_REG, - DC_CMD_STATE_ACCESS_READ_MUX); + DC_WRITE(tegra_crtc, DC_CMD_STATE_ACCESS_REG, 0); + /* Enable window A programming */ DC_WRITE(tegra_crtc, DC_CMD_DISPLAY_WINDOW_HEADER_REG, DC_CMD_DISPLAY_WINDOW_HEADER_WINDOW_A_SELECT);
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: bouyer Date: Sun Nov 15 14:42:04 UTC 2015 Modified Files: src/sys/arch/xen/xen: xbdback_xenbus.c Log Message: Fix typo which caused the kenrel thread to be created with a 0 priority. This would cause the thread to be almost never scheduled when a userland process could use all CPU. Should fix the problem reported by Torbj�rn Granlund on port-xen@ To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.60 src/sys/arch/xen/xen/xbdback_xenbus.c:1.61 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.60 Sun Sep 21 12:46:15 2014 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Sun Nov 15 14:42:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.60 2014/09/21 12:46:15 bouyer Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.61 2015/11/15 14:42:03 bouyer Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.60 2014/09/21 12:46:15 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.61 2015/11/15 14:42:03 bouyer Exp $"); #include #include @@ -647,7 +647,7 @@ xbdback_connect(struct xbdback_instance hypervisor_enable_event(xbdi->xbdi_evtchn); hypervisor_notify_via_evtchn(xbdi->xbdi_evtchn); - if (kthread_create(IPL_NONE, KTHREAD_MPSAFE, NULL, + if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, xbdback_thread, xbdi, NULL, "%s", xbdi->xbdi_name) == 0) return 0;
CVS commit: [netbsd-6-1] src/external/bsd/ntp/scripts
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:17:03 UTC 2015 Modified Files: src/external/bsd/ntp/scripts [netbsd-6-1]: mkver Log Message: Pull up following revision(s) (requested by christos in ticket #1346): external/bsd/ntp/scripts/mkver: revision 1.8 PR/50426: Dave Tyson: Fix ntp reported version. To generate a diff of this commit: cvs rdiff -u -r1.2.16.2 -r1.2.16.3 src/external/bsd/ntp/scripts/mkver Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/scripts/mkver diff -u src/external/bsd/ntp/scripts/mkver:1.2.16.2 src/external/bsd/ntp/scripts/mkver:1.2.16.3 --- src/external/bsd/ntp/scripts/mkver:1.2.16.2 Sat Nov 7 22:46:29 2015 +++ src/external/bsd/ntp/scripts/mkver Sun Nov 15 16:17:03 2015 @@ -3,7 +3,7 @@ PROG=${1-UNKNOWN} ConfStr="$PROG" -ConfStr="$ConfStr 4.2.8p3" +ConfStr="$ConfStr 4.2.8p4" case "$CSET" in '') ;;
CVS commit: [netbsd-6-0] src/external/bsd/ntp/scripts
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:17:00 UTC 2015 Modified Files: src/external/bsd/ntp/scripts [netbsd-6-0]: mkver Log Message: Pull up following revision(s) (requested by christos in ticket #1346): external/bsd/ntp/scripts/mkver: revision 1.8 PR/50426: Dave Tyson: Fix ntp reported version. To generate a diff of this commit: cvs rdiff -u -r1.2.8.2 -r1.2.8.3 src/external/bsd/ntp/scripts/mkver Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/scripts/mkver diff -u src/external/bsd/ntp/scripts/mkver:1.2.8.2 src/external/bsd/ntp/scripts/mkver:1.2.8.3 --- src/external/bsd/ntp/scripts/mkver:1.2.8.2 Sun Nov 8 00:16:11 2015 +++ src/external/bsd/ntp/scripts/mkver Sun Nov 15 16:17:00 2015 @@ -3,7 +3,7 @@ PROG=${1-UNKNOWN} ConfStr="$PROG" -ConfStr="$ConfStr 4.2.8p3" +ConfStr="$ConfStr 4.2.8p4" case "$CSET" in '') ;;
CVS commit: [netbsd-6] src/external/bsd/ntp/scripts
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:16:53 UTC 2015 Modified Files: src/external/bsd/ntp/scripts [netbsd-6]: mkver Log Message: Pull up following revision(s) (requested by christos in ticket #1346): external/bsd/ntp/scripts/mkver: revision 1.8 PR/50426: Dave Tyson: Fix ntp reported version. To generate a diff of this commit: cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/external/bsd/ntp/scripts/mkver Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/scripts/mkver diff -u src/external/bsd/ntp/scripts/mkver:1.2.2.2 src/external/bsd/ntp/scripts/mkver:1.2.2.3 --- src/external/bsd/ntp/scripts/mkver:1.2.2.2 Sat Nov 7 22:26:48 2015 +++ src/external/bsd/ntp/scripts/mkver Sun Nov 15 16:16:53 2015 @@ -3,7 +3,7 @@ PROG=${1-UNKNOWN} ConfStr="$PROG" -ConfStr="$ConfStr 4.2.8p3" +ConfStr="$ConfStr 4.2.8p4" case "$CSET" in '') ;;
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:19:16 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: ticket 1346 To generate a diff of this commit: cvs rdiff -u -r1.1.2.226 -r1.1.2.227 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.226 src/doc/CHANGES-6.2:1.1.2.227 --- src/doc/CHANGES-6.2:1.1.2.226 Sat Nov 7 22:28:55 2015 +++ src/doc/CHANGES-6.2 Sun Nov 15 16:19:16 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.226 2015/11/07 22:28:55 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.227 2015/11/15 16:19:16 bouyer Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -12544,3 +12544,8 @@ external/bsd/ntp/scripts/mkver Update ntp to 4.2.8p4. [christos, ticket #1342] +external/bsd/ntp/scripts/mkver 1.8 + + PR/50426: Dave Tyson: Fix ntp reported version. + [christos, ticket #1346] +
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:19:20 UTC 2015 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: ticket 1346 To generate a diff of this commit: cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.48 src/doc/CHANGES-6.0.7:1.1.2.49 --- src/doc/CHANGES-6.0.7:1.1.2.48 Sun Nov 8 00:17:11 2015 +++ src/doc/CHANGES-6.0.7 Sun Nov 15 16:19:20 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.48 2015/11/08 00:17:11 snj Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.49 2015/11/15 16:19:20 bouyer Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -7010,3 +7010,8 @@ external/bsd/ntp/scripts/mkver Update ntp to 4.2.8p4. [christos, ticket #1342] +external/bsd/ntp/scripts/mkver 1.8 + + PR/50426: Dave Tyson: Fix ntp reported version. + [christos, ticket #1346] +
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:19:38 UTC 2015 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: ticket 1346 To generate a diff of this commit: cvs rdiff -u -r1.1.2.47 -r1.1.2.48 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.47 src/doc/CHANGES-6.1.6:1.1.2.48 --- src/doc/CHANGES-6.1.6:1.1.2.47 Sat Nov 7 22:50:18 2015 +++ src/doc/CHANGES-6.1.6 Sun Nov 15 16:19:38 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.47 2015/11/07 22:50:18 snj Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.48 2015/11/15 16:19:38 bouyer Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -6731,3 +6731,8 @@ external/bsd/ntp/scripts/mkver Update ntp to 4.2.8p4. [christos, ticket #1342] +external/bsd/ntp/scripts/mkver 1.8 + + PR/50426: Dave Tyson: Fix ntp reported version. + [christos, ticket #1346] +
CVS commit: [netbsd-6] src/sbin/raidctl
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:30:38 UTC 2015 Modified Files: src/sbin/raidctl [netbsd-6]: raidctl.c Log Message: Pull up following revision(s) (requested by manu in ticket #1304): sbin/raidctl/raidctl.c: revision 1.58 Better sanity check numbers given to raidctl(8) Replace atoi(3) by strtol(3), and check that numbers are valid, positive, and in int32_t range. The previous lack of check could silently lead to the same serial being set to all RAID volumes for instance because given numbers were bigger than INT_MAX. The consequence is in an awful mess when RAIDframe would mix volumes... To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.55.4.1 src/sbin/raidctl/raidctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.55 src/sbin/raidctl/raidctl.c:1.55.4.1 --- src/sbin/raidctl/raidctl.c:1.55 Wed Oct 12 16:45:37 2011 +++ src/sbin/raidctl/raidctl.c Sun Nov 15 16:30:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.55 2011/10/12 16:45:37 christos Exp $ */ +/* $NetBSD: raidctl.c,v 1.55.4.1 2015/11/15 16:30:38 bouyer Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: raidctl.c,v 1.55 2011/10/12 16:45:37 christos Exp $"); +__RCSID("$NetBSD: raidctl.c,v 1.55.4.1 2015/11/15 16:30:38 bouyer Exp $"); #endif @@ -85,6 +85,7 @@ static void get_bar(char *, double, int static void get_time_string(char *, int); static void rf_output_pmstat(int, int); static void rf_pm_configure(int, int, char *, int[]); +static unsigned int _strtoud(char *); int verbose; @@ -183,7 +184,7 @@ main(int argc,char *argv[]) break; case 'I': action = RAIDFRAME_INIT_LABELS; - serial_number = atoi(optarg); + serial_number = _strtoud(optarg); num_options++; break; case 'm': @@ -195,11 +196,11 @@ main(int argc,char *argv[]) action = RAIDFRAME_PARITYMAP_SET_DISABLE; parityconf = strdup(optarg); num_options++; - /* XXXjld: should rf_pm_configure do the atoi()s? */ + /* XXXjld: should rf_pm_configure do the strtol()s? */ i = 0; while (i < 3 && optind < argc && isdigit((int)argv[optind][0])) -parityparams[i++] = atoi(argv[optind++]); +parityparams[i++] = _strtoud(argv[optind++]); while (i < 3) parityparams[i++] = 0; break; @@ -1155,3 +1156,26 @@ usage(void) exit(1); /* NOTREACHED */ } + +static unsigned int +_strtoud(char *str) +{ + long num; + char *ep; + + errno = 0; + num = strtol(str, &ep, 10); + if (str[0] == '\0' || *ep != '\0') + errx(1, "Not a number: %s", str); + + if (errno) + err(1, "Inavlid number %s", str); + + if (num < 0) + errx(1, "Negative number: %s", str); + + if (num > INT_MAX) + errx(1, "Number too large: %s", str); + + return (unsigned int)num; +}
CVS commit: [netbsd-6] src/usr.bin/tset
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:33:26 UTC 2015 Modified Files: src/usr.bin/tset [netbsd-6]: set.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1308): usr.bin/tset/set.c: revision 1.18 Restore logic for setting the VERASE character. - use terminfo _unless_ the terminal does overstrike. - use terminfo data not only for an unset tty. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.4.1 src/usr.bin/tset/set.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tset/set.c diff -u src/usr.bin/tset/set.c:1.16 src/usr.bin/tset/set.c:1.16.4.1 --- src/usr.bin/tset/set.c:1.16 Mon Oct 3 12:36:32 2011 +++ src/usr.bin/tset/set.c Sun Nov 15 16:33:26 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: set.c,v 1.16 2011/10/03 12:36:32 roy Exp $ */ +/* $NetBSD: set.c,v 1.16.4.1 2015/11/15 16:33:26 bouyer Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: set.c,v 1.16 2011/10/03 12:36:32 roy Exp $"); +__RCSID("$NetBSD: set.c,v 1.16.4.1 2015/11/15 16:33:26 bouyer Exp $"); #include #include @@ -151,18 +151,20 @@ reset_mode(void) void set_control_chars(int erasechar, int intrchar, int killchar) { + int bs_char; + + if (key_backspace != NULL && key_backspace[1] == '\0') + bs_char = key_backspace[0]; + else + bs_char = 0; - if (mode.c_cc[VERASE] == 0 || erasechar != 0) { - if (erasechar == 0) { - if (over_strike && - key_backspace != NULL && - key_backspace[1] == '\0') -mode.c_cc[VERASE] = key_backspace[1]; - else -mode.c_cc[VERASE] = CERASE; - } else - mode.c_cc[VERASE] = erasechar; - } + if (erasechar == 0 && bs_char != 0 && !over_strike) + erasechar = -1; + if (erasechar < 0) + erasechar = (bs_char != 0) ? bs_char : CTRL('h'); + + if (mode.c_cc[VERASE] == 0 || erasechar != 0) + mode.c_cc[VERASE] = erasechar ? erasechar : CERASE; if (mode.c_cc[VINTR] == 0 || intrchar != 0) mode.c_cc[VINTR] = intrchar ? intrchar : CINTR;
CVS commit: [netbsd-6] src/sys/arch/powerpc
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:36:57 UTC 2015 Modified Files: src/sys/arch/powerpc/include [netbsd-6]: psl.h userret.h src/sys/arch/powerpc/oea [netbsd-6]: altivec.c oea_machdep.c src/sys/arch/powerpc/powerpc [netbsd-6]: fpu.c Log Message: Pull up following revision(s) (requested by matt in ticket #1310): sys/arch/powerpc/include/userret.h: revision 1.30 sys/arch/powerpc/powerpc/fpu.c: revision 1.36 sys/arch/powerpc/include/psl.h: revision 1.20 sys/arch/powerpc/include/userret.h: revision 1.29 sys/arch/powerpc/oea/oea_machdep.c: revision 1.72 sys/arch/powerpc/oea/altivec.c: revision 1.30 Add a check to make sure that if PSL_FP is set, we own the FPU. Don't clear PSL_FP/PSL_VEC Don't reload if just re-enabling Don't reload the FPU register if this is just a re-enable. Remove PSL_SPV from BOOKE PSL_USERMOD Don't preserve PSL_FP/PSL_VEC in cpu_setmcontext. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.8.1 src/sys/arch/powerpc/include/psl.h cvs rdiff -u -r1.22.8.1 -r1.22.8.2 src/sys/arch/powerpc/include/userret.h cvs rdiff -u -r1.25 -r1.25.8.1 src/sys/arch/powerpc/oea/altivec.c cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/arch/powerpc/oea/oea_machdep.c cvs rdiff -u -r1.31 -r1.31.8.1 src/sys/arch/powerpc/powerpc/fpu.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/powerpc/include/psl.h diff -u src/sys/arch/powerpc/include/psl.h:1.18 src/sys/arch/powerpc/include/psl.h:1.18.8.1 --- src/sys/arch/powerpc/include/psl.h:1.18 Mon Jun 20 07:23:36 2011 +++ src/sys/arch/powerpc/include/psl.h Sun Nov 15 16:36:57 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.18 2011/06/20 07:23:36 matt Exp $ */ +/* $NetBSD: psl.h,v 1.18.8.1 2015/11/15 16:36:57 bouyer Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -111,7 +111,7 @@ extern register_t cpu_psluserset, cpu_ps #elif defined(PPC_BOOKE) #define PSL_USERSET (PSL_EE | PSL_PR | PSL_IS | PSL_DS | PSL_ME | PSL_CE | PSL_DE) #define PSL_USERMASK (PSL_SPV | PSL_CE | 0x) -#define PSL_USERMOD (PSL_SPV) +#define PSL_USERMOD (0) #else /* PPC_IBM4XX */ #ifdef PPC_IBM403 #define PSL_USERSET (PSL_EE | PSL_PR | PSL_IR | PSL_DR | PSL_ME) Index: src/sys/arch/powerpc/include/userret.h diff -u src/sys/arch/powerpc/include/userret.h:1.22.8.1 src/sys/arch/powerpc/include/userret.h:1.22.8.2 --- src/sys/arch/powerpc/include/userret.h:1.22.8.1 Wed Jun 13 19:44:11 2012 +++ src/sys/arch/powerpc/include/userret.h Sun Nov 15 16:36:57 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.22.8.1 2012/06/13 19:44:11 riz Exp $ */ +/* $NetBSD: userret.h,v 1.22.8.2 2015/11/15 16:36:57 bouyer Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -58,7 +58,8 @@ userret(struct lwp *l, struct trapframe /* Invoke MI userret code */ mi_userret(l); - tf->tf_srr1 &= PSL_USERSRR1; /* clear SRR1 status bits */ + /* clear SRR1 status bits */ + tf->tf_srr1 &= (PSL_USERSRR1|PSL_FP|PSL_VEC); #ifdef ALTIVEC /* Index: src/sys/arch/powerpc/oea/altivec.c diff -u src/sys/arch/powerpc/oea/altivec.c:1.25 src/sys/arch/powerpc/oea/altivec.c:1.25.8.1 --- src/sys/arch/powerpc/oea/altivec.c:1.25 Tue Jun 7 01:01:43 2011 +++ src/sys/arch/powerpc/oea/altivec.c Sun Nov 15 16:36:57 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: altivec.c,v 1.25 2011/06/07 01:01:43 matt Exp $ */ +/* $NetBSD: altivec.c,v 1.25.8.1 2015/11/15 16:36:57 bouyer Exp $ */ /* * Copyright (C) 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.25 2011/06/07 01:01:43 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.25.8.1 2015/11/15 16:36:57 bouyer Exp $"); #include "opt_multiprocessor.h" @@ -82,18 +82,26 @@ vec_state_load(lwp_t *l, bool used) vec_mark_used(l); } - /* - * Enable AltiVec temporarily (and disable interrupts). - */ - const register_t msr = mfmsr(); - mtmsr((msr & ~PSL_EE) | PSL_VEC); - __asm volatile ("isync"); - - /* - * Load the vector unit from vreg which is best done in - * assembly. - */ - vec_load_from_vreg(&pcb->pcb_vr); + if ((flags & PCU_REENABLE) == 0) { + /* + * Enable AltiVec temporarily (and disable interrupts). + */ + const register_t msr = mfmsr(); + mtmsr((msr & ~PSL_EE) | PSL_VEC); + __asm volatile ("isync"); + + /* + * Load the vector unit from vreg which is best done in + * assembly. + */ + vec_load_from_vreg(&pcb->pcb_vr); + + /* + * Restore MSR (turn off AltiVec) + */ + mtmsr(msr); + __asm volatile ("isync"); + } /* * VRSAVE will be restored when trap frame returns @@ -101,12 +109,6 @@ vec_state_load(lwp_t *l, bool used) l->l_md.md_utf->tf_vrsave = pcb->pcb_vr.vrsave; /* - * Restore MSR (turn off AltiVec) - */ - mtmsr(msr); - __asm volatile ("isync"); - - /* * Mark vector registers as modified. */ l->l_md.md_flags |= MDLWP_USEDVEC|PSL_VEC; Index: sr
CVS commit: [netbsd-6] src/lib/libm/src
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:40:30 UTC 2015 Modified Files: src/lib/libm/src [netbsd-6]: lrint.c lrintf.c Log Message: Pull up following revision(s) (requested by nat in ticket #1311): lib/libm/src/lrintf.c: revision 1.6 lib/libm/src/lrint.c: revision 1.5 Return x for >= DBL_FRACBITS in lrint.c. Return x for >= SNG_FRACBITS in lrintf.c Addresses PR lib/49690 This commit was approved by christos@ To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.22.1 src/lib/libm/src/lrint.c cvs rdiff -u -r1.5 -r1.5.22.1 src/lib/libm/src/lrintf.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/libm/src/lrint.c diff -u src/lib/libm/src/lrint.c:1.4 src/lib/libm/src/lrint.c:1.4.22.1 --- src/lib/libm/src/lrint.c:1.4 Sat Apr 26 23:49:50 2008 +++ src/lib/libm/src/lrint.c Sun Nov 15 16:40:30 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lrint.c,v 1.4 2008/04/26 23:49:50 christos Exp $ */ +/* $NetBSD: lrint.c,v 1.4.22.1 2015/11/15 16:40:30 bouyer Exp $ */ /*- * Copyright (c) 2004 @@ -70,7 +70,8 @@ LRINTNAME(double x) /* round, using current direction */ x += TWO52[s]; x -= TWO52[s]; - } + } else + return x; EXTRACT_WORDS(i0, i1, x); e = ((i0 >> 20) & 0x7ff) - DBL_EXP_BIAS; Index: src/lib/libm/src/lrintf.c diff -u src/lib/libm/src/lrintf.c:1.5 src/lib/libm/src/lrintf.c:1.5.22.1 --- src/lib/libm/src/lrintf.c:1.5 Sat Apr 26 23:49:50 2008 +++ src/lib/libm/src/lrintf.c Sun Nov 15 16:40:30 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lrintf.c,v 1.5 2008/04/26 23:49:50 christos Exp $ */ +/* $NetBSD: lrintf.c,v 1.5.22.1 2015/11/15 16:40:30 bouyer Exp $ */ /*- * Copyright (c) 2004 @@ -74,7 +74,8 @@ LRINTNAME(float x) /* round, using current direction */ w = TWO23[s] + x; x = w - TWO23[s]; - } + } else + return x; GET_FLOAT_WORD(i0, x); e = ((i0 >> SNG_FRACBITS) & 0xff) - SNG_EXP_BIAS;
CVS commit: [netbsd-6] src/usr.sbin/postinstall
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:43:54 UTC 2015 Modified Files: src/usr.sbin/postinstall [netbsd-6]: postinstall Log Message: Pull up following revision(s) (requested by dholland in ticket #1312): usr.sbin/postinstall/postinstall: revision 1.196 via patch PR install/50020: postinstall does not check for mandoc in /etc/man.conf. Add a check, but ask the user to fix manually (the file could have local modifications). To generate a diff of this commit: cvs rdiff -u -r1.129.2.11 -r1.129.2.12 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.129.2.11 src/usr.sbin/postinstall/postinstall:1.129.2.12 --- src/usr.sbin/postinstall/postinstall:1.129.2.11 Wed May 21 20:29:02 2014 +++ src/usr.sbin/postinstall/postinstall Sun Nov 15 16:43:54 2015 @@ -1,8 +1,8 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.129.2.11 2014/05/21 20:29:02 bouyer Exp $ +# $NetBSD: postinstall,v 1.129.2.12 2015/11/15 16:43:54 bouyer Exp $ # -# Copyright (c) 2002-2008 The NetBSD Foundation, Inc. +# Copyright (c) 2002-2015 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation @@ -1691,6 +1691,33 @@ do_catpages() } # +# man.conf +# +additem manconf "check for a mandoc usage in /etc/man.conf" +do_manconf() +{ + [ -n "$1" ] || err 3 "USAGE: do_manconf fix|check" + op="$1" + failed=0 + + [ -f "${DEST_DIR}/etc/man.conf" ] || return 0 + if ${GREP} -w "mandoc" "${DEST_DIR}/etc/man.conf" >/dev/null 2>&1; + then + failed=0; + else + failed=1 + notfixed="" + if [ "${op}" = "fix" ]; then + notfixed="${NOT_FIXED}" + fi + msg "The file /etc/man.conf has not been adapted to mandoc usage, you" + msg "probably want to copy a new version over. ${notfixed}" + fi + + return ${failed} +} + +# # obsolete # (this item is last to allow other items to move obsolete files) #
CVS commit: [netbsd-6] src/sys/dev/ic
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:47:26 UTC 2015 Modified Files: src/sys/dev/ic [netbsd-6]: mpt_netbsd.c Log Message: Pull up following revision(s) (requested by hannken in ticket #1316): sys/dev/ic/mpt_netbsd.c: revision 1.32 Adapter leaks requests when mpt_event_notify_reply() has to acknowledge an event leading to "adapter resource shortage" messages when the scsipi subsystem tries to use all adapt_openings. Change mpt_ctlop() to free the request on event MPI_FUNCTION_EVENT_ACK. Tested on a SunFire X4275 with Symbios Logic SAS1068E (1000:0058, rev. 4). To generate a diff of this commit: cvs rdiff -u -r1.17.2.2 -r1.17.2.3 src/sys/dev/ic/mpt_netbsd.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/mpt_netbsd.c diff -u src/sys/dev/ic/mpt_netbsd.c:1.17.2.2 src/sys/dev/ic/mpt_netbsd.c:1.17.2.3 --- src/sys/dev/ic/mpt_netbsd.c:1.17.2.2 Mon Nov 3 22:05:37 2014 +++ src/sys/dev/ic/mpt_netbsd.c Sun Nov 15 16:47:26 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mpt_netbsd.c,v 1.17.2.2 2014/11/03 22:05:37 msaitoh Exp $ */ +/* $NetBSD: mpt_netbsd.c,v 1.17.2.3 2015/11/15 16:47:26 bouyer Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.17.2.2 2014/11/03 22:05:37 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.17.2.3 2015/11/15 16:47:26 bouyer Exp $"); #include "bio.h" @@ -1117,8 +1117,16 @@ mpt_ctlop(mpt_softc_t *mpt, void *vmsg, break; case MPI_FUNCTION_EVENT_ACK: + { + MSG_EVENT_ACK_REPLY *msg = vmsg; + int index = le32toh(msg->MsgContext) & ~0x8000; mpt_free_reply(mpt, (reply << 1)); + if (index >= 0 && index < MPT_MAX_REQUESTS(mpt)) { + request_t *req = &mpt->request_pool[index]; + mpt_free_request(mpt, req); + } break; + } case MPI_FUNCTION_PORT_ENABLE: {
CVS commit: [netbsd-6] src/sys/ufs/lfs
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:49:37 UTC 2015 Modified Files: src/sys/ufs/lfs [netbsd-6]: lfs_segment.c Log Message: Pull up following revision(s) (requested by dholland in ticket #1319): sys/ufs/lfs/lfs_segment.c: revision 1.247 via patch Fix catastrophic bug in lfs_rewind() that changed segment numbers (lfs_curseg/lfs_nextseg in the superblock) using the wrong units. These fields are for whatever reason the start addresses of segments (measured in frags) rather than the segment numbers 0..n. This only apparently affects dumping from a mounted fs; however, it trashes the fs. I would really, really like to have a static analysis tool that can keep track of the units things are measured in, since fs code is full of conversion macros and the macros are named inscrutable things like "sntod" whose letters don't necessarily even correspond to the units they convert. It is surprising that more of these are not wrong. To generate a diff of this commit: cvs rdiff -u -r1.223.2.1 -r1.223.2.2 src/sys/ufs/lfs/lfs_segment.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/ufs/lfs/lfs_segment.c diff -u src/sys/ufs/lfs/lfs_segment.c:1.223.2.1 src/sys/ufs/lfs/lfs_segment.c:1.223.2.2 --- src/sys/ufs/lfs/lfs_segment.c:1.223.2.1 Sat Mar 17 17:40:06 2012 +++ src/sys/ufs/lfs/lfs_segment.c Sun Nov 15 16:49:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_segment.c,v 1.223.2.1 2012/03/17 17:40:06 bouyer Exp $ */ +/* $NetBSD: lfs_segment.c,v 1.223.2.2 2015/11/15 16:49:37 bouyer Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.223.2.1 2012/03/17 17:40:06 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.223.2.2 2015/11/15 16:49:37 bouyer Exp $"); #ifdef DEBUG # define vndebug(vp, str) do { \ @@ -1700,7 +1700,7 @@ lfs_updatemeta(struct segment *sp) } /* - * Move lfs_offset to a segment earlier than sn. + * Move lfs_offset to a segment earlier than newsn. */ int lfs_rewind(struct lfs *fs, int newsn) @@ -1731,7 +1731,7 @@ lfs_rewind(struct lfs *fs, int newsn) panic("lfs_rewind: no clean segments"); if (newsn >= 0 && sn >= newsn) return ENOENT; - fs->lfs_nextseg = sn; + fs->lfs_nextseg = sntod(fs, sn); lfs_newseg(fs); fs->lfs_offset = fs->lfs_curseg;
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:51:39 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Tickets 1304 1308 1310 1311 1312 1316 1319 To generate a diff of this commit: cvs rdiff -u -r1.1.2.227 -r1.1.2.228 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.227 src/doc/CHANGES-6.2:1.1.2.228 --- src/doc/CHANGES-6.2:1.1.2.227 Sun Nov 15 16:19:16 2015 +++ src/doc/CHANGES-6.2 Sun Nov 15 16:51:39 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.227 2015/11/15 16:19:16 bouyer Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.228 2015/11/15 16:51:39 bouyer Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -12549,3 +12549,49 @@ external/bsd/ntp/scripts/mkver 1.8 PR/50426: Dave Tyson: Fix ntp reported version. [christos, ticket #1346] +sbin/raidctl/raidctl.c1.58 + + Better sanity check numbers given to raidctl(8) + [manu, ticket #1304] + +usr.bin/tset/set.c1.18 + + Restore logic for setting the VERASE character. + - use terminfo _unless_ the terminal does overstrike. + - use terminfo data not only for an unset tty. + [mlelstv, ticket #1308] + +sys/arch/powerpc/include/psl.h 1.20 +sys/arch/powerpc/include/userret.h 1.29, 1.30 +sys/arch/powerpc/oea/altivec.c 1.30 +sys/arch/powerpc/oea/oea_machdep.c 1.72 +sys/arch/powerpc/powerpc/fpu.c 1.36 + + powerpc PCU fixes + [matt, ticket #1310] + +lib/libm/src/lrint.c1.5 +lib/libm/src/lrintf.c1.6 + + Return x for >= DBL_FRACBITS in lrint.c. + Return x for >= SNG_FRACBITS in lrintf.c + Addresses PR lib/49690 + [nat, ticket #1311] + +usr.sbin/postinstall/postinstall 1.196 via patch + + PR install/50020: postinstall does not check for mandoc in + /etc/man.conf. + [dholland, ticket #1312] + +sys/ufs/lfs/lfs_segment.c 1.247 via patch + + Fix catastrophic bug in lfs_rewind() that changed segment numbers + (lfs_curseg/lfs_nextseg in the superblock) using the wrong units. + These fields are for whatever reason the start addresses of segments + (measured in frags) rather than the segment numbers 0..n. + + This only apparently affects dumping from a mounted fs; however, it + trashes the fs. + [dholland, ticket #1319] +
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Sun Nov 15 16:54:16 UTC 2015 Modified Files: src/sys/rump/dev: Makefile.rumpdevcomp src/sys/rump/fs: Makefile.rumpfscomp src/sys/rump/kern: Makefile.rumpkerncomp src/sys/rump/net: Makefile.rumpnetcomp Log Message: Always descend into component directories for rumpdescribe. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/rump/dev/Makefile.rumpdevcomp cvs rdiff -u -r1.5 -r1.6 src/sys/rump/fs/Makefile.rumpfscomp cvs rdiff -u -r1.11 -r1.12 src/sys/rump/kern/Makefile.rumpkerncomp cvs rdiff -u -r1.12 -r1.13 src/sys/rump/net/Makefile.rumpnetcomp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/dev/Makefile.rumpdevcomp diff -u src/sys/rump/dev/Makefile.rumpdevcomp:1.22 src/sys/rump/dev/Makefile.rumpdevcomp:1.23 --- src/sys/rump/dev/Makefile.rumpdevcomp:1.22 Sun Nov 1 09:03:28 2015 +++ src/sys/rump/dev/Makefile.rumpdevcomp Sun Nov 15 16:54:16 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpdevcomp,v 1.22 2015/11/01 09:03:28 pooka Exp $ +# $NetBSD: Makefile.rumpdevcomp,v 1.23 2015/11/15 16:54:16 pooka Exp $ # RUMPDEVCOMP= audio bpf cgd disk dm drvctl fss md netsmb \ @@ -24,7 +24,8 @@ RUMPDEVLDADD+=-lrumpdev_${var} RUMPDEVLIBS+=lib${var} .endfor -# Currently no NetBSD host support. -#.for var in ${RUMPPCIDEVS} -#RUMPDEVLIBS+=lib${var} -#.endfor +.if make(rumpdescribe) +.for var in ${RUMPPCIDEVS} +RUMPDEVLIBS+=lib${var} +.endfor +.endif Index: src/sys/rump/fs/Makefile.rumpfscomp diff -u src/sys/rump/fs/Makefile.rumpfscomp:1.5 src/sys/rump/fs/Makefile.rumpfscomp:1.6 --- src/sys/rump/fs/Makefile.rumpfscomp:1.5 Thu Apr 10 00:09:09 2014 +++ src/sys/rump/fs/Makefile.rumpfscomp Sun Nov 15 16:54:16 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpfscomp,v 1.5 2014/04/10 00:09:09 pooka Exp $ +# $NetBSD: Makefile.rumpfscomp,v 1.6 2015/11/15 16:54:16 pooka Exp $ # .include @@ -7,7 +7,7 @@ RUMPFSCOMP= cd9660 efs ext2fs fdesc ffs nfs nilfs ntfs null ptyfs smbfs syspuffs sysvbfs \ tmpfs udf umap union v7fs -.if ${MKZFS} != "no" +.if ${MKZFS} != "no" || make(rumpdescribe) RUMPFSCOMP+= zfs .endif Index: src/sys/rump/kern/Makefile.rumpkerncomp diff -u src/sys/rump/kern/Makefile.rumpkerncomp:1.11 src/sys/rump/kern/Makefile.rumpkerncomp:1.12 --- src/sys/rump/kern/Makefile.rumpkerncomp:1.11 Wed Jan 7 22:24:03 2015 +++ src/sys/rump/kern/Makefile.rumpkerncomp Sun Nov 15 16:54:16 2015 @@ -1,15 +1,20 @@ -# $NetBSD: Makefile.rumpkerncomp,v 1.11 2015/01/07 22:24:03 pooka Exp $ +# $NetBSD: Makefile.rumpkerncomp,v 1.12 2015/11/15 16:54:16 pooka Exp $ # .include RUMPKERNCOMPS= crypto sysproxy tty z +RUMPSYSEMUS= sys_cygwin sys_linux sys_sunos -.if ${MKSLJIT} != "no" +.if make(rumpdescribe) +RUMPKERNCOMPS+= ${RUMPSYSEMUS} +.endif + +.if ${MKSLJIT} != "no" || make(rumpdescribe) RUMPKERNCOMPS+= sljit .endif -.if ${MKZFS} != "no" +.if ${MKZFS} != "no" || make(rumpdescribe) RUMPKERNCOMPS+=solaris .endif Index: src/sys/rump/net/Makefile.rumpnetcomp diff -u src/sys/rump/net/Makefile.rumpnetcomp:1.12 src/sys/rump/net/Makefile.rumpnetcomp:1.13 --- src/sys/rump/net/Makefile.rumpnetcomp:1.12 Wed Nov 4 23:57:06 2015 +++ src/sys/rump/net/Makefile.rumpnetcomp Sun Nov 15 16:54:16 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpnetcomp,v 1.12 2015/11/04 23:57:06 knakahara Exp $ +# $NetBSD: Makefile.rumpnetcomp,v 1.13 2015/11/15 16:54:16 pooka Exp $ # .include @@ -6,11 +6,11 @@ RUMPNETCOMP= agr bridge net net80211 netbt netinet netinet6 RUMPNETCOMP+= gif netmpls npf local shmif tap -.if ${MKSLJIT} != "no" +.if ${MKSLJIT} != "no" || make(rumpdescribe) RUMPNETCOMP+= bpfjit .endif -.if ${RUMP_VIRTIF:Uyes} == "yes" +.if ${RUMP_VIRTIF:Uyes} == "yes" || make(rumpdescribe) RUMPNETCOMP+= virtif .endif
CVS commit: [netbsd-6] src
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:58:20 UTC 2015 Modified Files: src/lib/libutil [netbsd-6]: login_cap.c src/share/man/man5 [netbsd-6]: login.conf.5 Log Message: Pull up following revision(s) (requested by kamil in ticket #1317): share/man/man5/login.conf.5: revisions 1.29, 1.30, 1.31 lib/libutil/login_cap.c: revision 1.32 Clean-up resources (sys/sys/resource.h) usage Add vmemoryuse to login_cap(3) Document vmemoryuse in login.conf(5) Document proc.pid.rlimit.vmemoryuse and proc.pid.rlimit.maxlwp in sysctl(7) Document SBSIZE, AS, VMEM and NTHR in share/doc/psd/05.sysman/1.6.t Reviewed by Approved by Tested by Dominik Bialy Closes PR xsrc/49912 Bump date for previous. Clean-up documentation of login.conf(5) Remove redundant word "limit" from sentences "Maximum ...". Note that vmemoryuse might specify both maximum and current limits. Remove redundant 'in bytes' from the description of vmemoryuse, it's not ed in the next section describing the argument type 'size'. Changes inspired by in PR xsrc/49912 To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.29.32.1 src/lib/libutil/login_cap.c cvs rdiff -u -r1.25 -r1.25.4.1 src/share/man/man5/login.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libutil/login_cap.c diff -u src/lib/libutil/login_cap.c:1.29 src/lib/libutil/login_cap.c:1.29.32.1 --- src/lib/libutil/login_cap.c:1.29 Tue Dec 4 22:09:02 2007 +++ src/lib/libutil/login_cap.c Sun Nov 15 16:58:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: login_cap.c,v 1.29 2007/12/04 22:09:02 mjf Exp $ */ +/* $NetBSD: login_cap.c,v 1.29.32.1 2015/11/15 16:58:20 bouyer Exp $ */ /*- * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved. @@ -36,7 +36,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: login_cap.c,v 1.29 2007/12/04 22:09:02 mjf Exp $"); +__RCSID("$NetBSD: login_cap.c,v 1.29.32.1 2015/11/15 16:58:20 bouyer Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -423,6 +423,7 @@ static struct { { RLIMIT_NOFILE, R_CNUMB, "openfiles", }, { RLIMIT_CORE, R_CSIZE, "coredumpsize", }, { RLIMIT_SBSIZE, R_CSIZE, "sbsize", }, + { RLIMIT_AS, R_CSIZE, "vmemoryuse", }, { -1, 0, 0 } }; Index: src/share/man/man5/login.conf.5 diff -u src/share/man/man5/login.conf.5:1.25 src/share/man/man5/login.conf.5:1.25.4.1 --- src/share/man/man5/login.conf.5:1.25 Sat Jun 4 05:30:45 2011 +++ src/share/man/man5/login.conf.5 Sun Nov 15 16:58:20 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: login.conf.5,v 1.25 2011/06/04 05:30:45 dholland Exp $ +.\" $NetBSD: login.conf.5,v 1.25.4.1 2015/11/15 16:58:20 bouyer Exp $ .\" .\" Copyright (c) 1995,1996,1997 Berkeley Software Design, Inc. .\" All rights reserved. @@ -33,7 +33,7 @@ .\" .\" BSDI login.conf.5,v 2.19 1998/02/19 23:39:39 prb Exp .\" -.Dd November 18, 2008 +.Dd July 11, 2015 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -94,7 +94,7 @@ displays it before the welcome message.) .\" .sp .It Sy coredumpsize Ta size Ta "" Ta -Maximum coredump size limit. +Maximum coredump size. .\" .sp .It Sy cputime Ta time Ta "" Ta @@ -102,11 +102,11 @@ CPU usage limit. .\" .sp .It Sy datasize Ta size Ta "" Ta -Maximum data size limit. +Maximum data size. .\" .sp .It Sy filesize Ta size Ta "" Ta -Maximum file size limit. +Maximum file size. .\" .sp .It Sy host.allow Ta string Ta "" Ta @@ -168,11 +168,11 @@ Maximum number of processes. .\" .sp .It Sy memorylocked Ta size Ta "" Ta -Maximum locked in core memory size limit. +Maximum locked in core memory size. .\" .sp .It Sy memoryuse Ta size Ta "" Ta -Maximum in core memoryuse size limit. +Maximum in core memoryuse size. .\" .sp .It Sy minpasswordlen Ta number Ta "" Ta @@ -224,7 +224,7 @@ Require home directory to login. .\" .sp .It Sy sbsize Ta size Ta "" Ta -Maximum socket buffer size limit. +Maximum socket buffer size. .\" .sp .It Sy setenv Ta list Ta "" Ta @@ -241,7 +241,7 @@ environment variable will contain the sh .\" .sp .It Sy stacksize Ta size Ta "" Ta -Maximum stack size limit. +Maximum stack size. .\" .sp .It Sy tc Ta string Ta "" Ta @@ -266,6 +266,10 @@ See .Xr umask 2 . .\" .sp +.It Sy vmemoryuse Ta size Ta "" Ta +Maximum virtual address space size. +.\" +.sp .It Sy welcome Ta file Ta Li /etc/motd Ta File containing welcome message. .Xr login 1 @@ -284,8 +288,9 @@ The resource limit entries .Sy memoryuse , .Sy openfiles , .Sy sbsize , +.Sy stacksize and -.Sy stacksize ) +.Sy vmemoryuse ) actually specify both the maximum and current limits (see .Xr getrlimit 2 ) . The current limit is the one normally used,
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 16:59:29 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: ticket 1317 To generate a diff of this commit: cvs rdiff -u -r1.1.2.228 -r1.1.2.229 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.228 src/doc/CHANGES-6.2:1.1.2.229 --- src/doc/CHANGES-6.2:1.1.2.228 Sun Nov 15 16:51:39 2015 +++ src/doc/CHANGES-6.2 Sun Nov 15 16:59:29 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.228 2015/11/15 16:51:39 bouyer Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.229 2015/11/15 16:59:29 bouyer Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -12595,3 +12595,11 @@ sys/ufs/lfs/lfs_segment.c 1.247 via pa trashes the fs. [dholland, ticket #1319] +lib/libutil/login_cap.c1.32 +share/man/man5/login.conf.5 1.29 - 1.31 + + Add vmemoryuse to login_cap(3) + Document vmemoryuse in login.conf(5) + Closes PR xsrc/49912 + [kamil, ticket #1317] +
CVS commit: [netbsd-6] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:36:32 UTC 2015 Modified Files: src/sys/kern [netbsd-6]: sys_pset.c Log Message: Pull up following revision(s) (requested by oster in ticket #1320): sys/kern/sys_pset.c: revision 1.19 Don't forget to unlock the LWP. ok rmind@ To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.8.1 src/sys/kern/sys_pset.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_pset.c diff -u src/sys/kern/sys_pset.c:1.17 src/sys/kern/sys_pset.c:1.17.8.1 --- src/sys/kern/sys_pset.c:1.17 Sun Aug 7 21:13:05 2011 +++ src/sys/kern/sys_pset.c Sun Nov 15 17:36:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_pset.c,v 1.17 2011/08/07 21:13:05 rmind Exp $ */ +/* $NetBSD: sys_pset.c,v 1.17.8.1 2015/11/15 17:36:32 bouyer Exp $ */ /* * Copyright (c) 2008, Mindaugas Rasiukevicius @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_pset.c,v 1.17 2011/08/07 21:13:05 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_pset.c,v 1.17.8.1 2015/11/15 17:36:32 bouyer Exp $"); #include @@ -380,6 +380,7 @@ sys_pset_assign(struct lwp *l, const str mutex_exit(&cpu_lock); return EPERM; } + lwp_unlock(t); } /* * Set the processor-set ID.
CVS commit: [netbsd-6] src/libexec/ftpd
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:39:10 UTC 2015 Modified Files: src/libexec/ftpd [netbsd-6]: logwtmp.c Log Message: Pull up following revision(s) (requested by shm in ticket #1321): libexec/ftpd/logwtmp.c: revision 1.26 libexec/ftpd/logwtmp.c: revision 1.27 Removed unnecessary memset(3) call Clear utmpx struct before writing it to wtmpx files To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.25.42.1 src/libexec/ftpd/logwtmp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ftpd/logwtmp.c diff -u src/libexec/ftpd/logwtmp.c:1.25 src/libexec/ftpd/logwtmp.c:1.25.42.1 --- src/libexec/ftpd/logwtmp.c:1.25 Sat Sep 23 16:03:50 2006 +++ src/libexec/ftpd/logwtmp.c Sun Nov 15 17:39:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: logwtmp.c,v 1.25 2006/09/23 16:03:50 xtraeme Exp $ */ +/* $NetBSD: logwtmp.c,v 1.25.42.1 2015/11/15 17:39:10 bouyer Exp $ */ /* * Copyright (c) 1988, 1993 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)logwtmp.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: logwtmp.c,v 1.25 2006/09/23 16:03:50 xtraeme Exp $"); +__RCSID("$NetBSD: logwtmp.c,v 1.25.42.1 2015/11/15 17:39:10 bouyer Exp $"); #endif #endif /* not lint */ @@ -124,13 +124,12 @@ ftpd_logwtmpx(const char *line, const ch if (fdx < 0) return; if (fstat(fdx, &buf) == 0) { + (void)memset(&ut, 0, sizeof(ut)); (void)strncpy(ut.ut_line, line, sizeof(ut.ut_line)); (void)strncpy(ut.ut_name, name, sizeof(ut.ut_name)); (void)strncpy(ut.ut_host, host, sizeof(ut.ut_host)); if (haddr) (void)memcpy(&ut.ut_ss, &haddr->si_su, haddr->su_len); - else - (void)memset(&ut.ut_ss, 0, sizeof(ut.ut_ss)); ut.ut_type = utx_type; if (WIFEXITED(status)) ut.ut_exit.e_exit = (uint16_t)WEXITSTATUS(status);
CVS commit: [netbsd-6] src/bin/sh
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:41:26 UTC 2015 Modified Files: src/bin/sh [netbsd-6]: jobs.c trap.c trap.h Log Message: Pull up following revision(s) (requested by christos in ticket #1323): bin/sh/jobs.c: revision 1.74 bin/sh/jobs.c: revision 1.75 bin/sh/trap.c: revision 1.36 bin/sh/trap.c: revision 1.37 bin/sh/trap.h: revision 1.21 bin/sh/trap.h: revision 1.22 Process pending signals while waiting for a job: $ cat << EOF > hup.sh #!/bin/sh trap 'echo SIGHUP; exit 1' 1 sleep 1 & wait EOF $ chmod +x ./hup.sh $ ./hup.sh & $ kill -HUP %1 report the signal that wait was interrupted by, which is not always SIGINT anymore. To generate a diff of this commit: cvs rdiff -u -r1.69.4.1 -r1.69.4.2 src/bin/sh/jobs.c cvs rdiff -u -r1.35 -r1.35.4.1 src/bin/sh/trap.c cvs rdiff -u -r1.19 -r1.19.4.1 src/bin/sh/trap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/jobs.c diff -u src/bin/sh/jobs.c:1.69.4.1 src/bin/sh/jobs.c:1.69.4.2 --- src/bin/sh/jobs.c:1.69.4.1 Sun Dec 7 15:58:27 2014 +++ src/bin/sh/jobs.c Sun Nov 15 17:41:26 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: jobs.c,v 1.69.4.1 2014/12/07 15:58:27 martin Exp $ */ +/* $NetBSD: jobs.c,v 1.69.4.2 2015/11/15 17:41:26 bouyer Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: jobs.c,v 1.69.4.1 2014/12/07 15:58:27 martin Exp $"); +__RCSID("$NetBSD: jobs.c,v 1.69.4.2 2015/11/15 17:41:26 bouyer Exp $"); #endif #endif /* not lint */ @@ -619,7 +619,7 @@ waitcmd(int argc, char **argv) continue; } if (dowait(WBLOCK, NULL) == -1) - return 128 + SIGINT; + return 128 + lastsig(); jp = jobtab; } } @@ -634,7 +634,7 @@ waitcmd(int argc, char **argv) /* loop until process terminated or stopped */ while (job->state == JOBRUNNING) { if (dowait(WBLOCK|WNOFREE, job) == -1) - return 128 + SIGINT; + return 128 + lastsig(); } status = job->ps[job->nprocs ? job->nprocs - 1 : 0].status; if (WIFEXITED(status)) @@ -1042,13 +1042,12 @@ dowait(int flags, struct job *job) struct job *thisjob; int done; int stopped; - extern volatile char gotsig[]; TRACE(("dowait(%x) called\n", flags)); do { pid = waitproc(flags & WBLOCK, job, &status); TRACE(("wait returns pid %d, status %d\n", pid, status)); - } while (pid == -1 && errno == EINTR && gotsig[SIGINT - 1] == 0); + } while (pid == -1 && errno == EINTR && pendingsigs == 0); if (pid <= 0) return pid; INTOFF; Index: src/bin/sh/trap.c diff -u src/bin/sh/trap.c:1.35 src/bin/sh/trap.c:1.35.4.1 --- src/bin/sh/trap.c:1.35 Sat Jun 18 21:18:46 2011 +++ src/bin/sh/trap.c Sun Nov 15 17:41:26 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.35 2011/06/18 21:18:46 christos Exp $ */ +/* $NetBSD: trap.c,v 1.35.4.1 2015/11/15 17:41:26 bouyer Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)trap.c 8.5 (Berkeley) 6/5/95"; #else -__RCSID("$NetBSD: trap.c,v 1.35 2011/06/18 21:18:46 christos Exp $"); +__RCSID("$NetBSD: trap.c,v 1.35.4.1 2015/11/15 17:41:26 bouyer Exp $"); #endif #endif /* not lint */ @@ -77,8 +77,8 @@ __RCSID("$NetBSD: trap.c,v 1.35 2011/06/ char *trap[NSIG+1]; /* trap handler commands */ MKINIT char sigmode[NSIG]; /* current value of signal */ -volatile char gotsig[NSIG]; /* indicates specified signal received */ -int pendingsigs; /* indicates some signal received */ +static volatile char gotsig[NSIG];/* indicates specified signal received */ +volatile int pendingsigs; /* indicates some signal received */ static int getsigaction(int, sig_t *); @@ -421,7 +421,16 @@ done: pendingsigs = 0; } +int +lastsig(void) +{ + int i; + for (i = NSIG; i > 0; i--) + if (gotsig[i - 1]) + return i; + return SIGINT; /* XXX */ +} /* * Controls whether the shell is interactive or not. Index: src/bin/sh/trap.h diff -u src/bin/sh/trap.h:1.19 src/bin/sh/trap.h:1.19.4.1 --- src/bin/sh/trap.h:1.19 Sat Jun 18 21:18:46 2011 +++ src/bin/sh/trap.h Sun Nov 15 17:41:26 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.h,v 1.19 2011/06/18 21:18:46 christos Exp $ */ +/* $NetBSD: trap.h,v 1.19.4.1 2015/11/15 17:41:26 bouyer Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -34,7 +34,7 @@ * @(#)trap.h 8.3 (Berkeley) 6/5/95 */ -extern int pendingsigs; +extern volatile int pendingsigs; void clear_traps(int); sig_t setsignal(int, int); @@ -43,3 +43,4 @@ void onsig(int); void dotrap(void); void setinteractive(int); void exitshell(int) __attribute__((__noreturn__)); +int lastsig(void);
CVS commit: [netbsd-6] xsrc/xfree/xc/programs/xdm
Module Name:xsrc Committed By: bouyer Date: Sun Nov 15 17:44:01 UTC 2015 Modified Files: xsrc/xfree/xc/programs/xdm [netbsd-6]: access.c Log Message: Pull up following revision(s) (requested by dholland in ticket #1324): xsrc/xfree/xc/programs/xdm/access.c: revision 1.2 Don't crash if the local hostname doesn't resolve. PR 26998 To generate a diff of this commit: cvs rdiff -u -r1.1.1.8 -r1.1.1.8.14.1 xsrc/xfree/xc/programs/xdm/access.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/xdm/access.c diff -u xsrc/xfree/xc/programs/xdm/access.c:1.1.1.8 xsrc/xfree/xc/programs/xdm/access.c:1.1.1.8.14.1 --- xsrc/xfree/xc/programs/xdm/access.c:1.1.1.8 Fri Mar 18 13:09:17 2005 +++ xsrc/xfree/xc/programs/xdm/access.c Sun Nov 15 17:44:01 2015 @@ -138,8 +138,16 @@ getLocalAddress (void) struct hostent *hostent; hostent = gethostbyname (localHostname()); - XdmcpAllocARRAY8 (&localAddress, hostent->h_length); - memmove( localAddress.data, hostent->h_addr, hostent->h_length); + if (hostent) { + XdmcpAllocARRAY8 (&localAddress, hostent->h_length); + memmove( localAddress.data, hostent->h_addr, hostent->h_length); + } else { + XdmcpAllocARRAY8 (&localAddress, 4); + localAddress.data[0] = 127; + localAddress.data[1] = 0; + localAddress.data[2] = 0; + localAddress.data[3] = 1; + } #endif }
CVS commit: [netbsd-6-0] src/sys/dev/mii
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:45:50 UTC 2015 Modified Files: src/sys/dev/mii [netbsd-6-0]: atphy.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1325): sys/dev/mii/atphy.c: revision 1.17 Fix incorrect argument of mii_anar(). Fixes PR#50206. XXX pullup -[567] To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.12.1 src/sys/dev/mii/atphy.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/mii/atphy.c diff -u src/sys/dev/mii/atphy.c:1.11 src/sys/dev/mii/atphy.c:1.11.12.1 --- src/sys/dev/mii/atphy.c:1.11 Sun Oct 2 21:42:19 2011 +++ src/sys/dev/mii/atphy.c Sun Nov 15 17:45:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: atphy.c,v 1.11 2011/10/02 21:42:19 jmcneill Exp $ */ +/* $NetBSD: atphy.c,v 1.11.12.1 2015/11/15 17:45:50 bouyer Exp $ */ /* $OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $ */ /*- @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.11 2011/10/02 21:42:19 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.11.12.1 2015/11/15 17:45:50 bouyer Exp $"); #include #include @@ -226,7 +226,7 @@ atphy_service(struct mii_softc *sc, stru return EINVAL; } - anar = mii_anar(ife->ifm_media); + anar = mii_anar(IFM_SUBTYPE(ife->ifm_media)); if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { bmcr |= BMCR_FDX; /* Enable pause. */
CVS commit: [netbsd-6] src/sys/dev/mii
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:45:44 UTC 2015 Modified Files: src/sys/dev/mii [netbsd-6]: atphy.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1325): sys/dev/mii/atphy.c: revision 1.17 Fix incorrect argument of mii_anar(). Fixes PR#50206. XXX pullup -[567] To generate a diff of this commit: cvs rdiff -u -r1.11.8.2 -r1.11.8.3 src/sys/dev/mii/atphy.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/mii/atphy.c diff -u src/sys/dev/mii/atphy.c:1.11.8.2 src/sys/dev/mii/atphy.c:1.11.8.3 --- src/sys/dev/mii/atphy.c:1.11.8.2 Wed Feb 4 11:35:04 2015 +++ src/sys/dev/mii/atphy.c Sun Nov 15 17:45:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: atphy.c,v 1.11.8.2 2015/02/04 11:35:04 martin Exp $ */ +/* $NetBSD: atphy.c,v 1.11.8.3 2015/11/15 17:45:44 bouyer Exp $ */ /* $OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $ */ /*- @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.11.8.2 2015/02/04 11:35:04 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.11.8.3 2015/11/15 17:45:44 bouyer Exp $"); #include #include @@ -226,7 +226,7 @@ atphy_service(struct mii_softc *sc, stru return EINVAL; } - anar = mii_anar(ife->ifm_media); + anar = mii_anar(IFM_SUBTYPE(ife->ifm_media)); if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { bmcr |= BMCR_FDX; /* Enable pause. */
CVS commit: [netbsd-6-1] src/sys/dev/mii
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:45:59 UTC 2015 Modified Files: src/sys/dev/mii [netbsd-6-1]: atphy.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1325): sys/dev/mii/atphy.c: revision 1.17 Fix incorrect argument of mii_anar(). Fixes PR#50206. XXX pullup -[567] To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.14.1 src/sys/dev/mii/atphy.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/mii/atphy.c diff -u src/sys/dev/mii/atphy.c:1.11 src/sys/dev/mii/atphy.c:1.11.14.1 --- src/sys/dev/mii/atphy.c:1.11 Sun Oct 2 21:42:19 2011 +++ src/sys/dev/mii/atphy.c Sun Nov 15 17:45:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: atphy.c,v 1.11 2011/10/02 21:42:19 jmcneill Exp $ */ +/* $NetBSD: atphy.c,v 1.11.14.1 2015/11/15 17:45:59 bouyer Exp $ */ /* $OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $ */ /*- @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.11 2011/10/02 21:42:19 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.11.14.1 2015/11/15 17:45:59 bouyer Exp $"); #include #include @@ -226,7 +226,7 @@ atphy_service(struct mii_softc *sc, stru return EINVAL; } - anar = mii_anar(ife->ifm_media); + anar = mii_anar(IFM_SUBTYPE(ife->ifm_media)); if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { bmcr |= BMCR_FDX; /* Enable pause. */
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:46:41 UTC 2015 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: ticket 1325 To generate a diff of this commit: cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.49 src/doc/CHANGES-6.0.7:1.1.2.50 --- src/doc/CHANGES-6.0.7:1.1.2.49 Sun Nov 15 16:19:20 2015 +++ src/doc/CHANGES-6.0.7 Sun Nov 15 17:46:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.49 2015/11/15 16:19:20 bouyer Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.50 2015/11/15 17:46:41 bouyer Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -7015,3 +7015,8 @@ external/bsd/ntp/scripts/mkver 1.8 PR/50426: Dave Tyson: Fix ntp reported version. [christos, ticket #1346] +sys/dev/mii/atphy.c1.17 + + Fix incorrect argument of mii_anar(). Fixes PR#50206. + [msaitoh, ticket #1325] +
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:46:34 UTC 2015 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: ticket 1325 To generate a diff of this commit: cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.48 src/doc/CHANGES-6.1.6:1.1.2.49 --- src/doc/CHANGES-6.1.6:1.1.2.48 Sun Nov 15 16:19:38 2015 +++ src/doc/CHANGES-6.1.6 Sun Nov 15 17:46:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.48 2015/11/15 16:19:38 bouyer Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.49 2015/11/15 17:46:34 bouyer Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -6736,3 +6736,8 @@ external/bsd/ntp/scripts/mkver 1.8 PR/50426: Dave Tyson: Fix ntp reported version. [christos, ticket #1346] +sys/dev/mii/atphy.c1.17 + + Fix incorrect argument of mii_anar(). Fixes PR#50206. + [msaitoh, ticket #1325] +
CVS commit: [netbsd-6] src/sys/netinet6
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:49:31 UTC 2015 Modified Files: src/sys/netinet6 [netbsd-6]: icmp6.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1327): sys/netinet6/icmp6.c: revision 1.177 Update icmp6_redirect_timeout_q when changing net.inet6.icmp6.redirtimeout We have to update icmp6_redirect_timeout_q as well as icmp6_redirtimeout when changing net.inet6.icmp6.redirtimeout via sysctl. The updating logic is copied from sysctl_net_inet_icmp_redirtimeout. This change is from s-yamaguchi@IIJ (with KNF by ozaki-r) and fixes PR kern/50240. To generate a diff of this commit: cvs rdiff -u -r1.159.2.1 -r1.159.2.2 src/sys/netinet6/icmp6.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/icmp6.c diff -u src/sys/netinet6/icmp6.c:1.159.2.1 src/sys/netinet6/icmp6.c:1.159.2.2 --- src/sys/netinet6/icmp6.c:1.159.2.1 Mon Jul 8 07:40:07 2013 +++ src/sys/netinet6/icmp6.c Sun Nov 15 17:49:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.c,v 1.159.2.1 2013/07/08 07:40:07 jdc Exp $ */ +/* $NetBSD: icmp6.c,v 1.159.2.2 2015/11/15 17:49:31 bouyer Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.159.2.1 2013/07/08 07:40:07 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.159.2.2 2015/11/15 17:49:31 bouyer Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -2761,6 +2761,38 @@ sysctl_net_inet6_icmp6_stats(SYSCTLFN_AR return (NETSTAT_SYSCTL(icmp6stat_percpu, ICMP6_NSTATS)); } +static int +sysctl_net_inet6_icmp6_redirtimeout(SYSCTLFN_ARGS) +{ + int error, tmp; + struct sysctlnode node; + + node = *rnode; + node.sysctl_data = &tmp; + tmp = icmp6_redirtimeout; + error = sysctl_lookup(SYSCTLFN_CALL(&node)); + if (error || newp == NULL) + return error; + if (tmp < 0) + return EINVAL; + icmp6_redirtimeout = tmp; + + if (icmp6_redirect_timeout_q != NULL) { + if (icmp6_redirtimeout == 0) { + rt_timer_queue_destroy(icmp6_redirect_timeout_q, + true); + } else { + rt_timer_queue_change(icmp6_redirect_timeout_q, + icmp6_redirtimeout); + } + } else if (icmp6_redirtimeout > 0) { + icmp6_redirect_timeout_q = + rt_timer_queue_create(icmp6_redirtimeout); + } + + return 0; +} + static void sysctl_net_inet6_icmp6_setup(struct sysctllog **clog) { @@ -2801,7 +2833,8 @@ sysctl_net_inet6_icmp6_setup(struct sysc CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, "redirtimeout", SYSCTL_DESCR("Redirect generated route lifetime"), - NULL, 0, &icmp6_redirtimeout, 0, + sysctl_net_inet6_icmp6_redirtimeout, 0, + &icmp6_redirtimeout, 0, CTL_NET, PF_INET6, IPPROTO_ICMPV6, ICMPV6CTL_REDIRTIMEOUT, CTL_EOL); #if 0 /* obsoleted */
CVS commit: [netbsd-6] src/sys/netinet
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:51:52 UTC 2015 Modified Files: src/sys/netinet [netbsd-6]: if_arp.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1328): sys/netinet/if_arp.c: revision 1.160 Add sysctl to selectively log arp packets from unknown network. (Adrien URBAN). To generate a diff of this commit: cvs rdiff -u -r1.154.2.1 -r1.154.2.2 src/sys/netinet/if_arp.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.154.2.1 src/sys/netinet/if_arp.c:1.154.2.2 --- src/sys/netinet/if_arp.c:1.154.2.1 Tue Jun 3 15:34:00 2014 +++ src/sys/netinet/if_arp.c Sun Nov 15 17:51:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.154.2.1 2014/06/03 15:34:00 msaitoh Exp $ */ +/* $NetBSD: if_arp.c,v 1.154.2.2 2015/11/15 17:51:52 bouyer Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.154.2.1 2014/06/03 15:34:00 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.154.2.2 2015/11/15 17:51:52 bouyer Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -194,6 +194,7 @@ static int arp_drainwanted; static int log_movements = 1; static int log_permanent_modify = 1; static int log_wrong_iface = 1; +static int log_unknown_network = 1; /* * this should be elsewhere. @@ -1306,17 +1307,20 @@ arplookup1(struct mbuf *m, const struct return (struct llinfo_arp *)rt->rt_llinfo; if (create) { - if (rt->rt_flags & RTF_GATEWAY) - why = "host is not on local network"; - else if ((rt->rt_flags & RTF_LLINFO) == 0) { + if (rt->rt_flags & RTF_GATEWAY) { + if (log_unknown_network) +why = "host is not on local network"; + } else if ((rt->rt_flags & RTF_LLINFO) == 0) { ARP_STATINC(ARP_STAT_ALLOCFAIL); why = "could not allocate llinfo"; } else why = "gateway route is not ours"; - log(LOG_DEBUG, "arplookup: unable to enter address" - " for %s@%s on %s (%s)\n", - in_fmtaddr(*addr), lla_snprintf(ar_sha(ah), ah->ar_hln), - (ifp) ? ifp->if_xname : "null", why); + if (why) { + log(LOG_DEBUG, "arplookup: unable to enter address" + " for %s@%s on %s (%s)\n", in_fmtaddr(*addr), + lla_snprintf(ar_sha(ah), ah->ar_hln), + (ifp) ? ifp->if_xname : "null", why); + } if (rt->rt_refcnt <= 0 && (rt->rt_flags & RTF_CLONED) != 0) { rtrequest(RTM_DELETE, rt_getkey(rt), rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL); @@ -1708,6 +1712,13 @@ sysctl_net_inet_arp_setup(struct sysctll " interface"), NULL, 0, &log_wrong_iface, 0, CTL_NET,PF_INET, node->sysctl_num, CTL_CREATE, CTL_EOL); + + sysctl_createv(clog, 0, NULL, NULL, + CTLFLAG_PERMANENT|CTLFLAG_READWRITE, + CTLTYPE_INT, "log_unknown_network", + SYSCTL_DESCR("log ARP packets from non-local network"), + NULL, 0, &log_unknown_network, 0, + CTL_NET,PF_INET, node->sysctl_num, CTL_CREATE, CTL_EOL); } #endif /* INET */
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 17:52:49 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Tickets 1320 1321 1323 1324 1325 1327 1328 To generate a diff of this commit: cvs rdiff -u -r1.1.2.229 -r1.1.2.230 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.229 src/doc/CHANGES-6.2:1.1.2.230 --- src/doc/CHANGES-6.2:1.1.2.229 Sun Nov 15 16:59:29 2015 +++ src/doc/CHANGES-6.2 Sun Nov 15 17:52:49 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.229 2015/11/15 16:59:29 bouyer Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.230 2015/11/15 17:52:49 bouyer Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -12603,3 +12603,43 @@ share/man/man5/login.conf.5 1.29 - 1.3 Closes PR xsrc/49912 [kamil, ticket #1317] +sys/kern/sys_pset.c1.19 + + Don't forget to unlock the LWP. + [oster, ticket #1320] + +libexec/ftpd/logwtmp.c1.26, 1.27 + + Clear utmpx struct before writing it to wtmpx files + [shm, ticket #1321] + +bin/sh/jobs.c 1.74, 1.75 +bin/sh/trap.c 1.36, 1.37 +bin/sh/trap.h 1.21, 1.22 + + Process pending signals while waiting for a job, and report the + signal that wait was interrupted by, which is not always SIGINT + anymore. + [christos, ticket #1323] + +xsrc/xfree/xc/programs/xdm/access.c 1.2 + + Don't crash if the local hostname doesn't resolve. PR 26998 + [dholland, ticket #1324] + +sys/dev/mii/atphy.c1.17 + + Fix incorrect argument of mii_anar(). Fixes PR#50206. + [msaitoh, ticket #1325] + +sys/netinet6/icmp6.c1.177 + + Update icmp6_redirect_timeout_q when changing + net.inet6.icmp6.redirtimeout. fixes PR kern/50240. + [ozaki-r, ticket #1327] + +sys/netinet/if_arp.c1.160 + + Add sysctl to selectively log arp packets from unknown network. + [ozaki-r, ticket #1328] +
CVS commit: [netbsd-6] src/external/bsd/bind
Module Name:src Committed By: bouyer Date: Sun Nov 15 19:09:19 UTC 2015 Modified Files: src/external/bsd/bind/dist [netbsd-6]: CHANGES COPYRIGHT FAQ.xml README config.h.in config.h.win32 configure configure.in srcid version src/external/bsd/bind/dist/bin/check [netbsd-6]: named-checkconf.c src/external/bsd/bind/dist/bin/dig [netbsd-6]: dig.1 dig.docbook dig.html dighost.c host.c nslookup.c src/external/bsd/bind/dist/bin/dig/include/dig [netbsd-6]: dig.h src/external/bsd/bind/dist/bin/dnssec [netbsd-6]: dnssec-dsfromkey.c dnssec-importkey.c dnssec-keyfromlabel.c dnssec-keygen.8 dnssec-keygen.c dnssec-keygen.docbook dnssec-keygen.html dnssec-settime.8 dnssec-settime.c dnssec-settime.docbook dnssec-settime.html dnssec-signzone.c dnssec-verify.c dnssectool.c dnssectool.h src/external/bsd/bind/dist/bin/named [netbsd-6]: client.c config.c interfacemgr.c main.c named.html query.c server.c update.c zoneconf.c src/external/bsd/bind/dist/bin/named/include/named [netbsd-6]: globals.h src/external/bsd/bind/dist/bin/nsupdate [netbsd-6]: nsupdate.c src/external/bsd/bind/dist/bin/rndc [netbsd-6]: rndc.c src/external/bsd/bind/dist/bin/tests/system [netbsd-6]: conf.sh.in genzone.sh start.pl src/external/bsd/bind/dist/bin/tests/system/checkconf [netbsd-6]: good.conf tests.sh src/external/bsd/bind/dist/bin/tests/system/checkzone [netbsd-6]: tests.sh src/external/bsd/bind/dist/bin/tests/system/dnssec [netbsd-6]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/dnssec/ns2 [netbsd-6]: example.db.in sign.sh src/external/bsd/bind/dist/bin/tests/system/dnssec/ns3 [netbsd-6]: named.conf sign.sh src/external/bsd/bind/dist/bin/tests/system/emptyzones [netbsd-6]: clean.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/emptyzones/ns1 [netbsd-6]: named2.conf src/external/bsd/bind/dist/bin/tests/system/forward [netbsd-6]: tests.sh src/external/bsd/bind/dist/bin/tests/system/forward/ns2 [netbsd-6]: named.conf src/external/bsd/bind/dist/bin/tests/system/forward/ns4 [netbsd-6]: named.conf src/external/bsd/bind/dist/bin/tests/system/inline [netbsd-6]: clean.sh setup.sh src/external/bsd/bind/dist/bin/tests/system/inline/ns2 [netbsd-6]: named.conf src/external/bsd/bind/dist/bin/tests/system/notify [netbsd-6]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/notify/ns2 [netbsd-6]: named.conf src/external/bsd/bind/dist/bin/tests/system/redirect [netbsd-6]: tests.sh src/external/bsd/bind/dist/bin/tests/system/resolver [netbsd-6]: tests.sh src/external/bsd/bind/dist/bin/tests/system/resolver/ns4 [netbsd-6]: root.db tld1.db tld2.db src/external/bsd/bind/dist/bin/tests/system/resolver/ns7 [netbsd-6]: named1.conf named2.conf src/external/bsd/bind/dist/bin/tests/system/rpz [netbsd-6]: tests.sh src/external/bsd/bind/dist/bin/tests/system/upforwd [netbsd-6]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/upforwd/ns1 [netbsd-6]: named.conf src/external/bsd/bind/dist/bin/tests/system/upforwd/ns2 [netbsd-6]: named.conf src/external/bsd/bind/dist/bin/tests/system/upforwd/ns3 [netbsd-6]: named.conf src/external/bsd/bind/dist/bin/tests/system/views [netbsd-6]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/views/ns2 [netbsd-6]: named2.conf src/external/bsd/bind/dist/bin/tests/system/xfer [netbsd-6]: dig1.good dig2.good src/external/bsd/bind/dist/contrib/dlz/example [netbsd-6]: README src/external/bsd/bind/dist/contrib/dlz/modules/bdbhpt [netbsd-6]: README.md src/external/bsd/bind/dist/contrib/dlz/modules/bdbhpt/testing [netbsd-6]: dns-data.txt src/external/bsd/bind/dist/contrib/sdb/ldap [netbsd-6]: ldapdb.c src/external/bsd/bind/dist/doc/arm [netbsd-6]: Bv9ARM-book.xml Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html Bv9ARM.ch04.html Bv9ARM.ch05.html Bv9ARM.ch06.html Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html Bv9ARM.ch10.html Bv9ARM.html Makefile.in dnssec.xml latex-fixup.pl man.arpaname.html man.ddns-confgen.html man.dig.html man.dnssec-checkds.html man.dnssec-coverage.html man.dnssec-dsfromkey.html man.dnssec-keyfromlabel.html man.dnssec-keygen.html man.dnssec-revoke.html
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 19:11:22 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: ticket 1329 To generate a diff of this commit: cvs rdiff -u -r1.1.2.230 -r1.1.2.231 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.230 src/doc/CHANGES-6.2:1.1.2.231 --- src/doc/CHANGES-6.2:1.1.2.230 Sun Nov 15 17:52:49 2015 +++ src/doc/CHANGES-6.2 Sun Nov 15 19:11:21 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.230 2015/11/15 17:52:49 bouyer Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.231 2015/11/15 19:11:21 bouyer Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -12643,3 +12643,9 @@ sys/netinet/if_arp.c1.160 Add sysctl to selectively log arp packets from unknown network. [ozaki-r, ticket #1328] +external/bsd/bind/distpatch +external/bsd/bind/include patch + + Update bind to 9.9.7-P3 + [spz, ticket #1329] +
CVS commit: [netbsd-6-0] src/external/bsd/bind
Module Name:src Committed By: bouyer Date: Sun Nov 15 19:12:53 UTC 2015 Modified Files: src/external/bsd/bind/dist [netbsd-6-0]: CHANGES COPYRIGHT FAQ.xml README config.h.in config.h.win32 configure configure.in srcid version src/external/bsd/bind/dist/bin/check [netbsd-6-0]: named-checkconf.c src/external/bsd/bind/dist/bin/dig [netbsd-6-0]: dig.1 dig.docbook dig.html dighost.c host.c nslookup.c src/external/bsd/bind/dist/bin/dig/include/dig [netbsd-6-0]: dig.h src/external/bsd/bind/dist/bin/dnssec [netbsd-6-0]: dnssec-dsfromkey.c dnssec-importkey.c dnssec-keyfromlabel.c dnssec-keygen.8 dnssec-keygen.c dnssec-keygen.docbook dnssec-keygen.html dnssec-settime.8 dnssec-settime.c dnssec-settime.docbook dnssec-settime.html dnssec-signzone.c dnssec-verify.c dnssectool.c dnssectool.h src/external/bsd/bind/dist/bin/named [netbsd-6-0]: client.c config.c interfacemgr.c main.c named.html query.c server.c update.c zoneconf.c src/external/bsd/bind/dist/bin/named/include/named [netbsd-6-0]: globals.h src/external/bsd/bind/dist/bin/nsupdate [netbsd-6-0]: nsupdate.c src/external/bsd/bind/dist/bin/rndc [netbsd-6-0]: rndc.c src/external/bsd/bind/dist/bin/tests/system [netbsd-6-0]: conf.sh.in genzone.sh start.pl src/external/bsd/bind/dist/bin/tests/system/checkconf [netbsd-6-0]: good.conf tests.sh src/external/bsd/bind/dist/bin/tests/system/checkzone [netbsd-6-0]: tests.sh src/external/bsd/bind/dist/bin/tests/system/dnssec [netbsd-6-0]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/dnssec/ns2 [netbsd-6-0]: example.db.in sign.sh src/external/bsd/bind/dist/bin/tests/system/dnssec/ns3 [netbsd-6-0]: named.conf sign.sh src/external/bsd/bind/dist/bin/tests/system/emptyzones [netbsd-6-0]: clean.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/emptyzones/ns1 [netbsd-6-0]: named2.conf src/external/bsd/bind/dist/bin/tests/system/forward [netbsd-6-0]: tests.sh src/external/bsd/bind/dist/bin/tests/system/forward/ns2 [netbsd-6-0]: named.conf src/external/bsd/bind/dist/bin/tests/system/forward/ns4 [netbsd-6-0]: named.conf src/external/bsd/bind/dist/bin/tests/system/inline [netbsd-6-0]: clean.sh setup.sh src/external/bsd/bind/dist/bin/tests/system/inline/ns2 [netbsd-6-0]: named.conf src/external/bsd/bind/dist/bin/tests/system/notify [netbsd-6-0]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/notify/ns2 [netbsd-6-0]: named.conf src/external/bsd/bind/dist/bin/tests/system/redirect [netbsd-6-0]: tests.sh src/external/bsd/bind/dist/bin/tests/system/resolver [netbsd-6-0]: tests.sh src/external/bsd/bind/dist/bin/tests/system/resolver/ns4 [netbsd-6-0]: root.db tld1.db tld2.db src/external/bsd/bind/dist/bin/tests/system/resolver/ns7 [netbsd-6-0]: named1.conf named2.conf src/external/bsd/bind/dist/bin/tests/system/rpz [netbsd-6-0]: tests.sh src/external/bsd/bind/dist/bin/tests/system/upforwd [netbsd-6-0]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/upforwd/ns1 [netbsd-6-0]: named.conf src/external/bsd/bind/dist/bin/tests/system/upforwd/ns2 [netbsd-6-0]: named.conf src/external/bsd/bind/dist/bin/tests/system/upforwd/ns3 [netbsd-6-0]: named.conf src/external/bsd/bind/dist/bin/tests/system/views [netbsd-6-0]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/views/ns2 [netbsd-6-0]: named2.conf src/external/bsd/bind/dist/bin/tests/system/xfer [netbsd-6-0]: dig1.good dig2.good src/external/bsd/bind/dist/contrib/dlz/example [netbsd-6-0]: README src/external/bsd/bind/dist/contrib/dlz/modules/bdbhpt [netbsd-6-0]: README.md src/external/bsd/bind/dist/contrib/dlz/modules/bdbhpt/testing [netbsd-6-0]: dns-data.txt src/external/bsd/bind/dist/contrib/sdb/ldap [netbsd-6-0]: ldapdb.c src/external/bsd/bind/dist/doc/arm [netbsd-6-0]: Bv9ARM-book.xml Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html Bv9ARM.ch04.html Bv9ARM.ch05.html Bv9ARM.ch06.html Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html Bv9ARM.ch10.html Bv9ARM.html Makefile.in dnssec.xml latex-fixup.pl man.arpaname.html man.ddns-confgen.html man.dig.html man.dnssec-checkds.html man.dnssec-coverage.html man.dnssec-dsfromkey.html man
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 19:15:03 UTC 2015 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: ticket 1329 To generate a diff of this commit: cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.50 src/doc/CHANGES-6.0.7:1.1.2.51 --- src/doc/CHANGES-6.0.7:1.1.2.50 Sun Nov 15 17:46:41 2015 +++ src/doc/CHANGES-6.0.7 Sun Nov 15 19:15:03 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.50 2015/11/15 17:46:41 bouyer Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.51 2015/11/15 19:15:03 bouyer Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -7020,3 +7020,9 @@ sys/dev/mii/atphy.c1.17 Fix incorrect argument of mii_anar(). Fixes PR#50206. [msaitoh, ticket #1325] +external/bsd/bind/distpatch +external/bsd/bind/include patch + + Update bind to 9.9.7-P3 + [spz, ticket #1329] +
CVS commit: [netbsd-6-1] src/external/bsd/bind
Module Name:src Committed By: bouyer Date: Sun Nov 15 19:18:03 UTC 2015 Modified Files: src/external/bsd/bind/dist [netbsd-6-1]: CHANGES COPYRIGHT FAQ.xml README config.h.in config.h.win32 configure configure.in srcid version src/external/bsd/bind/dist/bin/check [netbsd-6-1]: named-checkconf.c src/external/bsd/bind/dist/bin/dig [netbsd-6-1]: dig.1 dig.docbook dig.html dighost.c host.c nslookup.c src/external/bsd/bind/dist/bin/dig/include/dig [netbsd-6-1]: dig.h src/external/bsd/bind/dist/bin/dnssec [netbsd-6-1]: dnssec-dsfromkey.c dnssec-importkey.c dnssec-keyfromlabel.c dnssec-keygen.8 dnssec-keygen.c dnssec-keygen.docbook dnssec-keygen.html dnssec-settime.8 dnssec-settime.c dnssec-settime.docbook dnssec-settime.html dnssec-signzone.c dnssec-verify.c dnssectool.c dnssectool.h src/external/bsd/bind/dist/bin/named [netbsd-6-1]: client.c config.c interfacemgr.c main.c named.html query.c server.c update.c zoneconf.c src/external/bsd/bind/dist/bin/named/include/named [netbsd-6-1]: globals.h src/external/bsd/bind/dist/bin/nsupdate [netbsd-6-1]: nsupdate.c src/external/bsd/bind/dist/bin/rndc [netbsd-6-1]: rndc.c src/external/bsd/bind/dist/bin/tests/system [netbsd-6-1]: conf.sh.in genzone.sh start.pl src/external/bsd/bind/dist/bin/tests/system/checkconf [netbsd-6-1]: good.conf tests.sh src/external/bsd/bind/dist/bin/tests/system/checkzone [netbsd-6-1]: tests.sh src/external/bsd/bind/dist/bin/tests/system/dnssec [netbsd-6-1]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/dnssec/ns2 [netbsd-6-1]: example.db.in sign.sh src/external/bsd/bind/dist/bin/tests/system/dnssec/ns3 [netbsd-6-1]: named.conf sign.sh src/external/bsd/bind/dist/bin/tests/system/emptyzones [netbsd-6-1]: clean.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/emptyzones/ns1 [netbsd-6-1]: named2.conf src/external/bsd/bind/dist/bin/tests/system/forward [netbsd-6-1]: tests.sh src/external/bsd/bind/dist/bin/tests/system/forward/ns2 [netbsd-6-1]: named.conf src/external/bsd/bind/dist/bin/tests/system/forward/ns4 [netbsd-6-1]: named.conf src/external/bsd/bind/dist/bin/tests/system/inline [netbsd-6-1]: clean.sh setup.sh src/external/bsd/bind/dist/bin/tests/system/inline/ns2 [netbsd-6-1]: named.conf src/external/bsd/bind/dist/bin/tests/system/notify [netbsd-6-1]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/notify/ns2 [netbsd-6-1]: named.conf src/external/bsd/bind/dist/bin/tests/system/redirect [netbsd-6-1]: tests.sh src/external/bsd/bind/dist/bin/tests/system/resolver [netbsd-6-1]: tests.sh src/external/bsd/bind/dist/bin/tests/system/resolver/ns4 [netbsd-6-1]: root.db tld1.db tld2.db src/external/bsd/bind/dist/bin/tests/system/resolver/ns7 [netbsd-6-1]: named1.conf named2.conf src/external/bsd/bind/dist/bin/tests/system/rpz [netbsd-6-1]: tests.sh src/external/bsd/bind/dist/bin/tests/system/upforwd [netbsd-6-1]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/upforwd/ns1 [netbsd-6-1]: named.conf src/external/bsd/bind/dist/bin/tests/system/upforwd/ns2 [netbsd-6-1]: named.conf src/external/bsd/bind/dist/bin/tests/system/upforwd/ns3 [netbsd-6-1]: named.conf src/external/bsd/bind/dist/bin/tests/system/views [netbsd-6-1]: clean.sh setup.sh tests.sh src/external/bsd/bind/dist/bin/tests/system/views/ns2 [netbsd-6-1]: named2.conf src/external/bsd/bind/dist/bin/tests/system/xfer [netbsd-6-1]: dig1.good dig2.good src/external/bsd/bind/dist/contrib/dlz/example [netbsd-6-1]: README src/external/bsd/bind/dist/contrib/dlz/modules/bdbhpt [netbsd-6-1]: README.md src/external/bsd/bind/dist/contrib/dlz/modules/bdbhpt/testing [netbsd-6-1]: dns-data.txt src/external/bsd/bind/dist/contrib/sdb/ldap [netbsd-6-1]: ldapdb.c src/external/bsd/bind/dist/doc/arm [netbsd-6-1]: Bv9ARM-book.xml Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html Bv9ARM.ch04.html Bv9ARM.ch05.html Bv9ARM.ch06.html Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html Bv9ARM.ch10.html Bv9ARM.html Makefile.in dnssec.xml latex-fixup.pl man.arpaname.html man.ddns-confgen.html man.dig.html man.dnssec-checkds.html man.dnssec-coverage.html man.dnssec-dsfromkey.html man
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 19:19:58 UTC 2015 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: ticket 1329 To generate a diff of this commit: cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.49 src/doc/CHANGES-6.1.6:1.1.2.50 --- src/doc/CHANGES-6.1.6:1.1.2.49 Sun Nov 15 17:46:34 2015 +++ src/doc/CHANGES-6.1.6 Sun Nov 15 19:19:58 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.49 2015/11/15 17:46:34 bouyer Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.50 2015/11/15 19:19:58 bouyer Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -6741,3 +6741,9 @@ sys/dev/mii/atphy.c1.17 Fix incorrect argument of mii_anar(). Fixes PR#50206. [msaitoh, ticket #1325] +external/bsd/bind/distpatch +external/bsd/bind/include patch + + Update bind to 9.9.7-P3 + [spz, ticket #1329] +
CVS commit: src/share/man/man4
Module Name:src Committed By: plunky Date: Sun Nov 15 19:44:31 UTC 2015 Modified Files: src/share/man/man4: iwm.4 Log Message: Antti is Kantee To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/iwm.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/iwm.4 diff -u src/share/man/man4/iwm.4:1.2 src/share/man/man4/iwm.4:1.3 --- src/share/man/man4/iwm.4:1.2 Tue Mar 3 09:59:20 2015 +++ src/share/man/man4/iwm.4 Sun Nov 15 19:44:31 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: iwm.4,v 1.2 2015/03/03 09:59:20 nonaka Exp $ +.\" $NetBSD: iwm.4,v 1.3 2015/11/15 19:44:31 plunky Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -67,4 +67,4 @@ For more information on configuring this The .Nm driver was written by -.An Antti Kantte Aq Mt po...@netbsd.org . +.An Antti Kantee Aq Mt po...@netbsd.org .
CVS commit: [netbsd-6] src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:27:35 UTC 2015 Modified Files: src/sys/dev/pci [netbsd-6]: if_iwn.c if_iwnvar.h Log Message: Pull up following revision(s) (requested by nonaka in ticket #1330): sys/dev/pci/if_iwnvar.h: revision 1.17 sys/dev/pci/if_iwn.c: revision 1.76 PR/50187: Don't use DS parameter set when 5GHz channel is scanning. XXX: pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.62.2.1 src/sys/dev/pci/if_iwn.c cvs rdiff -u -r1.13 -r1.13.10.1 src/sys/dev/pci/if_iwnvar.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/pci/if_iwn.c diff -u src/sys/dev/pci/if_iwn.c:1.62 src/sys/dev/pci/if_iwn.c:1.62.2.1 --- src/sys/dev/pci/if_iwn.c:1.62 Mon Jan 30 19:41:20 2012 +++ src/sys/dev/pci/if_iwn.c Sun Nov 15 20:27:34 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwn.c,v 1.62 2012/01/30 19:41:20 drochner Exp $ */ +/* $NetBSD: if_iwn.c,v 1.62.2.1 2015/11/15 20:27:34 bouyer Exp $ */ /* $OpenBSD: if_iwn.c,v 1.96 2010/05/13 09:25:03 damien Exp $ */ /*- @@ -22,7 +22,7 @@ * adapters. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.62 2012/01/30 19:41:20 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.62.2.1 2015/11/15 20:27:34 bouyer Exp $"); #define IWN_USE_RBUF /* Use local storage for RX */ #undef IWN_HWCRYPTO /* XXX does not even compile yet */ @@ -301,7 +301,8 @@ static u_int8_t *ieee80211_add_rates(u_i static u_int8_t *ieee80211_add_xrates(u_int8_t *, const struct ieee80211_rateset *); -static void iwn_fix_channel(struct ieee80211com *, struct mbuf *); +static void iwn_fix_channel(struct ieee80211com *, struct mbuf *, + struct iwn_rx_stat *); #ifdef IWN_DEBUG #define DPRINTF(x) do { if (iwn_debug > 0) printf x; } while (0) @@ -1782,7 +1783,7 @@ iwn_newstate(struct ieee80211com *ic, en /* XXX Not sure if call and flags are needed. */ ieee80211_node_table_reset(&ic->ic_scan); ic->ic_flags |= IEEE80211_F_SCAN | IEEE80211_F_ASCAN; - sc->sc_flags |= IWN_FLAG_SCANNING; + sc->sc_flags |= IWN_FLAG_SCANNING_2GHZ; /* Make the link LED blink while we're scanning. */ iwn_set_led(sc, IWN_LED_LINK, 10, 10); @@ -2005,7 +2006,7 @@ iwn_rx_done(struct iwn_softc *sc, struct /* XXX Added for NetBSD: scans never stop without it */ if (ic->ic_state == IEEE80211_S_SCAN) - iwn_fix_channel(ic, m); + iwn_fix_channel(ic, m, stat); if (sc->sc_drvbpf != NULL) { struct iwn_rx_radiotap_header *tap = &sc->sc_rxtap; @@ -2432,6 +2433,8 @@ iwn_notif_intr(struct iwn_softc *sc) * We just finished scanning 2GHz channels, * start scanning 5GHz ones. */ +sc->sc_flags &= ~IWN_FLAG_SCANNING_2GHZ; +sc->sc_flags |= IWN_FLAG_SCANNING_5GHZ; if (iwn_scan(sc, IEEE80211_CHAN_5GHZ) == 0) break; } @@ -6078,8 +6081,10 @@ ieee80211_add_xrates(u_int8_t *frm, cons * XXX: Duplicated from if_iwi.c */ static void -iwn_fix_channel(struct ieee80211com *ic, struct mbuf *m) +iwn_fix_channel(struct ieee80211com *ic, struct mbuf *m, +struct iwn_rx_stat *stat) { + struct iwn_softc *sc = ic->ic_ifp->if_softc; struct ieee80211_frame *wh; uint8_t subtype; uint8_t *frm, *efrm; @@ -6095,6 +6100,13 @@ iwn_fix_channel(struct ieee80211com *ic, subtype != IEEE80211_FC0_SUBTYPE_PROBE_RESP) return; + if (sc->sc_flags & IWN_FLAG_SCANNING_5GHZ) { + int chan = le16toh(stat->chan); + if (chan < __arraycount(ic->ic_channels)) + ic->ic_curchan = &ic->ic_channels[chan]; + return; + } + frm = (uint8_t *)(wh + 1); efrm = mtod(m, uint8_t *) + m->m_len; Index: src/sys/dev/pci/if_iwnvar.h diff -u src/sys/dev/pci/if_iwnvar.h:1.13 src/sys/dev/pci/if_iwnvar.h:1.13.10.1 --- src/sys/dev/pci/if_iwnvar.h:1.13 Sun May 15 13:56:20 2011 +++ src/sys/dev/pci/if_iwnvar.h Sun Nov 15 20:27:34 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwnvar.h,v 1.13 2011/05/15 13:56:20 christos Exp $ */ +/* $NetBSD: if_iwnvar.h,v 1.13.10.1 2015/11/15 20:27:34 bouyer Exp $ */ /* $OpenBSD: if_iwnvar.h,v 1.19 2010/05/05 19:47:43 damien Exp $ */ /*- @@ -220,8 +220,10 @@ struct iwn_softc { #define IWN_FLAG_HAS_11N (1 << 6) #define IWN_FLAG_ENH_SENS (1 << 7) /* Added for NetBSD */ -#define IWN_FLAG_SCANNING (1 << 8) -#define IWN_FLAG_HW_INITED (1 << 9) +#define IWN_FLAG_HW_INITED (1 << 8) +#define IWN_FLAG_SCANNING_2GHZ (1 << 9) +#define IWN_FLAG_SCANNING_5GHZ (1 << 10) +#define IWN_FLAG_SCANNING (IWN_FLAG_SCANNING_2GHZ|IWN_FLAG_SCANNING_5GHZ) uint8_t hw_type;
CVS commit: src/sys/arch/sparc64/include
Module Name:src Committed By: martin Date: Sun Nov 15 20:35:34 UTC 2015 Modified Files: src/sys/arch/sparc64/include: vmparam.h Log Message: PR 32999: adjust VM parameters for 64 bit kernel/userlands. Limit old binaries (i.e. processes not using topdown VA layout) to 2 GB data size. Use the same limits as native sparc for netbsd32 emulation - we need to revisit this, but currently automatic test runs in this environment fail big time, so there is no easy way to verify any changes. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sparc64/include/vmparam.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/arch/sparc64/include/vmparam.h diff -u src/sys/arch/sparc64/include/vmparam.h:1.34 src/sys/arch/sparc64/include/vmparam.h:1.35 --- src/sys/arch/sparc64/include/vmparam.h:1.34 Mon Apr 14 10:54:08 2014 +++ src/sys/arch/sparc64/include/vmparam.h Sun Nov 15 20:35:33 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.34 2014/04/14 10:54:08 martin Exp $ */ +/* $NetBSD: vmparam.h,v 1.35 2015/11/15 20:35:33 martin Exp $ */ /* * Copyright (c) 1992, 1993 @@ -78,8 +78,7 @@ /* * Virtual memory related constants, all in bytes */ -/* #ifdef __arch64__ */ -#if 0 +#if __arch64__ /* * 64-bit limits: * @@ -90,64 +89,69 @@ * of that for data and the other half for stack. */ #ifndef MAXTSIZ -#define MAXTSIZ (4L*1024*1024*1024) /* max text size */ +#define MAXTSIZ (4UL*1024*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ -#define DFLDSIZ (128L*1024*1024) /* initial data size limit */ +#define DFLDSIZ (128UL*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (1L<<39) /* max data size */ +#define MAXDSIZ (1UL<<39) /* max data size */ +/* + * For processes not using topdown VA, we need to limit the data size - + * they probably have not been compiled with the proper compiler memory + * model. + */ +#define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \ +round_page((vaddr_t)(da) + (vsize_t)max(maxdmap,2UL*1024*1024*1024)) #endif #ifndef DFLSSIZ #define DFLSSIZ (2*1024*1024) /* initial stack size limit */ #endif #ifndef MAXSSIZ -#define MAXSSIZ MAXDSIZ /* max stack size */ +#define MAXSSIZ (128*1024*1024) /* max stack size */ #endif #else /* * 32-bit limits: * - * We only have 4GB to play with. Limit stack, data, and text - * each to half of that. + * We only have 4GB to play with. Limit data, and text + * each to half of that and set a reasonable stack limit. * - * This is silly. Apparently if we go above these numbers - * integer overflows in other parts of the kernel cause hangs. */ #ifndef MAXTSIZ -#define MAXTSIZ (1*1024*1024*1024) /* max text size */ +#define MAXTSIZ (2UL*1024*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ #define DFLDSIZ (128*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (1*1024*1024*1024) /* max data size */ +#define MAXDSIZ (2UL*1024*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ #define DFLSSIZ (2*1024*1024) /* initial stack size limit */ #endif #ifndef MAXSSIZ -#define MAXSSIZ (8*1024*1024) /* max stack size */ +#define MAXSSIZ (64*1024*1024) /* max stack size */ #endif #endif /* - * 32-bit emulation limits. + * 32-bit emulation limits (same as sparc - we could go bigger) */ #ifndef MAXTSIZ32 -#define MAXTSIZ32 (1*1024*1024*1024) /* max text size */ +#define MAXTSIZ32 (64*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ32 -#define DFLDSIZ32 (128*1024*1024) /* initial data size limit */ +#define DFLDSIZ32 (64*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ32 -#define MAXDSIZ32 (1*1024*1024*1024) /* max data size */ +#define MAXDSIZ32 (512*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ32 #define DFLSSIZ32 (2*1024*1024) /* initial stack size limit */ #endif #ifndef MAXSSIZ32 -#define MAXSSIZ32 (8*1024*1024) /* max stack size */ +#define MAXSSIZ32 (32*1024*1024) /* max stack size */ #endif /*
CVS commit: [netbsd-6] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:37:04 UTC 2015 Modified Files: src/sys/kern [netbsd-6]: kern_exec.c kern_exit.c kern_synch.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1333): sys/kern/kern_exec.c: revision 1.420 sys/kern/kern_synch.c: revision 1.309 sys/kern/kern_exit.c: revision 1.246 sys/kern/kern_exit.c: revision 1.247 sys/kern/kern_exec.c: revision 1.419 In execve_runproc(), update the p_waited entry for the process being moved to SSTOP state, not for its parent. (It is correct to update the parent's p_nstopchild count.) If the value is not already zero, it could prevent its parent from waiting for the process. Fixes PR kern/50298 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 When clearing out the scheduler queues during system shutdown, we move all processes to the SSTOP state. Make sure we update each process's p_waited and the parents' p_nstopchild counters to maintain consistent values. Should not make any real difference this late in the shutdown process, but we should still be consistent just in case. Fixes PR kern/50318 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 Currently, if a process is exiting and its parent has indicated no intent of reaping the process (nor any other children), the process wil get reparented to init. Since the state of the exiting process at this point is SDEAD, proc_reparent() will not update either the old or new parent's p_nstopchild counters. This change causes both old and new parents to be properly updated. Fixes PR kern/50300 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 For processes marked with PS_STOPEXIT, update the process's p_waited value, and update its parent's p_nstopchild value when marking the process's p_stat to SSTOP. The process needed to be SACTIVE to get here, so this transition represents an additional process for which the parent needs to wait. Fixes PR kern/50308 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 In spawn_return() we temporarily move the process state to SSTOP, but without updating its p_waited value or its parent's p_nstopchild counter. Later, we restore the original state, again without any adjustment of the related values. This leaves a relatively short window when the values are inconsistent and could interfere with the proper operation of sys_wait() for the parent (if it manages to be scheduled; it's not totally clear what, if anything, prevents scheduling/execution of the parent). If during this window, any of the checks being made result in an error, we call exit1() which will eventually migrate the process's state to SDEAD (with an intermediate transition to SDYING). At this point the other variables get updated, and we finally restore a consistent state. This change updates the p_waited and parent's p_nstopchild at each step to eliminate any windows during which the values could lead to incorrect decisions. Fixes PR kern/50330 Pullups will be requested for NetBSD-7, -6, -6-0, and -6-1 To generate a diff of this commit: cvs rdiff -u -r1.339.2.9 -r1.339.2.10 src/sys/kern/kern_exec.c cvs rdiff -u -r1.236.2.3 -r1.236.2.4 src/sys/kern/kern_exit.c cvs rdiff -u -r1.297.2.1 -r1.297.2.2 src/sys/kern/kern_synch.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_exec.c diff -u src/sys/kern/kern_exec.c:1.339.2.9 src/sys/kern/kern_exec.c:1.339.2.10 --- src/sys/kern/kern_exec.c:1.339.2.9 Mon Apr 21 10:00:10 2014 +++ src/sys/kern/kern_exec.c Sun Nov 15 20:37:04 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.339.2.9 2014/04/21 10:00:10 bouyer Exp $ */ +/* $NetBSD: kern_exec.c,v 1.339.2.10 2015/11/15 20:37:04 bouyer Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.9 2014/04/21 10:00:10 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.10 2015/11/15 20:37:04 bouyer Exp $"); #include "opt_exec.h" #include "opt_ktrace.h" @@ -1412,7 +1412,7 @@ execve_runproc(struct lwp *l, struct exe if (p->p_sflag & PS_STOPEXEC) { KERNEL_UNLOCK_ALL(l, &l->l_biglocks); p->p_pptr->p_nstopchild++; - p->p_pptr->p_waited = 0; + p->p_waited = 0; mutex_enter(p->p_lock); ksiginfo_queue_init(&kq); sigclearall(p, &contsigmask, &kq); @@ -1849,6 +1849,7 @@ spawn_return(void *arg) struct spawn_exec_data *spawn_data = arg; struct lwp *l = curlwp; int error, newfd; + int ostat; size_t i; const struct posix_spawn_file_actions_entry *fae; pid_t ppid; @@ -1921,7 +1922,6 @@ spawn_return(void *arg) /* handle posix_spawnattr */ if (spawn_data->sed_attrs != NULL) { - int ostat; struct sigaction sigact;
CVS commit: [netbsd-6-0] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:38:01 UTC 2015 Modified Files: src/sys/kern [netbsd-6-0]: kern_exec.c kern_exit.c kern_synch.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1333): sys/kern/kern_exec.c: revision 1.420 sys/kern/kern_synch.c: revision 1.309 sys/kern/kern_exit.c: revision 1.246 sys/kern/kern_exit.c: revision 1.247 sys/kern/kern_exec.c: revision 1.419 In execve_runproc(), update the p_waited entry for the process being moved to SSTOP state, not for its parent. (It is correct to update the parent's p_nstopchild count.) If the value is not already zero, it could prevent its parent from waiting for the process. Fixes PR kern/50298 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 When clearing out the scheduler queues during system shutdown, we move all processes to the SSTOP state. Make sure we update each process's p_waited and the parents' p_nstopchild counters to maintain consistent values. Should not make any real difference this late in the shutdown process, but we should still be consistent just in case. Fixes PR kern/50318 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 Currently, if a process is exiting and its parent has indicated no intent of reaping the process (nor any other children), the process wil get reparented to init. Since the state of the exiting process at this point is SDEAD, proc_reparent() will not update either the old or new parent's p_nstopchild counters. This change causes both old and new parents to be properly updated. Fixes PR kern/50300 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 For processes marked with PS_STOPEXIT, update the process's p_waited value, and update its parent's p_nstopchild value when marking the process's p_stat to SSTOP. The process needed to be SACTIVE to get here, so this transition represents an additional process for which the parent needs to wait. Fixes PR kern/50308 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 In spawn_return() we temporarily move the process state to SSTOP, but without updating its p_waited value or its parent's p_nstopchild counter. Later, we restore the original state, again without any adjustment of the related values. This leaves a relatively short window when the values are inconsistent and could interfere with the proper operation of sys_wait() for the parent (if it manages to be scheduled; it's not totally clear what, if anything, prevents scheduling/execution of the parent). If during this window, any of the checks being made result in an error, we call exit1() which will eventually migrate the process's state to SDEAD (with an intermediate transition to SDYING). At this point the other variables get updated, and we finally restore a consistent state. This change updates the p_waited and parent's p_nstopchild at each step to eliminate any windows during which the values could lead to incorrect decisions. Fixes PR kern/50330 Pullups will be requested for NetBSD-7, -6, -6-0, and -6-1 To generate a diff of this commit: cvs rdiff -u -r1.339.2.5.4.3 -r1.339.2.5.4.4 src/sys/kern/kern_exec.c cvs rdiff -u -r1.236.2.2 -r1.236.2.2.2.1 src/sys/kern/kern_exit.c cvs rdiff -u -r1.297.2.1 -r1.297.2.1.4.1 src/sys/kern/kern_synch.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_exec.c diff -u src/sys/kern/kern_exec.c:1.339.2.5.4.3 src/sys/kern/kern_exec.c:1.339.2.5.4.4 --- src/sys/kern/kern_exec.c:1.339.2.5.4.3 Mon Apr 21 10:00:35 2014 +++ src/sys/kern/kern_exec.c Sun Nov 15 20:38:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.339.2.5.4.3 2014/04/21 10:00:35 bouyer Exp $ */ +/* $NetBSD: kern_exec.c,v 1.339.2.5.4.4 2015/11/15 20:38:01 bouyer Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.5.4.3 2014/04/21 10:00:35 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.5.4.4 2015/11/15 20:38:01 bouyer Exp $"); #include "opt_exec.h" #include "opt_ktrace.h" @@ -1408,7 +1408,7 @@ execve_runproc(struct lwp *l, struct exe if (p->p_sflag & PS_STOPEXEC) { KERNEL_UNLOCK_ALL(l, &l->l_biglocks); p->p_pptr->p_nstopchild++; - p->p_pptr->p_waited = 0; + p->p_waited = 0; mutex_enter(p->p_lock); ksiginfo_queue_init(&kq); sigclearall(p, &contsigmask, &kq); @@ -1845,6 +1845,7 @@ spawn_return(void *arg) struct spawn_exec_data *spawn_data = arg; struct lwp *l = curlwp; int error, newfd; + int ostat; size_t i; const struct posix_spawn_file_actions_entry *fae; pid_t ppid; @@ -1917,7 +1918,6 @@ spawn_return(void *arg) /* handle posix_spawnattr */ if (spawn_data->sed_attrs != NULL) { -
CVS commit: [netbsd-6-1] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:38:18 UTC 2015 Modified Files: src/sys/kern [netbsd-6-1]: kern_exec.c kern_exit.c kern_synch.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1333): sys/kern/kern_exec.c: revision 1.420 sys/kern/kern_synch.c: revision 1.309 sys/kern/kern_exit.c: revision 1.246 sys/kern/kern_exit.c: revision 1.247 sys/kern/kern_exec.c: revision 1.419 In execve_runproc(), update the p_waited entry for the process being moved to SSTOP state, not for its parent. (It is correct to update the parent's p_nstopchild count.) If the value is not already zero, it could prevent its parent from waiting for the process. Fixes PR kern/50298 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 When clearing out the scheduler queues during system shutdown, we move all processes to the SSTOP state. Make sure we update each process's p_waited and the parents' p_nstopchild counters to maintain consistent values. Should not make any real difference this late in the shutdown process, but we should still be consistent just in case. Fixes PR kern/50318 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 Currently, if a process is exiting and its parent has indicated no intent of reaping the process (nor any other children), the process wil get reparented to init. Since the state of the exiting process at this point is SDEAD, proc_reparent() will not update either the old or new parent's p_nstopchild counters. This change causes both old and new parents to be properly updated. Fixes PR kern/50300 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 For processes marked with PS_STOPEXIT, update the process's p_waited value, and update its parent's p_nstopchild value when marking the process's p_stat to SSTOP. The process needed to be SACTIVE to get here, so this transition represents an additional process for which the parent needs to wait. Fixes PR kern/50308 Pullups will be requested for: NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2 In spawn_return() we temporarily move the process state to SSTOP, but without updating its p_waited value or its parent's p_nstopchild counter. Later, we restore the original state, again without any adjustment of the related values. This leaves a relatively short window when the values are inconsistent and could interfere with the proper operation of sys_wait() for the parent (if it manages to be scheduled; it's not totally clear what, if anything, prevents scheduling/execution of the parent). If during this window, any of the checks being made result in an error, we call exit1() which will eventually migrate the process's state to SDEAD (with an intermediate transition to SDYING). At this point the other variables get updated, and we finally restore a consistent state. This change updates the p_waited and parent's p_nstopchild at each step to eliminate any windows during which the values could lead to incorrect decisions. Fixes PR kern/50330 Pullups will be requested for NetBSD-7, -6, -6-0, and -6-1 To generate a diff of this commit: cvs rdiff -u -r1.339.2.6.2.2 -r1.339.2.6.2.3 src/sys/kern/kern_exec.c cvs rdiff -u -r1.236.2.2 -r1.236.2.2.4.1 src/sys/kern/kern_exit.c cvs rdiff -u -r1.297.2.1 -r1.297.2.1.6.1 src/sys/kern/kern_synch.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_exec.c diff -u src/sys/kern/kern_exec.c:1.339.2.6.2.2 src/sys/kern/kern_exec.c:1.339.2.6.2.3 --- src/sys/kern/kern_exec.c:1.339.2.6.2.2 Mon Apr 21 10:00:33 2014 +++ src/sys/kern/kern_exec.c Sun Nov 15 20:38:17 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.339.2.6.2.2 2014/04/21 10:00:33 bouyer Exp $ */ +/* $NetBSD: kern_exec.c,v 1.339.2.6.2.3 2015/11/15 20:38:17 bouyer Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.6.2.2 2014/04/21 10:00:33 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.6.2.3 2015/11/15 20:38:17 bouyer Exp $"); #include "opt_exec.h" #include "opt_ktrace.h" @@ -1408,7 +1408,7 @@ execve_runproc(struct lwp *l, struct exe if (p->p_sflag & PS_STOPEXEC) { KERNEL_UNLOCK_ALL(l, &l->l_biglocks); p->p_pptr->p_nstopchild++; - p->p_pptr->p_waited = 0; + p->p_waited = 0; mutex_enter(p->p_lock); ksiginfo_queue_init(&kq); sigclearall(p, &contsigmask, &kq); @@ -1845,6 +1845,7 @@ spawn_return(void *arg) struct spawn_exec_data *spawn_data = arg; struct lwp *l = curlwp; int error, newfd; + int ostat; size_t i; const struct posix_spawn_file_actions_entry *fae; pid_t ppid; @@ -1917,7 +1918,6 @@ spawn_return(void *arg) /* handle posix_spawnattr */ if (spawn_data->sed_attrs != NULL) { -
CVS commit: [netbsd-6] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:40:20 UTC 2015 Modified Files: src/sys/kern [netbsd-6]: kern_sig.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1334): sys/kern/kern_sig.c: revision 1.321 When delivering a signal, it's possible that the process's state in p_stat is SACTIVE yet p_sflag is PS_STOPPING (while waiting for other lwp's to stop). In that case, we don't want to adjust the parent's p_nstopchild count. Found by Robert Elz. XXX Pullups to: NetBSD-7, -6{,-0,-1}, and -5{,-0,-1,-2} To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.316.8.1 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.316 src/sys/kern/kern_sig.c:1.316.8.1 --- src/sys/kern/kern_sig.c:1.316 Fri Sep 16 22:07:17 2011 +++ src/sys/kern/kern_sig.c Sun Nov 15 20:40:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.316 2011/09/16 22:07:17 reinoud Exp $ */ +/* $NetBSD: kern_sig.c,v 1.316.8.1 2015/11/15 20:40:20 bouyer Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.316 2011/09/16 22:07:17 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.316.8.1 2015/11/15 20:40:20 bouyer Exp $"); #include "opt_ptrace.h" #include "opt_compat_sunos.h" @@ -1461,14 +1461,13 @@ kpsignal2(struct proc *p, ksiginfo_t *ks } if ((prop & SA_CONT) != 0 || signo == SIGKILL) { /* - * Re-adjust p_nstopchild if the process wasn't - * collected by its parent. + * Re-adjust p_nstopchild if the process was + * stopped but not yet collected by its parent. */ + if (p->p_stat == SSTOP && !p->p_waited) +p->p_pptr->p_nstopchild--; p->p_stat = SACTIVE; p->p_sflag &= ~PS_STOPPING; - if (!p->p_waited) { -p->p_pptr->p_nstopchild--; - } if (p->p_slflag & PSL_TRACED) { KASSERT(signo == SIGKILL); goto deliver;
CVS commit: [netbsd-6-0] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:40:26 UTC 2015 Modified Files: src/sys/kern [netbsd-6-0]: kern_sig.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1334): sys/kern/kern_sig.c: revision 1.321 When delivering a signal, it's possible that the process's state in p_stat is SACTIVE yet p_sflag is PS_STOPPING (while waiting for other lwp's to stop). In that case, we don't want to adjust the parent's p_nstopchild count. Found by Robert Elz. XXX Pullups to: NetBSD-7, -6{,-0,-1}, and -5{,-0,-1,-2} To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.316.12.1 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.316 src/sys/kern/kern_sig.c:1.316.12.1 --- src/sys/kern/kern_sig.c:1.316 Fri Sep 16 22:07:17 2011 +++ src/sys/kern/kern_sig.c Sun Nov 15 20:40:26 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.316 2011/09/16 22:07:17 reinoud Exp $ */ +/* $NetBSD: kern_sig.c,v 1.316.12.1 2015/11/15 20:40:26 bouyer Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.316 2011/09/16 22:07:17 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.316.12.1 2015/11/15 20:40:26 bouyer Exp $"); #include "opt_ptrace.h" #include "opt_compat_sunos.h" @@ -1461,14 +1461,13 @@ kpsignal2(struct proc *p, ksiginfo_t *ks } if ((prop & SA_CONT) != 0 || signo == SIGKILL) { /* - * Re-adjust p_nstopchild if the process wasn't - * collected by its parent. + * Re-adjust p_nstopchild if the process was + * stopped but not yet collected by its parent. */ + if (p->p_stat == SSTOP && !p->p_waited) +p->p_pptr->p_nstopchild--; p->p_stat = SACTIVE; p->p_sflag &= ~PS_STOPPING; - if (!p->p_waited) { -p->p_pptr->p_nstopchild--; - } if (p->p_slflag & PSL_TRACED) { KASSERT(signo == SIGKILL); goto deliver;
CVS commit: [netbsd-6-1] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:40:31 UTC 2015 Modified Files: src/sys/kern [netbsd-6-1]: kern_sig.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1334): sys/kern/kern_sig.c: revision 1.321 When delivering a signal, it's possible that the process's state in p_stat is SACTIVE yet p_sflag is PS_STOPPING (while waiting for other lwp's to stop). In that case, we don't want to adjust the parent's p_nstopchild count. Found by Robert Elz. XXX Pullups to: NetBSD-7, -6{,-0,-1}, and -5{,-0,-1,-2} To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.316.14.1 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.316 src/sys/kern/kern_sig.c:1.316.14.1 --- src/sys/kern/kern_sig.c:1.316 Fri Sep 16 22:07:17 2011 +++ src/sys/kern/kern_sig.c Sun Nov 15 20:40:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.316 2011/09/16 22:07:17 reinoud Exp $ */ +/* $NetBSD: kern_sig.c,v 1.316.14.1 2015/11/15 20:40:31 bouyer Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.316 2011/09/16 22:07:17 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.316.14.1 2015/11/15 20:40:31 bouyer Exp $"); #include "opt_ptrace.h" #include "opt_compat_sunos.h" @@ -1461,14 +1461,13 @@ kpsignal2(struct proc *p, ksiginfo_t *ks } if ((prop & SA_CONT) != 0 || signo == SIGKILL) { /* - * Re-adjust p_nstopchild if the process wasn't - * collected by its parent. + * Re-adjust p_nstopchild if the process was + * stopped but not yet collected by its parent. */ + if (p->p_stat == SSTOP && !p->p_waited) +p->p_pptr->p_nstopchild--; p->p_stat = SACTIVE; p->p_sflag &= ~PS_STOPPING; - if (!p->p_waited) { -p->p_pptr->p_nstopchild--; - } if (p->p_slflag & PSL_TRACED) { KASSERT(signo == SIGKILL); goto deliver;
CVS commit: [netbsd-6-0] src/sys/compat/linux/arch
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:42:37 UTC 2015 Modified Files: src/sys/compat/linux/arch/arm [netbsd-6-0]: linux_ptrace.c src/sys/compat/linux/arch/i386 [netbsd-6-0]: linux_ptrace.c src/sys/compat/linux/arch/powerpc [netbsd-6-0]: linux_ptrace.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1335): sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.31 sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.19 sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.29 Don't release proc_lock until we're done looking at things that are protected by the lock, particularly p_stat and p_waited. Found by Robert Elz. XXX Pullup to NetBSD-7, -6, -6-0, and -6-1 To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.18.1 src/sys/compat/linux/arch/arm/linux_ptrace.c cvs rdiff -u -r1.26 -r1.26.20.1 src/sys/compat/linux/arch/i386/linux_ptrace.c cvs rdiff -u -r1.23 -r1.23.20.1 \ src/sys/compat/linux/arch/powerpc/linux_ptrace.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/arch/arm/linux_ptrace.c diff -u src/sys/compat/linux/arch/arm/linux_ptrace.c:1.16 src/sys/compat/linux/arch/arm/linux_ptrace.c:1.16.18.1 --- src/sys/compat/linux/arch/arm/linux_ptrace.c:1.16 Wed Jul 7 01:30:33 2010 +++ src/sys/compat/linux/arch/arm/linux_ptrace.c Sun Nov 15 20:42:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.16 2010/07/07 01:30:33 chs Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.16.18.1 2015/11/15 20:42:36 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.16 2010/07/07 01:30:33 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.16.18.1 2015/11/15 20:42:36 bouyer Exp $"); #include #include @@ -140,7 +140,6 @@ linux_sys_ptrace_arch(struct lwp *l, con goto out; } mutex_enter(t->p_lock); - mutex_exit(proc_lock); /* * You cannot do what you want to the process if: @@ -148,6 +147,7 @@ linux_sys_ptrace_arch(struct lwp *l, con */ if (!ISSET(t->p_slflag, PSL_TRACED)) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EPERM; goto out; } @@ -160,9 +160,11 @@ linux_sys_ptrace_arch(struct lwp *l, con if (ISSET(t->p_slflag, PSL_FSTRACE) || t->p_pptr != p || t->p_stat != SSTOP || !t->p_waited) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EBUSY; goto out; } + mutex_exit(proc_lock); /* XXX: ptrace needs revamp for multi-threading support. */ if (t->p_nlwps > 1) { mutex_exit(t->p_lock); Index: src/sys/compat/linux/arch/i386/linux_ptrace.c diff -u src/sys/compat/linux/arch/i386/linux_ptrace.c:1.26 src/sys/compat/linux/arch/i386/linux_ptrace.c:1.26.20.1 --- src/sys/compat/linux/arch/i386/linux_ptrace.c:1.26 Wed Jul 7 01:30:34 2010 +++ src/sys/compat/linux/arch/i386/linux_ptrace.c Sun Nov 15 20:42:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.26 2010/07/07 01:30:34 chs Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.26.20.1 2015/11/15 20:42:36 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.26 2010/07/07 01:30:34 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.26.20.1 2015/11/15 20:42:36 bouyer Exp $"); #include #include @@ -184,7 +184,6 @@ linux_sys_ptrace_arch(struct lwp *l, con return ESRCH; } mutex_enter(t->p_lock); - mutex_exit(proc_lock); /* * You cannot do what you want to the process if: @@ -192,6 +191,7 @@ linux_sys_ptrace_arch(struct lwp *l, con */ if (!ISSET(t->p_slflag, PSL_TRACED)) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EPERM; goto out; } @@ -204,9 +204,11 @@ linux_sys_ptrace_arch(struct lwp *l, con if (ISSET(t->p_slflag, PSL_FSTRACE) || t->p_pptr != p || t->p_stat != SSTOP || !t->p_waited) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EBUSY; goto out; } + mutex_exit(proc_lock); /* XXX: ptrace needs revamp for multi-threading support. */ if (t->p_nlwps > 1) { mutex_exit(t->p_lock); Index: src/sys/compat/linux/arch/powerpc/linux_ptrace.c diff -u src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.23 src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.23.20.1 --- src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.23 Thu Jul 1 02:38:28 2010 +++ src/sys/compat/linux/arch/powerpc/linux_ptrace.c Sun Nov 15 20:42:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.23 2010/07/01 02:38:28 rmind Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.23.20.1 2015/11/15 20:42:36 bouyer Exp $ */ /*- * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.23 2010/07/01 02:38:28 rmind Exp $"); +__KERNEL_RCSID(0, "$NetB
CVS commit: [netbsd-6] src/sys/compat/linux/arch
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:42:32 UTC 2015 Modified Files: src/sys/compat/linux/arch/arm [netbsd-6]: linux_ptrace.c src/sys/compat/linux/arch/i386 [netbsd-6]: linux_ptrace.c src/sys/compat/linux/arch/powerpc [netbsd-6]: linux_ptrace.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1335): sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.31 sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.19 sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.29 Don't release proc_lock until we're done looking at things that are protected by the lock, particularly p_stat and p_waited. Found by Robert Elz. XXX Pullup to NetBSD-7, -6, -6-0, and -6-1 To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.14.1 src/sys/compat/linux/arch/arm/linux_ptrace.c cvs rdiff -u -r1.26 -r1.26.14.1 src/sys/compat/linux/arch/i386/linux_ptrace.c cvs rdiff -u -r1.23 -r1.23.14.1 \ src/sys/compat/linux/arch/powerpc/linux_ptrace.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/arch/arm/linux_ptrace.c diff -u src/sys/compat/linux/arch/arm/linux_ptrace.c:1.16 src/sys/compat/linux/arch/arm/linux_ptrace.c:1.16.14.1 --- src/sys/compat/linux/arch/arm/linux_ptrace.c:1.16 Wed Jul 7 01:30:33 2010 +++ src/sys/compat/linux/arch/arm/linux_ptrace.c Sun Nov 15 20:42:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.16 2010/07/07 01:30:33 chs Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.16.14.1 2015/11/15 20:42:32 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.16 2010/07/07 01:30:33 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.16.14.1 2015/11/15 20:42:32 bouyer Exp $"); #include #include @@ -140,7 +140,6 @@ linux_sys_ptrace_arch(struct lwp *l, con goto out; } mutex_enter(t->p_lock); - mutex_exit(proc_lock); /* * You cannot do what you want to the process if: @@ -148,6 +147,7 @@ linux_sys_ptrace_arch(struct lwp *l, con */ if (!ISSET(t->p_slflag, PSL_TRACED)) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EPERM; goto out; } @@ -160,9 +160,11 @@ linux_sys_ptrace_arch(struct lwp *l, con if (ISSET(t->p_slflag, PSL_FSTRACE) || t->p_pptr != p || t->p_stat != SSTOP || !t->p_waited) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EBUSY; goto out; } + mutex_exit(proc_lock); /* XXX: ptrace needs revamp for multi-threading support. */ if (t->p_nlwps > 1) { mutex_exit(t->p_lock); Index: src/sys/compat/linux/arch/i386/linux_ptrace.c diff -u src/sys/compat/linux/arch/i386/linux_ptrace.c:1.26 src/sys/compat/linux/arch/i386/linux_ptrace.c:1.26.14.1 --- src/sys/compat/linux/arch/i386/linux_ptrace.c:1.26 Wed Jul 7 01:30:34 2010 +++ src/sys/compat/linux/arch/i386/linux_ptrace.c Sun Nov 15 20:42:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.26 2010/07/07 01:30:34 chs Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.26.14.1 2015/11/15 20:42:32 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.26 2010/07/07 01:30:34 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.26.14.1 2015/11/15 20:42:32 bouyer Exp $"); #include #include @@ -184,7 +184,6 @@ linux_sys_ptrace_arch(struct lwp *l, con return ESRCH; } mutex_enter(t->p_lock); - mutex_exit(proc_lock); /* * You cannot do what you want to the process if: @@ -192,6 +191,7 @@ linux_sys_ptrace_arch(struct lwp *l, con */ if (!ISSET(t->p_slflag, PSL_TRACED)) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EPERM; goto out; } @@ -204,9 +204,11 @@ linux_sys_ptrace_arch(struct lwp *l, con if (ISSET(t->p_slflag, PSL_FSTRACE) || t->p_pptr != p || t->p_stat != SSTOP || !t->p_waited) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EBUSY; goto out; } + mutex_exit(proc_lock); /* XXX: ptrace needs revamp for multi-threading support. */ if (t->p_nlwps > 1) { mutex_exit(t->p_lock); Index: src/sys/compat/linux/arch/powerpc/linux_ptrace.c diff -u src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.23 src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.23.14.1 --- src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.23 Thu Jul 1 02:38:28 2010 +++ src/sys/compat/linux/arch/powerpc/linux_ptrace.c Sun Nov 15 20:42:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.23 2010/07/01 02:38:28 rmind Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.23.14.1 2015/11/15 20:42:32 bouyer Exp $ */ /*- * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.23 2010/07/01 02:38:28 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: li
CVS commit: [netbsd-6-1] src/sys/compat/linux/arch
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:42:39 UTC 2015 Modified Files: src/sys/compat/linux/arch/arm [netbsd-6-1]: linux_ptrace.c src/sys/compat/linux/arch/i386 [netbsd-6-1]: linux_ptrace.c src/sys/compat/linux/arch/powerpc [netbsd-6-1]: linux_ptrace.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1335): sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.31 sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.19 sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.29 Don't release proc_lock until we're done looking at things that are protected by the lock, particularly p_stat and p_waited. Found by Robert Elz. XXX Pullup to NetBSD-7, -6, -6-0, and -6-1 To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.20.1 src/sys/compat/linux/arch/arm/linux_ptrace.c cvs rdiff -u -r1.26 -r1.26.28.1 src/sys/compat/linux/arch/i386/linux_ptrace.c cvs rdiff -u -r1.23 -r1.23.28.1 \ src/sys/compat/linux/arch/powerpc/linux_ptrace.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/arch/arm/linux_ptrace.c diff -u src/sys/compat/linux/arch/arm/linux_ptrace.c:1.16 src/sys/compat/linux/arch/arm/linux_ptrace.c:1.16.20.1 --- src/sys/compat/linux/arch/arm/linux_ptrace.c:1.16 Wed Jul 7 01:30:33 2010 +++ src/sys/compat/linux/arch/arm/linux_ptrace.c Sun Nov 15 20:42:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.16 2010/07/07 01:30:33 chs Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.16.20.1 2015/11/15 20:42:39 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.16 2010/07/07 01:30:33 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.16.20.1 2015/11/15 20:42:39 bouyer Exp $"); #include #include @@ -140,7 +140,6 @@ linux_sys_ptrace_arch(struct lwp *l, con goto out; } mutex_enter(t->p_lock); - mutex_exit(proc_lock); /* * You cannot do what you want to the process if: @@ -148,6 +147,7 @@ linux_sys_ptrace_arch(struct lwp *l, con */ if (!ISSET(t->p_slflag, PSL_TRACED)) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EPERM; goto out; } @@ -160,9 +160,11 @@ linux_sys_ptrace_arch(struct lwp *l, con if (ISSET(t->p_slflag, PSL_FSTRACE) || t->p_pptr != p || t->p_stat != SSTOP || !t->p_waited) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EBUSY; goto out; } + mutex_exit(proc_lock); /* XXX: ptrace needs revamp for multi-threading support. */ if (t->p_nlwps > 1) { mutex_exit(t->p_lock); Index: src/sys/compat/linux/arch/i386/linux_ptrace.c diff -u src/sys/compat/linux/arch/i386/linux_ptrace.c:1.26 src/sys/compat/linux/arch/i386/linux_ptrace.c:1.26.28.1 --- src/sys/compat/linux/arch/i386/linux_ptrace.c:1.26 Wed Jul 7 01:30:34 2010 +++ src/sys/compat/linux/arch/i386/linux_ptrace.c Sun Nov 15 20:42:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.26 2010/07/07 01:30:34 chs Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.26.28.1 2015/11/15 20:42:39 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.26 2010/07/07 01:30:34 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.26.28.1 2015/11/15 20:42:39 bouyer Exp $"); #include #include @@ -184,7 +184,6 @@ linux_sys_ptrace_arch(struct lwp *l, con return ESRCH; } mutex_enter(t->p_lock); - mutex_exit(proc_lock); /* * You cannot do what you want to the process if: @@ -192,6 +191,7 @@ linux_sys_ptrace_arch(struct lwp *l, con */ if (!ISSET(t->p_slflag, PSL_TRACED)) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EPERM; goto out; } @@ -204,9 +204,11 @@ linux_sys_ptrace_arch(struct lwp *l, con if (ISSET(t->p_slflag, PSL_FSTRACE) || t->p_pptr != p || t->p_stat != SSTOP || !t->p_waited) { mutex_exit(t->p_lock); + mutex_exit(proc_lock); error = EBUSY; goto out; } + mutex_exit(proc_lock); /* XXX: ptrace needs revamp for multi-threading support. */ if (t->p_nlwps > 1) { mutex_exit(t->p_lock); Index: src/sys/compat/linux/arch/powerpc/linux_ptrace.c diff -u src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.23 src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.23.28.1 --- src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.23 Thu Jul 1 02:38:28 2010 +++ src/sys/compat/linux/arch/powerpc/linux_ptrace.c Sun Nov 15 20:42:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ptrace.c,v 1.23 2010/07/01 02:38:28 rmind Exp $ */ +/* $NetBSD: linux_ptrace.c,v 1.23.28.1 2015/11/15 20:42:39 bouyer Exp $ */ /*- * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.23 2010/07/01 02:38:28 rmind Exp $"); +__KERNEL_RCSID(0, "$NetB
CVS commit: [netbsd-6-0] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:44:10 UTC 2015 Modified Files: src/sys/kern [netbsd-6-0]: kern_exit.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1336): sys/kern/kern_exit.c: revision 1.248 Update value of p_stat before we release the proc_lock. Thanks to Robert Elz. XXX Pull-ups for -7, -6{,-0,-1} and -5{,-0,-1,-2} To generate a diff of this commit: cvs rdiff -u -r1.236.2.2.2.1 -r1.236.2.2.2.2 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.236.2.2.2.1 src/sys/kern/kern_exit.c:1.236.2.2.2.2 --- src/sys/kern/kern_exit.c:1.236.2.2.2.1 Sun Nov 15 20:38:01 2015 +++ src/sys/kern/kern_exit.c Sun Nov 15 20:44:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.236.2.2.2.1 2015/11/15 20:38:01 bouyer Exp $ */ +/* $NetBSD: kern_exit.c,v 1.236.2.2.2.2 2015/11/15 20:44:10 bouyer 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.236.2.2.2.1 2015/11/15 20:38:01 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.236.2.2.2.2 2015/11/15 20:44:10 bouyer Exp $"); #include "opt_ktrace.h" #include "opt_perfctrs.h" @@ -248,8 +248,8 @@ exit1(struct lwp *l, int rv) } p->p_waited = 0; p->p_pptr->p_nstopchild++; - mutex_exit(proc_lock); p->p_stat = SSTOP; + mutex_exit(proc_lock); lwp_lock(l); p->p_nrlwps--; l->l_stat = LSSTOP;
CVS commit: [netbsd-6] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:44:10 UTC 2015 Modified Files: src/sys/kern [netbsd-6]: kern_exit.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1336): sys/kern/kern_exit.c: revision 1.248 Update value of p_stat before we release the proc_lock. Thanks to Robert Elz. XXX Pull-ups for -7, -6{,-0,-1} and -5{,-0,-1,-2} To generate a diff of this commit: cvs rdiff -u -r1.236.2.4 -r1.236.2.5 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.236.2.4 src/sys/kern/kern_exit.c:1.236.2.5 --- src/sys/kern/kern_exit.c:1.236.2.4 Sun Nov 15 20:37:04 2015 +++ src/sys/kern/kern_exit.c Sun Nov 15 20:44:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.236.2.4 2015/11/15 20:37:04 bouyer Exp $ */ +/* $NetBSD: kern_exit.c,v 1.236.2.5 2015/11/15 20:44:10 bouyer 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.236.2.4 2015/11/15 20:37:04 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.236.2.5 2015/11/15 20:44:10 bouyer Exp $"); #include "opt_ktrace.h" #include "opt_perfctrs.h" @@ -248,8 +248,8 @@ exit1(struct lwp *l, int rv) } p->p_waited = 0; p->p_pptr->p_nstopchild++; - mutex_exit(proc_lock); p->p_stat = SSTOP; + mutex_exit(proc_lock); lwp_lock(l); p->p_nrlwps--; l->l_stat = LSSTOP;
CVS commit: [netbsd-6-1] src/sys/kern
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:44:13 UTC 2015 Modified Files: src/sys/kern [netbsd-6-1]: kern_exit.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1336): sys/kern/kern_exit.c: revision 1.248 Update value of p_stat before we release the proc_lock. Thanks to Robert Elz. XXX Pull-ups for -7, -6{,-0,-1} and -5{,-0,-1,-2} To generate a diff of this commit: cvs rdiff -u -r1.236.2.2.4.1 -r1.236.2.2.4.2 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.236.2.2.4.1 src/sys/kern/kern_exit.c:1.236.2.2.4.2 --- src/sys/kern/kern_exit.c:1.236.2.2.4.1 Sun Nov 15 20:38:18 2015 +++ src/sys/kern/kern_exit.c Sun Nov 15 20:44:13 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.236.2.2.4.1 2015/11/15 20:38:18 bouyer Exp $ */ +/* $NetBSD: kern_exit.c,v 1.236.2.2.4.2 2015/11/15 20:44:13 bouyer 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.236.2.2.4.1 2015/11/15 20:38:18 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.236.2.2.4.2 2015/11/15 20:44:13 bouyer Exp $"); #include "opt_ktrace.h" #include "opt_perfctrs.h" @@ -248,8 +248,8 @@ exit1(struct lwp *l, int rv) } p->p_waited = 0; p->p_pptr->p_nstopchild++; - mutex_exit(proc_lock); p->p_stat = SSTOP; + mutex_exit(proc_lock); lwp_lock(l); p->p_nrlwps--; l->l_stat = LSSTOP;
CVS commit: [netbsd-6] src/lib/libcurses
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:47:11 UTC 2015 Modified Files: src/lib/libcurses [netbsd-6]: toucholap.c Log Message: Pull up following revision(s) (requested by uwe in ticket #1337): lib/libcurses/toucholap.c: revision 1.16 Fix x/y edito. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.36.1 src/lib/libcurses/toucholap.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/toucholap.c diff -u src/lib/libcurses/toucholap.c:1.15 src/lib/libcurses/toucholap.c:1.15.36.1 --- src/lib/libcurses/toucholap.c:1.15 Sun Jan 21 13:25:36 2007 +++ src/lib/libcurses/toucholap.c Sun Nov 15 20:47:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: toucholap.c,v 1.15 2007/01/21 13:25:36 jdc Exp $ */ +/* $NetBSD: toucholap.c,v 1.15.36.1 2015/11/15 20:47:11 bouyer Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)toucholap.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: toucholap.c,v 1.15 2007/01/21 13:25:36 jdc Exp $"); +__RCSID("$NetBSD: toucholap.c,v 1.15.36.1 2015/11/15 20:47:11 bouyer Exp $"); #endif #endif/* not lint */ @@ -55,7 +55,7 @@ touchoverlap(WINDOW *win1, WINDOW *win2) #endif starty = max(win1->begy, win2->begy); startx = max(win1->begx, win2->begx); - endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx); + endy = min(win1->maxy + win1->begy, win2->maxy + win2->begy); endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx); #ifdef DEBUG __CTRACE(__CTRACE_WINDOW, "touchoverlap: from (%d,%d) to (%d,%d)\n",
CVS commit: [netbsd-6-0] src/sys/compat/osf1
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:48:44 UTC 2015 Modified Files: src/sys/compat/osf1 [netbsd-6-0]: osf1_socket.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1338): sys/compat/osf1/osf1_socket.c: revision 1.21 easy kmem_alloc(0) ok shm@ To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.20.20.1 src/sys/compat/osf1/osf1_socket.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/osf1/osf1_socket.c diff -u src/sys/compat/osf1/osf1_socket.c:1.20 src/sys/compat/osf1/osf1_socket.c:1.20.20.1 --- src/sys/compat/osf1/osf1_socket.c:1.20 Fri Apr 23 15:19:21 2010 +++ src/sys/compat/osf1/osf1_socket.c Sun Nov 15 20:48:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $ */ +/* $NetBSD: osf1_socket.c,v 1.20.20.1 2015/11/15 20:48:44 bouyer Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.20.20.1 2015/11/15 20:48:44 bouyer Exp $"); #include #include @@ -116,7 +116,7 @@ osf1_sys_sendmsg_xopen(struct lwp *l, co return (EINVAL); iov_len = bsd_msghdr.msg_iovlen; - if (iov_len > IOV_MAX) + if ((iov_len > IOV_MAX) || (iov_len == 0)) return EMSGSIZE; bsd_iovec = kmem_alloc(iov_len * sizeof(struct iovec), KM_SLEEP); bsd_msghdr.msg_iov = bsd_iovec;
CVS commit: [netbsd-6] src/sys/compat/osf1
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:48:49 UTC 2015 Modified Files: src/sys/compat/osf1 [netbsd-6]: osf1_socket.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1338): sys/compat/osf1/osf1_socket.c: revision 1.21 easy kmem_alloc(0) ok shm@ To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.20.14.1 src/sys/compat/osf1/osf1_socket.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/osf1/osf1_socket.c diff -u src/sys/compat/osf1/osf1_socket.c:1.20 src/sys/compat/osf1/osf1_socket.c:1.20.14.1 --- src/sys/compat/osf1/osf1_socket.c:1.20 Fri Apr 23 15:19:21 2010 +++ src/sys/compat/osf1/osf1_socket.c Sun Nov 15 20:48:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $ */ +/* $NetBSD: osf1_socket.c,v 1.20.14.1 2015/11/15 20:48:49 bouyer Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.20.14.1 2015/11/15 20:48:49 bouyer Exp $"); #include #include @@ -116,7 +116,7 @@ osf1_sys_sendmsg_xopen(struct lwp *l, co return (EINVAL); iov_len = bsd_msghdr.msg_iovlen; - if (iov_len > IOV_MAX) + if ((iov_len > IOV_MAX) || (iov_len == 0)) return EMSGSIZE; bsd_iovec = kmem_alloc(iov_len * sizeof(struct iovec), KM_SLEEP); bsd_msghdr.msg_iov = bsd_iovec;
CVS commit: [netbsd-6-1] src/sys/compat/osf1
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:48:45 UTC 2015 Modified Files: src/sys/compat/osf1 [netbsd-6-1]: osf1_socket.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1338): sys/compat/osf1/osf1_socket.c: revision 1.21 easy kmem_alloc(0) ok shm@ To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.20.28.1 src/sys/compat/osf1/osf1_socket.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/osf1/osf1_socket.c diff -u src/sys/compat/osf1/osf1_socket.c:1.20 src/sys/compat/osf1/osf1_socket.c:1.20.28.1 --- src/sys/compat/osf1/osf1_socket.c:1.20 Fri Apr 23 15:19:21 2010 +++ src/sys/compat/osf1/osf1_socket.c Sun Nov 15 20:48:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $ */ +/* $NetBSD: osf1_socket.c,v 1.20.28.1 2015/11/15 20:48:45 bouyer Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.20.28.1 2015/11/15 20:48:45 bouyer Exp $"); #include #include @@ -116,7 +116,7 @@ osf1_sys_sendmsg_xopen(struct lwp *l, co return (EINVAL); iov_len = bsd_msghdr.msg_iovlen; - if (iov_len > IOV_MAX) + if ((iov_len > IOV_MAX) || (iov_len == 0)) return EMSGSIZE; bsd_iovec = kmem_alloc(iov_len * sizeof(struct iovec), KM_SLEEP); bsd_msghdr.msg_iov = bsd_iovec;
CVS commit: [netbsd-6] src/sys/arch/x86/x86
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:52:03 UTC 2015 Modified Files: src/sys/arch/x86/x86 [netbsd-6]: bus_dma.c Log Message: Pull up following revision(s) (requested by christos in ticket #1339): sys/arch/x86/x86/bus_dma.c: revision 1.72 sys/arch/x86/x86/bus_dma.c: revision 1.73 sys/arch/x86/x86/bus_dma.c: revision 1.74 - If we succeeded allocating a buffer that did not need bouncing before, but the buffer in the previous mapping did, clear the bounce bit. Fixes the ld_virtio.c bug with machines 8GB and dd if=/dev/zero of=crash bs=1g count=4. - Allocate with M_ZERO instead of doing memset - The panic string can take a format, use it. - When checking for the bounce buffer boundary check addr + len < limit, not addr < limit. make sure we have a cookie before we try to clear it. fix operator precedence. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.68.8.1 src/sys/arch/x86/x86/bus_dma.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/x86/x86/bus_dma.c diff -u src/sys/arch/x86/x86/bus_dma.c:1.68 src/sys/arch/x86/x86/bus_dma.c:1.68.8.1 --- src/sys/arch/x86/x86/bus_dma.c:1.68 Fri Oct 14 18:28:04 2011 +++ src/sys/arch/x86/x86/bus_dma.c Sun Nov 15 20:52:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.68 2011/10/14 18:28:04 bouyer Exp $ */ +/* $NetBSD: bus_dma.c,v 1.68.8.1 2015/11/15 20:52:03 bouyer Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.68 2011/10/14 18:28:04 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.68.8.1 2015/11/15 20:52:03 bouyer Exp $"); /* * The following is included because _bus_dma_uiomove is derived from @@ -283,11 +283,10 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ error = 0; mapsize = sizeof(struct x86_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); - if ((mapstore = malloc(mapsize, M_DMAMAP, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) + if ((mapstore = malloc(mapsize, M_DMAMAP, M_ZERO | + ((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) return (ENOMEM); - memset(mapstore, 0, mapsize); map = (struct x86_bus_dmamap *)mapstore; map->_dm_size = size; map->_dm_segcnt = nsegments; @@ -323,12 +322,11 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ /* * Allocate our cookie. */ - if ((cookiestore = malloc(cookiesize, M_DMAMAP, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) { + if ((cookiestore = malloc(cookiesize, M_DMAMAP, M_ZERO | + ((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) { error = ENOMEM; goto out; } - memset(cookiestore, 0, cookiesize); cookie = (struct x86_bus_dma_cookie *)cookiestore; cookie->id_flags = cookieflags; map->_dm_cookie = cookie; @@ -391,6 +389,8 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm } error = _bus_dmamap_load_buffer(t, map, buf, buflen, vm, flags); if (error == 0) { + if (cookie != NULL) + cookie->id_flags &= ~X86_DMA_IS_BOUNCING; map->dm_mapsize = buflen; return 0; } @@ -789,7 +789,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm */ if ((ops & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)) != 0 && (ops & (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)) != 0) - panic("_bus_dmamap_sync: mix PRE and POST"); + panic("%s: mix PRE and POST", __func__); #ifdef DIAGNOSTIC if ((ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0) { @@ -916,16 +916,17 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm } case X86_DMA_BUFTYPE_RAW: - panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_RAW"); + panic("%s: X86_DMA_BUFTYPE_RAW", __func__); break; case X86_DMA_BUFTYPE_INVALID: - panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_INVALID"); + panic("%s: X86_DMA_BUFTYPE_INVALID", __func__); break; default: - printf("unknown buffer type %d\n", cookie->id_buftype); - panic("_bus_dmamap_sync"); + panic("%s: unknown buffer type %d", __func__, + cookie->id_buftype); + break; } end: if (ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTWRITE)) { @@ -1233,19 +1234,20 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, curaddr = _BUS_VIRT_TO_BUS(pmap, vaddr); /* + * Compute the segment size, and adjust counts. + */ + sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET); + if (buflen < sgsize) + sgsize = buflen; + + /* * If we're beyond the bounce threshold, notify * the caller. */ if (map->_dm_bounce_thresh != 0 && - curaddr >= map->_dm_bounce_thresh) + curaddr + sgsize >= map->_dm_bounce_thresh) return (EINVAL); - /* - * Compute the segment size, and adjust counts. - */ - sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET); - if (buflen < sgsize) - sgsize = buflen; error = _bus_dmamap_load_busaddr(t, map, curaddr, sgsize); if (error)
CVS commit: [netbsd-6-0] src/sys/arch/x86/x86
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:52:09 UTC 2015 Modified Files: src/sys/arch/x86/x86 [netbsd-6-0]: bus_dma.c Log Message: Pull up following revision(s) (requested by christos in ticket #1339): sys/arch/x86/x86/bus_dma.c: revision 1.72 sys/arch/x86/x86/bus_dma.c: revision 1.73 sys/arch/x86/x86/bus_dma.c: revision 1.74 - If we succeeded allocating a buffer that did not need bouncing before, but the buffer in the previous mapping did, clear the bounce bit. Fixes the ld_virtio.c bug with machines 8GB and dd if=/dev/zero of=crash bs=1g count=4. - Allocate with M_ZERO instead of doing memset - The panic string can take a format, use it. - When checking for the bounce buffer boundary check addr + len < limit, not addr < limit. make sure we have a cookie before we try to clear it. fix operator precedence. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.68.14.1 src/sys/arch/x86/x86/bus_dma.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/x86/x86/bus_dma.c diff -u src/sys/arch/x86/x86/bus_dma.c:1.68 src/sys/arch/x86/x86/bus_dma.c:1.68.14.1 --- src/sys/arch/x86/x86/bus_dma.c:1.68 Fri Oct 14 18:28:04 2011 +++ src/sys/arch/x86/x86/bus_dma.c Sun Nov 15 20:52:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.68 2011/10/14 18:28:04 bouyer Exp $ */ +/* $NetBSD: bus_dma.c,v 1.68.14.1 2015/11/15 20:52:09 bouyer Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.68 2011/10/14 18:28:04 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.68.14.1 2015/11/15 20:52:09 bouyer Exp $"); /* * The following is included because _bus_dma_uiomove is derived from @@ -283,11 +283,10 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ error = 0; mapsize = sizeof(struct x86_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); - if ((mapstore = malloc(mapsize, M_DMAMAP, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) + if ((mapstore = malloc(mapsize, M_DMAMAP, M_ZERO | + ((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) return (ENOMEM); - memset(mapstore, 0, mapsize); map = (struct x86_bus_dmamap *)mapstore; map->_dm_size = size; map->_dm_segcnt = nsegments; @@ -323,12 +322,11 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ /* * Allocate our cookie. */ - if ((cookiestore = malloc(cookiesize, M_DMAMAP, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) { + if ((cookiestore = malloc(cookiesize, M_DMAMAP, M_ZERO | + ((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) { error = ENOMEM; goto out; } - memset(cookiestore, 0, cookiesize); cookie = (struct x86_bus_dma_cookie *)cookiestore; cookie->id_flags = cookieflags; map->_dm_cookie = cookie; @@ -391,6 +389,8 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm } error = _bus_dmamap_load_buffer(t, map, buf, buflen, vm, flags); if (error == 0) { + if (cookie != NULL) + cookie->id_flags &= ~X86_DMA_IS_BOUNCING; map->dm_mapsize = buflen; return 0; } @@ -789,7 +789,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm */ if ((ops & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)) != 0 && (ops & (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)) != 0) - panic("_bus_dmamap_sync: mix PRE and POST"); + panic("%s: mix PRE and POST", __func__); #ifdef DIAGNOSTIC if ((ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0) { @@ -916,16 +916,17 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm } case X86_DMA_BUFTYPE_RAW: - panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_RAW"); + panic("%s: X86_DMA_BUFTYPE_RAW", __func__); break; case X86_DMA_BUFTYPE_INVALID: - panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_INVALID"); + panic("%s: X86_DMA_BUFTYPE_INVALID", __func__); break; default: - printf("unknown buffer type %d\n", cookie->id_buftype); - panic("_bus_dmamap_sync"); + panic("%s: unknown buffer type %d", __func__, + cookie->id_buftype); + break; } end: if (ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTWRITE)) { @@ -1233,19 +1234,20 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, curaddr = _BUS_VIRT_TO_BUS(pmap, vaddr); /* + * Compute the segment size, and adjust counts. + */ + sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET); + if (buflen < sgsize) + sgsize = buflen; + + /* * If we're beyond the bounce threshold, notify * the caller. */ if (map->_dm_bounce_thresh != 0 && - curaddr >= map->_dm_bounce_thresh) + curaddr + sgsize >= map->_dm_bounce_thresh) return (EINVAL); - /* - * Compute the segment size, and adjust counts. - */ - sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET); - if (buflen < sgsize) - sgsize = buflen; error = _bus_dmamap_load_busaddr(t, map, curaddr, sgsize); if (error)
CVS commit: [netbsd-6-1] src/sys/arch/x86/x86
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:52:15 UTC 2015 Modified Files: src/sys/arch/x86/x86 [netbsd-6-1]: bus_dma.c Log Message: Pull up following revision(s) (requested by christos in ticket #1339): sys/arch/x86/x86/bus_dma.c: revision 1.72 sys/arch/x86/x86/bus_dma.c: revision 1.73 sys/arch/x86/x86/bus_dma.c: revision 1.74 - If we succeeded allocating a buffer that did not need bouncing before, but the buffer in the previous mapping did, clear the bounce bit. Fixes the ld_virtio.c bug with machines 8GB and dd if=/dev/zero of=crash bs=1g count=4. - Allocate with M_ZERO instead of doing memset - The panic string can take a format, use it. - When checking for the bounce buffer boundary check addr + len < limit, not addr < limit. make sure we have a cookie before we try to clear it. fix operator precedence. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.68.16.1 src/sys/arch/x86/x86/bus_dma.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/x86/x86/bus_dma.c diff -u src/sys/arch/x86/x86/bus_dma.c:1.68 src/sys/arch/x86/x86/bus_dma.c:1.68.16.1 --- src/sys/arch/x86/x86/bus_dma.c:1.68 Fri Oct 14 18:28:04 2011 +++ src/sys/arch/x86/x86/bus_dma.c Sun Nov 15 20:52:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.68 2011/10/14 18:28:04 bouyer Exp $ */ +/* $NetBSD: bus_dma.c,v 1.68.16.1 2015/11/15 20:52:15 bouyer Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.68 2011/10/14 18:28:04 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.68.16.1 2015/11/15 20:52:15 bouyer Exp $"); /* * The following is included because _bus_dma_uiomove is derived from @@ -283,11 +283,10 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ error = 0; mapsize = sizeof(struct x86_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); - if ((mapstore = malloc(mapsize, M_DMAMAP, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) + if ((mapstore = malloc(mapsize, M_DMAMAP, M_ZERO | + ((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) return (ENOMEM); - memset(mapstore, 0, mapsize); map = (struct x86_bus_dmamap *)mapstore; map->_dm_size = size; map->_dm_segcnt = nsegments; @@ -323,12 +322,11 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ /* * Allocate our cookie. */ - if ((cookiestore = malloc(cookiesize, M_DMAMAP, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) { + if ((cookiestore = malloc(cookiesize, M_DMAMAP, M_ZERO | + ((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) { error = ENOMEM; goto out; } - memset(cookiestore, 0, cookiesize); cookie = (struct x86_bus_dma_cookie *)cookiestore; cookie->id_flags = cookieflags; map->_dm_cookie = cookie; @@ -391,6 +389,8 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm } error = _bus_dmamap_load_buffer(t, map, buf, buflen, vm, flags); if (error == 0) { + if (cookie != NULL) + cookie->id_flags &= ~X86_DMA_IS_BOUNCING; map->dm_mapsize = buflen; return 0; } @@ -789,7 +789,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm */ if ((ops & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)) != 0 && (ops & (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)) != 0) - panic("_bus_dmamap_sync: mix PRE and POST"); + panic("%s: mix PRE and POST", __func__); #ifdef DIAGNOSTIC if ((ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0) { @@ -916,16 +916,17 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm } case X86_DMA_BUFTYPE_RAW: - panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_RAW"); + panic("%s: X86_DMA_BUFTYPE_RAW", __func__); break; case X86_DMA_BUFTYPE_INVALID: - panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_INVALID"); + panic("%s: X86_DMA_BUFTYPE_INVALID", __func__); break; default: - printf("unknown buffer type %d\n", cookie->id_buftype); - panic("_bus_dmamap_sync"); + panic("%s: unknown buffer type %d", __func__, + cookie->id_buftype); + break; } end: if (ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTWRITE)) { @@ -1233,19 +1234,20 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, curaddr = _BUS_VIRT_TO_BUS(pmap, vaddr); /* + * Compute the segment size, and adjust counts. + */ + sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET); + if (buflen < sgsize) + sgsize = buflen; + + /* * If we're beyond the bounce threshold, notify * the caller. */ if (map->_dm_bounce_thresh != 0 && - curaddr >= map->_dm_bounce_thresh) + curaddr + sgsize >= map->_dm_bounce_thresh) return (EINVAL); - /* - * Compute the segment size, and adjust counts. - */ - sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET); - if (buflen < sgsize) - sgsize = buflen; error = _bus_dmamap_load_busaddr(t, map, curaddr, sgsize); if (error)
CVS commit: [netbsd-6-1] src/sys/arch/x86/x86
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:57:11 UTC 2015 Modified Files: src/sys/arch/x86/x86 [netbsd-6-1]: sys_machdep.c Log Message: Pull up following revision(s) (requested by christos in ticket #1341): sys/arch/x86/x86/sys_machdep.c: revision 1.29 fix broken error handling; error was used uninitialized. Changing the compilation flags broke all threaded programs for me. XXX: pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.25.16.1 src/sys/arch/x86/x86/sys_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/x86/x86/sys_machdep.c diff -u src/sys/arch/x86/x86/sys_machdep.c:1.25 src/sys/arch/x86/x86/sys_machdep.c:1.25.16.1 --- src/sys/arch/x86/x86/sys_machdep.c:1.25 Mon Oct 10 15:15:28 2011 +++ src/sys/arch/x86/x86/sys_machdep.c Sun Nov 15 20:57:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_machdep.c,v 1.25 2011/10/10 15:15:28 jakllsch Exp $ */ +/* $NetBSD: sys_machdep.c,v 1.25.16.1 2015/11/15 20:57:11 bouyer Exp $ */ /*- * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.25 2011/10/10 15:15:28 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.25.16.1 2015/11/15 20:57:11 bouyer Exp $"); #include "opt_mtrr.h" #include "opt_perfctrs.h" @@ -657,7 +657,6 @@ x86_set_sdbase(void *arg, char which, lw #else struct pcb *pcb; vaddr_t base; - int error; if (l->l_proc->p_flag & PK_32) { return x86_set_sdbase32(arg, which, l, direct); @@ -666,7 +665,7 @@ x86_set_sdbase(void *arg, char which, lw if (direct) { base = (vaddr_t)arg; } else { - error = copyin(arg, &base, sizeof(base)); + int error = copyin(arg, &base, sizeof(base)); if (error != 0) return error; } @@ -674,10 +673,6 @@ x86_set_sdbase(void *arg, char which, lw if (base >= VM_MAXUSER_ADDRESS) return EINVAL; - if (error) { - return error; - } - pcb = lwp_getpcb(l); kpreempt_disable(); @@ -697,7 +692,7 @@ x86_set_sdbase(void *arg, char which, lw } kpreempt_enable(); - return error; + return 0; #endif }
CVS commit: [netbsd-6] src/sys/arch/x86/x86
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:57:03 UTC 2015 Modified Files: src/sys/arch/x86/x86 [netbsd-6]: sys_machdep.c Log Message: Pull up following revision(s) (requested by christos in ticket #1341): sys/arch/x86/x86/sys_machdep.c: revision 1.29 fix broken error handling; error was used uninitialized. Changing the compilation flags broke all threaded programs for me. XXX: pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.25.8.1 src/sys/arch/x86/x86/sys_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/x86/x86/sys_machdep.c diff -u src/sys/arch/x86/x86/sys_machdep.c:1.25 src/sys/arch/x86/x86/sys_machdep.c:1.25.8.1 --- src/sys/arch/x86/x86/sys_machdep.c:1.25 Mon Oct 10 15:15:28 2011 +++ src/sys/arch/x86/x86/sys_machdep.c Sun Nov 15 20:57:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_machdep.c,v 1.25 2011/10/10 15:15:28 jakllsch Exp $ */ +/* $NetBSD: sys_machdep.c,v 1.25.8.1 2015/11/15 20:57:03 bouyer Exp $ */ /*- * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.25 2011/10/10 15:15:28 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.25.8.1 2015/11/15 20:57:03 bouyer Exp $"); #include "opt_mtrr.h" #include "opt_perfctrs.h" @@ -657,7 +657,6 @@ x86_set_sdbase(void *arg, char which, lw #else struct pcb *pcb; vaddr_t base; - int error; if (l->l_proc->p_flag & PK_32) { return x86_set_sdbase32(arg, which, l, direct); @@ -666,7 +665,7 @@ x86_set_sdbase(void *arg, char which, lw if (direct) { base = (vaddr_t)arg; } else { - error = copyin(arg, &base, sizeof(base)); + int error = copyin(arg, &base, sizeof(base)); if (error != 0) return error; } @@ -674,10 +673,6 @@ x86_set_sdbase(void *arg, char which, lw if (base >= VM_MAXUSER_ADDRESS) return EINVAL; - if (error) { - return error; - } - pcb = lwp_getpcb(l); kpreempt_disable(); @@ -697,7 +692,7 @@ x86_set_sdbase(void *arg, char which, lw } kpreempt_enable(); - return error; + return 0; #endif }
CVS commit: [netbsd-6-0] src/sys/arch/x86/x86
Module Name:src Committed By: bouyer Date: Sun Nov 15 20:57:08 UTC 2015 Modified Files: src/sys/arch/x86/x86 [netbsd-6-0]: sys_machdep.c Log Message: Pull up following revision(s) (requested by christos in ticket #1341): sys/arch/x86/x86/sys_machdep.c: revision 1.29 fix broken error handling; error was used uninitialized. Changing the compilation flags broke all threaded programs for me. XXX: pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.25.14.1 src/sys/arch/x86/x86/sys_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/x86/x86/sys_machdep.c diff -u src/sys/arch/x86/x86/sys_machdep.c:1.25 src/sys/arch/x86/x86/sys_machdep.c:1.25.14.1 --- src/sys/arch/x86/x86/sys_machdep.c:1.25 Mon Oct 10 15:15:28 2011 +++ src/sys/arch/x86/x86/sys_machdep.c Sun Nov 15 20:57:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_machdep.c,v 1.25 2011/10/10 15:15:28 jakllsch Exp $ */ +/* $NetBSD: sys_machdep.c,v 1.25.14.1 2015/11/15 20:57:08 bouyer Exp $ */ /*- * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.25 2011/10/10 15:15:28 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.25.14.1 2015/11/15 20:57:08 bouyer Exp $"); #include "opt_mtrr.h" #include "opt_perfctrs.h" @@ -657,7 +657,6 @@ x86_set_sdbase(void *arg, char which, lw #else struct pcb *pcb; vaddr_t base; - int error; if (l->l_proc->p_flag & PK_32) { return x86_set_sdbase32(arg, which, l, direct); @@ -666,7 +665,7 @@ x86_set_sdbase(void *arg, char which, lw if (direct) { base = (vaddr_t)arg; } else { - error = copyin(arg, &base, sizeof(base)); + int error = copyin(arg, &base, sizeof(base)); if (error != 0) return error; } @@ -674,10 +673,6 @@ x86_set_sdbase(void *arg, char which, lw if (base >= VM_MAXUSER_ADDRESS) return EINVAL; - if (error) { - return error; - } - pcb = lwp_getpcb(l); kpreempt_disable(); @@ -697,7 +692,7 @@ x86_set_sdbase(void *arg, char which, lw } kpreempt_enable(); - return error; + return 0; #endif }
CVS commit: [netbsd-6] src/sys/arch/sparc64/sparc64
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:02:13 UTC 2015 Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6]: locore.s netbsd32_machdep.c vm_machdep.c Log Message: Pull up following revision(s) (requested by martin in ticket #1343): sys/arch/sparc64/sparc64/locore.s: revision 1.386 sys/arch/sparc64/sparc64/vm_machdep.c: revision 1.101 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.105 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.106 Basically revert r1.246 of locore.s and r1.73 of vm_machdep.c: Remove special case handling for userland lwps from cpu_lwp_fork, instead do it in lwp_trampoline when we first return to userland. which was a stupid idea - since we did now set all fork child's %tstate (and thus %pstate when back in userland) to the current kernel's userland default. This meant we lost the address mask bit for 32bit processes and all memory model details for 64bit ones. Move it back to cpu_lwp_fork and fix the condition to only do it once when forking init. Fix kmem_free() size mismatch Convert siginfo to 32bit version before copying it out to 32bit userland. To generate a diff of this commit: cvs rdiff -u -r1.338.8.6 -r1.338.8.7 src/sys/arch/sparc64/sparc64/locore.s cvs rdiff -u -r1.96.2.1 -r1.96.2.2 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c cvs rdiff -u -r1.98 -r1.98.8.1 src/sys/arch/sparc64/sparc64/vm_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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.338.8.6 src/sys/arch/sparc64/sparc64/locore.s:1.338.8.7 --- src/sys/arch/sparc64/sparc64/locore.s:1.338.8.6 Tue Mar 24 08:51:14 2015 +++ src/sys/arch/sparc64/sparc64/locore.s Sun Nov 15 21:02:13 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.338.8.6 2015/03/24 08:51:14 snj Exp $ */ +/* $NetBSD: locore.s,v 1.338.8.7 2015/11/15 21:02:13 bouyer Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -5368,12 +5368,6 @@ ENTRY(lwp_trampoline) mov %l1, %o0 /* - * Going to userland - set proper tstate in trap frame - */ - set (ASI_PRIMARY_NO_FAULT< -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.96.2.1 2012/05/21 15:25:56 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.96.2.2 2015/11/15 21:02:13 bouyer Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -322,6 +322,7 @@ netbsd32_sendsig_siginfo(const ksiginfo_ int sig = ksi->ksi_signo; ucontext32_t uc; struct sparc32_sigframe_siginfo *fp; + siginfo32_t si32; netbsd32_intptr_t catcher; struct trapframe64 *tf = l->l_md.md_tf; struct rwindow32 *oldsp, *newsp; @@ -342,15 +343,16 @@ netbsd32_sendsig_siginfo(const ksiginfo_ else fp = (struct sparc32_sigframe_siginfo *)oldsp; fp = (struct sparc32_sigframe_siginfo*)((u_long)(fp - 1) & ~7); + /* * Build the signal context to be used by sigreturn. */ + memset(&uc, 0, sizeof uc); uc.uc_flags = _UC_SIGMASK | ((l->l_sigstk.ss_flags & SS_ONSTACK) ? _UC_SETSTACK : _UC_CLRSTACK); uc.uc_sigmask = *mask; uc.uc_link = (uint32_t)(uintptr_t)l->l_ctxlink; - memset(&uc.uc_stack, 0, sizeof(uc.uc_stack)); sendsig_reset(l, sig); @@ -365,9 +367,10 @@ netbsd32_sendsig_siginfo(const ksiginfo_ */ mutex_exit(p->p_lock); cpu_getmcontext32(l, &uc.uc_mcontext, &uc.uc_flags); + netbsd32_si_to_si32(&si32, (const siginfo_t *)&ksi->ksi_info); ucsz = (int)(intptr_t)&uc.__uc_pad - (int)(intptr_t)&uc; newsp = (struct rwindow32*)((intptr_t)fp - sizeof(struct frame32)); - error = (copyout(&ksi->ksi_info, &fp->sf_si, sizeof ksi->ksi_info) || + error = (copyout(&si32, &fp->sf_si, sizeof si32) || copyout(&uc, &fp->sf_uc, ucsz) || suword(&newsp->rw_in[6], (intptr_t)oldsp)); mutex_enter(p->p_lock); @@ -1367,7 +1370,8 @@ startlwp32(void *arg) error = cpu_setmcontext32(l, &uc->uc_mcontext, uc->uc_flags); KASSERT(error == 0); - kmem_free(uc, sizeof(ucontext32_t)); + /* Note: we are freeing ucontext_t, not ucontext32_t. */ + kmem_free(arg, sizeof(ucontext_t)); userret(l, 0, 0); } Index: src/sys/arch/sparc64/sparc64/vm_machdep.c diff -u src/sys/arch/sparc64/sparc64/vm_machdep.c:1.98 src/sys/arch/sparc64/sparc64/vm_machdep.c:1.98.8.1 --- src/sys/arch/sparc64/sparc64/vm_machdep.c:1.98 Sat Oct 8 08:49:07 2011 +++ src/sys/arch/sparc64/sparc64/vm_machdep.c Sun Nov 15 21:02:13 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.98 2011/10/08 08:49:07 nakayama Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.98.8.1 2015/11/15 21:02:13 bouyer Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.98 2011/10/08 08:49:07 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.98.8.1 2015/11/15 21:02:13 bouyer Exp $"); #include "opt_multiprocessor.h" @@ -263,6
CVS commit: [netbsd-6-0] src/sys/arch/sparc64/sparc64
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:01:52 UTC 2015 Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6-0]: locore.s netbsd32_machdep.c vm_machdep.c Log Message: Pull up following revision(s) (requested by martin in ticket #1343): sys/arch/sparc64/sparc64/locore.s: revision 1.386 sys/arch/sparc64/sparc64/vm_machdep.c: revision 1.101 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.105 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.106 Basically revert r1.246 of locore.s and r1.73 of vm_machdep.c: Remove special case handling for userland lwps from cpu_lwp_fork, instead do it in lwp_trampoline when we first return to userland. which was a stupid idea - since we did now set all fork child's %tstate (and thus %pstate when back in userland) to the current kernel's userland default. This meant we lost the address mask bit for 32bit processes and all memory model details for 64bit ones. Move it back to cpu_lwp_fork and fix the condition to only do it once when forking init. Fix kmem_free() size mismatch Convert siginfo to 32bit version before copying it out to 32bit userland. To generate a diff of this commit: cvs rdiff -u -r1.338.8.2.4.1 -r1.338.8.2.4.2 \ src/sys/arch/sparc64/sparc64/locore.s cvs rdiff -u -r1.96.2.1 -r1.96.2.1.4.1 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c cvs rdiff -u -r1.98 -r1.98.12.1 src/sys/arch/sparc64/sparc64/vm_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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.338.8.2.4.1 src/sys/arch/sparc64/sparc64/locore.s:1.338.8.2.4.2 --- src/sys/arch/sparc64/sparc64/locore.s:1.338.8.2.4.1 Sat Dec 14 19:33:45 2013 +++ src/sys/arch/sparc64/sparc64/locore.s Sun Nov 15 21:01:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.338.8.2.4.1 2013/12/14 19:33:45 bouyer Exp $ */ +/* $NetBSD: locore.s,v 1.338.8.2.4.2 2015/11/15 21:01:52 bouyer Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -5369,12 +5369,6 @@ ENTRY(lwp_trampoline) mov %l1, %o0 /* - * Going to userland - set proper tstate in trap frame - */ - set (ASI_PRIMARY_NO_FAULT< -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.96.2.1 2012/05/21 15:25:56 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.96.2.1.4.1 2015/11/15 21:01:52 bouyer Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -322,6 +322,7 @@ netbsd32_sendsig_siginfo(const ksiginfo_ int sig = ksi->ksi_signo; ucontext32_t uc; struct sparc32_sigframe_siginfo *fp; + siginfo32_t si32; netbsd32_intptr_t catcher; struct trapframe64 *tf = l->l_md.md_tf; struct rwindow32 *oldsp, *newsp; @@ -342,15 +343,16 @@ netbsd32_sendsig_siginfo(const ksiginfo_ else fp = (struct sparc32_sigframe_siginfo *)oldsp; fp = (struct sparc32_sigframe_siginfo*)((u_long)(fp - 1) & ~7); + /* * Build the signal context to be used by sigreturn. */ + memset(&uc, 0, sizeof uc); uc.uc_flags = _UC_SIGMASK | ((l->l_sigstk.ss_flags & SS_ONSTACK) ? _UC_SETSTACK : _UC_CLRSTACK); uc.uc_sigmask = *mask; uc.uc_link = (uint32_t)(uintptr_t)l->l_ctxlink; - memset(&uc.uc_stack, 0, sizeof(uc.uc_stack)); sendsig_reset(l, sig); @@ -365,9 +367,10 @@ netbsd32_sendsig_siginfo(const ksiginfo_ */ mutex_exit(p->p_lock); cpu_getmcontext32(l, &uc.uc_mcontext, &uc.uc_flags); + netbsd32_si_to_si32(&si32, (const siginfo_t *)&ksi->ksi_info); ucsz = (int)(intptr_t)&uc.__uc_pad - (int)(intptr_t)&uc; newsp = (struct rwindow32*)((intptr_t)fp - sizeof(struct frame32)); - error = (copyout(&ksi->ksi_info, &fp->sf_si, sizeof ksi->ksi_info) || + error = (copyout(&si32, &fp->sf_si, sizeof si32) || copyout(&uc, &fp->sf_uc, ucsz) || suword(&newsp->rw_in[6], (intptr_t)oldsp)); mutex_enter(p->p_lock); @@ -1367,7 +1370,8 @@ startlwp32(void *arg) error = cpu_setmcontext32(l, &uc->uc_mcontext, uc->uc_flags); KASSERT(error == 0); - kmem_free(uc, sizeof(ucontext32_t)); + /* Note: we are freeing ucontext_t, not ucontext32_t. */ + kmem_free(arg, sizeof(ucontext_t)); userret(l, 0, 0); } Index: src/sys/arch/sparc64/sparc64/vm_machdep.c diff -u src/sys/arch/sparc64/sparc64/vm_machdep.c:1.98 src/sys/arch/sparc64/sparc64/vm_machdep.c:1.98.12.1 --- src/sys/arch/sparc64/sparc64/vm_machdep.c:1.98 Sat Oct 8 08:49:07 2011 +++ src/sys/arch/sparc64/sparc64/vm_machdep.c Sun Nov 15 21:01:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.98 2011/10/08 08:49:07 nakayama Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.98.12.1 2015/11/15 21:01:52 bouyer Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.98 2011/10/08 08:49:07 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.98.12.1 2015/11/15 21:01:52 bouyer Exp
CVS commit: [netbsd-6-1] src/sys/arch/sparc64/sparc64
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:02:22 UTC 2015 Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6-1]: locore.s netbsd32_machdep.c vm_machdep.c Log Message: Pull up following revision(s) (requested by martin in ticket #1343): sys/arch/sparc64/sparc64/locore.s: revision 1.386 sys/arch/sparc64/sparc64/vm_machdep.c: revision 1.101 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.105 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.106 Basically revert r1.246 of locore.s and r1.73 of vm_machdep.c: Remove special case handling for userland lwps from cpu_lwp_fork, instead do it in lwp_trampoline when we first return to userland. which was a stupid idea - since we did now set all fork child's %tstate (and thus %pstate when back in userland) to the current kernel's userland default. This meant we lost the address mask bit for 32bit processes and all memory model details for 64bit ones. Move it back to cpu_lwp_fork and fix the condition to only do it once when forking init. Fix kmem_free() size mismatch Convert siginfo to 32bit version before copying it out to 32bit userland. To generate a diff of this commit: cvs rdiff -u -r1.338.8.4.2.1 -r1.338.8.4.2.2 \ src/sys/arch/sparc64/sparc64/locore.s cvs rdiff -u -r1.96.2.1 -r1.96.2.1.6.1 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c cvs rdiff -u -r1.98 -r1.98.14.1 src/sys/arch/sparc64/sparc64/vm_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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.338.8.4.2.1 src/sys/arch/sparc64/sparc64/locore.s:1.338.8.4.2.2 --- src/sys/arch/sparc64/sparc64/locore.s:1.338.8.4.2.1 Sat Dec 14 19:33:54 2013 +++ src/sys/arch/sparc64/sparc64/locore.s Sun Nov 15 21:02:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.338.8.4.2.1 2013/12/14 19:33:54 bouyer Exp $ */ +/* $NetBSD: locore.s,v 1.338.8.4.2.2 2015/11/15 21:02:22 bouyer Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -5372,12 +5372,6 @@ ENTRY(lwp_trampoline) mov %l1, %o0 /* - * Going to userland - set proper tstate in trap frame - */ - set (ASI_PRIMARY_NO_FAULT< -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.96.2.1 2012/05/21 15:25:56 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.96.2.1.6.1 2015/11/15 21:02:22 bouyer Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -322,6 +322,7 @@ netbsd32_sendsig_siginfo(const ksiginfo_ int sig = ksi->ksi_signo; ucontext32_t uc; struct sparc32_sigframe_siginfo *fp; + siginfo32_t si32; netbsd32_intptr_t catcher; struct trapframe64 *tf = l->l_md.md_tf; struct rwindow32 *oldsp, *newsp; @@ -342,15 +343,16 @@ netbsd32_sendsig_siginfo(const ksiginfo_ else fp = (struct sparc32_sigframe_siginfo *)oldsp; fp = (struct sparc32_sigframe_siginfo*)((u_long)(fp - 1) & ~7); + /* * Build the signal context to be used by sigreturn. */ + memset(&uc, 0, sizeof uc); uc.uc_flags = _UC_SIGMASK | ((l->l_sigstk.ss_flags & SS_ONSTACK) ? _UC_SETSTACK : _UC_CLRSTACK); uc.uc_sigmask = *mask; uc.uc_link = (uint32_t)(uintptr_t)l->l_ctxlink; - memset(&uc.uc_stack, 0, sizeof(uc.uc_stack)); sendsig_reset(l, sig); @@ -365,9 +367,10 @@ netbsd32_sendsig_siginfo(const ksiginfo_ */ mutex_exit(p->p_lock); cpu_getmcontext32(l, &uc.uc_mcontext, &uc.uc_flags); + netbsd32_si_to_si32(&si32, (const siginfo_t *)&ksi->ksi_info); ucsz = (int)(intptr_t)&uc.__uc_pad - (int)(intptr_t)&uc; newsp = (struct rwindow32*)((intptr_t)fp - sizeof(struct frame32)); - error = (copyout(&ksi->ksi_info, &fp->sf_si, sizeof ksi->ksi_info) || + error = (copyout(&si32, &fp->sf_si, sizeof si32) || copyout(&uc, &fp->sf_uc, ucsz) || suword(&newsp->rw_in[6], (intptr_t)oldsp)); mutex_enter(p->p_lock); @@ -1367,7 +1370,8 @@ startlwp32(void *arg) error = cpu_setmcontext32(l, &uc->uc_mcontext, uc->uc_flags); KASSERT(error == 0); - kmem_free(uc, sizeof(ucontext32_t)); + /* Note: we are freeing ucontext_t, not ucontext32_t. */ + kmem_free(arg, sizeof(ucontext_t)); userret(l, 0, 0); } Index: src/sys/arch/sparc64/sparc64/vm_machdep.c diff -u src/sys/arch/sparc64/sparc64/vm_machdep.c:1.98 src/sys/arch/sparc64/sparc64/vm_machdep.c:1.98.14.1 --- src/sys/arch/sparc64/sparc64/vm_machdep.c:1.98 Sat Oct 8 08:49:07 2011 +++ src/sys/arch/sparc64/sparc64/vm_machdep.c Sun Nov 15 21:02:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.98 2011/10/08 08:49:07 nakayama Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.98.14.1 2015/11/15 21:02:22 bouyer Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.98 2011/10/08 08:49:07 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.98.14.1 2015/11/15 21:02:22 bouyer Exp
CVS commit: [netbsd-6] src/sys/net
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:04:53 UTC 2015 Modified Files: src/sys/net [netbsd-6]: if_gif.c Log Message: Pull up following revision(s) (requested by knakahara in ticket #1344): sys/net/if_gif.c: revision 1.89 sys/net/if_gif.c: revision 1.90 CID 980463: Provide common error path for rollback. Remove extra check for success. correct mistake in previous To generate a diff of this commit: cvs rdiff -u -r1.80.8.1 -r1.80.8.2 src/sys/net/if_gif.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/net/if_gif.c diff -u src/sys/net/if_gif.c:1.80.8.1 src/sys/net/if_gif.c:1.80.8.2 --- src/sys/net/if_gif.c:1.80.8.1 Fri Feb 8 20:42:51 2013 +++ src/sys/net/if_gif.c Sun Nov 15 21:04:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gif.c,v 1.80.8.1 2013/02/08 20:42:51 riz Exp $ */ +/* $NetBSD: if_gif.c,v 1.80.8.2 2015/11/15 21:04:53 bouyer Exp $ */ /* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.80.8.1 2013/02/08 20:42:51 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.80.8.2 2015/11/15 21:04:53 bouyer Exp $"); #include "opt_inet.h" #include "opt_iso.h" @@ -743,17 +743,24 @@ gif_set_tunnel(struct ifnet *ifp, struct #endif } + osrc = sc->gif_psrc; + odst = sc->gif_pdst; + sc->gif_psrc = sc->gif_pdst = NULL; sc->gif_si = softint_establish(SOFTINT_NET, gifintr, sc); if (sc->gif_si == NULL) { error = ENOMEM; - goto bad; + goto rollback; } - osrc = sc->gif_psrc; - sc->gif_psrc = sockaddr_dup(src, M_WAITOK); + if ((sc->gif_psrc = sockaddr_dup(src, M_WAITOK)) == NULL) { + error = ENOMEM; + goto rollback; + } - odst = sc->gif_pdst; - sc->gif_pdst = sockaddr_dup(dst, M_WAITOK); + if ((sc->gif_pdst = sockaddr_dup(dst, M_WAITOK)) == NULL) { + error = ENOMEM; + goto rollback; + } switch (sc->gif_psrc->sa_family) { #ifdef INET @@ -770,33 +777,32 @@ gif_set_tunnel(struct ifnet *ifp, struct error = EINVAL; break; } - if (error) { - /* rollback */ - sockaddr_free(sc->gif_psrc); - sockaddr_free(sc->gif_pdst); - sc->gif_psrc = osrc; - sc->gif_pdst = odst; - goto bad; - } + if (error) + goto rollback; if (osrc) sockaddr_free(osrc); if (odst) sockaddr_free(odst); - if (sc->gif_psrc && sc->gif_pdst) - ifp->if_flags |= IFF_RUNNING; - else - ifp->if_flags &= ~IFF_RUNNING; + ifp->if_flags |= IFF_RUNNING; splx(s); return 0; - bad: +rollback: + if (sc->gif_psrc != NULL) + sockaddr_free(sc->gif_psrc); + if (sc->gif_pdst != NULL) + sockaddr_free(sc->gif_pdst); + sc->gif_psrc = osrc; + sc->gif_pdst = odst; +bad: if (sc->gif_si) { softint_disestablish(sc->gif_si); sc->gif_si = NULL; } + if (sc->gif_psrc && sc->gif_pdst) ifp->if_flags |= IFF_RUNNING; else
CVS commit: [netbsd-6] src/sys/net
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:09:37 UTC 2015 Modified Files: src/sys/net [netbsd-6]: if_gif.c Log Message: Pull up following revision(s) (requested by knakahara in ticket #1345): sys/net/if_gif.c: revision 1.91 sys/net/if_gif.c: revision 1.92 fix panic after "ifconfig gifX tunnel src dst" failed for the reason of address pair duplication. e.g. # ifconfig gif0 create # ifconfig gif0 tunnel 192.168.0.1 192.168.0.2 # ifconfig gif0 inet 172.16.0.1/24 172.16.0.2 # route add 10.1.0.0/24 172.16.0.1 # ifconfig gif1 create # ifconfig gif1 tunnel 192.168.0.1 192.168.0.3 # ifconfig gif0 tunnel 192.168.0.1 192.168.0.3 ifconfig: SIOCSLIFPHYADDR: Can't assign requested address # expected # ping 10.1.0.1 (panic) fix CID 980463 To generate a diff of this commit: cvs rdiff -u -r1.80.8.2 -r1.80.8.3 src/sys/net/if_gif.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/net/if_gif.c diff -u src/sys/net/if_gif.c:1.80.8.2 src/sys/net/if_gif.c:1.80.8.3 --- src/sys/net/if_gif.c:1.80.8.2 Sun Nov 15 21:04:53 2015 +++ src/sys/net/if_gif.c Sun Nov 15 21:09:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gif.c,v 1.80.8.2 2015/11/15 21:04:53 bouyer Exp $ */ +/* $NetBSD: if_gif.c,v 1.80.8.3 2015/11/15 21:09:37 bouyer Exp $ */ /* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.80.8.2 2015/11/15 21:04:53 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.80.8.3 2015/11/15 21:09:37 bouyer Exp $"); #include "opt_inet.h" #include "opt_iso.h" @@ -717,7 +717,8 @@ gif_set_tunnel(struct ifnet *ifp, struct if (sockaddr_cmp(sc2->gif_pdst, dst) == 0 && sockaddr_cmp(sc2->gif_psrc, src) == 0) { error = EADDRNOTAVAIL; - goto bad; + /* continue to use the old configureation. */ + goto out; } /* XXX both end must be valid? (I mean, not 0.0.0.0) */ @@ -785,10 +786,8 @@ gif_set_tunnel(struct ifnet *ifp, struct if (odst) sockaddr_free(odst); - ifp->if_flags |= IFF_RUNNING; - splx(s); - - return 0; + error = 0; + goto out; rollback: if (sc->gif_psrc != NULL) @@ -797,18 +796,19 @@ rollback: sockaddr_free(sc->gif_pdst); sc->gif_psrc = osrc; sc->gif_pdst = odst; -bad: + if (sc->gif_si) { softint_disestablish(sc->gif_si); sc->gif_si = NULL; } +out: if (sc->gif_psrc && sc->gif_pdst) ifp->if_flags |= IFF_RUNNING; else ifp->if_flags &= ~IFF_RUNNING; - splx(s); + splx(s); return error; }
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:13:29 UTC 2015 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Tickets #1333 #1334 #1335 #1336 #1338 #1339 #1341 #1343 To generate a diff of this commit: cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.50 src/doc/CHANGES-6.1.6:1.1.2.51 --- src/doc/CHANGES-6.1.6:1.1.2.50 Sun Nov 15 19:19:58 2015 +++ src/doc/CHANGES-6.1.6 Sun Nov 15 21:13:29 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.50 2015/11/15 19:19:58 bouyer Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.51 2015/11/15 21:13:29 bouyer Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -6747,3 +6747,61 @@ external/bsd/bind/include patch Update bind to 9.9.7-P3 [spz, ticket #1329] +sys/kern/kern_exec.c1.419, 1.420 +sys/kern/kern_exit.c1.246, 1.247 +sys/kern/kern_synch.c1.309 + + Various fixes related to proc's SSTOP state, related to wait(2) + in the parent, + Fixes PR kern/50298, kern/50318 kern/50300, kern/50308 and kern/50330 + [pgoyette, ticket #1333] + +sys/kern/kern_sig.c1.321 + + When delivering a signal, it's possible that the process's state in + p_stat is SACTIVE yet p_sflag is PS_STOPPING (while waiting for other + lwp's to stop). In that case, we don't want to adjust the parent's + p_nstopchild count. + [pgoyette, ticket #1334] + +sys/compat/linux/arch/arm/linux_ptrace.c 1.19 +sys/compat/linux/arch/i386/linux_ptrace.c 1.31 +sys/compat/linux/arch/powerpc/linux_ptrace.c 1.29 + + Don't release proc_lock until we're done looking at things that are + protected by the lock, particularly p_stat and p_waited. + [pgoyette, ticket #1335] + +sys/kern/kern_exit.c1.248 + + Update value of p_stat before we release the proc_lock. + [pgoyette, ticket #1336] + +sys/compat/osf1/osf1_socket.c 1.21 + + Prevent a kernel panic in osf1's sendmsg(). + [maxv, ticket #1338] + +sys/arch/x86/x86/bus_dma.c 1.72 - 1.74 + + - If we succeeded allocating a buffer that did not need bouncing + before, but the buffer in the previous mapping did, clear the bounce + bit. Fixes the ld_virtio.c bug with machines 8GB and + dd if=/dev/zero of=crash bs=1g count=4. + - When checking for the bounce buffer boundary check + addr + len < limit, not addr < limit. + [christos, ticket #1339] + +sys/arch/x86/x86/sys_machdep.c 1.29 + + fix broken error handling; error was used uninitialized. Changing the + compilation flags broke all threaded programs for me. + [christos, ticket #1341] + +sys/arch/sparc64/sparc64/locore.s 1.386 +sys/arch/sparc64/sparc64/netbsd32_machdep.c 1.105, 1.106 +sys/arch/sparc64/sparc64/vm_machdep.c 1.101 + + Fix various sparc64 compat_netbsd32 issues. + [martin, ticket #1343] +
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:13:33 UTC 2015 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Tickets #1333 #1334 #1335 #1336 #1338 #1339 #1341 #1343 To generate a diff of this commit: cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.51 src/doc/CHANGES-6.0.7:1.1.2.52 --- src/doc/CHANGES-6.0.7:1.1.2.51 Sun Nov 15 19:15:03 2015 +++ src/doc/CHANGES-6.0.7 Sun Nov 15 21:13:33 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.51 2015/11/15 19:15:03 bouyer Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.52 2015/11/15 21:13:33 bouyer Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -7026,3 +7026,61 @@ external/bsd/bind/include patch Update bind to 9.9.7-P3 [spz, ticket #1329] +sys/kern/kern_exec.c1.419, 1.420 +sys/kern/kern_exit.c1.246, 1.247 +sys/kern/kern_synch.c1.309 + + Various fixes related to proc's SSTOP state, related to wait(2) + in the parent, + Fixes PR kern/50298, kern/50318 kern/50300, kern/50308 and kern/50330 + [pgoyette, ticket #1333] + +sys/kern/kern_sig.c1.321 + + When delivering a signal, it's possible that the process's state in + p_stat is SACTIVE yet p_sflag is PS_STOPPING (while waiting for other + lwp's to stop). In that case, we don't want to adjust the parent's + p_nstopchild count. + [pgoyette, ticket #1334] + +sys/compat/linux/arch/arm/linux_ptrace.c 1.19 +sys/compat/linux/arch/i386/linux_ptrace.c 1.31 +sys/compat/linux/arch/powerpc/linux_ptrace.c 1.29 + + Don't release proc_lock until we're done looking at things that are + protected by the lock, particularly p_stat and p_waited. + [pgoyette, ticket #1335] + +sys/kern/kern_exit.c1.248 + + Update value of p_stat before we release the proc_lock. + [pgoyette, ticket #1336] + +sys/compat/osf1/osf1_socket.c 1.21 + + Prevent a kernel panic in osf1's sendmsg(). + [maxv, ticket #1338] + +sys/arch/x86/x86/bus_dma.c 1.72 - 1.74 + + - If we succeeded allocating a buffer that did not need bouncing + before, but the buffer in the previous mapping did, clear the bounce + bit. Fixes the ld_virtio.c bug with machines 8GB and + dd if=/dev/zero of=crash bs=1g count=4. + - When checking for the bounce buffer boundary check + addr + len < limit, not addr < limit. + [christos, ticket #1339] + +sys/arch/x86/x86/sys_machdep.c 1.29 + + fix broken error handling; error was used uninitialized. Changing the + compilation flags broke all threaded programs for me. + [christos, ticket #1341] + +sys/arch/sparc64/sparc64/locore.s 1.386 +sys/arch/sparc64/sparc64/netbsd32_machdep.c 1.105, 1.106 +sys/arch/sparc64/sparc64/vm_machdep.c 1.101 + + Fix various sparc64 compat_netbsd32 issues. + [martin, ticket #1343] +
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:11:59 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Tickets #1330 #1333 #1334 #1335 #1336 #1337 #1338 #1339 #1341 #1343 #1344 #1345 To generate a diff of this commit: cvs rdiff -u -r1.1.2.231 -r1.1.2.232 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.231 src/doc/CHANGES-6.2:1.1.2.232 --- src/doc/CHANGES-6.2:1.1.2.231 Sun Nov 15 19:11:21 2015 +++ src/doc/CHANGES-6.2 Sun Nov 15 21:11:59 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.231 2015/11/15 19:11:21 bouyer Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.232 2015/11/15 21:11:59 bouyer Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -12649,3 +12649,85 @@ external/bsd/bind/include patch Update bind to 9.9.7-P3 [spz, ticket #1329] +sys/dev/pci/if_iwn.c1.76 +sys/dev/pci/if_iwnvar.h1.17 + + PR/50187: Don't use DS parameter set when 5GHz channel is scanning. + [nonaka, ticket #1330] + +sys/kern/kern_exec.c1.419, 1.420 +sys/kern/kern_exit.c1.246, 1.247 +sys/kern/kern_synch.c1.309 + + Various fixes related to proc's SSTOP state, related to wait(2) + in the parent, + Fixes PR kern/50298, kern/50318 kern/50300, kern/50308 and kern/50330 + [pgoyette, ticket #1333] + +sys/kern/kern_sig.c1.321 + + When delivering a signal, it's possible that the process's state in + p_stat is SACTIVE yet p_sflag is PS_STOPPING (while waiting for other + lwp's to stop). In that case, we don't want to adjust the parent's + p_nstopchild count. + [pgoyette, ticket #1334] + +sys/compat/linux/arch/arm/linux_ptrace.c 1.19 +sys/compat/linux/arch/i386/linux_ptrace.c 1.31 +sys/compat/linux/arch/powerpc/linux_ptrace.c 1.29 + + Don't release proc_lock until we're done looking at things that are + protected by the lock, particularly p_stat and p_waited. + [pgoyette, ticket #1335] + +sys/kern/kern_exit.c1.248 + + Update value of p_stat before we release the proc_lock. + [pgoyette, ticket #1336] + +lib/libcurses/toucholap.c 1.16 + + Fix x/y error in touchoverlap(). + [uwe, ticket #1337] + +sys/compat/osf1/osf1_socket.c 1.21 + + Prevent a kernel panic in osf1's sendmsg(). + [maxv, ticket #1338] + +sys/arch/x86/x86/bus_dma.c 1.72 - 1.74 + + - If we succeeded allocating a buffer that did not need bouncing + before, but the buffer in the previous mapping did, clear the bounce + bit. Fixes the ld_virtio.c bug with machines 8GB and + dd if=/dev/zero of=crash bs=1g count=4. + - When checking for the bounce buffer boundary check + addr + len < limit, not addr < limit. + [christos, ticket #1339] + +sys/arch/x86/x86/sys_machdep.c 1.29 + + fix broken error handling; error was used uninitialized. Changing the + compilation flags broke all threaded programs for me. + [christos, ticket #1341] + +sys/arch/sparc64/sparc64/locore.s 1.386 +sys/arch/sparc64/sparc64/netbsd32_machdep.c 1.105, 1.106 +sys/arch/sparc64/sparc64/vm_machdep.c 1.101 + + Fix various sparc64 compat_netbsd32 issues. + [martin, ticket #1343] + +sys/net/if_gif.c1.89, 1.90 + + CID 980463: Provide common error path for rollback. Remove extra check + for success. + [knakahara, ticket #1344] + +sys/net/if_gif.c1.91, 1.92 + + fix panic after "ifconfig gifX tunnel src dst" failed because of + duplicate pair address. + fix CID 980463 + [knakahara, ticket #1345] +
CVS commit: src/sys/arch
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:28:54 UTC 2015 Modified Files: src/sys/arch/arm/allwinner: awin_hdmi.c awin_reg.h awin_tcon.c awin_var.h src/sys/arch/evbarm/awin: awin_machdep.c Log Message: Add support for LVDS output on tcon0. Tested with a full HD LVDS display. Other LCD interfaces not supported yet, mostly by lack of hardware. The LVDS output and timings are set from the FEX script. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/allwinner/awin_hdmi.c cvs rdiff -u -r1.83 -r1.84 src/sys/arch/arm/allwinner/awin_reg.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/allwinner/awin_tcon.c cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/allwinner/awin_var.h cvs rdiff -u -r1.46 -r1.47 src/sys/arch/evbarm/awin/awin_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/arm/allwinner/awin_hdmi.c diff -u src/sys/arch/arm/allwinner/awin_hdmi.c:1.17 src/sys/arch/arm/allwinner/awin_hdmi.c:1.18 --- src/sys/arch/arm/allwinner/awin_hdmi.c:1.17 Sun Oct 25 20:54:19 2015 +++ src/sys/arch/arm/allwinner/awin_hdmi.c Sun Nov 15 21:28:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_hdmi.c,v 1.17 2015/10/25 20:54:19 bouyer Exp $ */ +/* $NetBSD: awin_hdmi.c,v 1.18 2015/11/15 21:28:54 bouyer Exp $ */ /*- * Copyright (c) 2014 Jared D. McNeill @@ -30,7 +30,7 @@ #include "opt_ddb.h" #include -__KERNEL_RCSID(0, "$NetBSD: awin_hdmi.c,v 1.17 2015/10/25 20:54:19 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awin_hdmi.c,v 1.18 2015/11/15 21:28:54 bouyer Exp $"); #include #include @@ -580,13 +580,13 @@ awin_hdmi_read_edid(struct awin_hdmi_sof if (mode != NULL) { awin_hdmi_video_enable(sc, false); - awin_tcon_enable(sc->sc_tcon_unit, false); + awin_tcon1_enable(sc->sc_tcon_unit, false); delay(2); - awin_tcon_set_videomode(sc->sc_tcon_unit, mode); + awin_tcon1_set_videomode(sc->sc_tcon_unit, mode); awin_hdmi_set_videomode(sc, mode, display_mode); awin_hdmi_set_audiomode(sc, mode, display_mode); - awin_tcon_enable(sc->sc_tcon_unit, true); + awin_tcon1_enable(sc->sc_tcon_unit, true); delay(2); awin_hdmi_video_enable(sc, true); } @@ -928,7 +928,7 @@ awin_hdmi_hpd(struct awin_hdmi_softc *sc awin_hdmi_read_edid(sc); } else { device_printf(sc->sc_dev, "display disconnected\n"); - awin_tcon_set_videomode(sc->sc_tcon_unit, NULL); + awin_tcon1_set_videomode(sc->sc_tcon_unit, NULL); } sc->sc_connected = con; Index: src/sys/arch/arm/allwinner/awin_reg.h diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.83 src/sys/arch/arm/allwinner/awin_reg.h:1.84 --- src/sys/arch/arm/allwinner/awin_reg.h:1.83 Mon Nov 9 10:10:39 2015 +++ src/sys/arch/arm/allwinner/awin_reg.h Sun Nov 15 21:28:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_reg.h,v 1.83 2015/11/09 10:10:39 bouyer Exp $ */ +/* $NetBSD: awin_reg.h,v 1.84 2015/11/15 21:28:54 bouyer Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -,6 +,8 @@ struct awin_mmc_idma_descriptor { #define AWIN_CLK_DIV_RATIO_N __BITS(17,16) #define AWIN_CLK_DIV_RATIO_M __BITS(3,0) +#define AWIN_LVDS_CLK_ENABLE __BIT(0) + #define AWIN_ISS_CLK_SRC_SEL __BITS(17,16) #define AWIN_USB_CLK_USBPHY_ENABLE __BIT(8) @@ -1161,7 +1163,7 @@ struct awin_mmc_idma_descriptor { #define AWIN_LCDx_CHx_CLK_SRC_SEL_PLL3 0 #define AWIN_LCDx_CHx_CLK_SRC_SEL_PLL7 1 #define AWIN_LCDx_CHx_CLK_SRC_SEL_PLL3_2X 2 -#define AWIN_LCDx_CHx_CLK_SRC_SEL_PLL7_2X 3 +#define AWIN_LCDx_CHx_CLK_SRC_SEL_PLL7_2X 3 /* for lcd0ch0 this is pll6x2 */ #define AWIN_LCDx_CH1_SCLK1_GATING __BIT(15) #define AWIN_LCDx_CH1_SCLK1_SRC_SEL __BIT(11) #define AWIN_LCDx_CH1_CLK_DIV_RATIO_M __BITS(3,0) @@ -1772,6 +1774,8 @@ struct awin_mmc_idma_descriptor { #define AWIN_TCON_GINT0_REG 0x0004 #define AWIN_TCON_GINT1_REG 0x0008 #define AWIN_TCON0_FRM_CTL_REG 0x0010 +#define AWIN_TCON0_FRM1_CTL_REG 0x0014 +#define AWIN_TCON0_FRM2_CTL_REG 0x002c #define AWIN_TCON0_CTL_REG 0x0040 #define AWIN_TCON0_DCLK_REG 0x0044 #define AWIN_TCON0_BASIC0_REG 0x0048 @@ -1806,6 +1810,8 @@ struct awin_mmc_idma_descriptor { #define AWIN_TCON_CMAP_EVEN0_REG 0x0198 #define AWIN_TCON_CMAP_EVEN1_REG 0x019C #define AWIN_TCON_MUX_CTL_REG 0x0200 /* only in TCON0 */ +#define AWIN_TCON_LVDS_ANA0 0x220 +#define AWIN_TCON_LVDS_ANA1 0x224 #define AWIN_TCON_GCTL_EN __BIT(31) #define AWIN_TCON_GCTL_GAMMA_EN __BIT(30) @@ -1816,13 +1822,33 @@ struct awin_mmc_idma_descriptor { #define AWIN_TCON_GINT1_TCON0_LINENO __BITS(27,16) #define AWIN_TCON_GINT1_TCON1_LINENO __BITS(11,0) -#define AWIN_TCON_CTL_EN __BIT(31) -#define AWIN_TCON_CTL_INTERLACE_EN __BIT(20) -#define AWIN_TCON_CTL_START_DELAY __BITS(8,4) -#define AWIN_TCON_CTL_SRC_SEL __BITS(1,0) -#define AWIN_TCON_CTL_SRC_SEL_DE0 0 -#define AWIN_TCON_CTL_SRC_SEL_DE1 1 -#define AWIN_TCON_CTL_SRC_SEL_BLUEDATA 2 +#define AWIN_TCON0_FRM_ENABLE __BIT(3
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: bouyer Date: Sun Nov 15 21:31:29 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: CUBIEBOARD Log Message: Add genfb1, awindebe1, and awintcon1. These will attach if the fex script request them. While there add USB HID, keyboard, mouse and touchscreen. If you have a display you'll most proabbly want input devices too. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/evbarm/conf/CUBIEBOARD 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/CUBIEBOARD diff -u src/sys/arch/evbarm/conf/CUBIEBOARD:1.42 src/sys/arch/evbarm/conf/CUBIEBOARD:1.43 --- src/sys/arch/evbarm/conf/CUBIEBOARD:1.42 Sat Oct 17 15:30:14 2015 +++ src/sys/arch/evbarm/conf/CUBIEBOARD Sun Nov 15 21:31:29 2015 @@ -1,5 +1,5 @@ # -# $NetBSD: CUBIEBOARD,v 1.42 2015/10/17 15:30:14 bouyer Exp $ +# $NetBSD: CUBIEBOARD,v 1.43 2015/11/15 21:31:29 bouyer Exp $ # # CUBIEBOARD -- Allwinner A10/A20 Eval Board Kernel # @@ -130,12 +130,15 @@ audio1 at awinhdmiaudio0 # TCON awintcon0 at awinio0 port 0 +awintcon1 at awinio0 port 1 # DE-BE awindebe0 at awinio0 port 0 +awindebe1 at awinio0 port 1 # Framebuffer genfb0 at awindebe0 +genfb1 at awindebe1 wsdisplay* at genfb? optionsVCONS_DRAW_INTR options WSEMUL_VT100 @@ -161,6 +164,21 @@ ehci* at awinusb? usb* at ohci? usb* at ehci? +# USB HID device +uhidev* at uhub? port ? configuration ? interface ? + +# USB Mice +ums* at uhidev? reportid ? +wsmouse* at ums? mux 0 + +# USB generic touchscreen +uts* at uhidev? reportid ? +wsmouse* at uts? mux 0 + +# USB Keyboards +ukbd* at uhidev? reportid ? +wskbd* at ukbd? console ? mux 1 + # USB OTG motg0 at awinio0 usb* at motg?
CVS commit: src/sys/external/bsd/drm2/linux
Module Name:src Committed By: jakllsch Date: Sun Nov 15 22:56:24 UTC 2015 Modified Files: src/sys/external/bsd/drm2/linux: linux_work.c Log Message: Avoid NULL dereference in linux_worker_intr() in WORK_DELAYED_CANCELLED case. Potentially fixes PR#49560. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/linux/linux_work.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/external/bsd/drm2/linux/linux_work.c diff -u src/sys/external/bsd/drm2/linux/linux_work.c:1.11 src/sys/external/bsd/drm2/linux/linux_work.c:1.12 --- src/sys/external/bsd/drm2/linux/linux_work.c:1.11 Sat Oct 17 15:57:32 2015 +++ src/sys/external/bsd/drm2/linux/linux_work.c Sun Nov 15 22:56:24 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_work.c,v 1.11 2015/10/17 15:57:32 jmcneill Exp $ */ +/* $NetBSD: linux_work.c,v 1.12 2015/11/15 22:56:24 jakllsch Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.11 2015/10/17 15:57:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.12 2015/11/15 22:56:24 jakllsch Exp $"); #include #include @@ -850,7 +850,7 @@ linux_worker_intr(void *arg) } /* Either way, the callout is done. */ - TAILQ_REMOVE(&dw->work.w_wq->wq_delayed, dw, dw_entry); + TAILQ_REMOVE(&wq->wq_delayed, dw, dw_entry); callout_destroy(&dw->dw_callout); mutex_exit(&wq->wq_lock);
CVS commit: src/sys/dev/hdaudio
Module Name:src Committed By: jmcneill Date: Sun Nov 15 23:03:50 UTC 2015 Modified Files: src/sys/dev/hdaudio: hdafg.c Log Message: disable data island packet transmission on Tegra124 HDMI codec To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/hdaudio/hdafg.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/hdaudio/hdafg.c diff -u src/sys/dev/hdaudio/hdafg.c:1.8 src/sys/dev/hdaudio/hdafg.c:1.9 --- src/sys/dev/hdaudio/hdafg.c:1.8 Wed Nov 4 21:04:11 2015 +++ src/sys/dev/hdaudio/hdafg.c Sun Nov 15 23:03:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: hdafg.c,v 1.8 2015/11/04 21:04:11 christos Exp $ */ +/* $NetBSD: hdafg.c,v 1.9 2015/11/15 23:03:50 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.8 2015/11/04 21:04:11 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.9 2015/11/15 23:03:50 jmcneill Exp $"); #include #include @@ -329,6 +329,7 @@ struct hdafg_softc { struct hdaudio_audiodev sc_audiodev; uint16_t sc_fixed_rate; + boolsc_disable_dip; }; static int hdafg_match(device_t, cfdata_t, void *); @@ -3112,6 +3113,9 @@ hdafg_stream_connect_hdmi(struct hdafg_s hdaudio_command(sc->sc_codec, w->w_nid, CORB_SET_HDMI_DIP_XMIT_CTRL, COP_DIP_XMIT_CTRL_DISABLE); + if (sc->sc_disable_dip) + return; + /* build new infoframe */ if (as->as_digital == HDAFG_AS_HDMI) { dip = (uint8_t *)&hdmi; @@ -3696,6 +3700,7 @@ hdafg_attach(device_t parent, device_t s switch (sc->sc_product) { case HDAUDIO_PRODUCT_NVIDIA_TEGRA124_HDMI: sc->sc_fixed_rate = 44100; + sc->sc_disable_dip = true; break; } break;
CVS commit: src/usr.sbin/cpuctl
Module Name:src Committed By: mrg Date: Mon Nov 16 02:02:41 UTC 2015 Modified Files: src/usr.sbin/cpuctl: cpuctl.c Log Message: use stdbool.h To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/cpuctl/cpuctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/cpuctl/cpuctl.c diff -u src/usr.sbin/cpuctl/cpuctl.c:1.25 src/usr.sbin/cpuctl/cpuctl.c:1.26 --- src/usr.sbin/cpuctl/cpuctl.c:1.25 Tue Dec 16 04:07:40 2014 +++ src/usr.sbin/cpuctl/cpuctl.c Mon Nov 16 02:02:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuctl.c,v 1.25 2014/12/16 04:07:40 msaitoh Exp $ */ +/* $NetBSD: cpuctl.c,v 1.26 2015/11/16 02:02:41 mrg Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #ifndef lint #include -__RCSID("$NetBSD: cpuctl.c,v 1.25 2014/12/16 04:07:40 msaitoh Exp $"); +__RCSID("$NetBSD: cpuctl.c,v 1.26 2015/11/16 02:02:41 mrg Exp $"); #endif /* not lint */ #include @@ -51,6 +51,7 @@ __RCSID("$NetBSD: cpuctl.c,v 1.25 2014/1 #include #include #include +#include #include "cpuctl.h" @@ -67,18 +68,18 @@ static void cpu_ucode(char **); static struct cmdtab { const char *label; - int takesargs; - int argsoptional; + bool takesargs; + bool argsoptional; void (*func)(char **); } const cpu_cmdtab[] = { - { "identify", 1, 0, cpu_identify }, - { "list", 0, 0, cpu_list }, - { "offline", 1, 0, cpu_offline }, - { "online", 1, 0, cpu_online }, - { "intr", 1, 0, cpu_intr }, - { "nointr", 1, 0, cpu_nointr }, - { "ucode", 1, 1, cpu_ucode }, - { NULL, 0, 0, NULL }, + { "identify", true, false, cpu_identify }, + { "list", false, false, cpu_list }, + { "offline", true, false, cpu_offline }, + { "online", true, false, cpu_online }, + { "intr", true, false, cpu_intr }, + { "nointr", true, false, cpu_nointr }, + { "ucode", true, true, cpu_ucode }, + { NULL, false, false, NULL }, }; static int fd;
CVS commit: src/usr.sbin/cpuctl
Module Name:src Committed By: mrg Date: Mon Nov 16 02:04:32 UTC 2015 Modified Files: src/usr.sbin/cpuctl: cpuctl.c Log Message: convert getcpuid() to take char* not char** To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/cpuctl/cpuctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/cpuctl/cpuctl.c diff -u src/usr.sbin/cpuctl/cpuctl.c:1.26 src/usr.sbin/cpuctl/cpuctl.c:1.27 --- src/usr.sbin/cpuctl/cpuctl.c:1.26 Mon Nov 16 02:02:41 2015 +++ src/usr.sbin/cpuctl/cpuctl.c Mon Nov 16 02:04:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuctl.c,v 1.26 2015/11/16 02:02:41 mrg Exp $ */ +/* $NetBSD: cpuctl.c,v 1.27 2015/11/16 02:04:32 mrg Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #ifndef lint #include -__RCSID("$NetBSD: cpuctl.c,v 1.26 2015/11/16 02:02:41 mrg Exp $"); +__RCSID("$NetBSD: cpuctl.c,v 1.27 2015/11/16 02:04:32 mrg Exp $"); #endif /* not lint */ #include @@ -55,7 +55,7 @@ __RCSID("$NetBSD: cpuctl.c,v 1.26 2015/1 #include "cpuctl.h" -static u_int getcpuid(char **); +static u_int getcpuid(char *); __dead static void usage(void); static void cpu_identify(char **); @@ -148,7 +148,7 @@ cpu_online(char **argv) { cpustate_t cs; - cs.cs_id = getcpuid(argv); + cs.cs_id = getcpuid(*argv); if (ioctl(fd, IOC_CPU_GETSTATE, &cs) < 0) err(EXIT_FAILURE, "IOC_CPU_GETSTATE"); cs.cs_online = true; @@ -161,7 +161,7 @@ cpu_offline(char **argv) { cpustate_t cs; - cs.cs_id = getcpuid(argv); + cs.cs_id = getcpuid(*argv); if (ioctl(fd, IOC_CPU_GETSTATE, &cs) < 0) err(EXIT_FAILURE, "IOC_CPU_GETSTATE"); cs.cs_online = false; @@ -174,7 +174,7 @@ cpu_intr(char **argv) { cpustate_t cs; - cs.cs_id = getcpuid(argv); + cs.cs_id = getcpuid(*argv); if (ioctl(fd, IOC_CPU_GETSTATE, &cs) < 0) err(EXIT_FAILURE, "IOC_CPU_GETSTATE"); cs.cs_intr = true; @@ -187,7 +187,7 @@ cpu_nointr(char **argv) { cpustate_t cs; - cs.cs_id = getcpuid(argv); + cs.cs_id = getcpuid(*argv); if (ioctl(fd, IOC_CPU_GETSTATE, &cs) < 0) err(EXIT_FAILURE, "IOC_CPU_GETSTATE"); cs.cs_intr = false; @@ -255,7 +255,7 @@ cpu_identify(char **argv) cpuset_t *cpuset; np = sysconf(_SC_NPROCESSORS_CONF); - id = getcpuid(argv); + id = getcpuid(*argv); snprintf(name, sizeof(name), "cpu%u", id); if (np != 1) { @@ -279,13 +279,13 @@ cpu_identify(char **argv) } static u_int -getcpuid(char **argv) +getcpuid(char *arg) { char *argp; u_int id; long np; - id = (u_int)strtoul(argv[0], &argp, 0); + id = (u_int)strtoul(arg, &argp, 0); if (*argp != '\0') usage();
CVS commit: src/usr.sbin/cpuctl
Module Name:src Committed By: mrg Date: Mon Nov 16 03:34:50 UTC 2015 Modified Files: src/usr.sbin/cpuctl: cpuctl.8 cpuctl.c Log Message: allow most commands to specify more than one cpu. now you can online or offline (or identify, or intr/nointr) a list of cpus all together. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/cpuctl/cpuctl.8 cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/cpuctl/cpuctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/cpuctl/cpuctl.8 diff -u src/usr.sbin/cpuctl/cpuctl.8:1.14 src/usr.sbin/cpuctl/cpuctl.8:1.15 --- src/usr.sbin/cpuctl/cpuctl.8:1.14 Thu Nov 20 13:16:05 2014 +++ src/usr.sbin/cpuctl/cpuctl.8 Mon Nov 16 03:34:50 2015 @@ -1,6 +1,6 @@ -.\" $NetBSD: cpuctl.8,v 1.14 2014/11/20 13:16:05 wiz Exp $ +.\" $NetBSD: cpuctl.8,v 1.15 2015/11/16 03:34:50 mrg Exp $ .\" -.\" Copyright (c) 2007, 2008, 2012 The NetBSD Foundation, Inc. +.\" Copyright (c) 2007, 2008, 2012, 2015 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 20, 2014 +.Dd November 15, 2015 .Dt CPUCTL 8 .Os .Sh NAME @@ -47,44 +47,48 @@ The first argument, .Ar command , specifies the action to take. Valid commands are: -.Bl -tag -width XofflineXcpunoX -.It identify Ar cpu +.Bl -tag -width offline +.It identify Ar cpu Op Ar cpu ... Output information on the specified CPU's features and capabilities. Not available on all architectures. .It list For each CPU in the system, display the current state and time of the last state change. -.It offline Ar cpuno -Set the specified CPU off line. +.It offline Ar cpu Op Ar cpu ... +Set the specified CPUs off line. .Pp -Unbound LWPs (lightweight processes) will not be executed on the CPU +Unbound LWPs (lightweight processes) will not be executed on the CPUs while it is off line. -Bound LWPs will continue to be executed on the CPU, and device interrupts -routed to the CPU will continue to be handled. +Bound LWPs will continue to be executed on the CPUs, and device interrupts +routed to the CPUs will continue to be handled. A future release of the system may allow device interrupts to be re-routed away from individual CPUs. .Pp At least one CPU in the system must remain on line. -.It online Ar cpuno -Set the specified CPU on line, making it available to run unbound LWPs. +.It online Ar cpu Op Ar cpu ... +Set the specified CPUs on line, making it available to run unbound LWPs. .It ucode Xo -.Op Ar cpuno +.Op Ar cpu .Op Ar file .Xc This applies the microcode patch to CPUs. If -.Ar cpuno +.Ar cpu is not specified or \-1, all CPUs are updated. If -.Ar cpuno +.Ar cpu is \-2, the current CPUs are updated. The default filename is used if no filename is specified. The .Cm identify -command prints the installed version on that CPU. +command prints the installed version on the specified CPUs. On success the .Cm identify command show different ucode versions before and after this command. +.It intr Ar cpu Op Ar cpu ... +Enable interrupts for the specified CPUs if supported. +.It nointr Ar cpu Op Ar cpu ... +Disable interrupts for the specified CPUs if supported. .El .Pp Valid flags are: Index: src/usr.sbin/cpuctl/cpuctl.c diff -u src/usr.sbin/cpuctl/cpuctl.c:1.27 src/usr.sbin/cpuctl/cpuctl.c:1.28 --- src/usr.sbin/cpuctl/cpuctl.c:1.27 Mon Nov 16 02:04:32 2015 +++ src/usr.sbin/cpuctl/cpuctl.c Mon Nov 16 03:34:50 2015 @@ -1,7 +1,7 @@ -/* $NetBSD: cpuctl.c,v 1.27 2015/11/16 02:04:32 mrg Exp $ */ +/* $NetBSD: cpuctl.c,v 1.28 2015/11/16 03:34:50 mrg Exp $ */ /*- - * Copyright (c) 2007, 2008, 2009, 2012 The NetBSD Foundation, Inc. + * Copyright (c) 2007, 2008, 2009, 2012, 2015 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -31,7 +31,7 @@ #ifndef lint #include -__RCSID("$NetBSD: cpuctl.c,v 1.27 2015/11/16 02:04:32 mrg Exp $"); +__RCSID("$NetBSD: cpuctl.c,v 1.28 2015/11/16 03:34:50 mrg Exp $"); #endif /* not lint */ #include @@ -148,12 +148,14 @@ cpu_online(char **argv) { cpustate_t cs; - cs.cs_id = getcpuid(*argv); - if (ioctl(fd, IOC_CPU_GETSTATE, &cs) < 0) - err(EXIT_FAILURE, "IOC_CPU_GETSTATE"); - cs.cs_online = true; - if (ioctl(fd, IOC_CPU_SETSTATE, &cs) < 0) - err(EXIT_FAILURE, "IOC_CPU_SETSTATE"); + for (; *argv; argv++) { + cs.cs_id = getcpuid(*argv); + if (ioctl(fd, IOC_CPU_GETSTATE, &cs) < 0) + err(EXIT_FAILURE, "IOC_CPU_GETSTATE"); + cs.cs_online = true; + if (ioctl(fd, IOC_CPU_SETSTATE, &cs) < 0) + err(EXIT_FAILURE, "IOC_CPU_SETSTATE"); + } } static void @@ -161,12 +163,14 @@ cpu_offline(char **argv) { cpustate_t cs; - cs.cs_id = getcpuid(*argv); - if (ioc
CVS commit: src/doc
Module Name:src Committed By: mrg Date: Mon Nov 16 03:38:18 UTC 2015 Modified Files: src/doc: CHANGES Log Message: note cpuctl and multiple-cpu support. To generate a diff of this commit: cvs rdiff -u -r1.2113 -r1.2114 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.2113 src/doc/CHANGES:1.2114 --- src/doc/CHANGES:1.2113 Thu Nov 12 15:13:03 2015 +++ src/doc/CHANGES Mon Nov 16 03:38:18 2015 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2113 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2114 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -220,3 +220,5 @@ Changes from NetBSD 7.0 to NetBSD 8.0: amiga: Build the Xorg server with wsfb(4) driver. Added wsfb(4) support for CV64 and CV64/3D graphics cards. [phx 20151112] + cpuctl(8): Most commands can specify more than one CPU now. + [mrg 20151115]
CVS commit: src/sys/netinet
Module Name:src Committed By: ozaki-r Date: Mon Nov 16 05:39:39 UTC 2015 Modified Files: src/sys/netinet: in.c Log Message: Add missing rtfree To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/netinet/in.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.161 src/sys/netinet/in.c:1.162 --- src/sys/netinet/in.c:1.161 Mon Aug 31 16:46:14 2015 +++ src/sys/netinet/in.c Mon Nov 16 05:39:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.161 2015/08/31 16:46:14 ozaki-r Exp $ */ +/* $NetBSD: in.c,v 1.162 2015/11/16 05:39:39 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.161 2015/08/31 16:46:14 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.162 2015/11/16 05:39:39 ozaki-r Exp $"); #include "arp.h" #include "ether.h" @@ -1699,6 +1699,7 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ error = 0; error: + rtfree(rt); return error; }
CVS commit: [netbsd-7] src/sys/arch/xen/xen
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:34:08 UTC 2015 Modified Files: src/sys/arch/xen/xen [netbsd-7]: xbdback_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/arch/xen/xen/xbdback_xenbus.c: revision 1.61 Fix typo which caused the kenrel thread to be created with a 0 priority. This would cause the thread to be almost never scheduled when a userland process could use all CPU. Should fix the problem reported by Torbj?rn Granlund on port-xen@ To generate a diff of this commit: cvs rdiff -u -r1.59.4.1 -r1.59.4.2 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.59.4.1 src/sys/arch/xen/xen/xbdback_xenbus.c:1.59.4.2 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.59.4.1 Mon Sep 22 11:15:57 2014 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Mon Nov 16 07:34:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.59.4.1 2014/09/22 11:15:57 martin Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.59.4.2 2015/11/16 07:34:08 msaitoh Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.59.4.1 2014/09/22 11:15:57 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.59.4.2 2015/11/16 07:34:08 msaitoh Exp $"); #include #include @@ -647,7 +647,7 @@ xbdback_connect(struct xbdback_instance hypervisor_enable_event(xbdi->xbdi_evtchn); hypervisor_notify_via_evtchn(xbdi->xbdi_evtchn); - if (kthread_create(IPL_NONE, KTHREAD_MPSAFE, NULL, + if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, xbdback_thread, xbdi, NULL, "%s", xbdi->xbdi_name) == 0) return 0;
CVS commit: [netbsd-7-0] src/sys/arch/xen/xen
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:35:32 UTC 2015 Modified Files: src/sys/arch/xen/xen [netbsd-7-0]: xbdback_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/arch/xen/xen/xbdback_xenbus.c: revision 1.61 Fix typo which caused the kenrel thread to be created with a 0 priority. This would cause the thread to be almost never scheduled when a userland process could use all CPU. Should fix the problem reported by Torbj?rn Granlund on port-xen@ To generate a diff of this commit: cvs rdiff -u -r1.59.4.1 -r1.59.4.1.2.1 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.59.4.1 src/sys/arch/xen/xen/xbdback_xenbus.c:1.59.4.1.2.1 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.59.4.1 Mon Sep 22 11:15:57 2014 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Mon Nov 16 07:35:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.59.4.1 2014/09/22 11:15:57 martin Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.59.4.1.2.1 2015/11/16 07:35:32 msaitoh Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.59.4.1 2014/09/22 11:15:57 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.59.4.1.2.1 2015/11/16 07:35:32 msaitoh Exp $"); #include #include @@ -647,7 +647,7 @@ xbdback_connect(struct xbdback_instance hypervisor_enable_event(xbdi->xbdi_evtchn); hypervisor_notify_via_evtchn(xbdi->xbdi_evtchn); - if (kthread_create(IPL_NONE, KTHREAD_MPSAFE, NULL, + if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, xbdback_thread, xbdi, NULL, "%s", xbdi->xbdi_name) == 0) return 0;
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:37:55 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.1 Log Message: Ticket 1040. To generate a diff of this commit: cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-7.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-7.1 diff -u src/doc/CHANGES-7.1:1.1.2.29 src/doc/CHANGES-7.1:1.1.2.30 --- src/doc/CHANGES-7.1:1.1.2.29 Sun Nov 8 23:30:08 2015 +++ src/doc/CHANGES-7.1 Mon Nov 16 07:37:55 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1,v 1.1.2.29 2015/11/08 23:30:08 riz Exp $ +# $NetBSD: CHANGES-7.1,v 1.1.2.30 2015/11/16 07:37:55 msaitoh Exp $ A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1 release: @@ -1493,3 +1493,10 @@ sys/dev/usb/uplcom.c1.76 My uplcom(4) now works on RPI. [skrll, ticket #1027] +sys/arch/xen/xen/xbdback_xenbus.c 1.61 + + Fix typo which caused the kenrel thread to be created with a 0 + priority. This would cause the thread to be almost never scheduled + when a userland process could use all CPU. + Should fix the problem reported by Torbj?rn Granlund on port-xen@ + [bouyer, ticket #1040]
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:38:15 UTC 2015 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.1 Log Message: Ticket 1040. To generate a diff of this commit: cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/doc/CHANGES-7.0.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-7.0.1 diff -u src/doc/CHANGES-7.0.1:1.1.2.13 src/doc/CHANGES-7.0.1:1.1.2.14 --- src/doc/CHANGES-7.0.1:1.1.2.13 Sun Nov 8 23:29:53 2015 +++ src/doc/CHANGES-7.0.1 Mon Nov 16 07:38:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.1,v 1.1.2.13 2015/11/08 23:29:53 riz Exp $ +# $NetBSD: CHANGES-7.0.1,v 1.1.2.14 2015/11/16 07:38:15 msaitoh Exp $ A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1 release: @@ -747,3 +747,10 @@ usr.sbin/vnconfig/vnconfig.8 1.40 In NetBSD 7, the vnconfig command was renamed. [pgoyette, ticket #1025] +sys/arch/xen/xen/xbdback_xenbus.c 1.61 + + Fix typo which caused the kenrel thread to be created with a 0 + priority. This would cause the thread to be almost never scheduled + when a userland process could use all CPU. + Should fix the problem reported by Torbj?rn Granlund on port-xen@ + [bouyer, ticket #1040]
CVS commit: [netbsd-6] src/sys/arch/xen/xen
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:51:13 UTC 2015 Modified Files: src/sys/arch/xen/xen [netbsd-6]: xbdback_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1347): sys/arch/xen/xen/xbdback_xenbus.c: revision 1.61 Fix typo which caused the kenrel thread to be created with a 0 priority. This would cause the thread to be almost never scheduled when a userland process could use all CPU. Should fix the problem reported by Torbj?rn Granlund on port-xen@ To generate a diff of this commit: cvs rdiff -u -r1.55.2.2 -r1.55.2.3 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.2 src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.3 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.2 Thu Nov 7 20:16:48 2013 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Mon Nov 16 07:51:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.55.2.2 2013/11/07 20:16:48 snj Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.55.2.3 2015/11/16 07:51:12 msaitoh Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.55.2.2 2013/11/07 20:16:48 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.55.2.3 2015/11/16 07:51:12 msaitoh Exp $"); #include #include @@ -648,7 +648,7 @@ xbdback_connect(struct xbdback_instance hypervisor_enable_event(xbdi->xbdi_evtchn); hypervisor_notify_via_evtchn(xbdi->xbdi_evtchn); - if (kthread_create(IPL_NONE, KTHREAD_MPSAFE, NULL, + if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, xbdback_thread, xbdi, NULL, "%s", xbdi->xbdi_name) == 0) return 0;
CVS commit: [netbsd-6-1] src/sys/arch/xen/xen
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:52:12 UTC 2015 Modified Files: src/sys/arch/xen/xen [netbsd-6-1]: xbdback_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1347): sys/arch/xen/xen/xbdback_xenbus.c: revision 1.61 Fix typo which caused the kenrel thread to be created with a 0 priority. This would cause the thread to be almost never scheduled when a userland process could use all CPU. Should fix the problem reported by Torbj?rn Granlund on port-xen@ To generate a diff of this commit: cvs rdiff -u -r1.55.2.1.6.1 -r1.55.2.1.6.2 \ src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1.6.1 src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1.6.2 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1.6.1 Thu Nov 7 20:19:40 2013 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Mon Nov 16 07:52:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.55.2.1.6.1 2013/11/07 20:19:40 snj Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.55.2.1.6.2 2015/11/16 07:52:12 msaitoh Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.55.2.1.6.1 2013/11/07 20:19:40 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.55.2.1.6.2 2015/11/16 07:52:12 msaitoh Exp $"); #include #include @@ -648,7 +648,7 @@ xbdback_connect(struct xbdback_instance hypervisor_enable_event(xbdi->xbdi_evtchn); hypervisor_notify_via_evtchn(xbdi->xbdi_evtchn); - if (kthread_create(IPL_NONE, KTHREAD_MPSAFE, NULL, + if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, xbdback_thread, xbdi, NULL, "%s", xbdi->xbdi_name) == 0) return 0;
CVS commit: [netbsd-6-0] src/sys/arch/xen/xen
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:53:01 UTC 2015 Modified Files: src/sys/arch/xen/xen [netbsd-6-0]: xbdback_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1347): sys/arch/xen/xen/xbdback_xenbus.c: revision 1.61 Fix typo which caused the kenrel thread to be created with a 0 priority. This would cause the thread to be almost never scheduled when a userland process could use all CPU. Should fix the problem reported by Torbj?rn Granlund on port-xen@ To generate a diff of this commit: cvs rdiff -u -r1.55.2.1.4.1 -r1.55.2.1.4.2 \ src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1.4.1 src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1.4.2 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1.4.1 Thu Nov 7 20:18:50 2013 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Mon Nov 16 07:53:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.55.2.1.4.1 2013/11/07 20:18:50 snj Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.55.2.1.4.2 2015/11/16 07:53:01 msaitoh Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.55.2.1.4.1 2013/11/07 20:18:50 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.55.2.1.4.2 2015/11/16 07:53:01 msaitoh Exp $"); #include #include @@ -648,7 +648,7 @@ xbdback_connect(struct xbdback_instance hypervisor_enable_event(xbdi->xbdi_evtchn); hypervisor_notify_via_evtchn(xbdi->xbdi_evtchn); - if (kthread_create(IPL_NONE, KTHREAD_MPSAFE, NULL, + if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, xbdback_thread, xbdi, NULL, "%s", xbdi->xbdi_name) == 0) return 0;
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:54:09 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket 1347. To generate a diff of this commit: cvs rdiff -u -r1.1.2.232 -r1.1.2.233 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.232 src/doc/CHANGES-6.2:1.1.2.233 --- src/doc/CHANGES-6.2:1.1.2.232 Sun Nov 15 21:11:59 2015 +++ src/doc/CHANGES-6.2 Mon Nov 16 07:54:09 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.232 2015/11/15 21:11:59 bouyer Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.233 2015/11/16 07:54:09 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -12731,3 +12731,10 @@ sys/net/if_gif.c1.91, 1.92 fix CID 980463 [knakahara, ticket #1345] +sys/arch/xen/xen/xbdback_xenbus.c 1.61 + + Fix typo which caused the kenrel thread to be created with a 0 + priority. This would cause the thread to be almost never scheduled + when a userland process could use all CPU. + Should fix the problem reported by Torbj?rn Granlund on port-xen@ + [bouyer, ticket #1347]
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:55:50 UTC 2015 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Ticket 1347. To generate a diff of this commit: cvs rdiff -u -r1.1.2.52 -r1.1.2.53 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.52 src/doc/CHANGES-6.0.7:1.1.2.53 --- src/doc/CHANGES-6.0.7:1.1.2.52 Sun Nov 15 21:13:33 2015 +++ src/doc/CHANGES-6.0.7 Mon Nov 16 07:55:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.52 2015/11/15 21:13:33 bouyer Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.53 2015/11/16 07:55:50 msaitoh Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -7084,3 +7084,10 @@ sys/arch/sparc64/sparc64/vm_machdep.c 1 Fix various sparc64 compat_netbsd32 issues. [martin, ticket #1343] +sys/arch/xen/xen/xbdback_xenbus.c 1.61 + + Fix typo which caused the kenrel thread to be created with a 0 + priority. This would cause the thread to be almost never scheduled + when a userland process could use all CPU. + Should fix the problem reported by Torbj?rn Granlund on port-xen@ + [bouyer, ticket #1347]
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 16 07:55:29 UTC 2015 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Ticket 1347. To generate a diff of this commit: cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.51 src/doc/CHANGES-6.1.6:1.1.2.52 --- src/doc/CHANGES-6.1.6:1.1.2.51 Sun Nov 15 21:13:29 2015 +++ src/doc/CHANGES-6.1.6 Mon Nov 16 07:55:29 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.51 2015/11/15 21:13:29 bouyer Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.52 2015/11/16 07:55:29 msaitoh Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -6805,3 +6805,10 @@ sys/arch/sparc64/sparc64/vm_machdep.c 1 Fix various sparc64 compat_netbsd32 issues. [martin, ticket #1343] +sys/arch/xen/xen/xbdback_xenbus.c 1.61 + + Fix typo which caused the kenrel thread to be created with a 0 + priority. This would cause the thread to be almost never scheduled + when a userland process could use all CPU. + Should fix the problem reported by Torbj?rn Granlund on port-xen@ + [bouyer, ticket #1347]