Re: CVS commit: [agc-symver] src/lib/libisns

2013-03-28 Thread Christos Zoulas
In article 20130328151625.9236a17...@cvs.netbsd.org,
Alistair G. Crooks source-changes-d@NetBSD.org wrote:
-=-=-=-=-=-

Module Name:   src
Committed By:  agc
Date:  Thu Mar 28 15:16:25 UTC 2013

Added Files:
   src/lib/libisns [agc-symver]: Version.map


Perhaps calling those version.map is better? Why the capitalization?

christos



Re: CVS commit: [agc-symver] src/lib/libisns

2013-03-28 Thread Alistair Crooks
On Thu, Mar 28, 2013 at 07:21:41PM +, Christos Zoulas wrote:
 In article 20130328151625.9236a17...@cvs.netbsd.org,
 Alistair G. Crooks source-changes-d@NetBSD.org wrote:
 -=-=-=-=-=-
 
 Module Name: src
 Committed By:agc
 Date:Thu Mar 28 15:16:25 UTC 2013
 
 Added Files:
  src/lib/libisns [agc-symver]: Version.map
 
 
 Perhaps calling those version.map is better? Why the capitalization?

That's what FreeBSD used (although, admittedly, they also had
Symbol.map and Versions.def, which we do without).

And maybe, in the spirit of shlib_version, version_map, or
version_info or some other name is better?

Anyway, let me get them all added with the same name on the branch,
and I can change them all in one fell swoop before merging the branch.

Thanks,
Alistair


Re: CVS commit: src/lib/libpthread

2013-03-28 Thread YAMAMOTO Takashi
 Module Name:  src
 Committed By: christos
 Date: Thu Mar 28 18:07:12 UTC 2013
 
 Modified Files:
   src/lib/libpthread: pthread_cond.c
 
 Log Message:
 PR/47703: Yasushi Oshima: pthread_cond_timedwait() does not wait
 after call pthread_condattr_setclock(CLOCK_MONOTONIC)
 
 _lwp_park(2) expects a realtime clock, and it gets passed a monotonic
 one.  Since monotonic  real, it never sleeps. This patch adjusts
 the monotonic clock to be a real one before it passes is to
 _lwp_park(2). This is the minimal hacky fix and it will be fixed
 properly in _lwp_park(2) in the future.
 
 XXX: pullup to 6.

mono escaping its scope?

YAMAMOTO Takashi

 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.59 -r1.60 src/lib/libpthread/pthread_cond.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


CVS commit: src/doc

2013-03-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar 28 09:36:12 UTC 2013

Modified Files:
src/doc: 3RDPARTY

Log Message:
binutils-2.23.2 out.


To generate a diff of this commit:
cvs rdiff -u -r1.1020 -r1.1021 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.1020 src/doc/3RDPARTY:1.1021
--- src/doc/3RDPARTY:1.1020	Wed Mar 27 00:39:31 2013
+++ src/doc/3RDPARTY	Thu Mar 28 09:36:11 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1020 2013/03/27 00:39:31 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1021 2013/03/28 09:36:11 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -154,7 +154,7 @@ Todo[5]: Reconcile the doc directory.
 
 Package:	binutils
 Version:	2.21.1a
-Current Vers:	2.23.1
+Current Vers:	2.23.2
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/binutils/
 Home Page:	http://www.gnu.org/software/binutils/



CVS commit: src

2013-03-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar 28 11:17:41 UTC 2013

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile

Log Message:
Add more links for kcpuset(9).


To generate a diff of this commit:
cvs rdiff -u -r1.1809 -r1.1810 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.369 -r1.370 src/share/man/man9/Makefile

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.1809 src/distrib/sets/lists/comp/mi:1.1810
--- src/distrib/sets/lists/comp/mi:1.1809	Fri Mar  1 18:25:13 2013
+++ src/distrib/sets/lists/comp/mi	Thu Mar 28 11:17:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1809 2013/03/01 18:25:13 joerg Exp $
+#	$NetBSD: mi,v 1.1810 2013/03/28 11:17:39 wiz Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -9238,9 +9238,12 @@
 ./usr/share/man/cat9/kcpuset_copy.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/kcpuset_copyin.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/kcpuset_copyout.0		comp-sys-catman		.cat
+./usr/share/man/cat9/kcpuset_countset.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/kcpuset_create.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/kcpuset_destroy.0		comp-sys-catman		.cat
+./usr/share/man/cat9/kcpuset_export_32.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/kcpuset_fill.0		comp-sys-catman		.cat
+./usr/share/man/cat9/kcpuset_isotherset.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/kcpuset_isset.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/kcpuset_iszero.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/kcpuset_match.0		comp-sys-catman		.cat
@@ -15609,12 +15612,15 @@
 ./usr/share/man/html9/kcpuset_atomic_clear.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_atomic_set.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_clear.html	comp-sys-htmlman	html
+./usr/share/man/html9/kcpuset_countset.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_copy.html		comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_copyin.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_copyout.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_create.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_destroy.html	comp-sys-htmlman	html
+./usr/share/man/html9/kcpuset_export_32.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_fill.html		comp-sys-htmlman	html
+./usr/share/man/html9/kcpuset_isotherset.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_isset.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_iszero.html	comp-sys-htmlman	html
 ./usr/share/man/html9/kcpuset_match.html	comp-sys-htmlman	html
@@ -22141,9 +22147,12 @@
 ./usr/share/man/man9/kcpuset_copy.9		comp-sys-man		.man
 ./usr/share/man/man9/kcpuset_copyin.9		comp-sys-man		.man
 ./usr/share/man/man9/kcpuset_copyout.9		comp-sys-man		.man
+./usr/share/man/man9/kcpuset_countset.9		comp-sys-man		.man
 ./usr/share/man/man9/kcpuset_create.9		comp-sys-man		.man
 ./usr/share/man/man9/kcpuset_destroy.9		comp-sys-man		.man
+./usr/share/man/man9/kcpuset_export_32.9	comp-sys-man		.man
 ./usr/share/man/man9/kcpuset_fill.9		comp-sys-man		.man
+./usr/share/man/man9/kcpuset_isotherset.9	comp-sys-man		.man
 ./usr/share/man/man9/kcpuset_isset.9		comp-sys-man		.man
 ./usr/share/man/man9/kcpuset_iszero.9		comp-sys-man		.man
 ./usr/share/man/man9/kcpuset_match.9		comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.369 src/share/man/man9/Makefile:1.370
--- src/share/man/man9/Makefile:1.369	Sun Dec  2 19:51:56 2012
+++ src/share/man/man9/Makefile	Thu Mar 28 11:17:41 2013
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.369 2012/12/02 19:51:56 rkujawa Exp $
+#   $NetBSD: Makefile,v 1.370 2013/03/28 11:17:41 wiz Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -405,10 +405,13 @@ MLINKS+=kcpuset.9 kcpuset_create.9 \
 	kcpuset.9 kcpuset_fill.9 \
 	kcpuset.9 kcpuset_set.9 \
 	kcpuset.9 kcpuset_clear.9 \
+	kcpuset.9 kcpuset_isotherset.9 \
 	kcpuset.9 kcpuset_isset.9 \
 	kcpuset.9 kcpuset_iszero.9 \
+	kcpuset.9 kcpuset_countset.9 \
 	kcpuset.9 kcpuset_match.9 \
 	kcpuset.9 kcpuset_merge.9 \
+	kcpuset.9 kcpuset_export_32.9 \
 	kcpuset.9 kcpuset_atomic_set.9 \
 	kcpuset.9 kcpuset_atomic_clear.9
 MLINKS+=kmem.9 kmem_alloc.9 \



CVS commit: [agc-symver] src/lib/libisns

2013-03-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Mar 28 15:16:25 UTC 2013

Added Files:
src/lib/libisns [agc-symver]: Version.map

Log Message:
Add versioning info for libisns


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/lib/libisns/Version.map

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

Added files:

Index: src/lib/libisns/Version.map
diff -u /dev/null src/lib/libisns/Version.map:1.1.2.1
--- /dev/null	Thu Mar 28 15:16:25 2013
+++ src/lib/libisns/Version.map	Thu Mar 28 15:16:24 2013
@@ -0,0 +1,66 @@
+LIBISNS_0.0.0.0 {
+global:
+	isns_add_servercon;
+	isns_init;
+	isns_init_reg_refresh;
+	isns_stop;
+	isns_change_kevent_list;
+	isns_destroy_config;
+	isns_issue_cmd;
+	isns_issue_cmd_with_data;
+	isns_new_config;
+	isns_process_connection_loss;
+	isns_thread_create;
+	isns_thread_destroy;
+	isns_control_thread;
+	isns_kevent_pipe;
+	isns_kevent_socket;
+	isns_kevent_timer_recon;
+	isns_kevent_timer_refresh;
+	isns_end_task;
+	isns_free_task;
+	isns_new_task;
+	isns_run_task;
+	isns_taskq_insert_head;
+	isns_taskq_insert_tail;
+	isns_taskq_remove;
+	isns_taskq_remove_trans;
+	isns_wait_task;
+	isns_socket_close;
+	isns_socket_connect;
+	isns_socket_create;
+	isns_socket_readv;
+	isns_socket_writev;
+	isns_abort_trans;
+	isns_add_buffer_pool;
+	isns_add_pdu_request;
+	isns_add_pdu_response;
+	isns_add_string;
+	isns_add_tlv;
+	isns_complete_trans;
+	isns_destroy_buffer_pool;
+	isns_free_buffer;
+	isns_free_pdu;
+	isns_free_trans;
+	isns_get_pdu_request_tail;
+	isns_get_pdu_response_status;
+	isns_get_tlv;
+	isns_init_buffer_pool;
+	isns_new_buffer;
+	isns_new_pdu;
+	isns_new_trans;
+	isns_send_pdu;
+	isns_send_trans;
+	isns_set_trans_flags;
+	isns_file_readv;
+	isns_file_writev;
+};
+
+NetBSD_6.99.18.0 {
+} LIBISNS_0.0.0.0;
+
+LIBISNS_private_0.0.0.0 {
+local:
+	*;
+};
+



CVS commit: [agc-symver] src/lib/libdm

2013-03-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Mar 28 15:16:51 UTC 2013

Added Files:
src/lib/libdm [agc-symver]: Version.map

Log Message:
Add versioning info for libdm


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/lib/libdm/Version.map

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

Added files:

