CVS commit: src/sys

2013-10-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Oct 13 06:55:35 UTC 2013

Modified Files:
src/sys/arch/arm/xscale: pxa2x0_pcic.c
src/sys/arch/dreamcast/dev/maple: maple.c
src/sys/arch/emips/ebus: ace_ebus.c flash_ebus.c
src/sys/arch/epoc32/dev: etna.c
src/sys/arch/hpcsh/dev/hd64461: hd64461pcmcia.c
src/sys/arch/i386/pnpbios: pnpbios.c
src/sys/arch/xen/xen: xbd_xenbus.c xpci_xenbus.c
src/sys/arch/xen/xenbus: xenbus_probe.c
src/sys/dev/ic: i82365.c

Log Message:
Catch up to recent changes in config_pending_{incr,decr}().


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/xscale/pxa2x0_pcic.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/dreamcast/dev/maple/maple.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/emips/ebus/ace_ebus.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/emips/ebus/flash_ebus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/dev/etna.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/i386/pnpbios/pnpbios.c
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/xen/xen/xbd_xenbus.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/xen/xen/xpci_xenbus.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/xen/xenbus/xenbus_probe.c
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/ic/i82365.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/xscale/pxa2x0_pcic.c
diff -u src/sys/arch/arm/xscale/pxa2x0_pcic.c:1.11 src/sys/arch/arm/xscale/pxa2x0_pcic.c:1.12
--- src/sys/arch/arm/xscale/pxa2x0_pcic.c:1.11	Sat Oct 27 17:17:42 2012
+++ src/sys/arch/arm/xscale/pxa2x0_pcic.c	Sun Oct 13 06:55:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pxa2x0_pcic.c,v 1.11 2012/10/27 17:17:42 chs Exp $	*/
+/*	$NetBSD: pxa2x0_pcic.c,v 1.12 2013/10/13 06:55:34 riz Exp $	*/
 /*	$OpenBSD: pxa2x0_pcic.c,v 1.17 2005/12/14 15:08:51 uwe Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pxa2x0_pcic.c,v 1.11 2012/10/27 17:17:42 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: pxa2x0_pcic.c,v 1.12 2013/10/13 06:55:34 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -417,7 +417,7 @@ pxapcic_doattach(device_t self)
 	for (i = 0; i  sc-sc_nslots; i++) {
 		sock = sc-sc_socket[s[i]];
 
-		config_pending_incr();
+		config_pending_incr(self);
 
 		/* If there's a card there, attach it. */
 		cs = (*sock-pcictag-read)(sock, PXAPCIC_CARD_STATUS);
@@ -455,7 +455,7 @@ pxapcic_event_thread(void *arg)
 	u_int cs;
 	int present;
 
