CVS commit: src/lib/libc/rpc

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 14:21:32 UTC 2015

Modified Files:
src/lib/libc/rpc: rpc_commondata.c

Log Message:
don't compile with SVC_LEGACY


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/rpc/rpc_commondata.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/libc/rpc/rpc_commondata.c
diff -u src/lib/libc/rpc/rpc_commondata.c:1.12 src/lib/libc/rpc/rpc_commondata.c:1.13
--- src/lib/libc/rpc/rpc_commondata.c:1.12	Fri Nov  6 19:42:04 2015
+++ src/lib/libc/rpc/rpc_commondata.c	Sat Nov  7 09:21:32 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_commondata.c,v 1.12 2015/11/07 00:42:04 christos Exp $	*/
+/*	$NetBSD: rpc_commondata.c,v 1.13 2015/11/07 14:21:32 christos Exp $	*/
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -31,14 +31,12 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define SVC_LEGACY
-
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
 #if 0
 static char *sccsid = "@(#)rpc_commondata.c	2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: rpc_commondata.c,v 1.12 2015/11/07 00:42:04 christos Exp $");
+__RCSID("$NetBSD: rpc_commondata.c,v 1.13 2015/11/07 14:21:32 christos Exp $");
 #endif
 #endif
 



CVS commit: src/sys/arch/amiga/dev

2015-11-07 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Nov  7 14:29:10 UTC 2015

Modified Files:
src/sys/arch/amiga/dev: grf.c grf_cv.c grf_cv3d.c grfvar.h
Removed Files:
src/sys/arch/amiga/dev: grfws.h

