Re: CVS commit: src/sys/dev/usb

2013-02-08 Thread Nick Hudson

On 01/09/13 23:03, Nick Hudson wrote:

Module Name:src
Committed By:   skrll
Date:   Wed Jan  9 23:02:59 UTC 2013

Modified Files:
src/sys/dev/usb: TODO.usbmp ehci.c files.usb ucycom.c usbdevices.config
Added Files:
src/sys/dev/usb: if_smsc.c if_smscreg.h if_smscvar.h

Log Message:
Add usmsc(4) - a driver for the SMSC95XX USB ethernet devices.

This is a port of the OpenBSD driver which itself was a port of the
FreeBSD driver.

sorry mrg. jared made me do it.



Just noticed these.

To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/TODO.usbmp
cvs rdiff -u -r1.197 -r1.198 src/sys/dev/usb/ehci.c



cvs rdiff -u -r1.34 -r1.35 src/sys/dev/usb/ucycom.c


Obviously they have nothing to do with usmsc(4)... I'll fix the commit logs.

Nick


Re: CVS commit: src/distrib/sets/lists/debug

2013-02-08 Thread Christos Zoulas
In article 20130208043636.1cc0e17...@cvs.netbsd.org,
Matt Thomas source-changes-d@NetBSD.org wrote:
-=-=-=-=-=-

Module Name:   src
Committed By:  matt
Date:  Fri Feb  8 04:36:35 UTC 2013

Modified Files:
   src/distrib/sets/lists/debug: shl.mi

Log Message:
Add pre-name changed debug libraries as obsolete.

There are a lot more...

christos



CVS commit: src/sys/kern

2013-02-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb  8 09:30:02 UTC 2013

Modified Files:
src/sys/kern: subr_vmem.c

Log Message:
Fix release of vmem_btag_lock (don't release twice in error path)


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/kern/subr_vmem.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/subr_vmem.c
diff -u src/sys/kern/subr_vmem.c:1.80 src/sys/kern/subr_vmem.c:1.81
--- src/sys/kern/subr_vmem.c:1.80	Tue Jan 29 21:26:24 2013
+++ src/sys/kern/subr_vmem.c	Fri Feb  8 09:30:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_vmem.c,v 1.80 2013/01/29 21:26:24 para Exp $	*/
+/*	$NetBSD: subr_vmem.c,v 1.81 2013/02/08 09:30:01 skrll Exp $	*/
 
 /*-
  * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.80 2013/01/29 21:26:24 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.81 2013/02/08 09:30:01 skrll Exp $);
 
 #if defined(_KERNEL)
 #include opt_ddb.h
@@ -204,13 +204,11 @@ bt_refillglobal(vm_flag_t flags)
 		mutex_exit(vmem_btag_lock);
 		mutex_exit(vmem_refill_lock);
 		return 0;
-	} else {
-		mutex_exit(vmem_btag_lock);
 	}
+	mutex_exit(vmem_btag_lock);
 
 	if (vmem_alloc(kmem_meta_arena, PAGE_SIZE,
 	(flags  ~VM_FITMASK) | VM_INSTANTFIT | VM_POPULATING, va) != 0) {
-		mutex_exit(vmem_btag_lock);
 		mutex_exit(vmem_refill_lock);
 		return ENOMEM;
 	}



CVS commit: src/usr.bin/find

2013-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb  8 12:50:51 UTC 2013

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

Log Message:
Add serial commas.
From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/usr.bin/find/find.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/find/find.1
diff -u src/usr.bin/find/find.1:1.79 src/usr.bin/find/find.1:1.80
--- src/usr.bin/find/find.1:1.79	Sat Oct 13 14:18:17 2012
+++ src/usr.bin/find/find.1	Fri Feb  8 12:50:51 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: find.1,v 1.79 2012/10/13 14:18:17 njoly Exp $
+.\	$NetBSD: find.1,v 1.80 2013/02/08 12:50:51 wiz Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -144,7 +144,7 @@ and double
 .Pq Dq \
 quotes, backslash
 .Pq Dq \e ,
-space, tab and newline characters.
+space, tab, and newline characters.
 Alternatively, the
 .Ic -print0
 or
@@ -211,7 +211,7 @@ was started, rounded up to the next full
 24-hour periods.
 .Pp
 .It Ic -delete
-Delete found files, symbolic links and directories.
+Delete found files, symbolic links, and directories.
 Always returns true.
 This executes from the current working directory as
 .Nm



CVS commit: src/sys/conf

2013-02-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Feb  8 15:00:27 UTC 2013

Modified Files:
src/sys/conf: majors

Log Message:
Add an MI major number for seeprom (char 206).


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/conf/majors

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

Modified files:

Index: src/sys/conf/majors
diff -u src/sys/conf/majors:1.62 src/sys/conf/majors:1.63
--- src/sys/conf/majors:1.62	Wed Sep 19 21:24:29 2012
+++ src/sys/conf/majors	Fri Feb  8 15:00:26 2013
@@ -1,4 +1,4 @@
-# $NetBSD: majors,v 1.62 2012/09/19 21:24:29 bouyer Exp $
+# $NetBSD: majors,v 1.63 2013/02/08 15:00:26 jdc Exp $
 #
 # Device majors for Machine-Independent drivers.
 #
@@ -51,3 +51,4 @@ device-major filemon   char 202 
 device-major iscsi char 203iscsi
 device-major tpm   char 204		   tpm
 device-major mfi   char 205		   mfi
+device-major seeprom   char 206		   seeprom



CVS commit: src/sys/dev/i2c

2013-02-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Feb  8 15:14:11 UTC 2013

Modified Files:
src/sys/dev/i2c: at24cxx.c

Log Message:
Handle direct configuration if ia-ia_name is set, using iic_compat_match().
If ia-ia_name is set, display the name on attach.
Display the size (if known) on attach.
Move the iic_acquire_bus() and iic_release_bus() calls inside the read and
write loops, to avoid holding the bus for the full duration of the read or
write.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/i2c/at24cxx.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/i2c/at24cxx.c
diff -u src/sys/dev/i2c/at24cxx.c:1.12 src/sys/dev/i2c/at24cxx.c:1.13
--- src/sys/dev/i2c/at24cxx.c:1.12	Sun Jun  8 03:49:26 2008
+++ src/sys/dev/i2c/at24cxx.c	Fri Feb  8 15:14:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: at24cxx.c,v 1.12 2008/06/08 03:49:26 tsutsui Exp $	*/
+/*	$NetBSD: at24cxx.c,v 1.13 2013/02/08 15:14:11 jdc Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: at24cxx.c,v 1.12 2008/06/08 03:49:26 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: at24cxx.c,v 1.13 2013/02/08 15:14:11 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -100,14 +100,23 @@ const struct cdevsw seeprom_cdevsw = {
 
 static int seeprom_wait_idle(struct seeprom_softc *);
 
+static const char * seeprom_compats[] = {
+	i2c-at24c64,
+	NULL
+};
 
 static int
 seeprom_match(device_t parent, cfdata_t cf, void *aux)
 {
 	struct i2c_attach_args *ia = aux;
 
-	if ((ia-ia_addr  AT24CXX_ADDRMASK) == AT24CXX_ADDR)
-		return (1);
+	if (ia-ia_name) {
+		if (iic_compat_match(ia, seeprom_compats))
+			return (1);
+	} else {
+		if ((ia-ia_addr  AT24CXX_ADDRMASK) == AT24CXX_ADDR)
+			return (1);
+	}
 
 	return (0);
 }
@@ -122,8 +131,13 @@ seeprom_attach(device_t parent, device_t
 	sc-sc_address = ia-ia_addr;
 	sc-sc_dev = self;
 
-	aprint_naive(: EEPROM\n);
-	aprint_normal(: AT24Cxx EEPROM\n);
+	if (ia-ia_name != NULL) {
+		aprint_naive(: %s, ia-ia_name);
+		aprint_normal(: %s, ia-ia_name);
+	} else {
+		aprint_naive(: EEPROM);
+		aprint_normal(: AT24Cxx EEPROM);
+	}
 
 	/*
 	 * The AT24C01A/02/04/08/16 EEPROMs use a 1 byte command
@@ -147,6 +161,7 @@ seeprom_attach(device_t parent, device_t
 	case 1024:		/* 8Kbit */
 	case 2048:		/* 16Kbit */
 		sc-sc_cmdlen = 1;
+		aprint_normal(: size %d\n, sc-sc_size);
 		break;
 
 	case 4096:		/* 32Kbit */
@@ -155,6 +170,7 @@ seeprom_attach(device_t parent, device_t
 	case 32768:		/* 256Kbit */
 	case 65536:		/* 512Kbit */
 		sc-sc_cmdlen = 2;
+		aprint_normal(: size %d\n, sc-sc_size);
 		break;
 
 	default:
@@ -168,6 +184,7 @@ seeprom_attach(device_t parent, device_t
 		 * Obviously this will not work for 4KB or 8KB
 		 * EEPROMs, but them's the breaks.
 		 */
+		aprint_normal(\n);
 		aprint_error_dev(self, invalid size specified; 
 		assuming 2KB (16Kb)\n);
 		sc-sc_size = 2048;
@@ -223,9 +240,6 @@ seeprom_read(dev_t dev, struct uio *uio,
 	if (uio-uio_offset = sc-sc_size)
 		return (EINVAL);
 
-	if ((error = iic_acquire_bus(sc-sc_tag, 0)) != 0)
-		return (error);
-
 	/*
 	 * Even though the AT24Cxx EEPROMs support sequential
 	 * reads within a page, some I2C controllers do not
@@ -234,6 +248,9 @@ seeprom_read(dev_t dev, struct uio *uio,
 	 */
 
 	while (uio-uio_resid  0  uio-uio_offset  sc-sc_size) {
+		if ((error = iic_acquire_bus(sc-sc_tag, 0)) != 0)
+			return (error);
+
 		a = (int)uio-uio_offset;
 		if (sc-sc_cmdlen == 1) {
 			addr = sc-sc_address + (a  8);
@@ -255,10 +272,9 @@ seeprom_read(dev_t dev, struct uio *uio,
 			iic_release_bus(sc-sc_tag, 0);
 			return (error);
 		}
+		iic_release_bus(sc-sc_tag, 0);
 	}
 
-	iic_release_bus(sc-sc_tag, 0);
-
 	return (0);
 }
 
@@ -277,15 +293,15 @@ seeprom_write(dev_t dev, struct uio *uio
 	if (uio-uio_offset = sc-sc_size)
 		return (EINVAL);
 
-	if ((error = iic_acquire_bus(sc-sc_tag, 0)) != 0)
-		return (error);
-
 	/*
 	 * See seeprom_read() for why we don't use sequential
 	 * writes within a page.
 	 */
 
 	while (uio-uio_resid  0  uio-uio_offset  sc-sc_size) {
+		if ((error = iic_acquire_bus(sc-sc_tag, 0)) != 0)
+			return (error);
+
 		a = (int)uio-uio_offset;
 		if (sc-sc_cmdlen == 1) {
 			addr = sc-sc_address + (a  8);
@@ -313,10 +329,9 @@ seeprom_write(dev_t dev, struct uio *uio
 			iic_release_bus(sc-sc_tag, 0);
 			return (error);
 		}
+		iic_release_bus(sc-sc_tag, 0);
 	}
 
-	iic_release_bus(sc-sc_tag, 0);
-
 	return (0);
 }
 



CVS commit: src/sys/dev/ofw

2013-02-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Feb  8 15:17:00 UTC 2013

Modified Files:
src/sys/dev/ofw: ofw_subr.c

Log Message:
Set the size for EEPROM's that we know about (i2c-at24c64 is set to 8192).
Allows seeprom(4) to attach correctly, when combined with the direct
configuration support there.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ofw/ofw_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/dev/ofw/ofw_subr.c
diff -u src/sys/dev/ofw/ofw_subr.c:1.20 src/sys/dev/ofw/ofw_subr.c:1.21
--- src/sys/dev/ofw/ofw_subr.c:1.20	Sun Feb  3 17:41:02 2013
+++ src/sys/dev/ofw/ofw_subr.c	Fri Feb  8 15:17:00 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_subr.c,v 1.20 2013/02/03 17:41:02 jdc Exp $	*/
+/*	$NetBSD: ofw_subr.c,v 1.21 2013/02/08 15:17:00 jdc Exp $	*/
 
 /*
  * Copyright 1998
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ofw_subr.c,v 1.20 2013/02/03 17:41:02 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: ofw_subr.c,v 1.21 2013/02/08 15:17:00 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -336,7 +336,7 @@ void
 of_enter_i2c_devs(prop_dictionary_t props, int ofnode, size_t cell_size)
 {
 	int node, len;
-	char name[32];
+	char name[32], compatible[32];
 	uint64_t reg64;
 	uint32_t reg32;
 	uint64_t addr;
@@ -379,6 +379,12 @@ of_enter_i2c_devs(prop_dictionary_t prop
 		prop_dictionary_set_uint32(dev, addr, addr);
 		prop_dictionary_set_uint64(dev, cookie, node);
 		of_to_dataprop(dev, node, compatible, compatible);
+		if (OF_getprop(node, compatible, compatible,
+		sizeof(compatible))  0) {
+			/* Set size for EEPROM's that we know about */
+			if (strcmp(compatible, i2c-at24c64) == 0)
+prop_dictionary_set_uint32(dev, size, 8192);
+		}
 		prop_array_add(array, dev);
 		prop_object_release(dev);
 	}



CVS commit: src/share/man/man4

2013-02-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Feb  8 15:18:44 UTC 2013

Modified Files:
src/share/man/man4: seeprom.4

Log Message:
Update the bugs, now that seeprom has a major assigned.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/seeprom.4

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

Modified files:

Index: src/share/man/man4/seeprom.4
diff -u src/share/man/man4/seeprom.4:1.3 src/share/man/man4/seeprom.4:1.4
--- src/share/man/man4/seeprom.4:1.3	Thu Feb 25 17:08:01 2010
+++ src/share/man/man4/seeprom.4	Fri Feb  8 15:18:44 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: seeprom.4,v 1.3 2010/02/25 17:08:01 wiz Exp $
+.\	$NetBSD: seeprom.4,v 1.4 2013/02/08 15:18:44 jdc Exp $
 .\
 .\ Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd October 25, 2007
+.Dd February 7, 2013
 .Dt SEEPROM 4
 .Os
 .Sh NAME
@@ -47,4 +47,9 @@ The
 device appeared in
 .Nx 2.0 .
 .Sh BUGS
-A device major number is not assigned.
+AT24C1024 EEPROM's are not supported.
+.Pp
+The
+.Nm
+driver reads and writes one byte at a time to be compatible with all
+controllers.



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

2013-02-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Feb  8 15:20:17 UTC 2013

Modified Files:
src/sys/arch/sparc64/conf: GENERIC

Log Message:
Add seeprom(4).  Tested on Blade 2000 and Fire 280R.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/arch/sparc64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/sparc64/conf/GENERIC:1.156 src/sys/arch/sparc64/conf/GENERIC:1.157
--- src/sys/arch/sparc64/conf/GENERIC:1.156	Fri Dec  7 12:57:01 2012
+++ src/sys/arch/sparc64/conf/GENERIC	Fri Feb  8 15:20:17 2013
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.156 2012/12/07 12:57:01 jdc Exp $
+# $NetBSD: GENERIC,v 1.157 2013/02/08 15:20:17 jdc Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include	arch/sparc64/conf/std.sparc64
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.156 $
+#ident 		GENERIC-$Revision: 1.157 $
 
 maxusers	64
 
@@ -952,6 +952,7 @@ ecadc*		at iic? addr?	# envctrl/envctrlt
 lmtemp*		at iic? addr?
 tda*		at iic? addr?	# fan control on SB1000/2000
 dbcool*		at iic? addr?	# SB25000
+seeprom*	at iic? addr?	# i2c-at24c64 fru's
 
 ### Other pseudo-devices
 



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  8 15:22:03 UTC 2013

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: Makefile

Log Message:
fix generation


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile:1.2	Sun Jun  5 19:09:50 2011
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile	Fri Feb  8 10:22:03 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/06/05 23:09:50 spz Exp $
+#	$NetBSD: Makefile,v 1.3 2013/02/08 15:22:03 christos Exp $
 
 .include bsd.own.mk
 
@@ -12,6 +12,7 @@ regen:
 	*xlate.pl) ;; \
 	*64*) ;; \
 	*) perl $$i 32 | perl ${XLATE} linux32 | \
-	   sed -e 's/bc	25,0,/bdnz+	/'  $$(basename $$i .pl).S ;; \
+	   sed -e 's/bc	25,0,/bdnz+	/' \
+		   -e 's/bclr	14,2/beqlr/'  $$(basename $$i .pl).S ;; \
 	esac; \
 	done



CVS commit: src/sys/dev/videomode

2013-02-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb  8 16:35:10 UTC 2013

Modified Files:
src/sys/dev/videomode: edid.c

Log Message:
aprint_verbose - aprint_debug


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/videomode/edid.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/videomode/edid.c
diff -u src/sys/dev/videomode/edid.c:1.11 src/sys/dev/videomode/edid.c:1.12
--- src/sys/dev/videomode/edid.c:1.11	Sat Apr  9 22:09:05 2011
+++ src/sys/dev/videomode/edid.c	Fri Feb  8 16:35:10 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: edid.c,v 1.11 2011/04/09 22:09:05 christos Exp $ */
+/* $NetBSD: edid.c,v 1.12 2013/02/08 16:35:10 skrll Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */ 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: edid.c,v 1.11 2011/04/09 22:09:05 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: edid.c,v 1.12 2013/02/08 16:35:10 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -626,7 +626,7 @@ edid_parse(uint8_t *data, struct edid_in
 		if (edid-edid_modes[i].dot_clock  max_dotclock)
 			max_dotclock = edid-edid_modes[i].dot_clock;
 
-	aprint_verbose(max_dotclock according to supported modes: %d\n,
+	aprint_debug(max_dotclock according to supported modes: %d\n,
 	max_dotclock);
 
 	mhz = (max_dotclock + 999) / 1000;



CVS commit: src/distrib/utils/embedded

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  8 19:14:14 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
fix options


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/utils/embedded/mkimage

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.17 src/distrib/utils/embedded/mkimage:1.18
--- src/distrib/utils/embedded/mkimage:1.17	Sun Feb  3 04:16:24 2013
+++ src/distrib/utils/embedded/mkimage	Fri Feb  8 14:14:14 2013
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.17 2013/02/03 09:16:24 christos Exp $
+# $NetBSD: mkimage,v 1.18 2013/02/08 19:14:14 christos Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -66,7 +66,7 @@ EOF
 }
 
 # First pass for options to get the host
-OPTS=K:R:S:c:h:s:x
+OPTS=K:D:S:c:h:s:x
 while getopts $OPTS f
 do
 	case $f in
@@ -94,8 +94,8 @@ OPTIND=1
 while getopts $OPTS f
 do
 	case $f in
-	K)	release=$OPTARG;;
-	R)	kerneldir=$OPTARG;;
+	D)	release=$OPTARG;;
+	K)	kernel=$OPTARG;;
 	S)	src=$OPTARG;;
 	c)	custom=$OPTARG;;
 	h)	;;



CVS commit: src/distrib/utils/embedded/conf

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  8 19:16:53 UTC 2013

Modified Files:
src/distrib/utils/embedded/conf: rpi.conf

Log Message:
change to take the full kernel path


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/utils/embedded/conf/rpi.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/rpi.conf
diff -u src/distrib/utils/embedded/conf/rpi.conf:1.13 src/distrib/utils/embedded/conf/rpi.conf:1.14
--- src/distrib/utils/embedded/conf/rpi.conf:1.13	Sun Feb  3 04:16:25 2013
+++ src/distrib/utils/embedded/conf/rpi.conf	Fri Feb  8 14:16:53 2013
@@ -1,10 +1,9 @@
-# $NetBSD: rpi.conf,v 1.13 2013/02/03 09:16:25 christos Exp $
+# $NetBSD: rpi.conf,v 1.14 2013/02/08 19:16:53 christos Exp $
 # Raspberry Pi customization script used by mkimage
 #
 
 board=rpi
-kernelconf=RPI
-kerneldir=$src/sys/arch/evbarm/compile/${kernelconf}
+kernel=$src/sys/arch/evbarm/compile/RPI/kernel.img
 
 . ${DIR}/conf/evbarm.conf
 
@@ -37,13 +36,13 @@ root=ld0a console=fb
 #fb=1280x1024		# to select a mode, otherwise try EDID 
 #fb=disable		# to disable fb completely
 EOF
-	if [ ! -f ${kerneldir}/kernel.img ]; then
-		echo ${PROG}: Missing ${kerneldir}/kernel.img 12
+	if [ ! -f ${kernel} ]; then
+		echo ${PROG}: Missing ${kernel} 12
 		exit 1
 	fi
 
 	echo ${bar} installing kernel ${bar}
