CVS commit: src/lib/libc/sys

2012-01-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jan 25 09:18:53 UTC 2012

Modified Files:
src/lib/libc/sys: socket.2

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libc/sys/socket.2

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

Modified files:

Index: src/lib/libc/sys/socket.2
diff -u src/lib/libc/sys/socket.2:1.38 src/lib/libc/sys/socket.2:1.39
--- src/lib/libc/sys/socket.2:1.38	Wed Jan 25 00:28:35 2012
+++ src/lib/libc/sys/socket.2	Wed Jan 25 09:18:52 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: socket.2,v 1.38 2012/01/25 00:28:35 christos Exp $
+.\	$NetBSD: socket.2,v 1.39 2012/01/25 09:18:52 wiz Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)socket.2	8.1 (Berkeley) 6/4/93
 .\
-.Dd September 6, 2007
+.Dd January 23, 2012
 .Dt SOCKET 2
 .Os
 .Sh NAME



CVS commit: src/share/man/man4

2012-01-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jan 25 09:21:29 UTC 2012

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

Log Message:
Fix Dd argument.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/chipsfb.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/chipsfb.4
diff -u src/share/man/man4/chipsfb.4:1.4 src/share/man/man4/chipsfb.4:1.5
--- src/share/man/man4/chipsfb.4:1.4	Wed Jan 25 04:18:31 2012
+++ src/share/man/man4/chipsfb.4	Wed Jan 25 09:21:29 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: chipsfb.4,v 1.4 2012/01/25 04:18:31 macallan Exp $
+.\	$NetBSD: chipsfb.4,v 1.5 2012/01/25 09:21:29 wiz Exp $
 .\
 .\ Copyright (c) 2007 Michael Lorenz
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd January 24 2012
+.Dd January 24, 2012
 .Dt CHIPSFB 4
 .Os
 .Sh NAME



CVS commit: src/doc

2012-01-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jan 25 09:36:14 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
gdb-7.4 out.


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.898 src/doc/3RDPARTY:1.899
--- src/doc/3RDPARTY:1.898	Tue Jan 24 09:57:40 2012
+++ src/doc/3RDPARTY	Wed Jan 25 09:36:13 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.898 2012/01/24 09:57:40 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.899 2012/01/25 09:36:13 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -358,7 +358,7 @@ for GCC 4.5:
 
 Package:	gdb
 Version:	6.5/7.3.1
-Current Vers:	7.3.1
+Current Vers:	7.4
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/gdb/
 Home Page:	http://www.gnu.org/software/gdb/



CVS commit: src/lib/csu/arm_elf

2012-01-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Jan 25 13:29:58 UTC 2012

Modified Files:
src/lib/csu/arm_elf: crt0.c

Log Message:
After christos@ latest re-structuring of includes and defines in
the various param.h files, STACKALIGNBYTES is now called STACK_ALIGNBYTES,
so adapt accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/csu/arm_elf/crt0.c

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

Modified files:

Index: src/lib/csu/arm_elf/crt0.c
diff -u src/lib/csu/arm_elf/crt0.c:1.9 src/lib/csu/arm_elf/crt0.c:1.10
--- src/lib/csu/arm_elf/crt0.c:1.9	Mon Mar  7 05:09:09 2011
+++ src/lib/csu/arm_elf/crt0.c	Wed Jan 25 13:29:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: crt0.c,v 1.9 2011/03/07 05:09:09 joerg Exp $	*/
+/*	$NetBSD: crt0.c,v 1.10 2012/01/25 13:29:58 he Exp $	*/
 
 /*
  * Copyright (C) 1997 Mark Brinicombe
@@ -60,7 +60,7 @@ __asm(	.text			\n
 	add	r2, r2, #0x0004		\n
 \n
 	/* Ensure the stack is properly aligned before calling C code. */\n