-	config_pending_decr();
+	config_pending_decr(sock-sc-sc_dev);
 
 	while (sock-sc-sc_shutdown == 0) {
 		(void) tsleep(sock, PWAIT, pxapcicev, 0);

Index: src/sys/arch/dreamcast/dev/maple/maple.c
diff -u src/sys/arch/dreamcast/dev/maple/maple.c:1.45 src/sys/arch/dreamcast/dev/maple/maple.c:1.46
--- src/sys/arch/dreamcast/dev/maple/maple.c:1.45	Sat Oct 27 17:17:44 2012
+++ src/sys/arch/dreamcast/dev/maple/maple.c	Sun Oct 13 06:55:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: maple.c,v 1.45 2012/10/27 17:17:44 chs Exp $	*/
+/*	$NetBSD: maple.c,v 1.46 2013/10/13 06:55:34 riz Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: maple.c,v 1.45 2012/10/27 17:17:44 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: maple.c,v 1.46 2013/10/13 06:55:34 riz Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -242,7 +242,7 @@ mapleattach(device_t parent, device_t se
 	sc-sc_intrhand = sysasic_intr_establish(SYSASIC_EVENT_MAPLE_DMADONE,
 	IPL_MAPLE, IRL_MAPLE, maple_intr, sc);
 
-	config_pending_incr();	/* create thread before mounting root */
+	config_pending_incr(self); /* create thread before mounting root */
 
 	if (kthread_create(PRI_NONE, 0, NULL, maple_event_thread, sc,
 	sc-event_thread, %s, device_xname(self)) == 0)
@@ -1428,7 +1428,7 @@ maple_event_thread(void *arg)
 
 	/* OK, continue booting system */
 	maple_polling = 0;
-	config_pending_decr();
+	config_pending_decr(sc-sc_dev);
 
 	for (;;) {
 		/*

Index: src/sys/arch/emips/ebus/ace_ebus.c
diff -u src/sys/arch/emips/ebus/ace_ebus.c:1.7 src/sys/arch/emips/ebus/ace_ebus.c:1.8
--- src/sys/arch/emips/ebus/ace_ebus.c:1.7	Mon Jun  3 20:26:31 2013
+++ src/sys/arch/emips/ebus/ace_ebus.c	Sun Oct 13 06:55:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ace_ebus.c,v 1.7 2013/06/03 20:26:31 christos Exp $	*/
+/*	$NetBSD: ace_ebus.c,v 1.8 2013/10/13 06:55:34 riz Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ace_ebus.c,v 1.7 2013/06/03 20:26:31 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ace_ebus.c,v 1.8 2013/10/13 06:55:34 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -242,7 +242,7 @@ ace_ebus_attach(device_t parent, device_
 	ebus_intr_establish(parent, (void*)ia-ia_cookie, IPL_BIO,
 	ace_ebus_intr, ace);
 
-	config_pending_incr();
+	

CVS commit: [netbsd-5-2] src

2013-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Oct 13 07:22:18 UTC 2013

Modified Files:
src/doc [netbsd-5-2]: README.files
src/gnu/usr.bin/groff/tmac [netbsd-5-2]: mdoc.local
src/sys/sys [netbsd-5-2]: param.h
Added Files:
src/doc [netbsd-5-2]: CHANGES-5.2.2

Log Message:
Welcome to 5.2.1_PATCH.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-5.2.2
cvs rdiff -u -r1.4.10.4.2.1 -r1.4.10.4.2.2 src/doc/README.files
cvs rdiff -u -r1.43.4.18.2.2 -r1.43.4.18.2.3 \
src/gnu/usr.bin/groff/tmac/mdoc.local
cvs rdiff -u -r1.330.4.18.2.2 -r1.330.4.18.2.3 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/doc/README.files
diff -u src/doc/README.files:1.4.10.4.2.1 src/doc/README.files:1.4.10.4.2.2
--- src/doc/README.files:1.4.10.4.2.1	Sun Sep 22 22:43:10 2013
+++ src/doc/README.files	Sun Oct 13 07:22:18 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: README.files,v 1.4.10.4.2.1 2013/09/22 22:43:10 riz Exp $
+#	$NetBSD: README.files,v 1.4.10.4.2.2 2013/10/13 07:22:18 jdc Exp $
 
 What's in this directory:
 
@@ -12,6 +12,8 @@ CHANGES-5.2	Changes between the 5.1 and 
 
 CHANGES-5.2.1	Changes between the 5.2 and 5.2.1 releases.
 
+CHANGES-5.2.2	Changes between the 5.2.1 and 5.2.2 releases.
+
 CHANGES.prev	Changes in previous NetBSD releases.
 
 LAST_MINUTE	Last minute changes and notes about the release.

Index: src/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.18.2.2 src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.18.2.3
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.18.2.2	Sun Sep 22 22:43:10 2013
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Sun Oct 13 07:22:18 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: mdoc.local,v 1.43.4.18.2.2 2013/09/22 22:43:10 riz Exp $
+.\ $NetBSD: mdoc.local,v 1.43.4.18.2.3 2013/10/13 07:22:18 jdc Exp $
 .\
 .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -44,9 +44,9 @@
 .as doc-str-St--ieee1275-94  (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq])
 .
 .\ Default .Os value
-.ds doc-operating-system NetBSD\~5.2.1
+.ds doc-operating-system NetBSD\~5.2.2
 .\ Default footer operating system value
-.ds doc-default-operating-system NetBSD\~5.2.1
+.ds doc-default-operating-system NetBSD\~5.2.2
 .\ Other known versions, not yet in groff distribution
 .ds doc-operating-system-NetBSD-1.3.3  1.3.3
 .ds doc-operating-system-NetBSD-1.6.3  1.6.3
@@ -60,6 +60,7 @@
 .ds doc-operating-system-NetBSD-5.15.1
 .ds doc-operating-system-NetBSD-5.25.2
 .ds doc-operating-system-NetBSD-5.2.1  5.2.1
+.ds doc-operating-system-NetBSD-5.2.1  5.2.2
 .ds doc-operating-system-FreeBSD-4.11  4.11
 .ds doc-operating-system-FreeBSD-6.1   6.1
 .ds doc-operating-system-FreeBSD-6.3   6.3

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.330.4.18.2.2 src/sys/sys/param.h:1.330.4.18.2.3
--- src/sys/sys/param.h:1.330.4.18.2.2	Sun Sep 22 22:43:10 2013
+++ src/sys/sys/param.h	Sun Oct 13 07:22:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.330.4.18.2.2 2013/09/22 22:43:10 riz Exp $	*/
+/*	$NetBSD: param.h,v 1.330.4.18.2.3 2013/10/13 07:22:18 jdc Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	502000100	/* NetBSD 5.2.1 */
+#define	__NetBSD_Version__	502000101	/* NetBSD 5.2.1_PATCH */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)

Added files:

Index: src/doc/CHANGES-5.2.2
diff -u /dev/null src/doc/CHANGES-5.2.2:1.1.2.1
--- /dev/null	Sun Oct 13 07:22:18 2013
+++ src/doc/CHANGES-5.2.2	Sun Oct 13 07:22:18 2013
@@ -0,0 +1,12 @@
+# $NetBSD: CHANGES-5.2.2,v 1.1.2.1 2013/10/13 07:22:18 jdc Exp $
+
+A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.2.1
+release:
+
+doc/README.filespatched by hand
+gnu/usr.bin/groff/tmac/mdoc.local		patched by hand
+sys/sys/param.h	patched by hand
+
+	Welcome to 5.2.1_PATCH.
+	[jdc]
+



CVS commit: [netbsd-5-1] src

2013-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Oct 13 07:22:07 UTC 2013

Modified Files:
src/doc [netbsd-5-1]: README.files
src/gnu/usr.bin/groff/tmac [netbsd-5-1]: mdoc.local
src/sys/sys [netbsd-5-1]: param.h
Added Files:
src/doc [netbsd-5-1]: CHANGES-5.1.4

Log Message:
Welcome to 5.1.3_PATCH.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-5.1.4
cvs rdiff -u -r1.4.10.3.2.3 -r1.4.10.3.2.4 src/doc/README.files
cvs rdiff -u -r1.43.4.15.2.6 -r1.43.4.15.2.7 \
src/gnu/usr.bin/groff/tmac/mdoc.local
cvs rdiff -u -r1.330.4.15.2.6 -r1.330.4.15.2.7 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/doc/README.files
diff -u src/doc/README.files:1.4.10.3.2.3 src/doc/README.files:1.4.10.3.2.4
--- src/doc/README.files:1.4.10.3.2.3	Sun Sep 22 22:12:05 2013
+++ src/doc/README.files	Sun Oct 13 07:22:07 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: README.files,v 1.4.10.3.2.3 2013/09/22 22:12:05 riz Exp $
+#	$NetBSD: README.files,v 1.4.10.3.2.4 2013/10/13 07:22:07 jdc Exp $
 
 What's in this directory:
 
@@ -14,6 +14,8 @@ CHANGES-5.1.2	Changes between the 5.1.1 
 
 CHANGES-5.1.3	Changes between the 5.1.2 and 5.1.3 releases.
 
+CHANGES-5.1.4	Changes between the 5.1.3 and 5.1.4 releases.
+
 CHANGES.prev	Changes in previous NetBSD releases.
 
 LAST_MINUTE	Last minute changes and notes about the release.

Index: src/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.15.2.6 src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.15.2.7
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.43.4.15.2.6	Sun Sep 22 22:12:05 2013
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Sun Oct 13 07:22:07 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: mdoc.local,v 1.43.4.15.2.6 2013/09/22 22:12:05 riz Exp $
+.\ $NetBSD: mdoc.local,v 1.43.4.15.2.7 2013/10/13 07:22:07 jdc Exp $
 .\
 .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -44,9 +44,9 @@
 .as doc-str-St--ieee1275-94  (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq])
 .
 .\ Default .Os value
-.ds doc-operating-system NetBSD\~5.1.3
+.ds doc-operating-system NetBSD\~5.1.4
 .\ Default footer operating system value
-.ds doc-default-operating-system NetBSD\~5.1.3
+.ds doc-default-operating-system NetBSD\~5.1.4
 .\ Other known versions, not yet in groff distribution
 .ds doc-operating-system-NetBSD-1.3.3  1.3.3
 .ds doc-operating-system-NetBSD-1.6.3  1.6.3
@@ -58,6 +58,10 @@
 .ds doc-operating-system-NetBSD-4.04.0
 .ds doc-operating-system-NetBSD-5.05.0
 .ds doc-operating-system-NetBSD-5.15.1
+.ds doc-operating-system-NetBSD-5.1.1  5.1.1
+.ds doc-operating-system-NetBSD-5.1.2  5.1.2
+.ds doc-operating-system-NetBSD-5.1.3  5.1.3
+.ds doc-operating-system-NetBSD-5.1.4  5.1.4
 .ds doc-operating-system-FreeBSD-4.11  4.11
 .ds doc-operating-system-FreeBSD-6.1   6.1
 .ds doc-operating-system-FreeBSD-6.3   6.3

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.330.4.15.2.6 src/sys/sys/param.h:1.330.4.15.2.7
--- src/sys/sys/param.h:1.330.4.15.2.6	Sun Sep 22 22:12:05 2013
+++ src/sys/sys/param.h	Sun Oct 13 07:22:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.330.4.15.2.6 2013/09/22 22:12:05 riz Exp $	*/
+/*	$NetBSD: param.h,v 1.330.4.15.2.7 2013/10/13 07:22:07 jdc Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	501000300	/* NetBSD 5.1.3 */
+#define	__NetBSD_Version__	501000301	/* NetBSD 5.1.3_PATCH */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)

Added files:

Index: src/doc/CHANGES-5.1.4
diff -u /dev/null src/doc/CHANGES-5.1.4:1.1.2.1
--- /dev/null	Sun Oct 13 07:22:07 2013
+++ src/doc/CHANGES-5.1.4	Sun Oct 13 07:22:07 2013
@@ -0,0 +1,12 @@
+# $NetBSD: CHANGES-5.1.4,v 1.1.2.1 2013/10/13 07:22:07 jdc Exp $
+
+A complete list of changes from the NetBSD 5.1.2 release to the NetBSD 5.1.3
+release:
+
+doc/README.filespatched by hand
+gnu/usr.bin/groff/tmac/mdoc.local		patched by hand
+sys/sys/param.h	patched by hand
+
+	Welcome to 5.1.3_PATCH.
+	[jdc]
+



CVS commit: [netbsd-5-2] xsrc

2013-10-13 Thread Julian Coleman
Module Name:xsrc
Committed By:   jdc
Date:   Sun Oct 13 07:25:12 UTC 2013

Modified Files:
xsrc/external/mit/xorg-server/dist/dix [netbsd-5-2]: dixfonts.c
xsrc/xfree/xc/programs/Xserver/dix [netbsd-5-2]: dixfonts.c

Log Message:
Pull up revisions:
  xsrc/external/mit/xorg-server/dist/dix/dixfonts.c revision 1.2 via patch
  xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c revision 1.4 via patch
(requested by spz in ticket #1884).

Fix CVE-2013-4396 using a patch from:

--- snip ---
From a4d9bf1259ad28f54b6d59a480b2009cc89ca623 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith alan.coopersm...@oracle.com
Date: Mon, 16 Sep 2013 21:47:16 -0700
Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()

Save a pointer to the passed in closure structure before copying it
and overwriting the *c pointer to point to our copy instead of the
original.  If we hit an error, once we free(c), reset c to point to
the original structure before jumping to the cleanup code that
references *c.

Since one of the errors being checked for is whether the server was
able to malloc(c-nChars * itemSize), the client can potentially pass
a number of characters chosen to cause the malloc to fail and the
error path to be taken, resulting in the read from freed memory.

Since the memory is accessed almost immediately afterwards, and the
X server is mostly single threaded, the odds of the free memory having
invalid contents are low with most malloc implementations when not using
memory debugging features, but some allocators will definitely overwrite
the memory there, leading to a likely crash.

Reported-by: Pedro Ribeiro ped...@gmail.com
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
Reviewed-by: Julien Cristau jcris...@debian.org


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.1.4.1 \
xsrc/external/mit/xorg-server/dist/dix/dixfonts.c
cvs rdiff -u -r1.2 -r1.2.14.1 xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/dix/dixfonts.c
diff -u xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1.4.1
--- xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1	Thu Sep 17 03:34:53 2009
+++ xsrc/external/mit/xorg-server/dist/dix/dixfonts.c	Sun Oct 13 07:25:12 2013
@@ -1512,6 +1512,7 @@ doImageText(ClientPtr client, ITclosureP
 	GC *pGC;
 	unsigned char *data;
 	ITclosurePtr new_closure;
+ITclosurePtr old_closure;
 
 	/* We're putting the client to sleep.  We need to
 	   save some state.  Similar problem to that handled
@@ -1524,6 +1525,7 @@ doImageText(ClientPtr client, ITclosureP
 		err = BadAlloc;
 		goto bail;
 	}
+	old_closure = c;
 	*new_closure = *c;
 	c = new_closure;
 
@@ -1531,6 +1533,7 @@ doImageText(ClientPtr client, ITclosureP
 	if (!data)
 	{
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1542,6 +1545,7 @@ doImageText(ClientPtr client, ITclosureP
 	{
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1555,6 +1559,7 @@ doImageText(ClientPtr client, ITclosureP
 		FreeScratchGC(pGC);
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}

Index: xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c
diff -u xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2 xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2.14.1
--- xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2	Sun Jul  2 19:17:56 2006
+++ xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c	Sun Oct 13 07:25:12 2013
@@ -1544,6 +1544,7 @@ doImageText(client, c)
 	GC *pGC;
 	unsigned char *data;
 	ITclosurePtr new_closure;
+	ITclosurePtr old_closure;
 
 	/* We're putting the client to sleep.  We need to
 	   save some state.  Similar problem to that handled
@@ -1556,6 +1557,7 @@ doImageText(client, c)
 		err = BadAlloc;
 		goto bail;
 	}
+	old_closure = c;
 	*new_closure = *c;
 	c = new_closure;
 
@@ -1563,6 +1565,7 @@ doImageText(client, c)
 	if (!data)
 	{
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1574,6 +1577,7 @@ doImageText(client, c)
 	{
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1587,6 +1591,7 @@ doImageText(client, c)
 		FreeScratchGC(pGC);
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}



CVS commit: [netbsd-5] xsrc

2013-10-13 Thread Julian Coleman
Module Name:xsrc
Committed By:   jdc
Date:   Sun Oct 13 07:24:36 UTC 2013

Modified Files:
xsrc/external/mit/xorg-server/dist/dix [netbsd-5]: dixfonts.c
xsrc/xfree/xc/programs/Xserver/dix [netbsd-5]: dixfonts.c

Log Message:
Pull up revisions:
  xsrc/external/mit/xorg-server/dist/dix/dixfonts.c revision 1.2 via patch
  xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c revision 1.4 via patch
(requested by spz in ticket #1884).

Fix CVE-2013-4396 using a patch from:

--- snip ---
From a4d9bf1259ad28f54b6d59a480b2009cc89ca623 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith alan.coopersm...@oracle.com
Date: Mon, 16 Sep 2013 21:47:16 -0700
Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()

Save a pointer to the passed in closure structure before copying it
and overwriting the *c pointer to point to our copy instead of the
original.  If we hit an error, once we free(c), reset c to point to
the original structure before jumping to the cleanup code that
references *c.

Since one of the errors being checked for is whether the server was
able to malloc(c-nChars * itemSize), the client can potentially pass
a number of characters chosen to cause the malloc to fail and the
error path to be taken, resulting in the read from freed memory.

Since the memory is accessed almost immediately afterwards, and the
X server is mostly single threaded, the odds of the free memory having
invalid contents are low with most malloc implementations when not using
memory debugging features, but some allocators will definitely overwrite
the memory there, leading to a likely crash.

Reported-by: Pedro Ribeiro ped...@gmail.com
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
Reviewed-by: Julien Cristau jcris...@debian.org


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/dix/dixfonts.c
cvs rdiff -u -r1.2 -r1.2.8.1 xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/dix/dixfonts.c
diff -u xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1	Thu Sep 17 03:34:53 2009
+++ xsrc/external/mit/xorg-server/dist/dix/dixfonts.c	Sun Oct 13 07:24:36 2013
@@ -1512,6 +1512,7 @@ doImageText(ClientPtr client, ITclosureP
 	GC *pGC;
 	unsigned char *data;
 	ITclosurePtr new_closure;
+ITclosurePtr old_closure;
 
 	/* We're putting the client to sleep.  We need to
 	   save some state.  Similar problem to that handled
@@ -1524,6 +1525,7 @@ doImageText(ClientPtr client, ITclosureP
 		err = BadAlloc;
 		goto bail;
 	}
+	old_closure = c;
 	*new_closure = *c;
 	c = new_closure;
 
@@ -1531,6 +1533,7 @@ doImageText(ClientPtr client, ITclosureP
 	if (!data)
 	{
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1542,6 +1545,7 @@ doImageText(ClientPtr client, ITclosureP
 	{
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1555,6 +1559,7 @@ doImageText(ClientPtr client, ITclosureP
 		FreeScratchGC(pGC);
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}

Index: xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c
diff -u xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2 xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2.8.1
--- xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2	Sun Jul  2 19:17:56 2006
+++ xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c	Sun Oct 13 07:24:36 2013
@@ -1544,6 +1544,7 @@ doImageText(client, c)
 	GC *pGC;
 	unsigned char *data;
 	ITclosurePtr new_closure;
+	ITclosurePtr old_closure;
 
 	/* We're putting the client to sleep.  We need to
 	   save some state.  Similar problem to that handled
@@ -1556,6 +1557,7 @@ doImageText(client, c)
 		err = BadAlloc;
 		goto bail;
 	}
+	old_closure = c;
 	*new_closure = *c;
 	c = new_closure;
 
@@ -1563,6 +1565,7 @@ doImageText(client, c)
 	if (!data)
 	{
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1574,6 +1577,7 @@ doImageText(client, c)
 	{
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1587,6 +1591,7 @@ doImageText(client, c)
 		FreeScratchGC(pGC);
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}



CVS commit: [netbsd-5-1] xsrc

2013-10-13 Thread Julian Coleman
Module Name:xsrc
Committed By:   jdc
Date:   Sun Oct 13 07:25:06 UTC 2013

Modified Files:
xsrc/external/mit/xorg-server/dist/dix [netbsd-5-1]: dixfonts.c
xsrc/xfree/xc/programs/Xserver/dix [netbsd-5-1]: dixfonts.c

Log Message:
Pull up revisions:
  xsrc/external/mit/xorg-server/dist/dix/dixfonts.c revision 1.2 via patch
  xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c revision 1.4 via patch
(requested by spz in ticket #1884).

Fix CVE-2013-4396 using a patch from:

--- snip ---
From a4d9bf1259ad28f54b6d59a480b2009cc89ca623 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith alan.coopersm...@oracle.com
Date: Mon, 16 Sep 2013 21:47:16 -0700
Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()

Save a pointer to the passed in closure structure before copying it
and overwriting the *c pointer to point to our copy instead of the
original.  If we hit an error, once we free(c), reset c to point to
the original structure before jumping to the cleanup code that
references *c.

Since one of the errors being checked for is whether the server was
able to malloc(c-nChars * itemSize), the client can potentially pass
a number of characters chosen to cause the malloc to fail and the
error path to be taken, resulting in the read from freed memory.

Since the memory is accessed almost immediately afterwards, and the
X server is mostly single threaded, the odds of the free memory having
invalid contents are low with most malloc implementations when not using
memory debugging features, but some allocators will definitely overwrite
the memory there, leading to a likely crash.

Reported-by: Pedro Ribeiro ped...@gmail.com
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
Reviewed-by: Julien Cristau jcris...@debian.org


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.1.2.1 \
xsrc/external/mit/xorg-server/dist/dix/dixfonts.c
cvs rdiff -u -r1.2 -r1.2.12.1 xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/dix/dixfonts.c
diff -u xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1.2.1
--- xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1	Thu Sep 17 03:34:53 2009
+++ xsrc/external/mit/xorg-server/dist/dix/dixfonts.c	Sun Oct 13 07:25:06 2013
@@ -1512,6 +1512,7 @@ doImageText(ClientPtr client, ITclosureP
 	GC *pGC;
 	unsigned char *data;
 	ITclosurePtr new_closure;
+ITclosurePtr old_closure;
 
 	/* We're putting the client to sleep.  We need to
 	   save some state.  Similar problem to that handled
@@ -1524,6 +1525,7 @@ doImageText(ClientPtr client, ITclosureP
 		err = BadAlloc;
 		goto bail;
 	}
+	old_closure = c;
 	*new_closure = *c;
 	c = new_closure;
 
@@ -1531,6 +1533,7 @@ doImageText(ClientPtr client, ITclosureP
 	if (!data)
 	{
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1542,6 +1545,7 @@ doImageText(ClientPtr client, ITclosureP
 	{
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1555,6 +1559,7 @@ doImageText(ClientPtr client, ITclosureP
 		FreeScratchGC(pGC);
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}

Index: xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c
diff -u xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2 xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2.12.1
--- xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2	Sun Jul  2 19:17:56 2006
+++ xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c	Sun Oct 13 07:25:06 2013
@@ -1544,6 +1544,7 @@ doImageText(client, c)
 	GC *pGC;
 	unsigned char *data;
 	ITclosurePtr new_closure;
+	ITclosurePtr old_closure;
 
 	/* We're putting the client to sleep.  We need to
 	   save some state.  Similar problem to that handled
@@ -1556,6 +1557,7 @@ doImageText(client, c)
 		err = BadAlloc;
 		goto bail;
 	}
+	old_closure = c;
 	*new_closure = *c;
 	c = new_closure;
 
@@ -1563,6 +1565,7 @@ doImageText(client, c)
 	if (!data)
 	{
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1574,6 +1577,7 @@ doImageText(client, c)
 	{
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}
@@ -1587,6 +1591,7 @@ doImageText(client, c)
 		FreeScratchGC(pGC);
 		xfree(c-data);
 		xfree(c);
+		c = old_closure;
 		err = BadAlloc;
 		goto bail;
 	}



CVS commit: [netbsd-5] src/doc

2013-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Oct 13 07:26:13 UTC 2013

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

Log Message:
Ticket #1884.


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

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.32 src/doc/CHANGES-5.3:1.1.2.33
--- src/doc/CHANGES-5.3:1.1.2.32	Sat Sep 21 02:58:59 2013
+++ src/doc/CHANGES-5.3	Sun Oct 13 07:26:13 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.32 2013/09/21 02:58:59 riz Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.33 2013/10/13 07:26:13 jdc Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -582,3 +582,14 @@ share/zoneinfo/australasia			1.33
 	This year Fiji will start DST on October 27, not October 20.
 	[apb, ticket #1880]
 
+xsrc/external/mit/xorg-server/dist/dix/dixfonts.c	1.2 via patch
+xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c		1.4 via patch
+
+	Fix CVE-2013-4396 using a patch from Alan Coopersmith:
+	Save a pointer to the passed in closure structure before copying it
+	and overwriting the *c pointer to point to our copy instead of the
+	original.  If we hit an error, once we free(c), reset c to point to
+	the original structure before jumping to the cleanup code that
+	references *c.
+	[spz, ticket #966]
+



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

2013-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Oct 13 07:26:19 UTC 2013

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

Log Message:
Ticket #1884.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/doc/CHANGES-5.1.4

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

Modified files:

Index: src/doc/CHANGES-5.1.4
diff -u src/doc/CHANGES-5.1.4:1.1.2.1 src/doc/CHANGES-5.1.4:1.1.2.2
--- src/doc/CHANGES-5.1.4:1.1.2.1	Sun Oct 13 07:22:07 2013
+++ src/doc/CHANGES-5.1.4	Sun Oct 13 07:26:19 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.4,v 1.1.2.1 2013/10/13 07:22:07 jdc Exp $
+# $NetBSD: CHANGES-5.1.4,v 1.1.2.2 2013/10/13 07:26:19 jdc Exp $
 
 A complete list of changes from the NetBSD 5.1.2 release to the NetBSD 5.1.3
 release:
@@ -10,3 +10,14 @@ sys/sys/param.h	patched by hand
 	Welcome to 5.1.3_PATCH.
 	[jdc]
 
+xsrc/external/mit/xorg-server/dist/dix/dixfonts.c	1.2 via patch
+xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c		1.4 via patch
+
+	Fix CVE-2013-4396 using a patch from Alan Coopersmith:
+	Save a pointer to the passed in closure structure before copying it
+	and overwriting the *c pointer to point to our copy instead of the
+	original.  If we hit an error, once we free(c), reset c to point to
+	the original structure before jumping to the cleanup code that
+	references *c.
+	[spz, ticket #966]
+



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

2013-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Oct 13 07:26:23 UTC 2013

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

Log Message:
Ticket #1884.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/doc/CHANGES-5.2.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.2
diff -u src/doc/CHANGES-5.2.2:1.1.2.1 src/doc/CHANGES-5.2.2:1.1.2.2
--- src/doc/CHANGES-5.2.2:1.1.2.1	Sun Oct 13 07:22:18 2013
+++ src/doc/CHANGES-5.2.2	Sun Oct 13 07:26:23 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2.2,v 1.1.2.1 2013/10/13 07:22:18 jdc Exp $
+# $NetBSD: CHANGES-5.2.2,v 1.1.2.2 2013/10/13 07:26:23 jdc Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.2.1
 release:
@@ -10,3 +10,14 @@ sys/sys/param.h	patched by hand
 	Welcome to 5.2.1_PATCH.
 	[jdc]
 
+xsrc/external/mit/xorg-server/dist/dix/dixfonts.c	1.2 via patch
+xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c		1.4 via patch
+
+	Fix CVE-2013-4396 using a patch from Alan Coopersmith:
+	Save a pointer to the passed in closure structure before copying it
+	and overwriting the *c pointer to point to our copy instead of the
+	original.  If we hit an error, once we free(c), reset c to point to
+	the original structure before jumping to the cleanup code that
+	references *c.
+	[spz, ticket #966]
+



CVS commit: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm

2013-10-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct 13 07:46:26 UTC 2013

Modified Files:
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_arm.c
vchiq_core.c

Log Message:
Print the client_id (lwp address) as hex and avoid stack overflow. Use
snprintf while here.

Fixes PR/48287


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c

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

Modified files:

Index: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.6 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.7
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.6	Thu Sep 19 15:13:43 2013
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c	Sun Oct 13 07:46:26 2013
@@ -577,7 +577,7 @@ vchiq_ioctl(struct file *fp, u_long cmd,
 			if (status != VCHIQ_SUCCESS) {
 vchiq_log_error(vchiq_susp_log_level,
 	%s: cmd %s returned error %d for 
-	service %c%c%c%c:%03d,
+	service %c%c%c%c:%8x,
 	__func__,
 	(cmd == VCHIQ_IOC_USE_SERVICE) ?
 		VCHIQ_IOC_USE_SERVICE :
@@ -1942,7 +1942,7 @@ output_timeout_error(VCHIQ_STATE_T *stat
 		VCHIQ_SERVICE_T *service_ptr = state-services[i];
 		if (service_ptr  service_ptr-service_use_count 
 			(service_ptr-srvstate != VCHIQ_SRVSTATE_FREE)) {
-			snprintf(service_err, 50,  %c%c%c%c(%d) service has 
+			snprintf(service_err, 50,  %c%c%c%c(%8x) service has 
 use count %d%s, VCHIQ_FOURCC_AS_4CHARS(
 	service_ptr-base.fourcc),
  service_ptr-client_id,
@@ -2237,7 +2237,7 @@ vchiq_use_internal(VCHIQ_STATE_T *state,
 		sprintf(entity, VCHIQ:   );
 		entity_uc = arm_state-peer_use_count;
 	} else if (service) {
-		sprintf(entity, %c%c%c%c:%03d,
+		snprintf(entity, sizeof(entity), %c%c%c%c:%8x,
 			VCHIQ_FOURCC_AS_4CHARS(service-base.fourcc),
 			service-client_id);
 		entity_uc = service-service_use_count;
@@ -2366,7 +2366,7 @@ vchiq_release_internal(VCHIQ_STATE_T *st
 	vchiq_log_trace(vchiq_susp_log_level, %s, __func__);
 
 	if (service) {
-		sprintf(entity, %c%c%c%c:%03d,
+		snprintf(entity, sizeof(entity), %c%c%c%c:%8x,
 			VCHIQ_FOURCC_AS_4CHARS(service-base.fourcc),
 			service-client_id);
 		entity_uc = service-service_use_count;
@@ -2596,7 +2596,7 @@ vchiq_check_service(VCHIQ_SERVICE_T *ser
 
 	if (ret == VCHIQ_ERROR) {
 		vchiq_log_error(vchiq_susp_log_level,
-			%s ERROR - %c%c%c%c:%d service count %d, 
+			%s ERROR - %c%c%c%c:%8x service count %d, 
 			state count %d, videocore suspend state %s, __func__,
 			VCHIQ_FOURCC_AS_4CHARS(service-base.fourcc),
 			service-client_id, service-service_use_count,

Index: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c:1.5 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c:1.6
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c:1.5	Fri Sep 20 09:05:53 2013
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c	Sun Oct 13 07:46:26 2013
@@ -3664,7 +3664,7 @@ vchiq_dump_service_state(void *dump_cont
 			if (service-public_fourcc != VCHIQ_FOURCC_INVALID)
 snprintf(remoteport + len2,
 	sizeof(remoteport) - len2,
-	 (client %x), service-client_id);
+	 (client %8x), service-client_id);
 		} else
 			strcpy(remoteport, n/a);
 



CVS commit: src/doc

2013-10-13 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sun Oct 13 08:05:16 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
Mention httpd(8) Lua support


To generate a diff of this commit:
cvs rdiff -u -r1.1851 -r1.1852 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1851 src/doc/CHANGES:1.1852
--- src/doc/CHANGES:1.1851	Thu Oct  3 18:24:28 2013
+++ src/doc/CHANGES	Sun Oct 13 08:05:16 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1851 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1852 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -285,4 +285,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	postfix(1): Import version 2.10.2 [tron 20130925]
 	binutils: updated to FSF binutils 2.23.2.  [christos 20130929]
 	gdb(1): Updated to 7.6.1.  [christos 20131003]
+	httpd(8): Added Lua scripting for content creation. [mbalmer 20131012]
 



CVS commit: src/sys/arch/xen/xen

2013-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Oct 13 12:29:42 UTC 2013

Modified Files:
src/sys/arch/xen/xen: xpci_xenbus.c

Log Message:
Fix pasto in previous; pass a correct device_t to config_pending_derc().


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/xen/xen/xpci_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xpci_xenbus.c
diff -u src/sys/arch/xen/xen/xpci_xenbus.c:1.13 src/sys/arch/xen/xen/xpci_xenbus.c:1.14
--- src/sys/arch/xen/xen/xpci_xenbus.c:1.13	Sun Oct 13 06:55:34 2013
+++ src/sys/arch/xen/xen/xpci_xenbus.c	Sun Oct 13 12:29:42 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: xpci_xenbus.c,v 1.13 2013/10/13 06:55:34 riz Exp $  */
+/*  $NetBSD: xpci_xenbus.c,v 1.14 2013/10/13 12:29:42 tsutsui Exp $  */
 
 /*
  * Copyright (c) 2009 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xpci_xenbus.c,v 1.13 2013/10/13 06:55:34 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: xpci_xenbus.c,v 1.14 2013/10/13 12:29:42 tsutsui Exp $);
 
 #include opt_xen.h
 
@@ -284,7 +284,7 @@ xpci_backend_changed(void *arg, XenbusSt
 		sc-sc_backend_status = XPCI_STATE_CONNECTED;
 
 		/* the devices should be working now */
-		config_pending_decr(sc-sc_dksc.sc_dev);
+		config_pending_decr(sc-sc_dev);
 		break;
 	default:
 		panic(bad backend state %d, new_state);



CVS commit: src/distrib/utils/sysinst

2013-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Oct 13 15:32:14 UTC 2013

Modified Files:
src/distrib/utils/sysinst: mbr.c

Log Message:
Fix another botch of my dumb patch in PR/45990; add missing braces.

The offset of MBR partition 0 was unintentionally set to 2048 even on
small (=128GB) disks.  Probably we should rethink the threshold,
but anyway sysinst(8) should follow fdisk(8) default.
http://nxr.NetBSD.org/xref/src/sbin/fdisk/fdisk.c?r=1.145#1199
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sbin/fdisk/fdisk.c#rev1.129

The problem is pointed out and analyzed by Simon Nicolussi in PR/48304.

Should be pulled up to all netbsd-6* branches.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/distrib/utils/sysinst/mbr.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/mbr.c
diff -u src/distrib/utils/sysinst/mbr.c:1.91 src/distrib/utils/sysinst/mbr.c:1.92
--- src/distrib/utils/sysinst/mbr.c:1.91	Sat May 26 05:09:59 2012
+++ src/distrib/utils/sysinst/mbr.c	Sun Oct 13 15:32:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.91 2012/05/26 05:09:59 tsutsui Exp $ */
+/*	$NetBSD: mbr.c,v 1.92 2013/10/13 15:32:14 tsutsui Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1890,8 +1890,9 @@ get_ptn_alignment(struct mbr_partition *
 		}
 	} else {
 		/* Use 1MB offset for large (128GB) disks */
-		if (dlsize  2048 * 1024 * 128)
+		if (dlsize  2048 * 1024 * 128) {
 			ptn_alignment = 2048;
 			ptn_0_offset = 2048;
+		}
 	}
 }



CVS commit: src/usr.bin/calendar/calendars

2013-10-13 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Sun Oct 13 16:43:49 UTC 2013

Modified Files:
src/usr.bin/calendar/calendars: calendar.holiday

Log Message:
delete duplicate (and wrong) entry for Thanksgiving Day in Canada


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/calendar/calendars/calendar.holiday

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

Modified files:

Index: src/usr.bin/calendar/calendars/calendar.holiday
diff -u src/usr.bin/calendar/calendars/calendar.holiday:1.21 src/usr.bin/calendar/calendars/calendar.holiday:1.22
--- src/usr.bin/calendar/calendars/calendar.holiday:1.21	Sun Jan 20 23:52:43 2013
+++ src/usr.bin/calendar/calendars/calendar.holiday	Sun Oct 13 16:43:49 2013
@@ -349,7 +349,6 @@
 10/07	National Heroes Day in Jamaica
 10/08	Constitution Day in U.S.S.R
 10/08	Fiji Day in Fiji
-10/08	Thanksgiving Day in Canada
 10/09	Independence Day in Uganda
 10/09	Korean Alphabet Day in South Korea
 10/09	Leif Erikson Day commemorates the discovery of North America in AD 1000



CVS commit: src/doc

2013-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Oct 13 17:03:00 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
Add a late entry about addition of support for AlphaStation DS15.


To generate a diff of this commit:
cvs rdiff -u -r1.1852 -r1.1853 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1852 src/doc/CHANGES:1.1853
--- src/doc/CHANGES:1.1852	Sun Oct 13 08:05:16 2013
+++ src/doc/CHANGES	Sun Oct 13 17:03:00 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1852 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1853 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -282,6 +282,8 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	mpl115a(4): Add driver for Freescale MPL115A2 I2C absolute pressure 
 		sensor. [rkujawa 20130908]
 	dhcpcd(8): Import dhcpcd-6.1.0 [roy 20130920]
+	alpha: Add support for AlphaStation DS15.  Ported from OpenBSD via
+		PR port-alpha/48148 by nullnilaki. [tsutsui 20130923]
 	postfix(1): Import version 2.10.2 [tron 20130925]
 	binutils: updated to FSF binutils 2.23.2.  [christos 20130929]
 	gdb(1): Updated to 7.6.1.  [christos 20131003]



CVS commit: src/sys/lib/libsa

2013-10-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Oct 13 20:09:02 UTC 2013

Modified Files:
src/sys/lib/libsa: cread.c

Log Message:
Let's not use uninitialized variables to write to random memory
locations, shall we?


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/lib/libsa/cread.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/lib/libsa/cread.c
diff -u src/sys/lib/libsa/cread.c:1.25 src/sys/lib/libsa/cread.c:1.26
--- src/sys/lib/libsa/cread.c:1.25	Fri Oct 11 16:30:31 2013
+++ src/sys/lib/libsa/cread.c	Sun Oct 13 20:09:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cread.c,v 1.25 2013/10/11 16:30:31 pgoyette Exp $	*/
+/*	$NetBSD: cread.c,v 1.26 2013/10/13 20:09:02 joerg Exp $	*/
 
 /*
  * Copyright (c) 1996
@@ -259,7 +259,6 @@ open(const char *fname, int mode)
 	int fd;
 	struct sd *s = 0;
 
-	ss[fd] = NULL;
 	if (((fd = oopen(fname, mode)) == -1) || (mode != 0))
 		/* compression only for read */
 		return fd;



CVS commit: src/share/man/man4

2013-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Oct 13 21:09:35 UTC 2013

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

Log Message:
Reorganize the file-system-related options; put options for each fs
type (or group of fs types) in its own subsection and put the
fs-independent options first.

Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.429 -r1.430 src/share/man/man4/options.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/options.4
diff -u src/share/man/man4/options.4:1.429 src/share/man/man4/options.4:1.430
--- src/share/man/man4/options.4:1.429	Fri Oct  4 16:50:18 2013
+++ src/share/man/man4/options.4	Sun Oct 13 21:09:35 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: options.4,v 1.429 2013/10/04 16:50:18 wiz Exp $
+.\	$NetBSD: options.4,v 1.430 2013/10/13 21:09:35 dholland Exp $
 .\
 .\ Copyright (c) 1996
 .\ 	Perry E. Metzger.  All rights reserved.
@@ -30,7 +30,7 @@
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
 .\
-.Dd October 4, 2013
+.Dd October 13, 2013
 .Dt OPTIONS 4
 .Os
 .Sh NAME
@@ -932,6 +932,44 @@ See
 and
 .Xr nfsd 8
 for details.
+.It Cd options NVNODE=integer
+This option sets the size of the cache used by the name-to-inode translation
+routines, (a.k.a. the
+.Fn namei
+cache, though called by many other names in the kernel source).
+By default, this cache has
+.Dv NPROC
+(set as 20 + 16 * MAXUSERS) * (80 + NPROC / 8) entries.
+A reasonable way to derive a value of
+.Dv NVNODE ,
+should you notice a large number of namei cache misses with a tool such as
+.Xr systat 1 ,
+is to examine your system's current computed value with
+.Xr sysctl 8 ,
+(which calls this parameter kern.maxvnodes) and to increase this value
+until either the namei cache hit rate improves or it is determined that
+your system does not benefit substantially from an increase in the size of
+the namei cache.
+.It Cd options NAMECACHE_ENTER_REVERSE
+Causes the namei cache to always enter a reverse mapping (vnode -\*[Gt] name)
+as well as a normal one.
+Normally, this is already done for directory vnodes, to speed up the getcwd
+operation.
+This option will cause longer hash chains in the reverse cache, and thus
+slow down getcwd somewhat.
+However, it does make vnode -\*[Gt] path translations possible in some cases.
+For now, only useful if strict /proc/#/maps emulation for Linux binaries is
+required.
+.El
+.Ss Options for FFS/UFS File Systems
+.Bl -ohang
+.It Cd options WAPBL
+Enable
+.Dq Write Ahead Physical Block Logging file system journaling .
+This provides rapid file system consistency checking after a system outage.
+It also provides better general use performance over regular FFS.
+See also
+.Xr wapbl 4 .
 .It Cd options QUOTA
 Enables kernel support for file system quotas.
 See
@@ -977,41 +1015,12 @@ Maybe useful for install media kernels, 
 embedded systems which don't require the snapshot support.
 .It Cd options UFS_EXTATTR
 Enable extended attribute support for UFS1 filesystems.
-.It Cd options WAPBL
-Enable
-.Dq Write Ahead Physical Block Logging file system journaling .
-This provides rapid file system consistency checking after a system outage.
-It also provides better general use performance over regular FFS.
-See also
-.Xr wapbl 4 .
-.It Cd options NVNODE=integer
-This option sets the size of the cache used by the name-to-inode translation
-routines, (a.k.a. the
-.Fn namei
-cache, though called by many other names in the kernel source).
-By default, this cache has
-.Dv NPROC
-(set as 20 + 16 * MAXUSERS) * (80 + NPROC / 8) entries.
-A reasonable way to derive a value of
-.Dv NVNODE ,
-should you notice a large number of namei cache misses with a tool such as
-.Xr systat 1 ,
-is to examine your system's current computed value with
-.Xr sysctl 8 ,
-(which calls this parameter kern.maxvnodes) and to increase this value
-until either the namei cache hit rate improves or it is determined that
-your system does not benefit substantially from an increase in the size of
-the namei cache.
-.It Cd options NAMECACHE_ENTER_REVERSE
-Causes the namei cache to always enter a reverse mapping (vnode -\*[Gt] name)
-as well as a normal one.
-Normally, this is already done for directory vnodes, to speed up the getcwd
-operation.
-This option will cause longer hash chains in the reverse cache, and thus
-slow down getcwd somewhat.
-However, it does make vnode -\*[Gt] path translations possible in some cases.
-For now, only useful if strict /proc/#/maps emulation for Linux binaries is
-required.
+.It Cd options UFS_DIRHASH
+Increase lookup performance by maintaining in-core hash tables
+for large directories.
+.El
+.Ss Options for ext2fs File Systems
+.Bl -ohang
 .It Cd options EXT2FS_SYSTEM_FLAGS
 This option changes the behavior of the APPEND and IMMUTABLE flags
 for a file on an
@@ -1025,6 +1034,9 @@ See also
 .Xr chflags 1
 and
 .Xr secmodel_securelevel 9 

CVS commit: src/share/man/man4

2013-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Oct 13 21:17:35 UTC 2013

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

Log Message:
Add LFS options, both preexisting and UFS-derived. Leave the ones that
are not yet believed to work commented out. Ride previous date bump.


To generate a diff of this commit:
cvs rdiff -u -r1.430 -r1.431 src/share/man/man4/options.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/options.4
diff -u src/share/man/man4/options.4:1.430 src/share/man/man4/options.4:1.431
--- src/share/man/man4/options.4:1.430	Sun Oct 13 21:09:35 2013
+++ src/share/man/man4/options.4	Sun Oct 13 21:17:35 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: options.4,v 1.430 2013/10/13 21:09:35 dholland Exp $
+.\	$NetBSD: options.4,v 1.431 2013/10/13 21:17:35 dholland Exp $
 .\
 .\ Copyright (c) 1996
 .\ 	Perry E. Metzger.  All rights reserved.
@@ -1019,6 +1019,27 @@ Enable extended attribute support for UF
 Increase lookup performance by maintaining in-core hash tables
 for large directories.
 .El
+.Ss Options for the LFS File System
+.Bl -ohang
+.\ .It Cd options LFS_KERNEL_RFW
+.\ There is no documentation for this. (XXX)
+.\ .It Cd options LFS_QUOTA
+.\ Enable traditional quota support for LFS.
+.\ (It is not clear if this works.)
+.\ .It Cd options LFS_QUOTA2
+.\ Enable modernized 64-bit quota support for LFS.
+.\ (This does not work yet.)
+.It Cd options LFS_EI
+Enable ``Endian-Independent'' LFS support.
+This allows (at a small performance cost) mounting an LFS file system
+created for another architecture.
+.\ .It Cd options LFS_EXTATTR
+.\ Enable extended attribute support for LFS.
+.\ (It is not clear if this works.)
+.It Cd options LFS_DIRHASH
+Increase lookup performance by maintaining in-core hash tables
+for large directories.
+.El
 .Ss Options for ext2fs File Systems
 .Bl -ohang
 .It Cd options EXT2FS_SYSTEM_FLAGS



CVS commit: src/share/man/man4

2013-10-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Oct 13 22:34:13 UTC 2013

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

Log Message:
More markup, whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.431 -r1.432 src/share/man/man4/options.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/options.4
diff -u src/share/man/man4/options.4:1.431 src/share/man/man4/options.4:1.432
--- src/share/man/man4/options.4:1.431	Sun Oct 13 21:17:35 2013
+++ src/share/man/man4/options.4	Sun Oct 13 22:34:13 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: options.4,v 1.431 2013/10/13 21:17:35 dholland Exp $
+.\	$NetBSD: options.4,v 1.432 2013/10/13 22:34:13 wiz Exp $
 .\
 .\ Copyright (c) 1996
 .\ 	Perry E. Metzger.  All rights reserved.
@@ -647,7 +647,9 @@ various kernel activities.
 These logs can be displayed by using
 .Cm show kernhist
 from DDB.
-See the kernel source file sys/kern/kern_history.c for details.
+See the kernel source file
+.Pa sys/kern/kern_history.c
+for details.
 .It Cd options KERNHIST_PRINT
 Prints the kernel history logs on the system console as entries are added.
 Note that the output is
@@ -661,7 +663,9 @@ it enables the UVM history logs.
 These logs can be displayed by using
 .Cm show kernhist
 from DDB.
-See the kernel source file sys/uvm/uvm_stat.c for details.
+See the kernel source file
+.Pa sys/uvm/uvm_stat.c
+for details.
 .It Cd options UVMHIST_PRINT
 Like
 .Em UVMHIST ,
@@ -958,8 +962,9 @@ operation.
 This option will cause longer hash chains in the reverse cache, and thus
 slow down getcwd somewhat.
 However, it does make vnode -\*[Gt] path translations possible in some cases.
-For now, only useful if strict /proc/#/maps emulation for Linux binaries is
-required.
+For now, only useful if strict
+.Pa /proc/#/maps
+emulation for Linux binaries is required.
 .El
 .Ss Options for FFS/UFS File Systems
 .Bl -ohang
@@ -1000,7 +1005,9 @@ and
 .Dq mfs
 file systems at this time.
 .It Cd options FFS_EI
-Enable ``Endian-Independent'' FFS support.
+Enable
+.Dq Endian-Independent
+FFS support.
 This allows a system to mount an FFS file system created for another
 architecture, at a small performance cost for all FFS file systems.
 See also
@@ -1030,7 +1037,9 @@ for large directories.
 .\ Enable modernized 64-bit quota support for LFS.
 .\ (This does not work yet.)
 .It Cd options LFS_EI
-Enable ``Endian-Independent'' LFS support.
+Enable
+.Dq Endian-Independent
+LFS support.
 This allows (at a small performance cost) mounting an LFS file system
 created for another architecture.
 .\ .It Cd options LFS_EXTATTR
@@ -1079,7 +1088,7 @@ Same as
 but use the DHCP extensions to the
 BOOTP protocol (RFC 1541).
 .It Cd options NFS_BOOT_BOOTP_REQFILE
-Specifies the string sent in the bp_file field of the BOOTP / DHCP
+Specifies the string sent in the bp_file field of the BOOTP/DHCP
 request packet.
 .It Cd options NFS_BOOT_BOOTPARAM
 Enable use of the BOOTPARAM protocol, consisting of RARP and
@@ -1281,7 +1290,7 @@ and
 system calls, which are intended for use by
 .Xr ntpd 8
 and are enabled by the option.
-On systems with sub-microsecond resolution timers, or where (HZ / 10)
+On systems with sub-microsecond resolution timers, or where (HZ/10)
 is not an integer, the
 .Em NTP
 option also enables extended-precision arithmetic to keep track of



CVS commit: src

2013-10-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 14 01:30:21 UTC 2013

Modified Files:
src/distrib/sets: sets.subr
src/distrib/sets/lists/comp: mi
src/lib/libc: Makefile
src/share/mk: bsd.lib.mk bsd.own.mk

Log Message:
Include compiler-rt and libunwind in libc for Clang/x86 builds.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/distrib/sets/sets.subr
cvs rdiff -u -r1.1841 -r1.1842 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.158 -r1.159 src/lib/libc/Makefile
cvs rdiff -u -r1.339 -r1.340 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.751 -r1.752 src/share/mk/bsd.own.mk

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.153 src/distrib/sets/sets.subr:1.154
--- src/distrib/sets/sets.subr:1.153	Sun Sep 29 12:11:59 2013
+++ src/distrib/sets/sets.subr	Mon Oct 14 01:30:21 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.153 2013/09/29 12:11:59 joerg Exp $
+#	$NetBSD: sets.subr,v 1.154 2013/10/14 01:30:21 joerg Exp $
 #
 
 #
@@ -179,7 +179,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.153 2013/09/29 12:11:59 joerg Exp $
+# 	# $NetBSD: sets.subr,v 1.154 2013/10/14 01:30:21 joerg Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -229,6 +229,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 #	ldap			${MKLDAP} != no
 #	lint			${MKLINT} != no
 #	libcxx			${MKLIBCXX} != no
+#	libgcc			${USE_LIBGCC} != no
 #	libstdcxx		${MKLIBSTDCXX} != no
 #	lld			${MKLLD} != no
 #	lldb			${MKLLDB} != no

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1841 src/distrib/sets/lists/comp/mi:1.1842
--- src/distrib/sets/lists/comp/mi:1.1841	Sat Oct 12 07:51:54 2013
+++ src/distrib/sets/lists/comp/mi	Mon Oct 14 01:30:21 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1841 2013/10/12 07:51:54 njoly Exp $
+#	$NetBSD: mi,v 1.1842 2013/10/14 01:30:21 joerg Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2779,6 +2779,7 @@
 ./usr/include/ulimit.hcomp-c-include
 ./usr/include/unctrl.hcomp-c-include
 ./usr/include/unistd.hcomp-c-include
+./usr/include/unwind.hcomp-c-include		!libgcc
 ./usr/include/usb.hcomp-obsolete		obsolete
 ./usr/include/usbhid.hcomp-c-include
 ./usr/include/util.hcomp-c-include

Index: src/lib/libc/Makefile
diff -u src/lib/libc/Makefile:1.158 src/lib/libc/Makefile:1.159
--- src/lib/libc/Makefile:1.158	Tue Jul 30 15:28:47 2013
+++ src/lib/libc/Makefile	Mon Oct 14 01:30:21 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.158 2013/07/30 15:28:47 joerg Exp $
+#	$NetBSD: Makefile,v 1.159 2013/10/14 01:30:21 joerg Exp $
 #	@(#)Makefile	8.2 (Berkeley) 2/3/94
 #
 # All library objects contain sccsid strings by default; they may be
@@ -63,6 +63,9 @@ CPPFLAGS+=	-D__BUILD_LEGACY
 .include ${.CURDIR}/db/Makefile.inc
 .include ${.CURDIR}/citrus/Makefile.inc
 .include ${.CURDIR}/compat-43/Makefile.inc
+.if ${USE_LIBGCC} == no
+.include ${.CURDIR}/compiler_rt/Makefile.inc
+.endif
 .include ${.CURDIR}/dlfcn/Makefile.inc
 .include ${.CURDIR}/gdtoa/Makefile.inc
 .include ${.CURDIR}/gen/Makefile.inc
@@ -96,6 +99,9 @@ CPPFLAGS+=	-D__BUILD_LEGACY
 .include ${.CURDIR}/time/Makefile.inc
 .include ${.CURDIR}/tls/Makefile.inc
 .include ${.CURDIR}/sys/Makefile.inc
+.if ${USE_LIBGCC} == no
+.include ${NETBSDSRCDIR}/sys/lib/libunwind/Makefile.inc
+.endif
 .include ${.CURDIR}/uuid/Makefile.inc
 .if (${MKYP} != no)
 .include ${.CURDIR}/yp/Makefile.inc
@@ -146,3 +152,6 @@ CSHLIBFLAGS+=	-D_I18N_DYNAMIC
 
 # force the dynamic linker to initialize libc first
 SHLIB_SHFLAGS+=	-Wl,-z,initfirst
+.if ${USE_LIBGCC} == no
+SHLIB_SHFLAGS+= -Wl,-z,defs
+.endif

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.339 src/share/mk/bsd.lib.mk:1.340
--- src/share/mk/bsd.lib.mk:1.339	Thu Sep 12 17:14:20 2013
+++ src/share/mk/bsd.lib.mk	Mon Oct 14 01:30:21 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.339 2013/09/12 17:14:20 joerg Exp $
+#	$NetBSD: bsd.lib.mk,v 1.340 2013/10/14 01:30:21 joerg Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -589,7 +589,7 @@ DPLIBC ?= ${DESTDIR}${LIBC_SO}
 .endif
 .else
 LDLIBC ?= -nodefaultlibs
-.if ${LIB} == c
+.if ${USE_LIBGCC} == yes  ${LIB} == c
 LDADD+= -lgcc
 .endif
 .endif

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.751 src/share/mk/bsd.own.mk:1.752
--- src/share/mk/bsd.own.mk:1.751	Sun Sep 29 12:11:59 2013
+++ src/share/mk/bsd.own.mk	Mon Oct 14 01:30:21 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.751 2013/09/29 12:11:59 joerg Exp $
+#	$NetBSD: bsd.own.mk,v 1.752 2013/10/14 01:30:21 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -65,6 +65,12 @@ 

CVS commit: src/external/bsd/llvm

2013-10-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 14 01:47:50 UTC 2013

Modified Files:
src/external/bsd/llvm/config/llvm/Config: config.h.in
src/external/bsd/llvm/include: Makefile

Log Message:
Don't pass -std=c++11 down to configure, it breaks C compiler detection.
Regen configuration.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/llvm/config/llvm/Config/config.h.in
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/llvm/include/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/llvm/config/llvm/Config/config.h.in
diff -u src/external/bsd/llvm/config/llvm/Config/config.h.in:1.8 src/external/bsd/llvm/config/llvm/Config/config.h.in:1.9
--- src/external/bsd/llvm/config/llvm/Config/config.h.in:1.8	Mon Sep  2 14:34:55 2013
+++ src/external/bsd/llvm/config/llvm/Config/config.h.in	Mon Oct 14 01:47:50 2013
@@ -22,6 +22,9 @@
 /* Define if you want backtraces on crash */
 #define ENABLE_BACKTRACES 1
 
+/* Define to enable crash handling overrides */
+#define ENABLE_CRASH_OVERRIDES 1
+
 /* Define if position independent code is enabled */
 #define ENABLE_PIC 1
 
@@ -71,7 +74,7 @@
 #define HAVE_CRASHREPORTER_INFO 0
 
 /* Define to 1 if you have the cxxabi.h header file. */
-/* #undef HAVE_CXXABI_H */
+#define HAVE_CXXABI_H 1
 
 /* Define to 1 if you have the declaration of `FE_ALL_EXCEPT', and to 0 if you
don't. */
@@ -217,6 +220,9 @@
 /* Define to 1 if you have the `pthread' library (-lpthread). */
 #define HAVE_LIBPTHREAD 1
 
+/* Define to 1 if you have the `shell32' library (-lshell32). */
+/* #undef HAVE_LIBSHELL32 */
+
 /* Define to 1 if you have the `udis86' library (-ludis86). */
 /* #undef HAVE_LIBUDIS86 */
 

Index: src/external/bsd/llvm/include/Makefile
diff -u src/external/bsd/llvm/include/Makefile:1.22 src/external/bsd/llvm/include/Makefile:1.23
--- src/external/bsd/llvm/include/Makefile:1.22	Mon Oct 14 01:37:39 2013
+++ src/external/bsd/llvm/include/Makefile	Mon Oct 14 01:47:50 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2013/10/14 01:37:39 joerg Exp $
+#	$NetBSD: Makefile,v 1.23 2013/10/14 01:47:50 joerg Exp $
 
 .include bsd.init.mk
 
@@ -177,7 +177,7 @@ run-configure:
 	mkdir -p tmp
 	cd tmp  ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
 	CC=${CC:Q} CFLAGS=${CFLAGS:N-Werror:Q} CXX=${CXX:Q} CXXFLAGS=${CXXFLAGS:N-Werror:Q} \
-	CPPFLAGS=${CPPFLAGS:Q} LDFLAGS=${LDFLAGS:Q} LD=${LD:Q} LIBS=-lm \
+	CPPFLAGS=${CPPFLAGS:N-std=c++11:Q} LDFLAGS=${LDFLAGS:Q} LD=${LD:Q} LIBS=-lm \
 	ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_mmap_file=yes llvm_cv_c_printf_a=yes
 	cp -r tmp/include/llvm/* ${LLVM_INCLUDE_CONFIG}/llvm/
 	mv ${LLVM_INCLUDE_CONFIG}/llvm/Config/config.h \



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

2013-10-13 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Mon Oct 14 04:18:00 UTC 2013

Modified Files:
src/sys/arch/arm/marvell: mvsoctmr.c

Log Message:
Remove some #ifdef ARMADAXP.  We can enable simultaneously both ARMADAXP and
other SoC options.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/marvell/mvsoctmr.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/marvell/mvsoctmr.c
diff -u src/sys/arch/arm/marvell/mvsoctmr.c:1.9 src/sys/arch/arm/marvell/mvsoctmr.c:1.10
--- src/sys/arch/arm/marvell/mvsoctmr.c:1.9	Wed May  1 12:45:31 2013
+++ src/sys/arch/arm/marvell/mvsoctmr.c	Mon Oct 14 04:17:59 2013
@@ -1,6 +1,6 @@
-/*	$NetBSD: mvsoctmr.c,v 1.9 2013/05/01 12:45:31 rkujawa Exp $	*/
+/*	$NetBSD: mvsoctmr.c,v 1.10 2013/10/14 04:17:59 kiyohara Exp $	*/
 /*
- * Copyright (c) 2007, 2008 KIYOHARA Takashi
+ * Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v 1.9 2013/05/01 12:45:31 rkujawa Exp $);
+__KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v 1.10 2013/10/14 04:17:59 kiyohara Exp $);
 
 #include opt_ddb.h
 #include opt_mvsoc.h
@@ -49,6 +49,7 @@ __KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v
 #include arm/marvell/mvsocvar.h
 #include arm/marvell/mvsoctmrreg.h
 
+#include dev/marvell/marvellreg.h
 #include dev/marvell/marvellvar.h
 
 #include dev/sysmon/sysmonvar.h
@@ -68,9 +69,10 @@ struct mvsoctmr_softc {
 
 	bus_space_tag_t sc_iot;
 	bus_space_handle_t sc_ioh;
-#if defined(ARMADAXP)
 	int sc_irq;
-#endif
+
+#define TMR_FLAGS_ARMADAXP	(1  0)
+	int sc_flags;
 };
 
 
@@ -116,7 +118,8 @@ mvsoctmr_match(device_t parent, struct c
 
 	if (strcmp(mva-mva_name, match-cf_name) != 0)
 		return 0;
-	if (mva-mva_offset == MVA_OFFSET_DEFAULT)
+	if (mva-mva_offset == MVA_OFFSET_DEFAULT ||
+	mva-mva_irq == MVA_IRQ_DEFAULT)
 		return 0;
 
 	mva-mva_size = MVSOCTMR_SIZE;
@@ -137,15 +140,22 @@ mvsoctmr_attach(device_t parent, device_
 	if (mvsoctmr_sc == NULL)
 		mvsoctmr_sc = sc;
 
-#if defined(ARMADAXP)
-	sc-sc_irq = mva-mva_irq;
-#endif
-
 	sc-sc_dev = self;
 	sc-sc_iot = mva-mva_iot;
 	if (bus_space_subregion(mva-mva_iot, mva-mva_ioh,
 	mva-mva_offset, mva-mva_size, sc-sc_ioh))
 		panic(%s: Cannot map registers, device_xname(self));
+	sc-sc_irq = mva-mva_irq;
+
+	switch (mva-mva_model) {
+	case MARVELL_ARMADAXP_MV78130:
+	case MARVELL_ARMADAXP_MV78160:
+	case MARVELL_ARMADAXP_MV78230:
+	case MARVELL_ARMADAXP_MV78260:
+	case MARVELL_ARMADAXP_MV78460:
+		sc-sc_flags = TMR_FLAGS_ARMADAXP;
+		break;
+	}
 
 	mvsoctmr_timecounter.tc_name = device_xname(self);
 	mvsoctmr_cntl(sc, MVSOCTMR_TIMER1, 0x, 1, 1);
@@ -186,9 +196,12 @@ clockhandler(void *arg)
 	struct clockframe *frame = arg;
 
 #if defined(ARMADAXP)
-	/* Acknowledge all timers-related interrupts */
-	bus_space_write_4(mvsoctmr_sc-sc_iot, mvsoctmr_sc-sc_ioh,
-	MVSOCTMR_TESR, 0x0);
+	KASSERT(mvsoctmr_sc != NULL);
+
+	if (mvsoctmr_sc-sc_flags  TMR_FLAGS_ARMADAXP)
+		/* Acknowledge all timers-related interrupts */
+		bus_space_write_4(mvsoctmr_sc-sc_iot, mvsoctmr_sc-sc_ioh,
+		MVSOCTMR_TESR, 0x0);
 #endif
 
 	hardclock(frame);
@@ -226,12 +239,11 @@ cpu_initclocks(void)
 
 	mvsoctmr_timecounter.tc_priv = sc;
 
-#if defined(ARMADAXP)
-	/* We set global timer and counter to 25 MHz mode */
-	mvsoctmr_timecounter.tc_frequency = 2500;
-#else
-	mvsoctmr_timecounter.tc_frequency = mvTclk;
-#endif
+	if (sc-sc_flags  TMR_FLAGS_ARMADAXP)
+		/* We set global timer and counter to 25 MHz mode */
+		mvsoctmr_timecounter.tc_frequency = 2500;
+	else
+		mvsoctmr_timecounter.tc_frequency = mvTclk;
 
 	timer0_tval = (mvsoctmr_timecounter.tc_frequency * 2) / (u_long) hz;
 	timer0_tval = (timer0_tval / 2) + (timer0_tval  1);
@@ -239,19 +251,19 @@ cpu_initclocks(void)
 	mvsoctmr_cntl(sc, MVSOCTMR_TIMER0, timer0_tval, en, autoen);
 	mvsoctmr_cntl(sc, MVSOCTMR_TIMER1, 0x, en, autoen);
 
-#if defined(ARMADAXP)
-	/*
-	 * Establishing timer interrupts is slightly different for Armada XP
-	 * than for other supported SoCs from Marvell.
-	 * Timer interrupt is no different from any other interrupt in Armada
-	 * XP, so we use generic marvell_intr_establish().
-	 */
-	clock_ih = marvell_intr_establish(sc-sc_irq, IPL_CLOCK,
-	clockhandler, NULL);
-#else
-	clock_ih = mvsoc_bridge_intr_establish(MVSOC_MLMB_MLMBI_CPUTIMER0INTREQ,
-	IPL_CLOCK, clockhandler, NULL);
-#endif
+	if (sc-sc_flags  TMR_FLAGS_ARMADAXP) {
+		/*
+		 * Establishing timer interrupts is slightly different for
+		 * Armada XP than for other supported SoCs from Marvell.
+		 * Timer interrupt is no different from any other interrupt
+		 * in Armada XP, so we use generic marvell_intr_establish().
+		 */
+		clock_ih = marvell_intr_establish(sc-sc_irq, 

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

2013-10-13 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Mon Oct 14 04:20:44 UTC 2013

Modified Files:
src/sys/arch/arm/marvell: mvsoctmrreg.h

Log Message:
Add timer 2 and 3 for Discovery Innovation.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/marvell/mvsoctmrreg.h

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

Modified files:

Index: src/sys/arch/arm/marvell/mvsoctmrreg.h
diff -u src/sys/arch/arm/marvell/mvsoctmrreg.h:1.2 src/sys/arch/arm/marvell/mvsoctmrreg.h:1.3
--- src/sys/arch/arm/marvell/mvsoctmrreg.h:1.2	Wed May  1 12:45:31 2013
+++ src/sys/arch/arm/marvell/mvsoctmrreg.h	Mon Oct 14 04:20:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsoctmrreg.h,v 1.2 2013/05/01 12:45:31 rkujawa Exp $	*/
+/*	$NetBSD: mvsoctmrreg.h,v 1.3 2013/10/14 04:20:44 kiyohara Exp $	*/
 /*
  * Copyright (c) 2007 KIYOHARA Takashi
  * All rights reserved.
@@ -37,6 +37,8 @@
 #define MVSOCTMR_TIMER0		0
 #define MVSOCTMR_TIMER1		1
 #define MVSOCTMR_WATCHDOG	2
+#define MVSOCTMR_TIMER2		4	/* Discovery Innovation only */
+#define MVSOCTMR_TIMER3		5	/* Discovery Innovation only */
 
 /* CPU Timers Control Register (MVSOCTMR_CTCR) */
 #define MVSOCTMR_CTCR_CPUTIMEREN(n)	(1  ((n) * 2))