-	cp ${kerneldir}/kernel.img ${mnt}/boot
+	cp ${kernel ${mnt}/boot
 
 	echo -n ${bar} installing firmware files:
 	(cd ${mnt}/boot 



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:31:19 UTC 2013

Modified Files:
src/sys/kern [netbsd-6-0]: kern_softint.c subr_pserialize.c
src/sys/rump/include/machine [netbsd-6-0]: intr.h

Log Message:
Pull up following revision(s) (requested by rmind in ticket #782):
sys/rump/include/machine/intr.h: revision 1.19
sys/kern/subr_pserialize.c: revision 1.6
sys/kern/kern_softint.c: revision 1.39
- softint_dispatch: perform pserialize(9) switchpoint when softintr processing
  finishes (without blocking).  Problem reported by hannken@, thanks!
- pserialize_read_enter: use splsoftserial(), not splsoftclock().
- pserialize_perform: add xcall(9) barrier as interrupts may be coalesced.
Provide splsoftserial.
GRRR RUMP


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.38.14.1 src/sys/kern/kern_softint.c
cvs rdiff -u -r1.5 -r1.5.8.1 src/sys/kern/subr_pserialize.c
cvs rdiff -u -r1.18 -r1.18.16.1 src/sys/rump/include/machine/intr.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/kern_softint.c
diff -u src/sys/kern/kern_softint.c:1.38 src/sys/kern/kern_softint.c:1.38.14.1
--- src/sys/kern/kern_softint.c:1.38	Tue Sep 27 01:02:38 2011
+++ src/sys/kern/kern_softint.c	Fri Feb  8 19:31:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.38 2011/09/27 01:02:38 jym Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.38.14.1 2013/02/08 19:31:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -176,7 +176,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_softint.c,v 1.38 2011/09/27 01:02:38 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_softint.c,v 1.38.14.1 2013/02/08 19:31:19 riz Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -186,6 +186,7 @@ __KERNEL_RCSID(0, $NetBSD: kern_softint
 #include sys/evcnt.h
 #include sys/cpu.h
 #include sys/xcall.h
+#include sys/pserialize.h
 
 #include net/netisr.h
 
@@ -828,6 +829,9 @@ softint_dispatch(lwp_t *pinned, int s)
 		l-l_pflag = ~LP_TIMEINTR;
 	}
 
+	/* Indicate a soft-interrupt switch. */
+	pserialize_switchpoint();
+
 	/*
 	 * If we blocked while handling the interrupt, the pinned LWP is
 	 * gone so switch to the idle LWP.  It will select a new LWP to

Index: src/sys/kern/subr_pserialize.c
diff -u src/sys/kern/subr_pserialize.c:1.5 src/sys/kern/subr_pserialize.c:1.5.8.1
--- src/sys/kern/subr_pserialize.c:1.5	Sun Jan 29 22:55:40 2012
+++ src/sys/kern/subr_pserialize.c	Fri Feb  8 19:31:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pserialize.c,v 1.5 2012/01/29 22:55:40 rmind Exp $	*/
+/*	$NetBSD: subr_pserialize.c,v 1.5.8.1 2013/02/08 19:31:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_pserialize.c,v 1.5 2012/01/29 22:55:40 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_pserialize.c,v 1.5.8.1 2013/02/08 19:31:19 riz Exp $);
 
 #include sys/param.h
 
@@ -139,6 +139,7 @@ pserialize_destroy(pserialize_t psz)
 void
 pserialize_perform(pserialize_t psz)
 {
+	uint64_t xc;
 
 	KASSERT(!cpu_intr_p());
 	KASSERT(!cpu_softintr_p());
@@ -168,7 +169,10 @@ pserialize_perform(pserialize_t psz)
 	 * Force some context switch activity on every CPU, as the system
 	 * may not be busy.  Note: should pass the point twice.
 	 */
-	xc_broadcast(XC_HIGHPRI, (xcfunc_t)nullop, NULL, NULL);
+	xc = xc_broadcast(XC_HIGHPRI, (xcfunc_t)nullop, NULL, NULL);
+	xc_wait(xc);
+
+	/* No need to xc_wait() as we implement our own condvar. */
 	xc_broadcast(XC_HIGHPRI, (xcfunc_t)nullop, NULL, NULL);
 
 	/*
@@ -191,7 +195,7 @@ pserialize_read_enter(void)
 {
 
 	KASSERT(!cpu_intr_p());
-	return splsoftclock();
+	return splsoftserial();
 }
 
 void

Index: src/sys/rump/include/machine/intr.h
diff -u src/sys/rump/include/machine/intr.h:1.18 src/sys/rump/include/machine/intr.h:1.18.16.1
--- src/sys/rump/include/machine/intr.h:1.18	Mon Mar 21 16:41:08 2011
+++ src/sys/rump/include/machine/intr.h	Fri Feb  8 19:31:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.18 2011/03/21 16:41:08 pooka Exp $	*/
+/*	$NetBSD: intr.h,v 1.18.16.1 2013/02/08 19:31:18 riz Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -47,6 +47,7 @@ makeiplcookie(ipl_t ipl)
 
 #define spllower(x) ((void)x)
 #define splraise(x) 0
+#define splsoftserial() 0
 #define splsoftnet() 0
 #define splsoftclock() 0
 #define splhigh() 0



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:32:01 UTC 2013

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

Log Message:
ticket 782.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-6.0.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.0.2
diff -u src/doc/CHANGES-6.0.2:1.1.2.7 src/doc/CHANGES-6.0.2:1.1.2.8
--- src/doc/CHANGES-6.0.2:1.1.2.7	Sat Jan 26 21:36:27 2013
+++ src/doc/CHANGES-6.0.2	Fri Feb  8 19:32:00 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.2,v 1.1.2.7 2013/01/26 21:36:27 bouyer Exp $
+# $NetBSD: CHANGES-6.0.2,v 1.1.2.8 2013/02/08 19:32:00 riz Exp $
 
 A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2
 release:
@@ -56,3 +56,10 @@ sys/kern/subr_cprng.c1.15
 	reseed with as little as sizeof(int) bytes of entropy.
 	[tls, ticket #800]
 
+sys/kern/kern_softint.c1.39
+sys/kern/subr_pserialize.c			1.6
+sys/rump/include/machine/intr.h			1.19
+
+	Fixes for pserialize(9).
+	[rmind, ticket #782]
+



CVS commit: [netbsd-6] src/sys

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:32:08 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: kern_softint.c subr_pserialize.c
src/sys/rump/include/machine [netbsd-6]: intr.h

Log Message:
Pull up following revision(s) (requested by rmind in ticket #782):
sys/rump/include/machine/intr.h: revision 1.19
sys/kern/subr_pserialize.c: revision 1.6
sys/kern/kern_softint.c: revision 1.39
- softint_dispatch: perform pserialize(9) switchpoint when softintr processing
  finishes (without blocking).  Problem reported by hannken@, thanks!
- pserialize_read_enter: use splsoftserial(), not splsoftclock().
- pserialize_perform: add xcall(9) barrier as interrupts may be coalesced.
Provide splsoftserial.
GRRR RUMP


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.38.8.1 src/sys/kern/kern_softint.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/kern/subr_pserialize.c
cvs rdiff -u -r1.18 -r1.18.10.1 src/sys/rump/include/machine/intr.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/kern_softint.c
diff -u src/sys/kern/kern_softint.c:1.38 src/sys/kern/kern_softint.c:1.38.8.1
--- src/sys/kern/kern_softint.c:1.38	Tue Sep 27 01:02:38 2011
+++ src/sys/kern/kern_softint.c	Fri Feb  8 19:32:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.38 2011/09/27 01:02:38 jym Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.38.8.1 2013/02/08 19:32:07 riz Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -176,7 +176,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_softint.c,v 1.38 2011/09/27 01:02:38 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_softint.c,v 1.38.8.1 2013/02/08 19:32:07 riz Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -186,6 +186,7 @@ __KERNEL_RCSID(0, $NetBSD: kern_softint
 #include sys/evcnt.h
 #include sys/cpu.h
 #include sys/xcall.h
+#include sys/pserialize.h
 
 #include net/netisr.h
 
@@ -828,6 +829,9 @@ softint_dispatch(lwp_t *pinned, int s)
 		l-l_pflag = ~LP_TIMEINTR;
 	}
 
+	/* Indicate a soft-interrupt switch. */
+	pserialize_switchpoint();
+
 	/*
 	 * If we blocked while handling the interrupt, the pinned LWP is
 	 * gone so switch to the idle LWP.  It will select a new LWP to

Index: src/sys/kern/subr_pserialize.c
diff -u src/sys/kern/subr_pserialize.c:1.5 src/sys/kern/subr_pserialize.c:1.5.2.1
--- src/sys/kern/subr_pserialize.c:1.5	Sun Jan 29 22:55:40 2012
+++ src/sys/kern/subr_pserialize.c	Fri Feb  8 19:32:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pserialize.c,v 1.5 2012/01/29 22:55:40 rmind Exp $	*/
+/*	$NetBSD: subr_pserialize.c,v 1.5.2.1 2013/02/08 19:32:07 riz Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_pserialize.c,v 1.5 2012/01/29 22:55:40 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_pserialize.c,v 1.5.2.1 2013/02/08 19:32:07 riz Exp $);
 
 #include sys/param.h
 
@@ -139,6 +139,7 @@ pserialize_destroy(pserialize_t psz)
 void
 pserialize_perform(pserialize_t psz)
 {
+	uint64_t xc;
 
 	KASSERT(!cpu_intr_p());
 	KASSERT(!cpu_softintr_p());
@@ -168,7 +169,10 @@ pserialize_perform(pserialize_t psz)
 	 * Force some context switch activity on every CPU, as the system
 	 * may not be busy.  Note: should pass the point twice.
 	 */
-	xc_broadcast(XC_HIGHPRI, (xcfunc_t)nullop, NULL, NULL);
+	xc = xc_broadcast(XC_HIGHPRI, (xcfunc_t)nullop, NULL, NULL);
+	xc_wait(xc);
+
+	/* No need to xc_wait() as we implement our own condvar. */
 	xc_broadcast(XC_HIGHPRI, (xcfunc_t)nullop, NULL, NULL);
 
 	/*
@@ -191,7 +195,7 @@ pserialize_read_enter(void)
 {
 
 	KASSERT(!cpu_intr_p());
-	return splsoftclock();
+	return splsoftserial();
 }
 
 void

Index: src/sys/rump/include/machine/intr.h
diff -u src/sys/rump/include/machine/intr.h:1.18 src/sys/rump/include/machine/intr.h:1.18.10.1
--- src/sys/rump/include/machine/intr.h:1.18	Mon Mar 21 16:41:08 2011
+++ src/sys/rump/include/machine/intr.h	Fri Feb  8 19:32:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.18 2011/03/21 16:41:08 pooka Exp $	*/
+/*	$NetBSD: intr.h,v 1.18.10.1 2013/02/08 19:32:07 riz Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -47,6 +47,7 @@ makeiplcookie(ipl_t ipl)
 
 #define spllower(x) ((void)x)
 #define splraise(x) 0
+#define splsoftserial() 0
 #define splsoftnet() 0
 #define splsoftclock() 0
 #define splhigh() 0



CVS commit: [netbsd-6] src/sys/dev/pci

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:35:24 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: if_vr.c

Log Message:
Pull up following revision(s) (requested by taca in ticket #783):
sys/dev/pci/if_vr.c: revision 1.112
- reset the chip if the tx engine gets stuck after a link state change,
  from OpenBSD
- no need to do a full reset of the chip when enabling or disabling
  promiscuous mode


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.110.2.1 src/sys/dev/pci/if_vr.c

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

Modified files:

Index: src/sys/dev/pci/if_vr.c
diff -u src/sys/dev/pci/if_vr.c:1.110 src/sys/dev/pci/if_vr.c:1.110.2.1
--- src/sys/dev/pci/if_vr.c:1.110	Thu Feb  2 19:43:05 2012
+++ src/sys/dev/pci/if_vr.c	Fri Feb  8 19:35:23 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vr.c,v 1.110 2012/02/02 19:43:05 tls Exp $	*/
+/*	$NetBSD: if_vr.c,v 1.110.2.1 2013/02/08 19:35:23 riz Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_vr.c,v 1.110 2012/02/02 19:43:05 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_vr.c,v 1.110.2.1 2013/02/08 19:35:23 riz Exp $);
 
 
 
@@ -231,6 +231,11 @@ struct vr_softc {
 	uint32_t	vr_save_membase;
 	uint32_t	vr_save_irq;
 
+	bool		vr_link;
+	int		vr_flags;
+#define VR_F_RESTART	0x1		/* restart on next tick */
+	int		vr_if_flags;
+
 	krndsource_t rnd_source;	/* random source */
 };
 
@@ -399,21 +404,44 @@ static void
 vr_mii_statchg(device_t self)
 {
 	struct vr_softc *sc = device_private(self);
+	int i;
 
 	/*
 	 * In order to fiddle with the 'full-duplex' bit in the netconfig
 	 * register, we first have to put the transmit and/or receive logic
 	 * in the idle state.
 	 */
-	VR_CLRBIT16(sc, VR_COMMAND, (VR_CMD_TX_ON|VR_CMD_RX_ON));
+	if ((sc-vr_mii.mii_media_status  IFM_ACTIVE) 
+	IFM_SUBTYPE(sc-vr_mii.mii_media_active) != IFM_NONE) {
+		sc-vr_link = true;
+
+		if (CSR_READ_2(sc, VR_COMMAND)  (VR_CMD_TX_ON|VR_CMD_RX_ON))
+			VR_CLRBIT16(sc, VR_COMMAND,
+			(VR_CMD_TX_ON|VR_CMD_RX_ON));
 
-	if (sc-vr_mii.mii_media_active  IFM_FDX)
-		VR_SETBIT16(sc, VR_COMMAND, VR_CMD_FULLDUPLEX);
-	else
-		VR_CLRBIT16(sc, VR_COMMAND, VR_CMD_FULLDUPLEX);
+		if (sc-vr_mii.mii_media_active  IFM_FDX)
+			VR_SETBIT16(sc, VR_COMMAND, VR_CMD_FULLDUPLEX);
+		else
+			VR_CLRBIT16(sc, VR_COMMAND, VR_CMD_FULLDUPLEX);
 
-	if (sc-vr_ec.ec_if.if_flags  IFF_RUNNING)
 		VR_SETBIT16(sc, VR_COMMAND, VR_CMD_TX_ON|VR_CMD_RX_ON);
+	} else {
+		sc-vr_link = false;
+		VR_CLRBIT16(sc, VR_COMMAND, VR_CMD_TX_ON|VR_CMD_RX_ON);
+		for (i = VR_TIMEOUT; i  0; i--) {
+			delay(10);
+			if (!(CSR_READ_2(sc, VR_COMMAND) 
+			(VR_CMD_TX_ON|VR_CMD_RX_ON)))
+break;
+		}
+		if (i == 0) {
+#ifdef VR_DEBUG
+			printf(%s: rx shutdown error!\n,
+			device_xname(sc-vr_dev));
+#endif
+			sc-vr_flags |= VR_F_RESTART;
+		}
+	}
 }
 
 #define	vr_calchash(addr) \
@@ -979,6 +1007,11 @@ vr_start(struct ifnet *ifp)
 	struct vr_descsoft *ds;
 	int error, firsttx, nexttx, opending;
 
+	if ((ifp-if_flags  (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING)
+		return;
+	if (sc-vr_link == false)
+		return;
+
 	/*
 	 * Remember the previous txpending and the first transmit
 	 * descriptor we use.
@@ -1228,6 +1261,7 @@ vr_init(struct ifnet *ifp)
 	CSR_WRITE_4(sc, VR_TXADDR, VR_CDTXADDR(sc, VR_NEXTTX(sc-vr_txlast)));
 
 	/* Set current media. */
+	sc-vr_link = true;
 	if ((error = ether_mediachange(ifp)) != 0)
 		goto out;
 
@@ -1263,19 +1297,37 @@ vr_ioctl(struct ifnet *ifp, u_long comma
 
 	s = splnet();
 
-	error = ether_ioctl(ifp, command, data);
-	if (error == ENETRESET) {
-		/*
-		 * Multicast list has changed; set the hardware filter
-		 * accordingly.
-		 */
-		if (ifp-if_flags  IFF_RUNNING)
-			vr_setmulti(sc);
+	switch (command) {
+	case SIOCSIFFLAGS:
+		if ((error = ifioctl_common(ifp, command, data)) != 0)
+			break;
+
+		switch (ifp-if_flags  (IFF_UP | IFF_RUNNING)) {
+		case IFF_RUNNING:
+			vr_stop(ifp, 1);
+			break;
+		case IFF_UP:
+			vr_init(ifp);
+			break;
+		case IFF_UP | IFF_RUNNING:
+			if ((ifp-if_flags ^ sc-vr_if_flags) == IFF_PROMISC)
+vr_setmulti(sc);
+			else
+vr_init(ifp);
+			break;
+		}
+		sc-vr_if_flags = ifp-if_flags;
+		break;
+	default:
+		if ((error = ether_ioctl(ifp, command, data)) != ENETRESET)
+			break;
 		error = 0;
+		if (command == SIOCADDMULTI || command == SIOCDELMULTI)
+			vr_setmulti(sc);
 	}
-
 	splx(s);
-	return (error);
+
+	return error;
 }
 
 static void
@@ -1299,6 +1351,11 @@ vr_tick(void *arg)
 	int s;
 
 	s = splnet();
+	if (sc-vr_flags  VR_F_RESTART) {
+		printf(%s: restarting\n, device_xname(sc-vr_dev));
+		vr_init(sc-vr_ec.ec_if);
+		sc-vr_flags = ~VR_F_RESTART;
+	}
 	mii_tick(sc-vr_mii);
 	splx(s);
 



CVS commit: [netbsd-6] src/sys/dev/pci

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:37:37 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: if_wpi.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #784):
sys/dev/pci/if_wpi.c: revision 1.54
Rework firmware reference counting and error messages in wpi(4).
. Clarify the shared firmware abstraction in wpi_cached_firmware
  and its new sibling wpi_release_firmware.
. Fix typo in wpa_cache_firmware error branch leading to free NULL.
. Fix leak in wpi_load_firmware error branch.
. Sprinkle some kasserts to executably document invariants.
. A little KNF here and there.
Based on a patch from dh in PR kern/44144.


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.3 -r1.50.2.4 src/sys/dev/pci/if_wpi.c

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

Modified files:

Index: src/sys/dev/pci/if_wpi.c
diff -u src/sys/dev/pci/if_wpi.c:1.50.2.3 src/sys/dev/pci/if_wpi.c:1.50.2.4
--- src/sys/dev/pci/if_wpi.c:1.50.2.3	Sun Aug 12 18:55:10 2012
+++ src/sys/dev/pci/if_wpi.c	Fri Feb  8 19:37:37 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_wpi.c,v 1.50.2.3 2012/08/12 18:55:10 martin Exp $*/
+/*  $NetBSD: if_wpi.c,v 1.50.2.4 2013/02/08 19:37:37 riz Exp $*/
 
 /*-
  * Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.50.2.3 2012/08/12 18:55:10 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.50.2.4 2013/02/08 19:37:37 riz Exp $);
 
 /*
  * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -91,6 +91,7 @@ static const struct ieee80211_rateset wp
 static const struct ieee80211_rateset wpi_rateset_11g =
 	{ 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } };
 
+static const char wpi_firmware_name[] = iwlwifi-3945.ucode;
 static once_t wpi_firmware_init;
 static kmutex_t wpi_firmware_mutex;
 static size_t wpi_firmware_users;
@@ -131,6 +132,8 @@ static void wpi_mem_write_region_4(struc
    const uint32_t *, int);
 static int  wpi_read_prom_data(struct wpi_softc *, uint32_t, void *, int);
 static int  wpi_load_microcode(struct wpi_softc *,  const uint8_t *, int);
+static int  wpi_cache_firmware(struct wpi_softc *);
+static void wpi_release_firmware(void);
 static int  wpi_load_firmware(struct wpi_softc *);
 static void wpi_calib_timeout(void *);
 static void wpi_iter_func(void *, struct ieee80211_node *);
@@ -197,6 +200,7 @@ wpi_match(device_t parent, cfdata_t matc
 static int
 wpi_attach_once(void)
 {
+
 	mutex_init(wpi_firmware_mutex, MUTEX_DEFAULT, IPL_NONE);
 	return 0;
 }
@@ -416,10 +420,8 @@ wpi_detach(device_t self, int flags __un
 	bus_space_unmap(sc-sc_st, sc-sc_sh, sc-sc_sz);
 
 	if (sc-fw_used) {
-		mutex_enter(wpi_firmware_mutex);
-		if (--wpi_firmware_users == 0)
-			firmware_free(wpi_firmware_image, wpi_firmware_size);
-		mutex_exit(wpi_firmware_mutex);
+		sc-fw_used = false;
+		wpi_release_firmware();
 	}
 
 	return 0;
@@ -1133,21 +1135,32 @@ wpi_load_microcode(struct wpi_softc *sc,
 static int
 wpi_cache_firmware(struct wpi_softc *sc)
 {
+	const char *const fwname = wpi_firmware_name;
 	firmware_handle_t fw;
 	int error;
 
-	if (sc-fw_used)
-		return 0;
+	/* sc is used here only to report error messages.  */
 
 	mutex_enter(wpi_firmware_mutex);
+
+	if (wpi_firmware_users == SIZE_MAX) {
+		mutex_exit(wpi_firmware_mutex);
+		return ENFILE;	/* Too many of something in the system...  */
+	}
 	if (wpi_firmware_users++) {
+		KASSERT(wpi_firmware_image != NULL);
+		KASSERT(wpi_firmware_size  0);
 		mutex_exit(wpi_firmware_mutex);
-		return 0;
+		return 0;	/* Already good to go.  */
 	}
 
+	KASSERT(wpi_firmware_image == NULL);
+	KASSERT(wpi_firmware_size == 0);
+
 	/* load firmware image from disk */
-	if ((error = firmware_open(if_wpi,iwlwifi-3945.ucode, fw)) != 0) {
-		aprint_error_dev(sc-sc_dev, could not read firmware file\n);
+	if ((error = firmware_open(if_wpi, fwname, fw)) != 0) {
+		aprint_error_dev(sc-sc_dev,
+		could not open firmware file %s: %d\n, fwname, error);
 		goto fail0;
 	}
 
@@ -1157,48 +1170,76 @@ wpi_cache_firmware(struct wpi_softc *sc)
 	WPI_FW_MAIN_TEXT_MAXSZ + WPI_FW_MAIN_DATA_MAXSZ +
 	WPI_FW_INIT_TEXT_MAXSZ + WPI_FW_INIT_DATA_MAXSZ +
 	WPI_FW_BOOT_TEXT_MAXSZ) {
-		aprint_error_dev(sc-sc_dev, invalid firmware file\n);
+		aprint_error_dev(sc-sc_dev,
+		firmware file %s too large: %zu bytes\n,
+		fwname, wpi_firmware_size);
 		error = EFBIG;
 		goto fail1;
 	}
 
 	if (wpi_firmware_size  sizeof (struct wpi_firmware_hdr)) {
 		aprint_error_dev(sc-sc_dev,
-		truncated firmware header: %zu bytes\n,
-		wpi_firmware_size);
+		firmware file %s too small: %zu bytes\n,
+		fwname, wpi_firmware_size);
 		error = EINVAL;
-		goto fail2;
+		goto fail1;
 	}
 
 	wpi_firmware_image = firmware_malloc(wpi_firmware_size);
 	if (wpi_firmware_image == NULL) {
-		aprint_error_dev(sc-sc_dev, not enough memory to stock firmware\n);
+		

CVS commit: [netbsd-6] src/sys/arch

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:43:02 UTC 2013

Modified Files:
src/sys/arch/arm/include/arm32 [netbsd-6]: pte.h
src/sys/arch/evbarm/marvell [netbsd-6]: marvell_machdep.c

Log Message:
sys/arch/arm/include/arm32/pte.h1.11
sys/arch/evbarm/marvell/marvell_machdep.c   1.19 via patch

Switch to ARM_VECTORS_HIGH for Sheeva CPU.
[msaitoh, ticket #785]


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.10.1 src/sys/arch/arm/include/arm32/pte.h
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 \
src/sys/arch/evbarm/marvell/marvell_machdep.c

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

Modified files:

Index: src/sys/arch/arm/include/arm32/pte.h
diff -u src/sys/arch/arm/include/arm32/pte.h:1.10 src/sys/arch/arm/include/arm32/pte.h:1.10.10.1
--- src/sys/arch/arm/include/arm32/pte.h:1.10	Thu Mar 10 07:47:15 2011
+++ src/sys/arch/arm/include/arm32/pte.h	Fri Feb  8 19:43:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pte.h,v 1.10 2011/03/10 07:47:15 bsh Exp $	*/
+/*	$NetBSD: pte.h,v 1.10.10.1 2013/02/08 19:43:01 riz Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -107,6 +107,7 @@ typedef uint32_t	pt_entry_t;	/* L2 table
 #define	L2_L_FRAME	(~L2_L_OFFSET)
 #define	L2_L_SHIFT	16
 
+#define	L2_S_SEGSIZE	(PAGE_SIZE * L2_S_SIZE / 4)
 #define	L2_S_SIZE	0x1000	/* 4K */
 #define	L2_S_OFFSET	(L2_S_SIZE - 1)
 #define	L2_S_FRAME	(~L2_S_OFFSET)

Index: src/sys/arch/evbarm/marvell/marvell_machdep.c
diff -u src/sys/arch/evbarm/marvell/marvell_machdep.c:1.6.2.1 src/sys/arch/evbarm/marvell/marvell_machdep.c:1.6.2.2
--- src/sys/arch/evbarm/marvell/marvell_machdep.c:1.6.2.1	Thu Jun 28 04:50:38 2012
+++ src/sys/arch/evbarm/marvell/marvell_machdep.c	Fri Feb  8 19:43:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: marvell_machdep.c,v 1.6.2.1 2012/06/28 04:50:38 riz Exp $ */
+/*	$NetBSD: marvell_machdep.c,v 1.6.2.2 2013/02/08 19:43:01 riz Exp $ */
 /*
  * Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: marvell_machdep.c,v 1.6.2.1 2012/06/28 04:50:38 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: marvell_machdep.c,v 1.6.2.2 2013/02/08 19:43:01 riz Exp $);
 
 #include opt_evbarm_boardtype.h
 #include opt_ddb.h
@@ -552,7 +552,7 @@ initarm(void *arg)
 	 * shared by all processes.
 	 */
 	valloc_pages(systempage, 1);
-	systempage.pv_va = 0x;
+	systempage.pv_va = ARM_VECTORS_HIGH;
 
 	/* Allocate stacks for all modes */
 	valloc_pages(irqstack, IRQ_STACK_SIZE);
@@ -596,7 +596,7 @@ initarm(void *arg)
 	l1pagetable = kernel_l1pt.pv_va;
 
 	/* Map the L2 pages tables in the L1 page table */
-	pmap_link_l2pt(l1pagetable, 0x,
+	pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH  -L2_S_SEGSIZE,
 	kernel_pt_table[KERNEL_PT_SYS]);
 	for (loop = 0; loop  KERNEL_PT_KERNEL_NUM; loop++)
 		pmap_link_l2pt(l1pagetable, KERNEL_BASE + loop * 0x0040,
@@ -656,7 +656,7 @@ initarm(void *arg)
 		VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
 
 	/* Map the vector page. */
-	pmap_map_entry(l1pagetable, ARM_VECTORS_LOW, systempage.pv_pa,
+	pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
 	VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 
 	/*
@@ -690,7 +690,7 @@ initarm(void *arg)
 	printf(bootstrap done.\n);
 #endif
 
-	arm32_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL);
+	arm32_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 
 	/*
 	 * Pages were allocated during the secondary bootstrap for the



CVS commit: [netbsd-6] src/usr.sbin/makemandb

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:45:44 UTC 2013

Modified Files:
src/usr.sbin/makemandb [netbsd-6]: makemandb.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #786):
usr.sbin/makemandb/makemandb.c: revision 1.16
If you cannot parse .SH NAME, like in the case of the ksh93 man page
where the .SH is followed by a conditional:
.SH NAME
.if \nZ=0 \{text text text
.\}
at least don't core-dump.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.6 -r1.2.2.7 src/usr.sbin/makemandb/makemandb.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/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.2.2.6 src/usr.sbin/makemandb/makemandb.c:1.2.2.7
--- src/usr.sbin/makemandb/makemandb.c:1.2.2.6	Tue Nov 20 23:11:47 2012
+++ src/usr.sbin/makemandb/makemandb.c	Fri Feb  8 19:45:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: makemandb.c,v 1.2.2.6 2012/11/20 23:11:47 riz Exp $	*/
+/*	$NetBSD: makemandb.c,v 1.2.2.7 2013/02/08 19:45:43 riz Exp $	*/
 /*
  * Copyright (c) 2011 Abhinav Upadhyay er.abhinav.upadh...@gmail.com
  * Copyright (c) 2011 Kristaps Dzonsons krist...@bsd.lv
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: makemandb.c,v 1.2.2.6 2012/11/20 23:11:47 riz Exp $);
+__RCSID($NetBSD: makemandb.c,v 1.2.2.7 2013/02/08 19:45:43 riz Exp $);
 
 #include sys/stat.h
 #include sys/types.h
@@ -1273,6 +1273,8 @@ pman_sh(const struct man_node *n, mandb_
 		pman_parse_name(n, rec);
 
 		name_desc = rec-name_desc;
+		if (name_desc == NULL)
+			return;
 
 		/* Remove any leading spaces. */
 		while (name_desc[0] == ' ')



CVS commit: [netbsd-6] src/doc

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:47:41 UTC 2013

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

Log Message:
Tickets 777,782-786.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.77 -r1.1.2.78 src/doc/CHANGES-6.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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.77 src/doc/CHANGES-6.1:1.1.2.78
--- src/doc/CHANGES-6.1:1.1.2.77	Sat Feb  2 15:44:21 2013
+++ src/doc/CHANGES-6.1	Fri Feb  8 19:47:41 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.77 2013/02/02 15:44:21 sborrill Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.78 2013/02/08 19:47:41 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8062,3 +8062,65 @@ bin/sh/expand.h	1.19
 	expanding $bar. Should fix PR bin/47361
 	[dsl, ticket #773]
 
+sys/kern/uipc_mbuf.c1.148
+sys/net/npf/npf.h1.25
+sys/net/npf/npf_alg.c1.6
+sys/net/npf/npf_alg_icmp.c			1.14
+sys/net/npf/npf_ext_log.c			1.2
+sys/net/npf/npf_ext_normalise.c			1.2
+sys/net/npf/npf_handler.c			1.24-1.25
+sys/net/npf/npf_impl.h1.25
+sys/net/npf/npf_inet.c1.19-1.20
+sys/net/npf/npf_instr.c1.15
+sys/net/npf/npf_mbuf.c1.9-1.10
+sys/net/npf/npf_nat.c1.18
+sys/net/npf/npf_processor.c			1.13-1.14
+sys/net/npf/npf_rproc.c1.5
+sys/net/npf/npf_ruleset.c			1.15-1.16
+sys/net/npf/npf_sendpkt.c			1.13
+sys/net/npf/npf_session.c			1.19-1.20
+sys/net/npf/npf_state.c1.13
+sys/net/npf/npf_state_tcp.c			1.12
+sys/sys/mbuf.h	1.151
+usr.sbin/npf/npfctl/npfctl.c			1.27
+usr.sbin/npf/npftest/README			1.3
+usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c	1.4
+usr.sbin/npf/npftest/libnpftest/npf_nat_test.c	1.2
+usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c	1.3-1.4
+usr.sbin/npf/npftest/libnpftest/npf_processor_test.c 1.4
+usr.sbin/npf/npftest/libnpftest/npf_rule_test.c	1.3
+usr.sbin/npf/npftest/libnpftest/npf_state_test.c 1.4
+
+	NPF: rework nbuf interface, simplify ICMP ALG, handle ICMP ECHO
+	for traceroute.  Misc. other fixes.
+	[rmind, ticket #777]
+
+sys/kern/kern_softint.c1.39
+sys/kern/subr_pserialize.c			1.6
+sys/rump/include/machine/intr.h			1.19
+
+	Fixes for pserialize(9).
+	[rmind, ticket #782]
+
+sys/dev/pci/if_vr.c1.112 via patch
+
+	Reset the vr(4) chip if the tx engine gets stuck.  No need to
+	do a full reset when enabling/disabling promiscuous mode.
+	[taca, ticket #783]
+
+sys/dev/pci/if_wpi.c1.54
+
+	Fix various bugs in firmware reference counting.  PR#44144.
+	[riastradh, ticket #784]
+
+sys/arch/arm/include/arm32/pte.h		1.11
+sys/arch/evbarm/marvell/marvell_machdep.c	1.19 via patch
+
+	Switch to ARM_VECTORS_HIGH for Sheeva CPU.
+	[msaitoh, ticket #785]
+
+usr.sbin/makemandb/makemandb.c			1.16
+
+	Don't coredump upon error parsing .SH.
+	[christos, ticket #786]
+



CVS commit: [netbsd-6] src/sys/dist/ipf/netinet

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:54:46 UTC 2013

Modified Files:
src/sys/dist/ipf/netinet [netbsd-6]: ip_fil_netbsd.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #787):
sys/dist/ipf/netinet/ip_fil_netbsd.c: revision 1.4
Fix off-by-one read error.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.61.2.1 src/sys/dist/ipf/netinet/ip_fil_netbsd.c

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

Modified files:

Index: src/sys/dist/ipf/netinet/ip_fil_netbsd.c
diff -u src/sys/dist/ipf/netinet/ip_fil_netbsd.c:1.61 src/sys/dist/ipf/netinet/ip_fil_netbsd.c:1.61.2.1
--- src/sys/dist/ipf/netinet/ip_fil_netbsd.c:1.61	Wed Feb 15 17:55:22 2012
+++ src/sys/dist/ipf/netinet/ip_fil_netbsd.c	Fri Feb  8 19:54:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_fil_netbsd.c,v 1.61 2012/02/15 17:55:22 riz Exp $	*/
+/*	$NetBSD: ip_fil_netbsd.c,v 1.61.2.1 2013/02/08 19:54:45 riz Exp $	*/
 
 /*
  * Copyright (C) 1993-2003 by Darren Reed.
@@ -8,7 +8,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_fil_netbsd.c,v 1.61 2012/02/15 17:55:22 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_fil_netbsd.c,v 1.61.2.1 2013/02/08 19:54:45 riz Exp $);
 #else
 static const char sccsid[] = @(#)ip_fil.c	2.41 6/5/96 (C) 1993-2000 Darren Reed;
 static const char rcsid[] = @(#)Id: ip_fil_netbsd.c,v 2.55.2.67 2009/12/19 05:41:08 darrenr Exp;
@@ -1040,7 +1040,7 @@ fr_send_icmp_err(int type, fr_info_t *fi
 
 	code = fin-fin_icode;
 #ifdef USE_INET6
-	if ((code  0) || (code  sizeof(icmptoicmp6unreach)/sizeof(int)))
+	if ((code  0) || (code = sizeof(icmptoicmp6unreach)/sizeof(int)))
 		return -1;
 #endif
 



CVS commit: [netbsd-6-0] src/sys/dist/ipf/netinet

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:55:11 UTC 2013

Modified Files:
src/sys/dist/ipf/netinet [netbsd-6-0]: ip_fil_netbsd.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #787):
sys/dist/ipf/netinet/ip_fil_netbsd.c: revision 1.4
Fix off-by-one read error.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.61.6.1 src/sys/dist/ipf/netinet/ip_fil_netbsd.c

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

Modified files:

Index: src/sys/dist/ipf/netinet/ip_fil_netbsd.c
diff -u src/sys/dist/ipf/netinet/ip_fil_netbsd.c:1.61 src/sys/dist/ipf/netinet/ip_fil_netbsd.c:1.61.6.1
--- src/sys/dist/ipf/netinet/ip_fil_netbsd.c:1.61	Wed Feb 15 17:55:22 2012
+++ src/sys/dist/ipf/netinet/ip_fil_netbsd.c	Fri Feb  8 19:55:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_fil_netbsd.c,v 1.61 2012/02/15 17:55:22 riz Exp $	*/
+/*	$NetBSD: ip_fil_netbsd.c,v 1.61.6.1 2013/02/08 19:55:11 riz Exp $	*/
 
 /*
  * Copyright (C) 1993-2003 by Darren Reed.
@@ -8,7 +8,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_fil_netbsd.c,v 1.61 2012/02/15 17:55:22 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_fil_netbsd.c,v 1.61.6.1 2013/02/08 19:55:11 riz Exp $);
 #else
 static const char sccsid[] = @(#)ip_fil.c	2.41 6/5/96 (C) 1993-2000 Darren Reed;
 static const char rcsid[] = @(#)Id: ip_fil_netbsd.c,v 2.55.2.67 2009/12/19 05:41:08 darrenr Exp;
@@ -1040,7 +1040,7 @@ fr_send_icmp_err(int type, fr_info_t *fi
 
 	code = fin-fin_icode;
 #ifdef USE_INET6
-	if ((code  0) || (code  sizeof(icmptoicmp6unreach)/sizeof(int)))
+	if ((code  0) || (code = sizeof(icmptoicmp6unreach)/sizeof(int)))
 		return -1;
 #endif
 



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:55:25 UTC 2013

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

Log Message:
Ticket 787.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-6.0.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.0.2
diff -u src/doc/CHANGES-6.0.2:1.1.2.8 src/doc/CHANGES-6.0.2:1.1.2.9
--- src/doc/CHANGES-6.0.2:1.1.2.8	Fri Feb  8 19:32:00 2013
+++ src/doc/CHANGES-6.0.2	Fri Feb  8 19:55:24 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.2,v 1.1.2.8 2013/02/08 19:32:00 riz Exp $
+# $NetBSD: CHANGES-6.0.2,v 1.1.2.9 2013/02/08 19:55:24 riz Exp $
 
 A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2
 release:
@@ -63,3 +63,8 @@ sys/rump/include/machine/intr.h			1.19
 	Fixes for pserialize(9).
 	[rmind, ticket #782]
 
+sys/dist/ipf/netinet/ip_fil_netbsd.c		1.4 via patch
+
+	Fix off-by-one read error.
+	[msaitoh, ticket #787]
+



CVS commit: [netbsd-6] src/sys/arch/arm/arm32

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:57:19 UTC 2013

Modified Files:
src/sys/arch/arm/arm32 [netbsd-6]: cpu.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #788):
sys/arch/arm/arm32/cpu.c: revision 1.89
S/,/;/


To generate a diff of this commit:
cvs rdiff -u -r1.78.10.1 -r1.78.10.2 src/sys/arch/arm/arm32/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/arm/arm32/cpu.c
diff -u src/sys/arch/arm/arm32/cpu.c:1.78.10.1 src/sys/arch/arm/arm32/cpu.c:1.78.10.2
--- src/sys/arch/arm/arm32/cpu.c:1.78.10.1	Thu Aug  9 06:36:45 2012
+++ src/sys/arch/arm/arm32/cpu.c	Fri Feb  8 19:57:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.78.10.1 2012/08/09 06:36:45 jdc Exp $	*/
+/*	$NetBSD: cpu.c,v 1.78.10.2 2013/02/08 19:57:18 riz Exp $	*/
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.78.10.1 2012/08/09 06:36:45 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.78.10.2 2013/02/08 19:57:18 riz Exp $);
 
 #include sys/systm.h
 #include sys/malloc.h
@@ -502,7 +502,7 @@ identify_arm_cpu(struct device *dv, stru
 		if (cpuids[i].cpuid == (cpuid  CPU_ID_CPU_MASK)) {
 			cpu_class = cpuids[i].cpu_class;
 			steppingstr = cpuids[i].cpu_steppings[cpuid 
-			CPU_ID_REVISION_MASK],
+			CPU_ID_REVISION_MASK];
 			sprintf(cpu_model, %s%s%s (%s core),
 			cpuids[i].cpu_classname,
 			steppingstr[0] == '*' ?  :  ,



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:22:03 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_vmem.c

Log Message:
Pull up following revision(s) (requested by para in ticket #789):
sys/kern/subr_vmem.c: revision 1.81
sys/kern/subr_vmem.c: revision 1.77
fix a lock order reversal during global boundary tag refill.
thanks to chuq@
xxx: request pullup
Fix release of vmem_btag_lock (don't release twice in error path)


To generate a diff of this commit:
cvs rdiff -u -r1.72.2.1 -r1.72.2.2 src/sys/kern/subr_vmem.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/subr_vmem.c
diff -u src/sys/kern/subr_vmem.c:1.72.2.1 src/sys/kern/subr_vmem.c:1.72.2.2
--- src/sys/kern/subr_vmem.c:1.72.2.1	Tue Apr  3 16:14:02 2012
+++ src/sys/kern/subr_vmem.c	Fri Feb  8 20:22:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_vmem.c,v 1.72.2.1 2012/04/03 16:14:02 riz Exp $	*/
+/*	$NetBSD: subr_vmem.c,v 1.72.2.2 2013/02/08 20:22:03 riz Exp $	*/
 
 /*-
  * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.72.2.1 2012/04/03 16:14:02 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.72.2.2 2013/02/08 20:22:03 riz Exp $);
 
 #if defined(_KERNEL)
 #include opt_ddb.h
@@ -263,6 +263,7 @@ static int static_qc_pool_count = STATIC
 vmem_t *kmem_va_meta_arena;
 vmem_t *kmem_meta_arena;
 
+static kmutex_t vmem_refill_lock;
 static kmutex_t vmem_btag_lock;
 static LIST_HEAD(, vmem_btag) vmem_btag_freelist;
 static size_t vmem_btag_freelist_count = 0;
@@ -282,19 +283,24 @@ bt_refillglobal(vm_flag_t flags)
 	bt_t *bt;
 	int i;
 
+	mutex_enter(vmem_refill_lock);
+
 	mutex_enter(vmem_btag_lock);
 	if (vmem_btag_freelist_count  (BT_MINRESERVE * 16)) {
 		mutex_exit(vmem_btag_lock);
+		mutex_exit(vmem_refill_lock);
 		return 0;
 	}
+	mutex_exit(vmem_btag_lock);
 
 	if (vmem_alloc(kmem_meta_arena, PAGE_SIZE,
 	(flags  ~VM_FITMASK) | VM_INSTANTFIT | VM_POPULATING, va) != 0) {
-		mutex_exit(vmem_btag_lock);
+		mutex_exit(vmem_refill_lock);
 		return ENOMEM;
 	}
 	VMEM_EVCNT_INCR(bt_pages);
 
+	mutex_enter(vmem_btag_lock);
 	btp = (void *) va;
 	for (i = 0; i  (BT_PER_PAGE); i++) {
 		bt = btp;
@@ -308,9 +314,14 @@ bt_refillglobal(vm_flag_t flags)
 	}
 	mutex_exit(vmem_btag_lock);
 
-	bt_refill(kmem_arena, (flags  ~VM_FITMASK) | VM_INSTANTFIT);
-	bt_refill(kmem_va_meta_arena, (flags  ~VM_FITMASK) | VM_INSTANTFIT);
-	bt_refill(kmem_meta_arena, (flags  ~VM_FITMASK) | VM_INSTANTFIT);
+	bt_refill(kmem_arena, (flags  ~VM_FITMASK)
+	| VM_INSTANTFIT | VM_POPULATING);
+	bt_refill(kmem_va_meta_arena, (flags  ~VM_FITMASK)
+	| VM_INSTANTFIT | VM_POPULATING);
+	bt_refill(kmem_meta_arena, (flags  ~VM_FITMASK)
+	| VM_INSTANTFIT | VM_POPULATING);
+
+	mutex_exit(vmem_refill_lock);
 
 	return 0;
 }
@@ -320,7 +331,9 @@ bt_refill(vmem_t *vm, vm_flag_t flags)
 {
 	bt_t *bt;
 
-	bt_refillglobal(flags);
+	if (!(flags  VM_POPULATING)) {
+		bt_refillglobal(flags);
+	}
 
 	VMEM_LOCK(vm);
 	mutex_enter(vmem_btag_lock);
@@ -691,6 +704,7 @@ vmem_bootstrap(void)
 {
 
 	mutex_init(vmem_list_lock, MUTEX_DEFAULT, IPL_VM);
+	mutex_init(vmem_refill_lock, MUTEX_DEFAULT, IPL_VM);
 	mutex_init(vmem_btag_lock, MUTEX_DEFAULT, IPL_VM);
 
 	while (static_bt_count--  0) {



CVS commit: [netbsd-6-0] src/sys/kern

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:22:19 UTC 2013

Modified Files:
src/sys/kern [netbsd-6-0]: subr_vmem.c

Log Message:
Pull up following revision(s) (requested by para in ticket #789):
sys/kern/subr_vmem.c: revision 1.81
sys/kern/subr_vmem.c: revision 1.77
fix a lock order reversal during global boundary tag refill.
thanks to chuq@
xxx: request pullup
Fix release of vmem_btag_lock (don't release twice in error path)


To generate a diff of this commit:
cvs rdiff -u -r1.72.2.1 -r1.72.2.1.4.1 src/sys/kern/subr_vmem.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/subr_vmem.c
diff -u src/sys/kern/subr_vmem.c:1.72.2.1 src/sys/kern/subr_vmem.c:1.72.2.1.4.1
--- src/sys/kern/subr_vmem.c:1.72.2.1	Tue Apr  3 16:14:02 2012
+++ src/sys/kern/subr_vmem.c	Fri Feb  8 20:22:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_vmem.c,v 1.72.2.1 2012/04/03 16:14:02 riz Exp $	*/
+/*	$NetBSD: subr_vmem.c,v 1.72.2.1.4.1 2013/02/08 20:22:18 riz Exp $	*/
 
 /*-
  * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.72.2.1 2012/04/03 16:14:02 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.72.2.1.4.1 2013/02/08 20:22:18 riz Exp $);
 
 #if defined(_KERNEL)
 #include opt_ddb.h
@@ -263,6 +263,7 @@ static int static_qc_pool_count = STATIC
 vmem_t *kmem_va_meta_arena;
 vmem_t *kmem_meta_arena;
 
+static kmutex_t vmem_refill_lock;
 static kmutex_t vmem_btag_lock;
 static LIST_HEAD(, vmem_btag) vmem_btag_freelist;
 static size_t vmem_btag_freelist_count = 0;
@@ -282,19 +283,24 @@ bt_refillglobal(vm_flag_t flags)
 	bt_t *bt;
 	int i;
 
+	mutex_enter(vmem_refill_lock);
+
 	mutex_enter(vmem_btag_lock);
 	if (vmem_btag_freelist_count  (BT_MINRESERVE * 16)) {
 		mutex_exit(vmem_btag_lock);
+		mutex_exit(vmem_refill_lock);
 		return 0;
 	}
+	mutex_exit(vmem_btag_lock);
 
 	if (vmem_alloc(kmem_meta_arena, PAGE_SIZE,
 	(flags  ~VM_FITMASK) | VM_INSTANTFIT | VM_POPULATING, va) != 0) {
-		mutex_exit(vmem_btag_lock);
+		mutex_exit(vmem_refill_lock);
 		return ENOMEM;
 	}
 	VMEM_EVCNT_INCR(bt_pages);
 
+	mutex_enter(vmem_btag_lock);
 	btp = (void *) va;
 	for (i = 0; i  (BT_PER_PAGE); i++) {
 		bt = btp;
@@ -308,9 +314,14 @@ bt_refillglobal(vm_flag_t flags)
 	}
 	mutex_exit(vmem_btag_lock);
 
-	bt_refill(kmem_arena, (flags  ~VM_FITMASK) | VM_INSTANTFIT);
-	bt_refill(kmem_va_meta_arena, (flags  ~VM_FITMASK) | VM_INSTANTFIT);
-	bt_refill(kmem_meta_arena, (flags  ~VM_FITMASK) | VM_INSTANTFIT);
+	bt_refill(kmem_arena, (flags  ~VM_FITMASK)
+	| VM_INSTANTFIT | VM_POPULATING);
+	bt_refill(kmem_va_meta_arena, (flags  ~VM_FITMASK)
+	| VM_INSTANTFIT | VM_POPULATING);
+	bt_refill(kmem_meta_arena, (flags  ~VM_FITMASK)
+	| VM_INSTANTFIT | VM_POPULATING);
+
+	mutex_exit(vmem_refill_lock);
 
 	return 0;
 }
@@ -320,7 +331,9 @@ bt_refill(vmem_t *vm, vm_flag_t flags)
 {
 	bt_t *bt;
 
-	bt_refillglobal(flags);
+	if (!(flags  VM_POPULATING)) {
+		bt_refillglobal(flags);
+	}
 
 	VMEM_LOCK(vm);
 	mutex_enter(vmem_btag_lock);
@@ -691,6 +704,7 @@ vmem_bootstrap(void)
 {
 
 	mutex_init(vmem_list_lock, MUTEX_DEFAULT, IPL_VM);
+	mutex_init(vmem_refill_lock, MUTEX_DEFAULT, IPL_VM);
 	mutex_init(vmem_btag_lock, MUTEX_DEFAULT, IPL_VM);
 
 	while (static_bt_count--  0) {



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:22:44 UTC 2013

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

Log Message:
Ticket #789.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-6.0.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.0.2
diff -u src/doc/CHANGES-6.0.2:1.1.2.9 src/doc/CHANGES-6.0.2:1.1.2.10
--- src/doc/CHANGES-6.0.2:1.1.2.9	Fri Feb  8 19:55:24 2013
+++ src/doc/CHANGES-6.0.2	Fri Feb  8 20:22:44 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.2,v 1.1.2.9 2013/02/08 19:55:24 riz Exp $
+# $NetBSD: CHANGES-6.0.2,v 1.1.2.10 2013/02/08 20:22:44 riz Exp $
 
 A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2
 release:
@@ -68,3 +68,8 @@ sys/dist/ipf/netinet/ip_fil_netbsd.c		1.
 	Fix off-by-one read error.
 	[msaitoh, ticket #787]
 
+sys/kern/subr_vmem.c1.77 via patch,1.81
+
+	Fix a lock order reversal, and a lock release.
+	[para, ticket #789]
+



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:28:07 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: kern_rndq.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #790):
sys/kern/kern_rndq.c: revision 1.7
  Set resource limit. The rnd_process_events() function is called every tick
and process the sample queue. Without limitation, if a lot of rnd_add_*()
are called, all kernel memory may be eaten up.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/kern/kern_rndq.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_rndq.c
diff -u src/sys/kern/kern_rndq.c:1.1.2.4 src/sys/kern/kern_rndq.c:1.1.2.5
--- src/sys/kern/kern_rndq.c:1.1.2.4	Fri Nov 23 16:16:56 2012
+++ src/sys/kern/kern_rndq.c	Fri Feb  8 20:28:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rndq.c,v 1.1.2.4 2012/11/23 16:16:56 riz Exp $	*/
+/*	$NetBSD: kern_rndq.c,v 1.1.2.5 2013/02/08 20:28:07 riz Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.4 2012/11/23 16:16:56 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.5 2013/02/08 20:28:07 riz Exp $);
 
 #include sys/param.h
 #include sys/ioctl.h
@@ -405,7 +405,17 @@ rnd_init(void)
 	rnd_mempc = pool_cache_init(sizeof(rnd_sample_t), 0, 0, 0,
 rndsample, NULL, IPL_VM,
 NULL, NULL, NULL);
-	/* Mix *something*, *anything* into the pool to help it get started.
+
+	/*
+	 * Set resource limit. The rnd_process_events() function
+	 * is called every tick and process the sample queue.
+	 * Without limitation, if a lot of rnd_add_*() are called,
+	 * all kernel memory may be eaten up.
+	 */
+	pool_cache_sethardlimit(rnd_mempc, RND_POOLBITS, NULL, 0);
+
+	/*
+	 * Mix *something*, *anything* into the pool to help it get started.
 	 * However, it's not safe for rnd_counter() to call microtime() yet,
 	 * so on some platforms we might just end up with zeros anyway.
 	 * XXX more things to add would be nice.



CVS commit: [netbsd-6-0] src/sys/kern

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:28:22 UTC 2013

Modified Files:
src/sys/kern [netbsd-6-0]: kern_rndq.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #790):
sys/kern/kern_rndq.c: revision 1.7
  Set resource limit. The rnd_process_events() function is called every tick
and process the sample queue. Without limitation, if a lot of rnd_add_*()
are called, all kernel memory may be eaten up.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.2.4.1 src/sys/kern/kern_rndq.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_rndq.c
diff -u src/sys/kern/kern_rndq.c:1.1.2.2 src/sys/kern/kern_rndq.c:1.1.2.2.4.1
--- src/sys/kern/kern_rndq.c:1.1.2.2	Fri Apr 20 23:35:20 2012
+++ src/sys/kern/kern_rndq.c	Fri Feb  8 20:28:22 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rndq.c,v 1.1.2.2 2012/04/20 23:35:20 riz Exp $	*/
+/*	$NetBSD: kern_rndq.c,v 1.1.2.2.4.1 2013/02/08 20:28:22 riz Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.2 2012/04/20 23:35:20 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.2.4.1 2013/02/08 20:28:22 riz Exp $);
 
 #include sys/param.h
 #include sys/ioctl.h
@@ -405,7 +405,17 @@ rnd_init(void)
 	rnd_mempc = pool_cache_init(sizeof(rnd_sample_t), 0, 0, 0,
 rndsample, NULL, IPL_VM,
 NULL, NULL, NULL);
-	/* Mix *something*, *anything* into the pool to help it get started.
+
+	/*
+	 * Set resource limit. The rnd_process_events() function
+	 * is called every tick and process the sample queue.
+	 * Without limitation, if a lot of rnd_add_*() are called,
+	 * all kernel memory may be eaten up.
+	 */
+	pool_cache_sethardlimit(rnd_mempc, RND_POOLBITS, NULL, 0);
+
+	/*
+	 * Mix *something*, *anything* into the pool to help it get started.
 	 * However, it's not safe for rnd_counter() to call microtime() yet,
 	 * so on some platforms we might just end up with zeros anyway.
 	 * XXX more things to add would be nice.



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:28:36 UTC 2013

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

Log Message:
Ticket 790./


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/doc/CHANGES-6.0.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.0.2
diff -u src/doc/CHANGES-6.0.2:1.1.2.10 src/doc/CHANGES-6.0.2:1.1.2.11
--- src/doc/CHANGES-6.0.2:1.1.2.10	Fri Feb  8 20:22:44 2013
+++ src/doc/CHANGES-6.0.2	Fri Feb  8 20:28:36 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.2,v 1.1.2.10 2013/02/08 20:22:44 riz Exp $
+# $NetBSD: CHANGES-6.0.2,v 1.1.2.11 2013/02/08 20:28:36 riz Exp $
 
 A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2
 release:
@@ -73,3 +73,9 @@ sys/kern/subr_vmem.c1.77 via patch,1
 	Fix a lock order reversal, and a lock release.
 	[para, ticket #789]
 
+sys/kern/kern_rndq.c1.7
+
+	Set resource limits to prevent potential consumption of all
+	kernel memory.
+	[msaitoh, ticket #790]
+



CVS commit: [netbsd-6] src/lib/libutil

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:30:34 UTC 2013

Modified Files:
src/lib/libutil [netbsd-6]: parsedate.y

Log Message:
Pull up following revision(s) (requested by apb in ticket #791):
lib/libutil/parsedate.y: revision 1.13
mktime(3) works in local time, and trying to trick it by
setting tm_gmtoff doesn't work.  Instead, call mktime_z(3)
with a null timezone (so it works in UTC) and adjust the
result afterwards.  Now date -d @0 correctly
prints the local equivalent of 1970-01-01 00:00:00 UTC.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.2.1 src/lib/libutil/parsedate.y

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

Modified files:

Index: src/lib/libutil/parsedate.y
diff -u src/lib/libutil/parsedate.y:1.11 src/lib/libutil/parsedate.y:1.11.2.1
--- src/lib/libutil/parsedate.y:1.11	Sat Dec 17 19:14:10 2011
+++ src/lib/libutil/parsedate.y	Fri Feb  8 20:30:34 2013
@@ -590,7 +590,8 @@ Convert(
 DSTMODE	DSTmode		/* DST on/off/maybe */
 )
 {
-struct tm tm;
+struct tm tm = {.tm_sec = 0};
+time_t result;
 
 /* XXX Y2K */
 if (Year  0)
@@ -611,9 +612,11 @@ Convert(
 case DSToff: tm.tm_isdst = 0; break;
 default: tm.tm_isdst = -1; break;
 }
-tm.tm_gmtoff = -Timezone;
 
-return mktime(tm);
+/* We rely on mktime_z(NULL, ...) working in UTC, not in local time. */
+result = mktime_z(NULL, tm);
+result -= Timezone;
+return result;
 }
 
 



CVS commit: [netbsd-6-0] src/lib/libutil

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:30:43 UTC 2013

Modified Files:
src/lib/libutil [netbsd-6-0]: parsedate.y

Log Message:
Pull up following revision(s) (requested by apb in ticket #791):
lib/libutil/parsedate.y: revision 1.13
mktime(3) works in local time, and trying to trick it by
setting tm_gmtoff doesn't work.  Instead, call mktime_z(3)
with a null timezone (so it works in UTC) and adjust the
result afterwards.  Now date -d @0 correctly
prints the local equivalent of 1970-01-01 00:00:00 UTC.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.8.1 src/lib/libutil/parsedate.y

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

Modified files:

Index: src/lib/libutil/parsedate.y
diff -u src/lib/libutil/parsedate.y:1.11 src/lib/libutil/parsedate.y:1.11.8.1
--- src/lib/libutil/parsedate.y:1.11	Sat Dec 17 19:14:10 2011
+++ src/lib/libutil/parsedate.y	Fri Feb  8 20:30:43 2013
@@ -590,7 +590,8 @@ Convert(
 DSTMODE	DSTmode		/* DST on/off/maybe */
 )
 {
-struct tm tm;
+struct tm tm = {.tm_sec = 0};
+time_t result;
 
 /* XXX Y2K */
 if (Year  0)
@@ -611,9 +612,11 @@ Convert(
 case DSToff: tm.tm_isdst = 0; break;
 default: tm.tm_isdst = -1; break;
 }
-tm.tm_gmtoff = -Timezone;
 
-return mktime(tm);
+/* We rely on mktime_z(NULL, ...) working in UTC, not in local time. */
+result = mktime_z(NULL, tm);
+result -= Timezone;
+return result;
 }
 
 



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:30:54 UTC 2013

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

Log Message:
Ticket 791.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/doc/CHANGES-6.0.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.0.2
diff -u src/doc/CHANGES-6.0.2:1.1.2.11 src/doc/CHANGES-6.0.2:1.1.2.12
--- src/doc/CHANGES-6.0.2:1.1.2.11	Fri Feb  8 20:28:36 2013
+++ src/doc/CHANGES-6.0.2	Fri Feb  8 20:30:54 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.2,v 1.1.2.11 2013/02/08 20:28:36 riz Exp $
+# $NetBSD: CHANGES-6.0.2,v 1.1.2.12 2013/02/08 20:30:54 riz Exp $
 
 A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2
 release:
@@ -79,3 +79,10 @@ sys/kern/kern_rndq.c1.7
 	kernel memory.
 	[msaitoh, ticket #790]
 
+lib/libutil/parsedate.y1.13
+
+	Fix a bug in parsedate(3) where it would treat all input
+	as if it were in the local time zone, even if the input should have
+	been treated as a time in UTC or some other time zone.
+	[apb, ticket #791]
+



CVS commit: [netbsd-6] src/doc

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:31:51 UTC 2013

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

Log Message:
Tickets 787-791.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.78 -r1.1.2.79 src/doc/CHANGES-6.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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.78 src/doc/CHANGES-6.1:1.1.2.79
--- src/doc/CHANGES-6.1:1.1.2.78	Fri Feb  8 19:47:41 2013
+++ src/doc/CHANGES-6.1	Fri Feb  8 20:31:51 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.78 2013/02/08 19:47:41 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.79 2013/02/08 20:31:51 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8124,3 +8124,31 @@ usr.sbin/makemandb/makemandb.c			1.16
 	Don't coredump upon error parsing .SH.
 	[christos, ticket #786]
 
+sys/dist/ipf/netinet/ip_fil_netbsd.c		1.4 via patch
+
+	Fix off-by-one read error.
+	[msaitoh, ticket #787]
+
+sys/arch/arm/arm32/cpu.c			1.89
+
+	Print CPU model string correctly.
+	[msaitoh, ticket #788]
+
+sys/kern/subr_vmem.c1.77 via patch,1.81
+
+	Fix a lock order reversal, and a lock release.
+	[para, ticket #789]
+
+sys/kern/kern_rndq.c1.7
+
+	Set resource limits to prevent potential consumption of all
+	kernel memory.
+	[msaitoh, ticket #790]
+
+lib/libutil/parsedate.y1.13
+
+	Fix a bug in parsedate(3) where it would treat all input
+	as if it were in the local time zone, even if the input should have
+	been treated as a time in UTC or some other time zone.
+	[apb, ticket #791]
+



CVS commit: [netbsd-6] src/sys/net

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:42:51 UTC 2013

Modified Files:
src/sys/net [netbsd-6]: if_gif.c

Log Message:
Pull up following revision(s) (requested by degroote in ticket #792):
sys/net/if_gif.c: revision 1.81
PR kern/47419: Antony Mallet: ifconfig doesn't diplay MTU on gif(4)
There is no special treatment for SIOCGITMTU in gif(4), so just pass it to
ifioctl_common().


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.80.8.1 src/sys/net/if_gif.c

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

Modified files:

Index: src/sys/net/if_gif.c
diff -u src/sys/net/if_gif.c:1.80 src/sys/net/if_gif.c:1.80.8.1
--- src/sys/net/if_gif.c:1.80	Fri Oct 28 16:42:52 2011
+++ src/sys/net/if_gif.c	Fri Feb  8 20:42:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gif.c,v 1.80 2011/10/28 16:42:52 dyoung Exp $	*/
+/*	$NetBSD: if_gif.c,v 1.80.8.1 2013/02/08 20:42:51 riz Exp $	*/
 /*	$KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_gif.c,v 1.80 2011/10/28 16:42:52 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_gif.c,v 1.80.8.1 2013/02/08 20:42:51 riz Exp $);
 
 #include opt_inet.h
 #include opt_iso.h
@@ -496,9 +496,6 @@ gif_ioctl(struct ifnet *ifp, u_long cmd,
 		}
 		break;
 
-	case SIOCGIFMTU:
-		break;
-
 	case SIOCSIFMTU:
 		if (ifr-ifr_mtu  GIF_MTU_MIN || ifr-ifr_mtu  GIF_MTU_MAX)
 			return EINVAL;



CVS commit: [netbsd-6] src/sys/compat/netbsd32

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:45:50 UTC 2013

Modified Files:
src/sys/compat/netbsd32 [netbsd-6]: netbsd32_execve.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #793):
sys/compat/netbsd32/netbsd32_execve.c: revision 1.37
netbsd32_posix_spawn_fa_alloc: use the right length for path allocation.
This error lead to memory pool corruption when freeing kmem with wrong size.


To generate a diff of this commit:
cvs rdiff -u -r1.33.2.1 -r1.33.2.2 src/sys/compat/netbsd32/netbsd32_execve.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/netbsd32/netbsd32_execve.c
diff -u src/sys/compat/netbsd32/netbsd32_execve.c:1.33.2.1 src/sys/compat/netbsd32/netbsd32_execve.c:1.33.2.2
--- src/sys/compat/netbsd32/netbsd32_execve.c:1.33.2.1	Thu Apr 12 17:05:38 2012
+++ src/sys/compat/netbsd32/netbsd32_execve.c	Fri Feb  8 20:45:50 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_execve.c,v 1.33.2.1 2012/04/12 17:05:38 riz Exp $	*/
+/*	$NetBSD: netbsd32_execve.c,v 1.33.2.2 2013/02/08 20:45:50 riz Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: netbsd32_execve.c,v 1.33.2.1 2012/04/12 17:05:38 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_execve.c,v 1.33.2.2 2013/02/08 20:45:50 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -141,7 +141,7 @@ netbsd32_posix_spawn_fa_alloc(struct pos
 		MAXPATHLEN, slen);
 		if (error)
 			goto out;
-		fae-fae_path = kmem_alloc(fal, KM_SLEEP);
+		fae-fae_path = kmem_alloc(slen, KM_SLEEP);
 		memcpy(fae-fae_path, pbuf, slen);
 		fae-fae_oflag = f32-fae_oflag;
 		fae-fae_mode = f32-fae_mode;



CVS commit: [netbsd-6-0] src/sys/compat/netbsd32

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:46:01 UTC 2013

Modified Files:
src/sys/compat/netbsd32 [netbsd-6-0]: netbsd32_execve.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #793):
sys/compat/netbsd32/netbsd32_execve.c: revision 1.37
netbsd32_posix_spawn_fa_alloc: use the right length for path allocation.
This error lead to memory pool corruption when freeing kmem with wrong size.


To generate a diff of this commit:
cvs rdiff -u -r1.33.2.1 -r1.33.2.1.4.1 \
src/sys/compat/netbsd32/netbsd32_execve.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/netbsd32/netbsd32_execve.c
diff -u src/sys/compat/netbsd32/netbsd32_execve.c:1.33.2.1 src/sys/compat/netbsd32/netbsd32_execve.c:1.33.2.1.4.1
--- src/sys/compat/netbsd32/netbsd32_execve.c:1.33.2.1	Thu Apr 12 17:05:38 2012
+++ src/sys/compat/netbsd32/netbsd32_execve.c	Fri Feb  8 20:46:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_execve.c,v 1.33.2.1 2012/04/12 17:05:38 riz Exp $	*/
+/*	$NetBSD: netbsd32_execve.c,v 1.33.2.1.4.1 2013/02/08 20:46:01 riz Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: netbsd32_execve.c,v 1.33.2.1 2012/04/12 17:05:38 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_execve.c,v 1.33.2.1.4.1 2013/02/08 20:46:01 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -141,7 +141,7 @@ netbsd32_posix_spawn_fa_alloc(struct pos
 		MAXPATHLEN, slen);
 		if (error)
 			goto out;
-		fae-fae_path = kmem_alloc(fal, KM_SLEEP);
+		fae-fae_path = kmem_alloc(slen, KM_SLEEP);
 		memcpy(fae-fae_path, pbuf, slen);
 		fae-fae_oflag = f32-fae_oflag;
 		fae-fae_mode = f32-fae_mode;



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:46:15 UTC 2013

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

Log Message:
TIcket 793.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/doc/CHANGES-6.0.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.0.2
diff -u src/doc/CHANGES-6.0.2:1.1.2.12 src/doc/CHANGES-6.0.2:1.1.2.13
--- src/doc/CHANGES-6.0.2:1.1.2.12	Fri Feb  8 20:30:54 2013
+++ src/doc/CHANGES-6.0.2	Fri Feb  8 20:46:14 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.2,v 1.1.2.12 2013/02/08 20:30:54 riz Exp $
+# $NetBSD: CHANGES-6.0.2,v 1.1.2.13 2013/02/08 20:46:14 riz Exp $
 
 A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2
 release:
@@ -86,3 +86,8 @@ lib/libutil/parsedate.y1.13
 	been treated as a time in UTC or some other time zone.
 	[apb, ticket #791]
 
+sys/compat/netbsd32/netbsd32_execve.c		1.37
+
+	Fix memory pool corruption when freeing kmem with wrong size.
+	[hannken, ticket #793]
+



CVS commit: [netbsd-6] src/sys/rump/librump/rumpkern

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:48:13 UTC 2013

Modified Files:
src/sys/rump/librump/rumpkern [netbsd-6]: emul.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #794):
sys/rump/librump/rumpkern/emul.c: revision 1.152
Provide xc_send_ipi() routine in RUMP, which is required for high-priority
xcall(9) mechanism.  It is emulated using low-priority xcall(9).


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.150.10.1 src/sys/rump/librump/rumpkern/emul.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/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.150 src/sys/rump/librump/rumpkern/emul.c:1.150.10.1
--- src/sys/rump/librump/rumpkern/emul.c:1.150	Mon Mar 21 16:41:08 2011
+++ src/sys/rump/librump/rumpkern/emul.c	Fri Feb  8 20:48:12 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.150 2011/03/21 16:41:08 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.150.10.1 2013/02/08 20:48:12 riz Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.150 2011/03/21 16:41:08 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.150.10.1 2013/02/08 20:48:12 riz Exp $);
 
 #include sys/param.h
 #include sys/null.h
@@ -284,9 +284,32 @@ syscall_intern(struct proc *p)
 void
 xc_send_ipi(struct cpu_info *ci)
 {
+	const struct cpu_info *curci = curcpu();
+	CPU_INFO_ITERATOR cii;
 
-	/* I'll think about the implementation if this is ever used */
-	panic(not implemented);
+	/*
+	 * IPI are considered asynchronous, therefore no need to wait for
+	 * unicast call delivery (nor the order of calls matters).  Our LWP
+	 * needs to be bound to the CPU, since xc_unicast(9) may block.
+	 *
+	 * WARNING: These must be low-priority calls, as this routine is
+	 * used to emulate high-priority (XC_HIGHPRI) mechanism.
+	 */
+
+	if (ci) {
+		KASSERT(curci != ci);
+		(void)xc_unicast(0, (xcfunc_t)xc_ipi_handler, NULL, NULL, ci);
+		return;
+	}
+
+	curlwp-l_pflag |= LP_BOUND;
+	for (CPU_INFO_FOREACH(cii, ci)) {
+		if (curci == ci) {
+			continue;
+		}
+		(void)xc_unicast(0, (xcfunc_t)xc_ipi_handler, NULL, NULL, ci);
+	}
+	curlwp-l_pflag = ~LP_BOUND;
 }
 
 int



CVS commit: [netbsd-6] src/usr.bin/grep

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:49:21 UTC 2013

Modified Files:
src/usr.bin/grep [netbsd-6]: util.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #795):
usr.bin/grep/util.c: revision 1.17
Fix memory leak in  file_matching().


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.6.1 src/usr.bin/grep/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/grep/util.c
diff -u src/usr.bin/grep/util.c:1.13 src/usr.bin/grep/util.c:1.13.6.1
--- src/usr.bin/grep/util.c:1.13	Mon Apr 18 23:22:42 2011
+++ src/usr.bin/grep/util.c	Fri Feb  8 20:49:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.13 2011/04/18 23:22:42 joerg Exp $	*/
+/*	$NetBSD: util.c,v 1.13.6.1 2013/02/08 20:49:21 riz Exp $	*/
 /*	$FreeBSD: head/usr.bin/grep/util.c 211496 2010-08-19 09:28:59Z des $	*/
 /*	$OpenBSD: util.c,v 1.39 2010/07/02 22:18:03 tedu Exp $	*/
 
@@ -34,7 +34,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: util.c,v 1.13 2011/04/18 23:22:42 joerg Exp $);
+__RCSID($NetBSD: util.c,v 1.13.6.1 2013/02/08 20:49:21 riz Exp $);
 
 #include sys/stat.h
 #include sys/types.h
@@ -74,9 +74,10 @@ file_matching(const char *fname)
 	for (i = 0; i  fpatterns; ++i) {
 		if (fnmatch(fpattern[i].pat, fname, 0) == 0 ||
 		fnmatch(fpattern[i].pat, fname_base, 0) == 0) {
-			if (fpattern[i].mode == EXCL_PAT)
+			if (fpattern[i].mode == EXCL_PAT) {
+free(fname_copy);
 return (false);
-			else
+			} else
 ret = true;
 		}
 	}



CVS commit: [netbsd-6] src/sys/rump/net/lib/libshmif

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:51:12 UTC 2013

Modified Files:
src/sys/rump/net/lib/libshmif [netbsd-6]: if_shmem.c

Log Message:
Pull up following revision(s) (requested by gdt in ticket #796):
sys/rump/net/lib/libshmif/if_shmem.c: revision 1.46
Pass up all multicast addresses, not just broadcast.  Among other
things, makes IPv6 work over this interface.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.44.4.1 src/sys/rump/net/lib/libshmif/if_shmem.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/rump/net/lib/libshmif/if_shmem.c
diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.44 src/sys/rump/net/lib/libshmif/if_shmem.c:1.44.4.1
--- src/sys/rump/net/lib/libshmif/if_shmem.c:1.44	Sat Nov 19 22:51:31 2011
+++ src/sys/rump/net/lib/libshmif/if_shmem.c	Fri Feb  8 20:51:12 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_shmem.c,v 1.44 2011/11/19 22:51:31 tls Exp $	*/
+/*	$NetBSD: if_shmem.c,v 1.44.4.1 2013/02/08 20:51:12 riz Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.44 2011/11/19 22:51:31 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.44.4.1 2013/02/08 20:51:12 riz Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -720,8 +720,7 @@ shmif_rcv(void *arg)
 		if (memcmp(eth-ether_dhost, CLLADDR(ifp-if_sadl),
 		ETHER_ADDR_LEN) == 0) {
 			passup = true;
-		} else if (memcmp(eth-ether_dhost, etherbroadcastaddr,
-		ETHER_ADDR_LEN) == 0) {
+		} else if (ETHER_IS_MULTICAST(eth-ether_dhost)) {
 			passup = true;
 		} else if (ifp-if_flags  IFF_PROMISC) {
 			m-m_flags |= M_PROMISC;



CVS commit: [netbsd-6] src/doc

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:51:55 UTC 2013

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

Log Message:
Tickets 792-796.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.79 -r1.1.2.80 src/doc/CHANGES-6.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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.79 src/doc/CHANGES-6.1:1.1.2.80
--- src/doc/CHANGES-6.1:1.1.2.79	Fri Feb  8 20:31:51 2013
+++ src/doc/CHANGES-6.1	Fri Feb  8 20:51:55 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.79 2013/02/08 20:31:51 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.80 2013/02/08 20:51:55 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8152,3 +8152,30 @@ lib/libutil/parsedate.y1.13
 	been treated as a time in UTC or some other time zone.
 	[apb, ticket #791]
 
+sys/net/if_gif.c1.81
+
+	Pass SIOCGITMTU through to ifioctl_common() so ifconfig(8)
+	will display the MTU on a gif(4). PR#47419.
+	[degroote, ticket #792]
+
+sys/compat/netbsd32/netbsd32_execve.c		1.37
+
+	Fix memory pool corruption when freeing kmem with wrong size.
+	[hannken, ticket #793]
+
+sys/rump/librump/rumpkern/emul.c		1.152
+
+	Provide xc_send_ipi() routine in RUMP.
+	[rmind, ticket #794]
+
+usr.bin/grep/util.c1.17
+
+	Fix memory leak in  file_matching().
+	[msaitoh, ticket #795]
+
+sys/rump/net/lib/libshmif/if_shmem.c		1.46
+
+	Pass up all multicast addresses, not just broadcast.  Among other
+	things, makes IPv6 work over this interface.
+	[gdt, ticket #796]
+



CVS commit: [netbsd-6] src/sys/arch/sparc64/sparc64

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:58:17 UTC 2013

Modified Files:
src/sys/arch/sparc64/sparc64 [netbsd-6]: locore.s mp_subr.S

Log Message:
Pull up following revision(s) (requested by martin in ticket #797):
sys/arch/sparc64/sparc64/locore.s: revision 1.347
sys/arch/sparc64/sparc64/mp_subr.S: revision 1.4
Fix sparc64_ipi_ccall by adding proper trap setup.
Fixes xcall(9) problems, as exposed by pserialize(9). Noticed by
J. Hannken-Illjes, cause pointed out by Takeshi Nakayama.


To generate a diff of this commit:
cvs rdiff -u -r1.338.8.3 -r1.338.8.4 src/sys/arch/sparc64/sparc64/locore.s
cvs rdiff -u -r1.3 -r1.3.8.1 src/sys/arch/sparc64/sparc64/mp_subr.S

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.338.8.3 src/sys/arch/sparc64/sparc64/locore.s:1.338.8.4
--- src/sys/arch/sparc64/sparc64/locore.s:1.338.8.3	Fri Nov 23 16:12:36 2012
+++ src/sys/arch/sparc64/sparc64/locore.s	Fri Feb  8 20:58:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.338.8.3 2012/11/23 16:12:36 riz Exp $	*/
+/*	$NetBSD: locore.s,v 1.338.8.4 2013/02/08 20:58:17 riz Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -6302,6 +6302,67 @@ ENTRY(OF_val2sym32)
 #endif /* _LP64 */
 #endif /* DDB */
 
+
+#if defined(MULTIPROCESSOR)
+/*
+ * IPI target function to setup a C compatible environment and call a MI function.
+ *
+ * On entry:
+ *	We are on one of the alternate set of globals
+ *	%g2 = function to call
+ *	%g3 = single argument to called function
+ */
+ENTRY(sparc64_ipi_ccall)
+#ifdef TRAPS_USE_IG
+	wrpr	%g0, PSTATE_KERN|PSTATE_IG, %pstate	! DEBUG
+#endif
+	TRAP_SETUP(-CC64FSZ-TF_SIZE)
+
+#ifdef DEBUG
+	rdpr	%tt, %o1	! debug
+	sth	%o1, [%sp + CC64FSZ + STKB + TF_TT]! debug
+#endif
+	mov	%g3, %o0			! save argument of function to call
+	mov	%g2, %o5			! save function pointer
+
+	wrpr	%g0, PSTATE_KERN, %pstate	! Get back to normal globals
+	stx	%g1, [%sp + CC64FSZ + STKB + TF_G + ( 1*8)]
+	mov	%g1, %o1			! code
+	rdpr	%tpc, %o2			! (pc)
+	stx	%g2, [%sp + CC64FSZ + STKB + TF_G + ( 2*8)]
+	rdpr	%tstate, %g1
+	stx	%g3, [%sp + CC64FSZ + STKB + TF_G + ( 3*8)]
+	rdpr	%tnpc, %o3
+	stx	%g4, [%sp + CC64FSZ + STKB + TF_G + ( 4*8)]
+	rd	%y, %o4
+	stx	%g5, [%sp + CC64FSZ + STKB + TF_G + ( 5*8)]
+	stx	%g6, [%sp + CC64FSZ + STKB + TF_G + ( 6*8)]
+	wrpr	%g0, 0, %tl			! return to tl=0
+	stx	%g7, [%sp + CC64FSZ + STKB + TF_G + ( 7*8)]
+
+	stx	%g1, [%sp + CC64FSZ + STKB + TF_TSTATE]
+	stx	%o2, [%sp + CC64FSZ + STKB + TF_PC]
+	stx	%o3, [%sp + CC64FSZ + STKB + TF_NPC]
+	st	%o4, [%sp + CC64FSZ + STKB + TF_Y]
+
+	rdpr	%pil, %g5
+	stb	%g5, [%sp + CC64FSZ + STKB + TF_PIL]
+	stb	%g5, [%sp + CC64FSZ + STKB + TF_OLDPIL]
+
+	!! In the EMBEDANY memory model %g4 points to the start of the data segment.
+	!! In our case we need to clear it before calling any C-code
+	clr	%g4
+	wr	%g0, ASI_NUCLEUS, %asi			! default kernel ASI
+
+	call %o5	! call function
+	 nop
+
+	ba,a	return_from_trap			! and return from IPI
+	 nop
+
+#endif
+
+
 	.data
 	_ALIGN
 #if NKSYMS || defined(DDB) || defined(LKM)

Index: src/sys/arch/sparc64/sparc64/mp_subr.S
diff -u src/sys/arch/sparc64/sparc64/mp_subr.S:1.3 src/sys/arch/sparc64/sparc64/mp_subr.S:1.3.8.1
--- src/sys/arch/sparc64/sparc64/mp_subr.S:1.3	Tue Jul 12 07:51:34 2011
+++ src/sys/arch/sparc64/sparc64/mp_subr.S	Fri Feb  8 20:58:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mp_subr.S,v 1.3 2011/07/12 07:51:34 mrg Exp $	*/
+/*	$NetBSD: mp_subr.S,v 1.3.8.1 2013/02/08 20:58:17 riz Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -410,22 +410,4 @@ ENTRY(sparc64_ipi_dcache_flush_page_us)
 	ba,a	ret_from_intr_vector
 	 nop
 
-/*
- * Setup a C compatible environment and call a MI function.
- *
- * On entry:
- *	%g2 = function to call
- *	%g3 = single argument to called function
- */
-ENTRY(sparc64_ipi_ccall)
-	save %sp, -CC64FSZ-16, %sp			! create a stack frame
-	stx %g2, [%fp + BIAS -16 + 0]			! save function pointer
-	stx %g3, [%fp + BIAS -16 + 8]			! and argument
-	wrpr%g0, PSTATE_KERN, %pstate		! switch globals
-	ldx [%fp + BIAS -16 + 0], %l0			! reload function
-	call %l0	! call function
-	 ldx [%fp + BIAS -16 + 8], %o0			! reload argument 
-	restore		! pop stack frame
-	ba,a	ret_from_intr_vector			! and return from IPI
-	 nop
 #endif



CVS commit: [netbsd-6] src/doc

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:59:07 UTC 2013

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

Log Message:
TIcket 797.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.80 -r1.1.2.81 src/doc/CHANGES-6.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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.80 src/doc/CHANGES-6.1:1.1.2.81
--- src/doc/CHANGES-6.1:1.1.2.80	Fri Feb  8 20:51:55 2013
+++ src/doc/CHANGES-6.1	Fri Feb  8 20:59:07 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.80 2013/02/08 20:51:55 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.81 2013/02/08 20:59:07 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8179,3 +8179,9 @@ sys/rump/net/lib/libshmif/if_shmem.c		1.
 	things, makes IPv6 work over this interface.
 	[gdt, ticket #796]
 
+sys/arch/sparc64/sparc64/locore.s		1.347
+sys/arch/sparc64/sparc64/mp_subr.S		1.4
+
+	Fix sparc64_ipi_ccall by adding proper trap setup.
+	[martin, ticket #797]
+



CVS commit: [netbsd-6] src/dist/nvi/common

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 22:34:10 UTC 2013

Modified Files:
src/dist/nvi/common [netbsd-6]: conv.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #798):
dist/nvi/common/conv.c: revision 1.7
It is ridiculous to truncate files on character conversions without
warning and a chance for recovery. This patch sets the handler to
copy the character, clear the error and proceed instead of bailing
out.
To replicate:
- unset LANG
- Create a file that has ~1000 lines. Put a single bad character
- '\344' in it, around 2/3rds of the file down. Save it.
- export LANG=en_US.UTF-8
- edit the file. Notice there is no error for input conversion,
  since nvi reads the file opportunistically.
- :w Boom, the file is truncated.
Alternatively, you can put that character in the first line of the file,
and watch the fireworks. If you like to restore the previous behavior
compile with -DERROR_ON_CONVERT
XXX: Pullup to 6, 5 etc.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.10.1 src/dist/nvi/common/conv.c

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

Modified files:

Index: src/dist/nvi/common/conv.c
diff -u src/dist/nvi/common/conv.c:1.6 src/dist/nvi/common/conv.c:1.6.10.1
--- src/dist/nvi/common/conv.c:1.6	Sun Jan 18 03:45:50 2009
+++ src/dist/nvi/common/conv.c	Fri Feb  8 22:34:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: conv.c,v 1.6 2009/01/18 03:45:50 lukem Exp $ */
+/*	$NetBSD: conv.c,v 1.6.10.1 2013/02/08 22:34:10 riz Exp $ */
 
 /*-
  * Copyright (c) 1993, 1994
@@ -62,6 +62,21 @@ raw2int(SCR *sp, const char * str, ssize
 return 0;
 }
 
+#ifndef ERROR_ON_CONVERT
+#define HANDLE_ICONV_ERROR(o, i, ol, il) do {\
+		*o++ = *i++;		\
+		ol--; il--;		\
+	} while (/*CONSTCOND*/0)
+#define HANDLE_MBR_ERROR(n, mbs, d, s) do {\
+		d = s;			\
+		MEMSET(mbs, 0, 1); 	\
+		n = 1; 			\
+	} while (/*CONSTCOND*/0)
+#else
+#define HANDLE_ICONV_ERROR goto err
+#define	HANDLE_MBR_ERROR goto err
+#endif
+
 #define CONV_BUFFER_SIZE512
 /* fill the buffer with codeset encoding of string pointed to by str
  * left has the number of bytes left in str and is adjusted
@@ -74,9 +89,9 @@ raw2int(SCR *sp, const char * str, ssize
 	char *bp = buffer;		\
 	outleft = CONV_BUFFER_SIZE;	\
 	errno = 0;			\
-	if (iconv(id, (const char **)str, left, bp, outleft) == (size_t)-1 \
-		/*  errno != E2BIG */)\
-	goto err;			\
+	if (iconv(id, (const char **)str, left, bp, outleft) 	\
+	== (size_t)-1 /*  errno != E2BIG */)			\
+		HANDLE_ICONV_ERROR(bp, str, outleft, left);		\
 	if ((len = CONV_BUFFER_SIZE - outleft) == 0) {			\
 	error = -left;		\
 	goto err;			\
@@ -120,7 +135,8 @@ default_char2int(SCR *sp, const char * s
 	n = mbrtowc((*tostr)+i, src+j, len-j, mbs);
 	/* NULL character converted */
 	if (n == (size_t)-2) error = -(len-j);
-	if (n == (size_t)-1 || n == (size_t)-2) goto err;
+	if (n == (size_t)-1 || n == (size_t)-2)
+	HANDLE_MBR_ERROR(n, mbs, (*tostr)[i], src[j]); 
 	if (n == 0) n = 1;
 	j += n;
 	if (++i = *blen) {
@@ -243,8 +259,8 @@ default_int2char(SCR *sp, const CHAR_T *
 	}				\
 	errno = 0;			\
 	if (iconv(id, bp, len, obp, outleft) == (size_t)-1 	\
-		errno != E2BIG)	\
-		goto err;		\
+		errno != E2BIG) 	\
+		HANDLE_ICONV_ERROR(obp, bp, outleft, len);		\
 	offset = cw-blen1 - outleft;			\
 	}			\
 } while (0)
@@ -268,7 +284,8 @@ default_int2char(SCR *sp, const CHAR_T *
 
 for (i = 0, j = 0; i  (size_t)len; ++i) {
 	n = wcrtomb(dst+j, str[i], mbs);
-	if (n == (size_t)-1) goto err;
+	if (n == (size_t)-1) 
+	   HANDLE_MBR_ERROR(n, mbs, dst[j], str[i]);
 	j += n;
 	if (buflen  j + MB_CUR_MAX) {
 	if (id != (iconv_t)-1) {



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/man

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  8 22:37:14 UTC 2013

Removed Files:
src/crypto/external/bsd/openssl/lib/libcrypto/man:
EVP_PKEY_verifyrecover.3

Log Message:
remove obsolete file


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto/man/EVP_PKEY_verifyrecover.3

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



CVS commit: [netbsd-6] src/sbin/ifconfig

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 22:41:29 UTC 2013

Modified Files:
src/sbin/ifconfig [netbsd-6]: af_inetany.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #799):
sbin/ifconfig/af_inetany.c: revision 1.16
PR/46579: Takahiro HAYASHI: ifconfig clone destroy should not print useless
diagnostic and exit with an error code. Get the interface name and flags
opportunistically to allow the code to return normally if it does not need
to do anything.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.6.1 src/sbin/ifconfig/af_inetany.c

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

Modified files:

Index: src/sbin/ifconfig/af_inetany.c
diff -u src/sbin/ifconfig/af_inetany.c:1.14 src/sbin/ifconfig/af_inetany.c:1.14.6.1
--- src/sbin/ifconfig/af_inetany.c:1.14	Tue May 24 11:38:56 2011
+++ src/sbin/ifconfig/af_inetany.c	Fri Feb  8 22:41:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: af_inetany.c,v 1.14 2011/05/24 11:38:56 joerg Exp $	*/
+/*	$NetBSD: af_inetany.c,v 1.14.6.1 2013/02/08 22:41:29 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 David Young.  All rights reserved.
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: af_inetany.c,v 1.14 2011/05/24 11:38:56 joerg Exp $);
+__RCSID($NetBSD: af_inetany.c,v 1.14.6.1 2013/02/08 22:41:29 riz Exp $);
 #endif /* not lint */
 
 #include sys/param.h 
@@ -80,7 +80,7 @@ commit_address(prop_dictionary_t env, pr
 	if ((s = getsock(af)) == -1)
 		err(EXIT_FAILURE, %s: getsock, __func__);
 
-	if ((ifname = getifinfo(env, oenv, flags)) == NULL)
+	if ((ifname = getifname(env)) == NULL)
 		return;
 
 	strlcpy(param-name[0].buf, ifname, param-name[0].buflen);
@@ -126,6 +126,9 @@ commit_address(prop_dictionary_t env, pr
 	/* TBD: read matching ifaddr from kernel, use the netmask as default
 	 * TBD: handle preference
 	 */
+	if (getifflags(env, oenv, flags) == -1)
+		err(EXIT_FAILURE, %s: getifflags, __func__);
+
 	switch (flags  (IFF_BROADCAST|IFF_POINTOPOINT)) {
 	case IFF_BROADCAST:
 		if (brd != NULL)



CVS commit: [netbsd-6] src/doc

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 22:42:54 UTC 2013

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

Log Message:
Tickets 798, 799


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.81 -r1.1.2.82 src/doc/CHANGES-6.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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.81 src/doc/CHANGES-6.1:1.1.2.82
--- src/doc/CHANGES-6.1:1.1.2.81	Fri Feb  8 20:59:07 2013
+++ src/doc/CHANGES-6.1	Fri Feb  8 22:42:54 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.81 2013/02/08 20:59:07 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.82 2013/02/08 22:42:54 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8185,3 +8185,15 @@ sys/arch/sparc64/sparc64/mp_subr.S		1.4
 	Fix sparc64_ipi_ccall by adding proper trap setup.
 	[martin, ticket #797]
 
+dist/nvi/common/conv.c1.7
+
+	Don't truncate files on character conversions without warning
+	and a chance for recovery.
+	[christos, ticket #798]
+
+sbin/ifconfig/af_inetany.c			1.16 via patch
+
+	ifconfig clone destroy should not print useless diagnostic
+	and exit with an error code. PR#46579.
+	[christos, ticket #799]
+



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 23:01:23 UTC 2013

Modified Files:
src/etc [netbsd-6-0]: MAKEDEV.tmpl

Log Message:
Pull up following revision(s) (requested by apb in ticket #801):
etc/MAKEDEV.tmpl: revision 1.161
The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.
This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


To generate a diff of this commit:
cvs rdiff -u -r1.151.2.6 -r1.151.2.6.2.1 src/etc/MAKEDEV.tmpl

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

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.151.2.6 src/etc/MAKEDEV.tmpl:1.151.2.6.2.1
--- src/etc/MAKEDEV.tmpl:1.151.2.6	Thu Sep 13 22:20:58 2012
+++ src/etc/MAKEDEV.tmpl	Fri Feb  8 23:01:22 2013
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.151.2.6 2012/09/13 22:20:58 riz Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.151.2.6.2.1 2013/02/08 23:01:22 riz Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -2290,7 +2290,7 @@ create_mfs_dev()
 
 	if $do_redirect; then
 		# Redirect stdout and stderr to console
-		mknod -m 600 -g 0 -u 0 temp_console c 0 0
+		mknod -m 600 -g 0 -u 0 temp_console c %CONSOLE_CMAJOR% 0
 		exec temp_console 21
 		rm temp_console
 	fi



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 23:01:40 UTC 2013

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

Log Message:
Ticket 801.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/doc/CHANGES-6.0.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.0.2
diff -u src/doc/CHANGES-6.0.2:1.1.2.13 src/doc/CHANGES-6.0.2:1.1.2.14
--- src/doc/CHANGES-6.0.2:1.1.2.13	Fri Feb  8 20:46:14 2013
+++ src/doc/CHANGES-6.0.2	Fri Feb  8 23:01:40 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.2,v 1.1.2.13 2013/02/08 20:46:14 riz Exp $
+# $NetBSD: CHANGES-6.0.2,v 1.1.2.14 2013/02/08 23:01:40 riz Exp $
 
 A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2
 release:
@@ -91,3 +91,8 @@ sys/compat/netbsd32/netbsd32_execve.c		1
 	Fix memory pool corruption when freeing kmem with wrong size.
 	[hannken, ticket #793]
 
+etc/MAKEDEV.tmpl1.161
+
+	The console major number is not always 0.
+	[apb, ticket #801]
+



CVS commit: [netbsd-6] src/etc

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 23:01:49 UTC 2013

Modified Files:
src/etc [netbsd-6]: MAKEDEV.tmpl

Log Message:
Pull up following revision(s) (requested by apb in ticket #801):
etc/MAKEDEV.tmpl: revision 1.161
The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.
This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


To generate a diff of this commit:
cvs rdiff -u -r1.151.2.7 -r1.151.2.8 src/etc/MAKEDEV.tmpl

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

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.151.2.7 src/etc/MAKEDEV.tmpl:1.151.2.8
--- src/etc/MAKEDEV.tmpl:1.151.2.7	Wed Oct 24 03:23:45 2012
+++ src/etc/MAKEDEV.tmpl	Fri Feb  8 23:01:49 2013
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.151.2.7 2012/10/24 03:23:45 riz Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.151.2.8 2013/02/08 23:01:49 riz Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -2296,7 +2296,7 @@ create_mfs_dev()
 
 	if $do_redirect; then
 		# Redirect stdout and stderr to console
-		mknod -m 600 -g 0 -u 0 temp_console c 0 0
+		mknod -m 600 -g 0 -u 0 temp_console c %CONSOLE_CMAJOR% 0
 		exec temp_console 21
 		rm temp_console
 	fi



CVS commit: [netbsd-6-0] src/sys/secmodel

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 23:04:01 UTC 2013

Modified Files:
src/sys/secmodel/extensions [netbsd-6-0]: secmodel_extensions.c
src/sys/secmodel/securelevel [netbsd-6-0]: secmodel_securelevel.c

Log Message:
Pull up following revision(s) (requested by jym in ticket #802):
sys/secmodel/securelevel/secmodel_securelevel.c: revision 1.29
sys/secmodel/extensions/secmodel_extensions.c: revision 1.4
Re-instate backwards compatible security.models.bsd44.{curtain,securelevel}.
They were mistakenly removed when curtain and securelevel moved to
secmodel_extensions(9).
Reported by tls@ on tech-security@.
XXX will ask for pull-up for -6.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.8.1 \
src/sys/secmodel/extensions/secmodel_extensions.c
cvs rdiff -u -r1.26 -r1.26.6.1 \
src/sys/secmodel/securelevel/secmodel_securelevel.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/secmodel/extensions/secmodel_extensions.c
diff -u src/sys/secmodel/extensions/secmodel_extensions.c:1.2 src/sys/secmodel/extensions/secmodel_extensions.c:1.2.8.1
--- src/sys/secmodel/extensions/secmodel_extensions.c:1.2	Sun Dec  4 21:04:51 2011
+++ src/sys/secmodel/extensions/secmodel_extensions.c	Fri Feb  8 23:04:01 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_extensions.c,v 1.2 2011/12/04 21:04:51 jym Exp $ */
+/* $NetBSD: secmodel_extensions.c,v 1.2.8.1 2013/02/08 23:04:01 riz Exp $ */
 /*-
  * Copyright (c) 2011 Elad Efrat e...@netbsd.org
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: secmodel_extensions.c,v 1.2 2011/12/04 21:04:51 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: secmodel_extensions.c,v 1.2.8.1 2013/02/08 23:04:01 riz Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -73,7 +73,7 @@ static int secmodel_extensions_network_c
 static void
 sysctl_security_extensions_setup(struct sysctllog **clog)
 {
-	const struct sysctlnode *rnode;
+	const struct sysctlnode *rnode, *rnode2;
 
 	sysctl_createv(clog, 0, NULL, rnode,
 		   CTLFLAG_PERMANENT,
@@ -87,6 +87,23 @@ sysctl_security_extensions_setup(struct 
 		   NULL, 0, NULL, 0,
 		   CTL_CREATE, CTL_EOL);
 
+	/* Compatibility: security.models.bsd44 */
+	rnode2 = rnode;
+	sysctl_createv(clog, 0, rnode2, rnode2,
+		   CTLFLAG_PERMANENT,
+		   CTLTYPE_NODE, bsd44, NULL,
+		   NULL, 0, NULL, 0,
+		   CTL_CREATE, CTL_EOL);
+
+/* Compatibility: security.models.bsd44.curtain */
+	sysctl_createv(clog, 0, rnode2, NULL,
+		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLTYPE_INT, curtain,
+		   SYSCTL_DESCR(Curtain information about objects to \
+		   		users not owning them.),
+		   sysctl_extensions_curtain_handler, 0, curtain, 0,
+		   CTL_CREATE, CTL_EOL);
+
 	sysctl_createv(clog, 0, rnode, rnode,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_NODE, extensions, NULL,

Index: src/sys/secmodel/securelevel/secmodel_securelevel.c
diff -u src/sys/secmodel/securelevel/secmodel_securelevel.c:1.26 src/sys/secmodel/securelevel/secmodel_securelevel.c:1.26.6.1
--- src/sys/secmodel/securelevel/secmodel_securelevel.c:1.26	Tue Jan 17 10:47:27 2012
+++ src/sys/secmodel/securelevel/secmodel_securelevel.c	Fri Feb  8 23:04:01 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_securelevel.c,v 1.26 2012/01/17 10:47:27 cegger Exp $ */
+/* $NetBSD: secmodel_securelevel.c,v 1.26.6.1 2013/02/08 23:04:01 riz Exp $ */
 /*-
  * Copyright (c) 2006 Elad Efrat e...@netbsd.org
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: secmodel_securelevel.c,v 1.26 2012/01/17 10:47:27 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: secmodel_securelevel.c,v 1.26.6.1 2013/02/08 23:04:01 riz Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_insecure.h
@@ -95,7 +95,7 @@ secmodel_securelevel_sysctl(SYSCTLFN_ARG
 void
 sysctl_security_securelevel_setup(struct sysctllog **clog)
 {
-	const struct sysctlnode *rnode;
+	const struct sysctlnode *rnode, *rnode2;
 
 	sysctl_createv(clog, 0, NULL, rnode,
 		   CTLFLAG_PERMANENT,
@@ -109,6 +109,22 @@ sysctl_security_securelevel_setup(struct
 		   NULL, 0, NULL, 0,
 		   CTL_CREATE, CTL_EOL);
 
+	/* Compatibility: security.models.bsd44 */
+	rnode2 = rnode;
+	sysctl_createv(clog, 0, rnode2, rnode2,
+		   CTLFLAG_PERMANENT,
+		   CTLTYPE_NODE, bsd44, NULL,
+		   NULL, 0, NULL, 0,
+		   CTL_CREATE, CTL_EOL);
+
+/* Compatibility: security.models.bsd44.securelevel */
+	sysctl_createv(clog, 0, rnode2, NULL,
+		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLTYPE_INT, securelevel,
+		   SYSCTL_DESCR(System security level),
+		   secmodel_securelevel_sysctl, 0, NULL, 0,
+		   CTL_CREATE, CTL_EOL);
+
 	sysctl_createv(clog, 0, rnode, rnode,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_NODE, securelevel, NULL,



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 23:04:14 UTC 2013

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

Log Message:
Ticket 802


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/doc/CHANGES-6.0.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.0.2
diff -u src/doc/CHANGES-6.0.2:1.1.2.14 src/doc/CHANGES-6.0.2:1.1.2.15
--- src/doc/CHANGES-6.0.2:1.1.2.14	Fri Feb  8 23:01:40 2013
+++ src/doc/CHANGES-6.0.2	Fri Feb  8 23:04:14 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.2,v 1.1.2.14 2013/02/08 23:01:40 riz Exp $
+# $NetBSD: CHANGES-6.0.2,v 1.1.2.15 2013/02/08 23:04:14 riz Exp $
 
 A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2
 release:
@@ -96,3 +96,10 @@ etc/MAKEDEV.tmpl1.161
 	The console major number is not always 0.
 	[apb, ticket #801]
 
+sys/secmodel/extensions/secmodel_extensions.c	1.4
+sys/secmodel/securelevel/secmodel_securelevel.c	1.29
+
+	Re-instate backwards compatible
+	security.models.bsd44.{curtain,securelevel}.
+	[jym, ticket #802]
+



CVS commit: [netbsd-6] src/sys/secmodel

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 23:04:26 UTC 2013

Modified Files:
src/sys/secmodel/extensions [netbsd-6]: secmodel_extensions.c
src/sys/secmodel/securelevel [netbsd-6]: secmodel_securelevel.c

Log Message:
Pull up following revision(s) (requested by jym in ticket #802):
sys/secmodel/securelevel/secmodel_securelevel.c: revision 1.29
sys/secmodel/extensions/secmodel_extensions.c: revision 1.4
Re-instate backwards compatible security.models.bsd44.{curtain,securelevel}.
They were mistakenly removed when curtain and securelevel moved to
secmodel_extensions(9).
Reported by tls@ on tech-security@.
XXX will ask for pull-up for -6.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.2.1 \
src/sys/secmodel/extensions/secmodel_extensions.c
cvs rdiff -u -r1.26 -r1.26.2.1 \
src/sys/secmodel/securelevel/secmodel_securelevel.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/secmodel/extensions/secmodel_extensions.c
diff -u src/sys/secmodel/extensions/secmodel_extensions.c:1.2 src/sys/secmodel/extensions/secmodel_extensions.c:1.2.2.1
--- src/sys/secmodel/extensions/secmodel_extensions.c:1.2	Sun Dec  4 21:04:51 2011
+++ src/sys/secmodel/extensions/secmodel_extensions.c	Fri Feb  8 23:04:26 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_extensions.c,v 1.2 2011/12/04 21:04:51 jym Exp $ */
+/* $NetBSD: secmodel_extensions.c,v 1.2.2.1 2013/02/08 23:04:26 riz Exp $ */
 /*-
  * Copyright (c) 2011 Elad Efrat e...@netbsd.org
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: secmodel_extensions.c,v 1.2 2011/12/04 21:04:51 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: secmodel_extensions.c,v 1.2.2.1 2013/02/08 23:04:26 riz Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -73,7 +73,7 @@ static int secmodel_extensions_network_c
 static void
 sysctl_security_extensions_setup(struct sysctllog **clog)
 {
-	const struct sysctlnode *rnode;
+	const struct sysctlnode *rnode, *rnode2;
 
 	sysctl_createv(clog, 0, NULL, rnode,
 		   CTLFLAG_PERMANENT,
@@ -87,6 +87,23 @@ sysctl_security_extensions_setup(struct 
 		   NULL, 0, NULL, 0,
 		   CTL_CREATE, CTL_EOL);
 
+	/* Compatibility: security.models.bsd44 */
+	rnode2 = rnode;
+	sysctl_createv(clog, 0, rnode2, rnode2,
+		   CTLFLAG_PERMANENT,
+		   CTLTYPE_NODE, bsd44, NULL,
+		   NULL, 0, NULL, 0,
+		   CTL_CREATE, CTL_EOL);
+
+/* Compatibility: security.models.bsd44.curtain */
+	sysctl_createv(clog, 0, rnode2, NULL,
+		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLTYPE_INT, curtain,
+		   SYSCTL_DESCR(Curtain information about objects to \
+		   		users not owning them.),
+		   sysctl_extensions_curtain_handler, 0, curtain, 0,
+		   CTL_CREATE, CTL_EOL);
+
 	sysctl_createv(clog, 0, rnode, rnode,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_NODE, extensions, NULL,

Index: src/sys/secmodel/securelevel/secmodel_securelevel.c
diff -u src/sys/secmodel/securelevel/secmodel_securelevel.c:1.26 src/sys/secmodel/securelevel/secmodel_securelevel.c:1.26.2.1
--- src/sys/secmodel/securelevel/secmodel_securelevel.c:1.26	Tue Jan 17 10:47:27 2012
+++ src/sys/secmodel/securelevel/secmodel_securelevel.c	Fri Feb  8 23:04:26 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_securelevel.c,v 1.26 2012/01/17 10:47:27 cegger Exp $ */
+/* $NetBSD: secmodel_securelevel.c,v 1.26.2.1 2013/02/08 23:04:26 riz Exp $ */
 /*-
  * Copyright (c) 2006 Elad Efrat e...@netbsd.org
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: secmodel_securelevel.c,v 1.26 2012/01/17 10:47:27 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: secmodel_securelevel.c,v 1.26.2.1 2013/02/08 23:04:26 riz Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_insecure.h
@@ -95,7 +95,7 @@ secmodel_securelevel_sysctl(SYSCTLFN_ARG
 void
 sysctl_security_securelevel_setup(struct sysctllog **clog)
 {
-	const struct sysctlnode *rnode;
+	const struct sysctlnode *rnode, *rnode2;
 
 	sysctl_createv(clog, 0, NULL, rnode,
 		   CTLFLAG_PERMANENT,
@@ -109,6 +109,22 @@ sysctl_security_securelevel_setup(struct
 		   NULL, 0, NULL, 0,
 		   CTL_CREATE, CTL_EOL);
 
+	/* Compatibility: security.models.bsd44 */
+	rnode2 = rnode;
+	sysctl_createv(clog, 0, rnode2, rnode2,
+		   CTLFLAG_PERMANENT,
+		   CTLTYPE_NODE, bsd44, NULL,
+		   NULL, 0, NULL, 0,
+		   CTL_CREATE, CTL_EOL);
+
+/* Compatibility: security.models.bsd44.securelevel */
+	sysctl_createv(clog, 0, rnode2, NULL,
+		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLTYPE_INT, securelevel,
+		   SYSCTL_DESCR(System security level),
+		   secmodel_securelevel_sysctl, 0, NULL, 0,
+		   CTL_CREATE, CTL_EOL);
+
 	sysctl_createv(clog, 0, rnode, rnode,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_NODE, securelevel, NULL,



CVS commit: [netbsd-6] src/doc

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 23:05:34 UTC 2013

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

Log Message:
Tickets 801, 802


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.82 -r1.1.2.83 src/doc/CHANGES-6.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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.82 src/doc/CHANGES-6.1:1.1.2.83
--- src/doc/CHANGES-6.1:1.1.2.82	Fri Feb  8 22:42:54 2013
+++ src/doc/CHANGES-6.1	Fri Feb  8 23:05:34 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.82 2013/02/08 22:42:54 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.83 2013/02/08 23:05:34 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8197,3 +8197,15 @@ sbin/ifconfig/af_inetany.c			1.16 via pa
 	and exit with an error code. PR#46579.
 	[christos, ticket #799]
 
+etc/MAKEDEV.tmpl1.161
+
+	The console major number is not always 0.
+	[apb, ticket #801]
+
+sys/secmodel/extensions/secmodel_extensions.c	1.4
+sys/secmodel/securelevel/secmodel_securelevel.c	1.29
+
+	Re-instate backwards compatible
+	security.models.bsd44.{curtain,securelevel}.
+	[jym, ticket #802]
+



CVS commit: src/sys/arch/arm/broadcom

2013-02-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb  8 23:21:35 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c

Log Message:
If _ARM32_NEED_BUS_DMA_BOUNCE is defined, only define one dma_range
for the coherent dma tag.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/broadcom/bcm53xx_board.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/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.9 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.10
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.9	Thu Jan 10 22:06:32 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Fri Feb  8 23:21:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.9 2013/01/10 22:06:32 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.10 2013/02/08 23:21:35 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.9 2013/01/10 22:06:32 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.10 2013/02/08 23:21:35 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -91,9 +91,11 @@ struct arm32_dma_range bcm53xx_coherent_
 		.dr_busbase = 0x8000,
 		.dr_len = 0x1000,
 		.dr_flags = _BUS_DMAMAP_COHERENT,
+#ifndef _ARM32_NEED_BUS_DMA_BOUNCE
 	}, [1] = {
 		.dr_sysbase = 0x9000,
 		.dr_busbase = 0x9000,
+#endif
 	},
 };
 
@@ -521,7 +523,13 @@ bcm53xx_bootstrap(vaddr_t iobase)
 void
 bcm53xx_dma_bootstrap(psize_t memsize)
 {
-	if (memsize  256*1024*1024) {
+	if (memsize  256*1024*1024) {
+		bcm53xx_dma_ranges[0].dr_len = memsize;
+		bcm53xx_coherent_dma_ranges[0].dr_len = memsize;
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
+		bcm53xx_dma_tag._nranges = 1;
+		bcm53xx_coherent_dma_tag._nranges = 1;
+	} else {
 		/*
 		 * By setting up two ranges, bus_dmamem_alloc will always
 		 * try to allocate from range 0 first resulting in allocations
@@ -529,11 +537,7 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		 */
 		bcm53xx_dma_ranges[1].dr_len = memsize - 0x1000;
 		bcm53xx_coherent_dma_ranges[1].dr_len = memsize - 0x1000;
-	} else {
-		bcm53xx_dma_ranges[0].dr_len = memsize;
-		bcm53xx_coherent_dma_ranges[0].dr_len = memsize;
-		bcm53xx_dma_tag._nranges = 1;
-		bcm53xx_coherent_dma_tag._nranges = 1;
+#endif
 	}
 	KASSERT(bcm53xx_dma_tag._ranges[0].dr_flags == 0);
 	KASSERT(bcm53xx_coherent_dma_tag._ranges[0].dr_flags == _BUS_DMAMAP_COHERENT);



CVS commit: src/sys/arch/arm/broadcom

2013-02-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb  8 23:24:02 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c

Log Message:
Properly deal with the non-coherent dma tag too.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/broadcom/bcm53xx_board.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/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.10 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.11
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.10	Fri Feb  8 23:21:35 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Fri Feb  8 23:24:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.10 2013/02/08 23:21:35 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.11 2013/02/08 23:24:02 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.10 2013/02/08 23:21:35 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.11 2013/02/08 23:24:02 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -526,9 +526,10 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 	if (memsize  256*1024*1024) {
 		bcm53xx_dma_ranges[0].dr_len = memsize;
 		bcm53xx_coherent_dma_ranges[0].dr_len = memsize;
-#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_dma_tag._nranges = 1;
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_coherent_dma_tag._nranges = 1;
+#endif
 	} else {
 		/*
 		 * By setting up two ranges, bus_dmamem_alloc will always
@@ -536,6 +537,7 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		 * below 256MB which for PCI and GMAC are coherent.
 		 */
 		bcm53xx_dma_ranges[1].dr_len = memsize - 0x1000;
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_coherent_dma_ranges[1].dr_len = memsize - 0x1000;
 #endif
 	}



CVS commit: src/sys/kern

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 00:31:22 UTC 2013

Modified Files:
src/sys/kern: init_main.c kern_runq.c subr_autoconf.c subr_blist.c
subr_disk.c subr_lockdebug.c subr_pool.c subr_vmem.c tty.c
vfs_vnode.c

Log Message:
printflike maintenance.


To generate a diff of this commit:
cvs rdiff -u -r1.445 -r1.446 src/sys/kern/init_main.c
cvs rdiff -u -r1.35 -r1.36 src/sys/kern/kern_runq.c
cvs rdiff -u -r1.225 -r1.226 src/sys/kern/subr_autoconf.c
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/subr_blist.c
cvs rdiff -u -r1.100 -r1.101 src/sys/kern/subr_disk.c
cvs rdiff -u -r1.46 -r1.47 src/sys/kern/subr_lockdebug.c
cvs rdiff -u -r1.198 -r1.199 src/sys/kern/subr_pool.c
cvs rdiff -u -r1.81 -r1.82 src/sys/kern/subr_vmem.c
cvs rdiff -u -r1.256 -r1.257 src/sys/kern/tty.c
cvs rdiff -u -r1.17 -r1.18 src/sys/kern/vfs_vnode.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/init_main.c
diff -u src/sys/kern/init_main.c:1.445 src/sys/kern/init_main.c:1.446
--- src/sys/kern/init_main.c:1.445	Sun Jul 29 14:05:48 2012
+++ src/sys/kern/init_main.c	Fri Feb  8 19:31:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.445 2012/07/29 18:05:48 mlelstv Exp $	*/
+/*	$NetBSD: init_main.c,v 1.446 2013/02/09 00:31:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.445 2012/07/29 18:05:48 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.446 2013/02/09 00:31:21 christos Exp $);
 
 #include opt_ddb.h
 #include opt_ipsec.h
@@ -1125,7 +1125,7 @@ banner(void)
 	static char notice[] =  Notice: this software is 
 	protected by copyright;
 	char pbuf[81];
-	void (*pr)(const char *, ...);
+	void (*pr)(const char *, ...) __printflike(1, 2);
 	int i;
 
 	if ((boothowto  AB_SILENT) != 0) {

Index: src/sys/kern/kern_runq.c
diff -u src/sys/kern/kern_runq.c:1.35 src/sys/kern/kern_runq.c:1.36
--- src/sys/kern/kern_runq.c:1.35	Wed Aug 29 22:25:35 2012
+++ src/sys/kern/kern_runq.c	Fri Feb  8 19:31:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_runq.c,v 1.35 2012/08/30 02:25:35 matt Exp $	*/
+/*	$NetBSD: kern_runq.c,v 1.36 2013/02/09 00:31:21 christos Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius rmind at NetBSD org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.35 2012/08/30 02:25:35 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.36 2013/02/09 00:31:21 christos Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -864,8 +864,7 @@ SYSCTL_SETUP(sysctl_sched_setup, sysctl
 #ifdef DDB
 
 void
-sched_print_runqueue(void (*pr)(const char *, ...)
-__attribute__((__format__(__printf__,1,2
+sched_print_runqueue(void (*pr)(const char *, ...))
 {
 	runqueue_t *ci_rq;
 	struct cpu_info *ci, *tci;

Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.225 src/sys/kern/subr_autoconf.c:1.226
--- src/sys/kern/subr_autoconf.c:1.225	Thu Jan 10 05:15:59 2013
+++ src/sys/kern/subr_autoconf.c	Fri Feb  8 19:31:21 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.225 2013/01/10 10:15:59 mlelstv Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.226 2013/02/09 00:31:21 christos Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.225 2013/01/10 10:15:59 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.226 2013/02/09 00:31:21 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_ddb.h
@@ -239,7 +239,8 @@ frob_cfdrivervec(struct cfdriver * const
 	cfdriver_fn drv_do, cfdriver_fn drv_undo,
 	const char *style, bool dopanic)
 {
-	void (*pr)(const char *, ...) = dopanic ? panic : printf;
+	void (*pr)(const char *, ...) __printflike(1, 2) =
+	dopanic ? panic : printf;
 	int i = 0, error = 0, e2;
 
 	for (i = 0; cfdriverv[i] != NULL; i++) {
@@ -270,7 +271,8 @@ frob_cfattachvec(const struct cfattachin
 	const char *style, bool dopanic)
 {
 	const struct cfattachinit *cfai = NULL;
-	void (*pr)(const char *, ...) = dopanic ? panic : printf;
+	void (*pr)(const char *, ...) __printflike(1, 2) =
+	dopanic ? panic : printf;
 	int j = 0, error = 0, e2;
 
 	for (cfai = cfattachv[0]; cfai-cfai_name != NULL; cfai++) {

Index: src/sys/kern/subr_blist.c
diff -u src/sys/kern/subr_blist.c:1.10 src/sys/kern/subr_blist.c:1.11
--- src/sys/kern/subr_blist.c:1.10	Sun Apr 24 14:46:22 2011
+++ src/sys/kern/subr_blist.c	Fri Feb  8 19:31:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_blist.c,v 1.10 2011/04/24 18:46:22 rmind Exp $	*/
+/*	$NetBSD: subr_blist.c,v 1.11 2013/02/09 00:31:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998 Matthew Dillon.  All Rights Reserved.
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_blist.c,v 1.10 2011/04/24 18:46:22 

CVS commit: src/sys/kern

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 00:32:12 UTC 2013

Modified Files:
src/sys/kern: vfs_wapbl.c

Log Message:
why didn't gcc find the formatting error?


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/kern/vfs_wapbl.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/vfs_wapbl.c
diff -u src/sys/kern/vfs_wapbl.c:1.54 src/sys/kern/vfs_wapbl.c:1.55
--- src/sys/kern/vfs_wapbl.c:1.54	Sat Dec  8 02:24:42 2012
+++ src/sys/kern/vfs_wapbl.c	Fri Feb  8 19:32:12 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_wapbl.c,v 1.54 2012/12/08 07:24:42 hannken Exp $	*/
+/*	$NetBSD: vfs_wapbl.c,v 1.55 2013/02/09 00:32:12 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #define WAPBL_INTERNAL
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.54 2012/12/08 07:24:42 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.55 2013/02/09 00:32:12 christos Exp $);
 
 #include sys/param.h
 #include sys/bitops.h
@@ -1819,7 +1819,7 @@ wapbl_print(struct wapbl *wl,
 LIST_FOREACH(wi, wih, wi_hash) {
 	if (wi-wi_ino == 0)
 		continue;
-	(*pr)( %PRId32/0%06PRIo32,,
+	(*pr)( %PRIu64/0%06PRIo32,,
 	wi-wi_ino, wi-wi_mode);
 	if ((++cnt % 4) == 0) {
 		(*pr)(\n\t);



CVS commit: src/usr.sbin/powerd

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 01:16:40 UTC 2013

Modified Files:
src/usr.sbin/powerd: powerd.c

Log Message:
CID/980002: missing va_end()


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/powerd/powerd.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/powerd/powerd.c
diff -u src/usr.sbin/powerd/powerd.c:1.17 src/usr.sbin/powerd/powerd.c:1.18
--- src/usr.sbin/powerd/powerd.c:1.17	Wed Mar 14 22:02:24 2012
+++ src/usr.sbin/powerd/powerd.c	Fri Feb  8 20:16:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: powerd.c,v 1.17 2012/03/15 02:02:24 joerg Exp $	*/
+/*	$NetBSD: powerd.c,v 1.18 2013/02/09 01:16:39 christos Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -371,4 +371,5 @@ powerd_log(int pri, const char *msg, ...
 			UNKNOWN : prioritynames[i].c_name);
 		vfprintf(stderr, msg, arglist);
 	}
+	va_end(arglist);
 }



CVS commit: src/sys/netbt

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 01:19:05 UTC 2013

Modified Files:
src/sys/netbt: l2cap_signal.c

Log Message:
CID/90001: missing va_end()


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/netbt/l2cap_signal.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/netbt/l2cap_signal.c
diff -u src/sys/netbt/l2cap_signal.c:1.15 src/sys/netbt/l2cap_signal.c:1.16
--- src/sys/netbt/l2cap_signal.c:1.15	Tue Nov 29 08:16:27 2011
+++ src/sys/netbt/l2cap_signal.c	Fri Feb  8 20:19:05 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: l2cap_signal.c,v 1.15 2011/11/29 13:16:27 plunky Exp $	*/
+/*	$NetBSD: l2cap_signal.c,v 1.16 2013/02/09 01:19:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: l2cap_signal.c,v 1.15 2011/11/29 13:16:27 plunky Exp $);
+__KERNEL_RCSID(0, $NetBSD: l2cap_signal.c,v 1.16 2013/02/09 01:19:05 christos Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -1078,6 +1078,7 @@ l2cap_send_command_rej(struct hci_link *
 
 	default:
 		UNKNOWN(reason);
+		va_end(ap);
 		return EINVAL;
 	}
 



CVS commit: src/sys/kern

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 01:20:08 UTC 2013

Modified Files:
src/sys/kern: kern_sysctl.c

Log Message:
CID/98: missing va_end()


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 src/sys/kern/kern_sysctl.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_sysctl.c
diff -u src/sys/kern/kern_sysctl.c:1.239 src/sys/kern/kern_sysctl.c:1.240
--- src/sys/kern/kern_sysctl.c:1.239	Sat Feb  2 09:02:09 2013
+++ src/sys/kern/kern_sysctl.c	Fri Feb  8 20:20:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sysctl.c,v 1.239 2013/02/02 14:02:09 matt Exp $	*/
+/*	$NetBSD: kern_sysctl.c,v 1.240 2013/02/09 01:20:08 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_sysctl.c,v 1.239 2013/02/02 14:02:09 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_sysctl.c,v 1.240 2013/02/09 01:20:08 christos Exp $);
 
 #include opt_defcorename.h
 #include ksyms.h
@@ -2170,8 +2170,10 @@ sysctl_destroyv(struct sysctlnode *rnode
 	namelen = 0;
 	ni = 0;
 	do {
-		if (ni == CTL_MAXNAME)
+		if (ni == CTL_MAXNAME) {
+			va_end(ap);
 			return (ENAMETOOLONG);
+		}
 		name[ni] = va_arg(ap, int);
 	} while (name[ni++] != CTL_EOL);
 	namelen = ni - 1;



CVS commit: src/sys/external/bsd/acpica/dist/compiler

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 01:22:28 UTC 2013

Modified Files:
src/sys/external/bsd/acpica/dist/compiler: aslutils.c

Log Message:
CVS/97: missing va_end()


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/acpica/dist/compiler/aslutils.c

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

Modified files:

Index: src/sys/external/bsd/acpica/dist/compiler/aslutils.c
diff -u src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.4 src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.5
--- src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.4	Tue Jun 28 05:04:29 2011
+++ src/sys/external/bsd/acpica/dist/compiler/aslutils.c	Fri Feb  8 20:22:28 2013
@@ -357,7 +357,6 @@ DbgPrint (
 va_list Args;
 
 
-va_start (Args, Fmt);
 
 if (!Gbl_DebugFlag)
 {
@@ -370,6 +369,7 @@ DbgPrint (
 return;
 }
 
+va_start (Args, Fmt);
 (void) vfprintf (stderr, Fmt, Args);
 va_end (Args);
 return;



CVS commit: src/sys/external/bsd/acpica/dist/compiler

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 01:46:30 UTC 2013

Modified Files:
src/sys/external/bsd/acpica/dist/compiler: asltree.c

Log Message:
CID/979998: missing va_end()


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/sys/external/bsd/acpica/dist/compiler/asltree.c

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

Modified files:

Index: src/sys/external/bsd/acpica/dist/compiler/asltree.c
diff -u src/sys/external/bsd/acpica/dist/compiler/asltree.c:1.1.1.2 src/sys/external/bsd/acpica/dist/compiler/asltree.c:1.2
--- src/sys/external/bsd/acpica/dist/compiler/asltree.c:1.1.1.2	Thu Feb 17 05:01:02 2011
+++ src/sys/external/bsd/acpica/dist/compiler/asltree.c	Fri Feb  8 20:46:30 2013
@@ -728,6 +728,7 @@ TrLinkChildren (
 {
 AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Child,
 Child node list invalid);
+	va_end(ap);
 return Op;
 }
 



CVS commit: src/sbin/fdisk

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 01:50:04 UTC 2013

Modified Files:
src/sbin/fdisk: fdisk.c

Log Message:
CID/979997: missing va_end()


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sbin/fdisk/fdisk.c

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

Modified files:

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.142 src/sbin/fdisk/fdisk.c:1.143
--- src/sbin/fdisk/fdisk.c:1.142	Tue Jun  5 09:41:23 2012
+++ src/sbin/fdisk/fdisk.c	Fri Feb  8 20:50:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.142 2012/06/05 13:41:23 tsutsui Exp $ */
+/*	$NetBSD: fdisk.c,v 1.143 2013/02/09 01:50:04 christos Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: fdisk.c,v 1.142 2012/06/05 13:41:23 tsutsui Exp $);
+__RCSID($NetBSD: fdisk.c,v 1.143 2013/02/09 01:50:04 christos Exp $);
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -2769,8 +2769,8 @@ yesno(const char *str, ...)
 	va_list ap;
 
 	va_start(ap, str);
-
 	vprintf(str, ap);
+	va_end(ap);
 	printf( [n] );
 
 	first = ch = getchar();



CVS commit: xsrc/external/mit/pixman/include

2013-02-08 Thread Jared D. McNeill
Module Name:xsrc
Committed By:   jmcneill
Date:   Sat Feb  9 02:36:39 UTC 2013

Modified Files:
xsrc/external/mit/pixman/include: config.h

Log Message:
pixman 0.28.2


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 xsrc/external/mit/pixman/include/config.h

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

Modified files:

Index: xsrc/external/mit/pixman/include/config.h
diff -u xsrc/external/mit/pixman/include/config.h:1.15 xsrc/external/mit/pixman/include/config.h:1.16
--- xsrc/external/mit/pixman/include/config.h:1.15	Wed Aug  3 06:07:51 2011
+++ xsrc/external/mit/pixman/include/config.h	Sat Feb  9 02:36:39 2013
@@ -131,7 +131,7 @@
 /* #undef USE_VMX */
 
 /* Version number of package */
-#define VERSION 0.23.2
+#define VERSION 0.28.2
 
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */



CVS commit: src/usr.bin/hexdump

2013-02-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Feb  9 02:49:36 UTC 2013

Modified Files:
src/usr.bin/hexdump: conv.c

Log Message:
dcl is not dc1.

Fixes PR#47547


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/hexdump/conv.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/hexdump/conv.c
diff -u src/usr.bin/hexdump/conv.c:1.13 src/usr.bin/hexdump/conv.c:1.14
--- src/usr.bin/hexdump/conv.c:1.13	Tue Feb  9 14:06:37 2010
+++ src/usr.bin/hexdump/conv.c	Sat Feb  9 02:49:36 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: conv.c,v 1.13 2010/02/09 14:06:37 drochner Exp $	*/
+/*	$NetBSD: conv.c,v 1.14 2013/02/09 02:49:36 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)conv.c	8.1 (Berkeley) 6/6/93;
 #else
-__RCSID($NetBSD: conv.c,v 1.13 2010/02/09 14:06:37 drochner Exp $);
+__RCSID($NetBSD: conv.c,v 1.14 2013/02/09 02:49:36 jakllsch Exp $);
 #endif
 #endif /* not lint */
 
@@ -105,7 +105,7 @@ conv_u(PR *pr, u_char *p)
 	static const char *list[] = {
 		nul, soh, stx, etx, eot, enq, ack, bel,
 		 bs,  ht,  lf,  vt,  ff,  cr,  so,  si,
-		dle, dcl, dc2, dc3, dc4, nak, syn, etb,
+		dle, dc1, dc2, dc3, dc4, nak, syn, etb,
 		can,  em, sub, esc,  fs,  gs,  rs,  us,
 	};
 



CVS commit: [netbsd-6] src/sys/rump/net/lib/libnpf

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Feb  9 04:13:28 UTC 2013

Modified Files:
src/sys/rump/net/lib/libnpf [netbsd-6]: Makefile

Log Message:
sys/kern/uipc_mbuf.c1.148
sys/net/npf/npf.h   1.25
sys/net/npf/npf_alg.c   1.6
sys/net/npf/npf_alg_icmp.c  1.14
sys/net/npf/npf_ext_log.c   1.2
sys/net/npf/npf_ext_normalise.c 1.2
sys/net/npf/npf_handler.c   1.24-1.25
sys/net/npf/npf_impl.h  1.25
sys/net/npf/npf_inet.c  1.19-1.20
sys/net/npf/npf_instr.c 1.15
sys/net/npf/npf_mbuf.c  1.9-1.10
sys/net/npf/npf_nat.c   1.18
sys/net/npf/npf_processor.c 1.13-1.14
sys/net/npf/npf_rproc.c 1.5
sys/net/npf/npf_ruleset.c   1.15-1.16
sys/net/npf/npf_sendpkt.c   1.13
sys/net/npf/npf_session.c   1.19-1.20
sys/net/npf/npf_state.c 1.13
sys/net/npf/npf_state_tcp.c 1.12
sys/rump/net/lib/libnpf/Makefile1.3
sys/sys/mbuf.h  1.151
usr.sbin/npf/npfctl/npfctl.c1.27
usr.sbin/npf/npftest/README 1.3
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c 1.4
usr.sbin/npf/npftest/libnpftest/npf_nat_test.c  1.2
usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c 1.3-1.4
usr.sbin/npf/npftest/libnpftest/npf_processor_test.c 1.4
usr.sbin/npf/npftest/libnpftest/npf_rule_test.c 1.3
usr.sbin/npf/npftest/libnpftest/npf_state_test.c 1.4

NPF: rework nbuf interface, simplify ICMP ALG, handle ICMP ECHO
for traceroute.  Misc. other fixes.
[rmind, ticket #777]

Update ticket #777 to fix build:

This component is not WARNS3 clean (example: it includes socketvar.h
which does signed-unsigned comparison in an inline function).  Why it
compiled at all is one of those marvels of compiler technology.


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.3 -r1.2.4.4 src/sys/rump/net/lib/libnpf/Makefile

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

Modified files:

Index: src/sys/rump/net/lib/libnpf/Makefile
diff -u src/sys/rump/net/lib/libnpf/Makefile:1.2.4.3 src/sys/rump/net/lib/libnpf/Makefile:1.2.4.4
--- src/sys/rump/net/lib/libnpf/Makefile:1.2.4.3	Sun Nov 18 22:38:38 2012
+++ src/sys/rump/net/lib/libnpf/Makefile	Sat Feb  9 04:13:28 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2.4.3 2012/11/18 22:38:38 riz Exp $
+#	$NetBSD: Makefile,v 1.2.4.4 2013/02/09 04:13:28 riz Exp $
 #
 # Public Domain.
 #
@@ -19,8 +19,6 @@ SRCS+=	npf_ext_log.c npf_ext_normalise.c
 
 SRCS+=	component.c
 
-WARNS=	5
-
 CPPFLAGS+=	-D_NPF_TESTING
 CPPFLAGS+=	-I${.CURDIR}/../../../librump/rumpvfs
 



CVS commit: [netbsd-6] src/doc

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Feb  9 04:13:51 UTC 2013

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

Log Message:
Update ticket 777 to fix build.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.83 -r1.1.2.84 src/doc/CHANGES-6.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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.83 src/doc/CHANGES-6.1:1.1.2.84
--- src/doc/CHANGES-6.1:1.1.2.83	Fri Feb  8 23:05:34 2013
+++ src/doc/CHANGES-6.1	Sat Feb  9 04:13:50 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.83 2013/02/08 23:05:34 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.84 2013/02/09 04:13:50 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8081,6 +8081,7 @@ sys/net/npf/npf_sendpkt.c			1.13
 sys/net/npf/npf_session.c			1.19-1.20
 sys/net/npf/npf_state.c1.13
 sys/net/npf/npf_state_tcp.c			1.12
+sys/rump/net/lib/libnpf/Makefile		1.3
 sys/sys/mbuf.h	1.151
 usr.sbin/npf/npfctl/npfctl.c			1.27
 usr.sbin/npf/npftest/README			1.3



CVS commit: src/sys/kern

2013-02-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb  8 09:30:02 UTC 2013

Modified Files:
src/sys/kern: subr_vmem.c

Log Message:
Fix release of vmem_btag_lock (don't release twice in error path)


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/kern/subr_vmem.c

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



CVS commit: src/usr.bin/find

2013-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb  8 12:50:51 UTC 2013

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

Log Message:
Add serial commas.
From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/usr.bin/find/find.1

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



CVS commit: src/sys/conf

2013-02-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Feb  8 15:00:27 UTC 2013

Modified Files:
src/sys/conf: majors

Log Message:
Add an MI major number for seeprom (char 206).


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/conf/majors

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



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

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  8 15:13:04 UTC 2013

Modified Files:
src/distrib/sets/lists/xdebug: md.amd64 md.cats md.evbarm
md.evbarm.armeb md.evbmips md.i386 md.macppc md.ofppc md.sgimips
md.shark md.sparc md.sparc64 md.vax shl.mi

Log Message:
add obsolete entries for yesterday's changes, sort


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/xdebug/md.amd64 \
src/distrib/sets/lists/xdebug/md.cats \
src/distrib/sets/lists/xdebug/md.evbarm \
src/distrib/sets/lists/xdebug/md.evbarm.armeb \
src/distrib/sets/lists/xdebug/md.evbmips \
src/distrib/sets/lists/xdebug/md.i386 \
src/distrib/sets/lists/xdebug/md.macppc \
src/distrib/sets/lists/xdebug/md.ofppc \
src/distrib/sets/lists/xdebug/md.sgimips \
src/distrib/sets/lists/xdebug/md.shark \
src/distrib/sets/lists/xdebug/md.sparc \
src/distrib/sets/lists/xdebug/md.sparc64 \
src/distrib/sets/lists/xdebug/md.vax src/distrib/sets/lists/xdebug/shl.mi

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



CVS commit: src/sys/dev/i2c

2013-02-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Feb  8 15:14:11 UTC 2013

Modified Files:
src/sys/dev/i2c: at24cxx.c

Log Message:
Handle direct configuration if ia-ia_name is set, using iic_compat_match().
If ia-ia_name is set, display the name on attach.
Display the size (if known) on attach.
Move the iic_acquire_bus() and iic_release_bus() calls inside the read and
write loops, to avoid holding the bus for the full duration of the read or
write.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/i2c/at24cxx.c

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



CVS commit: src/share/man/man4

2013-02-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Feb  8 15:18:44 UTC 2013

Modified Files:
src/share/man/man4: seeprom.4

Log Message:
Update the bugs, now that seeprom has a major assigned.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/seeprom.4

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



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

2013-02-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Feb  8 15:20:17 UTC 2013

Modified Files:
src/sys/arch/sparc64/conf: GENERIC

Log Message:
Add seeprom(4).  Tested on Blade 2000 and Fire 280R.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/arch/sparc64/conf/GENERIC

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  8 15:22:03 UTC 2013

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: Makefile

Log Message:
fix generation


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile

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



CVS commit: src/sys/dev/videomode

2013-02-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb  8 16:35:10 UTC 2013

Modified Files:
src/sys/dev/videomode: edid.c

Log Message:
aprint_verbose - aprint_debug


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/videomode/edid.c

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



CVS commit: src/distrib/utils/embedded

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  8 19:14:14 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
fix options


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/utils/embedded/mkimage

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



CVS commit: src/distrib/utils/embedded/conf

2013-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  8 19:16:53 UTC 2013

Modified Files:
src/distrib/utils/embedded/conf: rpi.conf

Log Message:
change to take the full kernel path


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/utils/embedded/conf/rpi.conf

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



CVS commit: [netbsd-6] src

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:18:13 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: uipc_mbuf.c
src/sys/net/npf [netbsd-6]: npf.h npf_alg.c npf_alg_icmp.c
npf_ext_log.c npf_ext_normalise.c npf_handler.c npf_impl.h
npf_inet.c npf_instr.c npf_mbuf.c npf_nat.c npf_processor.c
npf_rproc.c npf_ruleset.c npf_sendpkt.c npf_session.c npf_state.c
npf_state_tcp.c
src/sys/sys [netbsd-6]: mbuf.h
src/usr.sbin/npf/npfctl [netbsd-6]: npfctl.c
src/usr.sbin/npf/npftest [netbsd-6]: README
src/usr.sbin/npf/npftest/libnpftest [netbsd-6]: npf_mbuf_subr.c
npf_nat_test.c npf_nbuf_test.c npf_processor_test.c npf_rule_test.c
npf_state_test.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #777):
usr.sbin/npf/npfctl/npfctl.c: revision 1.27
sys/net/npf/npf_session.c: revision 1.19
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.4
sys/net/npf/npf_rproc.c: revision 1.5
usr.sbin/npf/npftest/README: revision 1.3
sys/sys/mbuf.h: revision 1.151
sys/net/npf/npf_ruleset.c: revision 1.15
usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c: revision 1.3
sys/net/npf/npf_ruleset.c: revision 1.16
usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.4
usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c: revision 1.4
sys/net/npf/npf_inet.c: revision 1.19
sys/net/npf/npf_instr.c: revision 1.15
sys/net/npf/npf_handler.c: revision 1.24
sys/net/npf/npf_handler.c: revision 1.25
sys/net/npf/npf_state_tcp.c: revision 1.12
sys/net/npf/npf_processor.c: revision 1.13
sys/net/npf/npf_impl.h: revision 1.25
sys/net/npf/npf_processor.c: revision 1.14
sys/net/npf/npf_mbuf.c: revision 1.10
sys/net/npf/npf_alg_icmp.c: revision 1.14
sys/net/npf/npf_mbuf.c: revision 1.9
usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.2
usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.3
sys/net/npf/npf_session.c: revision 1.20
sys/net/npf/npf_alg.c: revision 1.6
sys/kern/uipc_mbuf.c: revision 1.148
sys/net/npf/npf_inet.c: revision 1.20
sys/net/npf/npf.h: revision 1.25
sys/net/npf/npf_nat.c: revision 1.18
sys/net/npf/npf_state.c: revision 1.13
sys/net/npf/npf_sendpkt.c: revision 1.13
sys/net/npf/npf_ext_log.c: revision 1.2
usr.sbin/npf/npftest/libnpftest/npf_processor_test.c: revision 1.4
sys/net/npf/npf_ext_normalise.c: revision 1.2
- Rework NPF's nbuf interface: use advancing and ensuring as a main method.
  Eliminate unnecessary copy and simplify.  Adapt regression tests.
- Simplify ICMP ALG a little.  While here, handle ICMP ECHO for traceroute.
- Minor fixes, misc cleanup.
Silence gcc in npf_recache().
Add m_ensure_contig() routine, which is equivalent to m_pullup, but does not
destroy the mbuf chain on failure (it is kept valid).
- nbuf_ensure_contig: rework to use m_ensure_contig(9), which will not free
  the mbuf chain on failure.  Fixes some corner cases.  Improve regression
  test and sprinkle some asserts.
- npf_reassembly: clear nbuf on IPv6 reassembly failure path (partial fix).
  The problem was found and fix provided by Anthony Mallet.


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.145.2.1 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.14.2.10 -r1.14.2.11 src/sys/net/npf/npf.h
cvs rdiff -u -r1.2.16.3 -r1.2.16.4 src/sys/net/npf/npf_alg.c
cvs rdiff -u -r1.8.4.5 -r1.8.4.6 src/sys/net/npf/npf_alg_icmp.c
cvs rdiff -u -r1.1.4.2 -r1.1.4.3 src/sys/net/npf/npf_ext_log.c \
src/sys/net/npf/npf_ext_normalise.c
cvs rdiff -u -r1.13.2.7 -r1.13.2.8 src/sys/net/npf/npf_handler.c
cvs rdiff -u -r1.10.2.11 -r1.10.2.12 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.10.4.7 -r1.10.4.8 src/sys/net/npf/npf_inet.c \
src/sys/net/npf/npf_session.c
cvs rdiff -u -r1.9.2.5 -r1.9.2.6 src/sys/net/npf/npf_instr.c
cvs rdiff -u -r1.6.14.2 -r1.6.14.3 src/sys/net/npf/npf_mbuf.c
cvs rdiff -u -r1.10.2.6 -r1.10.2.7 src/sys/net/npf/npf_nat.c
cvs rdiff -u -r1.9.2.3 -r1.9.2.4 src/sys/net/npf/npf_processor.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/net/npf/npf_rproc.c
cvs rdiff -u -r1.10.2.4 -r1.10.2.5 src/sys/net/npf/npf_ruleset.c
cvs rdiff -u -r1.8.4.4 -r1.8.4.5 src/sys/net/npf/npf_sendpkt.c
cvs rdiff -u -r1.6.4.6 -r1.6.4.7 src/sys/net/npf/npf_state.c
cvs rdiff -u -r1.3.2.6 -r1.3.2.7 src/sys/net/npf/npf_state_tcp.c
cvs rdiff -u -r1.148 -r1.148.4.1 src/sys/sys/mbuf.h
cvs rdiff -u -r1.10.2.12 -r1.10.2.13 src/usr.sbin/npf/npfctl/npfctl.c
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/usr.sbin/npf/npftest/README
cvs rdiff -u -r1.2.2.3 -r1.2.2.4 \
src/usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 \
src/usr.sbin/npf/npftest/libnpftest/npf_nat_test.c
cvs rdiff -u -r1.1.4.3 

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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:31:19 UTC 2013

Modified Files:
src/sys/kern [netbsd-6-0]: kern_softint.c subr_pserialize.c
src/sys/rump/include/machine [netbsd-6-0]: intr.h

Log Message:
Pull up following revision(s) (requested by rmind in ticket #782):
sys/rump/include/machine/intr.h: revision 1.19
sys/kern/subr_pserialize.c: revision 1.6
sys/kern/kern_softint.c: revision 1.39
- softint_dispatch: perform pserialize(9) switchpoint when softintr processing
  finishes (without blocking).  Problem reported by hannken@, thanks!
- pserialize_read_enter: use splsoftserial(), not splsoftclock().
- pserialize_perform: add xcall(9) barrier as interrupts may be coalesced.
Provide splsoftserial.
GRRR RUMP


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.38.14.1 src/sys/kern/kern_softint.c
cvs rdiff -u -r1.5 -r1.5.8.1 src/sys/kern/subr_pserialize.c
cvs rdiff -u -r1.18 -r1.18.16.1 src/sys/rump/include/machine/intr.h

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



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:32:01 UTC 2013

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

Log Message:
ticket 782.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-6.0.2

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



CVS commit: [netbsd-6] src/sys

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:32:08 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: kern_softint.c subr_pserialize.c
src/sys/rump/include/machine [netbsd-6]: intr.h

Log Message:
Pull up following revision(s) (requested by rmind in ticket #782):
sys/rump/include/machine/intr.h: revision 1.19
sys/kern/subr_pserialize.c: revision 1.6
sys/kern/kern_softint.c: revision 1.39
- softint_dispatch: perform pserialize(9) switchpoint when softintr processing
  finishes (without blocking).  Problem reported by hannken@, thanks!
- pserialize_read_enter: use splsoftserial(), not splsoftclock().
- pserialize_perform: add xcall(9) barrier as interrupts may be coalesced.
Provide splsoftserial.
GRRR RUMP


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.38.8.1 src/sys/kern/kern_softint.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/kern/subr_pserialize.c
cvs rdiff -u -r1.18 -r1.18.10.1 src/sys/rump/include/machine/intr.h

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



CVS commit: [netbsd-6] src/sys/dev/pci

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:35:24 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: if_vr.c

Log Message:
Pull up following revision(s) (requested by taca in ticket #783):
sys/dev/pci/if_vr.c: revision 1.112
- reset the chip if the tx engine gets stuck after a link state change,
  from OpenBSD
- no need to do a full reset of the chip when enabling or disabling
  promiscuous mode


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.110.2.1 src/sys/dev/pci/if_vr.c

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



CVS commit: [netbsd-6] src/sys/dev/pci

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:37:37 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: if_wpi.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #784):
sys/dev/pci/if_wpi.c: revision 1.54
Rework firmware reference counting and error messages in wpi(4).
. Clarify the shared firmware abstraction in wpi_cached_firmware
  and its new sibling wpi_release_firmware.
. Fix typo in wpa_cache_firmware error branch leading to free NULL.
. Fix leak in wpi_load_firmware error branch.
. Sprinkle some kasserts to executably document invariants.
. A little KNF here and there.
Based on a patch from dh in PR kern/44144.


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.3 -r1.50.2.4 src/sys/dev/pci/if_wpi.c

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



CVS commit: [netbsd-6] src/sys/arch

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:43:02 UTC 2013

Modified Files:
src/sys/arch/arm/include/arm32 [netbsd-6]: pte.h
src/sys/arch/evbarm/marvell [netbsd-6]: marvell_machdep.c

Log Message:
sys/arch/arm/include/arm32/pte.h1.11
sys/arch/evbarm/marvell/marvell_machdep.c   1.19 via patch

Switch to ARM_VECTORS_HIGH for Sheeva CPU.
[msaitoh, ticket #785]


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.10.1 src/sys/arch/arm/include/arm32/pte.h
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 \
src/sys/arch/evbarm/marvell/marvell_machdep.c

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



CVS commit: [netbsd-6] src/usr.sbin/makemandb

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:45:44 UTC 2013

Modified Files:
src/usr.sbin/makemandb [netbsd-6]: makemandb.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #786):
usr.sbin/makemandb/makemandb.c: revision 1.16
If you cannot parse .SH NAME, like in the case of the ksh93 man page
where the .SH is followed by a conditional:
.SH NAME
.if \nZ=0 \{text text text
.\}
at least don't core-dump.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.6 -r1.2.2.7 src/usr.sbin/makemandb/makemandb.c

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



CVS commit: [netbsd-6] src/doc

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:47:41 UTC 2013

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

Log Message:
Tickets 777,782-786.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.77 -r1.1.2.78 src/doc/CHANGES-6.1

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



CVS commit: [netbsd-6] src/sys/dist/ipf/netinet

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:54:46 UTC 2013

Modified Files:
src/sys/dist/ipf/netinet [netbsd-6]: ip_fil_netbsd.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #787):
sys/dist/ipf/netinet/ip_fil_netbsd.c: revision 1.4
Fix off-by-one read error.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.61.2.1 src/sys/dist/ipf/netinet/ip_fil_netbsd.c

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



CVS commit: [netbsd-6-0] src/sys/dist/ipf/netinet

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:55:11 UTC 2013

Modified Files:
src/sys/dist/ipf/netinet [netbsd-6-0]: ip_fil_netbsd.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #787):
sys/dist/ipf/netinet/ip_fil_netbsd.c: revision 1.4
Fix off-by-one read error.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.61.6.1 src/sys/dist/ipf/netinet/ip_fil_netbsd.c

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



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:55:25 UTC 2013

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

Log Message:
Ticket 787.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-6.0.2

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



CVS commit: [netbsd-6] src/sys/arch/arm/arm32

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 19:57:19 UTC 2013

Modified Files:
src/sys/arch/arm/arm32 [netbsd-6]: cpu.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #788):
sys/arch/arm/arm32/cpu.c: revision 1.89
S/,/;/


To generate a diff of this commit:
cvs rdiff -u -r1.78.10.1 -r1.78.10.2 src/sys/arch/arm/arm32/cpu.c

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



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:22:03 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_vmem.c

Log Message:
Pull up following revision(s) (requested by para in ticket #789):
sys/kern/subr_vmem.c: revision 1.81
sys/kern/subr_vmem.c: revision 1.77
fix a lock order reversal during global boundary tag refill.
thanks to chuq@
xxx: request pullup
Fix release of vmem_btag_lock (don't release twice in error path)


To generate a diff of this commit:
cvs rdiff -u -r1.72.2.1 -r1.72.2.2 src/sys/kern/subr_vmem.c

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



CVS commit: [netbsd-6-0] src/sys/kern

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:22:19 UTC 2013

Modified Files:
src/sys/kern [netbsd-6-0]: subr_vmem.c

Log Message:
Pull up following revision(s) (requested by para in ticket #789):
sys/kern/subr_vmem.c: revision 1.81
sys/kern/subr_vmem.c: revision 1.77
fix a lock order reversal during global boundary tag refill.
thanks to chuq@
xxx: request pullup
Fix release of vmem_btag_lock (don't release twice in error path)


To generate a diff of this commit:
cvs rdiff -u -r1.72.2.1 -r1.72.2.1.4.1 src/sys/kern/subr_vmem.c

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



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:22:44 UTC 2013

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

Log Message:
Ticket #789.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-6.0.2

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



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:28:07 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: kern_rndq.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #790):
sys/kern/kern_rndq.c: revision 1.7
  Set resource limit. The rnd_process_events() function is called every tick
and process the sample queue. Without limitation, if a lot of rnd_add_*()
are called, all kernel memory may be eaten up.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/kern/kern_rndq.c

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



CVS commit: [netbsd-6-0] src/sys/kern

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:28:22 UTC 2013

Modified Files:
src/sys/kern [netbsd-6-0]: kern_rndq.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #790):
sys/kern/kern_rndq.c: revision 1.7
  Set resource limit. The rnd_process_events() function is called every tick
and process the sample queue. Without limitation, if a lot of rnd_add_*()
are called, all kernel memory may be eaten up.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.2.4.1 src/sys/kern/kern_rndq.c

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



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

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:28:36 UTC 2013

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

Log Message:
Ticket 790./


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/doc/CHANGES-6.0.2

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



  1   2   >