Log Message:
Improved wscons support. Virtual screens are now working.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/amiga/dev/grf.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/amiga/dev/grf_cv.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amiga/dev/grf_cv3d.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amiga/dev/grfvar.h
cvs rdiff -u -r1.1 -r0 src/sys/arch/amiga/dev/grfws.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/amiga/dev/grf.c
diff -u src/sys/arch/amiga/dev/grf.c:1.62 src/sys/arch/amiga/dev/grf.c:1.63
--- src/sys/arch/amiga/dev/grf.c:1.62	Fri Jul 25 08:10:31 2014
+++ src/sys/arch/amiga/dev/grf.c	Sat Nov  7 14:29:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf.c,v 1.62 2014/07/25 08:10:31 dholland Exp $ */
+/*	$NetBSD: grf.c,v 1.63 2015/11/07 14:29:10 phx Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.62 2014/07/25 08:10:31 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.63 2015/11/07 14:29:10 phx Exp $");
 
 /*
  * Graphics display driver for the Amiga
@@ -76,7 +76,6 @@ __KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.62
 #include 	/* DEBUG */
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -182,11 +181,11 @@ grfattach(device_t parent, device_t self
 	grfsp[gp->g_unit] = gp;
 
 	/*
-	 * find our major device number
+	 * find our major device number, make device
 	 */
 	maj = cdevsw_lookup_major(_cdevsw);
-
 	gp->g_grfdev = makedev(maj, gp->g_unit);
+
 	if (self != NULL) {
 		printf(": width %d height %d", gp->g_display.gd_dwidth,
 		gp->g_display.gd_dheight);
@@ -194,23 +193,25 @@ grfattach(device_t parent, device_t self
 			printf(" monochrome\n");
 		else
 			printf(" colors %d\n", gp->g_display.gd_colors);
+
 #if NWSDISPLAY > 0
-		vcons_init(>g_vd, gp, gp->g_screens[0], gp->g_accessops);
+		vcons_init(>g_vd, gp, gp->g_defaultscr, gp->g_accessops);
 		gp->g_vd.init_screen = grf_init_screen;
+
 		if (gp->g_flags & GF_CONSOLE) {
 			console_vcons.scr_flags |= VCONS_SCREEN_IS_STATIC;
 			vcons_init_screen(>g_vd,
 			_vcons, 1, );
-			gp->g_screens[0]->textops =
+			gp->g_defaultscr->textops =
 			_vcons.scr_ri.ri_ops;
-			wsdisplay_cnattach(gp->g_screens[0],
+			wsdisplay_cnattach(gp->g_defaultscr,
 			_vcons.scr_ri, 0, 0, defattr);
 			vcons_replay_msgbuf(_vcons);
 		}
 
 		/* attach wsdisplay */
 		wa.console = (gp->g_flags & GF_CONSOLE) != 0;
-		wa.scrdata = >g_screenlist;
+		wa.scrdata = gp->g_scrlist;
 		wa.accessops = gp->g_accessops;
 		wa.accesscookie = >g_vd;
 		config_found(self, , wsemuldisplaydevprint);
@@ -477,16 +478,17 @@ grfcninit(struct consdev *cd)
 		gp = grfsp[unit];
 		if (gp != NULL && (gp->g_flags & GF_ALIVE)) {
 			gp->g_flags |= GF_CONSOLE;  /* we are console! */
-			gp->g_screens[0]->ncols = gp->g_display.gd_fbwidth /
-			gp->g_screens[0]->fontwidth;
-			gp->g_screens[0]->nrows = gp->g_display.gd_fbheight /
-			gp->g_screens[0]->fontheight;
+
+			gp->g_defaultscr->ncols = gp->g_display.gd_fbwidth /
+			gp->g_defaultscr->fontwidth;
+			gp->g_defaultscr->nrows = gp->g_display.gd_fbheight /
+			gp->g_defaultscr->fontheight;
 
 			ri = grf_setup_rasops(gp, _vcons);
 			console_vcons.scr_cookie = gp;
 			defattr = 0;  /* XXX */
 
-			wsdisplay_preattach(gp->g_screens[0], ri, 0, 0,
+			wsdisplay_preattach(gp->g_defaultscr, ri, 0, 0,
 			defattr);
 #if NKBD > 0
 			/* tell kbd device it is used as console keyboard */
@@ -519,8 +521,8 @@ grf_setup_rasops(struct grf_softc *gp, s
 	scr->scr_flags |= VCONS_DONT_READ;
 	memset(ri, 0, sizeof(struct rasops_info));
 
-	ri->ri_rows = gp->g_screens[0]->nrows;
-	ri->ri_cols = gp->g_screens[0]->ncols;
+	ri->ri_rows = gp->g_defaultscr->nrows;
+	ri->ri_cols = gp->g_defaultscr->ncols;
 	ri->ri_hw = scr;
 	ri->ri_ops.cursor= gp->g_emulops->cursor;
 	ri->ri_ops.mapchar   = gp->g_emulops->mapchar;
@@ -538,6 +540,66 @@ grf_setup_rasops(struct grf_softc *gp, s
 	return ri;
 }
 
+/*
+ * Called as fallback for ioctls which are not handled by the specific
+ * grf driver.
+ */
+int
+grf_wsioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l)
+{
+	struct wsdisplayio_fbinfo *iofbi;
+	struct wsdisplay_fbinfo *fbinfo;
+	struct vcons_data *vd;
+	struct grf_softc *gp;
+	struct vcons_screen *scr;
+	struct grfinfo *gi;
+
+	vd = v;
+	gp = vd->cookie;
+	scr = vd->active;
+
+	switch (cmd) {
+	case WSDISPLAYIO_GET_FBINFO:
+		if (scr != NULL) {
+			iofbi = data;
+			return wsdisplayio_get_fbinfo(>scr_ri, iofbi);
+		}
+		return ENODEV;
+
+	case WSDISPLAYIO_GINFO:
+		if (scr != NULL) {
+			fbinfo = (struct wsdisplay_fbinfo *)data;
+			gi = >g_display;
+
+			/*
+			 * We 

CVS commit: src/sys/arch/sparc64/sparc64

2015-11-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov  7 11:47:09 UTC 2015

Modified Files:
src/sys/arch/sparc64/sparc64: netbsd32_machdep.c

Log Message:
Fix kmem_free() size mismatch


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/sparc64/sparc64/netbsd32_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/netbsd32_machdep.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.104 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.105
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.104	Sat Oct 31 02:36:17 2015
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c	Sat Nov  7 11:47:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.104 2015/10/31 02:36:17 nakayama Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.105 2015/11/07 11:47:09 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.104 2015/10/31 02:36:17 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.105 2015/11/07 11:47:09 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1324,7 +1324,8 @@ startlwp32(void *arg)
 	error = cpu_setmcontext32(l, >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);
 }
 



CVS commit: src/distrib/sets/lists/comp

2015-11-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov  7 13:28:05 UTC 2015

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
Remove duplicate entry.


To generate a diff of this commit:
cvs rdiff -u -r1.2002 -r1.2003 src/distrib/sets/lists/comp/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2002 src/distrib/sets/lists/comp/mi:1.2003
--- src/distrib/sets/lists/comp/mi:1.2002	Sat Nov  7 00:12:57 2015
+++ src/distrib/sets/lists/comp/mi	Sat Nov  7 13:28:05 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2002 2015/11/07 00:12:57 joerg Exp $
+#	$NetBSD: mi,v 1.2003 2015/11/07 13:28:05 joerg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -348,7 +348,6 @@
 ./usr/include/cdk/swindow.h			comp-obsolete		obsolete
 ./usr/include/cdk/template.h			comp-obsolete		obsolete
 ./usr/include/cdk/viewer.h			comp-obsolete		obsolete
-./usr/include/clang-3.6/stdatomic.h	comp-c-include		llvm
 ./usr/include/clang-3.6/stdalign.h		comp-c-include		llvm
 ./usr/include/clang-3.6/stdatomic.h		comp-c-include		llvm
 ./usr/include/clang-3.6/stdnoreturn.h		comp-c-include		llvm



CVS commit: [nick-nhusb] src/sys/dev/usb

2015-11-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  7 08:10:40 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhcireg.h

Log Message:
Provide a UHCI_TD_STATUS_MASK


To generate a diff of this commit:
cvs rdiff -u -r1.19.66.3 -r1.19.66.4 src/sys/dev/usb/uhcireg.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/usb/uhcireg.h
diff -u src/sys/dev/usb/uhcireg.h:1.19.66.3 src/sys/dev/usb/uhcireg.h:1.19.66.4
--- src/sys/dev/usb/uhcireg.h:1.19.66.3	Tue Sep 22 12:06:01 2015
+++ src/sys/dev/usb/uhcireg.h	Sat Nov  7 08:10:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhcireg.h,v 1.19.66.3 2015/09/22 12:06:01 skrll Exp $	*/
+/*	$NetBSD: uhcireg.h,v 1.19.66.4 2015/11/07 08:10:40 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/uhcireg.h,v 1.12 1999/11/17 22:33:42 n_hibma Exp $ */
 
 /*
@@ -157,6 +157,7 @@ typedef struct {
 #define UHCI_TD_DBUFFER		__BIT(21)
 #define UHCI_TD_STALLED		__BIT(22)
 #define UHCI_TD_ACTIVE		__BIT(23)
+#define UHCI_TD_STATUS_MASK	__BITS(16,23)
 #define UHCI_TD_IOC		__BIT(24)
 #define UHCI_TD_IOS		__BIT(25)
 #define UHCI_TD_LS		__BIT(26)



CVS commit: [nick-nhusb] src/sys/dev/usb

2015-11-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  7 08:05:30 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhci.c

Log Message:
Debug consistency / standard output


To generate a diff of this commit:
cvs rdiff -u -r1.264.4.46 -r1.264.4.47 src/sys/dev/usb/uhci.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/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.46 src/sys/dev/usb/uhci.c:1.264.4.47
--- src/sys/dev/usb/uhci.c:1.264.4.46	Sun Nov  1 12:09:48 2015
+++ src/sys/dev/usb/uhci.c	Sat Nov  7 08:05:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.46 2015/11/01 12:09:48 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.47 2015/11/07 08:05:30 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.46 2015/11/01 12:09:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.47 2015/11/07 08:05:30 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1554,10 +1554,12 @@ uhci_idone(struct uhci_xfer *ux)
 	}
 
 #ifdef UHCI_DEBUG
-	DPRINTFN(10, "ux=%p, xfer=%p, pipe=%p ready",
-	ux, xfer, upipe, 0);
-	if (uhcidebug >= 10)
+	DPRINTFN(10, "ux=%p, xfer=%p, pipe=%p ready", ux, xfer, upipe, 0);
+	if (uhcidebug >= 10) {
+		DPRINTF("--- dump start ---", 0, 0, 0, 0);
 		uhci_dump_tds(ux->ux_stdstart);
+		DPRINTF("--- dump end ---", 0, 0, 0, 0);
+	}
 #endif
 
 	/* The transfer is done, compute actual length and status. */
@@ -2073,8 +2075,10 @@ uhci_device_bulk_start(struct usbd_xfer 
 
 #ifdef UHCI_DEBUG
 	if (uhcidebug >= 8) {
+		DPRINTF("--- dump start ---", 0, 0, 0, 0);
 		DPRINTFN(8, "data(1)", 0, 0, 0, 0);
 		uhci_dump_tds(data);
+		DPRINTF("--- dump end ---", 0, 0, 0, 0);
 	}
 #endif
 
@@ -2102,8 +2106,10 @@ uhci_device_bulk_start(struct usbd_xfer 
 
 #ifdef UHCI_DEBUG
 	if (uhcidebug >= 10) {
+		DPRINTF("--- dump start ---", 0, 0, 0, 0);
 		DPRINTFN(10, "data(2)", 0, 0, 0, 0);
 		uhci_dump_tds(data);
+		DPRINTF("--- dump end ---", 0, 0, 0, 0);
 	}
 #endif
 
@@ -2347,14 +2353,14 @@ uhci_device_intr_start(struct usbd_xfer 
 	sizeof(dataend->td.td_status),
 	BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
 
-	DPRINTFN(10, "--- dump start ---", 0, 0, 0, 0);
 #ifdef UHCI_DEBUG
 	if (uhcidebug >= 10) {
+		DPRINTF("--- dump start ---", 0, 0, 0, 0);
 		uhci_dump_tds(data);
 		uhci_dump_qh(upipe->intr.qhs[0]);
+		DPRINTF("--- dump end ---", 0, 0, 0, 0);
 	}
 #endif
-	DPRINTFN(10, "--- dump end ---", 0, 0, 0, 0);
 
 	/* Set up interrupt info. */
 	ux->ux_stdstart = data;
@@ -2378,14 +2384,14 @@ uhci_device_intr_start(struct usbd_xfer 
 	xfer->ux_status = USBD_IN_PROGRESS;
 	mutex_exit(>sc_lock);
 
-	DPRINTFN(10, "--- dump start ---", 0, 0, 0, 0);
 #ifdef UHCI_DEBUG
 	if (uhcidebug >= 10) {
+		DPRINTF("--- dump start ---", 0, 0, 0, 0);
 		uhci_dump_tds(data);
 		uhci_dump_qh(upipe->intr.qhs[0]);
+		DPRINTF("--- dump end ---", 0, 0, 0, 0);
 	}
 #endif
-	DPRINTFN(10, "--- dump end ---", 0, 0, 0, 0);
 
 	return USBD_IN_PROGRESS;
 }
@@ -2528,14 +2534,14 @@ uhci_device_request(struct usbd_xfer *xf
 	usb_syncmem(>dma, stat->offs, sizeof(stat->td),
 	BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
 
-	DPRINTFN(10, "--- dump start ---", 0, 0, 0, 0);
 #ifdef UHCI_DEBUG
 	if (uhcidebug >= 10) {
-		DPRINTFN(10, "before transfer", 0, 0, 0, 0);
+		DPRINTF("--- dump start ---", 0, 0, 0, 0);
+		DPRINTF("before transfer", 0, 0, 0, 0);
 		uhci_dump_tds(setup);
+		DPRINTF("--- dump end ---", 0, 0, 0, 0);
 	}
 #endif
-	DPRINTFN(10, "--- dump end ---", 0, 0, 0, 0);
 
 	/* Set up interrupt info. */
 	uxfer->ux_stdstart = setup;
@@ -2554,7 +2560,6 @@ uhci_device_request(struct usbd_xfer *xf
 	else
 		uhci_add_hs_ctrl(sc, sqh);
 	uhci_add_intr_info(sc, uxfer);
-	DPRINTFN(12, "--- dump start ---", 0, 0, 0, 0);
 #ifdef UHCI_DEBUG
 	if (uhcidebug >= 12) {
 		uhci_soft_td_t *std;
@@ -2562,6 +2567,8 @@ uhci_device_request(struct usbd_xfer *xf
 		uhci_soft_qh_t *sxqh;
 		int maxqh = 0;
 		uhci_physaddr_t link;
+
+		DPRINTF("--- dump start ---", 0, 0, 0, 0);
 		DPRINTFN(12, "follow from [0]", 0, 0, 0, 0);
 		for (std = sc->sc_vframes[0].htd, link = 0;
 		 (link & UHCI_PTR_QH) == 0;
@@ -2580,9 +2587,9 @@ uhci_device_request(struct usbd_xfer *xf
 		DPRINTFN(12, "Enqueued QH:", 0, 0, 0, 0);
 		uhci_dump_qh(sqh);
 		uhci_dump_tds(sqh->elink);
+		DPRINTF("--- dump end ---", 0, 0, 0, 0);
 	}
 #endif
-	DPRINTFN(12, "--- dump end ---", 0, 0, 0, 0);
 	if (xfer->ux_timeout && !sc->sc_bus.ub_usepolling) {
 		callout_reset(>ux_callout, mstohz(xfer->ux_timeout),
 			uhci_timeout, xfer);
@@ -2683,14 +2690,14 @@ uhci_device_isoc_enter(struct usbd_xfer 
 		std->td.td_token |= htole32(UHCI_TD_SET_MAXLEN(len));
 		usb_syncmem(>dma, std->offs, sizeof(std->td),
 		BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
-		DPRINTFN(5, "--- dump start ---", 0, 0, 0, 0);
 #ifdef UHCI_DEBUG
 		if (uhcidebug >= 5) {
+			

CVS commit: src/tests/lib/libc/stdlib

2015-11-07 Thread Niclas Rosenvik
Module Name:src
Committed By:   nros
Date:   Sat Nov  7 17:35:31 UTC 2015

Modified Files:
src/tests/lib/libc/stdlib: t_posix_memalign.c

Log Message:
Fix code style errors pointed out by christos during the review of the
aligned_alloc test that also applies to the posix_memalign test.
Fix code style errors that I forgot to fix in the aligned_alloc test.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/stdlib/t_posix_memalign.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/stdlib/t_posix_memalign.c
diff -u src/tests/lib/libc/stdlib/t_posix_memalign.c:1.3 src/tests/lib/libc/stdlib/t_posix_memalign.c:1.4
--- src/tests/lib/libc/stdlib/t_posix_memalign.c:1.3	Sat Nov  7 16:21:42 2015
+++ src/tests/lib/libc/stdlib/t_posix_memalign.c	Sat Nov  7 17:35:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_posix_memalign.c,v 1.3 2015/11/07 16:21:42 nros Exp $ */
+/*	$NetBSD: t_posix_memalign.c,v 1.4 2015/11/07 17:35:31 nros Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_posix_memalign.c,v 1.3 2015/11/07 16:21:42 nros Exp $");
+__RCSID("$NetBSD: t_posix_memalign.c,v 1.4 2015/11/07 17:35:31 nros Exp $");
 
 #include 
 
@@ -50,10 +50,10 @@ ATF_TC_HEAD(posix_memalign_basic, tc)
 }
 ATF_TC_BODY(posix_memalign_basic, tc)
 {
-	size_t size[] = {
+	static const size_t size[] = {
 		1, 2, 3, 4, 10, 100, 16384, 32768, 65536
 	};
-	size_t align[] = {
+	static const size_t align[] = {
 		512, 1024, 16, 32, 64, 4, 2048, 16, 2
 	};
 
@@ -64,7 +64,7 @@ ATF_TC_BODY(posix_memalign_basic, tc)
 		int ret;
 		p = (void*)0x1;
 
-		(void)printf("Checking posix_memalign(, %zd, %zd)...\n",
+		(void)printf("Checking posix_memalign(, %zu, %zu)...\n",
 			align[i], size[i]);
 		ret = posix_memalign(, align[i], size[i]);
 
@@ -104,7 +104,7 @@ ATF_TC_BODY(aligned_alloc_basic, tc)
 		align[i], size[i]);
 		p = aligned_alloc(align[i], size[i]);
 if (p == NULL) {
-			if (align[i] == 0 || ((align[i]-1) & align[i]) != 0 ||
+			if (align[i] == 0 || ((align[i] - 1) & align[i]) != 0 ||
 			size[i] % align[i] != 0) {
 ATF_REQUIRE_EQ_MSG(errno, EINVAL,
 "aligned_alloc: %s", strerror(errno));
@@ -118,7 +118,7 @@ ATF_TC_BODY(aligned_alloc_basic, tc)
 			ATF_REQUIRE_EQ_MSG(align[i] == 0, false,
 			"aligned_alloc: success when alignment was not "
 			"a power of 2");
-			ATF_REQUIRE_EQ_MSG((align[i]-1) & align[i], 0,
+			ATF_REQUIRE_EQ_MSG((align[i] - 1) & align[i], 0,
 			"aligned_alloc: success when alignment was not "
 			"a power of 2");
 			ATF_REQUIRE_EQ_MSG(size[i] % align[i], 0,



CVS commit: src/usr.bin/patch

2015-11-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov  7 18:11:21 UTC 2015

Modified Files:
src/usr.bin/patch: util.c

Log Message:
paths.h is not used.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/patch/util.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/patch/util.c
diff -u src/usr.bin/patch/util.c:1.26 src/usr.bin/patch/util.c:1.27
--- src/usr.bin/patch/util.c:1.26	Sat Oct  2 19:31:14 2010
+++ src/usr.bin/patch/util.c	Sat Nov  7 18:11:21 2015
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: util.c,v 1.32 2006/03/11 19:41:30 otto Exp $
  * $DragonFly: src/usr.bin/patch/util.c,v 1.9 2007/09/29 23:11:10 swildner Exp $
- * $NetBSD: util.c,v 1.26 2010/10/02 19:31:14 wiz Exp $
+ * $NetBSD: util.c,v 1.27 2015/11/07 18:11:21 joerg Exp $
  */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: util.c,v 1.26 2010/10/02 19:31:14 wiz Exp $");
+__RCSID("$NetBSD: util.c,v 1.27 2015/11/07 18:11:21 joerg Exp $");
 
 #include 
 #include 
@@ -40,7 +40,6 @@ __RCSID("$NetBSD: util.c,v 1.26 2010/10/
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 



CVS commit: src/lib/libc/rpc

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 20:24:00 UTC 2015

Modified Files:
src/lib/libc/rpc: svc_fdset.c

Log Message:
spell reserved.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/rpc/svc_fdset.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/libc/rpc/svc_fdset.c
diff -u src/lib/libc/rpc/svc_fdset.c:1.7 src/lib/libc/rpc/svc_fdset.c:1.8
--- src/lib/libc/rpc/svc_fdset.c:1.7	Sat Nov  7 11:58:24 2015
+++ src/lib/libc/rpc/svc_fdset.c	Sat Nov  7 15:24:00 2015
@@ -1,8 +1,8 @@
-/*	$NetBSD: svc_fdset.c,v 1.7 2015/11/07 16:58:24 christos Exp $	*/
+/*	$NetBSD: svc_fdset.c,v 1.8 2015/11/07 20:24:00 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
- * All rights resefdsed.
+ * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Christos Zoulas.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: svc_fdset.c,v 1.7 2015/11/07 16:58:24 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.8 2015/11/07 20:24:00 christos Exp $");
 
 
 #include "reentrant.h"



CVS commit: [netbsd-5] src/lib/libm/src

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:25:23 UTC 2015

Modified Files:
src/lib/libm/src [netbsd-5]: lrint.c lrintf.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #1972):
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.6.1 src/lib/libm/src/lrint.c
cvs rdiff -u -r1.5 -r1.5.6.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.6.1
--- src/lib/libm/src/lrint.c:1.4	Sat Apr 26 23:49:50 2008
+++ src/lib/libm/src/lrint.c	Sat Nov  7 20:25:23 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.6.1 2015/11/07 20:25:23 snj 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.6.1
--- src/lib/libm/src/lrintf.c:1.5	Sat Apr 26 23:49:50 2008
+++ src/lib/libm/src/lrintf.c	Sat Nov  7 20:25:23 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.6.1 2015/11/07 20:25:23 snj 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-5-2] src/sys/ufs/lfs

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:31:22 UTC 2015

Modified Files:
src/sys/ufs/lfs [netbsd-5-2]: lfs_segment.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1974):
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.213 -r1.213.22.1 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.213 src/sys/ufs/lfs/lfs_segment.c:1.213.22.1
--- src/sys/ufs/lfs/lfs_segment.c:1.213	Mon Jun  2 16:25:34 2008
+++ src/sys/ufs/lfs/lfs_segment.c	Sat Nov  7 20:31:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.213 2008/06/02 16:25:34 ad Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.213.22.1 2015/11/07 20:31:22 snj 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.213 2008/06/02 16:25:34 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.22.1 2015/11/07 20:31:22 snj Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -1669,7 +1669,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)
@@ -1700,7 +1700,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 = lfs_sntod(fs, sn);
 	lfs_newseg(fs);
 	fs->lfs_offset = fs->lfs_curseg;
 



CVS commit: [netbsd-5-1] src/sys/dev/mii

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:36:42 UTC 2015

Modified Files:
src/sys/dev/mii [netbsd-5-1]: atphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1978):
sys/dev/mii/atphy.c: revision 1.17
Fix incorrect argument of mii_anar(). Fixes PR#50206.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.2 -r1.5.2.2.2.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.5.2.2 src/sys/dev/mii/atphy.c:1.5.2.2.2.1
--- src/sys/dev/mii/atphy.c:1.5.2.2	Sun May  3 23:45:47 2009
+++ src/sys/dev/mii/atphy.c	Sat Nov  7 20:36:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.5.2.2 2009/05/03 23:45:47 snj Exp $ */
+/*	$NetBSD: atphy.c,v 1.5.2.2.2.1 2015/11/07 20:36:42 snj 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.5.2.2 2009/05/03 23:45:47 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.5.2.2.2.1 2015/11/07 20:36:42 snj Exp $");
 
 #include 
 #include 
@@ -202,7 +202,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-5] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:43:23 UTC 2015

Modified Files:
src/sys/kern [netbsd-5]: kern_exec.c kern_exit.c kern_synch.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1979):
sys/kern/kern_synch.c: revision 1.309
sys/kern/kern_exit.c: revisions 1.246, 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
--
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
--
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
--
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


To generate a diff of this commit:
cvs rdiff -u -r1.280.4.3 -r1.280.4.4 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.214.4.2 -r1.214.4.3 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.254.2.6 -r1.254.2.7 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.280.4.3 src/sys/kern/kern_exec.c:1.280.4.4
--- src/sys/kern/kern_exec.c:1.280.4.3	Wed Apr  1 21:03:04 2009
+++ src/sys/kern/kern_exec.c	Sat Nov  7 20:43:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.280.4.4 2015/11/07 20:43:23 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.280.4.4 2015/11/07 20:43:23 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_syscall_debug.h"
@@ -1104,7 +1104,7 @@ execve1(struct lwp *l, const char *path,
 	if (p->p_sflag & PS_STOPEXEC) {
 		KERNEL_UNLOCK_ALL(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();
 		sigclearall(p, , );

Index: src/sys/kern/kern_exit.c
diff -u src/sys/kern/kern_exit.c:1.214.4.2 src/sys/kern/kern_exit.c:1.214.4.3
--- src/sys/kern/kern_exit.c:1.214.4.2	Wed Jul  1 22:30:30 2009
+++ src/sys/kern/kern_exit.c	Sat Nov  7 20:43:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.214.4.2 2009/07/01 22:30:30 snj Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.214.4.3 2015/11/07 20:43:23 snj 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.214.4.2 2009/07/01 22:30:30 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.3 2015/11/07 20:43:23 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -234,8 +234,15 @@ exit1(struct lwp *l, int rv)
 	if (__predict_false(p->p_sflag & PS_STOPEXIT)) {
 		KERNEL_UNLOCK_ALL(l, >l_biglocks);
 		sigclearall(p, , );
+
+		if (!mutex_tryenter(proc_lock)) {
+			mutex_exit(p->p_lock);
+			mutex_enter(proc_lock);
+			mutex_enter(p->p_lock);
+		}
 		p->p_waited = 0;
-		membar_producer();
+		p->p_pptr->p_nstopchild++;
+		mutex_exit(proc_lock);
 		p->p_stat = SSTOP;
 		lwp_lock(l);
 		p->p_nrlwps--;
@@ -1011,7 +1018,7 @@ proc_reparent(struct proc *child, struct
 	if (child->p_pptr == parent)
 		return;
 
-	if (child->p_stat == SZOMB ||
+	if (child->p_stat == SZOMB || child->p_stat == SDEAD ||
 	(child->p_stat == SSTOP && !child->p_waited)) {
 		child->p_pptr->p_nstopchild--;
 		parent->p_nstopchild++;

Index: src/sys/kern/kern_synch.c
diff -u src/sys/kern/kern_synch.c:1.254.2.6 src/sys/kern/kern_synch.c:1.254.2.7
--- src/sys/kern/kern_synch.c:1.254.2.6	Thu Apr 23 17:47:13 2009
+++ src/sys/kern/kern_synch.c	Sat Nov  7 20:43:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_synch.c,v 1.254.2.6 2009/04/23 17:47:13 snj Exp $	*/
+/*	$NetBSD: kern_synch.c,v 1.254.2.7 2015/11/07 20:43:23 snj Exp $	

CVS commit: [netbsd-5] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:45:20 UTC 2015

Modified Files:
src/sys/kern [netbsd-5]: kern_sig.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1980):
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.


To generate a diff of this commit:
cvs rdiff -u -r1.289.4.8 -r1.289.4.9 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.289.4.8 src/sys/kern/kern_sig.c:1.289.4.9
--- src/sys/kern/kern_sig.c:1.289.4.8	Sat Mar 17 19:14:08 2012
+++ src/sys/kern/kern_sig.c	Sat Nov  7 20:45:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.289.4.8 2012/03/17 19:14:08 bouyer Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.289.4.9 2015/11/07 20:45:19 snj Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.8 2012/03/17 19:14:08 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.9 2015/11/07 20:45:19 snj Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_compat_sunos.h"
@@ -1402,14 +1402,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-5-2] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:47:08 UTC 2015

Modified Files:
src/sys/kern [netbsd-5-2]: kern_sig.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1980):
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.


To generate a diff of this commit:
cvs rdiff -u -r1.289.4.8 -r1.289.4.8.2.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.289.4.8 src/sys/kern/kern_sig.c:1.289.4.8.2.1
--- src/sys/kern/kern_sig.c:1.289.4.8	Sat Mar 17 19:14:08 2012
+++ src/sys/kern/kern_sig.c	Sat Nov  7 20:47:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.289.4.8 2012/03/17 19:14:08 bouyer Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.289.4.8.2.1 2015/11/07 20:47:08 snj Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.8 2012/03/17 19:14:08 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.8.2.1 2015/11/07 20:47:08 snj Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_compat_sunos.h"
@@ -1402,14 +1402,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-5-1] src/doc

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:55:34 UTC 2015

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.6

Log Message:
tickets 1974, 1978-1981


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/doc/CHANGES-5.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-5.1.6
diff -u src/doc/CHANGES-5.1.6:1.1.2.34 src/doc/CHANGES-5.1.6:1.1.2.35
--- src/doc/CHANGES-5.1.6:1.1.2.34	Fri Aug 14 06:00:50 2015
+++ src/doc/CHANGES-5.1.6	Sat Nov  7 20:55:34 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.6,v 1.1.2.34 2015/08/14 06:00:50 msaitoh Exp $
+# $NetBSD: CHANGES-5.1.6,v 1.1.2.35 2015/11/07 20:55:34 snj Exp $
 
 A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6
 release:
@@ -2696,3 +2696,76 @@ crypto/dist/openssl/util/mkerr.pl		patch
 	POODLE fix in October last year that caused the SSL server side	to
 	fail to handshake.
 	[spz, ticket#1976]
+
+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.  Only affects dumping from a mounted
+	file system.
+	[dholland, ticket #1974]
+
+sys/dev/mii/atphy.c1.17
+
+	Fix incorrect argument of mii_anar(). Fixes PR#50206.
+	[msaitoh, ticket #1978]
+
+sys/kern/kern_exec.c1.419, 1.420
+sys/kern/kern_exit.c1.246, 1.247
+sys/kern/kern_synch.c1.309
+
+	In execve_runproc(), update the p_waited entry for the process
+	being moved to SSTOP state, not for its parent.  If the value is
+	not already zero, it could prevent its parent from waiting for
+	the process.  Fixes PR kern/50298
+	--
+	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.  Fixes PR kern/50318
+	--
+	Currently, if a process is exiting and its parent has indicated
+	no intent of reaping the process (nor any other children), the
+	process will 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
+	--
+	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
+	--
+	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 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
+	[pgoyette, ticket #1979]
+
+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 #1980]
+
+sys/kern/kern_exit.c1.248
+
+	Update value of p_stat before we release the proc_lock.
+	[pgoyette, ticket #1981]
+



CVS commit: src/doc

2015-11-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  7 20:17:49 UTC 2015

Modified Files:
src/doc: 3RDPARTY

Log Message:
less-481 is out.


To generate a diff of this commit:
cvs rdiff -u -r1.1262 -r1.1263 src/doc/3RDPARTY

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1262 src/doc/3RDPARTY:1.1263
--- src/doc/3RDPARTY:1.1262	Fri Oct 23 18:09:42 2015
+++ src/doc/3RDPARTY	Sat Nov  7 20:17:49 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1262 2015/10/23 18:09:42 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1263 2015/11/07 20:17:49 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -662,7 +662,7 @@ directory.
 
 Package:	less
 Version:	less-458
-Current Vers:	less-458
+Current Vers:	less-481
 Maintainer:	Mark Nudelman 
 Archive Site:	http://www.greenwoodsoftware.com/less/download.html
 Home Page:	http://www.greenwoodsoftware.com/less/



CVS commit: [netbsd-5] src/sys/ufs/lfs

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:30:41 UTC 2015

Modified Files:
src/sys/ufs/lfs [netbsd-5]: lfs_segment.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1974):
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.213 -r1.213.8.1 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.213 src/sys/ufs/lfs/lfs_segment.c:1.213.8.1
--- src/sys/ufs/lfs/lfs_segment.c:1.213	Mon Jun  2 16:25:34 2008
+++ src/sys/ufs/lfs/lfs_segment.c	Sat Nov  7 20:30:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.213 2008/06/02 16:25:34 ad Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.213.8.1 2015/11/07 20:30:41 snj 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.213 2008/06/02 16:25:34 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.8.1 2015/11/07 20:30:41 snj Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -1669,7 +1669,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)
@@ -1700,7 +1700,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 = lfs_sntod(fs, sn);
 	lfs_newseg(fs);
 	fs->lfs_offset = fs->lfs_curseg;
 



CVS commit: [netbsd-5-1] src/sys/ufs/lfs

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:30:56 UTC 2015

Modified Files:
src/sys/ufs/lfs [netbsd-5-1]: lfs_segment.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1974):
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.213 -r1.213.18.1 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.213 src/sys/ufs/lfs/lfs_segment.c:1.213.18.1
--- src/sys/ufs/lfs/lfs_segment.c:1.213	Mon Jun  2 16:25:34 2008
+++ src/sys/ufs/lfs/lfs_segment.c	Sat Nov  7 20:30:56 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.213 2008/06/02 16:25:34 ad Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.213.18.1 2015/11/07 20:30:56 snj 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.213 2008/06/02 16:25:34 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.18.1 2015/11/07 20:30:56 snj Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -1669,7 +1669,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)
@@ -1700,7 +1700,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 = lfs_sntod(fs, sn);
 	lfs_newseg(fs);
 	fs->lfs_offset = fs->lfs_curseg;
 



CVS commit: [netbsd-5-2] src/sys/dev/mii

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:37:09 UTC 2015

Modified Files:
src/sys/dev/mii [netbsd-5-2]: atphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1978):
sys/dev/mii/atphy.c: revision 1.17
Fix incorrect argument of mii_anar(). Fixes PR#50206.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.2 -r1.5.2.2.6.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.5.2.2 src/sys/dev/mii/atphy.c:1.5.2.2.6.1
--- src/sys/dev/mii/atphy.c:1.5.2.2	Sun May  3 23:45:47 2009
+++ src/sys/dev/mii/atphy.c	Sat Nov  7 20:37:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.5.2.2 2009/05/03 23:45:47 snj Exp $ */
+/*	$NetBSD: atphy.c,v 1.5.2.2.6.1 2015/11/07 20:37:09 snj 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.5.2.2 2009/05/03 23:45:47 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.5.2.2.6.1 2015/11/07 20:37:09 snj Exp $");
 
 #include 
 #include 
@@ -202,7 +202,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-5] src/sys/dev/mii

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:35:53 UTC 2015

Modified Files:
src/sys/dev/mii [netbsd-5]: atphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1978):
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.5.2.2 -r1.5.2.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.5.2.2 src/sys/dev/mii/atphy.c:1.5.2.3
--- src/sys/dev/mii/atphy.c:1.5.2.2	Sun May  3 23:45:47 2009
+++ src/sys/dev/mii/atphy.c	Sat Nov  7 20:35:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.5.2.2 2009/05/03 23:45:47 snj Exp $ */
+/*	$NetBSD: atphy.c,v 1.5.2.3 2015/11/07 20:35:52 snj 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.5.2.2 2009/05/03 23:45:47 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.5.2.3 2015/11/07 20:35:52 snj Exp $");
 
 #include 
 #include 
@@ -202,7 +202,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-5-1] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:42:59 UTC 2015

Modified Files:
src/sys/kern [netbsd-5-1]: kern_exec.c kern_exit.c kern_synch.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1979):
sys/kern/kern_synch.c: revision 1.309
sys/kern/kern_exit.c: revisions 1.246, 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
--
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
--
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
--
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


To generate a diff of this commit:
cvs rdiff -u -r1.280.4.3 -r1.280.4.3.6.1 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.214.4.2 -r1.214.4.2.2.1 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.254.2.6 -r1.254.2.6.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.280.4.3 src/sys/kern/kern_exec.c:1.280.4.3.6.1
--- src/sys/kern/kern_exec.c:1.280.4.3	Wed Apr  1 21:03:04 2009
+++ src/sys/kern/kern_exec.c	Sat Nov  7 20:42:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.280.4.3.6.1 2015/11/07 20:42:59 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.280.4.3.6.1 2015/11/07 20:42:59 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_syscall_debug.h"
@@ -1104,7 +1104,7 @@ execve1(struct lwp *l, const char *path,
 	if (p->p_sflag & PS_STOPEXEC) {
 		KERNEL_UNLOCK_ALL(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();
 		sigclearall(p, , );

Index: src/sys/kern/kern_exit.c
diff -u src/sys/kern/kern_exit.c:1.214.4.2 src/sys/kern/kern_exit.c:1.214.4.2.2.1
--- src/sys/kern/kern_exit.c:1.214.4.2	Wed Jul  1 22:30:30 2009
+++ src/sys/kern/kern_exit.c	Sat Nov  7 20:42:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.214.4.2 2009/07/01 22:30:30 snj Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.214.4.2.2.1 2015/11/07 20:42:59 snj 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.214.4.2 2009/07/01 22:30:30 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.2.2.1 2015/11/07 20:42:59 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -234,8 +234,15 @@ exit1(struct lwp *l, int rv)
 	if (__predict_false(p->p_sflag & PS_STOPEXIT)) {
 		KERNEL_UNLOCK_ALL(l, >l_biglocks);
 		sigclearall(p, , );
+
+		if (!mutex_tryenter(proc_lock)) {
+			mutex_exit(p->p_lock);
+			mutex_enter(proc_lock);
+			mutex_enter(p->p_lock);
+		}
 		p->p_waited = 0;
-		membar_producer();
+		p->p_pptr->p_nstopchild++;
+		mutex_exit(proc_lock);
 		p->p_stat = SSTOP;
 		lwp_lock(l);
 		p->p_nrlwps--;
@@ -1011,7 +1018,7 @@ proc_reparent(struct proc *child, struct
 	if (child->p_pptr == parent)
 		return;
 
-	if (child->p_stat == SZOMB ||
+	if (child->p_stat == SZOMB || child->p_stat == SDEAD ||
 	(child->p_stat == SSTOP && !child->p_waited)) {
 		child->p_pptr->p_nstopchild--;
 		parent->p_nstopchild++;

Index: src/sys/kern/kern_synch.c
diff -u src/sys/kern/kern_synch.c:1.254.2.6 src/sys/kern/kern_synch.c:1.254.2.6.6.1
--- src/sys/kern/kern_synch.c:1.254.2.6	Thu Apr 23 17:47:13 2009
+++ src/sys/kern/kern_synch.c	Sat Nov  7 20:42:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_synch.c,v 1.254.2.6 2009/04/23 17:47:13 snj Exp $	*/
+/*	$NetBSD: 

CVS commit: [netbsd-5-2] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:42:26 UTC 2015

Modified Files:
src/sys/kern [netbsd-5-2]: kern_exec.c kern_exit.c kern_synch.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1979):
sys/kern/kern_synch.c: revision 1.309
sys/kern/kern_exit.c: revisions 1.246, 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
--
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
--
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
--
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


To generate a diff of this commit:
cvs rdiff -u -r1.280.4.3 -r1.280.4.3.10.1 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.214.4.2 -r1.214.4.2.6.1 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.254.2.6 -r1.254.2.6.10.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.280.4.3 src/sys/kern/kern_exec.c:1.280.4.3.10.1
--- src/sys/kern/kern_exec.c:1.280.4.3	Wed Apr  1 21:03:04 2009
+++ src/sys/kern/kern_exec.c	Sat Nov  7 20:42:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.280.4.3.10.1 2015/11/07 20:42:25 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.280.4.3.10.1 2015/11/07 20:42:25 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_syscall_debug.h"
@@ -1104,7 +1104,7 @@ execve1(struct lwp *l, const char *path,
 	if (p->p_sflag & PS_STOPEXEC) {
 		KERNEL_UNLOCK_ALL(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();
 		sigclearall(p, , );

Index: src/sys/kern/kern_exit.c
diff -u src/sys/kern/kern_exit.c:1.214.4.2 src/sys/kern/kern_exit.c:1.214.4.2.6.1
--- src/sys/kern/kern_exit.c:1.214.4.2	Wed Jul  1 22:30:30 2009
+++ src/sys/kern/kern_exit.c	Sat Nov  7 20:42:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.214.4.2 2009/07/01 22:30:30 snj Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.214.4.2.6.1 2015/11/07 20:42:25 snj 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.214.4.2 2009/07/01 22:30:30 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.2.6.1 2015/11/07 20:42:25 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -234,8 +234,15 @@ exit1(struct lwp *l, int rv)
 	if (__predict_false(p->p_sflag & PS_STOPEXIT)) {
 		KERNEL_UNLOCK_ALL(l, >l_biglocks);
 		sigclearall(p, , );
+
+		if (!mutex_tryenter(proc_lock)) {
+			mutex_exit(p->p_lock);
+			mutex_enter(proc_lock);
+			mutex_enter(p->p_lock);
+		}
 		p->p_waited = 0;
-		membar_producer();
+		p->p_pptr->p_nstopchild++;
+		mutex_exit(proc_lock);
 		p->p_stat = SSTOP;
 		lwp_lock(l);
 		p->p_nrlwps--;
@@ -1011,7 +1018,7 @@ proc_reparent(struct proc *child, struct
 	if (child->p_pptr == parent)
 		return;
 
-	if (child->p_stat == SZOMB ||
+	if (child->p_stat == SZOMB || child->p_stat == SDEAD ||
 	(child->p_stat == SSTOP && !child->p_waited)) {
 		child->p_pptr->p_nstopchild--;
 		parent->p_nstopchild++;

Index: src/sys/kern/kern_synch.c
diff -u src/sys/kern/kern_synch.c:1.254.2.6 src/sys/kern/kern_synch.c:1.254.2.6.10.1
--- src/sys/kern/kern_synch.c:1.254.2.6	Thu Apr 23 17:47:13 2009
+++ src/sys/kern/kern_synch.c	Sat Nov  7 20:42:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_synch.c,v 1.254.2.6 2009/04/23 17:47:13 snj Exp $	*/
+/*	$NetBSD: 

CVS commit: [netbsd-5-2] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:48:58 UTC 2015

Modified Files:
src/sys/kern [netbsd-5-2]: kern_exit.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1981):
sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.


To generate a diff of this commit:
cvs rdiff -u -r1.214.4.2.6.1 -r1.214.4.2.6.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.214.4.2.6.1 src/sys/kern/kern_exit.c:1.214.4.2.6.2
--- src/sys/kern/kern_exit.c:1.214.4.2.6.1	Sat Nov  7 20:42:25 2015
+++ src/sys/kern/kern_exit.c	Sat Nov  7 20:48:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.214.4.2.6.1 2015/11/07 20:42:25 snj Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.214.4.2.6.2 2015/11/07 20:48:58 snj 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.214.4.2.6.1 2015/11/07 20:42:25 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.2.6.2 2015/11/07 20:48:58 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -242,8 +242,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-5-1] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:49:19 UTC 2015

Modified Files:
src/sys/kern [netbsd-5-1]: kern_exit.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1981):
sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.


To generate a diff of this commit:
cvs rdiff -u -r1.214.4.2.2.1 -r1.214.4.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.214.4.2.2.1 src/sys/kern/kern_exit.c:1.214.4.2.2.2
--- src/sys/kern/kern_exit.c:1.214.4.2.2.1	Sat Nov  7 20:42:59 2015
+++ src/sys/kern/kern_exit.c	Sat Nov  7 20:49:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.214.4.2.2.1 2015/11/07 20:42:59 snj Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.214.4.2.2.2 2015/11/07 20:49:19 snj 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.214.4.2.2.1 2015/11/07 20:42:59 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.2.2.2 2015/11/07 20:49:19 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -242,8 +242,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-5] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:50:07 UTC 2015

Modified Files:
src/sys/kern [netbsd-5]: kern_exit.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1981):
sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.


To generate a diff of this commit:
cvs rdiff -u -r1.214.4.3 -r1.214.4.4 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.214.4.3 src/sys/kern/kern_exit.c:1.214.4.4
--- src/sys/kern/kern_exit.c:1.214.4.3	Sat Nov  7 20:43:23 2015
+++ src/sys/kern/kern_exit.c	Sat Nov  7 20:50:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.214.4.3 2015/11/07 20:43:23 snj Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.214.4.4 2015/11/07 20:50:07 snj 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.214.4.3 2015/11/07 20:43:23 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.4 2015/11/07 20:50:07 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -242,8 +242,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-5-2] src/doc

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:57:58 UTC 2015

Modified Files:
src/doc [netbsd-5-2]: CHANGES-5.2.4

Log Message:
tickets 1974, 1978-1981


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.35 -r1.1.2.36 src/doc/CHANGES-5.2.4

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-5.2.4
diff -u src/doc/CHANGES-5.2.4:1.1.2.35 src/doc/CHANGES-5.2.4:1.1.2.36
--- src/doc/CHANGES-5.2.4:1.1.2.35	Fri Aug 14 06:00:34 2015
+++ src/doc/CHANGES-5.2.4	Sat Nov  7 20:57:58 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2.4,v 1.1.2.35 2015/08/14 06:00:34 msaitoh Exp $
+# $NetBSD: CHANGES-5.2.4,v 1.1.2.36 2015/11/07 20:57:58 snj Exp $
 
 A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4
 release:
@@ -2696,3 +2696,76 @@ crypto/dist/openssl/util/mkerr.pl		patch
 	POODLE fix in October last year that caused the SSL server side	to
 	fail to handshake.
 	[spz, ticket#1976]
+
+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.  Only affects dumping from a mounted
+	file system.
+	[dholland, ticket #1974]
+
+sys/dev/mii/atphy.c1.17
+
+	Fix incorrect argument of mii_anar(). Fixes PR#50206.
+	[msaitoh, ticket #1978]
+
+sys/kern/kern_exec.c1.419, 1.420
+sys/kern/kern_exit.c1.246, 1.247
+sys/kern/kern_synch.c1.309
+
+	In execve_runproc(), update the p_waited entry for the process
+	being moved to SSTOP state, not for its parent.  If the value is
+	not already zero, it could prevent its parent from waiting for
+	the process.  Fixes PR kern/50298
+	--
+	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.  Fixes PR kern/50318
+	--
+	Currently, if a process is exiting and its parent has indicated
+	no intent of reaping the process (nor any other children), the
+	process will 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
+	--
+	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
+	--
+	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 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
+	[pgoyette, ticket #1979]
+
+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 #1980]
+
+sys/kern/kern_exit.c1.248
+
+	Update value of p_stat before we release the proc_lock.
+	[pgoyette, ticket #1981]
+



CVS commit: [netbsd-5] src/libexec/ftpd

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:33:26 UTC 2015

Modified Files:
src/libexec/ftpd [netbsd-5]: logwtmp.c

Log Message:
Pull up following revision(s) (requested by shm in ticket #1975):
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.24.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.24.1
--- src/libexec/ftpd/logwtmp.c:1.25	Sat Sep 23 16:03:50 2006
+++ src/libexec/ftpd/logwtmp.c	Sat Nov  7 20:33:26 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.24.1 2015/11/07 20:33:26 snj 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.24.1 2015/11/07 20:33:26 snj Exp $");
 #endif
 #endif /* not lint */
 
@@ -124,13 +124,12 @@ ftpd_logwtmpx(const char *line, const ch
 	if (fdx < 0) 
 		return;
 	if (fstat(fdx, ) == 0) {
+		(void)memset(, 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(_ss, >si_su, haddr->su_len);
-		else
-			(void)memset(_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-5-1] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:46:38 UTC 2015

Modified Files:
src/sys/kern [netbsd-5-1]: kern_sig.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1980):
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.


To generate a diff of this commit:
cvs rdiff -u -r1.289.4.6.2.1 -r1.289.4.6.2.2 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.289.4.6.2.1 src/sys/kern/kern_sig.c:1.289.4.6.2.2
--- src/sys/kern/kern_sig.c:1.289.4.6.2.1	Sat Mar 17 19:15:12 2012
+++ src/sys/kern/kern_sig.c	Sat Nov  7 20:46:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.289.4.6.2.1 2012/03/17 19:15:12 bouyer Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.289.4.6.2.2 2015/11/07 20:46:37 snj Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.6.2.1 2012/03/17 19:15:12 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.6.2.2 2015/11/07 20:46:37 snj Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_compat_sunos.h"
@@ -1391,14 +1391,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: src/external/mit/xorg/lib/pixman

2015-11-07 Thread Ryosuke Moro
Module Name:src
Committed By:   szptvlfn
Date:   Sat Nov  7 20:45:03 UTC 2015

Modified Files:
src/external/mit/xorg/lib/pixman: Makefile

Log Message:
change MKDEPFLAGS from
  -msse2 -mssse3 -mssse3 -fvisibility=hidden
to
  -msse2 -msse3 -mssse3 -fvisibility=hidden

OK dholland@ at tech-x11@


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/external/mit/xorg/lib/pixman/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/xorg/lib/pixman/Makefile
diff -u src/external/mit/xorg/lib/pixman/Makefile:1.33 src/external/mit/xorg/lib/pixman/Makefile:1.34
--- src/external/mit/xorg/lib/pixman/Makefile:1.33	Fri Nov  6 21:32:22 2015
+++ src/external/mit/xorg/lib/pixman/Makefile	Sat Nov  7 20:45:03 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.33 2015/11/06 21:32:22 szptvlfn Exp $
+#	$NetBSD: Makefile,v 1.34 2015/11/07 20:45:03 szptvlfn Exp $
 
 NOLINT=	1	# defined
 
@@ -61,7 +61,7 @@ SRCS+=	pixman-sse2.c pixman-ssse3.c
 COPTS.pixman-sse2.c=	-msse2 -fvisibility=hidden
 COPTS.pixman-ssse3.c=	-msse3 -mssse3 -fvisibility=hidden
 CPPFLAGS+=		-DUSE_SSE2 -DUSE_SSSE3
-MKDEPFLAGS+=		-msse2 -mssse3 -mssse3 -fvisibility=hidden
+MKDEPFLAGS+=		-msse2 -msse3 -mssse3 -fvisibility=hidden
 .endif
 
 .if ${MACHINE_ARCH} == "powerpc"



CVS commit: [netbsd-5] src/doc

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:52:40 UTC 2015

Modified Files:
src/doc [netbsd-5]: CHANGES-5.3

Log Message:
tickets 1972, 1974, 1975, 1978-1981


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.125 -r1.1.2.126 src/doc/CHANGES-5.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.125 src/doc/CHANGES-5.3:1.1.2.126
--- src/doc/CHANGES-5.3:1.1.2.125	Tue Sep 15 00:03:00 2015
+++ src/doc/CHANGES-5.3	Sat Nov  7 20:52:40 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.125 2015/09/15 00:03:00 riz Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.126 2015/11/07 20:52:40 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3990,3 +3990,91 @@ crypto/dist/openssl/util/mkerr.pl		patch
 	POODLE fix in October last year that caused the SSL server side	to
 	fail to handshake.
 	[spz, ticket#1976]
+
+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 #1972]
+
+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.  Only affects dumping from a mounted
+	file system.
+	[dholland, ticket #1974]
+
+libexec/ftpd/logwtmp.c1.26
+libexec/ftpd/logwtmp.c1.27
+
+	ftpd(8): Don't write uninitialized data to wtmpx files.
+	[shm, ticket #1975]
+
+sys/dev/mii/atphy.c1.17
+
+	Fix incorrect argument of mii_anar(). Fixes PR#50206.
+	[msaitoh, ticket #1978]
+
+sys/kern/kern_exec.c1.419, 1.420
+sys/kern/kern_exit.c1.246, 1.247
+sys/kern/kern_synch.c1.309
+
+	In execve_runproc(), update the p_waited entry for the process
+	being moved to SSTOP state, not for its parent.  If the value is
+	not already zero, it could prevent its parent from waiting for
+	the process.  Fixes PR kern/50298
+	--
+	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.  Fixes PR kern/50318
+	--
+	Currently, if a process is exiting and its parent has indicated
+	no intent of reaping the process (nor any other children), the
+	process will 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
+	--
+	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
+	--
+	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 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
+	[pgoyette, ticket #1979]
+
+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 #1980]
+
+sys/kern/kern_exit.c1.248
+
+	Update value of p_stat before we release the proc_lock.
+	[pgoyette, ticket #1981]
+



CVS commit: src/sys/arch/sparc64/sparc64

2015-11-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov  7 21:07:19 UTC 2015

Modified Files:
src/sys/arch/sparc64/sparc64: netbsd32_machdep.c

Log Message:
Convert siginfo to 32bit version before copying it out to 32bit userland.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/sparc64/sparc64/netbsd32_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/netbsd32_machdep.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.105 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.106
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.105	Sat Nov  7 11:47:09 2015
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c	Sat Nov  7 21:07:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.105 2015/11/07 11:47:09 martin Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.106 2015/11/07 21:07:18 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.105 2015/11/07 11:47:09 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.106 2015/11/07 21:07:18 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -316,6 +316,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;
@@ -336,15 +337,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(, 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(_stack, 0, sizeof(uc.uc_stack));
 
 	sendsig_reset(l, sig);
 
@@ -359,9 +361,10 @@ netbsd32_sendsig_siginfo(const ksiginfo_
 	 */
 	mutex_exit(p->p_lock);
 	cpu_getmcontext32(l, _mcontext, _flags);
+	netbsd32_si_to_si32(, (const siginfo_t *)>ksi_info);
 	ucsz = (int)(intptr_t)__uc_pad - (int)(intptr_t)
 	newsp = (struct rwindow32*)((intptr_t)fp - sizeof(struct frame32));
-	error = (copyout(>ksi_info, >sf_si, sizeof ksi->ksi_info) ||
+	error = (copyout(, >sf_si, sizeof si32) ||
 	copyout(, >sf_uc, ucsz) ||
 	suword(>rw_in[6], (intptr_t)oldsp));
 	mutex_enter(p->p_lock);



CVS commit: src

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 16:58:24 UTC 2015

Modified Files:
src/include/rpc: svc.h
src/lib/libc/rpc: svc_fdset.c

Log Message:
Put back NULL tests for allocation failures.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/include/rpc/svc.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/rpc/svc_fdset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/rpc/svc.h
diff -u src/include/rpc/svc.h:1.27 src/include/rpc/svc.h:1.28
--- src/include/rpc/svc.h:1.27	Fri Nov  6 14:42:57 2015
+++ src/include/rpc/svc.h	Sat Nov  7 11:58:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc.h,v 1.27 2015/11/06 19:42:57 christos Exp $	*/
+/*	$NetBSD: svc.h,v 1.28 2015/11/07 16:58:24 christos Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -316,8 +316,8 @@ extern fd_set  *svc_fdset_copy(const fd_
 
 extern void	svc_fdset_zero(void);
 extern int	svc_fdset_isset(int);
-extern void	svc_fdset_clr(int);
-extern void	svc_fdset_set(int);
+extern int	svc_fdset_clr(int);
+extern int	svc_fdset_set(int);
 
 extern fd_set  *svc_fdset_get(void);
 extern int	svc_fdset_getsize(int);

Index: src/lib/libc/rpc/svc_fdset.c
diff -u src/lib/libc/rpc/svc_fdset.c:1.6 src/lib/libc/rpc/svc_fdset.c:1.7
--- src/lib/libc/rpc/svc_fdset.c:1.6	Fri Nov  6 22:06:32 2015
+++ src/lib/libc/rpc/svc_fdset.c	Sat Nov  7 11:58:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc_fdset.c,v 1.6 2015/11/07 03:06:32 christos Exp $	*/
+/*	$NetBSD: svc_fdset.c,v 1.7 2015/11/07 16:58:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: svc_fdset.c,v 1.6 2015/11/07 03:06:32 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.7 2015/11/07 16:58:24 christos Exp $");
 
 
 #include "reentrant.h"
@@ -219,11 +219,14 @@ svc_fdset_zero(void)
 	fds->fdmax = -1;
 }
 
-void
+int
 svc_fdset_set(int fd)
 {
 	struct svc_fdset *fds = svc_fdset_alloc(fd);
 
+	if (fds == NULL)
+		return -1;
+
 	FD_SET(fd, fds->fdset);
 	if (fd > fds->fdmax)
 		fds->fdmax = fd;
@@ -231,6 +234,7 @@ svc_fdset_set(int fd)
 	DPRINTF_FDSET(fds, "%d", fd);
 
 	svc_fdset_sanitize(fds);
+	return 0;
 }
 
 int
@@ -238,20 +242,27 @@ svc_fdset_isset(int fd)
 {
 	struct svc_fdset *fds = svc_fdset_alloc(fd);
 
+	if (fds == NULL)
+		return -1;
+
 	DPRINTF_FDSET(fds, "%d", fd);
 
-	return FD_ISSET(fd, fds->fdset);
+	return FD_ISSET(fd, fds->fdset) != 0;
 }
 
-void
+int
 svc_fdset_clr(int fd)
 {
 	struct svc_fdset *fds = svc_fdset_alloc(fd);
 
+	if (fds == NULL)
+		return -1;
+
 	FD_CLR(fd, fds->fdset);
 	DPRINTF_FDSET(fds, "%d", fd);
 
 	svc_fdset_sanitize(fds);
+	return 0;
 }
 
 fd_set *
@@ -271,6 +282,9 @@ svc_fdset_get(void)
 {
 	struct svc_fdset *fds = svc_fdset_alloc(0);
 
+	if (fds == NULL)
+		return NULL;
+
 	DPRINTF_FDSET(fds, "get");
 	svc_fdset_sanitize(fds);
 	return fds->fdset;
@@ -281,6 +295,9 @@ svc_fdset_getmax(void)
 {
 	struct svc_fdset *fds = svc_fdset_alloc(0);
 
+	if (fds == NULL)
+		return NULL;
+
 	DPRINTF_FDSET(fds, "getmax");
 	svc_fdset_sanitize(fds);
 	return >fdmax;
@@ -291,6 +308,9 @@ svc_fdset_getsize(int fd)
 {
 	struct svc_fdset *fds = svc_fdset_alloc(fd);
 
+	if (fds == NULL)
+		return -1;
+
 	DPRINTF_FDSET(fds, "getsize");
 	return fds->fdsize;
 }



CVS commit: src/lib/libc/stdlib

2015-11-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  7 18:47:26 UTC 2015

Modified Files:
src/lib/libc/stdlib: posix_memalign.3

Log Message:
Use Dv for NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/stdlib/posix_memalign.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/stdlib/posix_memalign.3
diff -u src/lib/libc/stdlib/posix_memalign.3:1.2 src/lib/libc/stdlib/posix_memalign.3:1.3
--- src/lib/libc/stdlib/posix_memalign.3:1.2	Sat Nov  7 16:21:42 2015
+++ src/lib/libc/stdlib/posix_memalign.3	Sat Nov  7 18:47:26 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: posix_memalign.3,v 1.2 2015/11/07 16:21:42 nros Exp $
+.\"	$NetBSD: posix_memalign.3,v 1.3 2015/11/07 18:47:26 wiz Exp $
 .\"
 .\" Copyright (C) 2006 Jason Evans .
 .\" All rights reserved.
@@ -49,7 +49,7 @@ The
 function allocates
 .Fa size
 bytes of memory such that the allocation's base address is an even multiple of
-.Fa alignment , 
+.Fa alignment ,
 and returns the allocation in the value pointed to by
 .Fa ptr .
 The requested
@@ -86,7 +86,9 @@ function returns the value 0 if successf
 The
 .Fn aligned_alloc
 function returns a pointer to the allocated memory if successful; on failure it
-returns NULL and sets
+returns
+.Dv NULL
+and sets
 .Fa errno
 to indicate the error.
 .Sh ERRORS



CVS commit: src/lib/libc/stdlib

2015-11-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  7 18:46:37 UTC 2015

Modified Files:
src/lib/libc/stdlib: malloc.3

Log Message:
Sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libc/stdlib/malloc.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/stdlib/malloc.3
diff -u src/lib/libc/stdlib/malloc.3:1.45 src/lib/libc/stdlib/malloc.3:1.46
--- src/lib/libc/stdlib/malloc.3:1.45	Sat Nov  7 16:21:42 2015
+++ src/lib/libc/stdlib/malloc.3	Sat Nov  7 18:46:37 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: malloc.3,v 1.45 2015/11/07 16:21:42 nros Exp $
+.\" $NetBSD: malloc.3,v 1.46 2015/11/07 18:46:37 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -247,13 +247,13 @@ size = newsize;
 .Xr madvise 2 ,
 .Xr mmap 2 ,
 .Xr sbrk 2 ,
+.Xr aligned_alloc 3 ,
 .Xr alloca 3 ,
 .Xr atexit 3 ,
 .Xr getpagesize 3 ,
 .Xr memory 3 ,
 .Xr posix_memalign 3 ,
-.Xr reallocarr 3 ,
-.Xr aligned_alloc 3
+.Xr reallocarr 3
 .Pp
 For the implementation details, see
 .Xr jemalloc 3 .



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:37:03 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Ticket 1006.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 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.5 src/doc/CHANGES-7.0.1:1.1.2.6
--- src/doc/CHANGES-7.0.1:1.1.2.5	Thu Nov  5 09:35:43 2015
+++ src/doc/CHANGES-7.0.1	Sat Nov  7 16:37:03 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.5 2015/11/05 09:35:43 snj Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.6 2015/11/07 16:37:03 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -92,3 +92,8 @@ sys/kern/kern_exit.c1.248
 	Update value of p_stat before we release the proc_lock.
 	[pgoyette, ticket #999]
 
+sys/arch/arm/allwinner/awin_mmc.c		1.22
+
+	Avoid a divide by 0 when unplugging a sd card.
+	[bouyer, ticket #1006]
+



CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:43:39 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1006, 1007


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 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.21 src/doc/CHANGES-7.1:1.1.2.22
--- src/doc/CHANGES-7.1:1.1.2.21	Sat Nov  7 01:56:08 2015
+++ src/doc/CHANGES-7.1	Sat Nov  7 16:43:38 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.21 2015/11/07 01:56:08 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.22 2015/11/07 16:43:38 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -769,3 +769,13 @@ sys/arch/arm/allwinner/awin_gpio.c		1.19
 	to find which port is connected to which gpio instance.
 	[bouyer, ticket #1004]
 
+sys/arch/arm/allwinner/awin_mmc.c		1.22
+
+	Avoid a divide by 0 when unplugging a sd card.
+	[bouyer, ticket #1006]
+
+lib/libcurses/toucholap.c			1.16
+
+	Fix x/y editing error.
+	[uwe, ticket #1007]
+



CVS commit: src/usr.bin/patch

2015-11-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov  7 18:26:55 UTC 2015

Modified Files:
src/usr.bin/patch: patch.1

Log Message:
Explain what "-V none" does.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/patch/patch.1

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/patch/patch.1
diff -u src/usr.bin/patch/patch.1:1.19 src/usr.bin/patch/patch.1:1.20
--- src/usr.bin/patch/patch.1:1.19	Sun Aug  2 12:19:12 2015
+++ src/usr.bin/patch/patch.1	Sat Nov  7 18:26:55 2015
@@ -1,6 +1,6 @@
 .\"	$OpenBSD: patch.1,v 1.22 2008/06/06 20:44:00 jmc Exp $
 .\"	$DragonFly: src/usr.bin/patch/patch.1,v 1.10 2008/08/18 19:15:55 joerg Exp $
-.\"	$NetBSD: patch.1,v 1.19 2015/08/02 12:19:12 wiz Exp $
+.\"	$NetBSD: patch.1,v 1.20 2015/11/07 18:26:55 joerg Exp $
 .\" Copyright 1986, Larry Wall
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -21,7 +21,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd August 2, 2015
+.Dd November 7, 2015
 .Dt PATCH 1
 .Os
 .Sh NAME
@@ -296,6 +296,8 @@ Make numbered backups of files that alre
 simple backups of the others.
 .It Cm never , simple
 Always make simple backups.
+.It Cm none
+No backups are created.
 .El
 .It Fl v , Fl Fl version
 Causes



CVS commit: [netbsd-7-0] src/sys/arch/arm/allwinner

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:14:37 UTC 2015

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7-0]: awin_mmc.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1006):
sys/arch/arm/allwinner/awin_mmc.c: revision 1.22
Avoid a divide by 0 when unplugging a sd card.


To generate a diff of this commit:
cvs rdiff -u -r1.3.10.3 -r1.3.10.3.2.1 src/sys/arch/arm/allwinner/awin_mmc.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_mmc.c
diff -u src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3 src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3.2.1
--- src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3	Thu Dec  4 11:08:38 2014
+++ src/sys/arch/arm/allwinner/awin_mmc.c	Sat Nov  7 16:14:37 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $ */
+/* $NetBSD: awin_mmc.c,v 1.3.10.3.2.1 2015/11/07 16:14:37 riz Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.3.2.1 2015/11/07 16:14:37 riz Exp $");
 
 #include 
 #include 
@@ -510,7 +510,10 @@ awin_mmc_bus_clock(sdmmc_chipset_handle_
 		sdly = awin_chip_id() == AWIN_CHIP_ID_A31 ? 0 : 7;
 		clksrc = AWIN_SD_CLK_SRC_SEL_OSC24M;
 		n = 2;
-		m = ((osc24m_freq / (1 << n)) / freq) - 1;
+		if (freq > 0)
+			m = ((osc24m_freq / (1 << n)) / freq) - 1;
+		else
+			m = 15;
 	} else if (freq <= 25000) {
 		odly = 0;
 		sdly = 5;



CVS commit: [netbsd-7] src/sys/arch/arm/allwinner

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:15:03 UTC 2015

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_mmc.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1006):
sys/arch/arm/allwinner/awin_mmc.c: revision 1.22
Avoid a divide by 0 when unplugging a sd card.


To generate a diff of this commit:
cvs rdiff -u -r1.3.10.3 -r1.3.10.4 src/sys/arch/arm/allwinner/awin_mmc.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_mmc.c
diff -u src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3 src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.4
--- src/sys/arch/arm/allwinner/awin_mmc.c:1.3.10.3	Thu Dec  4 11:08:38 2014
+++ src/sys/arch/arm/allwinner/awin_mmc.c	Sat Nov  7 16:15:03 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $ */
+/* $NetBSD: awin_mmc.c,v 1.3.10.4 2015/11/07 16:15:03 riz Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.3 2014/12/04 11:08:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.3.10.4 2015/11/07 16:15:03 riz Exp $");
 
 #include 
 #include 
@@ -510,7 +510,10 @@ awin_mmc_bus_clock(sdmmc_chipset_handle_
 		sdly = awin_chip_id() == AWIN_CHIP_ID_A31 ? 0 : 7;
 		clksrc = AWIN_SD_CLK_SRC_SEL_OSC24M;
 		n = 2;
-		m = ((osc24m_freq / (1 << n)) / freq) - 1;
+		if (freq > 0)
+			m = ((osc24m_freq / (1 << n)) / freq) - 1;
+		else
+			m = 15;
 	} else if (freq <= 25000) {
 		odly = 0;
 		sdly = 5;



CVS commit: src/lib/libc/rpc

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 17:34:33 UTC 2015

Modified Files:
src/lib/libc/rpc: svc.c svc_run.c svc_vc.c

Log Message:
check for errors and recover instead of core-dumping.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/lib/libc/rpc/svc.c
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/rpc/svc_run.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/rpc/svc_vc.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/libc/rpc/svc.c
diff -u src/lib/libc/rpc/svc.c:1.35 src/lib/libc/rpc/svc.c:1.36
--- src/lib/libc/rpc/svc.c:1.35	Fri Nov  6 14:34:13 2015
+++ src/lib/libc/rpc/svc.c	Sat Nov  7 12:34:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc.c,v 1.35 2015/11/06 19:34:13 christos Exp $	*/
+/*	$NetBSD: svc.c,v 1.36 2015/11/07 17:34:33 christos Exp $	*/
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -37,7 +37,7 @@
 static char *sccsid = "@(#)svc.c 1.44 88/02/08 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)svc.c	2.4 88/08/11 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: svc.c,v 1.35 2015/11/06 19:34:13 christos Exp $");
+__RCSID("$NetBSD: svc.c,v 1.36 2015/11/07 17:34:33 christos Exp $");
 #endif
 #endif
 
@@ -179,7 +179,8 @@ xprt_register(SVCXPRT *xprt)
 
 	__svc_xports[sock] = xprt;
 	if (sock != -1) {
-		svc_fdset_set(sock);
+		if (svc_fdset_set(sock) == -1)
+			return FALSE;
 	}
 	rwlock_unlock(_fd_lock);
 	return (TRUE);
@@ -222,7 +223,7 @@ __xprt_do_unregister(SVCXPRT *xprt, bool
 	if (sock == -1)
 		goto out;
 	fdmax = svc_fdset_getmax();
-	if (sock < *fdmax)
+	if (fdmax == NULL || sock < *fdmax)
 		goto clr;
 
 	for ((*fdmax)--; *fdmax >= 0; (*fdmax)--)
@@ -634,6 +635,8 @@ void
 svc_getreq(int rdfds)
 {
 	fd_set *readfds = svc_fdset_copy(NULL);
+	if (readfds == NULL)
+		return;
 
 	readfds->fds_bits[0] = (unsigned int)rdfds;
 	svc_getreqset(readfds);
@@ -771,7 +774,7 @@ svc_getreq_poll(struct pollfd *pfdp, int
 			 *	via someone select()ing from svc_fdset or
 			 *	pollts()ing from svc_pollset[].  Thus it's safe
 			 *	to handle the POLLNVAL event by simply turning
-			 *	the corresponding bit off in svc_fdset.  The
+			 *	the corresponding bit off in the fdset.  The
 			 *	svc_pollset[] array is derived from svc_fdset
 			 *	and so will also be updated eventually.
 			 *

Index: src/lib/libc/rpc/svc_run.c
diff -u src/lib/libc/rpc/svc_run.c:1.23 src/lib/libc/rpc/svc_run.c:1.24
--- src/lib/libc/rpc/svc_run.c:1.23	Fri Nov  6 14:34:13 2015
+++ src/lib/libc/rpc/svc_run.c	Sat Nov  7 12:34:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc_run.c,v 1.23 2015/11/06 19:34:13 christos Exp $	*/
+/*	$NetBSD: svc_run.c,v 1.24 2015/11/07 17:34:33 christos Exp $	*/
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -37,7 +37,7 @@
 static char *sccsid = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)svc_run.c	2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: svc_run.c,v 1.23 2015/11/06 19:34:13 christos Exp $");
+__RCSID("$NetBSD: svc_run.c,v 1.24 2015/11/07 17:34:33 christos Exp $");
 #endif
 #endif
 
@@ -69,7 +69,7 @@ svc_run(void)
 {
 	fd_set *readfds, *cleanfds;
 	struct timeval timeout;
-	int maxfd, fdsize;
+	int *maxfd, fdsize;
 #ifndef RUMP_RPC		
 	int probs = 0;
 #endif
@@ -92,9 +92,13 @@ svc_run(void)
 			free(cleanfds);
 			cleanfds = svc_fdset_copy(svc_fdset_get());
 		}
-		maxfd = *svc_fdset_getmax();
+		maxfd = svc_fdset_getmax();
+		if (maxfd == NULL) {
+			warn("can't get maxfd");
+			continue;
+		}
 		rwlock_unlock(_fd_lock);
-		switch (select(maxfd + 1, readfds, NULL, NULL, )) {
+		switch (select(*maxfd + 1, readfds, NULL, NULL, )) {
 		case -1:
 #ifndef RUMP_RPC		
 			if ((errno == EINTR || errno == EBADF) && probs < 100) {
@@ -108,10 +112,12 @@ svc_run(void)
 			warn("%s: select failed", __func__);
 			goto out;
 		case 0:
-			__svc_clean_idle(cleanfds, 30, FALSE);
+			if (cleanfds)
+__svc_clean_idle(cleanfds, 30, FALSE);
 			continue;
 		default:
-			svc_getreqset2(readfds, fdsize);
+			if (readfds)
+svc_getreqset2(readfds, fdsize);
 #ifndef RUMP_RPC
 			probs = 0;
 #endif

Index: src/lib/libc/rpc/svc_vc.c
diff -u src/lib/libc/rpc/svc_vc.c:1.31 src/lib/libc/rpc/svc_vc.c:1.32
--- src/lib/libc/rpc/svc_vc.c:1.31	Fri Nov  6 14:34:13 2015
+++ src/lib/libc/rpc/svc_vc.c	Sat Nov  7 12:34:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc_vc.c,v 1.31 2015/11/06 19:34:13 christos Exp $	*/
+/*	$NetBSD: svc_vc.c,v 1.32 2015/11/07 17:34:33 christos Exp $	*/
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -37,7 +37,7 @@
 static char *sccsid = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)svc_tcp.c	2.2 88/08/01 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: svc_vc.c,v 1.31 2015/11/06 19:34:13 christos Exp $");
+__RCSID("$NetBSD: svc_vc.c,v 1.32 2015/11/07 17:34:33 christos Exp $");
 #endif
 #endif
 
@@ -329,7 +329,9 @@ again:
 		 */
 		if (errno == EMFILE || errno == ENFILE) {
 			fd_set *cleanfds = 

CVS commit: src/lib/libm/man

2015-11-07 Thread Niclas Rosenvik
Module Name:src
Committed By:   nros
Date:   Sat Nov  7 18:17:51 UTC 2015

Modified Files:
src/lib/libm/man: erf.3

Log Message:
Fix typo in erfl synopsis.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libm/man/erf.3

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/man/erf.3
diff -u src/lib/libm/man/erf.3:1.13 src/lib/libm/man/erf.3:1.14
--- src/lib/libm/man/erf.3:1.13	Mon Nov 17 16:53:23 2014
+++ src/lib/libm/man/erf.3	Sat Nov  7 18:17:51 2015
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)erf.3	6.4 (Berkeley) 4/20/91
-.\"	$NetBSD: erf.3,v 1.13 2014/11/17 16:53:23 christos Exp $
+.\"	$NetBSD: erf.3,v 1.14 2015/11/07 18:17:51 nros Exp $
 .\"
-.Dd November 17, 2014
+.Dd November 7, 2015
 .Dt ERF 3
 .Os
 .Sh NAME
@@ -48,7 +48,7 @@
 .Ft float
 .Fn erff "float x"
 .Ft long double
-.Fn erff "long double x"
+.Fn erfl "long double x"
 .Ft double
 .Fn erfc "double x"
 .Ft float



CVS commit: [netbsd-7] src/lib/libcurses

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov  7 16:38:22 UTC 2015

Modified Files:
src/lib/libcurses [netbsd-7]: toucholap.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1007):
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.54.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.54.1
--- src/lib/libcurses/toucholap.c:1.15	Sun Jan 21 13:25:36 2007
+++ src/lib/libcurses/toucholap.c	Sat Nov  7 16:38:22 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.54.1 2015/11/07 16:38:22 riz 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.54.1 2015/11/07 16:38:22 riz 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: src/external/gpl3/gcc.old/dist

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 16:54:00 UTC 2015

Modified Files:
src/external/gpl3/gcc.old/dist/libgcc/config/alpha: qrnnd.S
src/external/gpl3/gcc.old/dist/libgcc/config/i386: morestack.S
src/external/gpl3/gcc.old/dist/libitm/config/alpha: sjlj.S
src/external/gpl3/gcc.old/dist/libitm/config/arm: sjlj.S
src/external/gpl3/gcc.old/dist/libitm/config/powerpc: sjlj.S
src/external/gpl3/gcc.old/dist/libitm/config/s390: sjlj.S
src/external/gpl3/gcc.old/dist/libitm/config/sh: sjlj.S
src/external/gpl3/gcc.old/dist/libitm/config/sparc: sjlj.S
src/external/gpl3/gcc.old/dist/libitm/config/x86: sjlj.S
src/external/gpl3/gcc.old/dist/libsanitizer/tsan: tsan_rtl_amd64.S

Log Message:
Apply the GNU-stack fixes to the old branch.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libgcc/config/alpha/qrnnd.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libgcc/config/i386/morestack.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libitm/config/alpha/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libitm/config/arm/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libitm/config/powerpc/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libitm/config/s390/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libitm/config/sh/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libitm/config/sparc/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libitm/config/x86/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/libsanitizer/tsan/tsan_rtl_amd64.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc.old/dist/libgcc/config/alpha/qrnnd.S
diff -u src/external/gpl3/gcc.old/dist/libgcc/config/alpha/qrnnd.S:1.1.1.1 src/external/gpl3/gcc.old/dist/libgcc/config/alpha/qrnnd.S:1.2
--- src/external/gpl3/gcc.old/dist/libgcc/config/alpha/qrnnd.S:1.1.1.1	Tue Sep 22 23:03:05 2015
+++ src/external/gpl3/gcc.old/dist/libgcc/config/alpha/qrnnd.S	Sat Nov  7 11:53:59 2015
@@ -22,8 +22,9 @@
  # see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  # .
 
-#ifdef __ELF__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack,""
+.previous
 #endif
 
 .set noreorder

Index: src/external/gpl3/gcc.old/dist/libgcc/config/i386/morestack.S
diff -u src/external/gpl3/gcc.old/dist/libgcc/config/i386/morestack.S:1.1.1.1 src/external/gpl3/gcc.old/dist/libgcc/config/i386/morestack.S:1.2
--- src/external/gpl3/gcc.old/dist/libgcc/config/i386/morestack.S:1.1.1.1	Tue Sep 22 23:03:05 2015
+++ src/external/gpl3/gcc.old/dist/libgcc/config/i386/morestack.S	Sat Nov  7 11:53:59 2015
@@ -853,7 +853,7 @@ __morestack_make_guard:
 	.quad	__morestack_load_mmap
 #endif
 
-#ifdef __ELF__
+#if defined(__ELF__) && defined(__linux__)
 	.section	.note.GNU-stack,"",@progbits
 	.section	.note.GNU-split-stack,"",@progbits
 	.section	.note.GNU-no-split-stack,"",@progbits

Index: src/external/gpl3/gcc.old/dist/libitm/config/alpha/sjlj.S
diff -u src/external/gpl3/gcc.old/dist/libitm/config/alpha/sjlj.S:1.1.1.1 src/external/gpl3/gcc.old/dist/libitm/config/alpha/sjlj.S:1.2
--- src/external/gpl3/gcc.old/dist/libitm/config/alpha/sjlj.S:1.1.1.1	Tue Sep 22 23:03:04 2015
+++ src/external/gpl3/gcc.old/dist/libitm/config/alpha/sjlj.S	Sat Nov  7 11:53:59 2015
@@ -107,6 +107,6 @@ GTM_longjmp:
 	ret
 .end GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", @progbits
 #endif

Index: src/external/gpl3/gcc.old/dist/libitm/config/arm/sjlj.S
diff -u src/external/gpl3/gcc.old/dist/libitm/config/arm/sjlj.S:1.1.1.1 src/external/gpl3/gcc.old/dist/libitm/config/arm/sjlj.S:1.2
--- src/external/gpl3/gcc.old/dist/libitm/config/arm/sjlj.S:1.1.1.1	Tue Sep 22 23:03:04 2015
+++ src/external/gpl3/gcc.old/dist/libitm/config/arm/sjlj.S	Sat Nov  7 11:53:59 2015
@@ -159,6 +159,6 @@ GTM_longjmp:
 	cfi_endproc
 	.size	GTM_longjmp, . - GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", %progbits
 #endif

Index: src/external/gpl3/gcc.old/dist/libitm/config/powerpc/sjlj.S
diff -u src/external/gpl3/gcc.old/dist/libitm/config/powerpc/sjlj.S:1.1.1.1 src/external/gpl3/gcc.old/dist/libitm/config/powerpc/sjlj.S:1.2
--- src/external/gpl3/gcc.old/dist/libitm/config/powerpc/sjlj.S:1.1.1.1	Tue Sep 22 23:03:04 2015
+++ src/external/gpl3/gcc.old/dist/libitm/config/powerpc/sjlj.S	Sat Nov  7 11:53:59 2015
@@ -428,6 +428,6 @@ FUNC GTM_longjmp
 	cfi_endproc
 END GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", @progbits
 #endif

Index: 

CVS commit: src/external/gpl3/gcc/dist

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 16:53:08 UTC 2015

Modified Files:
src/external/gpl3/gcc/dist/libgcc/config/alpha: qrnnd.S
src/external/gpl3/gcc/dist/libgcc/config/i386: morestack.S
src/external/gpl3/gcc/dist/libitm/config/alpha: sjlj.S
src/external/gpl3/gcc/dist/libitm/config/arm: sjlj.S
src/external/gpl3/gcc/dist/libitm/config/powerpc: sjlj.S
src/external/gpl3/gcc/dist/libitm/config/s390: sjlj.S
src/external/gpl3/gcc/dist/libitm/config/sh: sjlj.S
src/external/gpl3/gcc/dist/libitm/config/sparc: sjlj.S
src/external/gpl3/gcc/dist/libitm/config/x86: sjlj.S
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_rtl_amd64.S

Log Message:
Fix inconsistencies with GNU-stack note:
- always use __ELF__ && __linux, not just __ELF__ or just __linux__
- remember to pop back to the previous section where it is missing
XXX: need to file this bug with the GNU folks.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libitm/config/s390/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libitm/config/sh/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libitm/config/sparc/sjlj.S
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libitm/config/x86/sjlj.S
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S
diff -u src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S:1.1.1.1 src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S:1.2
--- src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S:1.1.1.1	Sat Mar  1 03:41:46 2014
+++ src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S	Sat Nov  7 11:53:07 2015
@@ -22,8 +22,9 @@
  # see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  # .
 
-#ifdef __ELF__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack,""
+.previous
 #endif
 
 .set noreorder

Index: src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S
diff -u src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S:1.1.1.1 src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S:1.2
--- src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S:1.1.1.1	Sat Mar  1 03:41:47 2014
+++ src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S	Sat Nov  7 11:53:07 2015
@@ -853,7 +853,7 @@ __morestack_make_guard:
 	.quad	__morestack_load_mmap
 #endif
 
-#ifdef __ELF__
+#if defined(__ELF__) && defined(__linux__)
 	.section	.note.GNU-stack,"",@progbits
 	.section	.note.GNU-split-stack,"",@progbits
 	.section	.note.GNU-no-split-stack,"",@progbits

Index: src/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S
diff -u src/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S:1.1.1.1 src/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S:1.2
--- src/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S:1.1.1.1	Sat Mar  1 03:41:18 2014
+++ src/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S	Sat Nov  7 11:53:08 2015
@@ -107,6 +107,6 @@ GTM_longjmp:
 	ret
 .end GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", @progbits
 #endif

Index: src/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S
diff -u src/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S:1.1.1.1 src/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S:1.2
--- src/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S:1.1.1.1	Sat Mar  1 03:41:18 2014
+++ src/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S	Sat Nov  7 11:53:08 2015
@@ -159,6 +159,6 @@ GTM_longjmp:
 	cfi_endproc
 	.size	GTM_longjmp, . - GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", %progbits
 #endif

Index: src/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S
diff -u src/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S:1.1.1.2 src/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S:1.2
--- src/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S:1.1.1.2	Tue May 27 04:40:03 2014
+++ src/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S	Sat Nov  7 11:53:08 2015
@@ -428,6 +428,6 @@ FUNC GTM_longjmp
 	cfi_endproc
 END GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", @progbits
 #endif

Index: 

CVS commit: [netbsd-6-1] src/external/bsd/ntp/dist/sntp/libevent

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 22:49:41 UTC 2015

Added Files:
src/external/bsd/ntp/dist/sntp/libevent [netbsd-6-1]: evlog.c
src/external/bsd/ntp/dist/sntp/libevent/include/event2 [netbsd-6-1]:
event-config.h

Log Message:
Pull up following revision(s) (requested by christos in ticket #1342):
external/bsd/ntp/dist/sntp/libevent/evlog.c: patch
external/bsd/ntp/dist/sntp/libevent/include/event2/event-config.h: patch
Update ntp to 4.2.8p4.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.4.2 src/external/bsd/ntp/dist/sntp/libevent/evlog.c
cvs rdiff -u -r0 -r1.1.4.2 \
src/external/bsd/ntp/dist/sntp/libevent/include/event2/event-config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/ntp/dist/sntp/libevent/evlog.c
diff -u /dev/null src/external/bsd/ntp/dist/sntp/libevent/evlog.c:1.1.4.2
--- /dev/null	Sat Nov  7 22:49:41 2015
+++ src/external/bsd/ntp/dist/sntp/libevent/evlog.c	Sat Nov  7 22:49:40 2015
@@ -0,0 +1,255 @@
+/*	$NetBSD: evlog.c,v 1.1.4.2 2015/11/07 22:49:40 snj Exp $	*/
+
+/*	$OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $	*/
+
+/*
+ * log.c
+ *
+ * Based on err.c, which was adapted from OpenBSD libc *err* *warn* code.
+ *
+ * Copyright (c) 2005-2012 Niels Provos and Nick Mathewson
+ *
+ * Copyright (c) 2000 Dug Song 
+ *
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#include 
+#define WIN32_LEAN_AND_MEAN
+#include 
+#undef WIN32_LEAN_AND_MEAN
+#endif
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "event2/event.h"
+#include "event2/util.h"
+
+#include "log-internal.h"
+
+static void event_log(int severity, const char *msg);
+static void event_exit(int errcode) EV_NORETURN;
+
+static event_fatal_cb fatal_fn = NULL;
+
+#ifdef EVENT_DEBUG_LOGGING_ENABLED
+#ifdef USE_DEBUG
+#define DEFAULT_MASK EVENT_DBG_ALL
+#else
+#define DEFAULT_MASK 0
+#endif
+
+#ifdef USE_GLOBAL_FOR_DEBUG_LOGGING
+ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
+#else
+static ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
+ev_uint32_t
+event_debug_get_logging_mask_(void)
+{
+	return event_debug_logging_mask_;
+}
+#endif
+#endif /* EVENT_DEBUG_LOGGING_ENABLED */
+
+void
+event_enable_debug_logging(ev_uint32_t which)
+{
+#ifdef EVENT_DEBUG_LOGGING_ENABLED
+	event_debug_logging_mask_ = which;
+#endif
+}
+
+void
+event_set_fatal_callback(event_fatal_cb cb)
+{
+	fatal_fn = cb;
+}
+
+static void
+event_exit(int errcode)
+{
+	if (fatal_fn) {
+		fatal_fn(errcode);
+		exit(errcode); /* should never be reached */
+	} else if (errcode == EVENT_ERR_ABORT_)
+		abort();
+	else
+		exit(errcode);
+}
+
+void
+event_err(int eval, const char *fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	event_logv_(EVENT_LOG_ERR, strerror(errno), fmt, ap);
+	va_end(ap);
+	event_exit(eval);
+}
+
+void
+event_warn(const char *fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	event_logv_(EVENT_LOG_WARN, strerror(errno), fmt, ap);
+	va_end(ap);
+}
+
+void
+event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...)
+{
+	va_list ap;
+	int err = evutil_socket_geterror(sock);
+
+	va_start(ap, fmt);
+	event_logv_(EVENT_LOG_ERR, evutil_socket_error_to_string(err), fmt, ap);
+	

CVS commit: [netbsd-6-1] src/doc

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 22:50:18 UTC 2015

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
1342


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.46 -r1.1.2.47 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.46 src/doc/CHANGES-6.1.6:1.1.2.47
--- src/doc/CHANGES-6.1.6:1.1.2.46	Sun Aug  2 12:53:39 2015
+++ src/doc/CHANGES-6.1.6	Sat Nov  7 22:50:18 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.46 2015/08/02 12:53:39 martin Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.47 2015/11/07 22:50:18 snj Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -5990,4 +5990,744 @@ sys/compat/netbsd32/netbsd32_ioctl.c		1.
 	Fix inverted logic when checking the size of data to copyin().
 	[maxv, ticket #1318]
 
+doc/3RDPARTY	patch
+external/bsd/ntp/Makefile.inc   patch
+external/bsd/ntp/bin/ntpd/Makefile  patch
+external/bsd/ntp/bin/ntpd/ntp_parser.c  patch
+external/bsd/ntp/bin/ntpd/ntp_parser.h  patch
+external/bsd/ntp/bin/sntp/Makefile  patch
+external/bsd/ntp/bin/sntp/event2/event-config.h delete
+external/bsd/ntp/bin/sntp/evlog.c   delete
+external/bsd/ntp/dist/COPYRIGHT up to 1.1.1.5
+external/bsd/ntp/dist/ChangeLog up to 1.1.1.7
+external/bsd/ntp/dist/CommitLog up to 1.1.1.7
+external/bsd/ntp/dist/Makefile.am   up to 1.1.1.7
+external/bsd/ntp/dist/Makefile.in   up to 1.1.1.7
+external/bsd/ntp/dist/NEWS  up to 1.1.1.7
+external/bsd/ntp/dist/README.leapsmear  up to 1.1.1.1
+external/bsd/ntp/dist/aclocal.m4up to 1.1.1.7
+external/bsd/ntp/dist/adjtimed/Makefile.in  up to 1.1.1.7
+external/bsd/ntp/dist/adjtimed/adjtimed.c   up to 1.4
+external/bsd/ntp/dist/bootstrap up to 1.1.1.5
+external/bsd/ntp/dist/build up to 1.1.1.5
+external/bsd/ntp/dist/clockstuff/Makefile.inup to 1.1.1.7
+external/bsd/ntp/dist/clockstuff/chutest.c  up to 1.4
+external/bsd/ntp/dist/clockstuff/propdelay.cup to 1.4
+external/bsd/ntp/dist/config.h.in   up to 1.1.1.6
+external/bsd/ntp/dist/configure up to 1.1.1.7
+external/bsd/ntp/dist/configure.ac  up to 1.1.1.7
+external/bsd/ntp/dist/html/build.html   up to 1.1.1.4
+external/bsd/ntp/dist/html/confopt.html up to 1.1.1.4
+external/bsd/ntp/dist/html/copyright.html   up to 1.1.1.5
+external/bsd/ntp/dist/html/decode.html  up to 1.1.1.5
+external/bsd/ntp/dist/html/drivers/driver22.html up to 1.1.1.4
+external/bsd/ntp/dist/html/drivers/driver28.html up to 1.1.1.4
+external/bsd/ntp/dist/html/drivers/driver40-ja.html up to 1.1.1.1
+external/bsd/ntp/dist/html/drivers/driver40.html up to 1.1.1.4
+external/bsd/ntp/dist/html/drivers/driver46.html up to 1.1.1.2
+external/bsd/ntp/dist/html/miscopt.html up to 1.1.1.6
+external/bsd/ntp/dist/html/refclock.htmlup to 1.1.1.4
+external/bsd/ntp/dist/html/sntp.htmlup to 1.1.1.4
+external/bsd/ntp/dist/html/stats.html   up to 1.1.1.3
+external/bsd/ntp/dist/include/Makefile.am   up to 1.1.1.6
+external/bsd/ntp/dist/include/Makefile.in   up to 1.1.1.7
+external/bsd/ntp/dist/include/binio.h   up to 1.4
+external/bsd/ntp/dist/include/isc/Makefile.in   up to 1.1.1.7
+external/bsd/ntp/dist/include/mbg_gps166.h  up to 1.4
+external/bsd/ntp/dist/include/ntp.h up to 1.4
+external/bsd/ntp/dist/include/ntp_assert.h  up to 1.4
+external/bsd/ntp/dist/include/ntp_calendar.hup to 1.5
+external/bsd/ntp/dist/include/ntp_config.h  up to 1.9
+external/bsd/ntp/dist/include/ntp_control.h up to 1.4
+external/bsd/ntp/dist/include/ntp_fp.h  up to 1.7
+external/bsd/ntp/dist/include/ntp_io.h  up to 1.3
+external/bsd/ntp/dist/include/ntp_lists.h   up to 1.4
+external/bsd/ntp/dist/include/ntp_md5.h up to 1.4
+external/bsd/ntp/dist/include/ntp_stdlib.h  up to 1.11
+external/bsd/ntp/dist/include/ntp_syslog.h  up to 1.4
+external/bsd/ntp/dist/include/ntp_types.h   up to 1.4
+external/bsd/ntp/dist/include/ntpd.hup to 1.7
+external/bsd/ntp/dist/include/parse.h   up to 1.4
+external/bsd/ntp/dist/include/parse_conf.h  up to 1.4
+external/bsd/ntp/dist/include/rc_cmdlength.hup to 1.1.1.1
+external/bsd/ntp/dist/include/refidsmear.h  up to 1.1.1.2
+external/bsd/ntp/dist/include/timepps-Solaris.h up to 1.4
+external/bsd/ntp/dist/kernel/Makefile.inup to 1.1.1.7
+external/bsd/ntp/dist/kernel/sys/Makefile.inup to 1.1.1.7
+external/bsd/ntp/dist/kernel/sys/parsestreams.h up to 1.4
+external/bsd/ntp/dist/lib/isc/include/isc/backtrace.h up to 1.4

CVS commit: src/include/rpc

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 23:10:38 UTC 2015

Modified Files:
src/include/rpc: svc.h

Log Message:
provide a poll(2) based interface.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/include/rpc/svc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/rpc/svc.h
diff -u src/include/rpc/svc.h:1.28 src/include/rpc/svc.h:1.29
--- src/include/rpc/svc.h:1.28	Sat Nov  7 11:58:24 2015
+++ src/include/rpc/svc.h	Sat Nov  7 18:10:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc.h,v 1.28 2015/11/07 16:58:24 christos Exp $	*/
+/*	$NetBSD: svc.h,v 1.29 2015/11/07 23:10:37 christos Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -296,6 +296,8 @@ extern fd_set svc_fdset;
 #else
 #define svc_maxfd (*svc_fdset_getmax())
 #define svc_fdset (*svc_fdset_get())
+#define svc_pollfd svc_pollfd_get()
+#define svc_max_pollfd (*svc_fdset_getmax())
 #endif
 
 #define svc_fds svc_fdset.fds_bits[0]	/* compatibility */
@@ -310,9 +312,10 @@ __END_DECLS
 
 __BEGIN_DECLS
 
-#define SVC_FDSET_MT	1
+#define SVC_FDSET_MT	1	/* each thread gets own fd_set/pollfd */
+#define SVC_FDSET_POLL	2	/* use poll in svc_run */
 extern void	svc_fdset_init(int);
-extern fd_set  *svc_fdset_copy(const fd_set *);
+
 
 extern void	svc_fdset_zero(void);
 extern int	svc_fdset_isset(int);
@@ -322,6 +325,12 @@ extern int	svc_fdset_set(int);
 extern fd_set  *svc_fdset_get(void);
 extern int	svc_fdset_getsize(int);
 extern int *svc_fdset_getmax(void);
+extern fd_set  *svc_fdset_copy(const fd_set *);
+
+extern struct pollfd *svc_pollfd_get(void);
+extern int	svc_pollfd_getsize(int);
+extern int *svc_pollfd_getmax(void);
+extern struct pollfd *svc_pollfd_copy(const struct pollfd *);
 
 extern void	svc_getreq	(int);
 extern void	svc_getreqset	(fd_set *);



CVS commit: src/doc

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 23:16:00 UTC 2015

Modified Files:
src/doc: CHANGES

Log Message:
Mention TI-RPC changes.


To generate a diff of this commit:
cvs rdiff -u -r1.2111 -r1.2112 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.2111 src/doc/CHANGES:1.2112
--- src/doc/CHANGES:1.2111	Sun Nov  1 19:50:47 2015
+++ src/doc/CHANGES	Sat Nov  7 18:16:00 2015
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2111 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2112 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -210,3 +210,8 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	ntp: Import ntp 4.2.8p4. [christos 20151023]
 	vioscsi(4): Add driver for virtio SCSI devices [christos 20151030]
 	omapgpio(4): Add support for TI AM335x GPIO. [jmcneill 20151101]
+	libc/ti-rpc: Remove FD_SETSIZE limit; provide MT support for svc_run()
+		to be run by multiple threads each thread handling the fd's it
+		created. Provide support for a poll based svc_run() and the
+		global variables svc_pollfd and svc_pollfd_max.
+		[christos 20151107]



CVS commit: src/lib/libc/rpc

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 23:17:09 UTC 2015

Modified Files:
src/lib/libc/rpc: svc_fdset.c

Log Message:
initialize revents too.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/rpc/svc_fdset.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/libc/rpc/svc_fdset.c
diff -u src/lib/libc/rpc/svc_fdset.c:1.9 src/lib/libc/rpc/svc_fdset.c:1.10
--- src/lib/libc/rpc/svc_fdset.c:1.9	Sat Nov  7 18:09:20 2015
+++ src/lib/libc/rpc/svc_fdset.c	Sat Nov  7 18:17:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc_fdset.c,v 1.9 2015/11/07 23:09:20 christos Exp $	*/
+/*	$NetBSD: svc_fdset.c,v 1.10 2015/11/07 23:17:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: svc_fdset.c,v 1.9 2015/11/07 23:09:20 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.10 2015/11/07 23:17:09 christos Exp $");
 
 
 #include "reentrant.h"
@@ -156,6 +156,7 @@ svc_pollfd_init(struct pollfd *pfd, int 
 	for (int i = 0; i < nfd; i++) {
 		pfd[i].fd = -1;
 		pfd[i].events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND;
+		pfd[i].revents = 0;
 	}
 }
 



CVS commit: src/share/mk

2015-11-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov  7 23:41:58 UTC 2015

Modified Files:
src/share/mk: bsd.prog.mk

Log Message:
LIBEXECINFO


To generate a diff of this commit:
cvs rdiff -u -r1.292 -r1.293 src/share/mk/bsd.prog.mk

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.prog.mk
diff -u src/share/mk/bsd.prog.mk:1.292 src/share/mk/bsd.prog.mk:1.293
--- src/share/mk/bsd.prog.mk:1.292	Sun Jun  7 15:04:28 2015
+++ src/share/mk/bsd.prog.mk	Sat Nov  7 23:41:58 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.prog.mk,v 1.292 2015/06/07 15:04:28 matt Exp $
+#	$NetBSD: bsd.prog.mk,v 1.293 2015/11/07 23:41:58 joerg Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -124,6 +124,7 @@ LIBCRTI=	${DESTDIR}/usr/lib/${MLIBDIR:D$
 	edit \
 	event \
 	expat \
+	execinfo \
 	fetch \
 	fl \
 	form \



CVS commit: [netbsd-6-0] src/doc

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Nov  8 00:17:11 UTC 2015

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
1342


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.47 -r1.1.2.48 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.47 src/doc/CHANGES-6.0.7:1.1.2.48
--- src/doc/CHANGES-6.0.7:1.1.2.47	Sun Aug  2 12:55:46 2015
+++ src/doc/CHANGES-6.0.7	Sun Nov  8 00:17:11 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.47 2015/08/02 12:55:46 martin Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.48 2015/11/08 00:17:11 snj Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -6269,3 +6269,744 @@ sys/compat/netbsd32/netbsd32_ioctl.c		1.
 	Fix inverted logic when checking the size of data to copyin().
 	[maxv, ticket #1318]
 
+doc/3RDPARTY	patch
+external/bsd/ntp/Makefile.inc   patch
+external/bsd/ntp/bin/ntpd/Makefile  patch
+external/bsd/ntp/bin/ntpd/ntp_parser.c  patch
+external/bsd/ntp/bin/ntpd/ntp_parser.h  patch
+external/bsd/ntp/bin/sntp/Makefile  patch
+external/bsd/ntp/bin/sntp/event2/event-config.h delete
+external/bsd/ntp/bin/sntp/evlog.c   delete
+external/bsd/ntp/dist/COPYRIGHT up to 1.1.1.5
+external/bsd/ntp/dist/ChangeLog up to 1.1.1.7
+external/bsd/ntp/dist/CommitLog up to 1.1.1.7
+external/bsd/ntp/dist/Makefile.am   up to 1.1.1.7
+external/bsd/ntp/dist/Makefile.in   up to 1.1.1.7
+external/bsd/ntp/dist/NEWS  up to 1.1.1.7
+external/bsd/ntp/dist/README.leapsmear  up to 1.1.1.1
+external/bsd/ntp/dist/aclocal.m4up to 1.1.1.7
+external/bsd/ntp/dist/adjtimed/Makefile.in  up to 1.1.1.7
+external/bsd/ntp/dist/adjtimed/adjtimed.c   up to 1.4
+external/bsd/ntp/dist/bootstrap up to 1.1.1.5
+external/bsd/ntp/dist/build up to 1.1.1.5
+external/bsd/ntp/dist/clockstuff/Makefile.inup to 1.1.1.7
+external/bsd/ntp/dist/clockstuff/chutest.c  up to 1.4
+external/bsd/ntp/dist/clockstuff/propdelay.cup to 1.4
+external/bsd/ntp/dist/config.h.in   up to 1.1.1.6
+external/bsd/ntp/dist/configure up to 1.1.1.7
+external/bsd/ntp/dist/configure.ac  up to 1.1.1.7
+external/bsd/ntp/dist/html/build.html   up to 1.1.1.4
+external/bsd/ntp/dist/html/confopt.html up to 1.1.1.4
+external/bsd/ntp/dist/html/copyright.html   up to 1.1.1.5
+external/bsd/ntp/dist/html/decode.html  up to 1.1.1.5
+external/bsd/ntp/dist/html/drivers/driver22.html up to 1.1.1.4
+external/bsd/ntp/dist/html/drivers/driver28.html up to 1.1.1.4
+external/bsd/ntp/dist/html/drivers/driver40-ja.html up to 1.1.1.1
+external/bsd/ntp/dist/html/drivers/driver40.html up to 1.1.1.4
+external/bsd/ntp/dist/html/drivers/driver46.html up to 1.1.1.2
+external/bsd/ntp/dist/html/miscopt.html up to 1.1.1.6
+external/bsd/ntp/dist/html/refclock.htmlup to 1.1.1.4
+external/bsd/ntp/dist/html/sntp.htmlup to 1.1.1.4
+external/bsd/ntp/dist/html/stats.html   up to 1.1.1.3
+external/bsd/ntp/dist/include/Makefile.am   up to 1.1.1.6
+external/bsd/ntp/dist/include/Makefile.in   up to 1.1.1.7
+external/bsd/ntp/dist/include/binio.h   up to 1.4
+external/bsd/ntp/dist/include/isc/Makefile.in   up to 1.1.1.7
+external/bsd/ntp/dist/include/mbg_gps166.h  up to 1.4
+external/bsd/ntp/dist/include/ntp.h up to 1.4
+external/bsd/ntp/dist/include/ntp_assert.h  up to 1.4
+external/bsd/ntp/dist/include/ntp_calendar.hup to 1.5
+external/bsd/ntp/dist/include/ntp_config.h  up to 1.9
+external/bsd/ntp/dist/include/ntp_control.h up to 1.4
+external/bsd/ntp/dist/include/ntp_fp.h  up to 1.7
+external/bsd/ntp/dist/include/ntp_io.h  up to 1.3
+external/bsd/ntp/dist/include/ntp_lists.h   up to 1.4
+external/bsd/ntp/dist/include/ntp_md5.h up to 1.4
+external/bsd/ntp/dist/include/ntp_stdlib.h  up to 1.11
+external/bsd/ntp/dist/include/ntp_syslog.h  up to 1.4
+external/bsd/ntp/dist/include/ntp_types.h   up to 1.4
+external/bsd/ntp/dist/include/ntpd.hup to 1.7
+external/bsd/ntp/dist/include/parse.h   up to 1.4
+external/bsd/ntp/dist/include/parse_conf.h  up to 1.4
+external/bsd/ntp/dist/include/rc_cmdlength.hup to 1.1.1.1
+external/bsd/ntp/dist/include/refidsmear.h  up to 1.1.1.2
+external/bsd/ntp/dist/include/timepps-Solaris.h up to 1.4
+external/bsd/ntp/dist/kernel/Makefile.inup to 1.1.1.7
+external/bsd/ntp/dist/kernel/sys/Makefile.inup to 1.1.1.7
+external/bsd/ntp/dist/kernel/sys/parsestreams.h up to 1.4
+external/bsd/ntp/dist/lib/isc/include/isc/backtrace.h up to 1.4

CVS commit: [netbsd-7] src/usr.sbin/sysinst

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:21:35 UTC 2015

Modified Files:
src/usr.sbin/sysinst [netbsd-7]: target.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1008):
usr.sbin/sysinst/target.c: revision 1.3
PR 50342: if there is no current partition manage, assume we are running
from an already installed system.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.4.1 src/usr.sbin/sysinst/target.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/sysinst/target.c
diff -u src/usr.sbin/sysinst/target.c:1.2 src/usr.sbin/sysinst/target.c:1.2.4.1
--- src/usr.sbin/sysinst/target.c:1.2	Sun Aug  3 16:09:38 2014
+++ src/usr.sbin/sysinst/target.c	Sun Nov  8 00:21:34 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: target.c,v 1.2 2014/08/03 16:09:38 martin Exp $	*/
+/*	$NetBSD: target.c,v 1.2.4.1 2015/11/08 00:21:34 riz Exp $	*/
 
 /*
  * Copyright 1997 Jonathan Stone
@@ -71,7 +71,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: target.c,v 1.2 2014/08/03 16:09:38 martin Exp $");
+__RCSID("$NetBSD: target.c,v 1.2.4.1 2015/11/08 00:21:34 riz Exp $");
 #endif
 
 /*
@@ -153,6 +153,9 @@ int
 target_already_root(void)
 {
 
+	if (pm == NULL)
+		return TRUE;
+
 	if (strcmp(pm->diskdev, "") == 0)
 		/* No root partition was ever selected.
 		 * Assume that the currently mounted one should be used



CVS commit: [netbsd-7] src

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:24:26 UTC 2015

Modified Files:
src/distrib/sets/lists/comp [netbsd-7]: mi
src/lib/libm [netbsd-7]: Makefile
src/lib/libm/man [netbsd-7]: erf.3

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1009):
lib/libm/man/erf.3: revision 1.13
distrib/sets/lists/comp/mi: revision 1.1921
lib/libm/Makefile: revision 1.167
PR/49399: Henning Petersen: Add man pages for erfl and erfcl
fix sets for new erf{c,}l man pages.


To generate a diff of this commit:
cvs rdiff -u -r1.1906.2.8 -r1.1906.2.9 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.164.2.2 -r1.164.2.3 src/lib/libm/Makefile
cvs rdiff -u -r1.12 -r1.12.74.1 src/lib/libm/man/erf.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1906.2.8 src/distrib/sets/lists/comp/mi:1.1906.2.9
--- src/distrib/sets/lists/comp/mi:1.1906.2.8	Thu Jun  4 20:29:49 2015
+++ src/distrib/sets/lists/comp/mi	Sun Nov  8 00:24:25 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1906.2.8 2015/06/04 20:29:49 snj Exp $
+#	$NetBSD: mi,v 1.1906.2.9 2015/11/08 00:24:25 riz Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6382,7 +6382,9 @@
 ./usr/share/man/cat3/erf.0			comp-c-catman		.cat
 ./usr/share/man/cat3/erfc.0			comp-c-catman		.cat
 ./usr/share/man/cat3/erfcf.0			comp-c-catman		.cat
+./usr/share/man/cat3/erfcl.0			comp-c-catman		.cat
 ./usr/share/man/cat3/erff.0			comp-c-catman		.cat
+./usr/share/man/cat3/erfl.0			comp-c-catman		.cat
 ./usr/share/man/cat3/err.0			comp-c-catman		.cat
 ./usr/share/man/cat3/errc.0			comp-c-catman		.cat
 ./usr/share/man/cat3/error_message.0		comp-krb5-catman	kerberos,.cat
@@ -13245,7 +13247,9 @@
 ./usr/share/man/html3/erf.html			comp-c-htmlman		html
 ./usr/share/man/html3/erfc.html			comp-c-htmlman		html
 ./usr/share/man/html3/erfcf.html		comp-c-htmlman		html
+./usr/share/man/html3/erfcl.html		comp-c-htmlman		html
 ./usr/share/man/html3/erff.html			comp-c-htmlman		html
+./usr/share/man/html3/erfl.html			comp-c-htmlman		html
 ./usr/share/man/html3/err.html			comp-c-htmlman		html
 ./usr/share/man/html3/errc.html			comp-c-htmlman		html
 ./usr/share/man/html3/error_message.html	comp-krb5-htmlman	kerberos,html
@@ -20021,7 +20025,9 @@
 ./usr/share/man/man3/erf.3			comp-c-man		.man
 ./usr/share/man/man3/erfc.3			comp-c-man		.man
 ./usr/share/man/man3/erfcf.3			comp-c-man		.man
+./usr/share/man/man3/erfcl.3			comp-c-man		.man
 ./usr/share/man/man3/erff.3			comp-c-man		.man
+./usr/share/man/man3/erfl.3			comp-c-man		.man
 ./usr/share/man/man3/err.3			comp-c-man		.man
 ./usr/share/man/man3/errc.3			comp-c-man		.man
 ./usr/share/man/man3/error_message.3		comp-krb5-man		kerberos,.man

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.164.2.2 src/lib/libm/Makefile:1.164.2.3
--- src/lib/libm/Makefile:1.164.2.2	Tue Jan 20 20:57:24 2015
+++ src/lib/libm/Makefile	Sun Nov  8 00:24:25 2015
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.164.2.2 2015/01/20 20:57:24 snj Exp $
+#  $NetBSD: Makefile,v 1.164.2.3 2015/11/08 00:24:25 riz Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -313,7 +313,11 @@ MLINKS+=copysign.3 copysignf.3 \
 	copysign.3 copysignl.3
 MLINKS+=cos.3 cosf.3
 MLINKS+=cosh.3 coshf.3
-MLINKS+=erf.3 erff.3 erf.3 erfc.3 erf.3 erfcf.3
+MLINKS+=erf.3 erff.3 \
+	erf.3 erfl.3 \
+	erf.3 erfc.3 \
+	erf.3 erfcf.3 \
+	erf.3 erfcl.3
 MLINKS+=exp.3 expf.3 exp.3 expm1.3 exp.3 expm1f.3 			\
 	exp.3 exp2.3 exp.3 exp2f.3
 MLINKS+=log.3 logf.3 \

Index: src/lib/libm/man/erf.3
diff -u src/lib/libm/man/erf.3:1.12 src/lib/libm/man/erf.3:1.12.74.1
--- src/lib/libm/man/erf.3:1.12	Thu Aug  7 16:44:47 2003
+++ src/lib/libm/man/erf.3	Sun Nov  8 00:24:25 2015
@@ -26,16 +26,18 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)erf.3	6.4 (Berkeley) 4/20/91
-.\"	$NetBSD: erf.3,v 1.12 2003/08/07 16:44:47 agc Exp $
+.\"	$NetBSD: erf.3,v 1.12.74.1 2015/11/08 00:24:25 riz Exp $
 .\"
-.Dd April 20, 1991
+.Dd November 17, 2014
 .Dt ERF 3
 .Os
 .Sh NAME
 .Nm erf ,
 .Nm erff ,
+.Nm erfl ,
 .Nm erfc ,
-.Nm erfcf
+.Nm erfcf ,
+.Nm erfcl
 .Nd error function operators
 .Sh LIBRARY
 .Lb libm
@@ -45,10 +47,14 @@
 .Fn erf "double x"
 .Ft float
 .Fn erff "float x"
+.Ft long double
+.Fn erff "long double x"
 .Ft double
 .Fn erfc "double x"
 .Ft float
 .Fn erfcf "float x"
+.Ft long double
+.Fn erfcl "long double x"
 .Sh DESCRIPTION
 These functions calculate the error function of
 .Fa x .



CVS commit: [netbsd-7] src

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:35:45 UTC 2015

Modified Files:
src/external/gpl3/binutils/dist/binutils [netbsd-7]: arsup.c
src/lib/libc/net [netbsd-7]: getnetnamadr.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1012):
lib/libc/net/getnetnamadr.c: revision 1.43
lib/libc/net/getnetnamadr.c: revision 1.44
external/gpl3/binutils/dist/binutils/arsup.c: revision 1.2
put the state back after it is used.
PR/50367: Stefan Schaeckeler: Apply fix to obey RES_CHECKNAME to getnetbyaddr
and getnetbyname.
use asprintf(3)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.20.1 \
src/external/gpl3/binutils/dist/binutils/arsup.c
cvs rdiff -u -r1.42 -r1.42.10.1 src/lib/libc/net/getnetnamadr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/binutils/dist/binutils/arsup.c
diff -u src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2 src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2.20.1
--- src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2	Sat Sep 24 22:39:13 2011
+++ src/external/gpl3/binutils/dist/binutils/arsup.c	Sun Nov  8 00:35:45 2015
@@ -149,13 +149,20 @@ maybequit (void)
 void
 ar_open (char *name, int t)
 {
-  char *tname = (char *) xmalloc (strlen (name) + 10);
+  char *tname;
   const char *bname = lbasename (name);
   real_name = name;
 
   /* Prepend tmp- to the beginning, to avoid file-name clashes after
  truncation on filesystems with limited namespaces (DOS).  */
-  sprintf (tname, "%.*stmp-%s", (int) (bname - name), name, bname);
+  if (asprintf (, "%.*stmp-%s", (int) (bname - name), name, bname) == -1)
+{
+  fprintf (stderr, _("%s: Can't allocate memory for temp name (%s)\n"),
+	program_name, strerror(errno));
+  maybequit ();
+  return;
+}
+
   obfd = bfd_openw (tname, NULL);
 
   if (!obfd)

Index: src/lib/libc/net/getnetnamadr.c
diff -u src/lib/libc/net/getnetnamadr.c:1.42 src/lib/libc/net/getnetnamadr.c:1.42.10.1
--- src/lib/libc/net/getnetnamadr.c:1.42	Tue Mar 13 21:13:41 2012
+++ src/lib/libc/net/getnetnamadr.c	Sun Nov  8 00:35:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: getnetnamadr.c,v 1.42 2012/03/13 21:13:41 christos Exp $	*/
+/*	$NetBSD: getnetnamadr.c,v 1.42.10.1 2015/11/08 00:35:45 riz Exp $	*/
 
 /* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
  *	Dep. Matematica Universidade de Coimbra, Portugal, Europe
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)getnetbyaddr
 static char sccsid_[] = "from getnetnamadr.c	1.4 (Coimbra) 93/06/03";
 static char rcsid[] = "Id: getnetnamadr.c,v 8.8 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: getnetnamadr.c,v 1.42 2012/03/13 21:13:41 christos Exp $");
+__RCSID("$NetBSD: getnetnamadr.c,v 1.42.10.1 2015/11/08 00:35:45 riz Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -77,6 +77,12 @@ __weak_alias(getnetbyaddr,_getnetbyaddr)
 __weak_alias(getnetbyname,_getnetbyname)
 #endif
 
+#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0U || \
+   (ok)(nm) != 0)
+#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
+#define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
+
+
 extern int _net_stayopen;
 
 #define BYADDR 0
@@ -105,7 +111,7 @@ static	struct netent net_entry;
 static	char *net_aliases[MAXALIASES];
 
 static int		parse_reversed_addr(const char *, in_addr_t *);
-static struct netent	*getnetanswer(querybuf *, int, int);
+static struct netent	*getnetanswer(res_state, querybuf *, int, int);
 static int		_files_getnetbyaddr(void *, void *, va_list);
 static int		_files_getnetbyname(void *, void *, va_list);
 static int		_dns_getnetbyaddr(void *, void *, va_list);
@@ -159,7 +165,7 @@ parse_reversed_addr(const char *str, in_
 }
 
 static struct netent *
-getnetanswer(querybuf *answer, int anslen, int net_i)
+getnetanswer(res_state res, querybuf *answer, int anslen, int net_i)
 {
 	static char	n_name[MAXDNAME];
 	static char	netbuf[PACKETSZ];
@@ -172,6 +178,7 @@ getnetanswer(querybuf *answer, int ansle
 	char		*in, *bp, **ap, *ep;
 
 	_DIAGASSERT(answer != NULL);
+	_DIAGASSERT(res != NULL);
 
 	/*
 	 * find first satisfactory answer
@@ -216,7 +223,7 @@ getnetanswer(querybuf *answer, int ansle
 	n_name[0] = '\0';
 	while (--ancount >= 0 && cp < eom) {
 		n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp));
-		if ((n < 0) || !res_dnok(bp))
+		if ((n < 0) || !maybe_dnok(res, bp))
 			break;
 		cp += n;
 		(void)strlcpy(n_name, bp, sizeof(n_name));
@@ -226,7 +233,7 @@ getnetanswer(querybuf *answer, int ansle
 		GETSHORT(n, cp);
 		if (class == C_IN && type == T_PTR) {
 			n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp));
-			if ((n < 0) || !res_hnok(bp)) {
+			if ((n < 0) || !maybe_hnok(res, bp)) {
 cp += n;
 return NULL;
 			}
@@ -358,8 +365,8 @@ _dns_getnetbyaddr(void *cbrv, void *cbda
 		

CVS commit: [netbsd-7-0] src

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:35:21 UTC 2015

Modified Files:
src/external/gpl3/binutils/dist/binutils [netbsd-7-0]: arsup.c
src/lib/libc/net [netbsd-7-0]: getnetnamadr.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1012):
lib/libc/net/getnetnamadr.c: revision 1.43
lib/libc/net/getnetnamadr.c: revision 1.44
external/gpl3/binutils/dist/binutils/arsup.c: revision 1.2
put the state back after it is used.
PR/50367: Stefan Schaeckeler: Apply fix to obey RES_CHECKNAME to getnetbyaddr
and getnetbyname.
use asprintf(3)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.22.1 \
src/external/gpl3/binutils/dist/binutils/arsup.c
cvs rdiff -u -r1.42 -r1.42.12.1 src/lib/libc/net/getnetnamadr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/binutils/dist/binutils/arsup.c
diff -u src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2 src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2.22.1
--- src/external/gpl3/binutils/dist/binutils/arsup.c:1.1.1.2	Sat Sep 24 22:39:13 2011
+++ src/external/gpl3/binutils/dist/binutils/arsup.c	Sun Nov  8 00:35:21 2015
@@ -149,13 +149,20 @@ maybequit (void)
 void
 ar_open (char *name, int t)
 {
-  char *tname = (char *) xmalloc (strlen (name) + 10);
+  char *tname;
   const char *bname = lbasename (name);
   real_name = name;
 
   /* Prepend tmp- to the beginning, to avoid file-name clashes after
  truncation on filesystems with limited namespaces (DOS).  */
-  sprintf (tname, "%.*stmp-%s", (int) (bname - name), name, bname);
+  if (asprintf (, "%.*stmp-%s", (int) (bname - name), name, bname) == -1)
+{
+  fprintf (stderr, _("%s: Can't allocate memory for temp name (%s)\n"),
+	program_name, strerror(errno));
+  maybequit ();
+  return;
+}
+
   obfd = bfd_openw (tname, NULL);
 
   if (!obfd)

Index: src/lib/libc/net/getnetnamadr.c
diff -u src/lib/libc/net/getnetnamadr.c:1.42 src/lib/libc/net/getnetnamadr.c:1.42.12.1
--- src/lib/libc/net/getnetnamadr.c:1.42	Tue Mar 13 21:13:41 2012
+++ src/lib/libc/net/getnetnamadr.c	Sun Nov  8 00:35:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: getnetnamadr.c,v 1.42 2012/03/13 21:13:41 christos Exp $	*/
+/*	$NetBSD: getnetnamadr.c,v 1.42.12.1 2015/11/08 00:35:21 riz Exp $	*/
 
 /* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
  *	Dep. Matematica Universidade de Coimbra, Portugal, Europe
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)getnetbyaddr
 static char sccsid_[] = "from getnetnamadr.c	1.4 (Coimbra) 93/06/03";
 static char rcsid[] = "Id: getnetnamadr.c,v 8.8 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: getnetnamadr.c,v 1.42 2012/03/13 21:13:41 christos Exp $");
+__RCSID("$NetBSD: getnetnamadr.c,v 1.42.12.1 2015/11/08 00:35:21 riz Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -77,6 +77,12 @@ __weak_alias(getnetbyaddr,_getnetbyaddr)
 __weak_alias(getnetbyname,_getnetbyname)
 #endif
 
+#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0U || \
+   (ok)(nm) != 0)
+#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
+#define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
+
+
 extern int _net_stayopen;
 
 #define BYADDR 0
@@ -105,7 +111,7 @@ static	struct netent net_entry;
 static	char *net_aliases[MAXALIASES];
 
 static int		parse_reversed_addr(const char *, in_addr_t *);
-static struct netent	*getnetanswer(querybuf *, int, int);
+static struct netent	*getnetanswer(res_state, querybuf *, int, int);
 static int		_files_getnetbyaddr(void *, void *, va_list);
 static int		_files_getnetbyname(void *, void *, va_list);
 static int		_dns_getnetbyaddr(void *, void *, va_list);
@@ -159,7 +165,7 @@ parse_reversed_addr(const char *str, in_
 }
 
 static struct netent *
-getnetanswer(querybuf *answer, int anslen, int net_i)
+getnetanswer(res_state res, querybuf *answer, int anslen, int net_i)
 {
 	static char	n_name[MAXDNAME];
 	static char	netbuf[PACKETSZ];
@@ -172,6 +178,7 @@ getnetanswer(querybuf *answer, int ansle
 	char		*in, *bp, **ap, *ep;
 
 	_DIAGASSERT(answer != NULL);
+	_DIAGASSERT(res != NULL);
 
 	/*
 	 * find first satisfactory answer
@@ -216,7 +223,7 @@ getnetanswer(querybuf *answer, int ansle
 	n_name[0] = '\0';
 	while (--ancount >= 0 && cp < eom) {
 		n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp));
-		if ((n < 0) || !res_dnok(bp))
+		if ((n < 0) || !maybe_dnok(res, bp))
 			break;
 		cp += n;
 		(void)strlcpy(n_name, bp, sizeof(n_name));
@@ -226,7 +233,7 @@ getnetanswer(querybuf *answer, int ansle
 		GETSHORT(n, cp);
 		if (class == C_IN && type == T_PTR) {
 			n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp));
-			if ((n < 0) || !res_hnok(bp)) {
+			if ((n < 0) || !maybe_hnok(res, bp)) {
 cp += n;
 return NULL;
 			}
@@ -358,8 +365,8 @@ _dns_getnetbyaddr(void *cbrv, void *cbda
 		

CVS commit: [netbsd-7] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:38:45 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7]: sys_machdep.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1013):
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.28 -r1.28.2.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.28 src/sys/arch/x86/x86/sys_machdep.c:1.28.2.1
--- src/sys/arch/x86/x86/sys_machdep.c:1.28	Sat Jun 28 21:13:12 2014
+++ src/sys/arch/x86/x86/sys_machdep.c	Sun Nov  8 00:38:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $	*/
+/*	$NetBSD: sys_machdep.c,v 1.28.2.1 2015/11/08 00:38:45 riz Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28.2.1 2015/11/08 00:38:45 riz Exp $");
 
 #include "opt_mtrr.h"
 #include "opt_perfctrs.h"
@@ -659,7 +659,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);
@@ -668,7 +667,7 @@ x86_set_sdbase(void *arg, char which, lw
 	if (direct) {
 		base = (vaddr_t)arg;
 	} else {
-		error = copyin(arg, , sizeof(base));
+		int error = copyin(arg, , sizeof(base));
 		if (error != 0)
 			return error;
 	}
@@ -676,10 +675,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();
@@ -699,7 +694,7 @@ x86_set_sdbase(void *arg, char which, lw
 	}
 	kpreempt_enable();
 
-	return error;
+	return 0;
 #endif
 }
 



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:38:34 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Tickets 1012,1013.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 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.8 src/doc/CHANGES-7.0.1:1.1.2.9
--- src/doc/CHANGES-7.0.1:1.1.2.8	Sun Nov  8 00:31:15 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 00:38:34 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.8 2015/11/08 00:31:15 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.9 2015/11/08 00:38:34 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -115,3 +115,15 @@ sys/arch/x86/x86/bus_dma.c			1.72-1.74
 	  check addr + len < limit, not addr < limit.
 	[christos, ticket #1011]
 
+external/gpl3/binutils/dist/binutils/arsup.c	1.2
+lib/libc/net/getnetnamadr.c			1.43-1.44
+
+	Resolve hostnames with "_".  PR#50367.
+	[christos, ticket #1012]
+
+sys/arch/x86/x86/sys_machdep.c			1.29
+
+	Fix broken error handling leading to random crashes in 
+	threaded programs.
+	[christos, ticket #1013]
+



CVS commit: [netbsd-7-0] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:38:18 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7-0]: sys_machdep.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1013):
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.28 -r1.28.6.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.28 src/sys/arch/x86/x86/sys_machdep.c:1.28.6.1
--- src/sys/arch/x86/x86/sys_machdep.c:1.28	Sat Jun 28 21:13:12 2014
+++ src/sys/arch/x86/x86/sys_machdep.c	Sun Nov  8 00:38:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $	*/
+/*	$NetBSD: sys_machdep.c,v 1.28.6.1 2015/11/08 00:38:18 riz Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28.6.1 2015/11/08 00:38:18 riz Exp $");
 
 #include "opt_mtrr.h"
 #include "opt_perfctrs.h"
@@ -659,7 +659,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);
@@ -668,7 +667,7 @@ x86_set_sdbase(void *arg, char which, lw
 	if (direct) {
 		base = (vaddr_t)arg;
 	} else {
-		error = copyin(arg, , sizeof(base));
+		int error = copyin(arg, , sizeof(base));
 		if (error != 0)
 			return error;
 	}
@@ -676,10 +675,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();
@@ -699,7 +694,7 @@ x86_set_sdbase(void *arg, char which, lw
 	}
 	kpreempt_enable();
 
-	return error;
+	return 0;
 #endif
 }
 



CVS commit: [netbsd-7] src/etc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:45:22 UTC 2015

Modified Files:
src/etc [netbsd-7]: rc.subr

Log Message:
Pull up following revision(s) (requested by phx in ticket #1015):
etc/rc.subr: revision 1.97
PR misc/50046
Remove the expensive tests in _have_rc_postprocessor(), as proposed by apb@.
It more than halves the multiuser boot time on slow machines and brings
it back near to the previous level.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.94.2.1 src/etc/rc.subr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.subr
diff -u src/etc/rc.subr:1.94 src/etc/rc.subr:1.94.2.1
--- src/etc/rc.subr:1.94	Sun Jul 27 07:46:46 2014
+++ src/etc/rc.subr	Sun Nov  8 00:45:22 2015
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.94 2014/07/27 07:46:46 apb Exp $
+# $NetBSD: rc.subr,v 1.94.2.1 2015/11/08 00:45:22 riz Exp $
 #
 # Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -796,19 +796,9 @@ $command $rc_flags $command_args"
 _have_rc_postprocessor()
 {
 	# Cheap tests that fd and pid are set, fd is writable.
-	[ -n "${_rc_postprocessor_fd}" ] || return 1
-	[ -n "${_rc_pid}" ] || return 1
-	eval ": >&${_rc_postprocessor_fd}" 2>/dev/null || return 1
-
-	# More expensive test that pid is running.
-	# Unset _rc_pid if this fails.
-	kill -0 "${_rc_pid}" 2>/dev/null \
-	|| { unset _rc_pid; return 1; }
-
-	# More expensive test that pid appears to be
-	# a shell running an rc script.
-	# Unset _rc_pid if this fails.
-	expr "$(ps -p "${_rc_pid}" -o command=)" : ".*sh .*/rc.*" >/dev/null \
+	[ -n "${_rc_pid}" ] || { unset _rc_pid; return 1; }
+	[ -n "${_rc_postprocessor_fd}" ] || { unset _rc_pid; return 1; }
+	eval ": >&${_rc_postprocessor_fd}" 2>/dev/null \
 	|| { unset _rc_pid; return 1; }
 
 	return 0



CVS commit: [netbsd-7-0] src

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:55:39 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: 3RDPARTY
src/external/bsd/ntp [netbsd-7-0]: importdate
src/external/bsd/ntp/bin/ntpd [netbsd-7-0]: Makefile
src/external/bsd/ntp/dist [netbsd-7-0]: ChangeLog CommitLog Makefile.am
Makefile.in NEWS aclocal.m4 bootstrap config.h.in configure
configure.ac packageinfo.sh
src/external/bsd/ntp/dist/adjtimed [netbsd-7-0]: Makefile.in adjtimed.c
src/external/bsd/ntp/dist/clockstuff [netbsd-7-0]: Makefile.in
chutest.c propdelay.c
src/external/bsd/ntp/dist/html [netbsd-7-0]: decode.html miscopt.html
refclock.html stats.html
src/external/bsd/ntp/dist/html/drivers [netbsd-7-0]: driver22.html
driver40.html driver46.html
src/external/bsd/ntp/dist/include [netbsd-7-0]: Makefile.am Makefile.in
ntp_assert.h ntp_calendar.h ntp_config.h ntp_control.h ntp_io.h
ntp_lists.h ntp_stdlib.h ntp_syslog.h ntp_types.h ntpd.h parse.h
src/external/bsd/ntp/dist/include/isc [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/kernel [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/kernel/sys [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/lib/isc/unix [netbsd-7-0]:
ifiter_getifaddrs.c
src/external/bsd/ntp/dist/libjsmn [netbsd-7-0]: Makefile README.md
jsmn.c jsmn.h jsmn_test.c
src/external/bsd/ntp/dist/libntp [netbsd-7-0]: Makefile.am Makefile.in
atolfp.c audio.c authkeys.c authreadkeys.c caljulian.c caltontp.c
decodenetnum.c emalloc.c icom.c machines.c msyslog.c ntp_calendar.c
ntp_intres.c ntp_lineedit.c ntp_rfc2553.c ntp_worker.c prettydate.c
recvbuff.c socket.c socktohost.c statestr.c strdup.c work_fork.c
src/external/bsd/ntp/dist/libparse [netbsd-7-0]: Makefile.in
clk_meinberg.c clk_rawdcf.c clk_schmid.c parse.c
src/external/bsd/ntp/dist/ntpd [netbsd-7-0]: Makefile.am Makefile.in
complete.conf.in invoke-ntp.conf.texi invoke-ntp.keys.texi
invoke-ntpd.texi keyword-gen-utd keyword-gen.c ntp.conf.5man
ntp.conf.5mdoc ntp.conf.def ntp.conf.html ntp.conf.man.in
ntp.conf.mdoc.in ntp.keys.5man ntp.keys.5mdoc ntp.keys.html
ntp.keys.man.in ntp.keys.mdoc.in ntp_config.c ntp_control.c
ntp_crypto.c ntp_io.c ntp_keyword.h ntp_leapsec.c ntp_leapsec.h
ntp_loopfilter.c ntp_monitor.c ntp_parser.y ntp_peer.c ntp_proto.c
ntp_refclock.c ntp_request.c ntp_restrict.c ntp_scanner.c
ntp_scanner.h ntp_timer.c ntpd-opts.c ntpd-opts.def ntpd-opts.h
ntpd.1ntpdman ntpd.1ntpdmdoc ntpd.c ntpd.html ntpd.man.in
ntpd.mdoc.in refclock_arc.c refclock_chu.c refclock_gpsdjson.c
refclock_jjy.c refclock_jupiter.c refclock_local.c refclock_nmea.c
refclock_oncore.c refclock_palisade.c refclock_parse.c
refclock_shm.c refclock_true.c refclock_wwv.c
src/external/bsd/ntp/dist/ntpdate [netbsd-7-0]: Makefile.in ntpdate.c
src/external/bsd/ntp/dist/ntpdc [netbsd-7-0]: Makefile.in
invoke-ntpdc.texi ntpdc-opts.c ntpdc-opts.h ntpdc.1ntpdcman
ntpdc.1ntpdcmdoc ntpdc.c ntpdc.html ntpdc.man.in ntpdc.mdoc.in
src/external/bsd/ntp/dist/ntpq [netbsd-7-0]: Makefile.in
invoke-ntpq.texi libntpq.h ntpq-opts.c ntpq-opts.def ntpq-opts.h
ntpq-subs.c ntpq.1ntpqman ntpq.1ntpqmdoc ntpq.c ntpq.html
ntpq.man.in ntpq.mdoc.in
src/external/bsd/ntp/dist/ntpsnmpd [netbsd-7-0]: Makefile.in
invoke-ntpsnmpd.texi ntpsnmpd-opts.c ntpsnmpd-opts.h
ntpsnmpd.1ntpsnmpdman ntpsnmpd.1ntpsnmpdmdoc ntpsnmpd.html
ntpsnmpd.man.in ntpsnmpd.mdoc.in
src/external/bsd/ntp/dist/parseutil [netbsd-7-0]: Makefile.in dcfd.c
testdcf.c
src/external/bsd/ntp/dist/scripts [netbsd-7-0]: Makefile.in
invoke-plot_summary.texi invoke-summary.texi plot_summary-opts
plot_summary.1plot_summaryman plot_summary.1plot_summarymdoc
plot_summary.html plot_summary.man.in plot_summary.mdoc.in
summary-opts summary.1summaryman summary.1summarymdoc summary.html
summary.man.in summary.mdoc.in
src/external/bsd/ntp/dist/scripts/build [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/scripts/calc_tickadj [netbsd-7-0]:
Makefile.in calc_tickadj.1calc_tickadjman
calc_tickadj.1calc_tickadjmdoc calc_tickadj.html
calc_tickadj.man.in calc_tickadj.mdoc.in invoke-calc_tickadj.texi
src/external/bsd/ntp/dist/scripts/lib [netbsd-7-0]: Makefile.in
src/external/bsd/ntp/dist/scripts/lib/NTP [netbsd-7-0]: Util.pm
src/external/bsd/ntp/dist/scripts/ntp-wait [netbsd-7-0]: Makefile.in

CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:56:46 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Ticket 1024.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 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.25 src/doc/CHANGES-7.1:1.1.2.26
--- src/doc/CHANGES-7.1:1.1.2.25	Sun Nov  8 01:29:28 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 01:56:46 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.25 2015/11/08 01:29:28 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.26 2015/11/08 01:56:46 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -864,3 +864,611 @@ sys/fs/tmpfs/tmpfs_subr.c			1.101
 	Fixes PR kern/50381.
 	[leot, ticket #1023]
 
+doc/3RDPARTY	patch
+external/bsd/ntp/dist/tests/libntp/atoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/atouint.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/authkeys.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/buftvtots.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/calendar.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/caljulian.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/caltontp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/calyearstart.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/clocktime.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/decodenetnum.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfptest.cup to 1.1.1.1
+external/bsd/ntp/dist/tests/libntp/sockaddrtest.c up to 1.1.1.1
+external/bsd/ntp/dist/tests/libntp/hextolfp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/humandate.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfpfunc.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfptostr.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/modetoa.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/msyslog.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/netof.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/numtoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/numtohost.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/octtoint.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/prettydate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/recvbuff.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/refidsmear.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/refnumtoa.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-a_md5encrypt.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-atoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/socktoa.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/ssl_init.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/statestr.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/strtolfp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/test-libntp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/timevalops.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/tstotv.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/tvtots.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/uglydate.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/vi64ops.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/ymd2yd.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-netof.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/a_md5encrypt.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-msyslog.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/hextoint.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-atouint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-authkeys.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-buftvtots.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-calendar.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-caljulian.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-caltontp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-calyearstart.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-clocktime.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-decodenetnum.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-hextoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-hextolfp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-humandate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-lfpfunc.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-lfptostr.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-modetoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-numtoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-numtohost.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-octtoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-prettydate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-recvbuff.c up to 1.1.1.3

CVS commit: [netbsd-7] src/sys/compat

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:02:37 UTC 2015

Modified Files:
src/sys/compat/linux/common [netbsd-7]: linux_mod.c
src/sys/compat/netbsd32 [netbsd-7]: netbsd32_mod.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1020):
sys/compat/netbsd32/netbsd32_mod.c: revision 1.6
sys/compat/netbsd32/netbsd32_mod.c: revision 1.7
sys/compat/netbsd32/netbsd32_mod.c: revision 1.8
sys/compat/netbsd32/netbsd32_mod.c: revision 1.9
sys/compat/linux/common/linux_mod.c: revision 1.5
Add an additional dependency on compat_sysv
Add another dependency for nfsserver
And yet another dependency, this time on mq
Ooops, spell the module name in full. "mqueue" vs "mq"
we need compat_sysv now.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/compat/linux/common/linux_mod.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/compat/netbsd32/netbsd32_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_mod.c
diff -u src/sys/compat/linux/common/linux_mod.c:1.4 src/sys/compat/linux/common/linux_mod.c:1.4.4.1
--- src/sys/compat/linux/common/linux_mod.c:1.4	Fri Mar  7 01:33:43 2014
+++ src/sys/compat/linux/common/linux_mod.c	Sun Nov  8 02:02:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_mod.c,v 1.4 2014/03/07 01:33:43 christos Exp $	*/
+/*	$NetBSD: linux_mod.c,v 1.4.4.1 2015/11/08 02:02:37 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.4 2014/03/07 01:33:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.4.4.1 2015/11/08 02:02:37 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
@@ -65,7 +65,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mod.c,
 # define	MD3	""
 #endif
 
-MODULE(MODULE_CLASS_EXEC, compat_linux, "compat,compat_ossaudio" MD1 MD2 MD3);
+MODULE(MODULE_CLASS_EXEC, compat_linux, "compat,compat_ossaudio,compat_sysv"
+	MD1 MD2 MD3);
 
 static struct execsw linux_execsw[] = {
 #if defined(EXEC_ELF32) && ELFSIZE == 32

Index: src/sys/compat/netbsd32/netbsd32_mod.c
diff -u src/sys/compat/netbsd32/netbsd32_mod.c:1.5 src/sys/compat/netbsd32/netbsd32_mod.c:1.5.2.1
--- src/sys/compat/netbsd32/netbsd32_mod.c:1.5	Tue Jul 22 08:18:33 2014
+++ src/sys/compat/netbsd32/netbsd32_mod.c	Sun Nov  8 02:02:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_mod.c,v 1.5 2014/07/22 08:18:33 maxv Exp $	*/
+/*	$NetBSD: netbsd32_mod.c,v 1.5.2.1 2015/11/08 02:02:36 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,13 +30,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.5 2014/07/22 08:18:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.5.2.1 2015/11/08 02:02:36 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
-# define	DEPS1	"compat"
+# define	DEPS1	"compat,compat_sysv,nfsserver,mqueue"
 #else
-# define	DEPS1	"compat,ksem"
+# define	DEPS1	"compat,compat_sysv,nfsserver,mqueue,ksem"
 #endif
 
 #ifndef ELFSIZE



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:05:16 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
ticket 1025


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 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.11 src/doc/CHANGES-7.0.1:1.1.2.12
--- src/doc/CHANGES-7.0.1:1.1.2.11	Sun Nov  8 01:56:58 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 02:05:16 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.11 2015/11/08 01:56:58 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.12 2015/11/08 02:05:16 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -741,3 +741,8 @@ external/bsd/ntp/scripts/mkver  
 	Update ntp to 4.2.8p4.
 	[christos, ticket #1024]
 
+usr.sbin/vnconfig/vnconfig.8			1.40
+
+	In NetBSD 7, the vnconfig command was renamed.
+	[pgoyette, ticket #1025]
+



CVS commit: src/usr.bin/rpcgen

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  8 01:59:31 UTC 2015

Modified Files:
src/usr.bin/rpcgen: rpc_svcout.c

Log Message:
Delete extra declaration of svc_fdset... And some commented out code.
This badly needs some modernization.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/rpcgen/rpc_svcout.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/rpcgen/rpc_svcout.c
diff -u src/usr.bin/rpcgen/rpc_svcout.c:1.30 src/usr.bin/rpcgen/rpc_svcout.c:1.31
--- src/usr.bin/rpcgen/rpc_svcout.c:1.30	Sun Sep 20 11:52:11 2015
+++ src/usr.bin/rpcgen/rpc_svcout.c	Sat Nov  7 20:59:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_svcout.c,v 1.30 2015/09/20 15:52:11 kamil Exp $	*/
+/*	$NetBSD: rpc_svcout.c,v 1.31 2015/11/08 01:59:31 christos Exp $	*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI";
 #else
-__RCSID("$NetBSD: rpc_svcout.c,v 1.30 2015/09/20 15:52:11 kamil Exp $");
+__RCSID("$NetBSD: rpc_svcout.c,v 1.31 2015/11/08 01:59:31 christos Exp $");
 #endif
 #endif
 
@@ -652,7 +652,6 @@ write_timeout_func(void)
 	f_print(fout, "closedown(void)\n");
 	f_print(fout, "{\n");
 	f_print(fout, "\tif (_rpcsvcdirty == 0) {\n");
-	f_print(fout, "\t\textern fd_set svc_fdset;\n");
 	f_print(fout, "\t\tstatic int size;\n");
 	f_print(fout, "\t\tint i, openfd;\n");
 	if (tirpcflag && pmflag) {
@@ -738,8 +737,6 @@ write_pm_most(char *infile, int netflag)
 	}
 	if (timerflag)
 		f_print(fout, "\t\tint pmclose;\n");
-/* not necessary, defined in /usr/include/stdlib */
-/*	f_print(fout, "\t\textern char *getenv();\n");*/
 	f_print(fout, "\n");
 	f_print(fout, "\t\t_rpcpmstart = 1;\n");
 	if (logflag)



CVS commit: [netbsd-7-0] src/usr.sbin/vnconfig

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:04:46 UTC 2015

Modified Files:
src/usr.sbin/vnconfig [netbsd-7-0]: vnconfig.8

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1025):
usr.sbin/vnconfig/vnconfig.8: revision 1.40
Update to keep up with reality.  In NetBSD 7, the vnconfig command was
renamed.  So add this fact to the HISTORY section and remove BUGS.
XXX Pull-up to NetBSD-7 !


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.8.1 src/usr.sbin/vnconfig/vnconfig.8

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/vnconfig/vnconfig.8
diff -u src/usr.sbin/vnconfig/vnconfig.8:1.39 src/usr.sbin/vnconfig/vnconfig.8:1.39.8.1
--- src/usr.sbin/vnconfig/vnconfig.8:1.39	Sun Jun  9 18:39:31 2013
+++ src/usr.sbin/vnconfig/vnconfig.8	Sun Nov  8 02:04:46 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vnconfig.8,v 1.39 2013/06/09 18:39:31 christos Exp $
+.\"	$NetBSD: vnconfig.8,v 1.39.8.1 2015/11/08 02:04:46 riz Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -61,7 +61,7 @@
 .\"
 .\"	@(#)vnconfig.8	8.1 (Berkeley) 6/5/93
 .\"
-.Dd June 9, 2013
+.Dd November 6, 2015
 .Dt VNDCONFIG 8
 .Os
 .Sh NAME
@@ -221,9 +221,12 @@ device.
 .Xr umount 8
 .Sh HISTORY
 The
-.Nm
+.Nm vnconfig
 command appeared in
 .Nx 1.0 .
-.Sh BUGS
-This command should really be named
-.Nm vndconfig .
+It was renamed to
+.Nm
+in
+.Nx 7.0
+for consistency with other similar commands.
+(The original name was also retained for backwards compatability.)



CVS commit: [netbsd-7] src/usr.sbin/vnconfig

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:05:25 UTC 2015

Modified Files:
src/usr.sbin/vnconfig [netbsd-7]: vnconfig.8

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1025):
usr.sbin/vnconfig/vnconfig.8: revision 1.40
Update to keep up with reality.  In NetBSD 7, the vnconfig command was
renamed.  So add this fact to the HISTORY section and remove BUGS.
XXX Pull-up to NetBSD-7 !


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.6.1 src/usr.sbin/vnconfig/vnconfig.8

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/vnconfig/vnconfig.8
diff -u src/usr.sbin/vnconfig/vnconfig.8:1.39 src/usr.sbin/vnconfig/vnconfig.8:1.39.6.1
--- src/usr.sbin/vnconfig/vnconfig.8:1.39	Sun Jun  9 18:39:31 2013
+++ src/usr.sbin/vnconfig/vnconfig.8	Sun Nov  8 02:05:25 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vnconfig.8,v 1.39 2013/06/09 18:39:31 christos Exp $
+.\"	$NetBSD: vnconfig.8,v 1.39.6.1 2015/11/08 02:05:25 riz Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -61,7 +61,7 @@
 .\"
 .\"	@(#)vnconfig.8	8.1 (Berkeley) 6/5/93
 .\"
-.Dd June 9, 2013
+.Dd November 6, 2015
 .Dt VNDCONFIG 8
 .Os
 .Sh NAME
@@ -221,9 +221,12 @@ device.
 .Xr umount 8
 .Sh HISTORY
 The
-.Nm
+.Nm vnconfig
 command appeared in
 .Nx 1.0 .
-.Sh BUGS
-This command should really be named
-.Nm vndconfig .
+It was renamed to
+.Nm
+in
+.Nx 7.0
+for consistency with other similar commands.
+(The original name was also retained for backwards compatability.)



CVS commit: [netbsd-6] src

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 22:26:48 UTC 2015

Modified Files:
src/doc [netbsd-6]: 3RDPARTY
src/external/bsd/ntp [netbsd-6]: Makefile.inc importdate ntp2netbsd
src/external/bsd/ntp/bin/ntpd [netbsd-6]: Makefile ntp_parser.c
ntp_parser.h
src/external/bsd/ntp/bin/sntp [netbsd-6]: Makefile
src/external/bsd/ntp/dist [netbsd-6]: COPYRIGHT ChangeLog CommitLog
Makefile.am Makefile.in NEWS aclocal.m4 bootstrap build config.h.in
configure configure.ac packageinfo.sh
src/external/bsd/ntp/dist/adjtimed [netbsd-6]: Makefile.in adjtimed.c
src/external/bsd/ntp/dist/clockstuff [netbsd-6]: Makefile.in chutest.c
propdelay.c
src/external/bsd/ntp/dist/html [netbsd-6]: build.html confopt.html
copyright.html decode.html miscopt.html refclock.html sntp.html
stats.html
src/external/bsd/ntp/dist/html/drivers [netbsd-6]: driver22.html
driver28.html driver40.html driver46.html
src/external/bsd/ntp/dist/include [netbsd-6]: Makefile.am Makefile.in
binio.h mbg_gps166.h ntp.h ntp_assert.h ntp_calendar.h ntp_config.h
ntp_control.h ntp_fp.h ntp_io.h ntp_lists.h ntp_md5.h ntp_stdlib.h
ntp_syslog.h ntp_types.h ntpd.h parse.h parse_conf.h
timepps-Solaris.h
src/external/bsd/ntp/dist/include/isc [netbsd-6]: Makefile.in
src/external/bsd/ntp/dist/kernel [netbsd-6]: Makefile.in
src/external/bsd/ntp/dist/kernel/sys [netbsd-6]: Makefile.in
parsestreams.h
src/external/bsd/ntp/dist/lib/isc [netbsd-6]: inet_ntop.c log.c
result.c
src/external/bsd/ntp/dist/lib/isc/include/isc [netbsd-6]: backtrace.h
socket.h
src/external/bsd/ntp/dist/lib/isc/unix [netbsd-6]: file.c
ifiter_getifaddrs.c ifiter_ioctl.c net.c
src/external/bsd/ntp/dist/libjsmn [netbsd-6]: Makefile README.md jsmn.c
jsmn.h jsmn_test.c
src/external/bsd/ntp/dist/libntp [netbsd-6]: Makefile.am Makefile.in
atolfp.c audio.c authkeys.c authreadkeys.c caljulian.c caltontp.c
decodenetnum.c emalloc.c icom.c machines.c msyslog.c ntp_calendar.c
ntp_crypto_rnd.c ntp_intres.c ntp_lineedit.c ntp_rfc2553.c
ntp_worker.c prettydate.c recvbuff.c socket.c socktohost.c
statestr.c strdup.c work_fork.c
src/external/bsd/ntp/dist/libparse [netbsd-6]: Makefile.am Makefile.in
clk_computime.c clk_dcf7000.c clk_hopf6021.c clk_meinberg.c
clk_rawdcf.c clk_rcc8000.c clk_schmid.c clk_sel240x.c
clk_trimtaip.c clk_trimtsip.c clk_varitext.c clk_wharton.c
data_mbg.c gpstolfp.c info_trimble.c mkinfo_rcmd.sed
mkinfo_scmd.sed parse.c parse_conf.c parsesolaris.c parsestreams.c
trim_info.c
src/external/bsd/ntp/dist/ntpd [netbsd-6]: Makefile.am Makefile.in
cmd_args.c complete.conf.in invoke-ntp.conf.texi
invoke-ntp.keys.texi invoke-ntpd.texi keyword-gen-utd keyword-gen.c
ntp.conf.5man ntp.conf.5mdoc ntp.conf.def ntp.conf.html
ntp.conf.man.in ntp.conf.mdoc.in ntp.keys.5man ntp.keys.5mdoc
ntp.keys.html ntp.keys.man.in ntp.keys.mdoc.in ntp_config.c
ntp_control.c ntp_crypto.c ntp_io.c ntp_keyword.h ntp_leapsec.c
ntp_leapsec.h ntp_loopfilter.c ntp_monitor.c ntp_parser.y
ntp_peer.c ntp_proto.c ntp_refclock.c ntp_request.c ntp_restrict.c
ntp_scanner.c ntp_scanner.h ntp_timer.c ntp_util.c ntpd-opts.c
ntpd-opts.def ntpd-opts.h ntpd.1ntpdman ntpd.1ntpdmdoc ntpd.c
ntpd.html ntpd.man.in ntpd.mdoc.in ntpdbase-opts.def refclock_arc.c
refclock_chu.c refclock_gpsdjson.c refclock_jjy.c
refclock_jupiter.c refclock_local.c refclock_nmea.c
refclock_oncore.c refclock_palisade.c refclock_palisade.h
refclock_parse.c refclock_shm.c refclock_true.c refclock_wwv.c
src/external/bsd/ntp/dist/ntpdate [netbsd-6]: Makefile.in ntpdate.c
src/external/bsd/ntp/dist/ntpdc [netbsd-6]: Makefile.in
invoke-ntpdc.texi ntpdc-opts.c ntpdc-opts.h ntpdc.1ntpdcman
ntpdc.1ntpdcmdoc ntpdc.c ntpdc.html ntpdc.man.in ntpdc.mdoc.in
src/external/bsd/ntp/dist/ntpq [netbsd-6]: Makefile.in invoke-ntpq.texi
libntpq.h ntpq-opts.c ntpq-opts.def ntpq-opts.h ntpq-subs.c
ntpq.1ntpqman ntpq.1ntpqmdoc ntpq.c ntpq.html ntpq.man.in
ntpq.mdoc.in
src/external/bsd/ntp/dist/ntpsnmpd [netbsd-6]: Makefile.in
invoke-ntpsnmpd.texi netsnmp_daemonize.c ntp_snmp.h ntpsnmpd-opts.c
ntpsnmpd-opts.h ntpsnmpd.1ntpsnmpdman ntpsnmpd.1ntpsnmpdmdoc
ntpsnmpd.html ntpsnmpd.man.in ntpsnmpd.mdoc.in
src/external/bsd/ntp/dist/parseutil [netbsd-6]: Makefile.in dcfd.c
testdcf.c

CVS commit: src/lib/libc/rpc

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 23:09:20 UTC 2015

Modified Files:
src/lib/libc/rpc: rpc_internal.h svc_fdset.c svc_run.c svc_vc.c

Log Message:
PR/50408: Pedro Giffuni: Provide a way for rpc to use poll(2) instead of
select(2), and the linux svc_pollfd and svc_maxpollfd members. Our select(2)
implementation does not suffer from the FD_SETSIZE limitation so this is
not turned on by default.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/rpc/rpc_internal.h
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/rpc/svc_fdset.c
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/rpc/svc_run.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/rpc/svc_vc.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/libc/rpc/rpc_internal.h
diff -u src/lib/libc/rpc/rpc_internal.h:1.7 src/lib/libc/rpc/rpc_internal.h:1.8
--- src/lib/libc/rpc/rpc_internal.h:1.7	Tue May  7 17:08:45 2013
+++ src/lib/libc/rpc/rpc_internal.h	Sat Nov  7 18:09:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_internal.h,v 1.7 2013/05/07 21:08:45 christos Exp $	*/
+/*	$NetBSD: rpc_internal.h,v 1.8 2015/11/07 23:09:20 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -63,5 +63,6 @@ u_int32_t __rpc_getxid(void);
 
 extern SVCXPRT **__svc_xports;
 extern int __svc_maxrec;
+extern int __svc_flags;
 
 int __clnt_sigfillset(sigset_t *);

Index: src/lib/libc/rpc/svc_fdset.c
diff -u src/lib/libc/rpc/svc_fdset.c:1.8 src/lib/libc/rpc/svc_fdset.c:1.9
--- src/lib/libc/rpc/svc_fdset.c:1.8	Sat Nov  7 15:24:00 2015
+++ src/lib/libc/rpc/svc_fdset.c	Sat Nov  7 18:09:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc_fdset.c,v 1.8 2015/11/07 20:24:00 christos Exp $	*/
+/*	$NetBSD: svc_fdset.c,v 1.9 2015/11/07 23:09:20 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: svc_fdset.c,v 1.8 2015/11/07 20:24:00 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.9 2015/11/07 23:09:20 christos Exp $");
 
 
 #include "reentrant.h"
@@ -47,6 +47,7 @@ __RCSID("$NetBSD: svc_fdset.c,v 1.8 2015
 #endif
 #include 
 #include 
+#include 
 
 #include "svc_fdset.h"
 
@@ -54,11 +55,17 @@ __RCSID("$NetBSD: svc_fdset.c,v 1.8 2015
 #undef svc_maxfd
 extern __fd_set_256 svc_fdset;
 extern int svc_maxfd;
+int __svc_flags;
 
 struct svc_fdset {
+	/* select */
 	fd_set *fdset;
 	int	fdmax;
 	int	fdsize;
+	/* poll */
+	struct pollfd *fdp;
+	int	fdnum;
+	int	fdused;
 };
 
 /* The single threaded, one global fd_set version */
@@ -138,10 +145,85 @@ svc_fdset_free(void *v)
 	struct svc_fdset *fds = v;
 	DPRINTF_FDSET(fds, "free");
 
+	free(fds->fdp);
 	free(fds->fdset);
 	free(fds);
 }
 
+static void
+svc_pollfd_init(struct pollfd *pfd, int nfd)
+{
+	for (int i = 0; i < nfd; i++) {
+		pfd[i].fd = -1;
+		pfd[i].events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND;
+	}
+}
+
+static struct pollfd *
+svc_pollfd_alloc(struct svc_fdset *fds)
+{
+	fds->fdnum = FD_SETSIZE;
+	fds->fdp = calloc(fds->fdnum, sizeof(*fds->fdp));
+	if (fds->fdp == NULL)
+		return NULL;
+	svc_pollfd_init(fds->fdp, fds->fdnum);
+	return fds->fdp;
+}
+
+
+static struct svc_fdset *
+svc_pollfd_add(int fd, struct svc_fdset *fds)
+{
+	struct pollfd *pfd;
+
+	if ((pfd = svc_pollfd_alloc(fds)) == NULL)
+		return NULL;
+
+	for (int i = 0; i < fds->fdnum; i++)
+		if (pfd[i].fd == -1) {
+			if (i > fds->fdused)
+fds->fdused = i + 1;
+			pfd[i].fd = fd;
+			return fds;
+		}
+
+	pfd = realloc(fds->fdp, (fds->fdnum + FD_SETSIZE) * sizeof(*fds->fdp));
+	if (pfd == NULL)
+		return NULL;
+
+	svc_pollfd_init(pfd + fds->fdnum, FD_SETSIZE);
+	pfd[fds->fdnum].fd = fd;
+	fds->fdused = fds->fdnum + 1;
+	fds->fdnum += FD_SETSIZE;
+	return fds;
+}
+
+static struct svc_fdset *
+svc_pollfd_del(int fd, struct svc_fdset *fds)
+{
+	struct pollfd *pfd;
+
+	if ((pfd = svc_pollfd_alloc(fds)) == NULL)
+		return NULL;
+
+	for (int i = 0; i < fds->fdnum; i++) {
+		if (pfd[i].fd != fd)
+			continue;
+
+		pfd[i].fd = -1;
+		if (i != fds->fdused - 1)
+			return fds;
+
+		do
+			if (pfd[i].fd != -1) 
+break;
+		while (--i >= 0);
+		fds->fdused = i + 1;
+		return fds;
+	}
+	return NULL;
+}
+
 static struct svc_fdset *
 svc_fdset_resize(int fd, struct svc_fdset *fds)
 {
@@ -206,6 +288,7 @@ void
 svc_fdset_init(int flags)
 {
 	DPRINTF("%x", flags);
+	__svc_flags = flags;
 	if ((flags & SVC_FDSET_MT) && fdsetkey == -2)
 		fdsetkey = -1;
 }
@@ -214,9 +297,14 @@ void
 svc_fdset_zero(void)
 {
 	DPRINTF("zero");
+
 	struct svc_fdset *fds = svc_fdset_alloc(0);
 	memset(fds->fdset, 0, fds->fdsize);
 	fds->fdmax = -1;
+
+	free(fds->fdp);
+	fds->fdp = NULL;
+	fds->fdnum = fds->fdused = 0;
 }
 
 int
@@ -234,7 +322,7 @@ svc_fdset_set(int fd)
 	DPRINTF_FDSET(fds, "%d", fd);
 
 	svc_fdset_sanitize(fds);
-	return 0;
+	return svc_pollfd_add(fd, fds) ? 0 : -1;
 }
 
 int
@@ -262,7 +350,7 @@ svc_fdset_clr(int fd)
 	DPRINTF_FDSET(fds, "%d", fd);
 
 	

CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:16:39 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Ticket 984.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 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.6 src/doc/CHANGES-7.0.1:1.1.2.7
--- src/doc/CHANGES-7.0.1:1.1.2.6	Sat Nov  7 16:37:03 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 00:16:39 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.6 2015/11/07 16:37:03 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.7 2015/11/08 00:16:39 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -97,3 +97,9 @@ sys/arch/arm/allwinner/awin_mmc.c		1.22
 	Avoid a divide by 0 when unplugging a sd card.
 	[bouyer, ticket #1006]
 
+sys/arch/x86/x86/cpu.c1.116
+
+	Don't disable/re-enable interrupts if they are already disabled.
+	Fixes i386 PAE kernels. PR#48196.
+	[nat, ticket #984]
+



CVS commit: [netbsd-6-0] src/external/bsd/ntp

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Nov  8 00:16:11 UTC 2015

Modified Files:
src/external/bsd/ntp [netbsd-6-0]: Makefile.inc importdate ntp2netbsd
src/external/bsd/ntp/bin/ntpd [netbsd-6-0]: Makefile ntp_parser.c
ntp_parser.h
src/external/bsd/ntp/bin/sntp [netbsd-6-0]: Makefile
src/external/bsd/ntp/dist [netbsd-6-0]: COPYRIGHT ChangeLog CommitLog
Makefile.am Makefile.in NEWS aclocal.m4 bootstrap build config.h.in
configure configure.ac packageinfo.sh
src/external/bsd/ntp/dist/adjtimed [netbsd-6-0]: Makefile.in adjtimed.c
src/external/bsd/ntp/dist/clockstuff [netbsd-6-0]: Makefile.in
chutest.c propdelay.c
src/external/bsd/ntp/dist/html [netbsd-6-0]: build.html confopt.html
copyright.html decode.html miscopt.html refclock.html sntp.html
stats.html
src/external/bsd/ntp/dist/html/drivers [netbsd-6-0]: driver22.html
driver28.html driver40.html driver46.html
src/external/bsd/ntp/dist/include [netbsd-6-0]: Makefile.am Makefile.in
binio.h mbg_gps166.h ntp.h ntp_assert.h ntp_calendar.h ntp_config.h
ntp_control.h ntp_fp.h ntp_io.h ntp_lists.h ntp_md5.h ntp_stdlib.h
ntp_syslog.h ntp_types.h ntpd.h parse.h parse_conf.h
timepps-Solaris.h
src/external/bsd/ntp/dist/include/isc [netbsd-6-0]: Makefile.in
src/external/bsd/ntp/dist/kernel [netbsd-6-0]: Makefile.in
src/external/bsd/ntp/dist/kernel/sys [netbsd-6-0]: Makefile.in
parsestreams.h
src/external/bsd/ntp/dist/lib/isc [netbsd-6-0]: inet_ntop.c log.c
result.c
src/external/bsd/ntp/dist/lib/isc/include/isc [netbsd-6-0]: backtrace.h
socket.h
src/external/bsd/ntp/dist/lib/isc/unix [netbsd-6-0]: file.c
ifiter_getifaddrs.c ifiter_ioctl.c net.c
src/external/bsd/ntp/dist/libjsmn [netbsd-6-0]: Makefile README.md
jsmn.c jsmn.h jsmn_test.c
src/external/bsd/ntp/dist/libntp [netbsd-6-0]: Makefile.am Makefile.in
atolfp.c audio.c authkeys.c authreadkeys.c caljulian.c caltontp.c
decodenetnum.c emalloc.c icom.c machines.c msyslog.c ntp_calendar.c
ntp_crypto_rnd.c ntp_intres.c ntp_lineedit.c ntp_rfc2553.c
ntp_worker.c prettydate.c recvbuff.c socket.c socktohost.c
statestr.c strdup.c work_fork.c
src/external/bsd/ntp/dist/libparse [netbsd-6-0]: Makefile.am
Makefile.in clk_computime.c clk_dcf7000.c clk_hopf6021.c
clk_meinberg.c clk_rawdcf.c clk_rcc8000.c clk_schmid.c
clk_sel240x.c clk_trimtaip.c clk_trimtsip.c clk_varitext.c
clk_wharton.c data_mbg.c gpstolfp.c info_trimble.c mkinfo_rcmd.sed
mkinfo_scmd.sed parse.c parse_conf.c parsesolaris.c parsestreams.c
trim_info.c
src/external/bsd/ntp/dist/ntpd [netbsd-6-0]: Makefile.am Makefile.in
cmd_args.c complete.conf.in invoke-ntp.conf.texi
invoke-ntp.keys.texi invoke-ntpd.texi keyword-gen-utd keyword-gen.c
ntp.conf.5man ntp.conf.5mdoc ntp.conf.def ntp.conf.html
ntp.conf.man.in ntp.conf.mdoc.in ntp.keys.5man ntp.keys.5mdoc
ntp.keys.html ntp.keys.man.in ntp.keys.mdoc.in ntp_config.c
ntp_control.c ntp_crypto.c ntp_io.c ntp_keyword.h ntp_leapsec.c
ntp_leapsec.h ntp_loopfilter.c ntp_monitor.c ntp_parser.y
ntp_peer.c ntp_proto.c ntp_refclock.c ntp_request.c ntp_restrict.c
ntp_scanner.c ntp_scanner.h ntp_timer.c ntp_util.c ntpd-opts.c
ntpd-opts.def ntpd-opts.h ntpd.1ntpdman ntpd.1ntpdmdoc ntpd.c
ntpd.html ntpd.man.in ntpd.mdoc.in ntpdbase-opts.def refclock_arc.c
refclock_chu.c refclock_gpsdjson.c refclock_jjy.c
refclock_jupiter.c refclock_local.c refclock_nmea.c
refclock_oncore.c refclock_palisade.c refclock_palisade.h
refclock_parse.c refclock_shm.c refclock_true.c refclock_wwv.c
src/external/bsd/ntp/dist/ntpdate [netbsd-6-0]: Makefile.in ntpdate.c
src/external/bsd/ntp/dist/ntpdc [netbsd-6-0]: Makefile.in
invoke-ntpdc.texi ntpdc-opts.c ntpdc-opts.h ntpdc.1ntpdcman
ntpdc.1ntpdcmdoc ntpdc.c ntpdc.html ntpdc.man.in ntpdc.mdoc.in
src/external/bsd/ntp/dist/ntpq [netbsd-6-0]: Makefile.in
invoke-ntpq.texi libntpq.h ntpq-opts.c ntpq-opts.def ntpq-opts.h
ntpq-subs.c ntpq.1ntpqman ntpq.1ntpqmdoc ntpq.c ntpq.html
ntpq.man.in ntpq.mdoc.in
src/external/bsd/ntp/dist/ntpsnmpd [netbsd-6-0]: Makefile.in
invoke-ntpsnmpd.texi netsnmp_daemonize.c ntp_snmp.h ntpsnmpd-opts.c
ntpsnmpd-opts.h ntpsnmpd.1ntpsnmpdman ntpsnmpd.1ntpsnmpdmdoc
ntpsnmpd.html ntpsnmpd.man.in ntpsnmpd.mdoc.in
src/external/bsd/ntp/dist/parseutil [netbsd-6-0]: Makefile.in dcfd.c
testdcf.c
  

CVS commit: [netbsd-7-0] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:15:47 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7-0]: cpu.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #984):
sys/arch/x86/x86/cpu.c: revision 1.116
Don't disable/re-enable interrupts if they are already disabled.
Addresses PR 48196.
This commit was improved and approved by christos@


To generate a diff of this commit:
cvs rdiff -u -r1.111.2.1 -r1.111.2.1.2.1 src/sys/arch/x86/x86/cpu.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/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.111.2.1 src/sys/arch/x86/x86/cpu.c:1.111.2.1.2.1
--- src/sys/arch/x86/x86/cpu.c:1.111.2.1	Mon Jan 12 21:06:41 2015
+++ src/sys/arch/x86/x86/cpu.c	Sun Nov  8 00:15:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.111.2.1 2015/01/12 21:06:41 snj Exp $	*/
+/*	$NetBSD: cpu.c,v 1.111.2.1.2.1 2015/11/08 00:15:47 riz Exp $	*/
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111.2.1 2015/01/12 21:06:41 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111.2.1.2.1 2015/11/08 00:15:47 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -1278,6 +1278,7 @@ cpu_load_pmap(struct pmap *pmap, struct 
 {
 #ifdef PAE
 	struct cpu_info *ci = curcpu();
+	bool interrupts_enabled;
 	pd_entry_t *l3_pd = ci->ci_pae_l3_pdir;
 	int i;
 
@@ -1286,11 +1287,16 @@ cpu_load_pmap(struct pmap *pmap, struct 
 	 * while this doesn't block NMIs, it's probably ok as NMIs unlikely
 	 * reload cr3.
 	 */
-	x86_disable_intr();
+	interrupts_enabled = (x86_read_flags() & PSL_I) != 0;
+	if (interrupts_enabled)
+		x86_disable_intr();
+
 	for (i = 0 ; i < PDP_SIZE; i++) {
 		l3_pd[i] = pmap->pm_pdirpa[i] | PG_V;
 	}
-	x86_enable_intr();
+	
+	if (interrupts_enabled)
+		x86_enable_intr();
 	tlbflush();
 #else /* PAE */
 	lcr3(pmap_pdirpa(pmap, 0));



CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:42:27 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1008-1009,1011-1013.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 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.22 src/doc/CHANGES-7.1:1.1.2.23
--- src/doc/CHANGES-7.1:1.1.2.22	Sat Nov  7 16:43:38 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 00:42:27 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.22 2015/11/07 16:43:38 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.23 2015/11/08 00:42:27 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -779,3 +779,40 @@ lib/libcurses/toucholap.c			1.16
 	Fix x/y editing error.
 	[uwe, ticket #1007]
 
+usr.sbin/sysinst/target.c			1.3
+
+	PR 50342: if there is no current partition manage, assume we are
+	running from an already installed system.
+	[martin, ticket #1008]
+
+distrib/sets/lists/comp/mi			1.1921
+lib/libm/Makefile1.167
+lib/libm/man/erf.31.13
+
+	PR/49399: Henning Petersen: Add man pages for erfl(3) and erfcl(3).
+	[dholland, ticket #1009]
+
+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.
+	- 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.
+	[christos, ticket #1011]
+
+external/gpl3/binutils/dist/binutils/arsup.c	1.2
+lib/libc/net/getnetnamadr.c			1.43-1.44
+
+	Resolve hostnames with "_".  PR#50367.
+	[christos, ticket #1012]
+
+sys/arch/x86/x86/sys_machdep.c			1.29
+
+	Fix broken error handling leading to random crashes in 
+	threaded programs.
+	[christos, ticket #1013]
+



CVS commit: [netbsd-7] src/sys

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:57:09 UTC 2015

Modified Files:
src/sys/kern [netbsd-7]: exec_elf.c
src/sys/sys [netbsd-7]: exec_elf.h

Log Message:
Pull up following revision(s) (requested by christos in ticket #1019):
sys/kern/exec_elf.c: revision 1.79
sys/sys/exec_elf.h: revision 1.150
sys/sys/exec_elf.h: revision 1.151
sys/kern/exec_elf.c: revision 1.80
Ignore the ancient 01.01 tag that gnuc used to put in old NetBSD binaries.
Add buildid Go note


To generate a diff of this commit:
cvs rdiff -u -r1.69.2.2 -r1.69.2.3 src/sys/kern/exec_elf.c
cvs rdiff -u -r1.141 -r1.141.2.1 src/sys/sys/exec_elf.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/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.69.2.2 src/sys/kern/exec_elf.c:1.69.2.3
--- src/sys/kern/exec_elf.c:1.69.2.2	Sun Mar 29 09:07:55 2015
+++ src/sys/kern/exec_elf.c	Sun Nov  8 00:57:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.69.2.2 2015/03/29 09:07:55 martin Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.69.2.3 2015/11/08 00:57:09 riz Exp $	*/
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.69.2.2 2015/03/29 09:07:55 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.69.2.3 2015/11/08 00:57:09 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -939,13 +939,20 @@ netbsd_elf_signature(struct lwp *l, stru
 			}
 
 			/*
-			 * Ignore SuSE tags; SuSE's n_type is the same as NetBSD's
-			 * one.
+			 * Ignore SuSE tags; SuSE's n_type is the same the
+			 * NetBSD one.
 			 */
 			if (np->n_namesz == ELF_NOTE_SUSE_NAMESZ &&
 			memcmp(ndata, ELF_NOTE_SUSE_NAME,
 			ELF_NOTE_SUSE_NAMESZ) == 0)
 break;
+			/*
+			 * Ignore old GCC
+			 */
+			if (np->n_namesz == ELF_NOTE_OGCC_NAMESZ &&
+			memcmp(ndata, ELF_NOTE_OGCC_NAME,
+			ELF_NOTE_OGCC_NAMESZ) == 0)
+break;
 			BADNOTE("NetBSD tag");
 			goto bad;
 
@@ -1004,6 +1011,9 @@ netbsd_elf_signature(struct lwp *l, stru
 		case ELF_NOTE_TYPE_SUSE_VERSION_TAG:
 			break;
 
+		case ELF_NOTE_TYPE_GO_BUILDID_TAG:
+			break;
+
 		default:
 			BADNOTE("unknown tag");
 bad:

Index: src/sys/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.141 src/sys/sys/exec_elf.h:1.141.2.1
--- src/sys/sys/exec_elf.h:1.141	Tue Jul  8 17:16:25 2014
+++ src/sys/sys/exec_elf.h	Sun Nov  8 00:57:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.141 2014/07/08 17:16:25 maxv Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.141.2.1 2015/11/08 00:57:09 riz Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -822,6 +822,11 @@ typedef struct {
 #define ELF_NOTE_ABI_OS_KFREEBSD	3
 #define ELF_NOTE_ABI_OS_KNETBSD		4
 
+/* Old gcc style, under the ABI tag */
+#define ELF_NOTE_OGCC_NAMESZ		8
+#define ELF_NOTE_OGCC_NAME		"01.01\0\0\0\0"
+#define ELF_NOTE_OGCC_DESCSZ		0
+
 /*
  * GNU-specific note type: Hardware capabilities
  * name: GNU\0
@@ -881,6 +886,18 @@ typedef struct {
 /* SuSE-specific note name */
 #define ELF_NOTE_SUSE_VERSION_NAME		"SuSE\0\0\0\0"
 
+/* Go-specific note type: buildid
+ * name: Go\0\0
+ * namesz: 4
+ * desc: 
+ *	words[10]
+ * descsz: 40
+ */
+#define ELF_NOTE_TYPE_GO_BUILDID_TAG	4
+#define ELF_NOTE_GO_BUILDID_NAMESZ	4
+#define ELF_NOTE_GO_BUILDID_DESCSZ	40
+#define ELF_NOTE_GO_BUILDID_NAME	"Go\0\0"
+
 /* NetBSD-specific note type: Emulation name.
  * name: NetBSD\0\0
  * namesz: 8



CVS commit: [netbsd-7] src/sys/nfs

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:14:20 UTC 2015

Modified Files:
src/sys/nfs [netbsd-7]: nfs_vfsops.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1021):
sys/nfs/nfs_vfsops.c: revision 1.231
Don't forget to call nfs_fini() when we're finished.  Without this,
we leave a dangling pool nfsrvdescpl around.


To generate a diff of this commit:
cvs rdiff -u -r1.229.2.1 -r1.229.2.2 src/sys/nfs/nfs_vfsops.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/nfs/nfs_vfsops.c
diff -u src/sys/nfs/nfs_vfsops.c:1.229.2.1 src/sys/nfs/nfs_vfsops.c:1.229.2.2
--- src/sys/nfs/nfs_vfsops.c:1.229.2.1	Wed Nov  4 17:32:00 2015
+++ src/sys/nfs/nfs_vfsops.c	Sun Nov  8 01:14:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vfsops.c,v 1.229.2.1 2015/11/04 17:32:00 riz Exp $	*/
+/*	$NetBSD: nfs_vfsops.c,v 1.229.2.2 2015/11/08 01:14:20 riz Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.229.2.1 2015/11/04 17:32:00 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.229.2.2 2015/11/08 01:14:20 riz Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_nfs.h"
@@ -1169,4 +1169,5 @@ nfs_vfs_done(void)
 	nfs_node_done();
 	nfs_kqfini();
 	nfs_iodfini();
+	nfs_fini();
 }



CVS commit: [netbsd-7] src/sys

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:22:54 UTC 2015

Modified Files:
src/sys/arch/arm/omap [netbsd-7]: omap3_sdhc.c
src/sys/arch/evbarm/beagle [netbsd-7]: beagle_machdep.c
src/sys/dev/sdmmc [netbsd-7]: sdhc.c sdhcvar.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1022):
sys/dev/sdmmc/sdhc.c: revision 1.89
sys/arch/arm/omap/omap3_sdhc.c: revision 1.19
sys/dev/sdmmc/sdhcvar.h: revision 1.25
sys/arch/evbarm/beagle/beagle_machdep.c: revision 1.62
allow vendor specific code to hook into bus width changes
Support 8-bit eMMC for TI AM335x. On my BeagleBone Black,
Before: 134217728 bytes transferred in 9.410 secs (14263307 bytes/sec)
After:  134217728 bytes transferred in 7.518 secs (17852850 bytes/sec)
enable 8-bit mode on AM335X SDMMC2


To generate a diff of this commit:
cvs rdiff -u -r1.14.4.1 -r1.14.4.2 src/sys/arch/arm/omap/omap3_sdhc.c
cvs rdiff -u -r1.60 -r1.60.2.1 src/sys/arch/evbarm/beagle/beagle_machdep.c
cvs rdiff -u -r1.44.2.8 -r1.44.2.9 src/sys/dev/sdmmc/sdhc.c
cvs rdiff -u -r1.13.12.3 -r1.13.12.4 src/sys/dev/sdmmc/sdhcvar.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/arm/omap/omap3_sdhc.c
diff -u src/sys/arch/arm/omap/omap3_sdhc.c:1.14.4.1 src/sys/arch/arm/omap/omap3_sdhc.c:1.14.4.2
--- src/sys/arch/arm/omap/omap3_sdhc.c:1.14.4.1	Sun Apr 19 04:37:17 2015
+++ src/sys/arch/arm/omap/omap3_sdhc.c	Sun Nov  8 01:22:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdhc.c,v 1.14.4.1 2015/04/19 04:37:17 msaitoh Exp $	*/
+/*	$NetBSD: omap3_sdhc.c,v 1.14.4.2 2015/11/08 01:22:54 riz Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.14.4.1 2015/04/19 04:37:17 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.14.4.2 2015/11/08 01:22:54 riz Exp $");
 
 #include "opt_omap.h"
 #include "edma.h"
@@ -51,6 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c
 #ifdef TI_AM335X
 #  include 
 #  include 
+#  include 
+#  include 
 #endif
 
 #if NEDMA > 0
@@ -84,6 +86,7 @@ static int obiosdhc_match(device_t, cfda
 static void obiosdhc_attach(device_t, device_t, void *);
 static int obiosdhc_detach(device_t, int);
 
+static int obiosdhc_bus_width(struct sdhc_softc *, int);
 static int obiosdhc_bus_clock(struct sdhc_softc *, int);
 static int obiosdhc_rod(struct sdhc_softc *, int);
 static int obiosdhc_write_protect(struct sdhc_softc *);
@@ -129,6 +132,24 @@ static const struct am335x_sdhc am335x_s
 	{ "MMC1",   SDMMC2_BASE_TIAM335X, 28, { AM335X_PRCM_CM_PER, 0xf4 } },
 	{ "MMCHS2", SDMMC3_BASE_TIAM335X, 29, { AM335X_PRCM_CM_WKUP, 0xf8 } },
 };
+
+struct am335x_padconf {
+	const char *padname;
+	const char *padmode;
+};
+const struct am335x_padconf am335x_padconf_mmc1[] = {
+	{ "GPMC_CSn1", "mmc1_clk" },
+	{ "GPMC_CSn2", "mmc1_cmd" },
+	{ "GPMC_AD0", "mmc1_dat0" },
+	{ "GPMC_AD1", "mmc1_dat1" },
+	{ "GPMC_AD2", "mmc1_dat2" },
+	{ "GPMC_AD3", "mmc1_dat3" },
+	{ "GPMC_AD4", "mmc1_dat4" },
+	{ "GPMC_AD5", "mmc1_dat5" },
+	{ "GPMC_AD6", "mmc1_dat6" },
+	{ "GPMC_AD7", "mmc1_dat7" },
+	{ NULL, NULL }
+};
 #endif
 
 CFATTACH_DECL_NEW(obiosdhc, sizeof(struct obiosdhc_softc),
@@ -213,6 +234,7 @@ obiosdhc_attach(device_t parent, device_
 	sc->sc.sc_vendor_write_protect = obiosdhc_write_protect;
 	sc->sc.sc_vendor_card_detect = obiosdhc_card_detect;
 	sc->sc.sc_vendor_bus_clock = obiosdhc_bus_clock;
+	sc->sc.sc_vendor_bus_width = obiosdhc_bus_width;
 	sc->sc_bst = oa->obio_iot;
 
 	clksft = ffs(sc->sc.sc_clkmsk) - 1;
@@ -256,6 +278,27 @@ obiosdhc_attach(device_t parent, device_
 			break;
 		}
 	KASSERT(i < __arraycount(am335x_sdhc));
+
+	if (oa->obio_addr == SDMMC2_BASE_TIAM335X) {
+		const char *mode;
+		u_int state;
+		
+		const struct am335x_padconf *padconf = am335x_padconf_mmc1;
+		for (i = 0; padconf[i].padname; i++) {
+			const char *padname = padconf[i].padname;
+			const char *padmode = padconf[i].padmode;
+			if (sitara_cm_padconf_get(padname, , ) == 0) {
+aprint_debug_dev(self, "%s mode %s state %d\n",
+padname, mode, state);
+			}
+			if (sitara_cm_padconf_set(padname, padmode,
+			(1 << 4) | (1 << 5)) != 0) {
+aprint_error_dev(self, "can't switch %s pad from %s to %s\n",
+padname, mode, padmode);
+return;
+			}
+		}
+	}
 #endif
 
 	/* XX: Turn-on regurator via I2C. */
@@ -417,6 +460,23 @@ obiosdhc_card_detect(struct sdhc_softc *
 }
 
 static int
+obiosdhc_bus_width(struct sdhc_softc *sc, int width)
+{
+	struct obiosdhc_softc *osc = (struct obiosdhc_softc *)sc;
+	uint32_t con;
+
+	con = bus_space_read_4(osc->sc_bst, osc->sc_bsh, MMCHS_CON);
+	if (width == 8) {
+		con |= CON_DW8;
+	} else {
+		con &= ~CON_DW8;
+	}
+	bus_space_write_4(osc->sc_bst, osc->sc_bsh, MMCHS_CON, con);
+
+	return 0;
+}
+
+static int
 obiosdhc_bus_clock(struct 

CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:24:53 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1015-1016,1018-1019,1021-1022


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 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.23 src/doc/CHANGES-7.1:1.1.2.24
--- src/doc/CHANGES-7.1:1.1.2.23	Sun Nov  8 00:42:27 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 01:24:53 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.23 2015/11/08 00:42:27 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.24 2015/11/08 01:24:53 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -816,3 +816,45 @@ sys/arch/x86/x86/sys_machdep.c			1.29
 	threaded programs.
 	[christos, ticket #1013]
 
+etc/rc.subr	1.97
+
+	Speed up multiuser boot time on slow machines.  PR#50046.
+	[phx, ticket #1015]
+
+usr.sbin/iostat/iostat.8			1.24
+usr.sbin/iostat/iostat.c			1.62-1.63
+
+	Support fnmatch(3) patterns for disknames.  eg, "iostat wd*" works
+	now. Update the default disk number selection to note that it uses
+	the current terminal size to fit disks, not hard coded 4.
+	Extend the "tout" column to 5 characters, it's really common on a
+	modern machine to have eg, build output way more than  chars/sec.
+	This doesn't affect the default disk list on an 80-char wide screen.
+	[mrg, ticket #1016]
+
+sys/kern/uipc_syscalls.c			1.181
+
+	Don't overwrite the user iov pointer in sendmmsg. Make the send
+	and receive code look the same.
+	[christos, ticket #1018]
+
+sys/kern/exec_elf.c1.79-1.80
+sys/sys/exec_elf.h1.150-1.151
+
+	Recognize additional ELF notes.
+	[christos, ticket #1019]
+
+sys/nfs/nfs_vfsops.c1.231
+
+	Don't forget to call nfs_fini() when we're finished.  Without this,
+	we leave a dangling pool nfsrvdescpl around.
+	[pgoyette, ticket #1021]
+
+sys/arch/arm/omap/omap3_sdhc.c			1.19
+sys/arch/evbarm/beagle/beagle_machdep.c		1.62
+sys/dev/sdmmc/sdhc.c1.89 via patch
+sys/dev/sdmmc/sdhcvar.h1.25
+
+	Support 8-bit eMMC for TI AM335x. 
+	[jmcneill, ticket #1022]
+



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:56:58 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
ticket 1024


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 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.10 src/doc/CHANGES-7.0.1:1.1.2.11
--- src/doc/CHANGES-7.0.1:1.1.2.10	Sun Nov  8 01:27:24 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 01:56:58 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.10 2015/11/08 01:27:24 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.11 2015/11/08 01:56:58 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -133,3 +133,611 @@ sys/fs/tmpfs/tmpfs_subr.c			1.101
 	Fixes PR kern/50381.
 	[leot, ticket #1023]
 
+doc/3RDPARTY	patch
+external/bsd/ntp/dist/tests/libntp/atoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/atouint.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/authkeys.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/buftvtots.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/calendar.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/caljulian.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/caltontp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/calyearstart.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/clocktime.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/decodenetnum.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfptest.cup to 1.1.1.1
+external/bsd/ntp/dist/tests/libntp/sockaddrtest.c up to 1.1.1.1
+external/bsd/ntp/dist/tests/libntp/hextolfp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/humandate.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfpfunc.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/lfptostr.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/modetoa.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/msyslog.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/netof.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/numtoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/numtohost.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/octtoint.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/prettydate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/recvbuff.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/refidsmear.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/refnumtoa.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-a_md5encrypt.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-atoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/socktoa.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/ssl_init.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/statestr.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/strtolfp.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/test-libntp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/timevalops.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/tstotv.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/tvtots.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/uglydate.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/vi64ops.cup to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/ymd2yd.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-netof.c  up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/a_md5encrypt.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-msyslog.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/hextoint.c   up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-atouint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-authkeys.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-buftvtots.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-calendar.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-caljulian.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-caltontp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-calyearstart.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-clocktime.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-decodenetnum.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-hextoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-hextolfp.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-humandate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-lfpfunc.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-lfptostr.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-modetoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-numtoa.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-numtohost.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-octtoint.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-prettydate.c up to 1.1.1.3
+external/bsd/ntp/dist/tests/libntp/run-recvbuff.c up to 

CVS commit: src/lib/libc

2015-11-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Nov  8 02:20:26 UTC 2015

Modified Files:
src/lib/libc: shlib_version

Log Message:
Soft-float support for rounding mode is currently not thread-safe, which
is not acceptable. Decision should be made on whether full fenv.h
support is desirable and then fix this appropiately.

Math functions (both libc and libm) should not touch errno, this creates
unnecessary problems for compilers.


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/lib/libc/shlib_version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/shlib_version
diff -u src/lib/libc/shlib_version:1.260 src/lib/libc/shlib_version:1.261
--- src/lib/libc/shlib_version:1.260	Sat Nov  7 16:21:42 2015
+++ src/lib/libc/shlib_version	Sun Nov  8 02:20:26 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: shlib_version,v 1.260 2015/11/07 16:21:42 nros Exp $
+#	$NetBSD: shlib_version,v 1.261 2015/11/08 02:20:26 joerg Exp $
 #	Remember to update distrib/sets/lists/base/shl.* when changing
 #
 # things we wish to do on next major version bump:
@@ -41,5 +41,7 @@
 # - redo stdin/stdout/stderr to not require copy relocations
 # - move gethostbyname to a compat library
 # - remove arc4random(3) API
+# - decide whether soft-float should support fenv.h, including thread-local contett
+# - stop all math functions from setting errno
 major=12
 minor=199



CVS commit: [netbsd-6] src/doc

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 22:28:56 UTC 2015

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
1342


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.225 -r1.1.2.226 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.225 src/doc/CHANGES-6.2:1.1.2.226
--- src/doc/CHANGES-6.2:1.1.2.225	Tue Sep 15 00:04:12 2015
+++ src/doc/CHANGES-6.2	Sat Nov  7 22:28:55 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.225 2015/09/15 00:04:12 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.226 2015/11/07 22:28:55 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -11803,3 +11803,744 @@ sys/compat/netbsd32/netbsd32_ioctl.c		1.
 	Fix inverted logic when checking the size of data to copyin().
 	[maxv, ticket #1318]
 
+doc/3RDPARTY	patch
+external/bsd/ntp/Makefile.inc   patch
+external/bsd/ntp/bin/ntpd/Makefile  patch
+external/bsd/ntp/bin/ntpd/ntp_parser.c  patch
+external/bsd/ntp/bin/ntpd/ntp_parser.h  patch
+external/bsd/ntp/bin/sntp/Makefile  patch
+external/bsd/ntp/bin/sntp/event2/event-config.h delete
+external/bsd/ntp/bin/sntp/evlog.c   delete
+external/bsd/ntp/dist/COPYRIGHT up to 1.1.1.5
+external/bsd/ntp/dist/ChangeLog up to 1.1.1.7
+external/bsd/ntp/dist/CommitLog up to 1.1.1.7
+external/bsd/ntp/dist/Makefile.am   up to 1.1.1.7
+external/bsd/ntp/dist/Makefile.in   up to 1.1.1.7
+external/bsd/ntp/dist/NEWS  up to 1.1.1.7
+external/bsd/ntp/dist/README.leapsmear  up to 1.1.1.1
+external/bsd/ntp/dist/aclocal.m4up to 1.1.1.7
+external/bsd/ntp/dist/adjtimed/Makefile.in  up to 1.1.1.7
+external/bsd/ntp/dist/adjtimed/adjtimed.c   up to 1.4
+external/bsd/ntp/dist/bootstrap up to 1.1.1.5
+external/bsd/ntp/dist/build up to 1.1.1.5
+external/bsd/ntp/dist/clockstuff/Makefile.inup to 1.1.1.7
+external/bsd/ntp/dist/clockstuff/chutest.c  up to 1.4
+external/bsd/ntp/dist/clockstuff/propdelay.cup to 1.4
+external/bsd/ntp/dist/config.h.in   up to 1.1.1.6
+external/bsd/ntp/dist/configure up to 1.1.1.7
+external/bsd/ntp/dist/configure.ac  up to 1.1.1.7
+external/bsd/ntp/dist/html/build.html   up to 1.1.1.4
+external/bsd/ntp/dist/html/confopt.html up to 1.1.1.4
+external/bsd/ntp/dist/html/copyright.html   up to 1.1.1.5
+external/bsd/ntp/dist/html/decode.html  up to 1.1.1.5
+external/bsd/ntp/dist/html/drivers/driver22.html up to 1.1.1.4
+external/bsd/ntp/dist/html/drivers/driver28.html up to 1.1.1.4
+external/bsd/ntp/dist/html/drivers/driver40-ja.html up to 1.1.1.1
+external/bsd/ntp/dist/html/drivers/driver40.html up to 1.1.1.4
+external/bsd/ntp/dist/html/drivers/driver46.html up to 1.1.1.2
+external/bsd/ntp/dist/html/miscopt.html up to 1.1.1.6
+external/bsd/ntp/dist/html/refclock.htmlup to 1.1.1.4
+external/bsd/ntp/dist/html/sntp.htmlup to 1.1.1.4
+external/bsd/ntp/dist/html/stats.html   up to 1.1.1.3
+external/bsd/ntp/dist/include/Makefile.am   up to 1.1.1.6
+external/bsd/ntp/dist/include/Makefile.in   up to 1.1.1.7
+external/bsd/ntp/dist/include/binio.h   up to 1.4
+external/bsd/ntp/dist/include/isc/Makefile.in   up to 1.1.1.7
+external/bsd/ntp/dist/include/mbg_gps166.h  up to 1.4
+external/bsd/ntp/dist/include/ntp.h up to 1.4
+external/bsd/ntp/dist/include/ntp_assert.h  up to 1.4
+external/bsd/ntp/dist/include/ntp_calendar.hup to 1.5
+external/bsd/ntp/dist/include/ntp_config.h  up to 1.9
+external/bsd/ntp/dist/include/ntp_control.h up to 1.4
+external/bsd/ntp/dist/include/ntp_fp.h  up to 1.7
+external/bsd/ntp/dist/include/ntp_io.h  up to 1.3
+external/bsd/ntp/dist/include/ntp_lists.h   up to 1.4
+external/bsd/ntp/dist/include/ntp_md5.h up to 1.4
+external/bsd/ntp/dist/include/ntp_stdlib.h  up to 1.11
+external/bsd/ntp/dist/include/ntp_syslog.h  up to 1.4
+external/bsd/ntp/dist/include/ntp_types.h   up to 1.4
+external/bsd/ntp/dist/include/ntpd.hup to 1.7
+external/bsd/ntp/dist/include/parse.h   up to 1.4
+external/bsd/ntp/dist/include/parse_conf.h  up to 1.4
+external/bsd/ntp/dist/include/rc_cmdlength.hup to 1.1.1.1
+external/bsd/ntp/dist/include/refidsmear.h  up to 1.1.1.2
+external/bsd/ntp/dist/include/timepps-Solaris.h up to 1.4
+external/bsd/ntp/dist/kernel/Makefile.inup to 1.1.1.7
+external/bsd/ntp/dist/kernel/sys/Makefile.inup to 1.1.1.7
+external/bsd/ntp/dist/kernel/sys/parsestreams.h up to 1.4
+external/bsd/ntp/dist/lib/isc/include/isc/backtrace.h up to 1.4

CVS commit: [netbsd-6-1] src

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 22:46:29 UTC 2015

Modified Files:
src/doc [netbsd-6-1]: 3RDPARTY
src/external/bsd/ntp [netbsd-6-1]: Makefile.inc importdate ntp2netbsd
src/external/bsd/ntp/bin/ntpd [netbsd-6-1]: Makefile ntp_parser.c
ntp_parser.h
src/external/bsd/ntp/bin/sntp [netbsd-6-1]: Makefile
src/external/bsd/ntp/dist [netbsd-6-1]: COPYRIGHT ChangeLog CommitLog
Makefile.am Makefile.in NEWS aclocal.m4 bootstrap build config.h.in
configure configure.ac packageinfo.sh
src/external/bsd/ntp/dist/adjtimed [netbsd-6-1]: Makefile.in adjtimed.c
src/external/bsd/ntp/dist/clockstuff [netbsd-6-1]: Makefile.in
chutest.c propdelay.c
src/external/bsd/ntp/dist/html [netbsd-6-1]: build.html confopt.html
copyright.html decode.html miscopt.html refclock.html sntp.html
stats.html
src/external/bsd/ntp/dist/html/drivers [netbsd-6-1]: driver22.html
driver28.html driver40.html driver46.html
src/external/bsd/ntp/dist/include [netbsd-6-1]: Makefile.am Makefile.in
binio.h mbg_gps166.h ntp.h ntp_assert.h ntp_calendar.h ntp_config.h
ntp_control.h ntp_fp.h ntp_io.h ntp_lists.h ntp_md5.h ntp_stdlib.h
ntp_syslog.h ntp_types.h ntpd.h parse.h parse_conf.h
timepps-Solaris.h
src/external/bsd/ntp/dist/include/isc [netbsd-6-1]: Makefile.in
src/external/bsd/ntp/dist/kernel [netbsd-6-1]: Makefile.in
src/external/bsd/ntp/dist/kernel/sys [netbsd-6-1]: Makefile.in
parsestreams.h
src/external/bsd/ntp/dist/lib/isc [netbsd-6-1]: inet_ntop.c log.c
result.c
src/external/bsd/ntp/dist/lib/isc/include/isc [netbsd-6-1]: backtrace.h
socket.h
src/external/bsd/ntp/dist/lib/isc/unix [netbsd-6-1]: file.c
ifiter_getifaddrs.c ifiter_ioctl.c net.c
src/external/bsd/ntp/dist/libjsmn [netbsd-6-1]: Makefile README.md
jsmn.c jsmn.h jsmn_test.c
src/external/bsd/ntp/dist/libntp [netbsd-6-1]: Makefile.am Makefile.in
atolfp.c audio.c authkeys.c authreadkeys.c caljulian.c caltontp.c
decodenetnum.c emalloc.c icom.c machines.c msyslog.c ntp_calendar.c
ntp_crypto_rnd.c ntp_intres.c ntp_lineedit.c ntp_rfc2553.c
ntp_worker.c prettydate.c recvbuff.c socket.c socktohost.c
statestr.c strdup.c work_fork.c
src/external/bsd/ntp/dist/libparse [netbsd-6-1]: Makefile.am
Makefile.in clk_computime.c clk_dcf7000.c clk_hopf6021.c
clk_meinberg.c clk_rawdcf.c clk_rcc8000.c clk_schmid.c
clk_sel240x.c clk_trimtaip.c clk_trimtsip.c clk_varitext.c
clk_wharton.c data_mbg.c gpstolfp.c info_trimble.c mkinfo_rcmd.sed
mkinfo_scmd.sed parse.c parse_conf.c parsesolaris.c parsestreams.c
trim_info.c
src/external/bsd/ntp/dist/ntpd [netbsd-6-1]: Makefile.am Makefile.in
cmd_args.c complete.conf.in invoke-ntp.conf.texi
invoke-ntp.keys.texi invoke-ntpd.texi keyword-gen-utd keyword-gen.c
ntp.conf.5man ntp.conf.5mdoc ntp.conf.def ntp.conf.html
ntp.conf.man.in ntp.conf.mdoc.in ntp.keys.5man ntp.keys.5mdoc
ntp.keys.html ntp.keys.man.in ntp.keys.mdoc.in ntp_config.c
ntp_control.c ntp_crypto.c ntp_io.c ntp_keyword.h ntp_leapsec.c
ntp_leapsec.h ntp_loopfilter.c ntp_monitor.c ntp_parser.y
ntp_peer.c ntp_proto.c ntp_refclock.c ntp_request.c ntp_restrict.c
ntp_scanner.c ntp_scanner.h ntp_timer.c ntp_util.c ntpd-opts.c
ntpd-opts.def ntpd-opts.h ntpd.1ntpdman ntpd.1ntpdmdoc ntpd.c
ntpd.html ntpd.man.in ntpd.mdoc.in ntpdbase-opts.def refclock_arc.c
refclock_chu.c refclock_gpsdjson.c refclock_jjy.c
refclock_jupiter.c refclock_local.c refclock_nmea.c
refclock_oncore.c refclock_palisade.c refclock_palisade.h
refclock_parse.c refclock_shm.c refclock_true.c refclock_wwv.c
src/external/bsd/ntp/dist/ntpdate [netbsd-6-1]: Makefile.in ntpdate.c
src/external/bsd/ntp/dist/ntpdc [netbsd-6-1]: Makefile.in
invoke-ntpdc.texi ntpdc-opts.c ntpdc-opts.h ntpdc.1ntpdcman
ntpdc.1ntpdcmdoc ntpdc.c ntpdc.html ntpdc.man.in ntpdc.mdoc.in
src/external/bsd/ntp/dist/ntpq [netbsd-6-1]: Makefile.in
invoke-ntpq.texi libntpq.h ntpq-opts.c ntpq-opts.def ntpq-opts.h
ntpq-subs.c ntpq.1ntpqman ntpq.1ntpqmdoc ntpq.c ntpq.html
ntpq.man.in ntpq.mdoc.in
src/external/bsd/ntp/dist/ntpsnmpd [netbsd-6-1]: Makefile.in
invoke-ntpsnmpd.texi netsnmp_daemonize.c ntp_snmp.h ntpsnmpd-opts.c
ntpsnmpd-opts.h ntpsnmpd.1ntpsnmpdman ntpsnmpd.1ntpsnmpdmdoc
ntpsnmpd.html ntpsnmpd.man.in ntpsnmpd.mdoc.in
src/external/bsd/ntp/dist/parseutil [netbsd-6-1]: 

CVS commit: src/share/mk

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 23:53:28 UTC 2015

Modified Files:
src/share/mk: bsd.README

Log Message:
LIBEXECINFO


To generate a diff of this commit:
cvs rdiff -u -r1.346 -r1.347 src/share/mk/bsd.README

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.README
diff -u src/share/mk/bsd.README:1.346 src/share/mk/bsd.README:1.347
--- src/share/mk/bsd.README:1.346	Thu Jul 23 04:03:26 2015
+++ src/share/mk/bsd.README	Sat Nov  7 18:53:28 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.346 2015/07/23 08:03:26 mrg Exp $
+#	$NetBSD: bsd.README,v 1.347 2015/11/07 23:53:28 christos Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -1540,6 +1540,7 @@ DPADD		Additional dependencies for the p
 		LIBEVENT?=	${DESTDIR}/usr/lib/libevent.a
 		LIBEVENT_OPENSSL?=	${DESTDIR}/usr/lib/libevent_openssl.a
 		LIBEVENT_PTHREADS?=	${DESTDIR}/usr/lib/libevent_pthreads.a
+		LIBEXECINFO?=	${DESTDIR}/usr/lib/libexecinfo.a
 		LIBEXPAT?=	${DESTDIR}/usr/lib/libexpat.a
 		LIBFETCH?=	${DESTDIR}/usr/lib/libfetch.a
 		LIBFORM?=	${DESTDIR}/usr/lib/libform.a



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:31:16 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
ticket 1011.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 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.7 src/doc/CHANGES-7.0.1:1.1.2.8
--- src/doc/CHANGES-7.0.1:1.1.2.7	Sun Nov  8 00:16:39 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 00:31:15 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.7 2015/11/08 00:16:39 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.8 2015/11/08 00:31:15 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -103,3 +103,15 @@ sys/arch/x86/x86/cpu.c1.116
 	Fixes i386 PAE kernels. PR#48196.
 	[nat, ticket #984]
 
+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.
+	- 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.
+	[christos, ticket #1011]
+



CVS commit: [netbsd-7] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:31:00 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7]: bus_dma.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1011):
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.71 -r1.71.4.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.71 src/sys/arch/x86/x86/bus_dma.c:1.71.4.1
--- src/sys/arch/x86/x86/bus_dma.c:1.71	Tue Dec 24 15:42:56 2013
+++ src/sys/arch/x86/x86/bus_dma.c	Sun Nov  8 00:31:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.71 2013/12/24 15:42:56 christos Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.71.4.1 2015/11/08 00:31:00 riz 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.71 2013/12/24 15:42:56 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71.4.1 2015/11/08 00:31:00 riz Exp $");
 
 /*
  * The following is included because _bus_dma_uiomove is derived from
@@ -291,11 +291,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;
@@ -331,12 +330,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;
@@ -399,6 +397,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;
 	}
@@ -797,7 +797,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) {
@@ -927,16 +927,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)) {
@@ -1244,19 +1245,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-7-0] src/sys/arch/x86/x86

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:30:48 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-7-0]: bus_dma.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1011):
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.71 -r1.71.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.71 src/sys/arch/x86/x86/bus_dma.c:1.71.8.1
--- src/sys/arch/x86/x86/bus_dma.c:1.71	Tue Dec 24 15:42:56 2013
+++ src/sys/arch/x86/x86/bus_dma.c	Sun Nov  8 00:30:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.71 2013/12/24 15:42:56 christos Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.71.8.1 2015/11/08 00:30:48 riz 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.71 2013/12/24 15:42:56 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71.8.1 2015/11/08 00:30:48 riz Exp $");
 
 /*
  * The following is included because _bus_dma_uiomove is derived from
@@ -291,11 +291,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;
@@ -331,12 +330,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;
@@ -399,6 +397,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;
 	}
@@ -797,7 +797,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) {
@@ -927,16 +927,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)) {
@@ -1244,19 +1245,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-7] src/usr.sbin/iostat

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:49:06 UTC 2015

Modified Files:
src/usr.sbin/iostat [netbsd-7]: iostat.8 iostat.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1016):
usr.sbin/iostat/iostat.c: revision 1.62
usr.sbin/iostat/iostat.c: revision 1.63
usr.sbin/iostat/iostat.8: revision 1.24
support fnmatch(3) patterns for disknames.  eg, "iostat wd*" works now.
update the default disk number selection to note that it uses the current
terminal size to fit disks, not hard coded 4.
extend the "tout" column to 5 characters, it's really common on a modern
machine to have eg, build output way more than  chars/sec.
this doesn't affect the default disk list on an 80-char wide screen.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.23.2.1 src/usr.sbin/iostat/iostat.8
cvs rdiff -u -r1.61 -r1.61.2.1 src/usr.sbin/iostat/iostat.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/iostat/iostat.8
diff -u src/usr.sbin/iostat/iostat.8:1.23 src/usr.sbin/iostat/iostat.8:1.23.2.1
--- src/usr.sbin/iostat/iostat.8:1.23	Wed Jun 11 17:01:04 2014
+++ src/usr.sbin/iostat/iostat.8	Sun Nov  8 00:49:06 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: iostat.8,v 1.23 2014/06/11 17:01:04 joerg Exp $
+.\"	$NetBSD: iostat.8,v 1.23.2.1 2015/11/08 00:49:06 riz Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)iostat.8	8.1 (Berkeley) 6/6/93
 .\"
-.Dd June 11, 2014
+.Dd July 9, 2015
 .Dt IOSTAT 8
 .Os
 .Sh NAME
@@ -142,13 +142,16 @@ characters written to terminals
 .It disks
 Disk operations.
 The header of the field is the disk name and unit number.
-If more than four disk drives are configured in the system,
+If more drives are configured in the system that fit across the
+current display,
 .Nm
-displays only the first four drives.
+displays only those drives that fit on the display.
 To force
 .Nm
-to display specific drives, their names may be supplied on the command
-line.
+to display specific drives, they may be supplied on the command
+line, either as names or
+.Fn fnmatch
+patterns.
 .Pp
 .Bl -tag -width indent -compact
 .It KB/t
@@ -189,6 +192,7 @@ Seconds spent in disk activity
 .Xr \ 1 ,
 .Xr systat 1 ,
 .Xr vmstat 1 ,
+.Xr fnmatch 3 ,
 .Xr pstat 8
 .Pp
 The sections starting with ``Interpreting system activity'' in

Index: src/usr.sbin/iostat/iostat.c
diff -u src/usr.sbin/iostat/iostat.c:1.61 src/usr.sbin/iostat/iostat.c:1.61.2.1
--- src/usr.sbin/iostat/iostat.c:1.61	Wed Jun 11 17:01:04 2014
+++ src/usr.sbin/iostat/iostat.c	Sun Nov  8 00:49:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: iostat.c,v 1.61 2014/06/11 17:01:04 joerg Exp $	*/
+/*	$NetBSD: iostat.c,v 1.61.2.1 2015/11/08 00:49:05 riz Exp $	*/
 
 /*
  * Copyright (c) 1996 John M. Vinopal
@@ -71,7 +71,7 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 19
 #if 0
 static char sccsid[] = "@(#)iostat.c	8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: iostat.c,v 1.61 2014/06/11 17:01:04 joerg Exp $");
+__RCSID("$NetBSD: iostat.c,v 1.61.2.1 2015/11/08 00:49:05 riz Exp $");
 #endif
 #endif /* not lint */
 
@@ -88,6 +88,7 @@ __RCSID("$NetBSD: iostat.c,v 1.61 2014/0
 #include 
 #include 
 #include 
+#include 
 
 #include "drvstats.h"
 
@@ -183,7 +184,7 @@ main(int argc, char *argv[])
 	if (ISSET(todo, SHOW_CPU))
 		defdrives -= 16;	/* XXX magic number */
 	if (ISSET(todo, SHOW_TTY))
-		defdrives -= 9;		/* XXX magic number */
+		defdrives -= 10;	/* XXX magic number */
 	defdrives /= 18;		/* XXX magic number */
 
 	drvinit(0);
@@ -278,7 +279,7 @@ header(void)
 
 	/* Sub-Headers. */
 	if (ISSET(todo, SHOW_TTY))
-		printf(" tin tout");
+		printf(" tin  tout");
 
 	if (ISSET(todo, SHOW_STATS_1)) {
 		for (i = 0; i < ndrive; i++)
@@ -467,7 +468,7 @@ display(void)
 	}
 
 	if (ISSET(todo, SHOW_TTY))
-		printf("%4.0f %4.0f", cur.tk_nin / etime, cur.tk_nout / etime);
+		printf("%4.0f %5.0f", cur.tk_nin / etime, cur.tk_nout / etime);
 
 	if (ISSET(todo, SHOW_STATS_1)) {
 		drive_stats(etime);
@@ -511,7 +512,7 @@ selectdrives(int argc, char *argv[])
 #endif
 		tried++;
 		for (i = 0; i < (int)ndrive; i++) {
-			if (strcmp(cur.name[i], *argv))
+			if (fnmatch(*argv, cur.name[i], 0))
 continue;
 			cur.select[i] = 1;
 			++ndrives;



CVS commit: [netbsd-7] src/sys/kern

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 00:55:11 UTC 2015

Modified Files:
src/sys/kern [netbsd-7]: uipc_syscalls.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1018):
sys/kern/uipc_syscalls.c: revision 1.181
Don't overwrite the user iov pointer in sendmmsg. Make the send and receive
code look the same.


To generate a diff of this commit:
cvs rdiff -u -r1.172.2.1 -r1.172.2.2 src/sys/kern/uipc_syscalls.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/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.172.2.1 src/sys/kern/uipc_syscalls.c:1.172.2.2
--- src/sys/kern/uipc_syscalls.c:1.172.2.1	Sat Aug  8 15:45:47 2015
+++ src/sys/kern/uipc_syscalls.c	Sun Nov  8 00:55:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.172.2.1 2015/08/08 15:45:47 martin Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.172.2.2 2015/11/08 00:55:11 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.172.2.1 2015/08/08 15:45:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.172.2.2 2015/11/08 00:55:11 riz Exp $");
 
 #include "opt_pipe.h"
 
@@ -568,10 +568,10 @@ do_sys_sendmsg_so(struct lwp *l, int s, 
 			if (error)
 goto bad;
 		}
-		mp->msg_iov = iov;
-	}
+		auio.uio_iov = iov;
+	} else
+		auio.uio_iov = mp->msg_iov;
 
-	auio.uio_iov = mp->msg_iov;
 	auio.uio_iovcnt = mp->msg_iovlen;
 	auio.uio_rw = UIO_WRITE;
 	auio.uio_offset = 0;			/* XXX */
@@ -579,7 +579,8 @@ do_sys_sendmsg_so(struct lwp *l, int s, 
 	KASSERT(l == curlwp);
 	auio.uio_vmspace = l->l_proc->p_vmspace;
 
-	for (i = 0, tiov = mp->msg_iov; i < mp->msg_iovlen; i++, tiov++) {
+	tiov = auio.uio_iov;
+	for (i = 0; i < auio.uio_iovcnt; i++, tiov++) {
 		/*
 		 * Writes return ssize_t because -1 is returned on error.
 		 * Therefore, we must restrict the length to SSIZE_MAX to
@@ -955,7 +956,7 @@ do_sys_recvmsg_so(struct lwp *l, int s, 
 	auio.uio_vmspace = l->l_proc->p_vmspace;
 
 	tiov = auio.uio_iov;
-	for (i = 0; i < mp->msg_iovlen; i++, tiov++) {
+	for (i = 0; i < auio.uio_iovcnt; i++, tiov++) {
 		/*
 		 * Reads return ssize_t because -1 is returned on error.
 		 * Therefore we must restrict the length to SSIZE_MAX to



CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:29:28 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Ticket 1023


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r1.1.2.25 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.24 src/doc/CHANGES-7.1:1.1.2.25
--- src/doc/CHANGES-7.1:1.1.2.24	Sun Nov  8 01:24:53 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 01:29:28 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.24 2015/11/08 01:24:53 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.25 2015/11/08 01:29:28 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -858,3 +858,9 @@ sys/dev/sdmmc/sdhcvar.h1.25
 	Support 8-bit eMMC for TI AM335x. 
 	[jmcneill, ticket #1022]
 
+sys/fs/tmpfs/tmpfs_subr.c			1.101
+
+	Fix crash when tmpfs fills up.  PR#50381.
+	Fixes PR kern/50381.
+	[leot, ticket #1023]
+



CVS commit: [netbsd-7] src/sys/fs/tmpfs

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:26:56 UTC 2015

Modified Files:
src/sys/fs/tmpfs [netbsd-7]: tmpfs_subr.c

Log Message:
Pull up following revision(s) (requested by leot in ticket #1023):
sys/fs/tmpfs/tmpfs_subr.c: revision 1.101
Make sure that nde->td_node is NULL for asserts.
Thanks and from Mindaugas Rasiukevicius.
Fixes PR kern/50381.


To generate a diff of this commit:
cvs rdiff -u -r1.96.4.1 -r1.96.4.2 src/sys/fs/tmpfs/tmpfs_subr.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/fs/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1 src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.2
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1	Mon Dec 22 02:05:08 2014
+++ src/sys/fs/tmpfs/tmpfs_subr.c	Sun Nov  8 01:26:56 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $	*/
+/*	$NetBSD: tmpfs_subr.c,v 1.96.4.2 2015/11/08 01:26:56 riz Exp $	*/
 
 /*
  * Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.96.4.2 2015/11/08 01:26:56 riz Exp $");
 
 #include 
 #include 
@@ -451,6 +451,7 @@ tmpfs_alloc_dirent(tmpfs_mount_t *tmp, c
 	nde->td_namelen = len;
 	memcpy(nde->td_name, name, len);
 	nde->td_seq = TMPFS_DIRSEQ_NONE;
+	nde->td_node = NULL; /* for asserts */
 
 	*de = nde;
 	return 0;



CVS commit: [netbsd-7-0] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:27:24 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
Ticket 1023


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 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.9 src/doc/CHANGES-7.0.1:1.1.2.10
--- src/doc/CHANGES-7.0.1:1.1.2.9	Sun Nov  8 00:38:34 2015
+++ src/doc/CHANGES-7.0.1	Sun Nov  8 01:27:24 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.9 2015/11/08 00:38:34 riz Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.10 2015/11/08 01:27:24 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -127,3 +127,9 @@ sys/arch/x86/x86/sys_machdep.c			1.29
 	threaded programs.
 	[christos, ticket #1013]
 
+sys/fs/tmpfs/tmpfs_subr.c			1.101
+
+	Fix crash when tmpfs fills up.  PR#50381.
+	Fixes PR kern/50381.
+	[leot, ticket #1023]
+



CVS commit: [netbsd-7-0] src/sys/fs/tmpfs

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:27:10 UTC 2015

Modified Files:
src/sys/fs/tmpfs [netbsd-7-0]: tmpfs_subr.c

Log Message:
Pull up following revision(s) (requested by leot in ticket #1023):
sys/fs/tmpfs/tmpfs_subr.c: revision 1.101
Make sure that nde->td_node is NULL for asserts.
Thanks and from Mindaugas Rasiukevicius.
Fixes PR kern/50381.


To generate a diff of this commit:
cvs rdiff -u -r1.96.4.1 -r1.96.4.1.2.1 src/sys/fs/tmpfs/tmpfs_subr.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/fs/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1 src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1.2.1
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1	Mon Dec 22 02:05:08 2014
+++ src/sys/fs/tmpfs/tmpfs_subr.c	Sun Nov  8 01:27:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $	*/
+/*	$NetBSD: tmpfs_subr.c,v 1.96.4.1.2.1 2015/11/08 01:27:10 riz Exp $	*/
 
 /*
  * Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.96.4.1.2.1 2015/11/08 01:27:10 riz Exp $");
 
 #include 
 #include 
@@ -451,6 +451,7 @@ tmpfs_alloc_dirent(tmpfs_mount_t *tmp, c
 	nde->td_namelen = len;
 	memcpy(nde->td_name, name, len);
 	nde->td_seq = TMPFS_DIRSEQ_NONE;
+	nde->td_node = NULL; /* for asserts */
 
 	*de = nde;
 	return 0;



CVS commit: [netbsd-7] src/external/bsd/ntp

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 01:51:18 UTC 2015

Modified Files:
src/external/bsd/ntp/dist [netbsd-7]: Makefile.am Makefile.in NEWS
aclocal.m4 bootstrap config.h.in configure configure.ac
packageinfo.sh
src/external/bsd/ntp/dist/adjtimed [netbsd-7]: Makefile.in adjtimed.c
src/external/bsd/ntp/dist/clockstuff [netbsd-7]: Makefile.in chutest.c
propdelay.c
src/external/bsd/ntp/dist/html [netbsd-7]: decode.html miscopt.html
refclock.html stats.html
src/external/bsd/ntp/dist/html/drivers [netbsd-7]: driver22.html
driver40.html driver46.html
src/external/bsd/ntp/dist/include [netbsd-7]: Makefile.am Makefile.in
ntp_assert.h ntp_calendar.h ntp_config.h ntp_control.h ntp_io.h
ntp_lists.h ntp_stdlib.h ntp_syslog.h ntp_types.h ntpd.h parse.h
src/external/bsd/ntp/dist/include/isc [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/kernel [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/kernel/sys [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/lib/isc/unix [netbsd-7]: ifiter_getifaddrs.c
src/external/bsd/ntp/dist/libjsmn [netbsd-7]: Makefile README.md jsmn.c
jsmn.h jsmn_test.c
src/external/bsd/ntp/dist/libntp [netbsd-7]: Makefile.am Makefile.in
atolfp.c audio.c authkeys.c authreadkeys.c caljulian.c caltontp.c
decodenetnum.c emalloc.c icom.c machines.c msyslog.c ntp_calendar.c
ntp_intres.c ntp_lineedit.c ntp_rfc2553.c ntp_worker.c prettydate.c
recvbuff.c socket.c socktohost.c statestr.c strdup.c work_fork.c
src/external/bsd/ntp/dist/libparse [netbsd-7]: Makefile.in
clk_meinberg.c clk_rawdcf.c clk_schmid.c parse.c
src/external/bsd/ntp/dist/ntpd [netbsd-7]: Makefile.am Makefile.in
complete.conf.in invoke-ntp.conf.texi invoke-ntp.keys.texi
invoke-ntpd.texi keyword-gen-utd keyword-gen.c ntp.conf.5man
ntp.conf.5mdoc ntp.conf.def ntp.conf.html ntp.conf.man.in
ntp.conf.mdoc.in ntp.keys.5man ntp.keys.5mdoc ntp.keys.html
ntp.keys.man.in ntp.keys.mdoc.in ntp_config.c ntp_control.c
ntp_crypto.c ntp_io.c ntp_keyword.h ntp_leapsec.c ntp_leapsec.h
ntp_loopfilter.c ntp_monitor.c ntp_parser.y ntp_peer.c ntp_proto.c
ntp_refclock.c ntp_request.c ntp_restrict.c ntp_scanner.c
ntp_scanner.h ntp_timer.c ntpd-opts.c ntpd-opts.def ntpd-opts.h
ntpd.1ntpdman ntpd.1ntpdmdoc ntpd.c ntpd.html ntpd.man.in
ntpd.mdoc.in refclock_arc.c refclock_chu.c refclock_gpsdjson.c
refclock_jjy.c refclock_jupiter.c refclock_local.c refclock_nmea.c
refclock_oncore.c refclock_palisade.c refclock_parse.c
refclock_shm.c refclock_true.c refclock_wwv.c
src/external/bsd/ntp/dist/ntpdate [netbsd-7]: Makefile.in ntpdate.c
src/external/bsd/ntp/dist/ntpdc [netbsd-7]: Makefile.in
invoke-ntpdc.texi ntpdc-opts.c ntpdc-opts.h ntpdc.1ntpdcman
ntpdc.1ntpdcmdoc ntpdc.c ntpdc.html ntpdc.man.in ntpdc.mdoc.in
src/external/bsd/ntp/dist/ntpq [netbsd-7]: Makefile.in invoke-ntpq.texi
libntpq.h ntpq-opts.c ntpq-opts.def ntpq-opts.h ntpq-subs.c
ntpq.1ntpqman ntpq.1ntpqmdoc ntpq.c ntpq.html ntpq.man.in
ntpq.mdoc.in
src/external/bsd/ntp/dist/ntpsnmpd [netbsd-7]: Makefile.in
invoke-ntpsnmpd.texi ntpsnmpd-opts.c ntpsnmpd-opts.h
ntpsnmpd.1ntpsnmpdman ntpsnmpd.1ntpsnmpdmdoc ntpsnmpd.html
ntpsnmpd.man.in ntpsnmpd.mdoc.in
src/external/bsd/ntp/dist/parseutil [netbsd-7]: Makefile.in dcfd.c
testdcf.c
src/external/bsd/ntp/dist/scripts [netbsd-7]: Makefile.in
invoke-plot_summary.texi invoke-summary.texi plot_summary-opts
plot_summary.1plot_summaryman plot_summary.1plot_summarymdoc
plot_summary.html plot_summary.man.in plot_summary.mdoc.in
summary-opts summary.1summaryman summary.1summarymdoc summary.html
summary.man.in summary.mdoc.in
src/external/bsd/ntp/dist/scripts/build [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/scripts/calc_tickadj [netbsd-7]: Makefile.in
calc_tickadj.1calc_tickadjman calc_tickadj.1calc_tickadjmdoc
calc_tickadj.html calc_tickadj.man.in calc_tickadj.mdoc.in
invoke-calc_tickadj.texi
src/external/bsd/ntp/dist/scripts/lib [netbsd-7]: Makefile.in
src/external/bsd/ntp/dist/scripts/lib/NTP [netbsd-7]: Util.pm
src/external/bsd/ntp/dist/scripts/ntp-wait [netbsd-7]: Makefile.in
invoke-ntp-wait.texi ntp-wait-opts ntp-wait.1ntp-waitman
ntp-wait.1ntp-waitmdoc ntp-wait.html ntp-wait.man.in
ntp-wait.mdoc.in
src/external/bsd/ntp/dist/scripts/ntpsweep [netbsd-7]: Makefile.in

CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 02:08:18 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets 1020, 1025


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 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.26 src/doc/CHANGES-7.1:1.1.2.27
--- src/doc/CHANGES-7.1:1.1.2.26	Sun Nov  8 01:56:46 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 02:08:18 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.26 2015/11/08 01:56:46 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.27 2015/11/08 02:08:18 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1472,3 +1472,14 @@ external/bsd/ntp/scripts/mkver  
 	Update ntp to 4.2.8p4.
 	[christos, ticket #1024]
 
+sys/compat/linux/common/linux_mod.c		1.5
+sys/compat/netbsd32/netbsd32_mod.c		1.6-1.9
+
+	Fixes for compat modules.
+	[pgoyette, ticket #1020]
+
+usr.sbin/vnconfig/vnconfig.8			1.40
+
+	In NetBSD 7, the vnconfig command was renamed.
+	[pgoyette, ticket #1025]
+



CVS commit: src/lib/libc/rpc

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  8 02:46:53 UTC 2015

Modified Files:
src/lib/libc/rpc: rpc_commondata.c svc_fdset.c svc_fdset.h

Log Message:
Only do the compat cruft if we are compiling libc.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/rpc/rpc_commondata.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/rpc/svc_fdset.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/rpc/svc_fdset.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/rpc/rpc_commondata.c
diff -u src/lib/libc/rpc/rpc_commondata.c:1.13 src/lib/libc/rpc/rpc_commondata.c:1.14
--- src/lib/libc/rpc/rpc_commondata.c:1.13	Sat Nov  7 09:21:32 2015
+++ src/lib/libc/rpc/rpc_commondata.c	Sat Nov  7 21:46:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_commondata.c,v 1.13 2015/11/07 14:21:32 christos Exp $	*/
+/*	$NetBSD: rpc_commondata.c,v 1.14 2015/11/08 02:46:53 christos Exp $	*/
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -36,7 +36,7 @@
 #if 0
 static char *sccsid = "@(#)rpc_commondata.c	2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: rpc_commondata.c,v 1.13 2015/11/07 14:21:32 christos Exp $");
+__RCSID("$NetBSD: rpc_commondata.c,v 1.14 2015/11/08 02:46:53 christos Exp $");
 #endif
 #endif
 
@@ -48,10 +48,12 @@ __RCSID("$NetBSD: rpc_commondata.c,v 1.1
  * by public interfaces 
  */
 struct opaque_auth _null_auth;
+#ifdef _LIBC
 #undef svc_fdset
 __fd_set_256 svc_fdset;
 #undef svc_maxfd
 int svc_maxfd = -1;
+#endif
 #ifndef _REENTRANT
 #undef rpc_createerr
 struct rpc_createerr rpc_createerr;

Index: src/lib/libc/rpc/svc_fdset.c
diff -u src/lib/libc/rpc/svc_fdset.c:1.10 src/lib/libc/rpc/svc_fdset.c:1.11
--- src/lib/libc/rpc/svc_fdset.c:1.10	Sat Nov  7 18:17:09 2015
+++ src/lib/libc/rpc/svc_fdset.c	Sat Nov  7 21:46:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc_fdset.c,v 1.10 2015/11/07 23:17:09 christos Exp $	*/
+/*	$NetBSD: svc_fdset.c,v 1.11 2015/11/08 02:46:53 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: svc_fdset.c,v 1.10 2015/11/07 23:17:09 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.11 2015/11/08 02:46:53 christos Exp $");
 
 
 #include "reentrant.h"
@@ -53,7 +53,9 @@ __RCSID("$NetBSD: svc_fdset.c,v 1.10 201
 
 #undef svc_fdset
 #undef svc_maxfd
+#ifdef _LIBC
 extern __fd_set_256 svc_fdset;
+#endif
 extern int svc_maxfd;
 int __svc_flags;
 
@@ -132,11 +134,13 @@ svc_fdset_sanitize(struct svc_fdset *fds
 {
 	while (fds->fdmax >= 0 && !FD_ISSET(fds->fdmax, fds->fdset))
 		fds->fdmax--;
+#ifdef _LIBC
 	/* Compat update */
 	if (fds == &__svc_fdset) {
 		svc_fdset = *(__fd_set_256 *)__svc_fdset.fdset;
 		svc_maxfd = __svc_fdset.fdmax;
 	}
+#endif
 }
 
 static void

Index: src/lib/libc/rpc/svc_fdset.h
diff -u src/lib/libc/rpc/svc_fdset.h:1.3 src/lib/libc/rpc/svc_fdset.h:1.4
--- src/lib/libc/rpc/svc_fdset.h:1.3	Fri Nov  6 19:42:04 2015
+++ src/lib/libc/rpc/svc_fdset.h	Sat Nov  7 21:46:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc_fdset.h,v 1.3 2015/11/07 00:42:04 christos Exp $	*/
+/*	$NetBSD: svc_fdset.h,v 1.4 2015/11/08 02:46:53 christos Exp $	*/
 
 # ifdef RUMP_RPC
 #  include 
@@ -17,6 +17,8 @@
 #  define	select(a, b, c, d, e)	rump_sys_select(a, b, c, d, e)
 # endif
 
+#ifdef _LIBC
 typedef struct __fd_set_256 {
 	__fd_mask fds_bits[__NFD_LEN(256)];
 } __fd_set_256;
+#endif



CVS commit: [netbsd-7] src/sys/dev/usb

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 05:17:40 UTC 2015

Modified Files:
src/sys/dev/usb [netbsd-7]: uplcom.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1027):
sys/dev/usb/uplcom.c: revision 1.76
Don't pretend to do zero length IN control transfers as dwctwo(4)
(correctly according to usb 2.0 specification 8.5.3) uses IN status stage
when no (zero length) data stage.  Instead read into a 1 byte array.
My uplcom(4) now works on RPI.


To generate a diff of this commit:
cvs rdiff -u -r1.74.2.1 -r1.74.2.2 src/sys/dev/usb/uplcom.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/uplcom.c
diff -u src/sys/dev/usb/uplcom.c:1.74.2.1 src/sys/dev/usb/uplcom.c:1.74.2.2
--- src/sys/dev/usb/uplcom.c:1.74.2.1	Thu Jul 30 15:51:58 2015
+++ src/sys/dev/usb/uplcom.c	Sun Nov  8 05:17:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uplcom.c,v 1.74.2.1 2015/07/30 15:51:58 snj Exp $	*/
+/*	$NetBSD: uplcom.c,v 1.74.2.2 2015/11/08 05:17:40 riz Exp $	*/
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.74.2.1 2015/07/30 15:51:58 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.74.2.2 2015/11/08 05:17:40 riz Exp $");
 
 #include 
 #include 
@@ -499,21 +499,20 @@ struct pl2303x_init {
 	uint8_t		request;
 	uint16_t	value;
 	uint16_t	index;
-	uint16_t	length;
 };
 
 static const struct pl2303x_init pl2303x[] = {
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x0404,0, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8383,0, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x0404,1, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0, 0 },
-	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8383,0, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  0,1, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  1,0, 0 },
-	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  2, 0x44, 0 }
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x0404,0 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8383,0 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x0404,1 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8484,0 },
+	{ UT_READ_VENDOR_DEVICE,  UPLCOM_SET_REQUEST, 0x8383,0 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  0,1 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  1,0 },
+	{ UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST,  2, 0x44 }
 };
 #define N_PL2302X_INIT  (sizeof(pl2303x)/sizeof(pl2303x[0]))
 
@@ -525,13 +524,22 @@ uplcom_pl2303x_init(struct uplcom_softc 
 	int i;
 
 	for (i = 0; i < N_PL2302X_INIT; i++) {
+		char buf[1];
+		void *b;
+
 		req.bmRequestType = pl2303x[i].req_type;
 		req.bRequest = pl2303x[i].request;
 		USETW(req.wValue, pl2303x[i].value);
 		USETW(req.wIndex, pl2303x[i].index);
-		USETW(req.wLength, pl2303x[i].length);
+		if (UT_GET_DIR(req.bmRequestType) == UT_READ) {
+			b = buf;
+			USETW(req.wLength, sizeof(buf));
+		} else {
+			b = NULL;
+			USETW(req.wLength, 0);
+		}
 
-		err = usbd_do_request(sc->sc_udev, , 0);
+		err = usbd_do_request(sc->sc_udev, , b);
 		if (err) {
 			aprint_error_dev(sc->sc_dev,
 			"uplcom_pl2303x_init failed: %s\n",



CVS commit: [netbsd-7] src/doc

2015-11-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Nov  8 05:18:34 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Ticket 1027.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 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.27 src/doc/CHANGES-7.1:1.1.2.28
--- src/doc/CHANGES-7.1:1.1.2.27	Sun Nov  8 02:08:18 2015
+++ src/doc/CHANGES-7.1	Sun Nov  8 05:18:34 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.27 2015/11/08 02:08:18 riz Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.28 2015/11/08 05:18:34 riz Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -1483,3 +1483,12 @@ usr.sbin/vnconfig/vnconfig.8			1.40
 	In NetBSD 7, the vnconfig command was renamed.
 	[pgoyette, ticket #1025]
 
+sys/dev/usb/uplcom.c1.76
+
+	Don't pretend to do zero length IN control transfers as dwctwo(4)
+	(correctly according to usb 2.0 specification 8.5.3) uses IN
+	status stage when no (zero length) data stage.  Instead read
+	into a 1 byte array.
+	My uplcom(4) now works on RPI.
+	[skrll, ticket #1027]
+



CVS commit: src/tests/fs/nfs/nfsservice

2015-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  8 02:45:16 UTC 2015

Modified Files:
src/tests/fs/nfs/nfsservice: mountd.c rumpnfsd.c
src/tests/fs/nfs/nfsservice/rpcbind: pmap_svc.c rpcb_svc_com.c
rpcbind.c

Log Message:
make this work with the new fdset stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/fs/nfs/nfsservice/mountd.c
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/nfs/nfsservice/rumpnfsd.c
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c \
src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/nfs/nfsservice/mountd.c
diff -u src/tests/fs/nfs/nfsservice/mountd.c:1.9 src/tests/fs/nfs/nfsservice/mountd.c:1.10
--- src/tests/fs/nfs/nfsservice/mountd.c:1.9	Fri Aug 21 10:19:10 2015
+++ src/tests/fs/nfs/nfsservice/mountd.c	Sat Nov  7 21:45:16 2015
@@ -1,4 +1,4 @@
-/* 	$NetBSD: mountd.c,v 1.9 2015/08/21 14:19:10 christos Exp $	 */
+/* 	$NetBSD: mountd.c,v 1.10 2015/11/08 02:45:16 christos Exp $	 */
 
 /*
  * Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)mountd.c  8.15 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: mountd.c,v 1.9 2015/08/21 14:19:10 christos Exp $");
+__RCSID("$NetBSD: mountd.c,v 1.10 2015/11/08 02:45:16 christos Exp $");
 #endif
 #endif/* not lint */
 
@@ -353,7 +353,7 @@ mountd_main(void *arg)
 	extern sem_t gensem;
 	pthread_t ptdummy;
 
-	alloc_fdset();
+	svc_fdset_init(SVC_FDSET_MT | SVC_FDSET_POLL);
 
 #if 0
 	while ((c = getopt(argc, argv, "dNnrp:" ADDOPTS)) != -1)

Index: src/tests/fs/nfs/nfsservice/rumpnfsd.c
diff -u src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.8 src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.9
--- src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.8	Mon May 12 11:31:07 2014
+++ src/tests/fs/nfs/nfsservice/rumpnfsd.c	Sat Nov  7 21:45:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpnfsd.c,v 1.8 2014/05/12 15:31:07 christos Exp $	*/
+/*	$NetBSD: rumpnfsd.c,v 1.9 2015/11/08 02:45:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 void *mountd_main(void *);
 void *rpcbind_main(void *);
@@ -87,7 +88,7 @@ main(int argc, char *argv[])
 	}
 
 	rump_init();
-	init_fdsets();
+	svc_fdset_init(SVC_FDSET_MT);
 
 	rv = rump_pub_etfs_register("/etc/exports", "./exports", RUMP_ETFS_REG);
 	if (rv) {

Index: src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c
diff -u src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c:1.2 src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c:1.3
--- src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c:1.2	Sat Oct 19 13:45:00 2013
+++ src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c	Sat Nov  7 21:45:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_svc.c,v 1.2 2013/10/19 17:45:00 christos Exp $	*/
+/*	$NetBSD: pmap_svc.c,v 1.3 2015/11/08 02:45:16 christos Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -173,18 +173,18 @@ pmapproc_change(struct svc_req *rqstp, S
 	struct sockcred *sc;
 	char uidbuf[32];
 
-#ifdef RPCBIND_DEBUG
-	if (debugging)
-		fprintf(stderr, "%s request for (%lu, %lu) : ",
-		op == PMAPPROC_SET ? "PMAP_SET" : "PMAP_UNSET",
-		reg.pm_prog, reg.pm_vers);
-#endif
 
 	if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *))) {
 		svcerr_decode(xprt);
 		return (FALSE);
 	}
 
+#ifdef RPCBIND_DEBUG
+	if (debugging)
+		fprintf(stderr, "%s request for (%lu, %lu) : ",
+		op == PMAPPROC_SET ? "PMAP_SET" : "PMAP_UNSET",
+		reg.pm_prog, reg.pm_vers);
+#endif
 	if (!check_access(xprt, op, , PMAPVERS)) {
 		svcerr_weakauth(xprt);
 		return FALSE;
Index: src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c
diff -u src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c:1.2 src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c:1.3
--- src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c:1.2	Fri Sep 16 12:13:18 2011
+++ src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c	Sat Nov  7 21:45:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpcb_svc_com.c,v 1.2 2011/09/16 16:13:18 plunky Exp $	*/
+/*	$NetBSD: rpcb_svc_com.c,v 1.3 2015/11/08 02:45:16 christos Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -291,7 +291,7 @@ void
 delete_prog(int prog)
 {
 	RPCB reg;
-	register rpcblist_ptr rbl;
+	rpcblist_ptr rbl;
 
 	for (rbl = list_rbl; rbl != NULL; rbl = rbl->rpcb_next) {
 		if ((rbl->rpcb_map.r_prog != prog))
@@ -514,10 +514,7 @@ create_rmtcall_fd(struct netconfig *ncon
 		rmttail->next = rmt;
 		rmttail = rmt;
 	}
-	/* XXX not threadsafe */
-	if (fd > *get_fdsetmax())
-		*get_fdsetmax() = fd;
-	FD_SET(fd, get_fdset());
+	svc_fdset_set(fd);
 	return (fd);
 }
 
@@ -590,7 +587,7 @@ void
 rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,