Index: src/lib/libdm/Version.map
diff -u /dev/null src/lib/libdm/Version.map:1.1.2.1
--- /dev/null	Thu Mar 28 15:16:52 2013
+++ src/lib/libdm/Version.map	Thu Mar 28 15:16:51 2013
@@ -0,0 +1,63 @@
+LIBDM_0.0.0.0 {
+global:
+	libdm_cmd_create;
+	libdm_cmd_destroy;
+	libdm_cmd_get_deps;
+	libdm_cmd_get_dev;
+	libdm_cmd_get_table;
+	libdm_cmd_get_target;
+	libdm_cmd_iter_create;
+	libdm_cmd_set_table;
+	libdm_dev_destroy;
+	libdm_dev_get_minor;
+	libdm_dev_get_name;
+	libdm_dev_set_newname;
+	libdm_iter_destroy;
+	libdm_table_create;
+	libdm_table_destroy;
+	libdm_table_get_length;
+	libdm_table_get_params;
+	libdm_table_get_start;
+	libdm_table_get_status;
+	libdm_table_get_target;
+	libdm_table_set_length;
+	libdm_table_set_params;
+	libdm_table_set_start;
+	libdm_table_set_target;
+	libdm_target_destroy;
+	libdm_target_get_name;
+	libdm_target_get_version;
+	libdm_task_create;
+	libdm_task_del_exists_flag;
+	libdm_task_del_status_flag;
+	libdm_task_del_suspend_flag;
+	libdm_task_destroy;
+	libdm_task_get_cmd;
+	libdm_task_get_cmd_version;
+	libdm_task_get_command;
+	libdm_task_get_event_num;
+	libdm_task_get_flags;
+	libdm_task_get_minor;
+	libdm_task_get_name;
+	libdm_task_get_open_num;
+	libdm_task_get_target_num;
+	libdm_task_get_uuid;
+	libdm_task_run;
+	libdm_task_set_cmd;
+	libdm_task_set_exists_flag;
+	libdm_task_set_flags;
+	libdm_task_set_minor;
+	libdm_task_set_name;
+	libdm_task_set_status_flag;
+	libdm_task_set_suspend_flag;
+	libdm_task_set_uuid;
+};
+
+NetBSD_6.99.18.0 {
+} LIBDM_0.0.0.0;
+
+LIBDM_private_0.0.0.0 {
+local:
+	*;
+};
+



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2013-03-28 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Thu Mar 28 16:30:47 UTC 2013

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
Call removeShadow only when shadowFB has been initialized.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.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/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.16 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.17
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.16	Thu Feb 14 16:13:38 2013
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Thu Mar 28 16:30:47 2013
@@ -1058,7 +1058,8 @@ WsfbCloseScreen(int scrnIndex, ScreenPtr
 	TRACE_ENTER(WsfbCloseScreen);
 
 	pPixmap = pScreen-GetScreenPixmap(pScreen);
-	shadowRemove(pScreen, pPixmap);
+	if (fPtr-shadowFB)
+		shadowRemove(pScreen, pPixmap);
 
 	if (pScrn-vtSema) {
 		WsfbRestore(pScrn);



CVS commit: src/sys/dev/pci

2013-03-28 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar 28 17:25:10 UTC 2013

Modified Files:
src/sys/dev/pci: radeonfb.c radeonfbvar.h

Log Message:
clear screen when leaving X so we don't leave garbage in the borders


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/radeonfb.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/radeonfbvar.h

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

Modified files:

Index: src/sys/dev/pci/radeonfb.c
diff -u src/sys/dev/pci/radeonfb.c:1.75 src/sys/dev/pci/radeonfb.c:1.76
--- src/sys/dev/pci/radeonfb.c:1.75	Mon Mar 25 17:35:51 2013
+++ src/sys/dev/pci/radeonfb.c	Thu Mar 28 17:25:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeonfb.c,v 1.75 2013/03/25 17:35:51 macallan Exp $ */
+/*	$NetBSD: radeonfb.c,v 1.76 2013/03/28 17:25:10 macallan Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.75 2013/03/25 17:35:51 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.76 2013/03/28 17:25:10 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -807,7 +807,6 @@ radeonfb_attach(device_t parent, device_
 
 		dp-rd_softc = sc;
 		dp-rd_wsmode = WSDISPLAYIO_MODE_EMUL;
-		dp-rd_bg = WS_DEFAULT_BG;
 		dp-rd_bpp = RADEONFB_DEFAULT_DEPTH;	/* XXX */
 
 		/* for text mode, we pick a resolution that won't
@@ -903,8 +902,9 @@ radeonfb_attach(device_t parent, device_
 
 		/* clear the screen */
 		rasops_unpack_attr(defattr, fg, bg, ul);
+		dp-rd_bg = ri-ri_devcmap[bg  0xf];
 		radeonfb_rectfill(dp, 0, 0, ri-ri_width, ri-ri_height,
-		ri-ri_devcmap[bg  0xf]);
+		dp-rd_bg);
 
 		dp-rd_wsscreens-textops = ri-ri_ops;
 		dp-rd_wsscreens-capabilities = ri-ri_caps;
@@ -1125,6 +1125,8 @@ radeonfb_ioctl(void *v, void *vs,
 glyphcache_wipe(dp-rd_gc);
 radeonfb_init_palette(dp);
 radeonfb_modeswitch(dp);
+radeonfb_rectfill(dp, 0, 0, dp-rd_virtx,
+dp-rd_virty, dp-rd_bg);
 vcons_redraw_screen(dp-rd_vd.active);
 			} else {
 radeonfb_unmap(sc);

Index: src/sys/dev/pci/radeonfbvar.h
diff -u src/sys/dev/pci/radeonfbvar.h:1.17 src/sys/dev/pci/radeonfbvar.h:1.18
--- src/sys/dev/pci/radeonfbvar.h:1.17	Thu Dec 20 03:08:39 2012
+++ src/sys/dev/pci/radeonfbvar.h	Thu Mar 28 17:25:10 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: radeonfbvar.h,v 1.17 2012/12/20 03:08:39 macallan Exp $ */
+/* $NetBSD: radeonfbvar.h,v 1.18 2013/03/28 17:25:10 macallan Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -171,7 +171,7 @@ struct radeonfb_display {
 	uint16_t		rd_xoffset;
 	uint16_t		rd_yoffset;
 
-	int			rd_bg;		/* background */
+	uint32_t		rd_bg;		/* background */
 	bool			rd_console;
 
 	struct callout  rd_bl_lvds_co;  /* delayed lvds operation */



CVS commit: src/sys/kern

2013-03-28 Thread Thor Lancelot Simon
Module Name:src
Committed By:   tls
Date:   Thu Mar 28 18:06:49 UTC 2013

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

Log Message:
Re-fix 'fix' for SA-2013-003.  Because the original fix evaluated a flag
backwards, in low-entropy conditions there was a time interval in which
/dev/urandom could still output bits on an unacceptably short key.  Output
from /dev/random was *NOT* impacted.

Eliminate the flag in question -- it's safest to always fill the requested
key buffer with output from the entropy-pool, even if we let the caller
know we couldn't provide bytes with the full entropy it requested.

Advisory will be updated soon with a full worst-case analysis of the
/dev/urandom output path in the presence of either variant of the
SA-2013-003 bug.  Fortunately, because a large amount of other input
is mixed in before users can obtain any output, it doesn't look as dangerous
in practice as I'd feared it might be.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/kern/subr_cprng.c

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

Modified files:

Index: src/sys/kern/subr_cprng.c
diff -u src/sys/kern/subr_cprng.c:1.15 src/sys/kern/subr_cprng.c:1.16
--- src/sys/kern/subr_cprng.c:1.15	Sat Jan 26 16:05:34 2013
+++ src/sys/kern/subr_cprng.c	Thu Mar 28 18:06:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_cprng.c,v 1.15 2013/01/26 16:05:34 tls Exp $ */
+/*	$NetBSD: subr_cprng.c,v 1.16 2013/03/28 18:06:48 tls Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
 
 #include sys/cprng.h
 
-__KERNEL_RCSID(0, $NetBSD: subr_cprng.c,v 1.15 2013/01/26 16:05:34 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_cprng.c,v 1.16 2013/03/28 18:06:48 tls Exp $);
 
 void
 cprng_init(void)
@@ -157,11 +157,11 @@ cprng_strong_reseed(void *const arg)
 }
 
 static size_t
-cprng_entropy_try(uint8_t *key, size_t keylen, int hard)
+cprng_entropy_try(uint8_t *key, size_t keylen)
 {
 	int r;
 	r = rnd_extract_data(key, keylen, RND_EXTRACT_GOOD);
-	if (r != keylen  !hard) {
+	if (r != keylen) {	/* Always fill in, for safety */
 		rnd_extract_data(key + r, keylen - r, RND_EXTRACT_ANY);
 	}
 	return r;
@@ -196,7 +196,7 @@ cprng_strong_create(const char *const na
 
 	selinit(c-selq);
 
-	r = cprng_entropy_try(key, sizeof(key), c-flags  CPRNG_INIT_ANY);
+	r = cprng_entropy_try(key, sizeof(key));
 	if (r != sizeof(key)) {
 		if (c-flags  CPRNG_INIT_ANY) {
 #ifdef DEBUG
@@ -251,7 +251,7 @@ rekeyany:
 		if (c-flags  CPRNG_REKEY_ANY) {
 			uint8_t key[NIST_BLOCK_KEYLEN_BYTES];
 
-			if (cprng_entropy_try(key, sizeof(key), 0) !=
+			if (cprng_entropy_try(key, sizeof(key)) !=
 			sizeof(key)) {
  printf(cprng %s: WARNING 
    pseudorandom rekeying.\n, c-name);



CVS commit: src/lib/libpthread

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 18:07:12 UTC 2013

Modified Files:
src/lib/libpthread: pthread_cond.c

Log Message:
PR/47703: Yasushi Oshima: pthread_cond_timedwait() does not wait
after call pthread_condattr_setclock(CLOCK_MONOTONIC)

_lwp_park(2) expects a realtime clock, and it gets passed a monotonic
one.  Since monotonic  real, it never sleeps. This patch adjusts
the monotonic clock to be a real one before it passes is to
_lwp_park(2). This is the minimal hacky fix and it will be fixed
properly in _lwp_park(2) in the future.

XXX: pullup to 6.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/lib/libpthread/pthread_cond.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/libpthread/pthread_cond.c
diff -u src/lib/libpthread/pthread_cond.c:1.59 src/lib/libpthread/pthread_cond.c:1.60
--- src/lib/libpthread/pthread_cond.c:1.59	Thu Mar 21 12:49:12 2013
+++ src/lib/libpthread/pthread_cond.c	Thu Mar 28 14:07:12 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_cond.c,v 1.59 2013/03/21 16:49:12 christos Exp $	*/
+/*	$NetBSD: pthread_cond.c,v 1.60 2013/03/28 18:07:12 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread_cond.c,v 1.59 2013/03/21 16:49:12 christos Exp $);
+__RCSID($NetBSD: pthread_cond.c,v 1.60 2013/03/28 18:07:12 christos Exp $);
 
 #include stdlib.h
 #include errno.h
@@ -75,6 +75,13 @@ __strong_alias(__libc_cond_wait,pthread_
 __strong_alias(__libc_cond_timedwait,pthread_cond_timedwait)
 __strong_alias(__libc_cond_destroy,pthread_cond_destroy)
 
+static clockid_t
+pthread_cond_getclock(const pthread_cond_t *cond)
+{
+	return cond-ptc_private ? 
+	*(clockid_t *)cond-ptc_private : CLOCK_REALTIME;
+}
+
 int
 pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
 {
@@ -135,6 +142,19 @@ pthread_cond_timedwait(pthread_cond_t *c
 	pthread__error(EPERM, Mutex not locked in condition wait,
 	mutex-ptm_owner != NULL);
 	if (abstime != NULL) {
+		/*
+		 * XXX: This should be done in the kernel to avoid
+		 * extra system calls! 
+		 */
+		if (pthread_cond_getclock(cond) == CLOCK_MONOTONIC) {
+			struct timespec mono, real;
+			if (clock_gettime(CLOCK_REALTIME, real) == -1 ||
+			clock_gettime(CLOCK_MONOTONIC, mono) == -1)
+return errno;
+			timespecsub(abstime, mono, mono);
+			timespecadd(mono, real, mono);
+			abstime = mono;
+		}
 		pthread__error(EINVAL, Invalid wait time, 
 		(abstime-tv_sec = 0) 
 		(abstime-tv_nsec = 0) 
@@ -390,8 +410,7 @@ pthread_cond_wait_nothread(pthread_t sel
 		diff.tv_sec = ;
 		diff.tv_nsec = 0;
 	} else {
-		clockid_t clck = cond-ptc_private ?
-		*(clockid_t *)cond-ptc_private : CLOCK_REALTIME;
+		clockid_t clck = pthread_cond_getclock(cond);
 		clock_gettime(clck, now);
 		if  (timespeccmp(abstime, now, ))
 			timespecclear(diff);



CVS commit: src/tests/lib/libpthread

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 18:50:02 UTC 2013

Modified Files:
src/tests/lib/libpthread: Makefile
Added Files:
src/tests/lib/libpthread: t_condwait.c

Log Message:
Add pthread_cond_timedwait(3) test from PR/47703


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libpthread/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libpthread/t_condwait.c

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

Modified files:

Index: src/tests/lib/libpthread/Makefile
diff -u src/tests/lib/libpthread/Makefile:1.9 src/tests/lib/libpthread/Makefile:1.10
--- src/tests/lib/libpthread/Makefile:1.9	Thu Mar 21 12:50:21 2013
+++ src/tests/lib/libpthread/Makefile	Thu Mar 28 14:50:01 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2013/03/21 16:50:21 christos Exp $
+# $NetBSD: Makefile,v 1.10 2013/03/28 18:50:01 christos Exp $
 
 NOMAN=		# defined
 
@@ -17,6 +17,7 @@ TESTS_SH+=	t_atexit
 TESTS_C+=	t_barrier
 TESTS_SH+=	t_cancel
 TESTS_C+=	t_cond
+TESTS_C+=	t_condwait
 TESTS_C+=	t_detach
 TESTS_C+=	t_equal
 TESTS_SH+=	t_exit

Added files:

Index: src/tests/lib/libpthread/t_condwait.c
diff -u /dev/null src/tests/lib/libpthread/t_condwait.c:1.1
--- /dev/null	Thu Mar 28 14:50:02 2013
+++ src/tests/lib/libpthread/t_condwait.c	Thu Mar 28 14:50:01 2013
@@ -0,0 +1,132 @@
+/* $NetBSD: t_condwait.c,v 1.1 2013/03/28 18:50:01 christos Exp $ */
+
+/*
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * 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.
+ */
+#include sys/cdefs.h
+__RCSID($NetBSD: t_condwait.c,v 1.1 2013/03/28 18:50:01 christos Exp $);
+
+#include errno.h
+#include pthread.h
+#include stdio.h
+#include stdlib.h
+#include string.h
+#include time.h
+#include unistd.h
+
+#include atf-c.h
+
+#define WAITTIME 2	/* Timeout wait secound */
+
+static const int debug = 1;
+
+static void *
+run(void *param)
+{
+	struct timespec ts, to, te;
+	clockid_t clck;
+	pthread_condattr_t attr;
+	pthread_cond_t cond;
+	pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
+	int ret = 0;
+
+
+	clck = *(clockid_t *)param;
+	pthread_condattr_init(attr);
+	pthread_condattr_setclock(attr, clck); /* MONOTONIC or MONOTONIC */
+	pthread_cond_init(cond, attr);
+
+	ATF_REQUIRE_EQ((ret = pthread_mutex_lock(m)), 0);
+
+	ATF_REQUIRE_EQ(clock_gettime(clck, ts), 0);
+	to = ts;
+
+	if (debug)
+		printf(started: %ld.%09ld sec\n, to.tv_sec, to.tv_nsec);
+
+	ts.tv_sec += WAITTIME;	/* Timeout wait */
+
+	switch (ret = pthread_cond_timedwait(cond, m, ts)) {
+	case ETIMEDOUT:
+		/* Timeout */
+		ATF_REQUIRE_EQ(clock_gettime(clck, te), 0);
+		timespecsub(te, to, to);
+		if (debug) {
+			printf(timeout: %ld.%09ld sec\n,
+			te.tv_sec, te.tv_nsec);
+			printf(elapsed: %ld.%09ld sec\n,
+			to.tv_sec, to.tv_nsec);
+		}
+		ATF_REQUIRE_EQ(to.tv_sec, WAITTIME);
+		break;
+	default:
+		ATF_REQUIRE_MSG(0, pthread_cond_timedwait: %s, strerror(ret));
+	}
+
+	ATF_REQUIRE_MSG(!(ret = pthread_mutex_unlock(m)),
+	pthread_mutex_unlock: %s, strerror(ret));
+	pthread_exit(ret);
+}
+
+static void
+cond_wait(clockid_t clck, const char *msg) {
+	pthread_t child;
+
+	if (debug)
+		printf(  %s clock wait starting\n, msg);
+	ATF_REQUIRE_EQ(pthread_create(child, NULL, run, clck), 0);
+	ATF_REQUIRE_EQ(pthread_join(child, NULL), 0); /* wait for terminate */
+	if (debug)
+		printf(  %s clock wait ended\n, msg);
+}
+
+ATF_TC(cond_wait_real);
+ATF_TC_HEAD(cond_wait_real, tc)
+{
+	atf_tc_set_md_var(tc, descr, Checks pthread_cond_timedwait 
+	with CLOCK_REALTIME);
+}
+
+ATF_TC_BODY(cond_wait_real, tc) {
+	cond_wait(CLOCK_REALTIME, CLOCK_REALTIME);
+}
+

CVS commit: src/distrib/sets/lists

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 18:51:28 UTC 2013

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
new test


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.531 -r1.532 src/distrib/sets/lists/tests/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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.16 src/distrib/sets/lists/debug/mi:1.17
--- src/distrib/sets/lists/debug/mi:1.16	Thu Mar 21 12:51:07 2013
+++ src/distrib/sets/lists/debug/mi	Thu Mar 28 14:51:28 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.16 2013/03/21 16:51:07 christos Exp $
+# $NetBSD: mi,v 1.17 2013/03/28 18:51:28 christos Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/libdata/debug/bin/cat.debug		comp-util-debug		debug
 ./usr/libdata/debug/bin/chio.debug		comp-util-debug		debug
@@ -1757,6 +1757,7 @@
 ./usr/libdata/debug/usr/tests/lib/libpthread/h_resolv.debug		tests-lib-tests		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_barrier.debug		tests-lib-tests		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_cond.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_condwait.debug		tests-lib-tests		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_detach.debug		tests-lib-tests		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_equal.debug		tests-lib-tests		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_fork.debug		tests-lib-tests		debug,atf

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.531 src/distrib/sets/lists/tests/mi:1.532
--- src/distrib/sets/lists/tests/mi:1.531	Sat Mar 23 11:14:15 2013
+++ src/distrib/sets/lists/tests/mi	Thu Mar 28 14:51:28 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.531 2013/03/23 15:14:15 christos Exp $
+# $NetBSD: mi,v 1.532 2013/03/28 18:51:28 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2412,6 +2412,7 @@
 ./usr/tests/lib/libpthread/t_barrier		tests-lib-tests		atf
 ./usr/tests/lib/libpthread/t_cancel		tests-lib-tests		atf
 ./usr/tests/lib/libpthread/t_cond		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_condwait		tests-lib-tests		atf
 ./usr/tests/lib/libpthread/t_detach		tests-lib-tests		atf
 ./usr/tests/lib/libpthread/t_equal		tests-lib-tests		atf
 ./usr/tests/lib/libpthread/t_exit		tests-lib-tests		atf



CVS commit: src/sys/external/bsd/ipf/netinet

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 20:14:19 UTC 2013

Modified Files:
src/sys/external/bsd/ipf/netinet: ip_log.c

Log Message:
Destroying the mutex once is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/ipf/netinet/ip_log.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/ipf/netinet/ip_log.c
diff -u src/sys/external/bsd/ipf/netinet/ip_log.c:1.5 src/sys/external/bsd/ipf/netinet/ip_log.c:1.6
--- src/sys/external/bsd/ipf/netinet/ip_log.c:1.5	Wed Mar 27 19:49:02 2013
+++ src/sys/external/bsd/ipf/netinet/ip_log.c	Thu Mar 28 16:14:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_log.c,v 1.5 2013/03/27 23:49:02 christos Exp $	*/
+/*	$NetBSD: ip_log.c,v 1.6 2013/03/28 20:14:18 christos Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -9,7 +9,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_log.c,v 1.5 2013/03/27 23:49:02 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_log.c,v 1.6 2013/03/28 20:14:18 christos Exp $);
 
 #include sys/param.h
 #if defined(KERNEL) || defined(_KERNEL)
@@ -352,7 +352,6 @@ ipf_log_soft_destroy(ipf_main_softc_t *s
 # if SOLARIS  defined(_KERNEL)
 		cv_destroy(softl-ipl_wait[i]);
 # endif
-		MUTEX_DESTROY(softl-ipl_mutex[i]);
 	}
 
 	if (softl-ipf_log_tune != NULL) {



CVS commit: src

2013-03-28 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Mar 28 22:54:25 UTC 2013

Modified Files:
src/external/bsd/iscsi/dist/src/target: targets.5
src/usr.bin/cksum: cksum.1
src/usr.sbin/mountd: exports.5

Log Message:
Remove unknown \*(tN and \*(sP macros.

ok wiz.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/iscsi/dist/src/target/targets.5
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/cksum/cksum.1
cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/mountd/exports.5

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/iscsi/dist/src/target/targets.5
diff -u src/external/bsd/iscsi/dist/src/target/targets.5:1.2 src/external/bsd/iscsi/dist/src/target/targets.5:1.3
--- src/external/bsd/iscsi/dist/src/target/targets.5:1.2	Tue Jun 30 02:44:53 2009
+++ src/external/bsd/iscsi/dist/src/target/targets.5	Thu Mar 28 22:54:25 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: targets.5,v 1.2 2009/06/30 02:44:53 agc Exp $
+.\ $NetBSD: targets.5,v 1.3 2013/03/28 22:54:25 njoly Exp $
 .\
 .\ Copyright © 2006 Alistair Crooks.  All rights reserved.
 .\
@@ -42,7 +42,7 @@ initiators by the
 .Xr iscsi-target 8
 service.
 A description of the iSCSI protocol can be found in
-.%T Internet Small Computer Systems Interface \\*(tNRFC\\*(sP 3720 .
+.%T Internet Small Computer Systems Interface RFC 3720 .
 .Pp
 Each line in the file
 (other than comment lines that begin with a

Index: src/usr.bin/cksum/cksum.1
diff -u src/usr.bin/cksum/cksum.1:1.44 src/usr.bin/cksum/cksum.1:1.45
--- src/usr.bin/cksum/cksum.1:1.44	Mon Jun 25 02:32:12 2012
+++ src/usr.bin/cksum/cksum.1	Thu Mar 28 22:54:25 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: cksum.1,v 1.44 2012/06/25 02:32:12 riastradh Exp $
+.\	$NetBSD: cksum.1,v 1.45 2013/03/28 22:54:25 njoly Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -266,7 +266,7 @@ article.
 .Rs
 .%T Computation of Cyclic Redundancy Checks Via Table Lookup
 .%A Dilip V. Sarwate
-.%J Communications of the \*(tNACM\*(sP
+.%J Communications of the ACM
 .%D August 1988
 .Re
 .Rs

Index: src/usr.sbin/mountd/exports.5
diff -u src/usr.sbin/mountd/exports.5:1.31 src/usr.sbin/mountd/exports.5:1.32
--- src/usr.sbin/mountd/exports.5:1.31	Sun Aug 26 14:50:45 2012
+++ src/usr.sbin/mountd/exports.5	Thu Mar 28 22:54:25 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: exports.5,v 1.31 2012/08/26 14:50:45 wiz Exp $
+.\	$NetBSD: exports.5,v 1.32 2013/03/28 22:54:25 njoly Exp $
 .\
 .\ Copyright (c) 1989, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -47,7 +47,7 @@ file specifies remote mount points for t
 mount protocol per the
 .Tn NFS
 server specification; see
-.%T Network File System Protocol Specification \\*(tNRFC\\*(sP 1094, Appendix A
+.%T Network File System Protocol Specification RFC 1094, Appendix A
 and
 .%T NFS: Network File System Version 3 Specification, Appendix I .
 .Pp



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

2013-03-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 29 00:44:29 UTC 2013

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

Log Message:
Pull up following revision(s) (requested by tls in ticket #859):
sys/kern/subr_cprng.c: revision 1.16
Re-fix 'fix' for SA-2013-003.  Because the original fix evaluated a flag
backwards, in low-entropy conditions there was a time interval in which
/dev/urandom could still output bits on an unacceptably short key.  Output
from /dev/random was *NOT* impacted.
Eliminate the flag in question -- it's safest to always fill the requested
key buffer with output from the entropy-pool, even if we let the caller
know we couldn't provide bytes with the full entropy it requested.
Advisory will be updated soon with a full worst-case analysis of the
/dev/urandom output path in the presence of either variant of the
SA-2013-003 bug.  Fortunately, because a large amount of other input
is mixed in before users can obtain any output, it doesn't look as dangerous
in practice as I'd feared it might be.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.7 -r1.5.2.8 src/sys/kern/subr_cprng.c

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

Modified files:

Index: src/sys/kern/subr_cprng.c
diff -u src/sys/kern/subr_cprng.c:1.5.2.7 src/sys/kern/subr_cprng.c:1.5.2.8
--- src/sys/kern/subr_cprng.c:1.5.2.7	Sat Jan 26 21:35:23 2013
+++ src/sys/kern/subr_cprng.c	Fri Mar 29 00:44:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_cprng.c,v 1.5.2.7 2013/01/26 21:35:23 bouyer Exp $ */
+/*	$NetBSD: subr_cprng.c,v 1.5.2.8 2013/03/29 00:44:28 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
 
 #include sys/cprng.h
 
-__KERNEL_RCSID(0, $NetBSD: subr_cprng.c,v 1.5.2.7 2013/01/26 21:35:23 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_cprng.c,v 1.5.2.8 2013/03/29 00:44:28 msaitoh Exp $);
 
 void
 cprng_init(void)
@@ -157,11 +157,11 @@ cprng_strong_reseed(void *const arg)
 }
 
 static size_t
-cprng_entropy_try(uint8_t *key, size_t keylen, int hard)
+cprng_entropy_try(uint8_t *key, size_t keylen)
 {
 	int r;
 	r = rnd_extract_data(key, keylen, RND_EXTRACT_GOOD);
-	if (r != keylen  !hard) {
+	if (r != keylen) {	/* Always fill in, for safety */
 		rnd_extract_data(key + r, keylen - r, RND_EXTRACT_ANY);
 	}
 	return r;
@@ -196,7 +196,7 @@ cprng_strong_create(const char *const na
 
 	selinit(c-selq);
 
-	r = cprng_entropy_try(key, sizeof(key), c-flags  CPRNG_INIT_ANY);
+	r = cprng_entropy_try(key, sizeof(key));
 	if (r != sizeof(key)) {
 		if (c-flags  CPRNG_INIT_ANY) {
 #ifdef DEBUG
@@ -251,7 +251,7 @@ rekeyany:
 		if (c-flags  CPRNG_REKEY_ANY) {
 			uint8_t key[NIST_BLOCK_KEYLEN_BYTES];
 
-			if (cprng_entropy_try(key, sizeof(key), 0) !=
+			if (cprng_entropy_try(key, sizeof(key)) !=
 			sizeof(key)) {
  printf(cprng %s: WARNING 
    pseudorandom rekeying.\n, c-name);



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

2013-03-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 29 00:46:59 UTC 2013

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

Log Message:
Pull up following revision(s) (requested by tls in ticket #859):
sys/kern/subr_cprng.c: revision 1.16
Re-fix 'fix' for SA-2013-003.  Because the original fix evaluated a flag
backwards, in low-entropy conditions there was a time interval in which
/dev/urandom could still output bits on an unacceptably short key.  Output
from /dev/random was *NOT* impacted.
Eliminate the flag in question -- it's safest to always fill the requested
key buffer with output from the entropy-pool, even if we let the caller
know we couldn't provide bytes with the full entropy it requested.
Advisory will be updated soon with a full worst-case analysis of the
/dev/urandom output path in the presence of either variant of the
SA-2013-003 bug.  Fortunately, because a large amount of other input
is mixed in before users can obtain any output, it doesn't look as dangerous
in practice as I'd feared it might be.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.3.4.1 -r1.5.2.3.4.2 src/sys/kern/subr_cprng.c

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

Modified files:

Index: src/sys/kern/subr_cprng.c
diff -u src/sys/kern/subr_cprng.c:1.5.2.3.4.1 src/sys/kern/subr_cprng.c:1.5.2.3.4.2
--- src/sys/kern/subr_cprng.c:1.5.2.3.4.1	Sat Jan 26 21:36:10 2013
+++ src/sys/kern/subr_cprng.c	Fri Mar 29 00:46:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_cprng.c,v 1.5.2.3.4.1 2013/01/26 21:36:10 bouyer Exp $ */
+/*	$NetBSD: subr_cprng.c,v 1.5.2.3.4.2 2013/03/29 00:46:58 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
 
 #include sys/cprng.h
 
-__KERNEL_RCSID(0, $NetBSD: subr_cprng.c,v 1.5.2.3.4.1 2013/01/26 21:36:10 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_cprng.c,v 1.5.2.3.4.2 2013/03/29 00:46:58 msaitoh Exp $);
 
 void
 cprng_init(void)
@@ -157,11 +157,11 @@ cprng_strong_reseed(void *const arg)
 }
 
 static size_t
-cprng_entropy_try(uint8_t *key, size_t keylen, int hard)
+cprng_entropy_try(uint8_t *key, size_t keylen)
 {
 	int r;
 	r = rnd_extract_data(key, keylen, RND_EXTRACT_GOOD);
-	if (r != keylen  !hard) {
+	if (r != keylen) {	/* Always fill in, for safety */
 		rnd_extract_data(key + r, keylen - r, RND_EXTRACT_ANY);
 	}
 	return r;
@@ -196,7 +196,7 @@ cprng_strong_create(const char *const na
 
 	selinit(c-selq);
 
-	r = cprng_entropy_try(key, sizeof(key), c-flags  CPRNG_INIT_ANY);
+	r = cprng_entropy_try(key, sizeof(key));
 	if (r != sizeof(key)) {
 		if (c-flags  CPRNG_INIT_ANY) {
 #ifdef DEBUG
@@ -244,7 +244,7 @@ cprng_strong(cprng_strong_t *const c, vo
 		if (c-flags  CPRNG_REKEY_ANY) {
 			uint8_t key[NIST_BLOCK_KEYLEN_BYTES];
 
-			if (cprng_entropy_try(key, sizeof(key), 0) !=
+			if (cprng_entropy_try(key, sizeof(key)) !=
 			sizeof(key)) {
  printf(cprng %s: WARNING 
    pseudorandom rekeying.\n, c-name);



CVS commit: [netbsd-6] src/doc

2013-03-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 29 00:50:33 UTC 2013

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

Log Message:
ticket #859


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

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

Modified files:

Index: src/doc/CHANGES-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.113 src/doc/CHANGES-6.1:1.1.2.114
--- src/doc/CHANGES-6.1:1.1.2.113	Fri Mar 15 23:26:27 2013
+++ src/doc/CHANGES-6.1	Fri Mar 29 00:50:32 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.113 2013/03/15 23:26:27 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.114 2013/03/29 00:50:32 msaitoh Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8730,3 +8730,21 @@ sys/sys/param.h	patched by hand
 	Welcome to 6.1_RC2!
 	[riz]
 
+sys/kern/subr_cprng.c1.16
+
+	Re-fix 'fix' for SA-2013-003.  Because the original fix evaluated a
+	flag backwards, in low-entropy conditions there was a time interval
+	in which /dev/urandom could still output bits on an unacceptably
+	short key.  Output from /dev/random was *NOT* impacted.
+
+	Eliminate the flag in question -- it's safest to always fill the
+	requested key buffer with output from the entropy-pool, even if we
+	let the caller know we couldn't provide bytes with the full entropy
+	it requested.
+
+	Advisory will be updated soon with a full worst-case analysis of the
+	/dev/urandom output path in the presence of either variant of the
+	SA-2013-003 bug.  Fortunately, because a large amount of other input
+	is mixed in before users can obtain any output, it doesn't look as
+	dangerous in practice as I'd feared it might be.
+	[tls, ticket #859]



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

2013-03-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 29 00:52:24 UTC 2013

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

Log Message:
ticket #859


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

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

Modified files:

Index: src/doc/CHANGES-6.0.2
diff -u src/doc/CHANGES-6.0.2:1.1.2.24 src/doc/CHANGES-6.0.2:1.1.2.25
--- src/doc/CHANGES-6.0.2:1.1.2.24	Fri Mar 15 18:52:53 2013
+++ src/doc/CHANGES-6.0.2	Fri Mar 29 00:52:23 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.2,v 1.1.2.24 2013/03/15 18:52:53 riz Exp $
+# $NetBSD: CHANGES-6.0.2,v 1.1.2.25 2013/03/29 00:52:23 msaitoh Exp $
 
 A complete list of changes from the NetBSD 6.0.1 release to the NetBSD 6.0.2
 release:
@@ -169,3 +169,21 @@ lib/libc/arch/alpha/gen/__setjmp14.S		1.
 	such as those in /rescue.
 	[martin, ticket #846]
 
+sys/kern/subr_cprng.c1.16
+
+	Re-fix 'fix' for SA-2013-003.  Because the original fix evaluated a
+	flag backwards, in low-entropy conditions there was a time interval
+	in which /dev/urandom could still output bits on an unacceptably
+	short key.  Output from /dev/random was *NOT* impacted.
+
+	Eliminate the flag in question -- it's safest to always fill the
+	requested key buffer with output from the entropy-pool, even if we
+	let the caller know we couldn't provide bytes with the full entropy
+	it requested.
+
+	Advisory will be updated soon with a full worst-case analysis of the
+	/dev/urandom output path in the presence of either variant of the
+	SA-2013-003 bug.  Fortunately, because a large amount of other input
+	is mixed in before users can obtain any output, it doesn't look as
+	dangerous in practice as I'd feared it might be.
+	[tls, ticket #859]



CVS commit: src/sys/compat/common

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:02:50 UTC 2013

Modified Files:
src/sys/compat/common: Makefile compat_mod.c kern_time_50.c
Added Files:
src/sys/compat/common: kern_time_60.c

Log Message:
compat glue for new lwp_park()


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/compat/common/Makefile
cvs rdiff -u -r1.18 -r1.19 src/sys/compat/common/compat_mod.c
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/common/kern_time_50.c
cvs rdiff -u -r0 -r1.1 src/sys/compat/common/kern_time_60.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/common/Makefile
diff -u src/sys/compat/common/Makefile:1.50 src/sys/compat/common/Makefile:1.51
--- src/sys/compat/common/Makefile:1.50	Fri Oct 19 12:55:22 2012
+++ src/sys/compat/common/Makefile	Thu Mar 28 21:02:49 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.50 2012/10/19 16:55:22 apb Exp $
+#	$NetBSD: Makefile,v 1.51 2013/03/29 01:02:49 christos Exp $
 
 LIB=		compat
 NOPIC=		# defined
@@ -45,7 +45,7 @@ SRCS+=	kern_time_50.c kern_select_50.c r
 	vfs_syscalls_50.c  uipc_syscalls_50.c
 
 # Compatibility code for NetBSD 6.0
-SRCS+=	kern_sa_60.c tty_60.c
+SRCS+=	kern_sa_60.c tty_60.c kern_time_60.c
 
 # really, all machines where sizeof(int) != sizeof(long) (LP64)
 .if (${MACHINE_ARCH} != alpha  ${MACHINE_ARCH} != sparc64 \

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.18 src/sys/compat/common/compat_mod.c:1.19
--- src/sys/compat/common/compat_mod.c:1.18	Thu Feb 21 09:13:01 2013
+++ src/sys/compat/common/compat_mod.c	Thu Mar 28 21:02:49 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.18 2013/02/21 14:13:01 christos Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.19 2013/03/29 01:02:49 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.18 2013/02/21 14:13:01 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.19 2013/03/29 01:02:49 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -243,6 +243,9 @@ static const struct syscall_package comp
 	{ SYS_compat_50_aio_suspend, 0, (sy_call_t *)compat_50_sys_aio_suspend },
 	{ SYS_compat_50_quotactl, 0, (sy_call_t *)compat_50_sys_quotactl },
 #endif
+#if defined(COMPAT_60)
+	{ SYS_compat_60__lwp_park, 0, (sy_call_t *)compat_60_sys__lwp_park },
+#endif
 	{ 0, 0, NULL },
 };
 

Index: src/sys/compat/common/kern_time_50.c
diff -u src/sys/compat/common/kern_time_50.c:1.25 src/sys/compat/common/kern_time_50.c:1.26
--- src/sys/compat/common/kern_time_50.c:1.25	Wed Feb 20 20:39:54 2013
+++ src/sys/compat/common/kern_time_50.c	Thu Mar 28 21:02:49 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time_50.c,v 1.25 2013/02/21 01:39:54 pgoyette Exp $	*/
+/*	$NetBSD: kern_time_50.c,v 1.26 2013/03/29 01:02:49 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_time_50.c,v 1.25 2013/02/21 01:39:54 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_time_50.c,v 1.26 2013/03/29 01:02:49 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_aio.h
@@ -379,7 +379,7 @@ compat_50_sys__lwp_park(struct lwp *l,
 			return error;
 	}
 
-	return lwp_park(tsp, SCARG(uap, hint));
+	return lwp_park(CLOCK_REALTIME, TIMER_ABSTIME, tsp, SCARG(uap, hint));
 }
 
 int

Added files:

Index: src/sys/compat/common/kern_time_60.c
diff -u /dev/null src/sys/compat/common/kern_time_60.c:1.1
--- /dev/null	Thu Mar 28 21:02:50 2013
+++ src/sys/compat/common/kern_time_60.c	Thu Mar 28 21:02:50 2013
@@ -0,0 +1,74 @@
+/*	$NetBSD: kern_time_60.c,v 1.1 2013/03/29 01:02:50 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * 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 

CVS commit: src/sys/compat/netbsd32

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:04:31 UTC 2013

Modified Files:
src/sys/compat/netbsd32: files.netbsd32 netbsd32_compat_50.c
netbsd32_lwp.c syscalls.conf syscalls.master

Log Message:
compat glue for new lwp_park


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/files.netbsd32
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/netbsd32/netbsd32_lwp.c
cvs rdiff -u -r1.11 -r1.12 src/sys/compat/netbsd32/syscalls.conf
cvs rdiff -u -r1.96 -r1.97 src/sys/compat/netbsd32/syscalls.master

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/files.netbsd32
diff -u src/sys/compat/netbsd32/files.netbsd32:1.32 src/sys/compat/netbsd32/files.netbsd32:1.33
--- src/sys/compat/netbsd32/files.netbsd32:1.32	Sat Mar 10 16:51:58 2012
+++ src/sys/compat/netbsd32/files.netbsd32	Thu Mar 28 21:04:30 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.netbsd32,v 1.32 2012/03/10 21:51:58 joerg Exp $
+#	$NetBSD: files.netbsd32,v 1.33 2013/03/29 01:04:30 christos Exp $
 #
 # config file description for machine-independent netbsd32 compat code.
 # included by ports that need it.
@@ -36,3 +36,4 @@ file	compat/netbsd32/netbsd32_compat_20.
 file	compat/netbsd32/netbsd32_compat_30.c	compat_netbsd32  compat_30
 file	compat/netbsd32/netbsd32_compat_43.c	compat_netbsd32  (compat_43 | compat_sunos | compat_linux32)
 file	compat/netbsd32/netbsd32_compat_50.c	compat_netbsd32  compat_50
+file	compat/netbsd32/netbsd32_compat_60.c	compat_netbsd32  compat_60

Index: src/sys/compat/netbsd32/netbsd32_compat_50.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.22 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.23
--- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.22	Sat Nov  3 19:22:22 2012
+++ src/sys/compat/netbsd32/netbsd32_compat_50.c	Thu Mar 28 21:04:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_50.c,v 1.22 2012/11/03 23:22:22 njoly Exp $	*/
+/*	$NetBSD: netbsd32_compat_50.c,v 1.23 2013/03/29 01:04:30 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_50.c,v 1.22 2012/11/03 23:22:22 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_50.c,v 1.23 2013/03/29 01:04:30 christos Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -561,7 +561,8 @@ compat_50_netbsd32__lwp_park(struct lwp 
 			return error;
 	}
 
-	return lwp_park(tsp, SCARG_P32(uap, hint));
+	return lwp_park(CLOCK_REALTIME, TIMER_ABSTIME, tsp,
+	SCARG_P32(uap, hint));
 	return 0;
 }
 

Index: src/sys/compat/netbsd32/netbsd32_lwp.c
diff -u src/sys/compat/netbsd32/netbsd32_lwp.c:1.14 src/sys/compat/netbsd32/netbsd32_lwp.c:1.15
--- src/sys/compat/netbsd32/netbsd32_lwp.c:1.14	Thu Jul 19 22:27:36 2012
+++ src/sys/compat/netbsd32/netbsd32_lwp.c	Thu Mar 28 21:04:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_lwp.c,v 1.14 2012/07/20 02:27:36 christos Exp $	*/
+/*	$NetBSD: netbsd32_lwp.c,v 1.15 2013/03/29 01:04:30 christos Exp $	*/
 
 /*
  *  Copyright (c) 2005, 2006, 2007 The NetBSD Foundation.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_lwp.c,v 1.14 2012/07/20 02:27:36 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_lwp.c,v 1.15 2013/03/29 01:04:30 christos Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -152,12 +152,14 @@ netbsd32__lwp_setprivate(struct lwp *l, 
 }
 
 int
-netbsd32lwp_park50(struct lwp *l,
-const struct netbsd32lwp_park50_args *uap, register_t *retval)
+netbsd32lwp_park60(struct lwp *l,
+const struct netbsd32lwp_park60_args *uap, register_t *retval)
 {
 	/* {
+		syscallarg(const netbsd32_clockid_t) clock_id;
+		syscallarg(int) flags;
 		syscallarg(const netbsd32_timespec50p) ts;
-		syscallarg(lwpid_t) unpark;
+		syscallarg(netbsd32_lwpid_t) unpark;
 		syscallarg(netbsd32_voidp) hint;
 		syscallarg(netbsd32_voidp) unparkhint;
 	} */
@@ -182,7 +184,8 @@ netbsd32lwp_park50(struct lwp *l,
 			return error;
 	}
 
-	return lwp_park(tsp, SCARG_P32(uap, hint));
+	return lwp_park(SCARG(uap, clock_id), SCARG(uap, flags), tsp,
+	SCARG_P32(uap, hint));
 }
 
 int

Index: src/sys/compat/netbsd32/syscalls.conf
diff -u src/sys/compat/netbsd32/syscalls.conf:1.11 src/sys/compat/netbsd32/syscalls.conf:1.12
--- src/sys/compat/netbsd32/syscalls.conf:1.11	Sat Jan 10 21:45:49 2009
+++ src/sys/compat/netbsd32/syscalls.conf	Thu Mar 28 21:04:30 2013
@@ -1,10 +1,10 @@
-#	$NetBSD: syscalls.conf,v 1.11 2009/01/11 02:45:49 christos Exp $
+#	$NetBSD: syscalls.conf,v 1.12 2013/03/29 01:04:30 christos Exp $
 
 sysnames=netbsd32_syscalls.c
 sysnumhdr=netbsd32_syscall.h
 syssw=netbsd32_sysent.c
 sysarghdr=netbsd32_syscallargs.h
-compatopts=compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 

CVS commit: src/sys/kern

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:08:17 UTC 2013

Modified Files:
src/sys/kern: kern_time.c subr_time.c sys_lwp.c sys_mqueue.c
syscalls.master uipc_sem.c

Log Message:
Centralize the computation of struct timespec to the int timo.
Make lwp_park take the regular arguments for specifying what kind
of timeout we supply like clock_nanosleep(), namely clockid_t and flags.


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/sys/kern/kern_time.c
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/subr_time.c
cvs rdiff -u -r1.55 -r1.56 src/sys/kern/sys_lwp.c
cvs rdiff -u -r1.34 -r1.35 src/sys/kern/sys_mqueue.c
cvs rdiff -u -r1.261 -r1.262 src/sys/kern/syscalls.master
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/uipc_sem.c

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

Modified files:

Index: src/sys/kern/kern_time.c
diff -u src/sys/kern/kern_time.c:1.175 src/sys/kern/kern_time.c:1.176
--- src/sys/kern/kern_time.c:1.175	Mon Oct  1 21:44:28 2012
+++ src/sys/kern/kern_time.c	Thu Mar 28 21:08:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time.c,v 1.175 2012/10/02 01:44:28 christos Exp $	*/
+/*	$NetBSD: kern_time.c,v 1.176 2013/03/29 01:08:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_time.c,v 1.175 2012/10/02 01:44:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_time.c,v 1.176 2013/03/29 01:08:17 christos Exp $);
 
 #include sys/param.h
 #include sys/resourcevar.h
@@ -346,16 +346,11 @@ nanosleep1(struct lwp *l, clockid_t cloc
 	struct timespec rmtstart;
 	int error, timo;
 
-	if ((error = clock_gettime1(clock_id, rmtstart)) != 0)
-		return ENOTSUP;
-
-	if (flags  TIMER_ABSTIME)
-		timespecsub(rqt, rmtstart, rqt);
-
-	if ((error = itimespecfix(rqt)) != 0)
-		return error;
+	if ((error = ts2timo(clock_id, flags, rqt, timo, rmtstart)) != 0) {
+		if (error == ETIMEDOUT)
+			timo = 0;
+	}
 
-	timo = tstohz(rqt);
 	/*
 	 * Avoid inadvertently sleeping forever
 	 */

Index: src/sys/kern/subr_time.c
diff -u src/sys/kern/subr_time.c:1.9 src/sys/kern/subr_time.c:1.10
--- src/sys/kern/subr_time.c:1.9	Sun Dec 18 17:30:25 2011
+++ src/sys/kern/subr_time.c	Thu Mar 28 21:08:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_time.c,v 1.9 2011/12/18 22:30:25 christos Exp $	*/
+/*	$NetBSD: subr_time.c,v 1.10 2013/03/29 01:08:17 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_time.c,v 1.9 2011/12/18 22:30:25 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_time.c,v 1.10 2013/03/29 01:08:17 christos Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -216,21 +216,31 @@ gettimeleft(struct timespec *ts, struct 
  * Calculate delta and convert from struct timespec to the ticks.
  */
 int
-abstimeout2timo(struct timespec *ts, int *timo)
+ts2timo(clockid_t clock_id, int flags, struct timespec *ts,
+int *timo, struct timespec *start)
 {
-	struct timespec tsd;
 	int error;
+	struct timespec tsd;
+
+	flags = TIMER_ABSTIME;
+
+	if (start == NULL || flags)
+		start = tsd;
+
+	if (start)
+		if ((error = clock_gettime1(clock_id, start)) != 0)
+			return error;
 
-	getnanotime(tsd);
-	timespecsub(ts, tsd, tsd);
-	if (tsd.tv_sec  0 || (tsd.tv_sec == 0  tsd.tv_nsec = 0)) {
+	if (flags)
+		timespecsub(ts, start, ts);
+
+	if (ts-tv_sec  0 || (ts-tv_sec == 0  ts-tv_nsec = 0))
 		return ETIMEDOUT;
-	}
-	error = itimespecfix(tsd);
-	if (error) {
+
+	if ((error = itimespecfix(ts)) !=  0)
 		return error;
-	}
-	*timo = tstohz(tsd);
+
+	*timo = tstohz(ts);
 	KASSERT(*timo != 0);
 
 	return 0;

Index: src/sys/kern/sys_lwp.c
diff -u src/sys/kern/sys_lwp.c:1.55 src/sys/kern/sys_lwp.c:1.56
--- src/sys/kern/sys_lwp.c:1.55	Thu Sep 27 16:43:15 2012
+++ src/sys/kern/sys_lwp.c	Thu Mar 28 21:08:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_lwp.c,v 1.55 2012/09/27 20:43:15 rmind Exp $	*/
+/*	$NetBSD: sys_lwp.c,v 1.56 2013/03/29 01:08:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_lwp.c,v 1.55 2012/09/27 20:43:15 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_lwp.c,v 1.56 2013/03/29 01:08:17 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -532,7 +532,7 @@ lwp_unpark(lwpid_t target, const void *h
 }
 
 int
-lwp_park(struct timespec *ts, const void *hint)
+lwp_park(clockid_t clock_id, int flags, struct timespec *ts, const void *hint)
 {
 	sleepq_t *sq;
 	kmutex_t *mp;
@@ -540,12 +540,9 @@ lwp_park(struct timespec *ts, const void
 	int timo, error;
 	lwp_t *l;
 
-	/* Fix up the given timeout value. */
 	if (ts != NULL) {
-		error = abstimeout2timo(ts, timo);
-		if (error) {
+		if ((error = ts2timo(clock_id, flags, ts, timo, NULL)) != 0)
 			return error;
-		}
 		

CVS commit: src/sys/sys

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:09:45 UTC 2013

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

Log Message:
prototype adjustments for lwp_park, welcome to 6.99.19


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/sys/lwp.h
cvs rdiff -u -r1.427 -r1.428 src/sys/sys/param.h
cvs rdiff -u -r1.32 -r1.33 src/sys/sys/timevar.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/lwp.h
diff -u src/sys/sys/lwp.h:1.167 src/sys/sys/lwp.h:1.168
--- src/sys/sys/lwp.h:1.167	Wed Jan  2 14:39:04 2013
+++ src/sys/sys/lwp.h	Thu Mar 28 21:09:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.167 2013/01/02 19:39:04 dsl Exp $	*/
+/*	$NetBSD: lwp.h,v 1.168 2013/03/29 01:09:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -348,7 +348,7 @@ void	*_lwp_getspecific_by_lwp(lwp_t *, s
 void	lwp_setspecific(specificdata_key_t, void *);
 
 /* Syscalls. */
-int	lwp_park(struct timespec *, const void *);
+int	lwp_park(clockid_t, int, struct timespec *, const void *);
 int	lwp_unpark(lwpid_t, const void *);
 
 /* DDB. */

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.427 src/sys/sys/param.h:1.428
--- src/sys/sys/param.h:1.427	Thu Mar 21 16:05:56 2013
+++ src/sys/sys/param.h	Thu Mar 28 21:09:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.427 2013/03/21 20:05:56 plunky Exp $	*/
+/*	$NetBSD: param.h,v 1.428 2013/03/29 01:09:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	699001800	/* NetBSD 6.99.18 */
+#define	__NetBSD_Version__	699001900	/* NetBSD 6.99.19 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)

Index: src/sys/sys/timevar.h
diff -u src/sys/sys/timevar.h:1.32 src/sys/sys/timevar.h:1.33
--- src/sys/sys/timevar.h:1.32	Mon Oct  1 21:44:29 2012
+++ src/sys/sys/timevar.h	Thu Mar 28 21:09:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: timevar.h,v 1.32 2012/10/02 01:44:29 christos Exp $	*/
+/*	$NetBSD: timevar.h,v 1.33 2013/03/29 01:09:45 christos Exp $	*/
 
 /*
  *  Copyright (c) 2005, 2008 The NetBSD Foundation.
@@ -145,7 +145,7 @@ void	getnanotime(struct timespec *);
 void	getmicrotime(struct timeval *);
 
 /* Other functions */
-int	abstimeout2timo(struct timespec *, int *);
+int	ts2timo(clockid_t, int, struct timespec *, int *, struct timespec *);
 void	adjtime1(const struct timeval *, struct timeval *, struct proc *);
 int	clock_getres1(clockid_t, struct timespec *);
 int	clock_gettime1(clockid_t, struct timespec *);



CVS commit: src/sys/kern

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:10:13 UTC 2013

Modified Files:
src/sys/kern: init_sysent.c syscalls.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.261 -r1.262 src/sys/kern/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/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.270 src/sys/kern/init_sysent.c:1.271
--- src/sys/kern/init_sysent.c:1.270	Mon Oct  1 21:46:20 2012
+++ src/sys/kern/init_sysent.c	Thu Mar 28 21:10:13 2013
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.270 2012/10/02 01:46:20 christos Exp $ */
+/* $NetBSD: init_sysent.c,v 1.271 2013/03/29 01:10:13 christos Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.261 2012/10/02 01:44:28 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.262 2013/03/29 01:08:17 christos Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.270 2012/10/02 01:46:20 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.271 2013/03/29 01:10:13 christos Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h
@@ -1046,8 +1046,8 @@ struct sysent sysent[] = {
 	(sy_call_t *)sys_nomodule },	/* 432 = __mq_timedsend50 */
 	{ ns(struct sys___mq_timedreceive50_args), SYCALL_ARG_PTR,
 	(sy_call_t *)sys_nomodule },	/* 433 = __mq_timedreceive50 */
-	{ ns(struct syslwp_park50_args), SYCALL_ARG_PTR,
-	(sy_call_t *)syslwp_park50 },	/* 434 = ___lwp_park50 */
+	{ ns(struct compat_60_sys__lwp_park_args), SYCALL_ARG_PTR,
+	(sy_call_t *)sys_nomodule },	/* 434 = compat_60__lwp_park */
 	{ ns(struct sys___kevent50_args), SYCALL_ARG_PTR,
 	(sy_call_t *)sys___kevent50 },	/* 435 = __kevent50 */
 	{ ns(struct sys___pselect50_args), SYCALL_ARG_PTR,
@@ -1154,8 +1154,8 @@ struct sysent sysent[] = {
 	(sy_call_t *)sys_sendmmsg },	/* 476 = sendmmsg */
 	{ ns(struct sys_clock_nanosleep_args), SYCALL_ARG_PTR,
 	(sy_call_t *)sys_clock_nanosleep },	/* 477 = clock_nanosleep */
-	{ 0, 0, 0,
-	sys_nosys },			/* 478 = filler */
+	{ ns(struct syslwp_park60_args), SYCALL_ARG_PTR,
+	(sy_call_t *)syslwp_park60 },	/* 478 = ___lwp_park60 */
 	{ 0, 0, 0,
 	sys_nosys },			/* 479 = filler */
 	{ 0, 0, 0,

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.261 src/sys/kern/syscalls.c:1.262
--- src/sys/kern/syscalls.c:1.261	Mon Oct  1 21:46:21 2012
+++ src/sys/kern/syscalls.c	Thu Mar 28 21:10:13 2013
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls.c,v 1.261 2012/10/02 01:46:21 christos Exp $ */
+/* $NetBSD: syscalls.c,v 1.262 2013/03/29 01:10:13 christos Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.261 2012/10/02 01:44:28 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.262 2013/03/29 01:08:17 christos Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.261 2012/10/02 01:46:21 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.262 2013/03/29 01:10:13 christos Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_modular.h
@@ -507,7 +507,7 @@ const char *const syscallnames[] = {
 	/* 431 */	sigtimedwait50,
 	/* 432 */	__mq_timedsend50,
 	/* 433 */	__mq_timedreceive50,
-	/* 434 */	___lwp_park50,
+	/* 434 */	compat_60__lwp_park,
 	/* 435 */	__kevent50,
 	/* 436 */	__pselect50,
 	/* 437 */	__pollts50,
@@ -567,7 +567,7 @@ const char *const syscallnames[] = {
 	/* 475 */	recvmmsg,
 	/* 476 */	sendmmsg,
 	/* 477 */	clock_nanosleep,
-	/* 478 */	# filler,
+	/* 478 */	___lwp_park60,
 	/* 479 */	# filler,
 	/* 480 */	# filler,
 	/* 481 */	# filler,



CVS commit: src/sys/sys

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:10:23 UTC 2013

Modified Files:
src/sys/sys: syscall.h syscallargs.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/sys/sys/syscall.h
cvs rdiff -u -r1.240 -r1.241 src/sys/sys/syscallargs.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/syscall.h
diff -u src/sys/sys/syscall.h:1.257 src/sys/sys/syscall.h:1.258
--- src/sys/sys/syscall.h:1.257	Mon Oct  1 21:46:20 2012
+++ src/sys/sys/syscall.h	Thu Mar 28 21:10:22 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: syscall.h,v 1.257 2012/10/02 01:46:20 christos Exp $ */
+/* $NetBSD: syscall.h,v 1.258 2013/03/29 01:10:22 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.261 2012/10/02 01:44:28 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.262 2013/03/29 01:08:17 christos Exp
  */
 
 #ifndef _SYS_SYSCALL_H_
@@ -1215,8 +1215,8 @@
 /* syscall: __mq_timedreceive50 ret: ssize_t args: mqd_t char * size_t unsigned * const struct timespec * */
 #define	SYS___mq_timedreceive50	433
 
-/* syscall: ___lwp_park50 ret: int args: const struct timespec * lwpid_t const void * const void * */
-#define	SYSlwp_park50	434
+/* syscall: compat_60__lwp_park ret: int args: const struct timespec * lwpid_t const void * const void * */
+#define	SYS_compat_60__lwp_park	434
 
 /* syscall: __kevent50 ret: int args: int const struct kevent * size_t struct kevent * size_t const struct timespec * */
 #define	SYS___kevent50	435
@@ -1361,6 +1361,9 @@
 /* syscall: clock_nanosleep ret: int args: clockid_t int const struct timespec * struct timespec * */
 #define	SYS_clock_nanosleep	477
 
-#define	SYS_MAXSYSCALL	478
+/* syscall: ___lwp_park60 ret: int args: clockid_t int const struct timespec * lwpid_t const void * const void * */
+#define	SYSlwp_park60	478
+
+#define	SYS_MAXSYSCALL	479
 #define	SYS_NSYSENT	512
 #endif /* _SYS_SYSCALL_H_ */

Index: src/sys/sys/syscallargs.h
diff -u src/sys/sys/syscallargs.h:1.240 src/sys/sys/syscallargs.h:1.241
--- src/sys/sys/syscallargs.h:1.240	Mon Oct  1 21:46:20 2012
+++ src/sys/sys/syscallargs.h	Thu Mar 28 21:10:22 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: syscallargs.h,v 1.240 2012/10/02 01:46:20 christos Exp $ */
+/* $NetBSD: syscallargs.h,v 1.241 2013/03/29 01:10:22 christos Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.261 2012/10/02 01:44:28 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.262 2013/03/29 01:08:17 christos Exp
  */
 
 #ifndef _SYS_SYSCALLARGS_H_
@@ -2828,13 +2828,13 @@ check_syscall_args(sys___mq_timedreceive
 #endif /* !RUMP_CLIENT */
 
 #ifndef RUMP_CLIENT
-struct syslwp_park50_args {
+struct compat_60_sys__lwp_park_args {
 	syscallarg(const struct timespec *) ts;
 	syscallarg(lwpid_t) unpark;
 	syscallarg(const void *) hint;
 	syscallarg(const void *) unparkhint;
 };
-check_syscall_args(syslwp_park50)
+check_syscall_args(compat_60_sys__lwp_park)
 #endif /* !RUMP_CLIENT */
 
 struct sys___kevent50_args {
@@ -3188,6 +3188,18 @@ struct sys_clock_nanosleep_args {
 check_syscall_args(sys_clock_nanosleep)
 #endif /* !RUMP_CLIENT */
 
+#ifndef RUMP_CLIENT
+struct syslwp_park60_args {
+	syscallarg(clockid_t) clock_id;
+	syscallarg(int) flags;
+	syscallarg(const struct timespec *) ts;
+	syscallarg(lwpid_t) unpark;
+	syscallarg(const void *) hint;
+	syscallarg(const void *) unparkhint;
+};
+check_syscall_args(syslwp_park60)
+#endif /* !RUMP_CLIENT */
+
 /*
  * System call prototypes.
  */
@@ -3985,7 +3997,7 @@ int	sys___mq_timedsend50(struct lwp *, c
 
 int	sys___mq_timedreceive50(struct lwp *, const struct sys___mq_timedreceive50_args *, register_t *);
 
-int	syslwp_park50(struct lwp *, const struct syslwp_park50_args *, register_t *);
+int	compat_60_sys__lwp_park(struct lwp *, const struct compat_60_sys__lwp_park_args *, register_t *);
 
 int	sys___kevent50(struct lwp *, const struct sys___kevent50_args *, register_t *);
 
@@ -4083,5 +4095,7 @@ int	sys_sendmmsg(struct lwp *, const str
 
 int	sys_clock_nanosleep(struct lwp *, const struct sys_clock_nanosleep_args *, register_t *);
 
+int	syslwp_park60(struct lwp *, const struct syslwp_park60_args *, register_t *);
+
 #endif /* !RUMP_CLIENT */
 #endif /* _SYS_SYSCALLARGS_H_ */



CVS commit: src/sys/compat/netbsd32

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:13:54 UTC 2013

Added Files:
src/sys/compat/netbsd32: netbsd32_compat_60.c

Log Message:
lwp park glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/compat/netbsd32/netbsd32_compat_60.c

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

Added files:

Index: src/sys/compat/netbsd32/netbsd32_compat_60.c
diff -u /dev/null src/sys/compat/netbsd32/netbsd32_compat_60.c:1.1
--- /dev/null	Thu Mar 28 21:13:54 2013
+++ src/sys/compat/netbsd32/netbsd32_compat_60.c	Thu Mar 28 21:13:54 2013
@@ -0,0 +1,87 @@
+/*	$NetBSD: netbsd32_compat_60.c,v 1.1 2013/03/29 01:13:54 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ *This product includes software developed by the NetBSD
+ *Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *contributors may be used to endorse or promote products derived
+ *from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE 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.
+ */
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_60.c,v 1.1 2013/03/29 01:13:54 christos Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/time.h
+#include sys/dirent.h
+#include sys/lwp.h
+#include sys/syscallargs.h
+
+#include compat/netbsd32/netbsd32.h
+#include compat/netbsd32/netbsd32_syscallargs.h
+#include compat/netbsd32/netbsd32_conv.h
+
+
+
+int
+compat_60_netbsd32__lwp_park(struct lwp *l,
+const struct compat_60_netbsd32__lwp_park_args *uap, register_t *retval)
+{
+	/* {
+		syscallarg(const netbsd32_timespecp) ts;
+		syscallarg(lwpid_t) unpark;
+		syscallarg(netbsd32_voidp) hint;
+		syscallarg(netbsd32_voidp) unparkhint;
+	} */
+	struct timespec ts, *tsp;
+	struct netbsd32_timespec ts32;
+	int error;
+
+	if (SCARG_P32(uap, ts) == NULL)
+		tsp = NULL;
+	else {
+		error = copyin(SCARG_P32(uap, ts), ts32, sizeof ts32);
+		if (error != 0)
+			return error;
+		tsp = ts;
+	}
+
+	if (SCARG(uap, unpark) != 0) {
+		error = lwp_unpark(SCARG(uap, unpark),
+		SCARG_P32(uap, unparkhint));
+		if (error != 0)
+			return error;
+	}
+
+	return lwp_park(CLOCK_REALTIME, TIMER_ABSTIME, tsp,
+	SCARG_P32(uap, hint));
+	return 0;
+}



CVS commit: src/sys/compat/netbsd32

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:14:10 UTC 2013

Modified Files:
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.103 -r1.104 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.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_syscall.h
diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.104 src/sys/compat/netbsd32/netbsd32_syscall.h:1.105
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.104	Mon Oct  1 21:46:22 2012
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Thu Mar 28 21:14:09 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.104 2012/10/02 01:46:22 christos Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.105 2013/03/29 01:14:09 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.96 2012/10/02 01:44:28 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.97 2013/03/29 01:04:30 christos Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
@@ -1108,8 +1108,8 @@
 /* syscall: netbsd32_sigtimedwait50 ret: int args: const netbsd32_sigsetp_t netbsd32_siginfop_t netbsd32_timespecp_t */
 #define	NETBSD32_SYS_netbsd32_sigtimedwait50	431
 
-/* syscall: netbsd32lwp_park50 ret: int args: const netbsd32_timespecp_t lwpid_t const netbsd32_voidp const netbsd32_voidp */
-#define	NETBSD32_SYS_netbsd32lwp_park50	434
+/* syscall: compat_60_netbsd32__lwp_park ret: int args: const netbsd32_timespecp_t lwpid_t const netbsd32_voidp const netbsd32_voidp */
+#define	NETBSD32_SYS_compat_60_netbsd32__lwp_park	434
 
 /* syscall: netbsd32___kevent50 ret: int args: int const netbsd32_keventp_t netbsd32_size_t netbsd32_keventp_t netbsd32_size_t const netbsd32_timespecp_t */
 #define	NETBSD32_SYS_netbsd32___kevent50	435
@@ -1245,6 +1245,9 @@
 /* syscall: netbsd32_clock_nanosleep ret: int args: netbsd32_clockid_t int const netbsd32_timespecp_t netbsd32_timespecp_t */
 #define	NETBSD32_SYS_netbsd32_clock_nanosleep	477
 
-#define	NETBSD32_SYS_MAXSYSCALL	478
+/* syscall: netbsd32lwp_park60 ret: int args: netbsd32_clockid_t int const netbsd32_timespecp_t lwpid_t netbsd32_voidp netbsd32_voidp */
+#define	NETBSD32_SYS_netbsd32lwp_park60	478
+
+#define	NETBSD32_SYS_MAXSYSCALL	479
 #define	NETBSD32_SYS_NSYSENT	512
 #endif /* _NETBSD32_SYS_SYSCALL_H_ */
Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.104 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.105
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.104	Mon Oct  1 21:46:22 2012
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Thu Mar 28 21:14:09 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.104 2012/10/02 01:46:22 christos Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.105 2013/03/29 01:14:09 christos Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.96 2012/10/02 01:44:28 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.97 2013/03/29 01:04:30 christos Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_
@@ -2147,13 +2147,13 @@ struct netbsd32_sigtimedwait50_args 
 };
 check_syscall_args(netbsd32_sigtimedwait50)
 
-struct netbsd32lwp_park50_args {
+struct compat_60_netbsd32__lwp_park_args {
 	syscallarg(const netbsd32_timespecp_t) ts;
 	syscallarg(lwpid_t) unpark;
 	syscallarg(const netbsd32_voidp) hint;
 	syscallarg(const netbsd32_voidp) unparkhint;
 };
-check_syscall_args(netbsd32lwp_park50)
+check_syscall_args(compat_60_netbsd32__lwp_park)
 
 struct netbsd32___kevent50_args {
 	syscallarg(int) fd;
@@ -2456,6 +2456,16 @@ struct netbsd32_clock_nanosleep_args {
 };
 check_syscall_args(netbsd32_clock_nanosleep)
 
+struct netbsd32lwp_park60_args {
+	syscallarg(netbsd32_clockid_t) clock_id;
+	syscallarg(int) flags;
+	syscallarg(const netbsd32_timespecp_t) ts;
+	syscallarg(lwpid_t) unpark;
+	syscallarg(netbsd32_voidp) hint;
+	syscallarg(netbsd32_voidp) unparkhint;
+};
+check_syscall_args(netbsd32lwp_park60)
+
 /*
  * System call prototypes.
  */
@@ -3173,7 +3183,7 @@ int	netbsd32___nanosleep50(struct lwp *,
 
 int	netbsd32_sigtimedwait50(struct lwp *, const struct netbsd32_sigtimedwait50_args *, register_t *);
 
-int	netbsd32lwp_park50(struct lwp *, const struct netbsd32lwp_park50_args *, register_t *);
+int	compat_60_netbsd32__lwp_park(struct lwp *, const struct compat_60_netbsd32__lwp_park_args *, register_t *);
 
 int	netbsd32___kevent50(struct lwp *, const 

CVS commit: src/sys/rump/include/rump

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:51:25 UTC 2013

Modified Files:
src/sys/rump/include/rump: rump_syscalls.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/rump/include/rump/rump_syscalls.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/rump/include/rump/rump_syscalls.h
diff -u src/sys/rump/include/rump/rump_syscalls.h:1.61 src/sys/rump/include/rump/rump_syscalls.h:1.62
--- src/sys/rump/include/rump/rump_syscalls.h:1.61	Mon Oct  1 21:46:21 2012
+++ src/sys/rump/include/rump/rump_syscalls.h	Thu Mar 28 21:51:25 2013
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_syscalls.h,v 1.61 2012/10/02 01:46:21 christos Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.62 2013/03/29 01:51:25 christos Exp $ */
 
 /*
  * System call protos in rump namespace.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.261 2012/10/02 01:44:28 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.262 2013/03/29 01:08:17 christos Exp
  */
 
 #ifndef _RUMP_RUMP_SYSCALLS_H_



CVS commit: src/lib/libc/compat

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:09:58 UTC 2013

Modified Files:
src/lib/libc/compat/include: lwp.h
src/lib/libc/compat/sys: Makefile.inc
Added Files:
src/lib/libc/compat/sys: compat___lwp_park50.c

Log Message:
Compat glue for lwp park, but does not use the new syscall yet.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/include/lwp.h
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/compat/sys/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/sys/compat___lwp_park50.c

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

Modified files:

Index: src/lib/libc/compat/include/lwp.h
diff -u src/lib/libc/compat/include/lwp.h:1.2 src/lib/libc/compat/include/lwp.h:1.3
--- src/lib/libc/compat/include/lwp.h:1.2	Sat Jan 10 21:46:25 2009
+++ src/lib/libc/compat/include/lwp.h	Thu Mar 28 22:09:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.2 2009/01/11 02:46:25 christos Exp $	*/
+/*	$NetBSD: lwp.h,v 1.3 2013/03/29 02:09:58 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -39,8 +39,11 @@
 #define _COMPAT_LWP_H_
 
 __BEGIN_DECLS
+struct timespec50;
 int	_lwp_park(const struct timespec50 *, lwpid_t, const void *, const void *);
 int	___lwp_park50(const struct timespec *, lwpid_t, const void *, const void *);
+int	___lwp_park60(clockid_t , int, const struct timespec *, lwpid_t,
+const void *, const void *);
 __END_DECLS
 
 #endif /* !_COMPAT_LWP_H_ */

Index: src/lib/libc/compat/sys/Makefile.inc
diff -u src/lib/libc/compat/sys/Makefile.inc:1.8 src/lib/libc/compat/sys/Makefile.inc:1.9
--- src/lib/libc/compat/sys/Makefile.inc:1.8	Sat Jan 10 21:46:25 2009
+++ src/lib/libc/compat/sys/Makefile.inc	Thu Mar 28 22:09:58 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.8 2009/01/11 02:46:25 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.9 2013/03/29 02:09:58 christos Exp $
 
 .PATH: ${COMPATDIR}/sys
 SRCS+= compat_getdents.c compat_getdirentries.c compat_msync.c \
@@ -12,7 +12,7 @@ SRCS+= compat_getdents.c compat_getdiren
 compat___stat30.c compat_aio_suspend.c compat_adjtime.c compat_mknod.c \
 compat_mqueue.c compat__lwp_park.c compat_lfs_segwait.c compat_kevent.c \
 compat___ntp_gettime30.c compat___semctl13.c compat___shmctl13.c \
-compat___msgctl13.c
+compat___msgctl13.c compat___lwp_park50.c
 MAN+=	getdirentries.3
 
 .if ${MKLINT} != no

Added files:

Index: src/lib/libc/compat/sys/compat___lwp_park50.c
diff -u /dev/null src/lib/libc/compat/sys/compat___lwp_park50.c:1.1
--- /dev/null	Thu Mar 28 22:09:58 2013
+++ src/lib/libc/compat/sys/compat___lwp_park50.c	Thu Mar 28 22:09:58 2013
@@ -0,0 +1,67 @@
+/*	$NetBSD: compat___lwp_park50.c,v 1.1 2013/03/29 02:09:58 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas chris...@netbsd.org.
+ *
+ * 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.
+ */
+
+
+#include sys/cdefs.h
+#if defined(LIBC_SCCS)  !defined(lint)
+__RCSID($NetBSD: compat___lwp_park50.c,v 1.1 2013/03/29 02:09:58 christos Exp $);
+#endif /* LIBC_SCCS and not lint */
+
+#define __LIBC12_SOURCE__
+
+#include sys/types.h
+#include sys/mount.h
+#include compat/include/fstypes.h
+#include compat/sys/mount.h
+#include compat/include/lwp.h
+
+#ifndef notyet
+#include unistd.h
+#include sys/syscall.h
+#endif
+
+__warn_references(fhstat,
+warning: reference to compatibility ___lwp_park50(); include lwp.h to generate correct reference)
+
+/*
+ * Convert old __lwp_park() call to new
+ */
+int
+___lwp_park50(const struct 

CVS commit: src/lib/libc/sys

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:10:53 UTC 2013

Modified Files:
src/lib/libc/sys: Makefile.inc

Log Message:
no need for __lwp_park50.S here and we don't provide __lwp_park60.S so that
it does not get accidentally used.


To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 src/lib/libc/sys/Makefile.inc

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/Makefile.inc
diff -u src/lib/libc/sys/Makefile.inc:1.218 src/lib/libc/sys/Makefile.inc:1.219
--- src/lib/libc/sys/Makefile.inc:1.218	Sun Nov 18 12:41:53 2012
+++ src/lib/libc/sys/Makefile.inc	Thu Mar 28 22:10:53 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.218 2012/11/18 17:41:53 manu Exp $
+#	$NetBSD: Makefile.inc,v 1.219 2013/03/29 02:10:53 christos Exp $
 #	@(#)Makefile.inc	8.3 (Berkeley) 10/24/94
 
 # sys sources
@@ -103,7 +103,7 @@ ASM=	access.S acct.S \
 	lchflags.S lchmod.S lchown.S lfs_bmapv.S lfs_markv.S lfs_segclean.S \
 		__lfs_segwait50.S link.S linkat.S listen.S __lstat50.S \
 		__lutimes50.S _lwp_create.S _lwp_exit.S _lwp_kill.S \
-		___lwp_park50.S _lwp_self.S _lwp_wait.S _lwp_unpark.S \
+		_lwp_self.S _lwp_wait.S _lwp_unpark.S \
 		_lwp_unpark_all.S _lwp_suspend.S _lwp_continue.S \
 		_lwp_wakeup.S _lwp_detach.S _lwp_setprivate.S \
 		_lwp_setname.S _lwp_getname.S _lwp_ctl.S \



CVS commit: src/sys/net80211

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:20:17 UTC 2013

Modified Files:
src/sys/net80211: ieee80211_node.c

Log Message:
trailing blanks police.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/net80211/ieee80211_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/net80211/ieee80211_node.c
diff -u src/sys/net80211/ieee80211_node.c:1.64 src/sys/net80211/ieee80211_node.c:1.65
--- src/sys/net80211/ieee80211_node.c:1.64	Thu Jan 10 12:40:10 2013
+++ src/sys/net80211/ieee80211_node.c	Thu Mar 28 22:20:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee80211_node.c,v 1.64 2013/01/10 17:40:10 christos Exp $	*/
+/*	$NetBSD: ieee80211_node.c,v 1.65 2013/03/29 02:20:17 christos Exp $	*/
 /*-
  * Copyright (c) 2001 Atsushi Onoe
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,14 +36,14 @@
 __FBSDID($FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.65 2005/08/13 17:50:21 sam Exp $);
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, $NetBSD: ieee80211_node.c,v 1.64 2013/01/10 17:40:10 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ieee80211_node.c,v 1.65 2013/03/29 02:20:17 christos Exp $);
 #endif
 
 #include opt_inet.h
 
 #include sys/param.h
-#include sys/systm.h 
-#include sys/mbuf.h   
+#include sys/systm.h
+#include sys/mbuf.h
 #include sys/malloc.h
 #include sys/kernel.h
 
@@ -66,7 +66,7 @@ __KERNEL_RCSID(0, $NetBSD: ieee80211_no
 #include net/bpf.h
 
 #ifdef INET
-#include netinet/in.h 
+#include netinet/in.h
 #include net/if_ether.h
 #endif
 
@@ -213,7 +213,7 @@ ieee80211_node_detach(struct ieee80211co
 	}
 }
 
-/* 
+/*
  * Port authorize/unauthorize interfaces for use by an authenticator.
  */
 
@@ -453,7 +453,7 @@ ieee80211_create_ibss(struct ieee80211co
 		else
 			ni-ni_bssid[0] |= 0x02;	/* local bit for IBSS */
 	}
-	/* 
+	/*
 	 * Fix the channel and related attributes.
 	 */
 	ieee80211_set_chan(ic, ni, chan);
@@ -763,7 +763,7 @@ ieee80211_end_scan(struct ieee80211com *
 		goto notfound;
 	}
 }
- 
+
 /*
  * Handle 802.11 ad hoc network merge.  The
  * convention, set by the Wireless Ethernet Compatibility Alliance
@@ -846,7 +846,7 @@ ieee80211_sta_join(struct ieee80211com *
 	 * Set the erp state (mostly the slot time) to deal with
 	 * the auto-select case; this should be redundant if the
 	 * mode is locked.
-	 */ 
+	 */
 	ic-ic_curmode = ieee80211_chan2mode(ic, selbs-ni_chan);
 	ic-ic_curchan = selbs-ni_chan;
 	ieee80211_reset_erp(ic);
@@ -1199,7 +1199,7 @@ dump_probe_beacon(u_int8_t subtype, int 
 	printf(\n);
 
 	if (isnew) {
-		printf([%s] caps 0x%x bintval %u erp 0x%x, 
+		printf([%s] caps 0x%x bintval %u erp 0x%x,
 			ether_sprintf(mac), sp-capinfo, sp-bintval, sp-erp);
 		if (sp-country != NULL) {
 #ifdef __FreeBSD__
@@ -1374,7 +1374,7 @@ ieee80211_add_neighbor(struct ieee80211c
  * are required to pass some node so we fall back to ic_bss
  * when this frame is from an unknown sender.  The 802.11 layer
  * knows this means the sender wasn't in the node table and
- * acts accordingly. 
+ * acts accordingly.
  */
 struct ieee80211_node *
 #ifdef IEEE80211_DEBUG_REFCNT



CVS commit: src/sys/net80211

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:26:45 UTC 2013

Modified Files:
src/sys/net80211: ieee80211_node.c

Log Message:
Don't hold 2 locks at the same time, causes lockdebug panic. Triggered by
running usb wifi interfaces as access points. What we do instead is check
the generation number upon restart, and if it changed we give up.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/net80211/ieee80211_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/net80211/ieee80211_node.c
diff -u src/sys/net80211/ieee80211_node.c:1.65 src/sys/net80211/ieee80211_node.c:1.66
--- src/sys/net80211/ieee80211_node.c:1.65	Thu Mar 28 22:20:17 2013
+++ src/sys/net80211/ieee80211_node.c	Thu Mar 28 22:26:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee80211_node.c,v 1.65 2013/03/29 02:20:17 christos Exp $	*/
+/*	$NetBSD: ieee80211_node.c,v 1.66 2013/03/29 02:26:45 christos Exp $	*/
 /*-
  * Copyright (c) 2001 Atsushi Onoe
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,7 +36,7 @@
 __FBSDID($FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.65 2005/08/13 17:50:21 sam Exp $);
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, $NetBSD: ieee80211_node.c,v 1.65 2013/03/29 02:20:17 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ieee80211_node.c,v 1.66 2013/03/29 02:26:45 christos Exp $);
 #endif
 
 #include opt_inet.h
@@ -1908,9 +1908,18 @@ ieee80211_timeout_stations(struct ieee80
 		   ic-ic_opmode == IEEE80211_M_AHDEMO);
 	IEEE80211_SCAN_LOCK(nt);
 	gen = ++nt-nt_scangen;
+	IEEE80211_SCAN_UNLOCK(nt);
 	IEEE80211_DPRINTF(ic, IEEE80211_MSG_NODE,
 		%s: %s scangen %u\n, __func__, nt-nt_name, gen);
 restart:
+	IEEE80211_SCAN_LOCK(nt);
+	if (gen != nt-nt_scangen) {
+		printf(%s: scan aborted %u\n, __func__, gen);
+		IEEE80211_SCAN_UNLOCK(nt);
+		return;
+	}
+	IEEE80211_SCAN_UNLOCK(nt);
+
 	IEEE80211_NODE_LOCK(nt);
 	TAILQ_FOREACH(ni, nt-nt_node, ni_list) {
 		if (ni-ni_scangen == gen)	/* previously handled */
@@ -2039,8 +2048,6 @@ IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWE
 	}
 	IEEE80211_NODE_UNLOCK(nt);
 
-	IEEE80211_SCAN_UNLOCK(nt);
-
 	nt-nt_inact_timer = IEEE80211_INACT_WAIT;
 }
 
@@ -2052,7 +2059,16 @@ ieee80211_iterate_nodes(struct ieee80211
 
 	IEEE80211_SCAN_LOCK(nt);
 	gen = ++nt-nt_scangen;
+	IEEE80211_SCAN_UNLOCK(nt);
 restart:
+	IEEE80211_SCAN_LOCK(nt);
+	if (gen != nt-nt_scangen) {
+		printf(%s: scan aborted %u\n, __func__, gen);
+		IEEE80211_SCAN_UNLOCK(nt);
+		return;
+	}
+	IEEE80211_SCAN_UNLOCK(nt);
+
 	IEEE80211_NODE_LOCK(nt);
 	TAILQ_FOREACH(ni, nt-nt_node, ni_list) {
 		if (ni-ni_scangen != gen) {
@@ -2065,8 +2081,6 @@ restart:
 		}
 	}
 	IEEE80211_NODE_UNLOCK(nt);
-
-	IEEE80211_SCAN_UNLOCK(nt);
 }
 
 void



CVS commit: src/sys/net80211

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:30:18 UTC 2013

Modified Files:
src/sys/net80211: ieee80211_node.c

Log Message:
one we is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/net80211/ieee80211_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/net80211/ieee80211_node.c
diff -u src/sys/net80211/ieee80211_node.c:1.66 src/sys/net80211/ieee80211_node.c:1.67
--- src/sys/net80211/ieee80211_node.c:1.66	Thu Mar 28 22:26:45 2013
+++ src/sys/net80211/ieee80211_node.c	Thu Mar 28 22:30:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee80211_node.c,v 1.66 2013/03/29 02:26:45 christos Exp $	*/
+/*	$NetBSD: ieee80211_node.c,v 1.67 2013/03/29 02:30:18 christos Exp $	*/
 /*-
  * Copyright (c) 2001 Atsushi Onoe
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,7 +36,7 @@
 __FBSDID($FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.65 2005/08/13 17:50:21 sam Exp $);
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, $NetBSD: ieee80211_node.c,v 1.66 2013/03/29 02:26:45 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ieee80211_node.c,v 1.67 2013/03/29 02:30:18 christos Exp $);
 #endif
 
 #include opt_inet.h
@@ -1161,7 +1161,7 @@ ieee80211_find_node(struct ieee80211_nod
 
 /*
  * Fake up a node; this handles node discovery in adhoc mode.
- * Note that for the driver's benefit we we treat this like
+ * Note that for the driver's benefit we treat this like
  * an association so the driver has an opportunity to setup
  * it's private state.
  */



CVS commit: src/tests/lib/libpthread

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:32:38 UTC 2013

Modified Files:
src/tests/lib/libpthread: t_condwait.c

Log Message:
fix printf formats


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libpthread/t_condwait.c

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

Modified files:

Index: src/tests/lib/libpthread/t_condwait.c
diff -u src/tests/lib/libpthread/t_condwait.c:1.1 src/tests/lib/libpthread/t_condwait.c:1.2
--- src/tests/lib/libpthread/t_condwait.c:1.1	Thu Mar 28 14:50:01 2013
+++ src/tests/lib/libpthread/t_condwait.c	Thu Mar 28 22:32:38 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_condwait.c,v 1.1 2013/03/28 18:50:01 christos Exp $ */
+/* $NetBSD: t_condwait.c,v 1.2 2013/03/29 02:32:38 christos Exp $ */
 
 /*
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -26,7 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_condwait.c,v 1.1 2013/03/28 18:50:01 christos Exp $);
+__RCSID($NetBSD: t_condwait.c,v 1.2 2013/03/29 02:32:38 christos Exp $);
 
 #include errno.h
 #include pthread.h
@@ -64,7 +64,8 @@ run(void *param)
 	to = ts;
 
 	if (debug)
-		printf(started: %ld.%09ld sec\n, to.tv_sec, to.tv_nsec);
+		printf(started: %lld.%09ld sec\n, (long long)to.tv_sec,
+		to.tv_nsec);
 
 	ts.tv_sec += WAITTIME;	/* Timeout wait */
 
@@ -74,10 +75,10 @@ run(void *param)
 		ATF_REQUIRE_EQ(clock_gettime(clck, te), 0);
 		timespecsub(te, to, to);
 		if (debug) {
-			printf(timeout: %ld.%09ld sec\n,
-			te.tv_sec, te.tv_nsec);
-			printf(elapsed: %ld.%09ld sec\n,
-			to.tv_sec, to.tv_nsec);
+			printf(timeout: %lld.%09ld sec\n,
+			(long long)te.tv_sec, te.tv_nsec);
+			printf(elapsed: %lld.%09ld sec\n,
+			(long long)to.tv_sec, to.tv_nsec);
 		}
 		ATF_REQUIRE_EQ(to.tv_sec, WAITTIME);
 		break;



CVS commit: [agc-symver] src/lib/libutil

2013-03-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Fri Mar 29 03:31:42 UTC 2013

Added Files:
src/lib/libutil [agc-symver]: Version.map

Log Message:
Add symbol versioning info for libutil


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/lib/libutil/Version.map

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

Added files:

Index: src/lib/libutil/Version.map
diff -u /dev/null src/lib/libutil/Version.map:1.1.2.1
--- /dev/null	Fri Mar 29 03:31:42 2013
+++ src/lib/libutil/Version.map	Fri Mar 29 03:31:42 2013
@@ -0,0 +1,113 @@
+LIBUTIL_7.21.0.0 {
+global:
+	login_getpwclass;
+	setusercontext;
+	parsedate;
+	login;
+	loginx;
+	pw_copy;
+	pw_copyx;
+	pw_getpwconf;
+	pw_scan;
+	ttymsg;
+	ttyaction;
+	strpct;
+	strspct;
+	flags_to_string;
+	string_to_flags;
+	sockaddr_snprintf;
+	raise_default_signal;
+	forkpty;
+	openpty;
+	pidlock;
+	ttylock;
+	ttyunlock;
+	pidfile;
+	__pw_copy50;
+	__pw_copyx50;
+	__pw_getpwconf50;
+	pw_abort;
+	pw_edit;
+	pw_error;
+	pw_getconf;
+	pw_getprefix;
+	pw_init;
+	pw_lock;
+	pw_mkdb;
+	pw_prompt;
+	pw_setprefix;
+	__parsedate50;
+	__pddebug;
+	__pdnerrs;
+	__pdparse;
+	logwtmpx;
+	logwtmp;
+	logoutx;
+	logout;
+	login_tty;
+	__login_getpwclass50;
+	__setusercontext50;
+	login_close;
+	login_getcapbool;
+	login_getcapnum;
+	login_getcapsize;
+	login_getcapstr;
+	login_getcaptime;
+	login_getclass;
+	setclasscontext;
+	setuserenv;
+	setuserpath;
+	__loginx50;
+	__login50;
+	get_media_mode;
+	get_media_mode_string;
+	get_media_option_string;
+	get_media_options;
+	get_media_subtype;
+	get_media_subtype_string;
+	get_media_type_string;
+	lookup_media_word;
+	disklabel_scan;
+	disklabel_dkcksum;
+	freemntopts;
+	getmntoptnum;
+	getmntopts;
+	getmntoptstr;
+	getfsspecname;
+	getmaxpartitions;
+	getlabeloffset;
+	getlabelsector;
+	getlabelusesmbr;
+	getbootfile;
+	easprintf;
+	ecalloc;
+	efopen;
+	emalloc;
+	erealloc;
+	esetfunc;
+	estrdup;
+	estrlcat;
+	estrlcpy;
+	estrndup;
+	evasprintf;
+	getfstypename;
+	proc_compare;
+	snprintb;
+	snprintb_m;
+	secure_path;
+	__pw_scan50;
+	opendisk;
+	opendisk1;
+	getdiskcookedname;
+	getdiskrawname;
+	getrawpartition;
+};
+
+NetBSD_6.99.18.0 {
+} LIBUTIL_7.21.0.0;
+
+LIBUTIL_private_7.21.0.0 {
+local:
+	*;
+};
+



CVS commit: [agc-symver] src/lib/libisns

2013-03-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Mar 28 15:16:25 UTC 2013

Added Files:
src/lib/libisns [agc-symver]: Version.map

Log Message:
Add versioning info for libisns


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/lib/libisns/Version.map

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



CVS commit: [agc-symver] src/lib/libdm

2013-03-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Mar 28 15:16:51 UTC 2013

Added Files:
src/lib/libdm [agc-symver]: Version.map

Log Message:
Add versioning info for libdm


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/lib/libdm/Version.map

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



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2013-03-28 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Thu Mar 28 16:30:47 UTC 2013

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
Call removeShadow only when shadowFB has been initialized.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

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



CVS commit: src/sys/dev/pci

2013-03-28 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar 28 17:25:10 UTC 2013

Modified Files:
src/sys/dev/pci: radeonfb.c radeonfbvar.h

Log Message:
clear screen when leaving X so we don't leave garbage in the borders


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/radeonfb.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/radeonfbvar.h

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



CVS commit: src/sys/kern

2013-03-28 Thread Thor Lancelot Simon
Module Name:src
Committed By:   tls
Date:   Thu Mar 28 18:06:49 UTC 2013

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

Log Message:
Re-fix 'fix' for SA-2013-003.  Because the original fix evaluated a flag
backwards, in low-entropy conditions there was a time interval in which
/dev/urandom could still output bits on an unacceptably short key.  Output
from /dev/random was *NOT* impacted.

Eliminate the flag in question -- it's safest to always fill the requested
key buffer with output from the entropy-pool, even if we let the caller
know we couldn't provide bytes with the full entropy it requested.

Advisory will be updated soon with a full worst-case analysis of the
/dev/urandom output path in the presence of either variant of the
SA-2013-003 bug.  Fortunately, because a large amount of other input
is mixed in before users can obtain any output, it doesn't look as dangerous
in practice as I'd feared it might be.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/kern/subr_cprng.c

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



CVS commit: src/lib/libpthread

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 18:07:12 UTC 2013

Modified Files:
src/lib/libpthread: pthread_cond.c

Log Message:
PR/47703: Yasushi Oshima: pthread_cond_timedwait() does not wait
after call pthread_condattr_setclock(CLOCK_MONOTONIC)

_lwp_park(2) expects a realtime clock, and it gets passed a monotonic
one.  Since monotonic  real, it never sleeps. This patch adjusts
the monotonic clock to be a real one before it passes is to
_lwp_park(2). This is the minimal hacky fix and it will be fixed
properly in _lwp_park(2) in the future.

XXX: pullup to 6.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/lib/libpthread/pthread_cond.c

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



CVS commit: src/tests/lib/libpthread

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 18:50:02 UTC 2013

Modified Files:
src/tests/lib/libpthread: Makefile
Added Files:
src/tests/lib/libpthread: t_condwait.c

Log Message:
Add pthread_cond_timedwait(3) test from PR/47703


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libpthread/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libpthread/t_condwait.c

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



CVS commit: src/distrib/sets/lists

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 18:51:28 UTC 2013

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
new test


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.531 -r1.532 src/distrib/sets/lists/tests/mi

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



CVS commit: src/sys/external/bsd/ipf/netinet

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 20:14:19 UTC 2013

Modified Files:
src/sys/external/bsd/ipf/netinet: ip_log.c

Log Message:
Destroying the mutex once is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/ipf/netinet/ip_log.c

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



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

2013-03-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 29 00:44:29 UTC 2013

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

Log Message:
Pull up following revision(s) (requested by tls in ticket #859):
sys/kern/subr_cprng.c: revision 1.16
Re-fix 'fix' for SA-2013-003.  Because the original fix evaluated a flag
backwards, in low-entropy conditions there was a time interval in which
/dev/urandom could still output bits on an unacceptably short key.  Output
from /dev/random was *NOT* impacted.
Eliminate the flag in question -- it's safest to always fill the requested
key buffer with output from the entropy-pool, even if we let the caller
know we couldn't provide bytes with the full entropy it requested.
Advisory will be updated soon with a full worst-case analysis of the
/dev/urandom output path in the presence of either variant of the
SA-2013-003 bug.  Fortunately, because a large amount of other input
is mixed in before users can obtain any output, it doesn't look as dangerous
in practice as I'd feared it might be.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.7 -r1.5.2.8 src/sys/kern/subr_cprng.c

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



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

2013-03-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 29 00:46:59 UTC 2013

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

Log Message:
Pull up following revision(s) (requested by tls in ticket #859):
sys/kern/subr_cprng.c: revision 1.16
Re-fix 'fix' for SA-2013-003.  Because the original fix evaluated a flag
backwards, in low-entropy conditions there was a time interval in which
/dev/urandom could still output bits on an unacceptably short key.  Output
from /dev/random was *NOT* impacted.
Eliminate the flag in question -- it's safest to always fill the requested
key buffer with output from the entropy-pool, even if we let the caller
know we couldn't provide bytes with the full entropy it requested.
Advisory will be updated soon with a full worst-case analysis of the
/dev/urandom output path in the presence of either variant of the
SA-2013-003 bug.  Fortunately, because a large amount of other input
is mixed in before users can obtain any output, it doesn't look as dangerous
in practice as I'd feared it might be.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.3.4.1 -r1.5.2.3.4.2 src/sys/kern/subr_cprng.c

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



CVS commit: [netbsd-6] src/doc

2013-03-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 29 00:50:33 UTC 2013

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

Log Message:
ticket #859


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

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



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

2013-03-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 29 00:52:24 UTC 2013

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

Log Message:
ticket #859


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

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



CVS commit: src/sys/compat/netbsd32

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:04:31 UTC 2013

Modified Files:
src/sys/compat/netbsd32: files.netbsd32 netbsd32_compat_50.c
netbsd32_lwp.c syscalls.conf syscalls.master

Log Message:
compat glue for new lwp_park


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/files.netbsd32
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/netbsd32/netbsd32_lwp.c
cvs rdiff -u -r1.11 -r1.12 src/sys/compat/netbsd32/syscalls.conf
cvs rdiff -u -r1.96 -r1.97 src/sys/compat/netbsd32/syscalls.master

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



CVS commit: src/sys/kern

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:08:17 UTC 2013

Modified Files:
src/sys/kern: kern_time.c subr_time.c sys_lwp.c sys_mqueue.c
syscalls.master uipc_sem.c

Log Message:
Centralize the computation of struct timespec to the int timo.
Make lwp_park take the regular arguments for specifying what kind
of timeout we supply like clock_nanosleep(), namely clockid_t and flags.


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/sys/kern/kern_time.c
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/subr_time.c
cvs rdiff -u -r1.55 -r1.56 src/sys/kern/sys_lwp.c
cvs rdiff -u -r1.34 -r1.35 src/sys/kern/sys_mqueue.c
cvs rdiff -u -r1.261 -r1.262 src/sys/kern/syscalls.master
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/uipc_sem.c

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



CVS commit: src/sys/sys

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:09:45 UTC 2013

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

Log Message:
prototype adjustments for lwp_park, welcome to 6.99.19


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/sys/lwp.h
cvs rdiff -u -r1.427 -r1.428 src/sys/sys/param.h
cvs rdiff -u -r1.32 -r1.33 src/sys/sys/timevar.h

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



CVS commit: src/sys/kern

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:10:13 UTC 2013

Modified Files:
src/sys/kern: init_sysent.c syscalls.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.261 -r1.262 src/sys/kern/syscalls.c

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



CVS commit: src/sys/sys

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:10:23 UTC 2013

Modified Files:
src/sys/sys: syscall.h syscallargs.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/sys/sys/syscall.h
cvs rdiff -u -r1.240 -r1.241 src/sys/sys/syscallargs.h

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



CVS commit: src/sys/compat/netbsd32

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:13:54 UTC 2013

Added Files:
src/sys/compat/netbsd32: netbsd32_compat_60.c

Log Message:
lwp park glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/compat/netbsd32/netbsd32_compat_60.c

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



CVS commit: src/sys/compat/netbsd32

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:14:10 UTC 2013

Modified Files:
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.103 -r1.104 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c

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



CVS commit: src/sys/rump/include/rump

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 01:51:25 UTC 2013

Modified Files:
src/sys/rump/include/rump: rump_syscalls.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/rump/include/rump/rump_syscalls.h

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



CVS commit: src/lib/libc/compat

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:09:58 UTC 2013

Modified Files:
src/lib/libc/compat/include: lwp.h
src/lib/libc/compat/sys: Makefile.inc
Added Files:
src/lib/libc/compat/sys: compat___lwp_park50.c

Log Message:
Compat glue for lwp park, but does not use the new syscall yet.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/include/lwp.h
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/compat/sys/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/sys/compat___lwp_park50.c

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



CVS commit: src/lib/libc/sys

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:10:53 UTC 2013

Modified Files:
src/lib/libc/sys: Makefile.inc

Log Message:
no need for __lwp_park50.S here and we don't provide __lwp_park60.S so that
it does not get accidentally used.


To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 src/lib/libc/sys/Makefile.inc

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



CVS commit: src/sys/net80211

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:20:17 UTC 2013

Modified Files:
src/sys/net80211: ieee80211_node.c

Log Message:
trailing blanks police.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/net80211/ieee80211_node.c

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



CVS commit: src/sys/net80211

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:26:45 UTC 2013

Modified Files:
src/sys/net80211: ieee80211_node.c

Log Message:
Don't hold 2 locks at the same time, causes lockdebug panic. Triggered by
running usb wifi interfaces as access points. What we do instead is check
the generation number upon restart, and if it changed we give up.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/net80211/ieee80211_node.c

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



CVS commit: src/sys/net80211

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:30:18 UTC 2013

Modified Files:
src/sys/net80211: ieee80211_node.c

Log Message:
one we is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/net80211/ieee80211_node.c

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



CVS commit: src/tests/lib/libpthread

2013-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 02:32:38 UTC 2013

Modified Files:
src/tests/lib/libpthread: t_condwait.c

Log Message:
fix printf formats


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libpthread/t_condwait.c

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



CVS commit: [agc-symver] src/lib/libutil

2013-03-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Fri Mar 29 03:31:42 UTC 2013

Added Files:
src/lib/libutil [agc-symver]: Version.map

Log Message:
Add symbol versioning info for libutil


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/lib/libutil/Version.map

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



CVS commit: [agc-symver] src/crypto/external/bsd/openssl/lib/libcrypto

2013-03-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Fri Mar 29 05:48:45 UTC 2013

Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto [agc-symver]: Version.map

Log Message:
Add versioning info for libcrypto


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/Version.map

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