-	bic	sp, sp, # ___STRING(STACKALIGNBYTES) 	\n
+	bic	sp, sp, # ___STRING(STACK_ALIGNBYTES) \n
 	sub	sp, sp, #8	\n
 	str	r5, [sp, #4]	\n
 	str	r4, [sp, #0]	\n
@@ -68,7 +68,7 @@ __asm(	.text			\n
 	b	 ___STRING(_C_LABEL(___start))  );
 
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: crt0.c,v 1.9 2011/03/07 05:09:09 joerg Exp $);
+__RCSID($NetBSD: crt0.c,v 1.10 2012/01/25 13:29:58 he Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 void



CVS commit: src/sys/kern

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 14:04:09 UTC 2012

Modified Files:
src/sys/kern: sys_descrip.c uipc_syscalls.c

Log Message:
Add locking, requested by yamt. Note that locking is not used everywhere
for these.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/sys_descrip.c
cvs rdiff -u -r1.151 -r1.152 src/sys/kern/uipc_syscalls.c

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

Modified files:

Index: src/sys/kern/sys_descrip.c
diff -u src/sys/kern/sys_descrip.c:1.24 src/sys/kern/sys_descrip.c:1.25
--- src/sys/kern/sys_descrip.c:1.24	Tue Jan 24 19:28:36 2012
+++ src/sys/kern/sys_descrip.c	Wed Jan 25 09:04:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_descrip.c,v 1.24 2012/01/25 00:28:36 christos Exp $	*/
+/*	$NetBSD: sys_descrip.c,v 1.25 2012/01/25 14:04:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_descrip.c,v 1.24 2012/01/25 00:28:36 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_descrip.c,v 1.25 2012/01/25 14:04:09 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -409,9 +409,9 @@ sys_fcntl(struct lwp *l, const struct sy
 
 	case F_SETNOSIGPIPE:
 		if (SCARG(uap, arg))
-			fp-f_flag |= FNOSIGPIPE;
+			atomic_or_uint(fp-f_flag, FNOSIGPIPE);
 		else
-			fp-f_flag = ~FNOSIGPIPE;
+			atomic_and_uint(fp-f_flag, ~FNOSIGPIPE);
 		*retval = 0;
 		break;
 

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.151 src/sys/kern/uipc_syscalls.c:1.152
--- src/sys/kern/uipc_syscalls.c:1.151	Tue Jan 24 19:28:36 2012
+++ src/sys/kern/uipc_syscalls.c	Wed Jan 25 09:04:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.151 2012/01/25 00:28:36 christos Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.152 2012/01/25 14:04:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.151 2012/01/25 00:28:36 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.152 2012/01/25 14:04:09 christos Exp $);
 
 #include opt_pipe.h
 
@@ -974,9 +974,9 @@ sys_setsockopt(struct lwp *l, const stru
 
 	error = sosetopt(so, sopt);
 	if (so-so_options  SO_NOSIGPIPE)
-		fp-f_flag |= FNOSIGPIPE;
+		atomic_or_uint(fp-f_flag, FNOSIGPIPE);
 	else
-		fp-f_flag = ~FNOSIGPIPE;
+		atomic_and_uint(fp-f_flag, ~FNOSIGPIPE);
 
  out:
 	sockopt_destroy(sopt);
@@ -1014,9 +1014,9 @@ sys_getsockopt(struct lwp *l, const stru
 	sockopt_init(sopt, SCARG(uap, level), SCARG(uap, name), 0);
 
 	if (fp-f_flag  FNOSIGPIPE)
-		so-so_options |= SO_NOSIGPIPE;
+		atomic_or_uint(so-so_options, SO_NOSIGPIPE);
 	else
-		so-so_options = ~SO_NOSIGPIPE;
+		atomic_and_uint(so-so_options, ~SO_NOSIGPIPE);
 	error = sogetopt(so, sopt);
 	if (error)
 		goto out;



CVS commit: src/sys/compat/netbsd32

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 14:06:07 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32_fs.c

Log Message:
Add FNOSIGPIPE for compat32; noted by yamt.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/netbsd32/netbsd32_fs.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_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.61 src/sys/compat/netbsd32/netbsd32_fs.c:1.62
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.61	Sun Jun  5 04:42:59 2011
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Wed Jan 25 09:06:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.61 2011/06/05 08:42:59 dsl Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.62 2012/01/25 14:06:07 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_fs.c,v 1.61 2011/06/05 08:42:59 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_fs.c,v 1.62 2012/01/25 14:06:07 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -296,7 +296,7 @@ dofilewritev32(int fd, struct file *fp, 
 		if (auio.uio_resid != cnt  (error == ERESTART ||
 		error == EINTR || error == EWOULDBLOCK))
 			error = 0;
-		if (error == EPIPE) {
+		if (error == EPIPE  (fp-f_flag  FNOSIGPIPE) == 0) {
 			mutex_enter(proc_lock);
 			psignal(curproc, SIGPIPE);
 			mutex_exit(proc_lock);



CVS commit: src/external/bsd/dhcpcd/dist

2012-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 14:33:05 UTC 2012

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv26145

Log Message:
Import dhcpcd-5.5.0 with the following changes:

* Shell portability fixes, including proper printf usage.
* Detect a valid ntp.conf before adjusting it
* reboot timeout changed to 5 seconds
* When rebooting and not daemonized, reduce the discover timeout
  to allow for fallback or IPv4LL
* Respect each kernel carrier message
* Optimize some bitwise logic
* Don't remove interfaces for which commands have not been sent
* Store the assigned metric to each route so that we can change metrics on the 
fly
  dhcpcd -n --metric 100 iwi0
* Add SixRD support, RFC5969
* Fix SIP server support
* Only regen resolv.conf if it has changed
* Fix --reconfigure from spinning
* Add IPv6 Router Solicitation support we regards to RDNSS and DNSSL, RFC6016


Status:

Vendor Tag: roy
Release Tags:   dhcpcd-5-5-0

U src/external/bsd/dhcpcd/dist/arp.c
U src/external/bsd/dhcpcd/dist/bind.c
U src/external/bsd/dhcpcd/dist/common.c
U src/external/bsd/dhcpcd/dist/control.c
U src/external/bsd/dhcpcd/dist/dhcp.c
U src/external/bsd/dhcpcd/dist/dhcpcd.c
U src/external/bsd/dhcpcd/dist/duid.c
U src/external/bsd/dhcpcd/dist/eloop.c
U src/external/bsd/dhcpcd/dist/if-options.c
U src/external/bsd/dhcpcd/dist/if-pref.c
U src/external/bsd/dhcpcd/dist/ipv4ll.c
N src/external/bsd/dhcpcd/dist/ipv6rs.c
U src/external/bsd/dhcpcd/dist/net.c
U src/external/bsd/dhcpcd/dist/signals.c
U src/external/bsd/dhcpcd/dist/configure.c
U src/external/bsd/dhcpcd/dist/bpf.c
U src/external/bsd/dhcpcd/dist/if-bsd.c
U src/external/bsd/dhcpcd/dist/platform-bsd.c
U src/external/bsd/dhcpcd/dist/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
C src/external/bsd/dhcpcd/dist/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/arp.h
U src/external/bsd/dhcpcd/dist/bind.h
U src/external/bsd/dhcpcd/dist/bpf-filter.h
U src/external/bsd/dhcpcd/dist/common.h
U src/external/bsd/dhcpcd/dist/config.h
U src/external/bsd/dhcpcd/dist/configure.h
U src/external/bsd/dhcpcd/dist/control.h
U src/external/bsd/dhcpcd/dist/defs.h
U src/external/bsd/dhcpcd/dist/dhcp.h
U src/external/bsd/dhcpcd/dist/dhcpcd.h
U src/external/bsd/dhcpcd/dist/duid.h
U src/external/bsd/dhcpcd/dist/eloop.h
U src/external/bsd/dhcpcd/dist/if-options.h
U src/external/bsd/dhcpcd/dist/if-pref.h
U src/external/bsd/dhcpcd/dist/ipv4ll.h
N src/external/bsd/dhcpcd/dist/ipv6rs.h
U src/external/bsd/dhcpcd/dist/net.h
U src/external/bsd/dhcpcd/dist/platform.h
U src/external/bsd/dhcpcd/dist/signals.h
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind

1 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jroy:yesterday -jroy src/external/bsd/dhcpcd/dist



CVS commit: src/external/bsd/dhcpcd/dist

2012-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 14:34:31 UTC 2012

Modified Files:
src/external/bsd/dhcpcd/dist: dhcpcd.8.in

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/dhcpcd.8.in

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

Modified files:

Index: src/external/bsd/dhcpcd/dist/dhcpcd.8.in
diff -u src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.10 src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.11
--- src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.10	Wed Apr  6 09:09:05 2011
+++ src/external/bsd/dhcpcd/dist/dhcpcd.8.in	Wed Jan 25 14:34:31 2012
@@ -22,7 +22,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd February 4, 2011
+.Dd December 15, 2011
 .Dt DHCPCD 8 SMM
 .Os
 .Sh NAME
@@ -99,6 +99,11 @@ changes.
 .Nm
 is also an implementation of the BOOTP client specified in
 .Li RFC 951 .
+.Pp
+.Nm
+is also an implementation of an IPv6 Router Solicitor as specified in
+.Li RFC 6106
+with regard to the RDNSS and DNSSL options.
 .Ss Local Link configuration
 If
 .Nm
@@ -352,7 +357,7 @@ then waits until this process has exited
 Allow
 .Ar reboot
 seconds before moving to the discover phase if we have an old lease to use.
-The default is 10 seconds.
+The default is 5 seconds.
 A setting of 0 seconds causes
 .Nm
 to skip the reboot phase and go straight into discover.
@@ -528,7 +533,7 @@ will monitor the interface until an addr
 act accordingly.
 For point to point interfaces (like PPP), a default route to its
 destination is automatically added to the configuration.
-If the point to point interface if configured for INFORM, then
+If the point to point interface is configured for INFORM, then
 .Nm
 unicasts INFORM to the destination, otherwise it defaults to STATIC.
 .Sh NOTES
@@ -571,7 +576,7 @@ running on the
 .Xr fnmatch 3
 .Sh STANDARDS
 RFC 951, RFC 1534, RFC 2131, RFC 2132, RFC 2855, RFC 3004, RFC 3361, RFC 3396,
-RFC 3397, RFC 3442, RFC 3927, RFC 4361, RFC 4390, RFC 4702.
+RFC 3397, RFC 3442, RFC 3927, RFC 4361, RFC 4390, RFC 4702, RFC 5969, RFC 6106.
 .Sh AUTHORS
 .An Roy Marples Aq r...@marples.name
 .Sh BUGS



CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd

2012-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 14:39:06 UTC 2012

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Fix for IPv6 RS support.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile

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

Modified files:

Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.10 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.11
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.10	Mon Jan  3 11:33:44 2011
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile	Wed Jan 25 14:39:05 2012
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.10 2011/01/03 11:33:44 roy Exp $
+# $NetBSD: Makefile,v 1.11 2012/01/25 14:39:05 roy Exp $
 #
 
 PROG=		dhcpcd
 SRCS=		arp.c bind.c common.c control.c configure.c dhcp.c dhcpcd.c \
-		duid.c eloop.c if-options.c if-pref.c ipv4ll.c net.c \
+		duid.c eloop.c if-options.c if-pref.c ipv4ll.c ipv6rs.c net.c \
 		signals.c
 SRCS+=		bpf.c if-bsd.c platform-bsd.c
 



CVS commit: src/sys/kern

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 15:51:24 UTC 2012

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

Log Message:
need sys/atomic.h


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/kern/uipc_syscalls.c

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

Modified files:

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.152 src/sys/kern/uipc_syscalls.c:1.153
--- src/sys/kern/uipc_syscalls.c:1.152	Wed Jan 25 09:04:09 2012
+++ src/sys/kern/uipc_syscalls.c	Wed Jan 25 10:51:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.152 2012/01/25 14:04:09 christos Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.153 2012/01/25 15:51:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.152 2012/01/25 14:04:09 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.153 2012/01/25 15:51:24 christos Exp $);
 
 #include opt_pipe.h
 
@@ -80,6 +80,7 @@ __KERNEL_RCSID(0, $NetBSD: uipc_syscall
 #include sys/un.h
 #include sys/ktrace.h
 #include sys/event.h
+#include sys/atomic.h
 #include sys/kauth.h
 
 #include sys/mount.h



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

2012-01-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jan 25 15:58:11 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: zaudio.c zrc.c ztp.c

Log Message:
Defer device initializations which implicitly depend on scoop or ioexp
via config_finalize_register(9).


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/zaurus/dev/zaudio.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/dev/zrc.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/dev/ztp.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/zaurus/dev/zaudio.c
diff -u src/sys/arch/zaurus/dev/zaudio.c:1.17 src/sys/arch/zaurus/dev/zaudio.c:1.18
--- src/sys/arch/zaurus/dev/zaudio.c:1.17	Sat Jan 21 18:56:51 2012
+++ src/sys/arch/zaurus/dev/zaudio.c	Wed Jan 25 15:58:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zaudio.c,v 1.17 2012/01/21 18:56:51 nonaka Exp $	*/
+/*	$NetBSD: zaudio.c,v 1.18 2012/01/25 15:58:10 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_audio.c,v 1.8 2005/08/18 13:23:02 robert Exp $	*/
 
 /*
@@ -50,7 +50,7 @@
 #include opt_zaudio.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.17 2012/01/21 18:56:51 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.18 2012/01/25 15:58:10 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -132,6 +132,7 @@ static void	zaudio_attach(device_t, devi
 CFATTACH_DECL_NEW(zaudio, sizeof(struct zaudio_softc), 
 zaudio_match, zaudio_attach, NULL, NULL);
 
+static int	zaudio_finalize(device_t);
 static bool	zaudio_suspend(device_t, const pmf_qual_t *);
 static bool	zaudio_resume(device_t, const pmf_qual_t *);
 static void	zaudio_volume_up(device_t);
@@ -381,7 +382,8 @@ zaudio_attach(device_t parent, device_t 
 	(void) pxa2x0_gpio_intr_establish(GPIO_HP_IN_C3000, IST_EDGE_BOTH,
 	IPL_BIO, zaudio_jack_intr, sc);
 
-	zaudio_init(sc);
+	/* zaudio_init() implicitly depends on ioexp or scoop */
+	config_finalize_register(self, zaudio_finalize);
 
 	audio_attach_mi(wm8750_hw_if, sc, self);
 
@@ -405,6 +407,15 @@ fail_i2s:
 	pmf_device_deregister(self);
 }
 
+static int
+zaudio_finalize(device_t dv)
+{
+	struct zaudio_softc *sc = device_private(dv);
+
+	zaudio_init(sc);
+	return 0;
+}
+
 static bool
 zaudio_suspend(device_t dv, const pmf_qual_t *qual)
 {

Index: src/sys/arch/zaurus/dev/zrc.c
diff -u src/sys/arch/zaurus/dev/zrc.c:1.7 src/sys/arch/zaurus/dev/zrc.c:1.8
--- src/sys/arch/zaurus/dev/zrc.c:1.7	Sun Jun 19 16:20:09 2011
+++ src/sys/arch/zaurus/dev/zrc.c	Wed Jan 25 15:58:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zrc.c,v 1.7 2011/06/19 16:20:09 nonaka Exp $	*/
+/*	$NetBSD: zrc.c,v 1.8 2012/01/25 15:58:10 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_remote.c,v 1.1 2005/11/17 05:26:31 uwe Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zrc.c,v 1.7 2011/06/19 16:20:09 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zrc.c,v 1.8 2012/01/25 15:58:10 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -101,6 +101,7 @@ static void	zrc_attach(struct device *, 
 CFATTACH_DECL_NEW(zrc, sizeof(struct zrc_softc), 
 zrc_match, zrc_attach, NULL, NULL);
 
+static int	zrc_finalize(device_t);
 static int	zrc_intr(void *);
 static void	zrc_timeout(void *);
 static int	zrc_scan(void);
@@ -190,11 +191,8 @@ zrc_attach(device_t parent, device_t sel
 		return;
 	}
 
-	/* Enable the pullup while waiting for an interrupt. */
-	if (ZAURUS_ISC1000)
-		ioexp_akin_pullup(1);
-	else
-		scoop_akin_pullup(1);
+	/* defer enabling pullup until ioexp or scoop is attached */
+	config_finalize_register(self, zrc_finalize);
 
 	sc-sc_keydown = KEY_RELEASE;
 
@@ -207,6 +205,19 @@ zrc_attach(device_t parent, device_t sel
 }
 
 static int
+zrc_finalize(device_t dv)
+{
+
+	/* Enable the pullup while waiting for an interrupt. */
+	if (ZAURUS_ISC1000)
+		ioexp_akin_pullup(1);
+	else
+		scoop_akin_pullup(1);
+
+	return 0;
+}
+
+static int
 zrc_intr(void *v)
 {
 	struct zrc_softc *sc = v;

Index: src/sys/arch/zaurus/dev/ztp.c
diff -u src/sys/arch/zaurus/dev/ztp.c:1.10 src/sys/arch/zaurus/dev/ztp.c:1.11
--- src/sys/arch/zaurus/dev/ztp.c:1.10	Wed Feb 24 22:37:56 2010
+++ src/sys/arch/zaurus/dev/ztp.c	Wed Jan 25 15:58:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ztp.c,v 1.10 2010/02/24 22:37:56 dyoung Exp $	*/
+/*	$NetBSD: ztp.c,v 1.11 2012/01/25 15:58:10 tsutsui Exp $	*/
 /* $OpenBSD: zts.c,v 1.9 2005/04/24 18:55:49 uwe Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ztp.c,v 1.10 2010/02/24 22:37:56 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: ztp.c,v 1.11 2012/01/25 15:58:10 tsutsui Exp $);
 
 #include lcd.h
 
@@ -114,6 +114,7 @@ static void	ztp_attach(device_t, device_
 CFATTACH_DECL_NEW(ztp, sizeof(struct ztp_softc),
 	ztp_match, ztp_attach, NULL, NULL);
 
+static int	ztp_finalize(device_t);
 static int	ztp_enable(void *);
 static void	ztp_disable(void *);
 static bool	ztp_suspend(device_t dv, const pmf_qual_t *);
@@ -149,19 

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

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 16:08:37 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: m68kbsd-nat.c

Log Message:
make gdb link again


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.4	Sun Jan 22 15:27:28 2012
+++ src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c	Wed Jan 25 11:08:37 2012
@@ -32,6 +32,16 @@
 #include m68k-tdep.h
 #include inf-ptrace.h
 
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T
+typedef struct fpreg fpregset_t;
+#endif
+
+#include gregset.h 
+
 static int
 m68kbsd_gregset_supplies_p (int regnum)
 {
@@ -91,7 +101,7 @@ m68kbsd_collect_gregset (const struct re
in FPREGS.  */
 
 static void
-m68kbsd_collect_fpregset (struct regcache *regcache,
+m68kbsd_collect_fpregset (const struct regcache *regcache,
 			  void *fpregs, int regnum)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
@@ -106,6 +116,36 @@ m68kbsd_collect_fpregset (struct regcach
 }
 }
 
+void
+supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
+{
+  m68kbsd_supply_gregset (regcache, gregsetp);
+}
+
+/* Fill register REGNUM (if it is a general-purpose register) in
+   *GREGSETP with the value in GDB's register cache.  If REGNUM is -1,
+   do this for all registers.  */
+
+void
+fill_gregset (const struct regcache *regcache,
+  gregset_t *gregsetp, int regnum)
+{
+  m68kbsd_collect_gregset (regcache, gregsetp, regnum);
+}
+
+void
+supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
+{  
+  m68kbsd_supply_fpregset (regcache, fpregsetp);
+}
+   
+void
+fill_fpregset (const struct regcache *regcache,
+   fpregset_t *fpregsetp, int regnum)
+{
+  m68kbsd_collect_fpregset (regcache, fpregsetp, regnum);
+}
+
 
 /* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
for all registers (including the floating-point registers).  */



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

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 16:25:29 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc64nbsd-nat.c

Log Message:
fix this properly.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c:1.4	Mon Jan 23 16:51:46 2012
+++ src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c	Wed Jan 25 11:25:28 2012
@@ -27,6 +27,17 @@
 #include sparc64-tdep.h
 #include sparc-nat.h
 
+#include machine/reg.h
+
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T
+typedef struct fpreg fpregset_t;
+#endif
+#include gregset.h
+ 
 /* NetBSD is different from the other OSes that support both SPARC and
UltraSPARC in that the result of ptrace(2) depends on whether the
traced process is 32-bit or 64-bit.  */
@@ -126,28 +137,26 @@ sparc64nbsd_fpregset_supplies_p (struct 
   return 0;
 }
 
-
 void
-supply_gregset (struct regcache *regcache, const void *gregs)
+supply_gregset (struct regcache *regcache, const gregset_t *gregs)
 {
   sparc64nbsd_supply_gregset (sparc_gregset, regcache, -1, gregs);
 }
 
 void
-supply_fpregset (struct regcache *regcache, const void *fpregs)
+supply_fpregset (struct regcache *regcache, const fpregset_t *fpregs)
 {
   sparc64nbsd_supply_fpregset (regcache, -1, fpregs);
 }
 
 void
-fill_gregset (const struct regcache *regcache, void *gregs, int regnum)
+fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum)
 {
   sparc64nbsd_collect_gregset (sparc_gregset, regcache, regnum, gregs);
 }
 
 void
-fill_fpregset (const struct regcache *regcache,
-	   void *fpregs, int regnum)
+fill_fpregset (const struct regcache *regcache, fpregset_t *fpregs, int regnum)
 {
   sparc64nbsd_collect_fpregset (regcache, regnum, fpregs);
 }



CVS commit: src/sys/dev/rasops

2012-01-25 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan 25 16:38:27 UTC 2012

Modified Files:
src/sys/dev/rasops: rasops8.c

Log Message:
rasops8_putchar_aa():
render glyphs scanline by scanline into a 64bit-aligned buffer, then memcpy()
it into video memory instead of writing directly.
This gives 10% speedup even on valkyriefb, likely more on PCIe framebuffers.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/rasops/rasops8.c

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

Modified files:

Index: src/sys/dev/rasops/rasops8.c
diff -u src/sys/dev/rasops/rasops8.c:1.30 src/sys/dev/rasops/rasops8.c:1.31
--- src/sys/dev/rasops/rasops8.c:1.30	Wed Jan  4 20:16:20 2012
+++ src/sys/dev/rasops/rasops8.c	Wed Jan 25 16:38:27 2012
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops8.c,v 1.30 2012/01/04 20:16:20 macallan Exp $	*/
+/* 	$NetBSD: rasops8.c,v 1.31 2012/01/25 16:38:27 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rasops8.c,v 1.30 2012/01/04 20:16:20 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: rasops8.c,v 1.31 2012/01/25 16:38:27 macallan Exp $);
 
 #include opt_rasops.h
 
@@ -205,6 +205,7 @@ rasops8_putchar_aa(void *cookie, int row
 	struct wsdisplay_font *font = PICK_FONT(ri, uc);
 	int x, y, r, g, b, aval;
 	int r1, g1, b1, r0, g0, b0, fgo, bgo;
+	uint8_t scanline[32] __attribute__ ((aligned(8)));
 
 	hp = hrp = NULL;
 
@@ -278,11 +279,11 @@ rasops8_putchar_aa(void *cookie, int row
 		((g  0xe000)  11) |
 		((b  0xc000)  14);
 }
-*dp = pixel;
-dp++;
+scanline[x] = pixel;
 			}
+			memcpy(rp, scanline, width);
 			if (ri-ri_hwbits) {
-memcpy(rp, hrp, width);
+memcpy(hrp, scanline, width);
 hrp += ri-ri_stride;
 			}
 			rp += ri-ri_stride;



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

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 16:48:44 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-thread.c

Log Message:
Deal with sh3 having no FPREGS and having 32 bit pointers and 64 bit CORE_ADDR.
Ugly.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/nbsd-thread.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.7 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.8
--- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.7	Tue Jan 24 22:26:39 2012
+++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c	Wed Jan 25 11:48:44 2012
@@ -42,6 +42,11 @@
 #include observer.h
 
 #include machine/reg.h
+#ifndef __sh3__
+#define HAVE_FPREGS
+#else
+struct fpreg { };
+#endif
 
 #ifndef HAVE_GREGSET_T
 typedef struct reg gregset_t;
@@ -366,7 +371,9 @@ nbsd_thread_fetch_registers (struct targ
   struct target_ops *beneath = find_target_beneath (ops);
   td_thread_t *thread;
   gregset_t gregs;
+#ifdef HAVE_FPREGS
   fpregset_t fpregs;
+#endif
   int val;
   struct cleanup *old_chain;
 
@@ -381,8 +388,10 @@ nbsd_thread_fetch_registers (struct targ
 	error (nbsd_thread_fetch_registers: td_thr_getregs: %s\n,
 	   td_err_string (val));
   supply_gregset (cache, gregs);
+#ifdef HAVE_FPREGS
   if ((val = td_thr_getregs (thread, 1, fpregs)) == 0)
 	  supply_fpregset (cache, fpregs);
+#endif
 }
   else
 {
@@ -404,7 +413,9 @@ nbsd_thread_store_registers (struct targ
   struct target_ops *beneath = find_target_beneath (ops);
   td_thread_t *thread;
   gregset_t gregs;
+#ifdef HAVE_FPREGS
   fpregset_t fpregs;
+#endif
   int val;
 
   if (nbsd_thread_active  IS_THREAD (inferior_ptid))
@@ -415,16 +426,20 @@ nbsd_thread_store_registers (struct targ
 	  td_err_string (val));
 
   fill_gregset (cache, gregs, -1);
+#ifdef HAVE_FPREGS
   fill_fpregset (cache, fpregs, -1);
+#endif
 
   val = td_thr_setregs (thread, 0, gregs);
   if (val != 0)
 	error (nbsd_thread_store_registers: td_thr_setregs: %s\n,
 	  td_err_string (val));
+#ifdef HAVE_FPREGS
   val = td_thr_setregs (thread, 1, fpregs);
   if (val != 0)
 	error (nbsd_thread_store_registers: td_thr_setregs: %s\n,
 	  td_err_string (val));
+#endif
 }
   else
 {
@@ -842,7 +857,7 @@ nbsd_thread_examine_cmd (char *exp, int 
   else
 return;
 
-  if ((ret = td_map_pth2thr (main_ta, (pthread_t) addr, th)) != 0)
+  if ((ret = td_map_pth2thr (main_ta, (pthread_t)(uintptr_t)addr, th)) != 0)
 error (nbsd_thread_examine_command: td_map_pth2thr: %s,
 	   td_err_string (ret));
   
@@ -949,7 +964,7 @@ tsd_cb (pthread_key_t key, void (*destru
   printf_filtered (Key %3d   , key);
 
   /* XXX What does GDB use to print a function? */
-  ms = lookup_minimal_symbol_by_pc ((CORE_ADDR)destructor);
+  ms = lookup_minimal_symbol_by_pc ((CORE_ADDR)(uintptr_t)destructor);
 
   if (!ms)
 name = ???;
@@ -975,7 +990,7 @@ nbsd_thread_proc_read (void *arg, caddr_
 {
   int val;
 
-  val = target_read_memory ((CORE_ADDR)addr, buf, size);
+  val = target_read_memory ((CORE_ADDR)(uintptr_t)addr, buf, size);
 
   if (val == 0)
 return 0;
@@ -989,7 +1004,7 @@ nbsd_thread_proc_write (void *arg, caddr
 {
   int val;
 
-  val = target_write_memory ((CORE_ADDR)addr, buf, size);
+  val = target_write_memory ((CORE_ADDR)(uintptr_t)addr, buf, size);
 
   if (val == 0)
 return 0;
@@ -1007,7 +1022,7 @@ nbsd_thread_proc_lookup (void *arg, cons
   if (!ms)
 return TD_ERR_NOSYM;
 
-  *addr = (caddr_t) SYMBOL_VALUE_ADDRESS (ms);
+  *addr = (caddr_t)(uintptr_t)SYMBOL_VALUE_ADDRESS (ms);
 
   return 0;
 
@@ -1022,7 +1037,11 @@ nbsd_thread_proc_regsize (void *arg, int
   *size = sizeof (gregset_t);
   break;
 case 1:
+#ifdef HAVE_FPREGS
   *size = sizeof (fpregset_t);
+#else
+  *size = 0;
+#endif
   break;
 default:
   return TD_ERR_INVAL;
@@ -1066,7 +1085,9 @@ nbsd_thread_proc_getregs (void *arg, int
   fill_gregset (cache, (gregset_t *)buf, -1);
   break;
 case 1:
+#ifdef HAVE_FPREGS
   fill_fpregset (cache, (fpregset_t *)buf, -1);
+#endif
   break;
 default: /* XXX need to handle other reg sets: SSE, AltiVec, etc. */
   ret = TD_ERR_INVAL;
@@ -1096,7 +1117,9 @@ nbsd_thread_proc_setregs (void *arg, int
   supply_gregset(cache, (gregset_t *)buf);
   break;
 case 1:
+#ifdef HAVE_FPREGS
   supply_fpregset(cache, (fpregset_t *)buf);
+#endif
   break;
 default: /* XXX need to handle other reg sets: SSE, AltiVec, etc. */
   ret = TD_ERR_INVAL;



CVS commit: src/sys/arch/zaurus

2012-01-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jan 25 16:51:17 UTC 2012

Modified Files:
src/sys/arch/zaurus/conf: GENERIC INSTALL files.zaurus
src/sys/arch/zaurus/dev: zkbd.c zlcd.c zlcdvar.h zssp.c zsspvar.h ztp.c
src/sys/arch/zaurus/zaurus: machdep.c
Added Files:
src/sys/arch/zaurus/dev: lcdctl.c lcdctlvar.h

Log Message:
Reorganlization zlcd(4) and ztp(4) device attachments from nonaka@:
 - ztp depends on zssp so attach ztp at zssp rather than pxaip
 - split LCD backlight controls from zlcd(4) into new lcdctl device
   to share it among forthcoming SL-C7x0 variants


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/zaurus/conf/GENERIC
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/zaurus/conf/INSTALL
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/conf/files.zaurus
cvs rdiff -u -r0 -r1.1 src/sys/arch/zaurus/dev/lcdctl.c \
src/sys/arch/zaurus/dev/lcdctlvar.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/zaurus/dev/zkbd.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/zaurus/dev/zlcd.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/dev/zlcdvar.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/zaurus/dev/zssp.c \
src/sys/arch/zaurus/dev/ztp.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/zsspvar.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/zaurus/zaurus/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/zaurus/conf/GENERIC
diff -u src/sys/arch/zaurus/conf/GENERIC:1.48 src/sys/arch/zaurus/conf/GENERIC:1.49
--- src/sys/arch/zaurus/conf/GENERIC:1.48	Sun Dec 18 05:49:33 2011
+++ src/sys/arch/zaurus/conf/GENERIC	Wed Jan 25 16:51:17 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: GENERIC,v 1.48 2011/12/18 05:49:33 dholland Exp $
+#	$NetBSD: GENERIC,v 1.49 2012/01/25 16:51:17 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -209,7 +209,7 @@ ioexp0 at iic? addr 0x18
 zssp0 at pxaip?
 
 # touchpad
-ztp0 at pxaip?
+ztp0 at zssp?
 wsmouse* at ztp? mux 0
 
 # keyboard
@@ -224,6 +224,7 @@ wskbd* at zrc? mux 1
 lcd0 at pxaip?
 options 	PXA2X0_LCD_WRITETHROUGH
 wsdisplay* at lcd? console ?
+lcdctl0 at zssp0
 
 # WM8750 Audio
 zaudio0 at iic? addr 0x1b

Index: src/sys/arch/zaurus/conf/INSTALL
diff -u src/sys/arch/zaurus/conf/INSTALL:1.11 src/sys/arch/zaurus/conf/INSTALL:1.12
--- src/sys/arch/zaurus/conf/INSTALL:1.11	Sat Nov 19 17:17:41 2011
+++ src/sys/arch/zaurus/conf/INSTALL	Wed Jan 25 16:51:17 2012
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.11 2011/11/19 17:17:41 nonaka Exp $
+# $NetBSD: INSTALL,v 1.12 2012/01/25 16:51:17 tsutsui Exp $
 #
 # INSTALL config file (GENERIC with memory disk root)
 #
@@ -49,7 +49,7 @@ no options 		SYMTAB_SPACE
 
 no zrc0 at pxaip?
 
-no ztp0 at pxaip?
+no ztp0 at zssp?
 no wsmouse* at ztp?
 
 no zaudio0 at iic?

Index: src/sys/arch/zaurus/conf/files.zaurus
diff -u src/sys/arch/zaurus/conf/files.zaurus:1.9 src/sys/arch/zaurus/conf/files.zaurus:1.10
--- src/sys/arch/zaurus/conf/files.zaurus:1.9	Sun Jun 19 16:20:09 2011
+++ src/sys/arch/zaurus/conf/files.zaurus	Wed Jan 25 16:51:17 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.zaurus,v 1.9 2011/06/19 16:20:09 nonaka Exp $
+#	$NetBSD: files.zaurus,v 1.10 2012/01/25 16:51:17 tsutsui Exp $
 #
 # Sharp Zaurus specific configuration info
 #
@@ -67,7 +67,7 @@ attach ioexp at iic
 file arch/zaurus/dev/ioexp.c		ioexp needs-flag
 
 # Dedicated SSP unit for ADC, touch screen, and backlight
-device zssp
+device zssp {}
 attach zssp at pxaip
 file arch/zaurus/dev/zssp.c		zssp
 
@@ -75,6 +75,11 @@ file arch/zaurus/dev/zssp.c		zssp
 attach lcd at pxaip with zlcd
 file arch/zaurus/dev/zlcd.c		zlcd
 
+# backlight, brightness Controller
+device lcdctl
+attach lcdctl at zssp
+file arch/zaurus/dev/lcdctl.c		lcdctl needs-flag
+
 # GPIO keyboard
 device zkbd: wskbddev
 attach zkbd at pxaip
@@ -82,7 +87,7 @@ file arch/zaurus/dev/zkbd.c		zkbd
 
 # Zaurus touchpad
 device ztp: wsmousedev, hpctpanel
-attach ztp at pxaip
+attach ztp at zssp
 file arch/zaurus/dev/ztp.c		ztp
 
 # WM8750 audio

Index: src/sys/arch/zaurus/dev/zkbd.c
diff -u src/sys/arch/zaurus/dev/zkbd.c:1.14 src/sys/arch/zaurus/dev/zkbd.c:1.15
--- src/sys/arch/zaurus/dev/zkbd.c:1.14	Tue Jun 21 18:13:19 2011
+++ src/sys/arch/zaurus/dev/zkbd.c	Wed Jan 25 16:51:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zkbd.c,v 1.14 2011/06/21 18:13:19 nonaka Exp $	*/
+/*	$NetBSD: zkbd.c,v 1.15 2012/01/25 16:51:17 tsutsui Exp $	*/
 /* $OpenBSD: zaurus_kbd.c,v 1.28 2005/12/21 20:36:03 deraadt Exp $ */
 
 /*
@@ -18,12 +18,13 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.14 2011/06/21 18:13:19 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.15 2012/01/25 16:51:17 tsutsui Exp $);
 
 #include opt_wsdisplay_compat.h
 #if 0	/* XXX */
 #include apm.h
 #endif
+#include lcdctl.h
 
 #include sys/param.h
 #include sys/systm.h
@@ -44,7 +45,9 @@ __KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.1
 
 #include zaurus/zaurus/zaurus_var.h
 #include zaurus/dev/zkbdmap.h
-#include 

CVS commit: src/sys/kern

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 16:56:13 UTC 2012

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

Log Message:
revert atomics for so_options since it is a short.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/kern/uipc_syscalls.c

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

Modified files:

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.153 src/sys/kern/uipc_syscalls.c:1.154
--- src/sys/kern/uipc_syscalls.c:1.153	Wed Jan 25 10:51:24 2012
+++ src/sys/kern/uipc_syscalls.c	Wed Jan 25 11:56:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.153 2012/01/25 15:51:24 christos Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.154 2012/01/25 16:56:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.153 2012/01/25 15:51:24 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.154 2012/01/25 16:56:13 christos Exp $);
 
 #include opt_pipe.h
 
@@ -1015,9 +1015,9 @@ sys_getsockopt(struct lwp *l, const stru
 	sockopt_init(sopt, SCARG(uap, level), SCARG(uap, name), 0);
 
 	if (fp-f_flag  FNOSIGPIPE)
-		atomic_or_uint(so-so_options, SO_NOSIGPIPE);
+		so-so_options |= SO_NOSIGPIPE;
 	else
-		atomic_and_uint(so-so_options, ~SO_NOSIGPIPE);
+		so-so_options = ~SO_NOSIGPIPE;
 	error = sogetopt(so, sopt);
 	if (error)
 		goto out;



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

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 17:01:02 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: shnbsd-nat.c

Log Message:
hack to make sh3 build.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c:1.4	Mon Oct 31 17:00:39 2011
+++ src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c	Wed Jan 25 12:01:02 2012
@@ -34,7 +34,16 @@
 
 #include nbsd-nat.h
 
-
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T
+struct fpreg { };
+typedef struct fpreg fpregset_t;
+#endif
+#include gregset.h
+ 
 /* Determine if PT_GETREGS fetches this register.  */
 #define GETREGS_SUPPLIES(gdbarch, regno) \
   (((regno) = R0_REGNUM  (regno) = (R0_REGNUM + 15)) \
@@ -91,6 +100,22 @@ shnbsd_store_inferior_registers (struct 
 }
 }
 
+void
+supply_gregset (struct regcache *regcache, const gregset_t *gregs)
+{
+  if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1)
+	perror_with_name (_(Couldn't set registers));
+}
+
+void
+fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum)
+{
+   if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+	(PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1)
+	perror_with_name (_(Couldn't get registers));
+}
+
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_shnbsd_nat (void);
 



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

2012-01-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jan 25 17:18:47 UTC 2012

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

Log Message:
- TAB/space cleanup
- add a comment


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/zaurus/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/zaurus/conf/GENERIC
diff -u src/sys/arch/zaurus/conf/GENERIC:1.49 src/sys/arch/zaurus/conf/GENERIC:1.50
--- src/sys/arch/zaurus/conf/GENERIC:1.49	Wed Jan 25 16:51:17 2012
+++ src/sys/arch/zaurus/conf/GENERIC	Wed Jan 25 17:18:47 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: GENERIC,v 1.49 2012/01/25 16:51:17 tsutsui Exp $
+#	$NetBSD: GENERIC,v 1.50 2012/01/25 17:18:47 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -27,8 +27,8 @@ maxusers	32			# estimated number of user
 # CPU options
 
 # For XScale systems
-#options 	CPU_XSCALE_PXA250# Support the XScale PXA25x core
-options 	CPU_XSCALE_PXA270# Support the XScale PXA27x core
+#options 	CPU_XSCALE_PXA250	# Support the XScale PXA25x core
+options 	CPU_XSCALE_PXA270	# Support the XScale PXA27x core
 makeoptions	CPUFLAGS=-mcpu=xscale
 
 # Architecture options
@@ -123,14 +123,14 @@ options 	P1003_1B_SEMAPHORE	# p1003.1b s
 # Device options
 
 # Miscellaneous kernel options
-#options 	KTRACE  # system call tracing via ktrace(1)
-#options 	KMEMSTATS   # kernel memory statistics
-#options 	SCSIVERBOSE # Verbose SCSI errors
-#options 	MIIVERBOSE  # Verbose MII autoconfuration messages
-#options 	USBVERBOSE  # verbose USB device autoconfig messages
-#options 	USERCONF# userconf(4) support
+#options 	KTRACE		# system call tracing via ktrace(1)
+#options 	KMEMSTATS	# kernel memory statistics
+#options 	SCSIVERBOSE	# Verbose SCSI errors
+#options 	MIIVERBOSE	# Verbose MII autoconfuration messages
+#options 	USBVERBOSE	# verbose USB device autoconfig messages
+#options 	USERCONF	# userconf(4) support
 #options 	PIPE_SOCKETPAIR # smaller, but slower pipe(2)
-#options 	SYSCTL_INCLUDE_DESCR# Include sysctl descriptions in kernel
+#options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
 #
 # wscons options
@@ -158,13 +158,13 @@ options 	WSDISPLAY_COMPAT_RAWKBD		# can 
 
 # Development and Debugging options
 
-options 	DIAGNOSTIC  # internal consistency checks
+options 	DIAGNOSTIC		# internal consistency checks
 #options 	DEBUG
-#options 	VERBOSE_INIT_ARM # verbose bootstraping messages
-options 	DDB # in-kernel debugger
-options 	DDB_HISTORY_SIZE=100# Enable history editing in DDB
+#options 	VERBOSE_INIT_ARM	# verbose bootstraping messages
+options 	DDB			# in-kernel debugger
+options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
 #options 	KGDB
-#makeoptions 	DEBUG=-g  # compile full symbol table
+#makeoptions 	DEBUG=-g		# compile full symbol table
 options 	SYMTAB_SPACE=512000
 
 
@@ -187,8 +187,8 @@ pxartc0 at pxaip? addr 0x4090 size 0
 
 # DMAC support
 pxadmac0 at pxaip? addr 0x4000 intr 25
-options		PXA2X0_DMAC_DMOVER_CONCURRENCY=4 # Enable dmover(9) backend
-#options	PXA2X0_DMAC_FIXED_PRIORITY	# Don't want multiple priority
+options 	PXA2X0_DMAC_DMOVER_CONCURRENCY=4 # Enable dmover(9) backend
+#options 	PXA2X0_DMAC_FIXED_PRIORITY	# Don't want multiple priority
 
 # I2C support
 ziic0 at pxaip?
@@ -221,7 +221,7 @@ zrc0 at pxaip?
 wskbd* at zrc? mux 1
 
 # LCD
-lcd0 at pxaip?
+lcd0 at pxaip?# PXA2x0 integrated LCD Controller
 options 	PXA2X0_LCD_WRITETHROUGH
 wsdisplay* at lcd? console ?
 lcdctl0 at zssp0
@@ -314,44 +314,44 @@ cd*	at atapibus? drive ?		# ATAPI CD-ROM
 #uaudio* at uhub? port ? configuration ?
 
 # USB Ethernet adapters
-aue*at uhub? port ? # ADMtek AN986 Pegasus based adapters
-axe*at uhub? port ? # ASIX AX88172 based adapters
-cdce*   at uhub? port ? # CDC, Ethernet Networking Control Model
-cue*at uhub? port ? # CATC USB-EL1201A based adapters
-kue*at uhub? port ? # Kawasaki LSI KL5KUSB101B based adapters
-udav*   at uhub? port ? # Davicom DM9601 based adapters
-url*at uhub? port ? # Realtek RTL8150L based adapters
+aue*	at uhub? port ?		# ADMtek AN986 Pegasus based adapters
+axe*	at uhub? port ?		# ASIX AX88172 based adapters
+cdce*	at uhub? port ?		# CDC, Ethernet Networking Control Model
+cue*	at uhub? port ?		# CATC USB-EL1201A based adapters
+kue*	at uhub? port ?		# Kawasaki LSI KL5KUSB101B based adapters
+udav*	at uhub? port ?		# Davicom DM9601 based adapters
+url*	at uhub? port ?		# Realtek RTL8150L based adapters
 
 # Kyocera AIR-EDGE PHONE
 #ukyopon* at uhub? port ?
 #ucom* at ukyopon? portno ?
 
 # USB Generic driver
-ugen*   at uhub? port ?
+ugen*	at uhub? port ?
 
 # MII/PHY support
-acphy*  at mii? phy ?   # DAltima AC101 and AMD Am79c874 PHYs
-amhphy* at mii? phy ?   # AMD 79c901 Ethernet 

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

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 17:33:17 UTC 2012

Modified Files:
src/sys/dev/usb [netbsd-5]: ugen.c

Log Message:
Pull up following revision(s) (requested by gavan in ticket #1697):
sys/dev/usb/ugen.c: revision 1.112
Implement timeouts when blocking the calling process with tsleep.
Fixes PR kern/33452


To generate a diff of this commit:
cvs rdiff -u -r1.99.8.3 -r1.99.8.4 src/sys/dev/usb/ugen.c

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

Modified files:

Index: src/sys/dev/usb/ugen.c
diff -u src/sys/dev/usb/ugen.c:1.99.8.3 src/sys/dev/usb/ugen.c:1.99.8.4
--- src/sys/dev/usb/ugen.c:1.99.8.3	Tue Mar  9 03:54:44 2010
+++ src/sys/dev/usb/ugen.c	Wed Jan 25 17:33:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugen.c,v 1.99.8.3 2010/03/09 03:54:44 snj Exp $	*/
+/*	$NetBSD: ugen.c,v 1.99.8.4 2012/01/25 17:33:17 riz Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ugen.c,v 1.99.8.3 2010/03/09 03:54:44 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: ugen.c,v 1.99.8.4 2012/01/25 17:33:17 riz Exp $);
 
 #include opt_ugen_bulk_ra_wb.h
 #include opt_compat_netbsd.h
@@ -605,7 +605,7 @@ ugen_do_read(struct ugen_softc *sc, int 
 			}
 			sce-state |= UGEN_ASLP;
 			DPRINTFN(5, (ugenread: sleep on %p\n, sce));
-			error = tsleep(sce, PZERO | PCATCH, ugenri, 0);
+			error = tsleep(sce, PZERO | PCATCH, ugenri, mstohz(sce-timeout));
 			DPRINTFN(5, (ugenread: woke, error=%d\n, error));
 			if (sc-sc_dying)
 error = EIO;
@@ -651,7 +651,7 @@ ugen_do_read(struct ugen_softc *sc, int 
 		 (ugenread: sleep on %p\n,
 		  sce));
 	error = tsleep(sce, PZERO | PCATCH,
-		   ugenrb, 0);
+		   ugenrb, mstohz(sce-timeout));
 	DPRINTFN(5,
 		 (ugenread: woke, error=%d\n,
 		  error));
@@ -743,7 +743,7 @@ ugen_do_read(struct ugen_softc *sc, int 
 			}
 			sce-state |= UGEN_ASLP;
 			DPRINTFN(5, (ugenread: sleep on %p\n, sce));
-			error = tsleep(sce, PZERO | PCATCH, ugenri, 0);
+			error = tsleep(sce, PZERO | PCATCH, ugenri, mstohz(sce-timeout));
 			DPRINTFN(5, (ugenread: woke, error=%d\n, error));
 			if (sc-sc_dying)
 error = EIO;
@@ -851,7 +851,7 @@ ugen_do_write(struct ugen_softc *sc, int
 		 (ugenwrite: sleep on %p\n,
 		  sce));
 	error = tsleep(sce, PZERO | PCATCH,
-		   ugenwb, 0);
+		   ugenwb, mstohz(sce-timeout));
 	DPRINTFN(5,
 		 (ugenwrite: woke, error=%d\n,
 		  error));



CVS commit: [netbsd-5] src/doc

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 17:36:37 UTC 2012

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

Log Message:
tickets 1697, 1698


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.126 -r1.1.2.127 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.126 src/doc/CHANGES-5.2:1.1.2.127
--- src/doc/CHANGES-5.2:1.1.2.126	Thu Jan  5 11:54:24 2012
+++ src/doc/CHANGES-5.2	Wed Jan 25 17:36:37 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.126 2012/01/05 11:54:24 sborrill Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.127 2012/01/25 17:36:37 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5864,3 +5864,16 @@ sys/dev/pci/if_wmreg.h1.46
 	marked volatile.
 	[dyoung, ticket #1703]
 
+sys/dev/usb/ugen.c1.112
+
+	Implement timeouts when blocking the calling process with tsleep.
+	Fixes PR kern/33452.
+	[gavan, ticket #1697]
+
+sys/dev/ic/rtl8169.c1.134
+sys/dev/ic/rtl81x9reg.h1.42
+sys/dev/ic/rtl81x9var.h1.52
+
+	Add support to recognize the 8168E model of this chip.
+	[garbled, ticket #1698]
+



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

2012-01-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jan 25 17:38:09 UTC 2012

Modified Files:
src/sys/arch/arm/arm: compat_16_machdep.c sig_machdep.c

Log Message:
STACKALIGN(fp) - STACK_ALIGN(fp, STACK_ALIGNBYTES)
per recent param.h cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/arm/compat_16_machdep.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/arm/arm/sig_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/arm/compat_16_machdep.c
diff -u src/sys/arch/arm/arm/compat_16_machdep.c:1.13 src/sys/arch/arm/arm/compat_16_machdep.c:1.14
--- src/sys/arch/arm/arm/compat_16_machdep.c:1.13	Thu Jun 30 20:09:19 2011
+++ src/sys/arch/arm/arm/compat_16_machdep.c	Wed Jan 25 17:38:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_16_machdep.c,v 1.13 2011/06/30 20:09:19 wiz Exp $	*/
+/*	$NetBSD: compat_16_machdep.c,v 1.14 2012/01/25 17:38:09 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: compat_16_machdep.c,v 1.13 2011/06/30 20:09:19 wiz Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat_16_machdep.c,v 1.14 2012/01/25 17:38:09 tsutsui Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -102,7 +102,7 @@ sendsig_sigcontext(const ksiginfo_t *ksi
 	fp--;
 
 	/* make the stack aligned */
-	fp = (void *)STACKALIGN(fp);
+	fp = (void *)STACK_ALIGN(fp, STACK_ALIGNBYTES);
 
 	/* Save register context. */
 	frame.sf_sc.sc_r0 = tf-tf_r0;

Index: src/sys/arch/arm/arm/sig_machdep.c
diff -u src/sys/arch/arm/arm/sig_machdep.c:1.40 src/sys/arch/arm/arm/sig_machdep.c:1.41
--- src/sys/arch/arm/arm/sig_machdep.c:1.40	Thu Jun 30 20:09:19 2011
+++ src/sys/arch/arm/arm/sig_machdep.c	Wed Jan 25 17:38:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sig_machdep.c,v 1.40 2011/06/30 20:09:19 wiz Exp $	*/
+/*	$NetBSD: sig_machdep.c,v 1.41 2012/01/25 17:38:09 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -44,7 +44,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.40 2011/06/30 20:09:19 wiz Exp $);
+__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.41 2012/01/25 17:38:09 tsutsui Exp $);
 
 #include sys/mount.h		/* XXX only needed by syscallargs.h */
 #include sys/proc.h
@@ -108,7 +108,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, c
 	fp--;
 	
 	/* make the stack aligned */
-	fp = (struct sigframe_siginfo *)STACKALIGN(fp);
+	fp = (struct sigframe_siginfo *)STACK_ALIGN(fp, STACK_ALIGNBYTES);
 
 	/* populate the siginfo frame */
 	frame.sf_si._info = ksi-ksi_info;



CVS commit: src/lib/libquota

2012-01-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jan 25 17:43:37 UTC 2012

Modified Files:
src/lib/libquota: quota_cursor.c quota_delete.c quota_get.c
quota_oldfiles.c quota_open.c quota_put.c quota_schema.c quotapvt.h

Log Message:
Improve how quota_open() works and generally improve function
dispatching. Allow access to the quota files via the oldfiles code if
quotaon hasn't run yet. Change the latter so it calls getfsent() up
front (and only once) to make it easier to avoid whacking caller
state.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libquota/quota_cursor.c \
src/lib/libquota/quota_get.c src/lib/libquota/quota_schema.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libquota/quota_delete.c \
src/lib/libquota/quota_oldfiles.c src/lib/libquota/quota_put.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libquota/quota_open.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libquota/quotapvt.h

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

Modified files:

Index: src/lib/libquota/quota_cursor.c
diff -u src/lib/libquota/quota_cursor.c:1.3 src/lib/libquota/quota_cursor.c:1.4
--- src/lib/libquota/quota_cursor.c:1.3	Mon Jan  9 15:41:58 2012
+++ src/lib/libquota/quota_cursor.c	Wed Jan 25 17:43:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota_cursor.c,v 1.3 2012/01/09 15:41:58 dholland Exp $	*/
+/*	$NetBSD: quota_cursor.c,v 1.4 2012/01/25 17:43:37 dholland Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: quota_cursor.c,v 1.3 2012/01/09 15:41:58 dholland Exp $);
+__RCSID($NetBSD: quota_cursor.c,v 1.4 2012/01/25 17:43:37 dholland Exp $);
 
 #include stdlib.h
 #include errno.h
@@ -44,20 +44,31 @@ quota_opencursor(struct quotahandle *qh)
 	int8_t version;
 	int serrno;
 
-	if (qh-qh_isnfs) {
+	switch (qh-qh_mode) {
+	case QUOTA_MODE_NFS:
 		errno = EOPNOTSUPP;
 		return NULL;
-	}
 
-	if (__quota_proplib_getversion(qh, version)) {
-		return NULL;
+	case QUOTA_MODE_PROPLIB:
+		if (__quota_proplib_getversion(qh, version)) {
+			return NULL;
+		}
+		break;
+
+	case QUOTA_MODE_OLDFILES:
+		version = 1;
+		break;
+
+	default:
+		errno = EINVAL;
+		break;
 	}
 
 	/*
 	 * For the time being at least the version 1 kernel code
 	 * cannot do cursors.
 	 */
-	if (version == 1  !qh-qh_hasoldfiles) {
+	if (version == 1  !qh-qh_oldfilesopen) {
 		if (__quota_oldfiles_initialize(qh)) {
 			return NULL;
 		}
Index: src/lib/libquota/quota_get.c
diff -u src/lib/libquota/quota_get.c:1.3 src/lib/libquota/quota_get.c:1.4
--- src/lib/libquota/quota_get.c:1.3	Mon Jan  9 15:29:55 2012
+++ src/lib/libquota/quota_get.c	Wed Jan 25 17:43:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota_get.c,v 1.3 2012/01/09 15:29:55 dholland Exp $	*/
+/*	$NetBSD: quota_get.c,v 1.4 2012/01/25 17:43:37 dholland Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,9 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: quota_get.c,v 1.3 2012/01/09 15:29:55 dholland Exp $);
+__RCSID($NetBSD: quota_get.c,v 1.4 2012/01/25 17:43:37 dholland Exp $);
+
+#include errno.h
 
 #include quota.h
 #include quotapvt.h
@@ -47,9 +49,19 @@ quotaval_clear(struct quotaval *qv)
 int
 quota_get(struct quotahandle *qh, const struct quotakey *qk, struct quotaval *qv)
 {
-	if (qh-qh_isnfs) {
+	switch (qh-qh_mode) {
+	case QUOTA_MODE_NFS:
 		return __quota_nfs_get(qh, qk, qv);
-	} else {
+
+	case QUOTA_MODE_PROPLIB:
 		return __quota_proplib_get(qh, qk, qv);
+
+	case QUOTA_MODE_OLDFILES:
+		return __quota_oldfiles_get(qh, qk, qv);
+
+	default:
+		break;
 	}
+	errno = EINVAL;
+	return -1;
 }
Index: src/lib/libquota/quota_schema.c
diff -u src/lib/libquota/quota_schema.c:1.3 src/lib/libquota/quota_schema.c:1.4
--- src/lib/libquota/quota_schema.c:1.3	Wed Jan 25 01:22:57 2012
+++ src/lib/libquota/quota_schema.c	Wed Jan 25 17:43:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota_schema.c,v 1.3 2012/01/25 01:22:57 dholland Exp $	*/
+/*	$NetBSD: quota_schema.c,v 1.4 2012/01/25 17:43:37 dholland Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: quota_schema.c,v 1.3 2012/01/25 01:22:57 dholland Exp $);
+__RCSID($NetBSD: quota_schema.c,v 1.4 2012/01/25 17:43:37 dholland Exp $);
 
 #include sys/types.h
 #include sys/statvfs.h
@@ -47,45 +47,132 @@ __RCSID($NetBSD: quota_schema.c,v 1.3 2
 const char *
 quota_getimplname(struct quotahandle *qh)
 {
-	if (qh-qh_isnfs) {
+	switch (qh-qh_mode) {
+	case QUOTA_MODE_NFS:
 		/* XXX this should maybe report the rquotad protocol version */
 		return nfs via rquotad;
-	} else {
+
+	case QUOTA_MODE_PROPLIB:
+		return __quota_proplib_getimplname(qh);
+
+	case QUOTA_MODE_OLDFILES:
 		return __quota_proplib_getimplname(qh);
+
+	default:
+		break;
 	}
+	errno = EINVAL;
+	return NULL;
 }
 
 /* 

CVS commit: src/lib/libquota

2012-01-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jan 25 17:45:13 UTC 2012

Modified Files:
src/lib/libquota: Makefile

Log Message:
Add a preliminary man page for libquota.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libquota/Makefile

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

Modified files:

Index: src/lib/libquota/Makefile
diff -u src/lib/libquota/Makefile:1.5 src/lib/libquota/Makefile:1.6
--- src/lib/libquota/Makefile:1.5	Mon Jan  9 15:41:58 2012
+++ src/lib/libquota/Makefile	Wed Jan 25 17:45:13 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2012/01/09 15:41:58 dholland Exp $
+#	$NetBSD: Makefile,v 1.6 2012/01/25 17:45:13 dholland Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/4/93
 
 .include bsd.own.mk
@@ -12,7 +12,6 @@ LIBDPLIBS+= prop  ${.CURDIR}/../libp
 LIBDPLIBS+= rpcsvc  ${.CURDIR}/../librpcsvc
 
 SRCS+=	getfsquota.c getnfsquota.c getufsquota.c
-MAN=
 
 SRCS+=	quota_open.c
 SRCS+=	quota_schema.c
@@ -22,4 +21,27 @@ SRCS+=	quota_proplib.c
 SRCS+=	quota_nfs.c
 SRCS+=	quota_oldfiles.c
 
+MAN=	libquota.3
+MLINKS=	libquota.3 quota_close.3 \
+	libquota.3 quota_delete.3 \
+	libquota.3 quota_get.3 \
+	libquota.3 quota_getimplname.3 \
+	libquota.3 quota_getmountdevice.3 \
+	libquota.3 quota_getmountpoint.3 \
+	libquota.3 quota_getnumidtypes.3 \
+	libquota.3 quota_getnumobjtypes.3 \
+	libquota.3 quota_idtype_getname.3 \
+	libquota.3 quota_objtype_getname.3 \
+	libquota.3 quota_objtype_isbytes.3 \
+	libquota.3 quota_open.3 \
+	libquota.3 quota_opencursor.3 \
+	libquota.3 quota_put.3 \
+	libquota.3 quotacursor_atend.3 \
+	libquota.3 quotacursor_close.3 \
+	libquota.3 quotacursor_get.3 \
+	libquota.3 quotacursor_getn.3 \
+	libquota.3 quotacursor_rewind.3 \
+	libquota.3 quotacursor_skipidtype.3 \
+	libquota.3 quotaval_clear.3
+
 .include bsd.lib.mk



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

2012-01-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jan 25 17:54:34 UTC 2012

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

Log Message:
Set list update for libquota manpage


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

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1726 src/distrib/sets/lists/comp/mi:1.1727
--- src/distrib/sets/lists/comp/mi:1.1726	Wed Jan 18 17:32:41 2012
+++ src/distrib/sets/lists/comp/mi	Wed Jan 25 17:54:32 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1726 2012/01/18 17:32:41 riz Exp $
+#	$NetBSD: mi,v 1.1727 2012/01/25 17:54:32 dholland Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -7728,6 +7728,7 @@
 ./usr/share/man/cat3/libmj.0			comp-c-catman		crypto,.cat
 ./usr/share/man/cat3/libnetpgp.0		comp-c-catman		crypto,.cat
 ./usr/share/man/cat3/libperfuse.0		comp-perfuse-catman	.cat
+./usr/share/man/cat3/libquota.0			comp-c-catman		.cat
 ./usr/share/man/cat3/libradius.0		comp-c-catman		.cat
 ./usr/share/man/cat3/libsaslc.0			comp-c-catman		crypto,.cat
 ./usr/share/man/cat3/libusb.0			comp-obsolete		obsolete
@@ -8514,6 +8515,27 @@
 ./usr/share/man/cat3/qiflush.0			comp-c-catman		.cat
 ./usr/share/man/cat3/qsort.0			comp-c-catman		.cat
 ./usr/share/man/cat3/queue.0			comp-c-catman		.cat
+./usr/share/man/cat3/quota_close.0		comp-c-catman		.cat
+./usr/share/man/cat3/quota_delete.0		comp-c-catman		.cat
+./usr/share/man/cat3/quota_get.0		comp-c-catman		.cat
+./usr/share/man/cat3/quota_getimplname.0	comp-c-catman		.cat
+./usr/share/man/cat3/quota_getmountdevice.0	comp-c-catman		.cat
+./usr/share/man/cat3/quota_getmountpoint.0	comp-c-catman		.cat
+./usr/share/man/cat3/quota_getnumidtypes.0	comp-c-catman		.cat
+./usr/share/man/cat3/quota_getnumobjtypes.0	comp-c-catman		.cat
+./usr/share/man/cat3/quota_idtype_getname.0	comp-c-catman		.cat
+./usr/share/man/cat3/quota_objtype_getname.0	comp-c-catman		.cat
+./usr/share/man/cat3/quota_objtype_isbytes.0	comp-c-catman		.cat
+./usr/share/man/cat3/quota_open.0		comp-c-catman		.cat
+./usr/share/man/cat3/quota_opencursor.0		comp-c-catman		.cat
+./usr/share/man/cat3/quota_put.0		comp-c-catman		.cat
+./usr/share/man/cat3/quotacursor_atend.0	comp-c-catman		.cat
+./usr/share/man/cat3/quotacursor_close.0	comp-c-catman		.cat
+./usr/share/man/cat3/quotacursor_get.0		comp-c-catman		.cat
+./usr/share/man/cat3/quotacursor_getn.0		comp-c-catman		.cat
+./usr/share/man/cat3/quotacursor_rewind.0	comp-c-catman		.cat
+./usr/share/man/cat3/quotacursor_skipidtype.0	comp-c-catman		.cat
+./usr/share/man/cat3/quotaval_clear.0		comp-c-catman		.cat
 ./usr/share/man/cat3/radixsort.0		comp-c-catman		.cat
 ./usr/share/man/cat3/raise.0			comp-c-catman		.cat
 ./usr/share/man/cat3/raise_default_signal.0	comp-c-catman		.cat
@@ -13956,6 +13978,7 @@
 ./usr/share/man/html3/libmj.html		comp-c-htmlman		crypto,html
 ./usr/share/man/html3/libnetpgp.html		comp-c-htmlman		crypto,html
 ./usr/share/man/html3/libperfuse.html		comp-perfuse-htmlman	html
+./usr/share/man/html3/libquota.html		comp-c-htmlman		html
 ./usr/share/man/html3/libradius.html		comp-c-htmlman		html
 ./usr/share/man/html3/libsaslc.html		comp-c-htmlman		crypto,html
 ./usr/share/man/html3/libusbhid.html		comp-c-htmlman		html
@@ -14723,6 +14746,27 @@
 ./usr/share/man/html3/qiflush.html		comp-c-htmlman		html
 ./usr/share/man/html3/qsort.html		comp-c-htmlman		html
 ./usr/share/man/html3/queue.html		comp-c-htmlman		html
+./usr/share/man/html3/quota_close.html		comp-c-htmlman		html
+./usr/share/man/html3/quota_delete.html		comp-c-htmlman		html
+./usr/share/man/html3/quota_get.html		comp-c-htmlman		html
+./usr/share/man/html3/quota_getimplname.html	comp-c-htmlman		html
+./usr/share/man/html3/quota_getmountdevice.html	comp-c-htmlman		html
+./usr/share/man/html3/quota_getmountpoint.html	comp-c-htmlman		html
+./usr/share/man/html3/quota_getnumidtypes.html	comp-c-htmlman		html
+./usr/share/man/html3/quota_getnumobjtypes.html	comp-c-htmlman		html
+./usr/share/man/html3/quota_idtype_getname.html	comp-c-htmlman		html
+./usr/share/man/html3/quota_objtype_getname.html	comp-c-htmlman		html
+./usr/share/man/html3/quota_objtype_isbytes.html	comp-c-htmlman		html
+./usr/share/man/html3/quota_open.html		comp-c-htmlman		html
+./usr/share/man/html3/quota_opencursor.html	comp-c-htmlman		html
+./usr/share/man/html3/quota_put.html		comp-c-htmlman		html
+./usr/share/man/html3/quotacursor_atend.html	comp-c-htmlman		html
+./usr/share/man/html3/quotacursor_close.html	comp-c-htmlman		html
+./usr/share/man/html3/quotacursor_get.html	comp-c-htmlman		html
+./usr/share/man/html3/quotacursor_getn.html	comp-c-htmlman		html
+./usr/share/man/html3/quotacursor_rewind.html	comp-c-htmlman		html
+./usr/share/man/html3/quotacursor_skipidtype.html	comp-c-htmlman		html

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

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 18:02:17 UTC 2012

Modified Files:
src/sys/dev/pci [netbsd-5]: if_wm.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1699):
sys/dev/pci/if_wm.c: revision 1.225
There is problem with 82576 chips (and probably 82575 too) with hardware vlan
tagging: some packets are sent untagged on the wire.
Follow OpenBSD and disable hardware vlan tagging for these chips
(I couldn't find a hint in other open-source drivers at what could be
wrong ...)


To generate a diff of this commit:
cvs rdiff -u -r1.162.4.15 -r1.162.4.16 src/sys/dev/pci/if_wm.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_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.162.4.15 src/sys/dev/pci/if_wm.c:1.162.4.16
--- src/sys/dev/pci/if_wm.c:1.162.4.15	Mon Mar  7 04:14:19 2011
+++ src/sys/dev/pci/if_wm.c	Wed Jan 25 18:02:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.162.4.15 2011/03/07 04:14:19 riz Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.162.4.16 2012/01/25 18:02:17 riz Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.15 2011/03/07 04:14:19 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.16 2012/01/25 18:02:17 riz Exp $);
 
 #include bpfilter.h
 #include rnd.h
@@ -1818,7 +1818,9 @@ wm_attach(device_t parent, device_t self
 	/*
 	 * If we're a i82543 or greater, we can support VLANs.
 	 */
-	if (sc-sc_type = WM_T_82543)
+	if (sc-sc_type == WM_T_82575 || sc-sc_type == WM_T_82576)
+		sc-sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
+	else if (sc-sc_type = WM_T_82543)
 		sc-sc_ethercom.ec_capabilities |=
 		ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
 



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

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 18:02:45 UTC 2012

Modified Files:
src/sys/dev/ic [netbsd-5]: rtl8169.c rtl81x9reg.h rtl81x9var.h

Log Message:
Pull up following revision(s) (requested by garbled in ticket #1698):
sys/dev/ic/rtl81x9var.h: revision 1.52
sys/dev/ic/rtl8169.c: revision 1.134
sys/dev/ic/rtl81x9reg.h: revision 1.42
Add support to recognize the 8168E model of this chip.  Taken from FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.105.4.8 -r1.105.4.9 src/sys/dev/ic/rtl8169.c
cvs rdiff -u -r1.32.4.4 -r1.32.4.5 src/sys/dev/ic/rtl81x9reg.h
cvs rdiff -u -r1.41.12.5 -r1.41.12.6 src/sys/dev/ic/rtl81x9var.h

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

Modified files:

Index: src/sys/dev/ic/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.105.4.8 src/sys/dev/ic/rtl8169.c:1.105.4.9
--- src/sys/dev/ic/rtl8169.c:1.105.4.8	Fri Jun 19 21:51:43 2009
+++ src/sys/dev/ic/rtl8169.c	Wed Jan 25 18:02:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl8169.c,v 1.105.4.8 2009/06/19 21:51:43 snj Exp $	*/
+/*	$NetBSD: rtl8169.c,v 1.105.4.9 2012/01/25 18:02:44 riz Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.105.4.8 2009/06/19 21:51:43 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.105.4.9 2012/01/25 18:02:44 riz Exp $);
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -603,6 +603,11 @@ re_attach(struct rtk_softc *sc)
 			 */
 			sc-sc_quirk |= RTKQ_NOJUMBO;
 			break;
+		case RTK_HWREV_8168E:
+			sc-sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD |
+			RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_PHYWAKE_PM |
+			RTKQ_NOJUMBO;
+			break;
 		case RTK_HWREV_8100E:
 		case RTK_HWREV_8100E_SPIN2:
 		case RTK_HWREV_8101E:
@@ -661,6 +666,10 @@ re_attach(struct rtk_softc *sc)
 		}
 	}
 
+	/* Take PHY out of power down mode. */
+	if ((sc-sc_quirk  RTKQ_PHYWAKE_PM) != 0)
+		CSR_WRITE_1(sc, RTK_PMCH, CSR_READ_1(sc, RTK_PMCH) | 0x80);
+
 	aprint_normal_dev(sc-sc_dev, Ethernet address %s\n,
 	ether_sprintf(eaddr));
 

Index: src/sys/dev/ic/rtl81x9reg.h
diff -u src/sys/dev/ic/rtl81x9reg.h:1.32.4.4 src/sys/dev/ic/rtl81x9reg.h:1.32.4.5
--- src/sys/dev/ic/rtl81x9reg.h:1.32.4.4	Fri Jun 19 21:51:43 2009
+++ src/sys/dev/ic/rtl81x9reg.h	Wed Jan 25 18:02:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl81x9reg.h,v 1.32.4.4 2009/06/19 21:51:43 snj Exp $	*/
+/*	$NetBSD: rtl81x9reg.h,v 1.32.4.5 2012/01/25 18:02:45 riz Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -130,6 +130,7 @@
 #define RTK_CSIAR		0x0068  
 #define RTK_TBI_LPAR		0x006A
 #define RTK_GMEDIASTAT		0x006C	/* 8 bits */
+#define RTK_PMCH		0x006F	/* 8 bits */
 #define RTK_EPHYAR		0x0080
 #define RTK_LDPS		0x0082	/* Link Down Power Saving */
 #define RTK_DBG_REG		0x00D1
@@ -161,6 +162,7 @@
 #define RTK_HWREV_8103E		0x24C0
 #define RTK_HWREV_8168D		0x2800
 #define RTK_HWREV_8168DP	0x2880
+#define RTK_HWREV_8168E		0x2C00
 #define RTK_HWREV_8168_SPIN1	0x3000
 #define RTK_HWREV_8100E		0x3080
 #define RTK_HWREV_8101E		0x3400

Index: src/sys/dev/ic/rtl81x9var.h
diff -u src/sys/dev/ic/rtl81x9var.h:1.41.12.5 src/sys/dev/ic/rtl81x9var.h:1.41.12.6
--- src/sys/dev/ic/rtl81x9var.h:1.41.12.5	Fri Jun 19 21:51:43 2009
+++ src/sys/dev/ic/rtl81x9var.h	Wed Jan 25 18:02:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl81x9var.h,v 1.41.12.5 2009/06/19 21:51:43 snj Exp $	*/
+/*	$NetBSD: rtl81x9var.h,v 1.41.12.6 2012/01/25 18:02:44 riz Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -194,6 +194,7 @@ struct rtk_softc {
 #define RTKQ_NOEECMD		0x0080	/* unusable EEPROM command */
 #define RTKQ_MACSTAT		0x0100	/* set MACSTAT_DIS on init */
 #define RTKQ_CMDSTOP		0x0200	/* set STOPREQ on stop */
+#define RTKQ_PHYWAKE_PM		0x0400	/* wake PHY from power down */
 
 	bus_dma_tag_t 		sc_dmat;
 



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

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 18:06:27 UTC 2012

Modified Files:
src/sys/dev [netbsd-5]: fss.c fssvar.h

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1700):
sys/dev/fss.c: revision 1.79
sys/dev/fssvar.h: revision 1.26
Fix FSSIOCSET50: needs to use the 5.0 struct fss_set, not the current one.


To generate a diff of this commit:
cvs rdiff -u -r1.60.4.4 -r1.60.4.5 src/sys/dev/fss.c
cvs rdiff -u -r1.23.4.1 -r1.23.4.2 src/sys/dev/fssvar.h

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

Modified files:

Index: src/sys/dev/fss.c
diff -u src/sys/dev/fss.c:1.60.4.4 src/sys/dev/fss.c:1.60.4.5
--- src/sys/dev/fss.c:1.60.4.4	Sat Jun 18 17:00:25 2011
+++ src/sys/dev/fss.c	Wed Jan 25 18:06:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.60.4.4 2011/06/18 17:00:25 bouyer Exp $	*/
+/*	$NetBSD: fss.c,v 1.60.4.5 2012/01/25 18:06:26 riz Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fss.c,v 1.60.4.4 2011/06/18 17:00:25 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: fss.c,v 1.60.4.5 2012/01/25 18:06:26 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -298,11 +298,17 @@ fss_ioctl(dev_t dev, u_long cmd, void *d
 {
 	int error;
 	struct fss_softc *sc = device_lookup_private(fss_cd, minor(dev));
+	struct fss_set _fss;
 	struct fss_set *fss = (struct fss_set *)data;
+	struct fss_set50 *fss50 = (struct fss_set50 *)data;
 	struct fss_get *fsg = (struct fss_get *)data;
 
 	switch (cmd) {
 	case FSSIOCSET50:
+		fss = _fss;
+		fss-fss_mount = fss50-fss_mount;
+		fss-fss_bstore = fss50-fss_bstore;
+		fss-fss_csize = fss50-fss_csize;
 		fss-fss_flags = 0;
 		/* Fall through */
 	case FSSIOCSET:

Index: src/sys/dev/fssvar.h
diff -u src/sys/dev/fssvar.h:1.23.4.1 src/sys/dev/fssvar.h:1.23.4.2
--- src/sys/dev/fssvar.h:1.23.4.1	Sat Jun 18 17:00:25 2011
+++ src/sys/dev/fssvar.h	Wed Jan 25 18:06:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fssvar.h,v 1.23.4.1 2011/06/18 17:00:25 bouyer Exp $	*/
+/*	$NetBSD: fssvar.h,v 1.23.4.2 2012/01/25 18:06:27 riz Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -37,6 +37,12 @@
 #define FSS_UNCONFIG_ON_CLOSE	0x01	/* Unconfigure on last close */
 #define FSS_UNLINK_ON_CREATE	0x02	/* Unlink backing store on create */
 
+struct fss_set50 {
+	char		*fss_mount;	/* Mount point of file system */
+	char		*fss_bstore;	/* Path of backing store */
+	blksize_t	fss_csize;	/* Preferred cluster size */
+};
+
 struct fss_set {
 	char		*fss_mount;	/* Mount point of file system */
 	char		*fss_bstore;	/* Path of backing store */
@@ -57,7 +63,7 @@ struct fss_get {
 #define FSSIOCCLR	_IO('F', 2)			/* Unconfigure */
 #define FSSIOFSET	_IOW('F', 3, int)		/* Set flags */
 #define FSSIOFGET	_IOR('F', 4, int)		/* Get flags */
-#define FSSIOCSET50	_IOW('F', 0, struct fss_set)	/* Old configure */
+#define FSSIOCSET50	_IOW('F', 0, struct fss_set50)	/* Old configure */
 
 #ifdef _KERNEL
 



CVS commit: [netbsd-5] src/doc

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 18:08:17 UTC 2012

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

Log Message:
Tickets 1699, 1700


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.127 -r1.1.2.128 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.127 src/doc/CHANGES-5.2:1.1.2.128
--- src/doc/CHANGES-5.2:1.1.2.127	Wed Jan 25 17:36:37 2012
+++ src/doc/CHANGES-5.2	Wed Jan 25 18:08:17 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.127 2012/01/25 17:36:37 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.128 2012/01/25 18:08:17 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5877,3 +5877,15 @@ sys/dev/ic/rtl81x9var.h1.52
 	Add support to recognize the 8168E model of this chip.
 	[garbled, ticket #1698]
 
+sys/dev/pci/if_wm.c1.225
+
+	Disable hardware vlan tagging on 82576 chips.
+	[bouyer, ticket #1699]
+
+sys/dev/fss.c	1.79
+sys/dev/fssvar.h1.26
+
+	Fix FSSIOCSET50: needs to use the 5.0 struct fss_set, not the current
+	one.
+	[bouyer, ticket #1700]
+



CVS commit: src/sys/arch/alpha/include

2012-01-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jan 25 18:09:13 UTC 2012

Modified Files:
src/sys/arch/alpha/include: types.h

Log Message:
Enable direct-mapped uareas for alpha.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/include/types.h

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

Modified files:

Index: src/sys/arch/alpha/include/types.h
diff -u src/sys/arch/alpha/include/types.h:1.48 src/sys/arch/alpha/include/types.h:1.49
--- src/sys/arch/alpha/include/types.h:1.48	Wed Jul 13 04:48:18 2011
+++ src/sys/arch/alpha/include/types.h	Wed Jan 25 18:09:13 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.48 2011/07/13 04:48:18 dyoung Exp $ */
+/* $NetBSD: types.h,v 1.49 2012/01/25 18:09:13 matt Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -77,6 +77,7 @@ typedef	volatile int		__cpu_simple_lock_
 #define	__HAVE_ATOMIC64_OPS
 #define	__HAVE_MM_MD_DIRECT_MAPPED_IO
 #define	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
+#define	__HAVE_CPU_UAREA_ROUTINES
 #define	__HAVE_CPU_LWP_SETPRIVATE
 #define	__HAVE___LWP_GETPRIVATE_FAST
 #define	__HAVE_COMMON___TLS_GET_ADDR



CVS commit: [netbsd-5] src/doc

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 18:24:07 UTC 2012

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

Log Message:
TIckets 1701, 1702, 1706


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.128 -r1.1.2.129 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.128 src/doc/CHANGES-5.2:1.1.2.129
--- src/doc/CHANGES-5.2:1.1.2.128	Wed Jan 25 18:08:17 2012
+++ src/doc/CHANGES-5.2	Wed Jan 25 18:24:06 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.128 2012/01/25 18:08:17 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.129 2012/01/25 18:24:06 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5889,3 +5889,20 @@ sys/dev/fssvar.h1.26
 	one.
 	[bouyer, ticket #1700]
 
+sys/dev/mii/mii_physubr.c			1.73 via patch
+
+	Make 1000baseT connections work properly when specified with
+	ifconfig(8).  PR#20700.
+	[buhrow, ticket #1701]
+
+sys/ufs/ffs/ffs_inode.c1.108
+sys/ufs/lfs/lfs_inode.c1.126
+
+	Fix ufs/lfs file truncation.
+	[bouyer, ticket #1702]
+
+lib/libpuffs/puffs.c1.108
+
+	Signal pathconf in the vector of supported ops.
+	[manu, ticket #1706]
+



CVS commit: src/sys

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 18:26:26 UTC 2012

Modified Files:
src/sys/kern: kern_exec.c
src/sys/sys: param.h

Log Message:
Add a macro to align the length of the stack, not the pointer itself, since
we always want the alignment to grow the length.


To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.400 -r1.401 src/sys/sys/param.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_exec.c
diff -u src/sys/kern/kern_exec.c:1.334 src/sys/kern/kern_exec.c:1.335
--- src/sys/kern/kern_exec.c:1.334	Tue Jan 24 15:03:36 2012
+++ src/sys/kern/kern_exec.c	Wed Jan 25 13:26:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.334 2012/01/24 20:03:36 christos Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.335 2012/01/25 18:26:26 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.334 2012/01/24 20:03:36 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.335 2012/01/25 18:26:26 christos Exp $);
 
 #include opt_exec.h
 #include opt_ktrace.h
@@ -793,7 +793,7 @@ execve1(struct lwp *l, const char *path,
 #endif /* PAX_ASLR */
 
 	/* make the stack safely aligned */
-	len = (size_t)STACK_ALIGN(len, STACK_ALIGNBYTES);
+	len = STACK_LEN_ALIGN(len, STACK_ALIGNBYTES);
 
 	if (len  pack.ep_ssize) { /* in effect, compare to initial limit */
 		DPRINTF((%s: stack limit exceeded %zu\n, __func__, len));

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.400 src/sys/sys/param.h:1.401
--- src/sys/sys/param.h:1.400	Tue Jan 24 15:03:36 2012
+++ src/sys/sys/param.h	Wed Jan 25 13:26:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.400 2012/01/24 20:03:36 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.401 2012/01/25 18:26:26 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -224,6 +224,7 @@
 #define	STACK_ALLOC(sp, _size)		(((char *)(void *)(sp)) - (_size))
 #define	STACK_MAX(p, _size)		((char *)(void *)(p))
 #endif
+#define	STACK_LEN_ALIGN(len, bytes)	((len) + bytes)  ~bytes)
 
 #endif /* defined(_KERNEL) || defined(__EXPOSE_STACK) */
 



CVS commit: [netbsd-5] src/doc

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 18:46:35 UTC 2012

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

Log Message:
Ticket 1709.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.129 -r1.1.2.130 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.129 src/doc/CHANGES-5.2:1.1.2.130
--- src/doc/CHANGES-5.2:1.1.2.129	Wed Jan 25 18:24:06 2012
+++ src/doc/CHANGES-5.2	Wed Jan 25 18:46:35 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.129 2012/01/25 18:24:06 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.130 2012/01/25 18:46:35 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5906,3 +5906,11 @@ lib/libpuffs/puffs.c1.108
 	Signal pathconf in the vector of supported ops.
 	[manu, ticket #1706]
 
+distrib/amd64/ramdisks/ramdisk/list		1.14 via patch
+distrib/i386/ramdisks/ramdisk-big/list		1.6 via patch
+
+	Add /sbin/dkctl to the install ramdisk. This allows you to drop
+	to a command prompt and enable writecaches before installing,
+	if necessary.
+	[sborrill, ticket #1709]
+



CVS commit: [netbsd-5] src/crypto/dist/openssl/ssl

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 18:54:22 UTC 2012

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5]: d1_pkt.c

Log Message:
Apply patch (requested by drochner in ticket #1710):
crypto/dist/openssl/ssl/d1_pkt.c

Address CVS-2012-0050.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5.4.1 -r1.1.1.5.4.2 src/crypto/dist/openssl/ssl/d1_pkt.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/d1_pkt.c
diff -u src/crypto/dist/openssl/ssl/d1_pkt.c:1.1.1.5.4.1 src/crypto/dist/openssl/ssl/d1_pkt.c:1.1.1.5.4.2
--- src/crypto/dist/openssl/ssl/d1_pkt.c:1.1.1.5.4.1	Sun Jul  5 00:34:52 2009
+++ src/crypto/dist/openssl/ssl/d1_pkt.c	Wed Jan 25 18:54:22 2012
@@ -375,6 +375,8 @@ dtls1_process_record(SSL *s)
 	SSL3_RECORD *rr;
 	unsigned int mac_size;
 	unsigned char md[EVP_MAX_MD_SIZE];
+	int decryption_failed_or_bad_record_mac = 0;
+	unsigned char *mac = NULL;
 
 
 	rr= (s-s3-rrec);
@@ -409,12 +411,10 @@ dtls1_process_record(SSL *s)
 	enc_err = s-method-ssl3_enc-enc(s,0);
 	if (enc_err = 0)
 		{
-		if (enc_err == 0)
-			/* SSLerr() and ssl3_send_alert() have been called */
-			goto err;
-
-		/* otherwise enc_err == -1 */
-		goto decryption_failed_or_bad_record_mac;
+		/* To minimize information leaked via timing, we will always
+		 * perform all computations before discarding the message.
+		 */
+		decryption_failed_or_bad_record_mac = 1;
 		}
 
 #ifdef TLS_DEBUG
@@ -440,28 +440,32 @@ printf(\n);
 			SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_PRE_MAC_LENGTH_TOO_LONG);
 			goto f_err;
 #else
-			goto decryption_failed_or_bad_record_mac;
+			decryption_failed_or_bad_record_mac = 1;
 #endif			
 			}
 		/* check the MAC for rr-input (it's in mac_size bytes at the tail) */
-		if (rr-length  mac_size)
+		if (rr-length = mac_size)
 			{
-#if 0 /* OK only for stream ciphers */
-			al=SSL_AD_DECODE_ERROR;
-			SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_LENGTH_TOO_SHORT);
-			goto f_err;
-#else
-			goto decryption_failed_or_bad_record_mac;
-#endif
+			rr-length -= mac_size;
+			mac = rr-data[rr-length];
 			}
-		rr-length-=mac_size;
+		else
+			rr-length = 0;
 		i=s-method-ssl3_enc-mac(s,md,0);
-		if (memcmp(md,(rr-data[rr-length]),mac_size) != 0)
+		if (i  0 || mac == NULL || memcmp(md, mac, mac_size) != 0)
 			{
-			goto decryption_failed_or_bad_record_mac;
+			decryption_failed_or_bad_record_mac = 1;
 			}
 		}
 
+	if (decryption_failed_or_bad_record_mac)
+		{
+		/* decryption failed, silently discard message */
+		rr-length = 0;
+		s-packet_length = 0;
+		goto err;
+		}
+
 	/* r-length is now just compressed */
 	if (s-expand != NULL)
 		{
@@ -500,14 +504,6 @@ printf(\n);
 	dtls1_record_bitmap_update(s, (s-d1-bitmap));/* Mark receipt of record. */
 	return(1);
 
-decryption_failed_or_bad_record_mac:
-	/* Separate 'decryption_failed' alert was introduced with TLS 1.0,
-	 * SSL 3.0 only has 'bad_record_mac'.  But unless a decryption
-	 * failure is directly visible from the ciphertext anyway,
-	 * we should not reveal which kind of error occured -- this
-	 * might become visible to an attacker (e.g. via logfile) */
-	al=SSL_AD_BAD_RECORD_MAC;
-	SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
 f_err:
 	ssl3_send_alert(s,SSL3_AL_FATAL,al);
 err:



CVS commit: [netbsd-5-1] src/crypto/dist/openssl/ssl

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 18:54:43 UTC 2012

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5-1]: d1_pkt.c

Log Message:
Apply patch (requested by drochner in ticket #1710):
crypto/dist/openssl/ssl/d1_pkt.c

Address CVS-2012-0050.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5.4.1 -r1.1.1.5.4.1.2.1 \
src/crypto/dist/openssl/ssl/d1_pkt.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/d1_pkt.c
diff -u src/crypto/dist/openssl/ssl/d1_pkt.c:1.1.1.5.4.1 src/crypto/dist/openssl/ssl/d1_pkt.c:1.1.1.5.4.1.2.1
--- src/crypto/dist/openssl/ssl/d1_pkt.c:1.1.1.5.4.1	Sun Jul  5 00:34:52 2009
+++ src/crypto/dist/openssl/ssl/d1_pkt.c	Wed Jan 25 18:54:43 2012
@@ -375,6 +375,8 @@ dtls1_process_record(SSL *s)
 	SSL3_RECORD *rr;
 	unsigned int mac_size;
 	unsigned char md[EVP_MAX_MD_SIZE];
+	int decryption_failed_or_bad_record_mac = 0;
+	unsigned char *mac = NULL;
 
 
 	rr= (s-s3-rrec);
@@ -409,12 +411,10 @@ dtls1_process_record(SSL *s)
 	enc_err = s-method-ssl3_enc-enc(s,0);
 	if (enc_err = 0)
 		{
-		if (enc_err == 0)
-			/* SSLerr() and ssl3_send_alert() have been called */
-			goto err;
-
-		/* otherwise enc_err == -1 */
-		goto decryption_failed_or_bad_record_mac;
+		/* To minimize information leaked via timing, we will always
+		 * perform all computations before discarding the message.
+		 */
+		decryption_failed_or_bad_record_mac = 1;
 		}
 
 #ifdef TLS_DEBUG
@@ -440,28 +440,32 @@ printf(\n);
 			SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_PRE_MAC_LENGTH_TOO_LONG);
 			goto f_err;
 #else
-			goto decryption_failed_or_bad_record_mac;
+			decryption_failed_or_bad_record_mac = 1;
 #endif			
 			}
 		/* check the MAC for rr-input (it's in mac_size bytes at the tail) */
-		if (rr-length  mac_size)
+		if (rr-length = mac_size)
 			{
-#if 0 /* OK only for stream ciphers */
-			al=SSL_AD_DECODE_ERROR;
-			SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_LENGTH_TOO_SHORT);
-			goto f_err;
-#else
-			goto decryption_failed_or_bad_record_mac;
-#endif
+			rr-length -= mac_size;
+			mac = rr-data[rr-length];
 			}
-		rr-length-=mac_size;
+		else
+			rr-length = 0;
 		i=s-method-ssl3_enc-mac(s,md,0);
-		if (memcmp(md,(rr-data[rr-length]),mac_size) != 0)
+		if (i  0 || mac == NULL || memcmp(md, mac, mac_size) != 0)
 			{
-			goto decryption_failed_or_bad_record_mac;
+			decryption_failed_or_bad_record_mac = 1;
 			}
 		}
 
+	if (decryption_failed_or_bad_record_mac)
+		{
+		/* decryption failed, silently discard message */
+		rr-length = 0;
+		s-packet_length = 0;
+		goto err;
+		}
+
 	/* r-length is now just compressed */
 	if (s-expand != NULL)
 		{
@@ -500,14 +504,6 @@ printf(\n);
 	dtls1_record_bitmap_update(s, (s-d1-bitmap));/* Mark receipt of record. */
 	return(1);
 
-decryption_failed_or_bad_record_mac:
-	/* Separate 'decryption_failed' alert was introduced with TLS 1.0,
-	 * SSL 3.0 only has 'bad_record_mac'.  But unless a decryption
-	 * failure is directly visible from the ciphertext anyway,
-	 * we should not reveal which kind of error occured -- this
-	 * might become visible to an attacker (e.g. via logfile) */
-	al=SSL_AD_BAD_RECORD_MAC;
-	SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
 f_err:
 	ssl3_send_alert(s,SSL3_AL_FATAL,al);
 err:



CVS commit: [netbsd-5-0] src/crypto/dist/openssl/ssl

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 18:55:04 UTC 2012

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5-0]: d1_pkt.c

Log Message:
Apply patch (requested by drochner in ticket #1710):
crypto/dist/openssl/ssl/d1_pkt.c

Address CVS-2012-0050.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5.8.1 -r1.1.1.5.8.2 src/crypto/dist/openssl/ssl/d1_pkt.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/d1_pkt.c
diff -u src/crypto/dist/openssl/ssl/d1_pkt.c:1.1.1.5.8.1 src/crypto/dist/openssl/ssl/d1_pkt.c:1.1.1.5.8.2
--- src/crypto/dist/openssl/ssl/d1_pkt.c:1.1.1.5.8.1	Sun Jul  5 00:31:20 2009
+++ src/crypto/dist/openssl/ssl/d1_pkt.c	Wed Jan 25 18:55:04 2012
@@ -375,6 +375,8 @@ dtls1_process_record(SSL *s)
 	SSL3_RECORD *rr;
 	unsigned int mac_size;
 	unsigned char md[EVP_MAX_MD_SIZE];
+	int decryption_failed_or_bad_record_mac = 0;
+	unsigned char *mac = NULL;
 
 
 	rr= (s-s3-rrec);
@@ -409,12 +411,10 @@ dtls1_process_record(SSL *s)
 	enc_err = s-method-ssl3_enc-enc(s,0);
 	if (enc_err = 0)
 		{
-		if (enc_err == 0)
-			/* SSLerr() and ssl3_send_alert() have been called */
-			goto err;
-
-		/* otherwise enc_err == -1 */
-		goto decryption_failed_or_bad_record_mac;
+		/* To minimize information leaked via timing, we will always
+		 * perform all computations before discarding the message.
+		 */
+		decryption_failed_or_bad_record_mac = 1;
 		}
 
 #ifdef TLS_DEBUG
@@ -440,28 +440,32 @@ printf(\n);
 			SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_PRE_MAC_LENGTH_TOO_LONG);
 			goto f_err;
 #else
-			goto decryption_failed_or_bad_record_mac;
+			decryption_failed_or_bad_record_mac = 1;
 #endif			
 			}
 		/* check the MAC for rr-input (it's in mac_size bytes at the tail) */
-		if (rr-length  mac_size)
+		if (rr-length = mac_size)
 			{
-#if 0 /* OK only for stream ciphers */
-			al=SSL_AD_DECODE_ERROR;
-			SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_LENGTH_TOO_SHORT);
-			goto f_err;
-#else
-			goto decryption_failed_or_bad_record_mac;
-#endif
+			rr-length -= mac_size;
+			mac = rr-data[rr-length];
 			}
-		rr-length-=mac_size;
+		else
+			rr-length = 0;
 		i=s-method-ssl3_enc-mac(s,md,0);
-		if (memcmp(md,(rr-data[rr-length]),mac_size) != 0)
+		if (i  0 || mac == NULL || memcmp(md, mac, mac_size) != 0)
 			{
-			goto decryption_failed_or_bad_record_mac;
+			decryption_failed_or_bad_record_mac = 1;
 			}
 		}
 
+	if (decryption_failed_or_bad_record_mac)
+		{
+		/* decryption failed, silently discard message */
+		rr-length = 0;
+		s-packet_length = 0;
+		goto err;
+		}
+
 	/* r-length is now just compressed */
 	if (s-expand != NULL)
 		{
@@ -500,14 +504,6 @@ printf(\n);
 	dtls1_record_bitmap_update(s, (s-d1-bitmap));/* Mark receipt of record. */
 	return(1);
 
-decryption_failed_or_bad_record_mac:
-	/* Separate 'decryption_failed' alert was introduced with TLS 1.0,
-	 * SSL 3.0 only has 'bad_record_mac'.  But unless a decryption
-	 * failure is directly visible from the ciphertext anyway,
-	 * we should not reveal which kind of error occured -- this
-	 * might become visible to an attacker (e.g. via logfile) */
-	al=SSL_AD_BAD_RECORD_MAC;
-	SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
 f_err:
 	ssl3_send_alert(s,SSL3_AL_FATAL,al);
 err:



CVS commit: src/distrib/utils/sysinst/arch/sandpoint

2012-01-25 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Wed Jan 25 19:03:35 UTC 2012

Modified Files:
src/distrib/utils/sysinst/arch/sandpoint: md.c

Log Message:
netboot is called altboot now


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/distrib/utils/sysinst/arch/sandpoint/md.c

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/sysinst/arch/sandpoint/md.c
diff -u src/distrib/utils/sysinst/arch/sandpoint/md.c:1.38 src/distrib/utils/sysinst/arch/sandpoint/md.c:1.39
--- src/distrib/utils/sysinst/arch/sandpoint/md.c:1.38	Fri Jan  6 20:52:43 2012
+++ src/distrib/utils/sysinst/arch/sandpoint/md.c	Wed Jan 25 19:03:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.38 2012/01/06 20:52:43 riz Exp $ */
+/*	$NetBSD: md.c,v 1.39 2012/01/25 19:03:35 phx Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -153,7 +153,7 @@ md_post_disklabel(void)
 int
 md_post_newfs(void)
 {
-	/* no boot blocks, we are using netboot */
+	/* no boot blocks, we are using altboot */
 	return 0;
 }
 



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

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 19:24:21 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: ppcnbsd-nat.c

Log Message:
make powerpc compile.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.4	Sun Jan 22 15:27:28 2012
+++ src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c	Wed Jan 25 14:24:21 2012
@@ -39,6 +39,16 @@
 #include bsd-kvm.h
 #include inf-ptrace.h
 
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T
+typedef struct fpreg fpregset_t;
+#endif
+#include gregset.h
+ 
+
 /* Returns true if PT_GETREGS fetches this register.  */
 
 static int
@@ -149,6 +159,38 @@ ppcnbsd_store_inferior_registers (struct
 }
 }
 
+void
+supply_gregset (struct regcache *regcache, const gregset_t *gregs)
+{
+  if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+	  (PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1)
+perror_with_name (_(Couldn't write registers));
+}
+
+void
+supply_fpregset (struct regcache *regcache, const fpregset_t *fpregs)
+{
+  if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+	  (PTRACE_TYPE_ARG3) fpregs, TIDGET (inferior_ptid)) == -1)
+perror_with_name (_(Couldn't set FP registers));
+}
+
+void
+fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum)
+{
+  if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1)
+perror_with_name (_(Couldn't get registers));
+}
+
+void
+fill_fpregset (const struct regcache *regcache, fpregset_t *fpregs, int regnum)
+{
+  if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+		  (PTRACE_TYPE_ARG3) fpregs, TIDGET (inferior_ptid)) == -1)
+	perror_with_name (_(Couldn't get FP registers));
+}
+
 static int
 ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
 {



CVS commit: src/sys/sys

2012-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 19:39:07 UTC 2012

Modified Files:
src/sys/sys: param.h

Log Message:
missing paren


To generate a diff of this commit:
cvs rdiff -u -r1.401 -r1.402 src/sys/sys/param.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/sys/param.h
diff -u src/sys/sys/param.h:1.401 src/sys/sys/param.h:1.402
--- src/sys/sys/param.h:1.401	Wed Jan 25 13:26:26 2012
+++ src/sys/sys/param.h	Wed Jan 25 14:39:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.401 2012/01/25 18:26:26 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.402 2012/01/25 19:39:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -224,7 +224,7 @@
 #define	STACK_ALLOC(sp, _size)		(((char *)(void *)(sp)) - (_size))
 #define	STACK_MAX(p, _size)		((char *)(void *)(p))
 #endif
-#define	STACK_LEN_ALIGN(len, bytes)	((len) + bytes)  ~bytes)
+#define	STACK_LEN_ALIGN(len, bytes)	(((len) + bytes)  ~bytes)
 
 #endif /* defined(_KERNEL) || defined(__EXPOSE_STACK) */
 



CVS commit: src/sys/sys

2012-01-25 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Wed Jan 25 19:47:19 UTC 2012

Modified Files:
src/sys/sys: param.h

Log Message:
Add brackets arround macro arguments to avoid nasty problem caused by
macro expansion.


To generate a diff of this commit:
cvs rdiff -u -r1.402 -r1.403 src/sys/sys/param.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/sys/param.h
diff -u src/sys/sys/param.h:1.402 src/sys/sys/param.h:1.403
--- src/sys/sys/param.h:1.402	Wed Jan 25 19:39:07 2012
+++ src/sys/sys/param.h	Wed Jan 25 19:47:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.402 2012/01/25 19:39:07 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.403 2012/01/25 19:47:18 tron Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -224,7 +224,7 @@
 #define	STACK_ALLOC(sp, _size)		(((char *)(void *)(sp)) - (_size))
 #define	STACK_MAX(p, _size)		((char *)(void *)(p))
 #endif
-#define	STACK_LEN_ALIGN(len, bytes)	(((len) + bytes)  ~bytes)
+#define	STACK_LEN_ALIGN(len, bytes)	(((len) + (bytes))  ~(bytes))
 
 #endif /* defined(_KERNEL) || defined(__EXPOSE_STACK) */
 



CVS commit: src/sys/dev/rasops

2012-01-25 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan 25 20:18:05 UTC 2012

Modified Files:
src/sys/dev/rasops: rasops8.c

Log Message:
use memset() to clear character cells instead of being terribly slow


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/rasops/rasops8.c

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

Modified files:

Index: src/sys/dev/rasops/rasops8.c
diff -u src/sys/dev/rasops/rasops8.c:1.31 src/sys/dev/rasops/rasops8.c:1.32
--- src/sys/dev/rasops/rasops8.c:1.31	Wed Jan 25 16:38:27 2012
+++ src/sys/dev/rasops/rasops8.c	Wed Jan 25 20:18:04 2012
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops8.c,v 1.31 2012/01/25 16:38:27 macallan Exp $	*/
+/* 	$NetBSD: rasops8.c,v 1.32 2012/01/25 20:18:04 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rasops8.c,v 1.31 2012/01/25 16:38:27 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: rasops8.c,v 1.32 2012/01/25 20:18:04 macallan Exp $);
 
 #include opt_rasops.h
 
@@ -144,18 +144,12 @@ rasops8_putchar(void *cookie, int row, i
 		u_char c = clr[0];
 
 		while (height--) {
-			dp = rp;
-			rp += ri-ri_stride;
+			memset(rp, c, width);
 			if (ri-ri_hwbits) {
-hp = hrp;
+memset(hrp, c, width);
 hrp += ri-ri_stride;
 			}
-
-			for (cnt = width; cnt; cnt--) {
-*dp++ = c;
-if (ri-ri_hwbits)
-	*hp++ = c;
-			}
+			rp += ri-ri_stride;
 		}
 	} else {
 		fr = WSFONT_GLYPH(uc, font);
@@ -199,7 +193,7 @@ rasops8_putchar(void *cookie, int row, i
 static void
 rasops8_putchar_aa(void *cookie, int row, int col, u_int uc, long attr)
 {
-	int width, height, cnt, fs;
+	int width, height, fs;
 	u_char *dp, *rp, *hp, *hrp, *fr, bg, fg, pixel;
 	struct rasops_info *ri = (struct rasops_info *)cookie;
 	struct wsdisplay_font *font = PICK_FONT(ri, uc);
@@ -233,18 +227,12 @@ rasops8_putchar_aa(void *cookie, int row
 	if (uc == ' ') {
 
 		while (height--) {
-			dp = rp;
-			rp += ri-ri_stride;
+			memset(rp, bg, width);
 			if (ri-ri_hwbits) {
-hp = hrp;
+memset(hrp, bg, width);
 hrp += ri-ri_stride;
 			}
-
-			for (cnt = width; cnt; cnt--) {
-*dp++ = bg;
-if (ri-ri_hwbits)
-	*hp++ = bg;
-			}
+			rp += ri-ri_stride;
 		}
 	} else {
 		fr = WSFONT_GLYPH(uc, font);



CVS commit: [netbsd-5-0] src/crypto/dist/openssl/crypto/x509v3

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:18:49 UTC 2012

Modified Files:
src/crypto/dist/openssl/crypto/x509v3 [netbsd-5-0]: pcy_map.c
pcy_tree.c

Log Message:
Apply patch (requested by drochner in ticket #1711):
crypto/dist/openssl/crypto/x509v3/pcy_map.c patch
crypto/dist/openssl/crypto/x509v3/pcy_tree.cpatch

Address CVE-2011-4109.
[drochner, ticket #1711]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.30.1 \
src/crypto/dist/openssl/crypto/x509v3/pcy_map.c
cvs rdiff -u -r1.1.1.4 -r1.1.1.4.8.1 \
src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c

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

Modified files:

Index: src/crypto/dist/openssl/crypto/x509v3/pcy_map.c
diff -u src/crypto/dist/openssl/crypto/x509v3/pcy_map.c:1.1.1.1 src/crypto/dist/openssl/crypto/x509v3/pcy_map.c:1.1.1.1.30.1
--- src/crypto/dist/openssl/crypto/x509v3/pcy_map.c:1.1.1.1	Fri Nov 25 03:07:35 2005
+++ src/crypto/dist/openssl/crypto/x509v3/pcy_map.c	Wed Jan 25 20:18:48 2012
@@ -70,8 +70,6 @@ static int ref_cmp(const X509_POLICY_REF
 
 static void policy_map_free(X509_POLICY_REF *map)
 	{
-	if (map-subjectDomainPolicy)
-		ASN1_OBJECT_free(map-subjectDomainPolicy);
 	OPENSSL_free(map);
 	}
 
@@ -95,6 +93,7 @@ int policy_cache_set_mapping(X509 *x, PO
 	{
 	POLICY_MAPPING *map;
 	X509_POLICY_REF *ref = NULL;
+	ASN1_OBJECT *subjectDomainPolicyRef;
 	X509_POLICY_DATA *data;
 	X509_POLICY_CACHE *cache = x-policy_cache;
 	int i;
@@ -153,13 +152,16 @@ int policy_cache_set_mapping(X509 *x, PO
 		if (!sk_ASN1_OBJECT_push(data-expected_policy_set, 
 		map-subjectDomainPolicy))
 			goto bad_mapping;
+		/* map-subjectDomainPolicy will be freed when
+		 * cache-data is freed. Set it to NULL to avoid double-free. */
+		subjectDomainPolicyRef = map-subjectDomainPolicy;
+		map-subjectDomainPolicy = NULL;
 		
 		ref = OPENSSL_malloc(sizeof(X509_POLICY_REF));
 		if (!ref)
 			goto bad_mapping;
 
-		ref-subjectDomainPolicy = map-subjectDomainPolicy;
-		map-subjectDomainPolicy = NULL;
+		ref-subjectDomainPolicy = subjectDomainPolicyRef;
 		ref-data = data;
 
 		if (!sk_X509_POLICY_REF_push(cache-maps, ref))

Index: src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c
diff -u src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c:1.1.1.4 src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c:1.1.1.4.8.1
--- src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c:1.1.1.4	Fri May  9 21:34:38 2008
+++ src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c	Wed Jan 25 20:18:48 2012
@@ -611,6 +611,10 @@ int X509_policy_check(X509_POLICY_TREE *
 		return 1;
 
 		/* Some internal error */
+		case -1:
+		return -1;
+
+		/* Some internal error */
 		case 0:
 		return 0;
 



CVS commit: [netbsd-5-1] src/crypto/dist/openssl/crypto/x509v3

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:19:58 UTC 2012

Modified Files:
src/crypto/dist/openssl/crypto/x509v3 [netbsd-5-1]: pcy_map.c
pcy_tree.c

Log Message:
Apply patch (requested by drochner in ticket #1711):
crypto/dist/openssl/crypto/x509v3/pcy_map.c patch
crypto/dist/openssl/crypto/x509v3/pcy_tree.cpatch

Address CVE-2011-4109.
[drochner, ticket #1711]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.34.1 \
src/crypto/dist/openssl/crypto/x509v3/pcy_map.c
cvs rdiff -u -r1.1.1.4 -r1.1.1.4.12.1 \
src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c

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

Modified files:

Index: src/crypto/dist/openssl/crypto/x509v3/pcy_map.c
diff -u src/crypto/dist/openssl/crypto/x509v3/pcy_map.c:1.1.1.1 src/crypto/dist/openssl/crypto/x509v3/pcy_map.c:1.1.1.1.34.1
--- src/crypto/dist/openssl/crypto/x509v3/pcy_map.c:1.1.1.1	Fri Nov 25 03:07:35 2005
+++ src/crypto/dist/openssl/crypto/x509v3/pcy_map.c	Wed Jan 25 20:19:58 2012
@@ -70,8 +70,6 @@ static int ref_cmp(const X509_POLICY_REF
 
 static void policy_map_free(X509_POLICY_REF *map)
 	{
-	if (map-subjectDomainPolicy)
-		ASN1_OBJECT_free(map-subjectDomainPolicy);
 	OPENSSL_free(map);
 	}
 
@@ -95,6 +93,7 @@ int policy_cache_set_mapping(X509 *x, PO
 	{
 	POLICY_MAPPING *map;
 	X509_POLICY_REF *ref = NULL;
+	ASN1_OBJECT *subjectDomainPolicyRef;
 	X509_POLICY_DATA *data;
 	X509_POLICY_CACHE *cache = x-policy_cache;
 	int i;
@@ -153,13 +152,16 @@ int policy_cache_set_mapping(X509 *x, PO
 		if (!sk_ASN1_OBJECT_push(data-expected_policy_set, 
 		map-subjectDomainPolicy))
 			goto bad_mapping;
+		/* map-subjectDomainPolicy will be freed when
+		 * cache-data is freed. Set it to NULL to avoid double-free. */
+		subjectDomainPolicyRef = map-subjectDomainPolicy;
+		map-subjectDomainPolicy = NULL;
 		
 		ref = OPENSSL_malloc(sizeof(X509_POLICY_REF));
 		if (!ref)
 			goto bad_mapping;
 
-		ref-subjectDomainPolicy = map-subjectDomainPolicy;
-		map-subjectDomainPolicy = NULL;
+		ref-subjectDomainPolicy = subjectDomainPolicyRef;
 		ref-data = data;
 
 		if (!sk_X509_POLICY_REF_push(cache-maps, ref))

Index: src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c
diff -u src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c:1.1.1.4 src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c:1.1.1.4.12.1
--- src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c:1.1.1.4	Fri May  9 21:34:38 2008
+++ src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c	Wed Jan 25 20:19:58 2012
@@ -611,6 +611,10 @@ int X509_policy_check(X509_POLICY_TREE *
 		return 1;
 
 		/* Some internal error */
+		case -1:
+		return -1;
+
+		/* Some internal error */
 		case 0:
 		return 0;
 



CVS commit: [netbsd-5] src/crypto/dist/openssl/crypto/x509v3

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:20:14 UTC 2012

Modified Files:
src/crypto/dist/openssl/crypto/x509v3 [netbsd-5]: pcy_map.c pcy_tree.c

Log Message:
Apply patch (requested by drochner in ticket #1711):
crypto/dist/openssl/crypto/x509v3/pcy_map.c patch
crypto/dist/openssl/crypto/x509v3/pcy_tree.cpatch

Address CVE-2011-4109.
[drochner, ticket #1711]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.26.1 \
src/crypto/dist/openssl/crypto/x509v3/pcy_map.c
cvs rdiff -u -r1.1.1.4 -r1.1.1.4.4.1 \
src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c

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

Modified files:

Index: src/crypto/dist/openssl/crypto/x509v3/pcy_map.c
diff -u src/crypto/dist/openssl/crypto/x509v3/pcy_map.c:1.1.1.1 src/crypto/dist/openssl/crypto/x509v3/pcy_map.c:1.1.1.1.26.1
--- src/crypto/dist/openssl/crypto/x509v3/pcy_map.c:1.1.1.1	Fri Nov 25 03:07:35 2005
+++ src/crypto/dist/openssl/crypto/x509v3/pcy_map.c	Wed Jan 25 20:20:14 2012
@@ -70,8 +70,6 @@ static int ref_cmp(const X509_POLICY_REF
 
 static void policy_map_free(X509_POLICY_REF *map)
 	{
-	if (map-subjectDomainPolicy)
-		ASN1_OBJECT_free(map-subjectDomainPolicy);
 	OPENSSL_free(map);
 	}
 
@@ -95,6 +93,7 @@ int policy_cache_set_mapping(X509 *x, PO
 	{
 	POLICY_MAPPING *map;
 	X509_POLICY_REF *ref = NULL;
+	ASN1_OBJECT *subjectDomainPolicyRef;
 	X509_POLICY_DATA *data;
 	X509_POLICY_CACHE *cache = x-policy_cache;
 	int i;
@@ -153,13 +152,16 @@ int policy_cache_set_mapping(X509 *x, PO
 		if (!sk_ASN1_OBJECT_push(data-expected_policy_set, 
 		map-subjectDomainPolicy))
 			goto bad_mapping;
+		/* map-subjectDomainPolicy will be freed when
+		 * cache-data is freed. Set it to NULL to avoid double-free. */
+		subjectDomainPolicyRef = map-subjectDomainPolicy;
+		map-subjectDomainPolicy = NULL;
 		
 		ref = OPENSSL_malloc(sizeof(X509_POLICY_REF));
 		if (!ref)
 			goto bad_mapping;
 
-		ref-subjectDomainPolicy = map-subjectDomainPolicy;
-		map-subjectDomainPolicy = NULL;
+		ref-subjectDomainPolicy = subjectDomainPolicyRef;
 		ref-data = data;
 
 		if (!sk_X509_POLICY_REF_push(cache-maps, ref))

Index: src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c
diff -u src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c:1.1.1.4 src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c:1.1.1.4.4.1
--- src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c:1.1.1.4	Fri May  9 21:34:38 2008
+++ src/crypto/dist/openssl/crypto/x509v3/pcy_tree.c	Wed Jan 25 20:20:14 2012
@@ -611,6 +611,10 @@ int X509_policy_check(X509_POLICY_TREE *
 		return 1;
 
 		/* Some internal error */
+		case -1:
+		return -1;
+
+		/* Some internal error */
 		case 0:
 		return 0;
 



CVS commit: [netbsd-5] src/crypto/dist/openssl/engines/ccgost

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:30:02 UTC 2012

Modified Files:
src/crypto/dist/openssl/engines/ccgost [netbsd-5]: gost2001_keyx.c
gost94_keyx.c

Log Message:
Apply patch (requested by drochner in ticket #1711):
crypto/dist/openssl/engines/ccgost/gost2001_keyx.c  patch
crypto/dist/openssl/engines/ccgost/gost94_keyx.cpatch

Address CVE-2011-4109.
[drochner, ticket #1712]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.8.1 \
src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c \
src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c

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

Modified files:

Index: src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c
diff -u src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c:1.1.1.1 src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c:1.1.1.1.8.1
--- src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c:1.1.1.1	Fri May  9 21:34:42 2008
+++ src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c	Wed Jan 25 20:30:02 2012
@@ -253,6 +253,10 @@ int pkey_GOST01cp_decrypt(EVP_PKEY_CTX *
 	}	
 		
 	param = get_encryption_params(gkt-key_agreement_info-cipher);
+	if(!param){
+	goto err;
+	}
+
 	gost_init(ctx,param-sblock);	
 	OPENSSL_assert(gkt-key_agreement_info-eph_iv-length==8);
 	memcpy(wrappedKey,gkt-key_agreement_info-eph_iv-data,8);
Index: src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c
diff -u src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c:1.1.1.1 src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c:1.1.1.1.8.1
--- src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c:1.1.1.1	Fri May  9 21:34:42 2008
+++ src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c	Wed Jan 25 20:30:02 2012
@@ -237,6 +237,10 @@ int pkey_GOST94cp_decrypt(EVP_PKEY_CTX *
 
 
 	param = get_encryption_params(gkt-key_agreement_info-cipher);
+	if(!param){
+	goto err;
+	}
+
 	gost_init(cctx,param-sblock);	
 	OPENSSL_assert(gkt-key_agreement_info-eph_iv-length==8);
 	memcpy(wrappedKey,gkt-key_agreement_info-eph_iv-data,8);



CVS commit: src/sys/netipsec

2012-01-25 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Jan 25 20:31:23 UTC 2012

Modified Files:
src/sys/netipsec: xform_ah.c xform_esp.c xform_ipcomp.c

Log Message:
Make sure the mbufs in the input path (only the parts which we are going
to modify in the AH case) are writable/non-shared.
This addresses PR kern/33162 by Jeff Rizzo, and replaces the insufficient
patch from that time by a radical solution.
(The PR's problem had been worked around by rev.1.3 of xennetback_xenbus.c,
so it needs a network driver modification to reproduce it.)
Being here, clarify a bit of ipcomp -- uncompression is done in-place,
the header must be removed explicitly.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.39 -r1.40 src/sys/netipsec/xform_esp.c
cvs rdiff -u -r1.28 -r1.29 src/sys/netipsec/xform_ipcomp.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/netipsec/xform_ah.c
diff -u src/sys/netipsec/xform_ah.c:1.35 src/sys/netipsec/xform_ah.c:1.36
--- src/sys/netipsec/xform_ah.c:1.35	Tue Jan 24 21:57:03 2012
+++ src/sys/netipsec/xform_ah.c	Wed Jan 25 20:31:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ah.c,v 1.35 2012/01/24 21:57:03 drochner Exp $	*/
+/*	$NetBSD: xform_ah.c,v 1.36 2012/01/25 20:31:23 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */
 /*
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xform_ah.c,v 1.35 2012/01/24 21:57:03 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: xform_ah.c,v 1.36 2012/01/25 20:31:23 drochner Exp $);
 
 #include opt_inet.h
 #ifdef __FreeBSD__
@@ -641,7 +641,7 @@ ah_input(struct mbuf *m, const struct se
 	struct tdb_crypto *tc;
 	struct m_tag *mtag;
 	struct newah *ah;
-	int hl, rplen, authsize;
+	int hl, rplen, authsize, error;
 
 	struct cryptodesc *crda;
 	struct cryptop *crp;
@@ -746,10 +746,18 @@ ah_input(struct mbuf *m, const struct se
 		return ENOBUFS;
 	}
 
+	error = m_makewritable(m, 0, skip + rplen + authsize, M_NOWAIT);
+	if (error) {
+		m_freem(m);
+		DPRINTF((ah_input: failed to copyback_cow\n));
+		AH_STATINC(AH_STAT_HDROPS);
+		free(tc, M_XDATA);
+		crypto_freereq(crp);
+		return error;
+	}
+
 	/* Only save information if crypto processing is needed. */
 	if (mtag == NULL) {
-		int error;
-
 		/*
 		 * Save the authenticator, the skipped portion of the packet,
 		 * and the AH header.

Index: src/sys/netipsec/xform_esp.c
diff -u src/sys/netipsec/xform_esp.c:1.39 src/sys/netipsec/xform_esp.c:1.40
--- src/sys/netipsec/xform_esp.c:1.39	Wed Aug 31 18:31:04 2011
+++ src/sys/netipsec/xform_esp.c	Wed Jan 25 20:31:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_esp.c,v 1.39 2011/08/31 18:31:04 plunky Exp $	*/
+/*	$NetBSD: xform_esp.c,v 1.40 2012/01/25 20:31:23 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xform_esp.c,v 1.39 2011/08/31 18:31:04 plunky Exp $);
+__KERNEL_RCSID(0, $NetBSD: xform_esp.c,v 1.40 2012/01/25 20:31:23 drochner Exp $);
 
 #include opt_inet.h
 #ifdef __FreeBSD__
@@ -297,7 +297,7 @@ esp_input(struct mbuf *m, const struct s
 	const struct enc_xform *espx;
 	struct tdb_ident *tdbi;
 	struct tdb_crypto *tc;
-	int plen, alen, hlen;
+	int plen, alen, hlen, error;
 	struct m_tag *mtag;
 	struct newesp *esp;
 
@@ -398,6 +398,16 @@ esp_input(struct mbuf *m, const struct s
 		return ENOBUFS;
 	}
 
+	error = m_makewritable(m, 0, m-m_pkthdr.len, M_NOWAIT);
+	if (error) {
+		m_freem(m);
+		free(tc, M_XDATA);
+		crypto_freereq(crp);
+		DPRINTF((esp_input: m_makewritable failed\n));
+		ESP_STATINC(ESP_STAT_CRYPTO);
+		return error;
+	}
+
 	tc-tc_ptr = mtag;
 
 	if (esph) {
@@ -681,15 +691,7 @@ DPRINTF((esp_input_cb: %x %x\n, lastth
 	m_adj(m, -(lastthree[1] + 2));
 
 	/* Restore the Next Protocol field */
-	m = m_copyback_cow(m, protoff, sizeof (u_int8_t), lastthree + 2,
-			   M_DONTWAIT);
-
-	if (m == NULL) {
-		ESP_STATINC(ESP_STAT_CRYPTO);
-		DPRINTF((esp_input_cb: failed to allocate mbuf\n));
-		error = ENOBUFS;
-		goto bad;
-	}
+	m_copyback(m, protoff, sizeof (u_int8_t), lastthree + 2);
 
 	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag);
 

Index: src/sys/netipsec/xform_ipcomp.c
diff -u src/sys/netipsec/xform_ipcomp.c:1.28 src/sys/netipsec/xform_ipcomp.c:1.29
--- src/sys/netipsec/xform_ipcomp.c:1.28	Fri May  6 21:48:46 2011
+++ src/sys/netipsec/xform_ipcomp.c	Wed Jan 25 20:31:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ipcomp.c,v 1.28 2011/05/06 21:48:46 drochner Exp $	*/
+/*	$NetBSD: xform_ipcomp.c,v 1.29 2012/01/25 20:31:23 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_ipcomp.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /* $OpenBSD: ip_ipcomp.c,v 

CVS commit: [netbsd-5-1] src/crypto/dist/openssl/engines/ccgost

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:31:37 UTC 2012

Modified Files:
src/crypto/dist/openssl/engines/ccgost [netbsd-5-1]: gost2001_keyx.c
gost94_keyx.c

Log Message:
Apply patch (requested by drochner in ticket #1711):
crypto/dist/openssl/engines/ccgost/gost2001_keyx.c  patch
crypto/dist/openssl/engines/ccgost/gost94_keyx.cpatch

Address CVE-2011-4109.
[drochner, ticket #1712]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.16.1 \
src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c \
src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c

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

Modified files:

Index: src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c
diff -u src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c:1.1.1.1 src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c:1.1.1.1.16.1
--- src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c:1.1.1.1	Fri May  9 21:34:42 2008
+++ src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c	Wed Jan 25 20:31:37 2012
@@ -253,6 +253,10 @@ int pkey_GOST01cp_decrypt(EVP_PKEY_CTX *
 	}	
 		
 	param = get_encryption_params(gkt-key_agreement_info-cipher);
+	if(!param){
+	goto err;
+	}
+
 	gost_init(ctx,param-sblock);	
 	OPENSSL_assert(gkt-key_agreement_info-eph_iv-length==8);
 	memcpy(wrappedKey,gkt-key_agreement_info-eph_iv-data,8);
Index: src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c
diff -u src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c:1.1.1.1 src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c:1.1.1.1.16.1
--- src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c:1.1.1.1	Fri May  9 21:34:42 2008
+++ src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c	Wed Jan 25 20:31:37 2012
@@ -237,6 +237,10 @@ int pkey_GOST94cp_decrypt(EVP_PKEY_CTX *
 
 
 	param = get_encryption_params(gkt-key_agreement_info-cipher);
+	if(!param){
+	goto err;
+	}
+
 	gost_init(cctx,param-sblock);	
 	OPENSSL_assert(gkt-key_agreement_info-eph_iv-length==8);
 	memcpy(wrappedKey,gkt-key_agreement_info-eph_iv-data,8);



CVS commit: [netbsd-5-0] src/crypto/dist/openssl/engines/ccgost

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:32:10 UTC 2012

Modified Files:
src/crypto/dist/openssl/engines/ccgost [netbsd-5-0]: gost2001_keyx.c
gost94_keyx.c

Log Message:
Apply patch (requested by drochner in ticket #1711):
crypto/dist/openssl/engines/ccgost/gost2001_keyx.c  patch
crypto/dist/openssl/engines/ccgost/gost94_keyx.cpatch

Address CVE-2011-4109.
[drochner, ticket #1712]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.12.1 \
src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c \
src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c

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

Modified files:

Index: src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c
diff -u src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c:1.1.1.1 src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c:1.1.1.1.12.1
--- src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c:1.1.1.1	Fri May  9 21:34:42 2008
+++ src/crypto/dist/openssl/engines/ccgost/gost2001_keyx.c	Wed Jan 25 20:32:10 2012
@@ -253,6 +253,10 @@ int pkey_GOST01cp_decrypt(EVP_PKEY_CTX *
 	}	
 		
 	param = get_encryption_params(gkt-key_agreement_info-cipher);
+	if(!param){
+	goto err;
+	}
+
 	gost_init(ctx,param-sblock);	
 	OPENSSL_assert(gkt-key_agreement_info-eph_iv-length==8);
 	memcpy(wrappedKey,gkt-key_agreement_info-eph_iv-data,8);
Index: src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c
diff -u src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c:1.1.1.1 src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c:1.1.1.1.12.1
--- src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c:1.1.1.1	Fri May  9 21:34:42 2008
+++ src/crypto/dist/openssl/engines/ccgost/gost94_keyx.c	Wed Jan 25 20:32:10 2012
@@ -237,6 +237,10 @@ int pkey_GOST94cp_decrypt(EVP_PKEY_CTX *
 
 
 	param = get_encryption_params(gkt-key_agreement_info-cipher);
+	if(!param){
+	goto err;
+	}
+
 	gost_init(cctx,param-sblock);	
 	OPENSSL_assert(gkt-key_agreement_info-eph_iv-length==8);
 	memcpy(wrappedKey,gkt-key_agreement_info-eph_iv-data,8);



CVS commit: [netbsd-5-0] src/crypto/dist/openssl/ssl

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:34:26 UTC 2012

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5-0]: s3_enc.c

Log Message:
Apply patch (requested by drochner in ticket #1713):
crypto/dist/openssl/ssl/s3_enc.cpatch

Address CVE-2011-4576.
[drochner, ticket #1713]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12.8.1 -r1.1.1.12.8.2 \
src/crypto/dist/openssl/ssl/s3_enc.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/s3_enc.c
diff -u src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.8.1 src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.8.2
--- src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.8.1	Mon Apr 12 00:46:57 2010
+++ src/crypto/dist/openssl/ssl/s3_enc.c	Wed Jan 25 20:34:26 2012
@@ -504,6 +504,9 @@ int ssl3_enc(SSL *s, int send)
 
 			/* we need to add 'i-1' padding bytes */
 			l+=i;
+			/* the last of these zero bytes will be overwritten
+			 * with the padding length. */
+			memset(rec-input[rec-length], 0, i);
 			rec-length+=i;
 			rec-input[l-1]=(i-1);
 			}



CVS commit: [netbsd-5-1] src/crypto/dist/openssl/ssl

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:34:41 UTC 2012

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5-1]: s3_enc.c

Log Message:
Apply patch (requested by drochner in ticket #1713):
crypto/dist/openssl/ssl/s3_enc.cpatch

Address CVE-2011-4576.
[drochner, ticket #1713]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12.4.1 -r1.1.1.12.4.1.2.1 \
src/crypto/dist/openssl/ssl/s3_enc.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/s3_enc.c
diff -u src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.4.1 src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.4.1.2.1
--- src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.4.1	Mon Apr 12 00:40:12 2010
+++ src/crypto/dist/openssl/ssl/s3_enc.c	Wed Jan 25 20:34:41 2012
@@ -504,6 +504,9 @@ int ssl3_enc(SSL *s, int send)
 
 			/* we need to add 'i-1' padding bytes */
 			l+=i;
+			/* the last of these zero bytes will be overwritten
+			 * with the padding length. */
+			memset(rec-input[rec-length], 0, i);
 			rec-length+=i;
 			rec-input[l-1]=(i-1);
 			}



CVS commit: [netbsd-5] src/crypto/dist/openssl/ssl

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:34:57 UTC 2012

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5]: s3_enc.c

Log Message:
Apply patch (requested by drochner in ticket #1713):
crypto/dist/openssl/ssl/s3_enc.cpatch

Address CVE-2011-4576.
[drochner, ticket #1713]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12.4.1 -r1.1.1.12.4.2 \
src/crypto/dist/openssl/ssl/s3_enc.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/s3_enc.c
diff -u src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.4.1 src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.4.2
--- src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.4.1	Mon Apr 12 00:40:12 2010
+++ src/crypto/dist/openssl/ssl/s3_enc.c	Wed Jan 25 20:34:57 2012
@@ -504,6 +504,9 @@ int ssl3_enc(SSL *s, int send)
 
 			/* we need to add 'i-1' padding bytes */
 			l+=i;
+			/* the last of these zero bytes will be overwritten
+			 * with the padding length. */
+			memset(rec-input[rec-length], 0, i);
 			rec-length+=i;
 			rec-input[l-1]=(i-1);
 			}



CVS commit: [netbsd-5] src/doc

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:47:43 UTC 2012

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

Log Message:
tickets 1710-1713.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.130 -r1.1.2.131 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.130 src/doc/CHANGES-5.2:1.1.2.131
--- src/doc/CHANGES-5.2:1.1.2.130	Wed Jan 25 18:46:35 2012
+++ src/doc/CHANGES-5.2	Wed Jan 25 20:47:43 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.130 2012/01/25 18:46:35 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.131 2012/01/25 20:47:43 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5914,3 +5914,25 @@ distrib/i386/ramdisks/ramdisk-big/list		
 	if necessary.
 	[sborrill, ticket #1709]
 
+crypto/dist/openssl/ssl/d1_pkt.c	patch
+
+	Address CVE-2012-0050.
+	[drochner, ticket #1710]
+
+crypto/dist/openssl/crypto/x509v3/pcy_map.c	patch
+crypto/dist/openssl/crypto/x509v3/pcy_tree.c	patch
+
+	Address CVE-2011-4109.
+	[drochner, ticket #1711]
+
+crypto/dist/openssl/engines/ccgost/gost2001_keyx.c	patch
+crypto/dist/openssl/engines/ccgost/gost94_keyx.c	patch
+
+	Address CVE-2011-4109.
+	[drochner, ticket #1712]
+
+crypto/dist/openssl/ssl/s3_enc.cpatch
+
+	Address CVE-2011-4576.
+	[drochner, ticket #1713]
+



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

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:48:29 UTC 2012

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

Log Message:
Tickets 1710-1713.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/doc/CHANGES-5.1.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-5.1.2
diff -u src/doc/CHANGES-5.1.2:1.1.2.1 src/doc/CHANGES-5.1.2:1.1.2.2
--- src/doc/CHANGES-5.1.2:1.1.2.1	Sat Jan  7 03:55:08 2012
+++ src/doc/CHANGES-5.1.2	Wed Jan 25 20:48:28 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.2,v 1.1.2.1 2012/01/07 03:55:08 snj Exp $
+# $NetBSD: CHANGES-5.1.2,v 1.1.2.2 2012/01/25 20:48:28 riz Exp $
 
 A complete list of changes from the NetBSD 5.1.1 release to the NetBSD 5.1.2
 release:
@@ -9,3 +9,25 @@ sys/sys/param.h	patched by hand
 	Welcome to 5.1.1_PATCH.
 	[snj]
 
+crypto/dist/openssl/ssl/d1_pkt.c	patch
+
+	Address CVE-2012-0050.
+	[drochner, ticket #1710]
+
+crypto/dist/openssl/crypto/x509v3/pcy_map.c	patch
+crypto/dist/openssl/crypto/x509v3/pcy_tree.c	patch
+
+	Address CVE-2011-4109.
+	[drochner, ticket #1711]
+
+crypto/dist/openssl/engines/ccgost/gost2001_keyx.c	patch
+crypto/dist/openssl/engines/ccgost/gost94_keyx.c	patch
+
+	Address CVE-2011-4109.
+	[drochner, ticket #1712]
+
+crypto/dist/openssl/ssl/s3_enc.cpatch
+
+	Address CVE-2011-4576.
+	[drochner, ticket #1713]
+



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

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:49:03 UTC 2012

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

Log Message:
Tickets 1710-1713.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.58 -r1.1.2.59 src/doc/CHANGES-5.0.3

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

Modified files:

Index: src/doc/CHANGES-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.58 src/doc/CHANGES-5.0.3:1.1.2.59
--- src/doc/CHANGES-5.0.3:1.1.2.58	Mon Jan  2 23:55:31 2012
+++ src/doc/CHANGES-5.0.3	Wed Jan 25 20:49:02 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.58 2012/01/02 23:55:31 snj Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.59 2012/01/25 20:49:02 riz Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2896,3 +2896,25 @@ xsrc/xfree/xc/programs/Xserver/mi/mispri
 	CVE-2010-1166.
 	[is, ticket #1707]
 
+crypto/dist/openssl/ssl/d1_pkt.c	patch
+
+	Address CVE-2012-0050.
+	[drochner, ticket #1710]
+
+crypto/dist/openssl/crypto/x509v3/pcy_map.c	patch
+crypto/dist/openssl/crypto/x509v3/pcy_tree.c	patch
+
+	Address CVE-2011-4109.
+	[drochner, ticket #1711]
+
+crypto/dist/openssl/engines/ccgost/gost2001_keyx.c	patch
+crypto/dist/openssl/engines/ccgost/gost94_keyx.c	patch
+
+	Address CVE-2011-4109.
+	[drochner, ticket #1712]
+
+crypto/dist/openssl/ssl/s3_enc.cpatch
+
+	Address CVE-2011-4576.
+	[drochner, ticket #1713]
+



CVS commit: [netbsd-5] src/sys/fs/puffs

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 20:51:15 UTC 2012

Modified Files:
src/sys/fs/puffs [netbsd-5]: puffs_node.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #1714):
sys/fs/puffs/puffs_node.c: revision 1.23
Fix a race condition where the filesystem lookups a vnode that is
being recycled, producing ENOENT while the file does exist.
Approved by yamt


To generate a diff of this commit:
cvs rdiff -u -r1.13.10.3 -r1.13.10.4 src/sys/fs/puffs/puffs_node.c

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

Modified files:

Index: src/sys/fs/puffs/puffs_node.c
diff -u src/sys/fs/puffs/puffs_node.c:1.13.10.3 src/sys/fs/puffs/puffs_node.c:1.13.10.4
--- src/sys/fs/puffs/puffs_node.c:1.13.10.3	Wed Nov  2 20:11:12 2011
+++ src/sys/fs/puffs/puffs_node.c	Wed Jan 25 20:51:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_node.c,v 1.13.10.3 2011/11/02 20:11:12 riz Exp $	*/
+/*	$NetBSD: puffs_node.c,v 1.13.10.4 2012/01/25 20:51:15 riz Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_node.c,v 1.13.10.3 2011/11/02 20:11:12 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_node.c,v 1.13.10.4 2012/01/25 20:51:15 riz Exp $);
 
 #include sys/param.h
 #include sys/hash.h
@@ -321,8 +321,14 @@ puffs_makeroot(struct puffs_mount *pmp)
 	if (vp) {
 		mutex_enter(vp-v_interlock);
 		mutex_exit(pmp-pmp_lock);
-		if (vget(vp, LK_INTERLOCK) == 0)
+		switch (vget(vp, LK_INTERLOCK)) {
+		case ENOENT:
+			goto retry;
+		case 0:
 			return 0;
+		default:
+			break;
+		}
 	} else
 		mutex_exit(pmp-pmp_lock);
 
@@ -387,6 +393,7 @@ puffs_cookie2vnode(struct puffs_mount *p
 		return 0;
 	}
 
+ retry:
 	mutex_enter(pmp-pmp_lock);
 	pnode = puffs_cookie2pnode(pmp, ck);
 	if (pnode == NULL) {
@@ -406,8 +413,14 @@ puffs_cookie2vnode(struct puffs_mount *p
 	vgetflags = LK_INTERLOCK;
 	if (lock)
 		vgetflags |= LK_EXCLUSIVE | LK_RETRY;
-	if ((rv = vget(vp, vgetflags)))
+	switch (rv = vget(vp, vgetflags)) {
+	case ENOENT:
+		goto retry;
+	case 0:
+		break;
+	default:
 		return rv;
+	}
 
 	*vpp = vp;
 	return 0;



CVS commit: src/lib/libquota

2012-01-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jan 25 21:11:45 UTC 2012

Added Files:
src/lib/libquota: libquota.3

Log Message:
duh, forgot to cvs add


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libquota/libquota.3

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

Added files:

Index: src/lib/libquota/libquota.3
diff -u /dev/null src/lib/libquota/libquota.3:1.1
--- /dev/null	Wed Jan 25 21:11:45 2012
+++ src/lib/libquota/libquota.3	Wed Jan 25 21:11:45 2012
@@ -0,0 +1,405 @@
+.\	$NetBSD: libquota.3,v 1.1 2012/01/25 21:11:45 dholland Exp $
+.\
+.\ Copyright (c) 2012 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by David A. Holland.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\ POSSIBILITY OF SUCH DAMAGE.
+.Dd January 24, 2012
+.Dt LIBQUOTA 3
+.Os
+.Sh NAME
+.Nm libquota ,
+.Nm quota_open ,
+.Nm quota_close ,
+.Nm quota_getmountdevice ,
+.Nm quota_getmountpoint ,
+.Nm quota_getimplname ,
+.Nm quota_getnumidtypes ,
+.Nm quota_getnumobjtypes ,
+.Nm quota_idtype_getname ,
+.Nm quota_objtype_getname ,
+.Nm quota_objtype_isbytes ,
+.Nm quota_get ,
+.Nm quota_put ,
+.Nm quota_delete ,
+.Nm quota_opencursor ,
+.Nm quotacursor_close ,
+.Nm quotacursor_skipidtype ,
+.Nm quotacursor_get ,
+.Nm quotacursor_getn ,
+.Nm quotacursor_atend ,
+.Nm quotacursor_rewind ,
+.Nm quotaval_clear
+.Nd disk quota access and control library
+.Sh LIBRARY
+.Lb libquota
+.Sh SYNOPSIS
+.In quota.h
+.Ft struct quotahandle *
+.Fn quota_open const char *path
+.Ft void
+.Fn quota_close struct quotahandle *qh
+.Ft const char *
+.Fn quota_getmountdevice struct quotahandle *qh
+.Ft const char *
+.Fn quota_getmountpoint struct quotahandle *qh
+.Ft const char *
+.Fn quota_getimplname struct quotahandle *qh
+.Ft unsigned
+.Fn quota_getnumidtypes struct quotahandle *qh
+.Ft unsigned
+.Fn quota_getnumobjtypes struct quotahandle *qh
+.Ft const char *
+.Fn quota_idtype_getname struct quotahandle *qh int idtype
+.Ft const char *
+.Fn quota_objtype_getname struct quotahandle *qh int objtype
+.Ft int
+.Fn quota_objtype_isbytes struct quotahandle *qh int objtype
+.Ft int
+.Fn quota_get struct quotahandle *qh const struct quotakey *key struct quotaval *val
+.Ft int
+.Fn quota_put struct quotahandle *qh const struct quotakey *key const struct quotaval *val
+.Ft int
+.Fn quota_delete struct quotahandle *qh const struct quotakey *key
+.Ft struct quotacursor *
+.Fn quota_opencursor struct quotahandle *qh
+.Ft void
+.Fn quotacursor_close struct quotacursor *qc
+.Ft int
+.Fn quotacursor_skipidtype struct quotacursor *qc int idtype
+.Ft int
+.Fn quotacursor_get struct quotacursor *qc struct quotakey *key const struct quotaval *val
+.Ft int
+.Fn quotacursor_getn struct quotacursor *qc struct quotakey *keys const struct quotaval *vals unsigned maxnum
+.Ft int
+.Fn quotacursor_atend struct quotacursor *qc
+.Ft int
+.Fn quotacursor_rewind struct quotacursor *qc
+.Ft void
+.Fn quotaval_clear struct quotaval *qv
+.Sh DESCRIPTION
+The
+.Nm
+library provides uniform access to disk quota functionality across all
+file systems and file system types.
+Programs should be linked with
+.Fl lquota lrpcsvc .
+.Pp
+Quota information is organized as a key/value store, where the key
+names a particular limit and the value contains information about that
+limit.
+The information includes a configured
+.Em soft limit ,
+.Em hard limit ,
+and
+.Em grace time ,
+as well as the current usage and the expire time of any pending grace
+period.
+The soft limit may be exceeded temporarily, but only for the length of
+time specified; after that further usage is 

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

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 21:20:51 UTC 2012

Modified Files:
src/sys/coda [netbsd-5]: coda.h

Log Message:
Pull up following revision(s) (requested by gdt in ticket #1716):
sys/coda/coda.h: revision 1.15
Make file_id unsigned so it does not get sign extended when promoted
to a 64bit ino_t.


To generate a diff of this commit:
cvs rdiff -u -r1.14.52.1 -r1.14.52.2 src/sys/coda/coda.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/coda/coda.h
diff -u src/sys/coda/coda.h:1.14.52.1 src/sys/coda/coda.h:1.14.52.2
--- src/sys/coda/coda.h:1.14.52.1	Wed Aug 25 04:17:47 2010
+++ src/sys/coda/coda.h	Wed Jan 25 21:20:51 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: coda.h,v 1.14.52.1 2010/08/25 04:17:47 snj Exp $ */
+/* $NetBSD: coda.h,v 1.14.52.2 2012/01/25 21:20:51 riz Exp $ */
 
 /*
 
@@ -272,7 +272,7 @@ struct coda_vattr {
 	short		va_nlink;	/* number of references to file */
 	uid_t		va_uid;		/* owner user id */
 	gid_t		va_gid;		/* owner group id */
-	long		va_fileid;	/* file id */
+	u_long		va_fileid;	/* file id */
 	u_quad_t	va_size;	/* file size in bytes */
 	long		va_blocksize;	/* blocksize preferred for i/o */
 	struct timespec	va_atime;	/* time of last access */



CVS commit: [netbsd-5] src/doc

2012-01-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan 25 21:21:21 UTC 2012

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

Log Message:
Tickets 1714-1716.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.131 -r1.1.2.132 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.131 src/doc/CHANGES-5.2:1.1.2.132
--- src/doc/CHANGES-5.2:1.1.2.131	Wed Jan 25 20:47:43 2012
+++ src/doc/CHANGES-5.2	Wed Jan 25 21:21:21 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.131 2012/01/25 20:47:43 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.132 2012/01/25 21:21:21 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5936,3 +5936,38 @@ crypto/dist/openssl/ssl/s3_enc.c
 	Address CVE-2011-4576.
 	[drochner, ticket #1713]
 
+sys/fs/puffs/puffs_node.c			1.23 via patch
+
+	Fix a race condition where the filesystem lookups a vnode that is
+	being recycled, producing ENOENT while the file does exist.
+	[manu, ticket #1714]
+
+sys/arch/amd64/conf/GENERIC		1.338 via patch
+sys/arch/i386/conf/GENERIC		1.1055 via patch
+sys/arch/i386/conf/ALL			1.325 via patch
+sys/arch/x86/include/i82489reg.h	1.11
+sys/dev/ic/hpetreg.h			1.4
+sys/dev/ic/hpet.c			1.8
+sys/dev/pci/files.pci			1.350 via patch
+sys/dev/pci/if_vioif.c			0-1.2 via patch
+sys/dev/pci/ld_virtio.c			0-1.4 via patch
+sys/dev/pci/viomb.c			0-1.1 via patch
+sys/dev/pci/virtio.c			0-1.3 via patch
+sys/dev/pci/virtioreg.h			0-1.1 via patch
+sys/dev/pci/virtiovar.h			0-1.1 via patch
+distrib/sets/lists/man/mi		1.1352, 1.1358 via patch
+share/man/man4/Makefile			1.573, 1.575 via patch
+share/man/man4/ld.4			1.19 via patch
+share/man/man4/virtio.4			0-1.4 via patch
+share/man/man4/vioif.4			0-1.2 via patch
+share/man/man4/viomb.4			0-1.2 via patch
+
+	Allow NetBSD 5.2 to run unmodified under Linux kvm.
+	[hannken, ticket #1715]
+
+sys/coda/coda.h	1.15
+
+	Fix pwd within code, which was failing due to incorrect sign
+	extension.
+	[gdt, ticket #1716]
+



CVS commit: src/sys/netipsec

2012-01-25 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Jan 25 21:58:10 UTC 2012

Modified Files:
src/sys/netipsec: ipsec_input.c

Log Message:
After IPSEC input processing, pass a decoded/authenticated IPv4 packet
to upper layers through the IP protosw, as done for IPv6.
Before it was reinjected into the IP netisr queue which caused more
overhead and caused artefacts like double IP option processing.
Works well for me, should get more testing and review.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/netipsec/ipsec_input.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/netipsec/ipsec_input.c
diff -u src/sys/netipsec/ipsec_input.c:1.28 src/sys/netipsec/ipsec_input.c:1.29
--- src/sys/netipsec/ipsec_input.c:1.28	Sun Jul 17 20:54:54 2011
+++ src/sys/netipsec/ipsec_input.c	Wed Jan 25 21:58:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_input.c,v 1.28 2011/07/17 20:54:54 joerg Exp $	*/
+/*	$NetBSD: ipsec_input.c,v 1.29 2012/01/25 21:58:10 drochner Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $	*/
 /*	$OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $	*/
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.28 2011/07/17 20:54:54 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.29 2012/01/25 21:58:10 drochner Exp $);
 
 /*
  * IPsec input processing.
@@ -63,13 +63,13 @@ __KERNEL_RCSID(0, $NetBSD: ipsec_input.
 
 #include net/if.h
 #include net/route.h
-#include net/netisr.h
 
 #include netinet/in.h
 #include netinet/in_systm.h
 #include netinet/ip.h
 #include netinet/ip_var.h
 #include netinet/in_var.h
+#include netinet/in_proto.h
 
 #include netinet/ip6.h
 #ifdef INET6
@@ -316,30 +316,20 @@ ipsec4_common_input_cb(struct mbuf *m, s
 		return EINVAL;
 	}
 
-	if (skip != 0) {
-		/* Fix IPv4 header */
-		if (m-m_len  skip  (m = m_pullup(m, skip)) == NULL) {
-			DPRINTF((ipsec4_common_input_cb: processing failed 
-			for SA %s/%08lx\n,
-			ipsec_address(sav-sah-saidx.dst),
-			(u_long) ntohl(sav-spi)));
-			IPSEC_ISTAT(sproto, ESP_STAT_HDROPS, AH_STAT_HDROPS,
-			IPCOMP_STAT_HDROPS);
-			error = ENOBUFS;
-			goto bad;
-		}
-
-		ip = mtod(m, struct ip *);
-		ip-ip_len = htons(m-m_pkthdr.len);
-#ifdef __FreeBSD__
-		/* On FreeBSD, ip_off and ip_len assumed in host endian. */
-		ip-ip_off = htons(ip-ip_off);
-#endif
-		ip-ip_sum = 0;
-		ip-ip_sum = in_cksum(m, ip-ip_hl  2);
-	} else {
-		ip = mtod(m, struct ip *);
+	/* Fix IPv4 header */
+	if (m-m_len  skip  (m = m_pullup(m, skip)) == NULL) {
+		DPRINTF((ipsec4_common_input_cb: processing failed 
+		for SA %s/%08lx\n,
+		ipsec_address(sav-sah-saidx.dst),
+		(u_long) ntohl(sav-spi)));
+		IPSEC_ISTAT(sproto, ESP_STAT_HDROPS, AH_STAT_HDROPS,
+		IPCOMP_STAT_HDROPS);
+		error = ENOBUFS;
+		goto bad;
 	}
+
+	ip = mtod(m, struct ip *);
+	ip-ip_len = htons(m-m_pkthdr.len);
 	prot = ip-ip_p;
 
 	/* IP-in-IP encapsulation */
@@ -450,18 +440,12 @@ ipsec4_common_input_cb(struct mbuf *m, s
 
 	key_sa_recordxfer(sav, m);		/* record data transfer */
 
-	/*
-	 * Re-dispatch via software interrupt.
-	 */
-	if (!IF_HANDOFF(ipintrq, m, NULL)) {
-		IPSEC_ISTAT(sproto, ESP_STAT_QFULL, AH_STAT_QFULL,
-			IPCOMP_STAT_QFULL);
-
-		DPRINTF((ipsec4_common_input_cb: queue full; 
-			proto %u packet dropped\n, sproto));
-		return ENOBUFS;
+	if ((inetsw[ip_protox[prot]].pr_flags  PR_LASTHDR) != 0 
+ipsec4_in_reject(m, NULL)) {
+		error = EINVAL;
+		goto bad;
 	}
-	schednetisr(NETISR_IP);
+	(*inetsw[ip_protox[prot]].pr_input)(m, skip, prot);
 	return 0;
 bad:
 	m_freem(m);



CVS commit: src/lib/libquota

2012-01-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jan 25 21:58:43 UTC 2012

Modified Files:
src/lib/libquota: libquota.3

Log Message:
Use more markup. Fix xrefs. Sort ERRORS. Fix typos. Remove trailing
whitespace. Fix minus symbol (\-, not -).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libquota/libquota.3

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

Modified files:

Index: src/lib/libquota/libquota.3
diff -u src/lib/libquota/libquota.3:1.1 src/lib/libquota/libquota.3:1.2
--- src/lib/libquota/libquota.3:1.1	Wed Jan 25 21:11:45 2012
+++ src/lib/libquota/libquota.3	Wed Jan 25 21:58:43 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: libquota.3,v 1.1 2012/01/25 21:11:45 dholland Exp $
+.\	$NetBSD: libquota.3,v 1.2 2012/01/25 21:58:43 wiz Exp $
 .\
 .\ Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -162,7 +162,7 @@ The hard limit.
 .It uint64_t qv_usage
 The current usage.
 .It int64_t qv_expiretime
-The time 
+The time
 .Pq in time_t terms
 at which the current grace period, if any, expires.
 .It int64_t qv_grace
@@ -226,7 +226,9 @@ The
 .Fa path
 may be any file or file system object on the desired volume.
 On success, returns a quota handle for further use.
-On failure, returns NULL and sets
+On failure, returns
+.Dv NULL
+and sets
 .Dv errno .
 .It Fn quota_close
 Close a quota handle previously created with
@@ -234,12 +236,12 @@ Close a quota handle previously created 
 .It Fn quota_getmountdevice
 Return the path of the device the target volume is mounted from.
 This is retrieved with
-.Xr statvfs 3 .
+.Xr statvfs 2 .
 .It Fn quota_getmountpoint
 Return the path in the directory tree where the target volume is
 mounted.
 This is retrieved with
-.Xr statvfs 3 .
+.Xr statvfs 2 .
 .It Fn quota_getimplname
 Return a human-readable string describing the underlying quota
 implementation.
@@ -269,7 +271,7 @@ Return, in
 .Fa val ,
 the quota information associated with the quota key
 .Fa key .
-On failure, returns -1 and sets
+On failure, returns \-1 and sets
 .Dv errno .
 .It Fn quota_put
 Update the quota information associated with the quota key
@@ -286,7 +288,7 @@ or
 .Xr fsck 8
 must be used.
 Also note that sufficient privilege is required.
-On failure, returns -1 and sets
+On failure, returns \-1 and sets
 .Dv errno .
 .It Fn quota_delete
 Remove the quota information associated with the quota key
@@ -294,14 +296,16 @@ Remove the quota information associated 
 Depending on the backend implementation this might just blank it out
 or might physically remove the quota record from disk.
 Note that sufficient privilege is required.
-On failure, returns -1 and sets
+On failure, returns \-1 and sets
 .Dv errno .
 .It Fn quota_opencursor
 Prepare to iterate the store by creating a cursor.
 The cursor starts at the beginning of the store.
 On success, returns a pointer to a cursor object that can be used with
 the quotacursor calls.
-On failure, returns NULL and sets
+On failure, returns
+.Dv NULL
+and sets
 .Dv errno .
 .It Fn quotacursor_close
 Destroy a cursor previously created with
@@ -309,11 +313,11 @@ Destroy a cursor previously created with
 This releases internal storage.
 .It Fn quotacursor_skipidtype
 Hint to the implementation that the caller is not interested in
-retriving records with ID type
+retrieving records with ID type
 .Fa idtype .
 As this is a hint, the implementation may ignore it; the caller should
 still be prepared to receive and ignore such records.
-On failure, returns -1 and sets
+On failure, returns \-1 and sets
 .Dv errno .
 .It Fn quotacursor_get
 Retrieve the next record
@@ -321,7 +325,7 @@ Retrieve the next record
 from a cursor.
 Note that records are not guaranteed to be returned in any particular
 order.
-On failure, returns -1 and sets
+On failure, returns \-1 and sets
 .Dv errno .
 .It Fn quotacursor_getn
 Retrieve the next several keys and values from a cursor.
@@ -333,7 +337,7 @@ and
 .Fa vals
 arguments.
 Returns the number of records retrieved.
-On failure, returns -1 and sets
+On failure, returns \-1 and sets
 .Dv errno .
 .It Fn quotacursor_atend
 Returns true if the cursor has reached the end of the quota store.
@@ -351,39 +355,38 @@ to the default empty state.
 .\ can be generated inside file systems.
 Error conditions include:
 .Bl -tag -width Er
-.It Bq Er EOPNOTSUPP
+.\ .It Bq Er EBUSY
+.\ .Fn quota_quotaon
+.\ was attempted on a volume that is not a quota v1 volume.
+.It Bq Er EDEADLK
+An inconsistency was detected during
+.Fn quotacursor_get
+or
+.Fn quotacursor_getn .
+The application should discard information collected so far and use
+.Fn quotacursor_rewind
+to start the iteration over.
+.It Bq Er ENOENT
+The quota information requested from
+.Fn quota_get
+does not exist.
+.It Bq Er ENXIO
 The
 .Fa path
 passed to
 .Fn quota_open
-was on a volume that has no quota support.
-.It Bq Er ENXIO
+was on a volume whose quota support is not 

CVS commit: src/gnu/usr.bin/groff/tmac

2012-01-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jan 25 22:22:20 UTC 2012

Modified Files:
src/gnu/usr.bin/groff/tmac: mdoc.local

Log Message:
Add libquota, as requested by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/gnu/usr.bin/groff/tmac/mdoc.local

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

Modified files:

Index: src/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.65 src/gnu/usr.bin/groff/tmac/mdoc.local:1.66
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.65	Mon Aug 29 08:58:18 2011
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Wed Jan 25 22:22:20 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: mdoc.local,v 1.65 2011/08/29 08:58:18 wiz Exp $
+.\ $NetBSD: mdoc.local,v 1.66 2012/01/25 22:22:20 dholland Exp $
 .\
 .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -93,6 +93,7 @@
 .ds doc-str-Lb-libppath Property-List Paths Library (libppath, \-lppath)
 .ds doc-str-Lb-libprop  Property Container Object Library (libprop, \-lprop)
 .ds doc-str-Lb-libpuffs puffs Convenience Library (libpuffs, \-lpuffs)
+.ds doc-str-Lb-libquota		Disk Quota Access and Control Library (libquota, \-lquota)
 .ds doc-str-Lb-librefuseFile System in Userspace Convenience Library (librefuse, \-lrefuse)
 .ds doc-str-Lb-libsaslc Simple Authentication and Security Layer client library (libsaslc, \-lsaslc)
 .ds doc-str-Lb-libssp   Buffer Overflow Protection Library (libssp, \-lssp)



CVS commit: src/external/bsd/mdocml/dist

2012-01-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jan 25 22:23:46 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: lib.in

Log Message:
Add libquota, as requested by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/mdocml/dist/lib.in

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

Modified files:

Index: src/external/bsd/mdocml/dist/lib.in
diff -u src/external/bsd/mdocml/dist/lib.in:1.5 src/external/bsd/mdocml/dist/lib.in:1.6
--- src/external/bsd/mdocml/dist/lib.in:1.5	Tue Oct 11 19:12:13 2011
+++ src/external/bsd/mdocml/dist/lib.in	Wed Jan 25 22:23:46 2012
@@ -76,6 +76,7 @@ LINE(libppath,	Property-List Paths Li
 LINE(libprop,		Property Container Object Library (libprop, \\-lprop))
 LINE(libpthread,	POSIX Threads Library (libpthread, \\-lpthread))
 LINE(libpuffs,	puffs Convenience Library (libpuffs, \\-lpuffs))
+LINE(libquota,	Disk Quota Access and Control Library (libquota, \\-lquota))
 LINE(librefuse,	File System in Userspace Convenience Library (librefuse, \\-lrefuse))
 LINE(libresolv,	DNS Resolver Library (libresolv, \\-lresolv))
 LINE(librpcsec_gss,	RPC GSS-API Authentication Library (librpcsec_gss, \\-lrpcsec_gss))



CVS commit: src/sys/arch/mips/mips

2012-01-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 26 02:14:08 UTC 2012

Modified Files:
src/sys/arch/mips/mips: pmap_segtab.c

Log Message:
Let mips_pmap_{,un}map_poolpage do the translation work.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/mips/pmap_segtab.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/mips/mips/pmap_segtab.c
diff -u src/sys/arch/mips/mips/pmap_segtab.c:1.3 src/sys/arch/mips/mips/pmap_segtab.c:1.4
--- src/sys/arch/mips/mips/pmap_segtab.c:1.3	Fri Apr 29 22:10:22 2011
+++ src/sys/arch/mips/mips/pmap_segtab.c	Thu Jan 26 02:14:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_segtab.c,v 1.3 2011/04/29 22:10:22 matt Exp $	*/
+/*	$NetBSD: pmap_segtab.c,v 1.4 2012/01/26 02:14:08 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap_segtab.c,v 1.3 2011/04/29 22:10:22 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_segtab.c,v 1.4 2012/01/26 02:14:08 matt Exp $);
 
 /*
  *	Manages physical address maps.
@@ -235,10 +235,8 @@ pmap_segtab_release(union segtab *stp, u
 #endif	/* MIPS3_PLUS */
 #ifdef _LP64
 		KASSERT(MIPS_XKPHYS_P(pte));
-		pa = MIPS_XKPHYS_TO_PHYS(pte);
-#else
-		pa = MIPS_KSEG0_TO_PHYS(pte);
 #endif
+		pa = mips_pmap_unmap_poolpage((vaddr_t)pte);
 		uvm_pagefree(PHYS_TO_VM_PAGE(pa));
 
 		stp-seg_tab[i] = NULL;
@@ -292,10 +290,8 @@ pmap_segtab_alloc(void)
 
 #ifdef _LP64
 		KASSERT(mips_options.mips3_xkphys_cached);
-		stp = (union segtab *)MIPS_PHYS_TO_XKPHYS_CACHED(stp_pa);
-#else
-		stp = (union segtab *)MIPS_PHYS_TO_KSEG0(stp_pa);
 #endif
+		stp = (union segtab *)mips_pmap_map_poolpage(stp_pa);
 		const size_t n = NBPG / sizeof(union segtab);
 		if (n  1) {
 			/*
@@ -457,10 +453,8 @@ pmap_pte_reserve(pmap_t pmap, vaddr_t va
 		const paddr_t pa = VM_PAGE_TO_PHYS(pg);
 #ifdef _LP64
 		KASSERT(mips_options.mips3_xkphys_cached);
-		pte = (pt_entry_t *)MIPS_PHYS_TO_XKPHYS_CACHED(pa);
-#else
-		pte = (pt_entry_t *)MIPS_PHYS_TO_KSEG0(pa);
 #endif
+		pte = (pt_entry_t *)mips_pmap_map_poolpage(pa);
 		pt_entry_t ** const pte_p =
 		stp-seg_tab[(va  SEGSHIFT)  (PMAP_SEGTABSIZE - 1)];
 #ifdef MULTIPROCESSOR



CVS commit: src/sys/dev/sdmmc

2012-01-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 26 02:20:12 UTC 2012

Modified Files:
src/sys/dev/sdmmc: sdmmc.c

Log Message:
Print error if couldn't enable card.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/sdmmc/sdmmc.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/sdmmc/sdmmc.c
diff -u src/sys/dev/sdmmc/sdmmc.c:1.10 src/sys/dev/sdmmc/sdmmc.c:1.11
--- src/sys/dev/sdmmc/sdmmc.c:1.10	Sat Jan 21 19:44:31 2012
+++ src/sys/dev/sdmmc/sdmmc.c	Thu Jan 26 02:20:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc.c,v 1.10 2012/01/21 19:44:31 nonaka Exp $	*/
+/*	$NetBSD: sdmmc.c,v 1.11 2012/01/26 02:20:12 matt Exp $	*/
 /*	$OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $	*/
 
 /*
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdmmc.c,v 1.10 2012/01/21 19:44:31 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdmmc.c,v 1.11 2012/01/26 02:20:12 matt Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -346,7 +346,7 @@ sdmmc_card_attach(struct sdmmc_softc *sc
 	error = sdmmc_enable(sc);
 	if (error) {
 		if (!ISSET(sc-sc_caps, SMC_CAPS_POLL_CARD_DET)) {
-			aprint_error_dev(sc-sc_dev, couldn't enable card\n);
+			aprint_error_dev(sc-sc_dev, couldn't enable card: %d\n, error);
 		}
 		goto err;
 	}