CVS commit: src/sys/rump/librump/rumpvfs

2009-12-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec 17 12:49:22 UTC 2009

Modified Files:
src/sys/rump/librump/rumpvfs: Makefile.rumpvfs

Log Message:
Add devnull.c to sources (forgot to do it yesterday).
Thanks to gson for the ping.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs

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

Modified files:

Index: src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
diff -u src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.22 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.23
--- src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.22	Wed Dec  9 15:38:07 2009
+++ src/sys/rump/librump/rumpvfs/Makefile.rumpvfs	Thu Dec 17 12:49:22 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpvfs,v 1.22 2009/12/09 15:38:07 pooka Exp $
+#	$NetBSD: Makefile.rumpvfs,v 1.23 2009/12/17 12:49:22 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -15,7 +15,7 @@
 #
 # Source modules, first the ones specifically implemented for librump.
 # 
-SRCS=	rump_vfs.c devnodes.c rumpblk.c rumpfs.c vm_vfs.c
+SRCS=	rump_vfs.c devnodes.c devnull.c rumpblk.c rumpfs.c vm_vfs.c
 
 SRCS+=	fstrans_stub.c vfsops_stub.c
 



CVS commit: src/usr.sbin/puffs/rump_tmpfs

2009-12-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec 17 14:06:38 UTC 2009

Modified Files:
src/usr.sbin/puffs/rump_tmpfs: rump_tmpfs.c

Log Message:
add ranty rant about data storage in tmpfs


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_tmpfs/rump_tmpfs.c

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

Modified files:

Index: src/usr.sbin/puffs/rump_tmpfs/rump_tmpfs.c
diff -u src/usr.sbin/puffs/rump_tmpfs/rump_tmpfs.c:1.3 src/usr.sbin/puffs/rump_tmpfs/rump_tmpfs.c:1.4
--- src/usr.sbin/puffs/rump_tmpfs/rump_tmpfs.c:1.3	Thu Sep  4 15:34:56 2008
+++ src/usr.sbin/puffs/rump_tmpfs/rump_tmpfs.c	Thu Dec 17 14:06:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_tmpfs.c,v 1.3 2008/09/04 15:34:56 pooka Exp $	*/
+/*	$NetBSD: rump_tmpfs.c,v 1.4 2009/12/17 14:06:38 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -39,6 +39,17 @@
 
 #include mount_tmpfs.h
 
+/*
+ * tmpfs has a slight issue with file content storage.  Since it
+ * stores data in memory, we will end up using 2x the RAM for
+ * storage if we cache in puffs vfs.  If we don't, we need to take
+ * the slow path from the kernel to the file server every time the
+ * file is accessed.  It's either suck or suck.  However, rump_tmpfs
+ * will not be used in real life, so this is hardly a release-stopping
+ * issue of catastrophic proportions.  For now we opt for un-double
+ * storage (PUFFS_KFLAG_NOCACHE_PAGE).
+ */
+
 int
 main(int argc, char *argv[])
 {



CVS commit: src/sbin/fdisk

2009-12-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec 17 14:27:49 UTC 2009

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

Log Message:
Use implicit -F for regular files, much like disklabel(8).


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sbin/fdisk/fdisk.8
cvs rdiff -u -r1.125 -r1.126 src/sbin/fdisk/fdisk.c

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

Modified files:

Index: src/sbin/fdisk/fdisk.8
diff -u src/sbin/fdisk/fdisk.8:1.67 src/sbin/fdisk/fdisk.8:1.68
--- src/sbin/fdisk/fdisk.8:1.67	Sat Dec  5 16:29:11 2009
+++ src/sbin/fdisk/fdisk.8	Thu Dec 17 14:27:49 2009
@@ -1,6 +1,6 @@
-.\	$NetBSD: fdisk.8,v 1.67 2009/12/05 16:29:11 pooka Exp $
+.\	$NetBSD: fdisk.8,v 1.68 2009/12/17 14:27:49 pooka Exp $
 .\
-.Dd November 28, 2009
+.Dd December 17, 2009
 .Dt FDISK 8
 .Os
 .Sh NAME
@@ -242,6 +242,11 @@
 will count the 512-byte sectors in
 .Ar device
 and produce a fake geometry.
+If
+.Ar device
+is a regular file,
+.Fl F
+will be used implicitly.
 .It Fl i
 Explicitly request initialisation of the master boot code
 (similar to what

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.125 src/sbin/fdisk/fdisk.c:1.126
--- src/sbin/fdisk/fdisk.c:1.125	Wed Nov  4 22:25:56 2009
+++ src/sbin/fdisk/fdisk.c	Thu Dec 17 14:27:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.125 2009/11/04 22:25:56 dsl Exp $ */
+/*	$NetBSD: fdisk.c,v 1.126 2009/12/17 14:27:49 pooka Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: fdisk.c,v 1.125 2009/11/04 22:25:56 dsl Exp $);
+__RCSID($NetBSD: fdisk.c,v 1.126 2009/12/17 14:27:49 pooka Exp $);
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -438,6 +438,9 @@
 		initvar_disk(disk);
 	}
 
+	if (!F_flag  stat(disk, sb) == 0  S_ISREG(sb.st_mode))
+		F_flag = 1;
+
 	if (open_disk(B_flag || a_flag || i_flag || u_flag)  0)
 		exit(1);
 



CVS commit: src/tools/gcc

2009-12-17 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Dec 17 15:01:33 UTC 2009

Modified Files:
src/tools/gcc: mknative-gcc

Log Message:
get_libgcc_new: Teach multilib.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.43 src/tools/gcc/mknative-gcc:1.44
--- src/tools/gcc/mknative-gcc:1.43	Tue Dec  1 04:59:24 2009
+++ src/tools/gcc/mknative-gcc	Thu Dec 17 15:01:33 2009
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.43 2009/12/01 04:59:24 uebayasi Exp $
+#	$NetBSD: mknative-gcc,v 1.44 2009/12/17 15:01:33 uebayasi Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/gnu/dist/gcc.
@@ -10,6 +10,7 @@
 _TMPDIR=$2
 _TOP=$3
 _PLATFORM=$4
+_ABI=$5
 _VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ 	]*,,'`
 _GNU_DIST=`cd ${_VPATH}; pwd`
 
@@ -89,11 +90,12 @@
 	local _lib=$1
 	local _lib_prefix=${_lib%.*}
 	local _lib_suffix=${_lib#*.}
+	local _abi=${2:-'\.'}
 
 	cat build/gcc/libgcc.mk | \
-	grep -v '/32/' | \
+	grep '/'${_abi}'/' | \
 	sed -ne '
-		/^\.\/'${_lib_prefix}'\.'${_lib_suffix}': .*\.o$/ {
+		/^\'${_abi}'\/'${_lib_prefix}'\.'${_lib_suffix}': .*\.o$/ {
 			s,^.*/,,
 			s,\.o$,,
 			p
@@ -102,17 +104,21 @@
 }
 
 get_libgcc_list_objs_libs () {
+	local _abi=${1:-'\.'}
+
 	cat build/gcc/libgcc.mk | \
-	grep -v '/32/' | \
-	egrep '^\.\/(libgcc_s\.so|libgcc\.a|libgcc_eh\.a|libgcov\.a): (libgcc_s|libgcc|libgcc_eh|libgcov)\/.*\.o$' | \
+	grep '/'${_abi}'/' | \
+	egrep '^\'${_abi}'\/(libgcc_s\.so|libgcc\.a|libgcc_eh\.a|libgcov\.a): (libgcc_s|libgcc|libgcc_eh|libgcov)\/.*\.o$' | \
 	sed -e '
-		s,^\.\/,,
+		s,^'${_abi}'\/,,
 		s,: .*/,	,
 		s,^\(.*\)	\(.*\)$,\2	\1,
 	' | sort
 }
 
 get_libgcc_list_objs_srcs () {
+	local _abi=${1:-'\.'}	# XXX not used
+
 	if [ -e $_TOP/${libgcc_db_funcs}.S ]; then
 		cut -f1 $_TOP/${libgcc_db_objs_libs} | sed -e 's,\.o$,,' | \
 		comm -23 /dev/stdin $_TOP/${libgcc_db_funcs}.S | \
@@ -128,8 +134,10 @@
 }
 
 get_libgcc_list_objs_tmplsrcs () {
+	local _abi=${1:-'\.'}
+
 	grep 'GCC_FOR_TARGET.*\.o$' build/gcc/libgcc.mk | \
-	grep -v '/32/' | \
+	grep '/'${_abi}'/' | \
 	sed -ne '
 		s,^.* -c \([^ ]*\).* -o .*/\([^ ]*\.o\)$,\2	\1,
 		# basename
@@ -141,9 +149,10 @@
 
 get_libgcc_list_objs_xflags () {
 	local _flags=$1
+	local _abi=${2:-'\.'}
 
 	grep 'GCC_FOR_TARGET.*\.o$' build/gcc/libgcc.mk | \
-	grep -v '/32/' | \
+	grep '/'${_abi}'/' | \
 	sed -n '
 		x
 	:loop
@@ -157,15 +166,16 @@
 }
 
 get_libgcc_list_objs_cppflags () {
-	get_libgcc_list_objs_xflags D
+	get_libgcc_list_objs_xflags D $1
 }
 
 get_libgcc_list_objs_copts () {
-	get_libgcc_list_objs_xflags fmx
+	get_libgcc_list_objs_xflags fmx $1
 }
 
 get_libgcc_list_tmplsrcs () {
 	local _lib=$1
+	local _abi=$2	# XXX not used
 	local _tmplallsrcs=$( mktemp /tmp/mknative-gcc._tmplallsrcs.XX )
 
 	touch $_TOP/${libgcc_db_tmplsrcs}.tmplsrcs.${_lib%.*}
@@ -197,6 +207,8 @@
 }
 
 get_libgcc_new_analyze () {
+	local _abi=$1
+
 	mkdir -p $_TOP/${_machine_arch_subdir}
 
 	touch $_TOP/${libgcc_db_funcs}.S
@@ -205,18 +217,18 @@
 
 	for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
 		touch $_TOP/${libgcc_db_funcs}.${_lib%.*}
-		get_libgcc_list_funcs_lib $_lib | \
+		get_libgcc_list_funcs_lib $_lib $_abi | \
 		writefile ${libgcc_db_funcs}.${_lib%.*}
 	done
 
-	get_libgcc_list_objs_libs | writefile ${libgcc_db_objs_libs}
-	get_libgcc_list_objs_srcs | writefile ${libgcc_db_objs_srcs}
-	get_libgcc_list_objs_tmplsrcs | writefile ${libgcc_db_objs_tmplsrcs}
-	get_libgcc_list_objs_cppflags | writefile ${libgcc_db_objs_cppflags}
-	get_libgcc_list_objs_copts | writefile ${libgcc_db_objs_copts}
+	get_libgcc_list_objs_libs $_abi | writefile ${libgcc_db_objs_libs}
+	get_libgcc_list_objs_srcs $_abi | writefile ${libgcc_db_objs_srcs}
+	get_libgcc_list_objs_tmplsrcs $_abi | writefile ${libgcc_db_objs_tmplsrcs}
+	get_libgcc_list_objs_cppflags $_abi | writefile ${libgcc_db_objs_cppflags}
+	get_libgcc_list_objs_copts $_abi | writefile ${libgcc_db_objs_copts}
 
 	for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
-		get_libgcc_list_tmplsrcs $_lib
+		get_libgcc_list_tmplsrcs $_lib $_abi
 	done
 }
 
@@ -299,6 +311,8 @@
 }
 
 get_libgcc_new_generate () {
+	local _abi=$1
+
 	for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
 		for _tmpl in tmplsrcs tmplfpsrcs tmplasmsrcs; do
 			eval get_libgcc_gen_tmplsrcs_${_tmpl} $_lib | \
@@ -319,10 +333,11 @@
 
 get_libgcc_new () {
 	_subdir=$1
+	_abi=$2
 
 	# List of generated files.
 
-	_machine_arch_subdir=gnu/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH
+	_machine_arch_subdir=gnu/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH/$_abi
 
 	libgcc_db_funcs=${_machine_arch_subdir}/funcs
 	libgcc_db_tmplsrcs=${_machine_arch_subdir}/tmplsrcs
@@ -332,7 +347,7 @@
 	

CVS commit: src/lib/libc/stdio

2009-12-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 17 15:19:49 UTC 2009

Modified Files:
src/lib/libc/stdio: vsnprintf_ss.c

Log Message:
PR/42466: Yasuoka Masahiko: vsnprintf_ss() causes infinite loop


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/stdio/vsnprintf_ss.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/stdio/vsnprintf_ss.c
diff -u src/lib/libc/stdio/vsnprintf_ss.c:1.8 src/lib/libc/stdio/vsnprintf_ss.c:1.9
--- src/lib/libc/stdio/vsnprintf_ss.c:1.8	Sun Oct 25 16:44:13 2009
+++ src/lib/libc/stdio/vsnprintf_ss.c	Thu Dec 17 10:19:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vsnprintf_ss.c,v 1.8 2009/10/25 20:44:13 christos Exp $	*/
+/*	$NetBSD: vsnprintf_ss.c,v 1.9 2009/12/17 15:19:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)vsnprintf.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: vsnprintf_ss.c,v 1.8 2009/10/25 20:44:13 christos Exp $);
+__RCSID($NetBSD: vsnprintf_ss.c,v 1.9 2009/12/17 15:19:48 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -164,7 +164,8 @@
 	for (;;) {
 		while (*fmt != '%'  *fmt) {
 			ret++;
-			PUTCHAR(*fmt++);
+			PUTCHAR(*fmt);
+			fmt++;
 		}
 		if (*fmt == 0)
 			goto done;



CVS commit: src/sys/arch/cobalt

2009-12-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 17 15:29:47 UTC 2009

Modified Files:
src/sys/arch/cobalt/cobalt: machdep.c
src/sys/arch/cobalt/conf: std.cobalt
src/sys/arch/cobalt/include: autoconf.h bootinfo.h
Added Files:
src/sys/arch/cobalt/conf: GENERIC32 GENERIC64 INSTALL32 INSTALL64
RAMDISK32 RAMDISK64
src/sys/arch/cobalt/include: netbsd32_machdep.h

Log Message:
Enable mips64 support for cobalt.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/cobalt/cobalt/machdep.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/cobalt/conf/GENERIC32 \
src/sys/arch/cobalt/conf/GENERIC64 src/sys/arch/cobalt/conf/INSTALL32 \
src/sys/arch/cobalt/conf/INSTALL64 src/sys/arch/cobalt/conf/RAMDISK32 \
src/sys/arch/cobalt/conf/RAMDISK64
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/cobalt/conf/std.cobalt
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/cobalt/include/autoconf.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/cobalt/include/bootinfo.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/cobalt/include/netbsd32_machdep.h

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

Modified files:

Index: src/sys/arch/cobalt/cobalt/machdep.c
diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.106 src/sys/arch/cobalt/cobalt/machdep.c:1.107
--- src/sys/arch/cobalt/cobalt/machdep.c:1.106	Wed Dec 16 19:01:24 2009
+++ src/sys/arch/cobalt/cobalt/machdep.c	Thu Dec 17 15:29:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.106 2009/12/16 19:01:24 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $	*/
 
 /*-
  * Copyright (c) 2006 Izumi Tsutsui.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.106 2009/12/16 19:01:24 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -126,7 +126,7 @@
 phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];
 int mem_cluster_cnt;
 
-void	mach_init(unsigned int, u_int, char*);
+void	mach_init(unsigned int, u_int, int32_t);
 void	decode_bootstring(void);
 static char *strtok_light(char *, const char);
 static u_int read_board_id(void);
@@ -143,8 +143,10 @@
  * Do all the stuff that locore normally does before calling main().
  */
 void
-mach_init(unsigned int memsize, u_int bim, char *bip)
+mach_init(unsigned int memsize32, u_int bim, int32_t bip32)
 {
+	size_t memsize = memsize32;
+	char *bip = (void *)(intptr_t)bip32;
 	char *kernend;
 	u_long first, last;
 	extern char edata[], end[];
@@ -212,8 +214,8 @@
 	/* Load symbol table if present */
 	if (bi_syms != NULL) {
 		nsym = bi_syms-nsym;
-		ssym = (void *)bi_syms-ssym;
-		esym = (void *)bi_syms-esym;
+		ssym = (void *)(intptr_t)bi_syms-ssym;
+		esym = (void *)(intptr_t)bi_syms-esym;
 		kernend = (void *)mips_round_page(esym);
 	}
 #endif
@@ -506,7 +508,7 @@
 
 	do {
 		bt = (struct btinfo_common *)help;
-		printf(Type %d @0x%x\n, bt-type, (u_int)bt);
+		printf(Type %d @%p\n, bt-type, (void *)(intptr_t)bt);
 		if (bt-type == type)
 			return (void *)help;
 		help += bt-next;

Index: src/sys/arch/cobalt/conf/std.cobalt
diff -u src/sys/arch/cobalt/conf/std.cobalt:1.13 src/sys/arch/cobalt/conf/std.cobalt:1.14
--- src/sys/arch/cobalt/conf/std.cobalt:1.13	Tue Jul 18 12:51:01 2006
+++ src/sys/arch/cobalt/conf/std.cobalt	Thu Dec 17 15:29:47 2009
@@ -1,8 +1,8 @@
-#	$NetBSD: std.cobalt,v 1.13 2006/07/18 12:51:01 tsutsui Exp $
+#	$NetBSD: std.cobalt,v 1.14 2009/12/17 15:29:47 matt Exp $
 
 machine cobalt mips
 include		conf/std	# MI standard options
-makeoptions	MACHINE_ARCH=mipsel
+#makeoptions	MACHINE_ARCH=mipsel
 
 options 	MIPS3
 options 	MIPS3_ENABLE_CLOCK_INTR

Index: src/sys/arch/cobalt/include/autoconf.h
diff -u src/sys/arch/cobalt/include/autoconf.h:1.4 src/sys/arch/cobalt/include/autoconf.h:1.5
--- src/sys/arch/cobalt/include/autoconf.h:1.4	Thu Mar 27 15:21:46 2008
+++ src/sys/arch/cobalt/include/autoconf.h	Thu Dec 17 15:29:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.h,v 1.4 2008/03/27 15:21:46 tsutsui Exp $	*/
+/*	$NetBSD: autoconf.h,v 1.5 2009/12/17 15:29:47 matt Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang.  All rights reserved.
@@ -28,8 +28,8 @@
 #include machine/bus.h
 
 struct mainbus_attach_args {
-	char		*ma_name;
-	unsigned long	ma_addr;
+	const char	*ma_name;
+	bus_addr_t	ma_addr;
 	bus_space_tag_t	ma_iot;
 	int		ma_level;
 	int		ma_irq;

Index: src/sys/arch/cobalt/include/bootinfo.h
diff -u src/sys/arch/cobalt/include/bootinfo.h:1.7 src/sys/arch/cobalt/include/bootinfo.h:1.8
--- src/sys/arch/cobalt/include/bootinfo.h:1.7	Sat Mar 14 14:45:58 2009
+++ src/sys/arch/cobalt/include/bootinfo.h	Thu Dec 17 15:29:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootinfo.h,v 1.7 2009/03/14 14:45:58 dsl Exp $	*/
+/*	$NetBSD: bootinfo.h,v 1.8 2009/12/17 15:29:47 matt Exp $	*/
 
 /*
  * Copyright (c) 1997, 2000-2004
@@ -33,8 +33,8 @@
 #define BOOTINFO_SIZE	1024
 
 struct 

CVS commit: src

2009-12-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 17 15:30:37 UTC 2009

Modified Files:
src: build.sh

Log Message:
Add cobalt64 alias and indicte cobalt can be mips64el too.


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.224 src/build.sh:1.225
--- src/build.sh:1.224	Mon Dec 14 01:11:02 2009
+++ src/build.sh	Thu Dec 17 15:30:37 2009
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.224 2009/12/14 01:11:02 matt Exp $
+#	$NetBSD: build.sh,v 1.225 2009/12/17 15:30:37 matt Exp $
 #
 # Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -351,7 +351,7 @@
 		MACHINE_ARCH=mipseb
 		;;
 
-	algor64|pmax64)
+	algor64|cobalt64|pmax64)
 		makewrappermachine=${MACHINE}
 		MACHINE=${MACHINE%64}
 		MACHINE_ARCH=mips64el
@@ -424,7 +424,7 @@
 		arches=arm armeb
 		;;
 
-	algor|pmax)
+	algor|cobalt|pmax)
 		arches=mipsel mips64el
 		;;
 
@@ -1352,7 +1352,7 @@
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.224 2009/12/14 01:11:02 matt Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.225 2009/12/17 15:30:37 matt Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: src/tools/gcc

2009-12-17 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Dec 17 15:48:14 UTC 2009

Modified Files:
src/tools/gcc: mknative-gcc

Log Message:
get_libgcc_new: Make previous work for digit only ABI names.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.44 src/tools/gcc/mknative-gcc:1.45
--- src/tools/gcc/mknative-gcc:1.44	Thu Dec 17 15:01:33 2009
+++ src/tools/gcc/mknative-gcc	Thu Dec 17 15:48:13 2009
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.44 2009/12/17 15:01:33 uebayasi Exp $
+#	$NetBSD: mknative-gcc,v 1.45 2009/12/17 15:48:13 uebayasi Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/gnu/dist/gcc.
@@ -95,7 +95,7 @@
 	cat build/gcc/libgcc.mk | \
 	grep '/'${_abi}'/' | \
 	sed -ne '
-		/^\'${_abi}'\/'${_lib_prefix}'\.'${_lib_suffix}': .*\.o$/ {
+		/^'${_abi}'\/'${_lib_prefix}'\.'${_lib_suffix}': .*\.o$/ {
 			s,^.*/,,
 			s,\.o$,,
 			p
@@ -108,7 +108,7 @@
 
 	cat build/gcc/libgcc.mk | \
 	grep '/'${_abi}'/' | \
-	egrep '^\'${_abi}'\/(libgcc_s\.so|libgcc\.a|libgcc_eh\.a|libgcov\.a): (libgcc_s|libgcc|libgcc_eh|libgcov)\/.*\.o$' | \
+	egrep '^'${_abi}'\/(libgcc_s\.so|libgcc\.a|libgcc_eh\.a|libgcov\.a): (libgcc_s|libgcc|libgcc_eh|libgcov)\/.*\.o$' | \
 	sed -e '
 		s,^'${_abi}'\/,,
 		s,: .*/,	,



CVS commit: src/crypto/external/bsd/openssh/dist

2009-12-17 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Dec 17 15:55:16 UTC 2009

Modified Files:
src/crypto/external/bsd/openssh/dist: ssh-agent.c

Log Message:
Preserve the existing value of an extern variable across the call to
process_sign_request2().


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssh/dist/ssh-agent.c

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/ssh-agent.c
diff -u src/crypto/external/bsd/openssh/dist/ssh-agent.c:1.2 src/crypto/external/bsd/openssh/dist/ssh-agent.c:1.3
--- src/crypto/external/bsd/openssh/dist/ssh-agent.c:1.2	Sun Jun  7 22:38:47 2009
+++ src/crypto/external/bsd/openssh/dist/ssh-agent.c	Thu Dec 17 15:55:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssh-agent.c,v 1.2 2009/06/07 22:38:47 christos Exp $	*/
+/*	$NetBSD: ssh-agent.c,v 1.3 2009/12/17 15:55:16 agc Exp $	*/
 /* $OpenBSD: ssh-agent.c,v 1.159 2008/06/28 14:05:15 djm Exp $ */
 /*
  * Author: Tatu Ylonen y...@cs.hut.fi
@@ -36,7 +36,7 @@
  */
 
 #include includes.h
-__RCSID($NetBSD: ssh-agent.c,v 1.2 2009/06/07 22:38:47 christos Exp $);
+__RCSID($NetBSD: ssh-agent.c,v 1.3 2009/12/17 15:55:16 agc Exp $);
 #include sys/types.h
 #include sys/time.h
 #include sys/queue.h
@@ -307,13 +307,13 @@
 	Buffer msg;
 	Key *key;
 
+	odatafellows = datafellows;
 	datafellows = 0;
 
 	blob = buffer_get_string(e-request, blen);
 	data = buffer_get_string(e-request, dlen);
 
 	flags = buffer_get_int(e-request);
-	odatafellows = datafellows;
 	if (flags  SSH_AGENT_OLD_SIGNATURE)
 		datafellows = SSH_BUG_SIGBLOB;
 



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

2009-12-17 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Dec 17 20:07:19 UTC 2009

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

Log Message:
Add udl(4).  Tested on LANTANK and LCD-8000U.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/landisk/conf/GENERIC

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

Modified files:

Index: src/sys/arch/landisk/conf/GENERIC
diff -u src/sys/arch/landisk/conf/GENERIC:1.21 src/sys/arch/landisk/conf/GENERIC:1.22
--- src/sys/arch/landisk/conf/GENERIC:1.21	Sat Dec  5 20:11:15 2009
+++ src/sys/arch/landisk/conf/GENERIC	Thu Dec 17 20:07:19 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.21 2009/12/05 20:11:15 pooka Exp $
+# $NetBSD: GENERIC,v 1.22 2009/12/17 20:07:19 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 
-#ident  GENERIC-$Revision: 1.21 $
+#ident  GENERIC-$Revision: 1.22 $
 
 maxusers	16		# estimated number of users
 
@@ -290,6 +290,10 @@
 ukbd*	at uhidev? reportid ?
 wskbd*	at ukbd? console ? mux 1
 
+# USB LCDs and USB-VGA adaptors
+udl*	at uhub? port ?		# DisplayLink DL-1x0/1x5
+wsdisplay* at udl?
+
 # USB serial adpater
 ucycom* at uhidev? reportid ?
 



CVS commit: src/sys/dev/ata

2009-12-17 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Dec 17 21:03:10 UTC 2009

Modified Files:
src/sys/dev/ata: wd.c wdvar.h

Log Message:
ATA sepcs changed the LBA48 boundary from 0xfff to 0xffe between
ATA6r1 and ATA6r3, which caused drives conform to ATA6r3 or later to
reject LBA28 commands at sector 0xfff.
Get the right idea from the LBA48 boundary from IDENTIFY words 60-61.
Remove the WD_QUIRK_FORCE_LBA48 quirk, associated tables entries and
autodetect code, it's not needed any more.
Based on patch sent to teck-kern by Christoph Badura, use of words 60-61
instead of a constant for the LBA48 boundary by me.


To generate a diff of this commit:
cvs rdiff -u -r1.379 -r1.380 src/sys/dev/ata/wd.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ata/wdvar.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/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.379 src/sys/dev/ata/wd.c:1.380
--- src/sys/dev/ata/wd.c:1.379	Mon Oct 19 18:41:12 2009
+++ src/sys/dev/ata/wd.c	Thu Dec 17 21:03:10 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: wd.c,v 1.379 2009/10/19 18:41:12 bouyer Exp $ */
+/*	$NetBSD: wd.c,v 1.380 2009/12/17 21:03:10 bouyer Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wd.c,v 1.379 2009/10/19 18:41:12 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: wd.c,v 1.380 2009/12/17 21:03:10 bouyer Exp $);
 
 #include opt_ata.h
 
@@ -94,8 +94,6 @@
 
 #include prop/proplib.h
 
-#define	LBA48_THRESHOLD		(0xfff)	/* 128GB / DEV_BSIZE */
-
 #define	WDIORETRIES_SINGLE 4	/* number of retries before single-sector */
 #define	WDIORETRIES	5	/* number of retries before giving up */
 #define	RECOVERYTIME hz/2	/* time to wait before retrying a cmd */
@@ -194,7 +192,6 @@
 #endif
 
 #define	WD_QUIRK_SPLIT_MOD15_WRITE	0x0001	/* must split certain writes */
-#define	WD_QUIRK_FORCE_LBA48		0x0002	/* must use LBA48 commands */
 
 #define	WD_QUIRK_FMT \20\1SPLIT_MOD15_WRITE\2FORCE_LBA48
 
@@ -222,31 +219,6 @@
 	  WD_QUIRK_SPLIT_MOD15_WRITE },
 	{ ST380023AS,
 	  WD_QUIRK_SPLIT_MOD15_WRITE },
-
-	/*
-	 * These seagate drives seems to have issue addressing sector 0xfff
-	 * (aka LBA48_THRESHOLD) in LBA mode. The workaround is to force
-	 * LBA48
-	 * Note that we can't just change the code to always use LBA48 for
-	 * sector 0xfff, because this would break valid and working
-	 * setups using LBA48 drives on non-LBA48-capable controllers
-	 * (and it's hard to get a list of such controllers)
-	 */
-	{ ST3160021A*,
-	  WD_QUIRK_FORCE_LBA48 },
-	{ ST3160811A*,
-	  WD_QUIRK_FORCE_LBA48 },
-	{ ST3160812A*,
-	  WD_QUIRK_FORCE_LBA48 },
-	{ ST3160023A*,
-	  WD_QUIRK_FORCE_LBA48 },
-	{ ST3160827A*,
-	  WD_QUIRK_FORCE_LBA48 },
-	/* Attempt to catch all seagate drives larger than 200GB */
-	{ ST3[2-9][0-9][0-9][0-9][0-9][0-9][A-Z]*,
-	  WD_QUIRK_FORCE_LBA48 },
-	{ ST3[1-9][0-9][0-9][0-9][0-9][0-9][0-9][A-Z]*,
-	  WD_QUIRK_FORCE_LBA48 },
 	{ NULL,
 	  0 }
 };
@@ -374,14 +346,17 @@
 		((u_int64_t) wd-sc_params.atap_max_lba[2]  32) |
 		((u_int64_t) wd-sc_params.atap_max_lba[1]  16) |
 		((u_int64_t) wd-sc_params.atap_max_lba[0]   0);
+		wd-sc_capacity28 =
+		(wd-sc_params.atap_capacity[1]  16) |
+		wd-sc_params.atap_capacity[0];
 	} else if ((wd-sc_flags  WDF_LBA) != 0) {
 		aprint_verbose( LBA addressing\n);
-		wd-sc_capacity =
-		((u_int64_t)wd-sc_params.atap_capacity[1]  16) |
+		wd-sc_capacity28 = wd-sc_capacity =
+		(wd-sc_params.atap_capacity[1]  16) |
 		wd-sc_params.atap_capacity[0];
 	} else {
 		aprint_verbose( chs addressing\n);
-		wd-sc_capacity =
+		wd-sc_capacity28 = wd-sc_capacity =
 		wd-sc_params.atap_cylinders *
 		wd-sc_params.atap_heads *
 		wd-sc_params.atap_sectors;
@@ -714,6 +689,8 @@
 	}
 
 	wd-sc_wdc_bio.blkno = bp-b_rawblkno;
+	wd-sc_wdc_bio.bcount = bp-b_bcount;
+	wd-sc_wdc_bio.databuf = bp-b_data;
 	wd-sc_wdc_bio.blkdone =0;
 	wd-sc_bp = bp;
 	/*
@@ -726,15 +703,14 @@
 	else
 		wd-sc_wdc_bio.flags = 0;
 	if (wd-sc_flags  WDF_LBA48 
-	(wd-sc_wdc_bio.blkno  LBA48_THRESHOLD ||
-	(wd-sc_quirks  WD_QUIRK_FORCE_LBA48) != 0))
+	(wd-sc_wdc_bio.blkno +
+	 wd-sc_wdc_bio.bcount / wd-sc_dk.dk_label-d_secsize) 
+	wd-sc_capacity28)
 		wd-sc_wdc_bio.flags |= ATA_LBA48;
 	if (wd-sc_flags  WDF_LBA)
 		wd-sc_wdc_bio.flags |= ATA_LBA;
 	if (bp-b_flags  B_READ)
 		wd-sc_wdc_bio.flags |= ATA_READ;
-	wd-sc_wdc_bio.bcount = bp-b_bcount;
-	wd-sc_wdc_bio.databuf = bp-b_data;
 	/* Instrumentation. */
 	disk_busy(wd-sc_dk);
 	switch (wd-atabus-ata_bio(wd-drvp, wd-sc_wdc_bio)) {
@@ -756,7 +732,6 @@
 	struct buf *bp = wd-sc_bp;
 	const char *errmsg;
 	int do_perror = 0;
-	int nblks;
 
 	ATADEBUG_PRINT((wddone %s\n, device_xname(wd-sc_dev)),
 	DEBUG_XFERS);
@@ -783,25 +758,6 @@
 			goto noerror;
 		errmsg = error;
 		do_perror = 1;
-		if ((wd-sc_wdc_bio.r_error  

CVS commit: src/sys/arch

2009-12-17 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Thu Dec 17 23:53:24 UTC 2009

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0 XEN3_DOMU
src/sys/arch/i386/conf: XEN3_DOM0 XEN3_DOMU

Log Message:
Compile in PaX support for Xen x86 kernels (dom0 and domU).

ok bou...@. Compiled and tested by me under i386. Only compile tested for
amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/conf/XEN3_DOMU
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/i386/conf/XEN3_DOM0
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/conf/XEN3_DOMU

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

Modified files:

Index: src/sys/arch/amd64/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.47 src/sys/arch/amd64/conf/XEN3_DOM0:1.48
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.47	Sat Dec  5 20:11:03 2009
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Thu Dec 17 23:53:24 2009
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.47 2009/12/05 20:11:03 pooka Exp $
+# $NetBSD: XEN3_DOM0,v 1.48 2009/12/17 23:53:24 jym Exp $
 
 include 	arch/amd64/conf/std.xen
 
@@ -808,3 +808,6 @@
 pseudo-device	xenevt
 pseudo-device	xvif
 pseudo-device	xbdback
+
+options 	PAX_MPROTECT=0		# PaX mprotect(2) restrictions
+options 	PAX_ASLR=0		# PaX Address Space Layout Randomization

Index: src/sys/arch/amd64/conf/XEN3_DOMU
diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.20 src/sys/arch/amd64/conf/XEN3_DOMU:1.21
--- src/sys/arch/amd64/conf/XEN3_DOMU:1.20	Sat Dec  5 20:11:03 2009
+++ src/sys/arch/amd64/conf/XEN3_DOMU	Thu Dec 17 23:53:24 2009
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOMU,v 1.20 2009/12/05 20:11:03 pooka Exp $
+# $NetBSD: XEN3_DOMU,v 1.21 2009/12/17 23:53:24 jym Exp $
 
 include 	arch/amd64/conf/std.xen
 
@@ -213,6 +213,9 @@
 #pseudo-device	pf			# PF packet filter
 #pseudo-device	pflog			# PF log if
 
+options 	PAX_MPROTECT=0		# PaX mprotect(2) restrictions
+options 	PAX_ASLR=0		# PaX Address Space Layout Randomization
+
 # miscellaneous pseudo-devices
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	rnd			# /dev/random and in-kernel generator

Index: src/sys/arch/i386/conf/XEN3_DOM0
diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.23 src/sys/arch/i386/conf/XEN3_DOM0:1.24
--- src/sys/arch/i386/conf/XEN3_DOM0:1.23	Sat Dec  5 20:11:15 2009
+++ src/sys/arch/i386/conf/XEN3_DOM0	Thu Dec 17 23:53:24 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: XEN3_DOM0,v 1.23 2009/12/05 20:11:15 pooka Exp $
+#	$NetBSD: XEN3_DOM0,v 1.24 2009/12/17 23:53:24 jym Exp $
 #
 #	XEN3_0: Xen 3.0 domain0 kernel
 
@@ -799,6 +799,9 @@
 pseudo-device	xvif
 pseudo-device	xbdback
 
+options 	PAX_MPROTECT=0		# PaX mprotect(2) restrictions
+options 	PAX_ASLR=0		# PaX Address Space Layout Randomization
+
 ppb*	at pci? dev ? function ?	# PCI-PCI bridges
 pci*	at ppb? bus ?
 

Index: src/sys/arch/i386/conf/XEN3_DOMU
diff -u src/sys/arch/i386/conf/XEN3_DOMU:1.19 src/sys/arch/i386/conf/XEN3_DOMU:1.20
--- src/sys/arch/i386/conf/XEN3_DOMU:1.19	Sat Dec  5 20:11:15 2009
+++ src/sys/arch/i386/conf/XEN3_DOMU	Thu Dec 17 23:53:24 2009
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOMU,v 1.19 2009/12/05 20:11:15 pooka Exp $
+# $NetBSD: XEN3_DOMU,v 1.20 2009/12/17 23:53:24 jym Exp $
 
 include 	arch/xen/conf/std.xen
 
@@ -247,6 +247,9 @@
 # userland interface to drivers, including autoconf and properties retrieval
 pseudo-device   drvctl
 
+options 	PAX_MPROTECT=0		# PaX mprotect(2) restrictions
+options 	PAX_ASLR=0		# PaX Address Space Layout Randomization
+
 # PCI pass-through support: 
 #xpci* at xenbus ?			#Xen3 PCI front end driver
 #pci* at xpci ?



CVS commit: src/sys/dev

2009-12-17 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Dec 18 00:40:24 UTC 2009

Modified Files:
src/sys/dev: ldvar.h

Log Message:
Use rnd.h and sys/rnd.h to ensure that struct ld_softc
is always of consistent layout.  Should prevent another
someone from spending a few hours trying to figure out why
their code crashes because they didn't realize they needed
to have rnd.h included already.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/ldvar.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/ldvar.h
diff -u src/sys/dev/ldvar.h:1.16 src/sys/dev/ldvar.h:1.17
--- src/sys/dev/ldvar.h:1.16	Thu May  7 08:03:23 2009
+++ src/sys/dev/ldvar.h	Fri Dec 18 00:40:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldvar.h,v 1.16 2009/05/07 08:03:23 cegger Exp $	*/
+/*	$NetBSD: ldvar.h,v 1.17 2009/12/18 00:40:24 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -32,8 +32,13 @@
 #ifndef	_DEV_LDVAR_H_
 #define	_DEV_LDVAR_H_
 
+#include rnd.h
+
 #include sys/mutex.h
 #include sys/device.h	/* for device_t */
+#if NRND  0
+#include sys/rnd.h
+#endif
 
 struct ld_softc {
 	device_t sc_dv;



CVS commit: src/etc/mtree

2009-12-17 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Dec 18 04:12:36 UTC 2009

Modified Files:
src/etc/mtree: Makefile

Log Message:
Make sure NetBSD.dist is updated when MKX11 is changed across update builds.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/mtree/Makefile

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

Modified files:

Index: src/etc/mtree/Makefile
diff -u src/etc/mtree/Makefile:1.13 src/etc/mtree/Makefile:1.14
--- src/etc/mtree/Makefile:1.13	Sun Dec 13 01:02:25 2009
+++ src/etc/mtree/Makefile	Fri Dec 18 04:12:36 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2009/12/13 01:02:25 mrg Exp $
+#	$NetBSD: Makefile,v 1.14 2009/12/18 04:12:36 uebayasi Exp $
 
 .include bsd.own.mk
 
@@ -18,7 +18,12 @@
 EXTRA_DIST_FILES+=	${.CURDIR}/NetBSD.dist.extsrc
 .endif
 
-NetBSD.dist:	NetBSD.dist.base ${EXTRA_DIST_FILES}
+NetBSD.dist:	NetBSD.dist.tmp
+	cmp -s NetBSD.dist.tmp NetBSD.dist || { \
+		echo Updating NetBSD.dist; \
+		mv NetBSD.dist.tmp NetBSD.dist; \
+	}
+NetBSD.dist.tmp::
 	${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES}  \
 	${.TARGET}
 



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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 05:27:56 UTC 2009

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

Log Message:
Pull up following revision(s) (requested by tron in ticket #1188):
sys/kern/sys_mqueue.c: revision 1.28 via patch
fix some security critical bugs:
-an invalid signal number passed to mq_notify(2) could crash the kernel
on delivery -- add a boundary check
-a user could set mq_maxmsg (the maximal number of messages in a queue)
to a huge value on mq_open(O_CREAT) and later use up all kernel
memory by mq_send(2) -- add a sysctl'able limit which defaults
to 16*mq_def_maxmsg
(mq_notify(2) should get some more checks, and SIGEV_* values other
than SIGEV_SIGNAL should be handled somehow, but this doesn't look
security critical)


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.1.2.3 -r1.12.4.1.2.4 src/sys/kern/sys_mqueue.c

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

Modified files:

Index: src/sys/kern/sys_mqueue.c
diff -u src/sys/kern/sys_mqueue.c:1.12.4.1.2.3 src/sys/kern/sys_mqueue.c:1.12.4.1.2.4
--- src/sys/kern/sys_mqueue.c:1.12.4.1.2.3	Tue Jul 21 00:21:21 2009
+++ src/sys/kern/sys_mqueue.c	Fri Dec 18 05:27:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_mqueue.c,v 1.12.4.1.2.3 2009/07/21 00:21:21 snj Exp $	*/
+/*	$NetBSD: sys_mqueue.c,v 1.12.4.1.2.4 2009/12/18 05:27:56 snj Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius rmind at NetBSD org
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_mqueue.c,v 1.12.4.1.2.3 2009/07/21 00:21:21 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_mqueue.c,v 1.12.4.1.2.4 2009/12/18 05:27:56 snj Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -77,6 +77,7 @@
 
 static u_int			mq_max_msgsize = 16 * MQ_DEF_MSGSIZE;
 static u_int			mq_def_maxmsg = 32;
+static u_int			mq_max_maxmsg = 16 * 32;
 
 static kmutex_t			mqlist_mtx;
 static pool_cache_t		mqmsg_cache;
@@ -330,7 +331,9 @@
 kmem_free(name, MQ_NAMELEN);
 return error;
 			}
-			if (attr.mq_maxmsg = 0 || attr.mq_msgsize = 0 ||
+			if (attr.mq_maxmsg = 0 ||
+			attr.mq_maxmsg  mq_max_maxmsg ||
+			attr.mq_msgsize = 0 ||
 			attr.mq_msgsize  mq_max_msgsize) {
 kmem_free(name, MQ_NAMELEN);
 return EINVAL;
@@ -688,7 +691,8 @@
 
 	/* Check for the notify */
 	if (mq-mq_attrib.mq_curmsgs == 0  mq-mq_notify_proc 
-	(mq-mq_attrib.mq_flags  MQ_RECEIVE) == 0) {
+	(mq-mq_attrib.mq_flags  MQ_RECEIVE) == 0 
+	mq-mq_sig_notify.sigev_notify == SIGEV_SIGNAL) {
 		/* Initialize the signal */
 		KSI_INIT(ksi);
 		ksi.ksi_signo = mq-mq_sig_notify.sigev_signo;
@@ -780,6 +784,9 @@
 		sizeof(struct sigevent));
 		if (error)
 			return error;
+		if (sig.sigev_notify == SIGEV_SIGNAL 
+		(sig.sigev_signo =0 || sig.sigev_signo = NSIG))
+			return EINVAL;
 	}
 
 	error = mqueue_get(SCARG(uap, mqdes), fp);
@@ -1002,6 +1009,12 @@
 		SYSCTL_DESCR(Default maximal message count),
 		NULL, 0, mq_def_maxmsg, 0,
 		CTL_CREATE, CTL_EOL);
+	sysctl_createv(clog, 0, node, NULL,
+		CTLFLAG_PERMANENT | CTLFLAG_READWRITE,
+		CTLTYPE_INT, mq_max_maxmsg,
+		SYSCTL_DESCR(Maximal allowed message count),
+		NULL, 0, mq_max_maxmsg, 0,
+		CTL_CREATE, CTL_EOL);
 }
 
 /*



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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 05:34:18 UTC 2009

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

Log Message:
Ticket 1188.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-5.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-5.0.2
diff -u src/doc/CHANGES-5.0.2:1.1.2.32 src/doc/CHANGES-5.0.2:1.1.2.33
--- src/doc/CHANGES-5.0.2:1.1.2.32	Thu Dec 10 23:13:45 2009
+++ src/doc/CHANGES-5.0.2	Fri Dec 18 05:34:18 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.2,v 1.1.2.32 2009/12/10 23:13:45 snj Exp $
+# $NetBSD: CHANGES-5.0.2,v 1.1.2.33 2009/12/18 05:34:18 snj Exp $
 
 A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2
 release:
@@ -879,3 +879,14 @@
 	array.
 	[drochner, ticket #1189]
 
+sys/kern/sys_mqueue.c1.28
+
+	Fix some security critical bugs:
+	- An invalid signal number passed to mq_notify(2) could crash the
+	  kernel on delivery -- add a boundary check
+	- A user could set mq_maxmsg (the maximal number of messages in a
+	  queue) to a huge value on mq_open(O_CREAT) and later use up all
+	  kernel memory by mq_send(2) -- add a sysctl'able limit which
+	  defaults to 16*mq_def_maxmsg
+	[tron, ticket #1188]
+



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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 05:45:29 UTC 2009

Modified Files:
src/sys/dev/pci [netbsd-5]: pcidevs

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #1175):
sys/dev/pci/pcidevs: revision 1.1003
Add Intel 3400 devices


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.6 -r1.962.4.7 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.962.4.6 src/sys/dev/pci/pcidevs:1.962.4.7
--- src/sys/dev/pci/pcidevs:1.962.4.6	Wed Oct 28 09:03:42 2009
+++ src/sys/dev/pci/pcidevs	Fri Dec 18 05:45:29 2009
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.962.4.6 2009/10/28 09:03:42 bouyer Exp $
+$NetBSD: pcidevs,v 1.962.4.7 2009/12/18 05:45:29 snj Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2601,6 +2601,40 @@
 product INTEL ICH10_SATA2_2x2	0x3a26	ICH10 SATA2(2port2)
 product INTEL ICH10_SMB1	0x3a30	ICH10 SMBus Serial Bus 1
 product INTEL ICH10_SMB2	0x3a60	ICH10 SMBus Serial Bus 2
+product INTEL 3400_LPC		0x3b14	3400 LPC
+product INTEL 3400_SATA_1	0x3b20	3400 SATA
+product INTEL 3400_SATA_2	0x3b21	3400 SATA
+product INTEL 3400_AHCI_1	0x3b22	3400 AHCI
+product INTEL 3400_AHCI_2	0x3b23	3400 AHCI
+product INTEL 3400_RAID_1	0x3b25	3400 RAID
+product INTEL 3400_SATA_3	0x3b26	3400 SATA
+product INTEL 3400_SATA_4	0x3b28	3400 SATA
+product INTEL 3400_AHCI_3	0x3b29	3400 AHCI
+product INTEL 3400_RAID_2	0x3b2c	3400 RAID
+product INTEL 3400_SATA_5	0x3b2d	3400 SATA
+product INTEL 3400_SATA_6	0x3b2e	3400 SATA
+product INTEL 3400_AHCI_4	0x3b2f	3400 AHCI
+product INTEL 3400_SMB		0x3b30	3400 SMBus
+product INTEL 3400_THERMAL	0x3b32	3400 Thermal
+product INTEL 3400_EHCI_1	0x3b34	3400 USB
+product INTEL 3400_UHCI_1	0x3b36	3400 USB
+product INTEL 3400_UHCI_2	0x3b37	3400 USB
+product INTEL 3400_UHCI_3	0x3b38	3400 USB
+product INTEL 3400_UHCI_4	0x3b39	3400 USB
+product INTEL 3400_UHCI_5	0x3b3a	3400 USB
+product INTEL 3400_UHCI_6	0x3b3b	3400 USB
+product INTEL 3400_EHCI_2	0x3b3c	3400 USB
+product INTEL 3400_UHCI_7	0x3b3e	3400 USB
+product INTEL 3400_UHCI_8	0x3b3f	3400 USB
+product INTEL 3400_PCIE_1	0x3b42	3400 PCIE
+product INTEL 3400_PCIE_2	0x3b44	3400 PCIE
+product INTEL 3400_PCIE_3	0x3b46	3400 PCIE
+product INTEL 3400_PCIE_4	0x3b48	3400 PCIE
+product INTEL 3400_PCIE_5	0x3b4a	3400 PCIE
+product INTEL 3400_PCIE_6	0x3b4c	3400 PCIE
+product INTEL 3400_PCIE_7	0x3b4e	3400 PCIE
+product INTEL 3400_PCIE_8	0x3b50	3400 PCIE
+product INTEL 3400_HDA		0x3b56	3400 HD Audio
 product INTEL PRO_WL_2200BG	0x4220	PRO/Wireless LAN 2200BG Mini-PCI Adapter
 product INTEL PRO_WL_2225BG	0x4221	PRO/Wireless LAN 2225BG Mini-PCI Adapter
 product INTEL PRO_WL_3945ABG_1	0x4222	PRO/Wireless LAN 3945ABG Mini-PCI Adapter



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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 05:46:45 UTC 2009

Modified Files:
src/sys/dev/pci [netbsd-5]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket 1175.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.6 -r1.963.4.7 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.6 -r1.962.4.7 src/sys/dev/pci/pcidevs_data.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/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.963.4.6 src/sys/dev/pci/pcidevs.h:1.963.4.7
--- src/sys/dev/pci/pcidevs.h:1.963.4.6	Wed Oct 28 09:06:09 2009
+++ src/sys/dev/pci/pcidevs.h	Fri Dec 18 05:46:41 2009
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.6 2009/10/28 09:06:09 bouyer Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.7 2009/12/18 05:46:41 snj Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.6 2009/10/28 09:03:42 bouyer Exp
+ *	NetBSD: pcidevs,v 1.962.4.7 2009/12/18 05:45:29 snj Exp
  */
 
 /*
@@ -2608,6 +2608,40 @@
 #define	PCI_PRODUCT_INTEL_ICH10_SATA2_2x2	0x3a26		/* ICH10 SATA2(2port2) */
 #define	PCI_PRODUCT_INTEL_ICH10_SMB1	0x3a30		/* ICH10 SMBus Serial Bus 1 */
 #define	PCI_PRODUCT_INTEL_ICH10_SMB2	0x3a60		/* ICH10 SMBus Serial Bus 2 */
+#define	PCI_PRODUCT_INTEL_3400_LPC	0x3b14		/* 3400 LPC */
+#define	PCI_PRODUCT_INTEL_3400_SATA_1	0x3b20		/* 3400 SATA */
+#define	PCI_PRODUCT_INTEL_3400_SATA_2	0x3b21		/* 3400 SATA */
+#define	PCI_PRODUCT_INTEL_3400_AHCI_1	0x3b22		/* 3400 AHCI */
+#define	PCI_PRODUCT_INTEL_3400_AHCI_2	0x3b23		/* 3400 AHCI */
+#define	PCI_PRODUCT_INTEL_3400_RAID_1	0x3b25		/* 3400 RAID */
+#define	PCI_PRODUCT_INTEL_3400_SATA_3	0x3b26		/* 3400 SATA */
+#define	PCI_PRODUCT_INTEL_3400_SATA_4	0x3b28		/* 3400 SATA */
+#define	PCI_PRODUCT_INTEL_3400_AHCI_3	0x3b29		/* 3400 AHCI */
+#define	PCI_PRODUCT_INTEL_3400_RAID_2	0x3b2c		/* 3400 RAID */
+#define	PCI_PRODUCT_INTEL_3400_SATA_5	0x3b2d		/* 3400 SATA */
+#define	PCI_PRODUCT_INTEL_3400_SATA_6	0x3b2e		/* 3400 SATA */
+#define	PCI_PRODUCT_INTEL_3400_AHCI_4	0x3b2f		/* 3400 AHCI */
+#define	PCI_PRODUCT_INTEL_3400_SMB	0x3b30		/* 3400 SMBus */
+#define	PCI_PRODUCT_INTEL_3400_THERMAL	0x3b32		/* 3400 Thermal */
+#define	PCI_PRODUCT_INTEL_3400_EHCI_1	0x3b34		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_UHCI_1	0x3b36		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_UHCI_2	0x3b37		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_UHCI_3	0x3b38		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_UHCI_4	0x3b39		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_UHCI_5	0x3b3a		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_UHCI_6	0x3b3b		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_EHCI_2	0x3b3c		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_UHCI_7	0x3b3e		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_UHCI_8	0x3b3f		/* 3400 USB */
+#define	PCI_PRODUCT_INTEL_3400_PCIE_1	0x3b42		/* 3400 PCIE */
+#define	PCI_PRODUCT_INTEL_3400_PCIE_2	0x3b44		/* 3400 PCIE */
+#define	PCI_PRODUCT_INTEL_3400_PCIE_3	0x3b46		/* 3400 PCIE */
+#define	PCI_PRODUCT_INTEL_3400_PCIE_4	0x3b48		/* 3400 PCIE */
+#define	PCI_PRODUCT_INTEL_3400_PCIE_5	0x3b4a		/* 3400 PCIE */
+#define	PCI_PRODUCT_INTEL_3400_PCIE_6	0x3b4c		/* 3400 PCIE */
+#define	PCI_PRODUCT_INTEL_3400_PCIE_7	0x3b4e		/* 3400 PCIE */
+#define	PCI_PRODUCT_INTEL_3400_PCIE_8	0x3b50		/* 3400 PCIE */
+#define	PCI_PRODUCT_INTEL_3400_HDA	0x3b56		/* 3400 HD Audio */
 #define	PCI_PRODUCT_INTEL_PRO_WL_2200BG	0x4220		/* PRO/Wireless LAN 2200BG Mini-PCI Adapter */
 #define	PCI_PRODUCT_INTEL_PRO_WL_2225BG	0x4221		/* PRO/Wireless LAN 2225BG Mini-PCI Adapter */
 #define	PCI_PRODUCT_INTEL_PRO_WL_3945ABG_1	0x4222		/* PRO/Wireless LAN 3945ABG Mini-PCI Adapter */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.6 src/sys/dev/pci/pcidevs_data.h:1.962.4.7
--- src/sys/dev/pci/pcidevs_data.h:1.962.4.6	Wed Oct 28 09:06:10 2009
+++ src/sys/dev/pci/pcidevs_data.h	Fri Dec 18 05:46:41 2009
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.962.4.6 2009/10/28 09:06:10 bouyer Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.962.4.7 2009/12/18 05:46:41 snj Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.6 2009/10/28 09:03:42 bouyer Exp
+ *	NetBSD: pcidevs,v 1.962.4.7 2009/12/18 05:45:29 snj Exp
  */
 
 /*
@@ -9260,6 +9260,142 @@
 	ICH10 SMBus Serial Bus 2,
 	},
 	{
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_3400_LPC,
+	3400 LPC,
+	},
+	{
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_3400_SATA_1,
+	3400 SATA,
+	},
+	{
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_3400_SATA_2,
+	3400 SATA,
+	},
+	{
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_3400_AHCI_1,
+	3400 AHCI,
+	},
+	{
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_3400_AHCI_2,
+	3400 AHCI,
+	},
+	{
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_3400_RAID_1,
+	3400 RAID,
+	},
+	{
+	PCI_VENDOR_INTEL, 

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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 05:48:07 UTC 2009

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

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #1175):
sys/dev/pci/piixide.c: revision 1.52
Add support for Intel 3400 SATA


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.47.4.1 src/sys/dev/pci/piixide.c

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

Modified files:

Index: src/sys/dev/pci/piixide.c
diff -u src/sys/dev/pci/piixide.c:1.47 src/sys/dev/pci/piixide.c:1.47.4.1
--- src/sys/dev/pci/piixide.c:1.47	Wed Oct  1 15:38:15 2008
+++ src/sys/dev/pci/piixide.c	Fri Dec 18 05:48:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: piixide.c,v 1.47 2008/10/01 15:38:15 christos Exp $	*/
+/*	$NetBSD: piixide.c,v 1.47.4.1 2009/12/18 05:48:07 snj Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: piixide.c,v 1.47 2008/10/01 15:38:15 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: piixide.c,v 1.47.4.1 2009/12/18 05:48:07 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -266,6 +266,48 @@
 	  Intel ICH10 Serial ATA 2 Controller 4x2,
 	  piixsata_chip_map,
 	},
+	{
+	  PCI_PRODUCT_INTEL_3400_SATA_1,
+	  0,
+	  Intel 3400 Serial ATA Controller,
+	  piixsata_chip_map,
+	},
+	{
+	  PCI_PRODUCT_INTEL_3400_SATA_1,
+	  0,
+	  Intel 3400 Serial ATA Controller,
+	  piixsata_chip_map,
+	},
+	{
+	  PCI_PRODUCT_INTEL_3400_SATA_2,
+	  0,
+	  Intel 3400 Serial ATA Controller,
+	  piixsata_chip_map,
+	},
+	{
+	  PCI_PRODUCT_INTEL_3400_SATA_3,
+	  0,
+	  Intel 3400 Serial ATA Controller,
+	  piixsata_chip_map,
+	},
+	{
+	  PCI_PRODUCT_INTEL_3400_SATA_4,
+	  0,
+	  Intel 3400 Serial ATA Controller,
+	  piixsata_chip_map,
+	},
+	{
+	  PCI_PRODUCT_INTEL_3400_SATA_5,
+	  0,
+	  Intel 3400 Serial ATA Controller,
+	  piixsata_chip_map,
+	},
+	{
+	  PCI_PRODUCT_INTEL_3400_SATA_6,
+	  0,
+	  Intel 3400 Serial ATA Controller,
+	  piixsata_chip_map,
+	},
 	{ 0,
 	  0,
 	  NULL,



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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 05:51:31 UTC 2009

Modified Files:
src/sys/arch/x86/x86 [netbsd-5]: coretemp.c

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #1180):
sys/arch/x86/x86/coretemp.c: revision 1.13
CPU model and CPU extended model cannot simply be summed; the extended model
differentiates different CPUs within a given model type (i.e. model 0xe with
extended model 0x1 is NOT the same as a model 0xf).
Modern Xeons do not support MSR_IA32_EXT_CONFIG, so use model and extended
model correctly to avoid it


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.4.1 src/sys/arch/x86/x86/coretemp.c

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

Modified files:

Index: src/sys/arch/x86/x86/coretemp.c
diff -u src/sys/arch/x86/x86/coretemp.c:1.11 src/sys/arch/x86/x86/coretemp.c:1.11.4.1
--- src/sys/arch/x86/x86/coretemp.c:1.11	Tue Sep 23 22:14:09 2008
+++ src/sys/arch/x86/x86/coretemp.c	Fri Dec 18 05:51:31 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: coretemp.c,v 1.11 2008/09/23 22:14:09 christos Exp $ */
+/* $NetBSD: coretemp.c,v 1.11.4.1 2009/12/18 05:51:31 snj Exp $ */
 
 /*-
  * Copyright (c) 2007 Juan Romero Pardines.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: coretemp.c,v 1.11 2008/09/23 22:14:09 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: coretemp.c,v 1.11.4.1 2009/12/18 05:51:31 snj Exp $);
 
 #include sys/param.h
 #include sys/kmem.h
@@ -66,7 +66,7 @@
 	struct coretemp_softc *sc;
 	uint32_t regs[4];
 	uint64_t msr;
-	int cpumodel, cpumask;
+	int cpumodel, cpuextmodel, cpumask;
 
 	/*
 	 * CPUID 0x06 returns 1 if the processor has on-die thermal
@@ -84,7 +84,7 @@
 	(int)device_unit(ci-ci_dev));
 	cpumodel = CPUID2MODEL(ci-ci_signature);
 	/* extended model */
-	cpumodel += CPUID2EXTMODEL(ci-ci_signature);
+	cpuextmodel = CPUID2EXTMODEL(ci-ci_signature);
 	cpumask = ci-ci_signature  15;
 
 	/*
@@ -110,9 +110,12 @@
 	 *
 	 * The if-clause for CPUs having the MSR_IA32_EXT_CONFIG was adapted
 	 * from the Linux coretemp driver.
+	 *
+	 * MSR_IA32_EXT_CONFIG is NOT safe on all CPUs
 	 */
 	sc-sc_tjmax = 100;
-	if ((cpumodel == 0xf  cpumask = 2) || cpumodel == 0xe) {
+	if ((cpumodel == 0xf  cpumask = 2) ||
+	(cpumodel == 0xe  cpuextmodel != 1)) {
 		msr = rdmsr(MSR_IA32_EXT_CONFIG);
 		if (msr  (1  30))
 			sc-sc_tjmax = 85;



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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 05:55:23 UTC 2009

Modified Files:
src/sys/arch/x86/x86 [netbsd-5]: intel_busclock.c

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #1181):
sys/arch/x86/x86/intel_busclock.c: revision 1.9
Interim workaround for modern Xeons that don't have the simplistic view of
bus speed and therefore do not support MSR_FSB_FREQ (e.g. X3400). In the
long-term, ACPI should be used for this (c.f. FreeBSD).


To generate a diff of this commit:
cvs rdiff -u -r1.5.10.2 -r1.5.10.3 src/sys/arch/x86/x86/intel_busclock.c

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

Modified files:

Index: src/sys/arch/x86/x86/intel_busclock.c
diff -u src/sys/arch/x86/x86/intel_busclock.c:1.5.10.2 src/sys/arch/x86/x86/intel_busclock.c:1.5.10.3
--- src/sys/arch/x86/x86/intel_busclock.c:1.5.10.2	Mon Oct  5 10:34:07 2009
+++ src/sys/arch/x86/x86/intel_busclock.c	Fri Dec 18 05:55:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: intel_busclock.c,v 1.5.10.2 2009/10/05 10:34:07 sborrill Exp $	*/
+/*	$NetBSD: intel_busclock.c,v 1.5.10.3 2009/12/18 05:55:23 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.5.10.2 2009/10/05 10:34:07 sborrill Exp $);
+__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.5.10.3 2009/12/18 05:55:23 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -126,6 +126,18 @@
 		}
 		break;
 	case 0xe: /* Core Duo/Solo */
+		/*
+		 * XXX
+		 * Newer CPUs will GP when attemping to access MSR_FSB_FREQ.
+		 * In the long-term, use ACPI instead of all this.
+		 */
+		switch (CPUID2EXTMODEL(ci-ci_signature)) {
+		case 0x1:
+			aprint_debug(%s: unable to determine bus speed,
+			device_xname(ci-ci_dev));
+			goto print_msr;
+		}
+		/* FALLTHROUGH */
 	case 0xf: /* Core Xeon */
 		msr = rdmsr(MSR_FSB_FREQ);
 		bus = (msr  0)  0x7;



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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 05:58:26 UTC 2009

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

Log Message:
Pull up following revision(s) (requested by pooka in ticket #1184):
sys/fs/puffs/puffs_vnops.c: revision 1.141 via patch
Push all information cached in the vnode to the file server before
issuing INACTIVE.  PR kern/42194.
Also, send setattr in fsync asynchronously if FSYNC_WAIT is not set.


To generate a diff of this commit:
cvs rdiff -u -r1.129.4.5 -r1.129.4.6 src/sys/fs/puffs/puffs_vnops.c

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

Modified files:

Index: src/sys/fs/puffs/puffs_vnops.c
diff -u src/sys/fs/puffs/puffs_vnops.c:1.129.4.5 src/sys/fs/puffs/puffs_vnops.c:1.129.4.6
--- src/sys/fs/puffs/puffs_vnops.c:1.129.4.5	Sat Nov 28 16:00:16 2009
+++ src/sys/fs/puffs/puffs_vnops.c	Fri Dec 18 05:58:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vnops.c,v 1.129.4.5 2009/11/28 16:00:16 bouyer Exp $	*/
+/*	$NetBSD: puffs_vnops.c,v 1.129.4.6 2009/12/18 05:58:26 snj Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.5 2009/11/28 16:00:16 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.6 2009/12/18 05:58:26 snj Exp $);
 
 #include sys/param.h
 #include sys/fstrans.h
@@ -402,6 +402,8 @@
 			   struct componentname *);
 static void callinactive(struct puffs_mount *, puffs_cookie_t, int);
 static void callreclaim(struct puffs_mount *, puffs_cookie_t);
+static int  flushvncache(struct vnode *, off_t, off_t, bool);
+
 
 #define PUFFS_ABORT_LOOKUP	1
 #define PUFFS_ABORT_CREATE	2
@@ -890,13 +892,15 @@
 	return error;
 }
 
+#define SETATTR_CHSIZE	0x01
+#define SETATTR_ASYNC	0x02
 static int
-dosetattr(struct vnode *vp, struct vattr *vap, kauth_cred_t cred, int chsize)
+dosetattr(struct vnode *vp, struct vattr *vap, kauth_cred_t cred, int flags)
 {
 	PUFFS_MSG_VARS(vn, setattr);
 	struct puffs_mount *pmp = MPTOPUFFSMP(vp-v_mount);
 	struct puffs_node *pn = vp-v_data;
-	int error;
+	int error = 0;
 
 	if ((vp-v_mount-mnt_flag  MNT_RDONLY) 
 	(vap-va_uid != (uid_t)VNOVAL || vap-va_gid != (gid_t)VNOVAL
@@ -935,16 +939,24 @@
 	puffs_credcvt(setattr_msg-pvnr_cred, cred);
 	puffs_msg_setinfo(park_setattr, PUFFSOP_VN,
 	PUFFS_VN_SETATTR, VPTOPNC(vp));
+	if (flags  SETATTR_ASYNC)
+		puffs_msg_setfaf(park_setattr);
 
-	PUFFS_MSG_ENQUEUEWAIT2(pmp, park_setattr, vp-v_data, NULL, error);
+	puffs_msg_enqueue(pmp, park_setattr);
+	if ((flags  SETATTR_ASYNC) == 0)
+		error = puffs_msg_wait2(pmp, park_setattr, vp-v_data, NULL);
 	PUFFS_MSG_RELEASE(setattr);
-	error = checkerr(pmp, error, __func__);
-	if (error)
-		return error;
+	if ((flags  SETATTR_ASYNC) == 0) {
+		error = checkerr(pmp, error, __func__);
+		if (error)
+			return error;
+	} else {
+		error = 0;
+	}
 
 	if (vap-va_size != VNOVAL) {
 		pn-pn_serversize = vap-va_size;
-		if (chsize)
+		if (flags  SETATTR_CHSIZE)
 			uvm_vnp_setsize(vp, vap-va_size);
 	}
 
@@ -961,7 +973,7 @@
 		kauth_cred_t a_cred;
 	} */ *ap = v;
 
-	return dosetattr(ap-a_vp, ap-a_vap, ap-a_cred, 1);
+	return dosetattr(ap-a_vp, ap-a_vap, ap-a_cred, SETATTR_CHSIZE);
 }
 
 static __inline int
@@ -1013,6 +1025,7 @@
 	pnode = vp-v_data;
 
 	if (doinact(pmp, pnode-pn_stat  PNODE_DOINACT)) {
+		flushvncache(vp, 0, 0, false);
 		PUFFS_MSG_ALLOC(vn, inactive);
 		puffs_msg_setinfo(park_inactive, PUFFSOP_VN,
 		PUFFS_VN_INACTIVE, VPTOPNC(vp));
@@ -1273,30 +1286,18 @@
 	}
 }
 
-int
-puffs_vnop_fsync(void *v)
+static int
+flushvncache(struct vnode *vp, off_t offlo, off_t offhi, bool wait)
 {
-	struct vop_fsync_args /* {
-		const struct vnodeop_desc *a_desc;
-		struct vnode *a_vp;
-		kauth_cred_t a_cred;
-		int a_flags;
-		off_t a_offlo;
-		off_t a_offhi;
-	} */ *ap = v;
-	PUFFS_MSG_VARS(vn, fsync);
-	struct vnode *vp = ap-a_vp;
-	struct puffs_mount *pmp = MPTOPUFFSMP(vp-v_mount);
-	struct puffs_node *pn;
+	struct puffs_node *pn = VPTOPP(vp);
 	struct vattr va;
-	int pflags, error, dofaf;
-
-	pn = VPTOPP(vp);
+	int pflags, error;
 
 	/* flush out information from our metacache, see vop_setattr */
 	if (pn-pn_stat  PNODE_METACACHE_MASK) {
 		vattr_null(va);
-		error = VOP_SETATTR(vp, va, FSCRED); 
+		error = dosetattr(vp, va, FSCRED,
+		SETATTR_CHSIZE | (wait ? 0 : SETATTR_ASYNC));
 		if (error)
 			return error;
 	}
@@ -1305,11 +1306,30 @@
 	 * flush pages to avoid being overly dirty
 	 */
 	pflags = PGO_CLEANIT;
-	if (ap-a_flags  FSYNC_WAIT)
+	if (wait)
 		pflags |= PGO_SYNCIO;
 	mutex_enter(vp-v_interlock);
-	error = VOP_PUTPAGES(vp, trunc_page(ap-a_offlo),
-	round_page(ap-a_offhi), pflags);
+	return VOP_PUTPAGES(vp, trunc_page(offlo), round_page(offhi), pflags);
+}
+
+int
+puffs_vnop_fsync(void *v)
+{
+	struct vop_fsync_args /* {
+		const struct vnodeop_desc *a_desc;
+		struct vnode *a_vp;
+		kauth_cred_t 

CVS commit: [netbsd-5] src/usr.bin/btkey

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 06:00:31 UTC 2009

Modified Files:
src/usr.bin/btkey [netbsd-5]: device.c

Log Message:
Pull up following revision(s) (requested by plunky in ticket #1192):
usr.bin/btkey/device.c: revision 1.3
if HCI commands fail (CommandComplete status != 0) then indicate
ENODEV Operation Not Supported by Device rather than random errno.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.12.1 src/usr.bin/btkey/device.c

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

Modified files:

Index: src/usr.bin/btkey/device.c
diff -u src/usr.bin/btkey/device.c:1.2 src/usr.bin/btkey/device.c:1.2.12.1
--- src/usr.bin/btkey/device.c:1.2	Sat Dec 15 16:03:30 2007
+++ src/usr.bin/btkey/device.c	Fri Dec 18 06:00:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: device.c,v 1.2 2007/12/15 16:03:30 perry Exp $	*/
+/*	$NetBSD: device.c,v 1.2.12.1 2009/12/18 06:00:31 snj Exp $	*/
 
 /*-
  * Copyright (c) 2007 Iain Hibbert
@@ -28,9 +28,10 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: device.c,v 1.2 2007/12/15 16:03:30 perry Exp $);
+__RCSID($NetBSD: device.c,v 1.2.12.1 2009/12/18 06:00:31 snj Exp $);
 
 #include bluetooth.h
+#include errno.h
 #include stdbool.h
 #include string.h
 #include unistd.h
@@ -134,8 +135,10 @@
 {
 	hci_read_stored_link_key_rp *rp = arg;
 
-	if (rp-status)
+	if (rp-status) {
+		errno = ENODEV;
 		return -1;
+	}
 
 	printf(\n);
 	printf(read %d keys (max %d)\n, rp-num_keys_read, rp-max_num_keys);
@@ -217,8 +220,10 @@
 {
 	hci_write_stored_link_key_rp *rp = arg;
 
-	if (rp-status || rp-num_keys_written != 1)
+	if (rp-status || rp-num_keys_written != 1) {
+		errno = ENODEV;
 		return -1;
+	}
 
 	return 1;
 }
@@ -245,8 +250,10 @@
 {
 	hci_delete_stored_link_key_rp *rp = arg;
 
-	if (rp-status || rp-num_keys_deleted != 1)
+	if (rp-status || rp-num_keys_deleted != 1) {
+		errno = ENODEV;
 		return -1;
+	}
 
 	return 1;
 }



CVS commit: [netbsd-5] src/usr.bin/btkey

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 06:01:38 UTC 2009

Modified Files:
src/usr.bin/btkey [netbsd-5]: btkey.c

Log Message:
Pull up following revision(s) (requested by plunky in ticket #1192):
usr.bin/btkey/btkey.c: revision 1.3
accept uppercase hex digits when parsing a provided key


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.4.1 src/usr.bin/btkey/btkey.c

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

Modified files:

Index: src/usr.bin/btkey/btkey.c
diff -u src/usr.bin/btkey/btkey.c:1.2 src/usr.bin/btkey/btkey.c:1.2.4.1
--- src/usr.bin/btkey/btkey.c:1.2	Mon Jul 21 14:19:21 2008
+++ src/usr.bin/btkey/btkey.c	Fri Dec 18 06:01:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: btkey.c,v 1.2 2008/07/21 14:19:21 lukem Exp $	*/
+/*	$NetBSD: btkey.c,v 1.2.4.1 2009/12/18 06:01:38 snj Exp $	*/
 
 /*-
  * Copyright (c) 2007 Iain Hibbert
@@ -29,9 +29,10 @@
 
 #include sys/cdefs.h
 __COPYRIGHT(@(#) Copyright (c) 2007 Iain Hibbert.  All rights reserved.);
-__RCSID($NetBSD: btkey.c,v 1.2 2008/07/21 14:19:21 lukem Exp $);
+__RCSID($NetBSD: btkey.c,v 1.2.4.1 2009/12/18 06:01:38 snj Exp $);
 
 #include bluetooth.h
+#include ctype.h
 #include err.h
 #include errno.h
 #include stdbool.h
@@ -253,7 +254,7 @@
 			if (*arg == '\0')
 return true;
 
-			for (p = digits ; *p != *arg ; p++)
+			for (p = digits ; *p != tolower((int)*arg) ; p++)
 if (*p == '\0')
 	return false;
 



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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 06:03:51 UTC 2009

Modified Files:
src/sys/arch/sparc64/dev [netbsd-5]: lom.c

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #1193):
sys/arch/sparc64/dev/lom.c: revision 1.4
Merge change of OpenBSD rev 1.20:
Remove debug printf and properly dequeue command instead when a read times out
on LOMLite2.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/sparc64/dev/lom.c

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

Modified files:

Index: src/sys/arch/sparc64/dev/lom.c
diff -u src/sys/arch/sparc64/dev/lom.c:1.1.2.3 src/sys/arch/sparc64/dev/lom.c:1.1.2.4
--- src/sys/arch/sparc64/dev/lom.c:1.1.2.3	Sat Nov 28 15:55:14 2009
+++ src/sys/arch/sparc64/dev/lom.c	Fri Dec 18 06:03:51 2009
@@ -1,5 +1,5 @@
-/*	$NetBSD: lom.c,v 1.1.2.3 2009/11/28 15:55:14 bouyer Exp $	*/
-/*	$OpenBSD: lom.c,v 1.19 2009/11/10 22:26:48 kettenis Exp $	*/
+/*	$NetBSD: lom.c,v 1.1.2.4 2009/12/18 06:03:51 snj Exp $	*/
+/*	$OpenBSD: lom.c,v 1.20 2009/12/12 13:01:00 kettenis Exp $	*/
 /*
  * Copyright (c) 2009 Mark Kettenis
  *
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.1.2.3 2009/11/28 15:55:14 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.1.2.4 2009/12/18 06:03:51 snj Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -643,7 +643,7 @@
 
 	error = tsleep(lc, PZERO, lom2rd, hz);
 	if (error)
-		aprint_error_dev(sc-sc_dev, lom2_read failed\n);
+		lom_dequeue_cmd(sc, lc);
 
 	*val = lc.lc_data;
 



CVS commit: [netbsd-5] src/usr.bin/less/less

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 06:06:56 UTC 2009

Modified Files:
src/usr.bin/less/less [netbsd-5]: cmdbuf.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1194):
usr.bin/less/less/cmdbuf.c: revision 1.8
Don't attempt to read or write ~/.lesshst if it's not a regular file
or a symlink to a regular file. Previously, symlinking to /dev/null
would cause less to trash /dev/null if run with sufficient privileges,
as seen in PR misc/42237.
While the official way to disable .lesshst is to set an environment
variable, that is problematic in some cases, such as single-user mode.
A safer way to prevent even an unpatched less from writing anything
out is to mkdir ~/.lesshst.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.24.1 src/usr.bin/less/less/cmdbuf.c

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

Modified files:

Index: src/usr.bin/less/less/cmdbuf.c
diff -u src/usr.bin/less/less/cmdbuf.c:1.7 src/usr.bin/less/less/cmdbuf.c:1.7.24.1
--- src/usr.bin/less/less/cmdbuf.c:1.7	Thu Oct 26 01:33:08 2006
+++ src/usr.bin/less/less/cmdbuf.c	Fri Dec 18 06:06:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmdbuf.c,v 1.7 2006/10/26 01:33:08 mrg Exp $	*/
+/*	$NetBSD: cmdbuf.c,v 1.7.24.1 2009/12/18 06:06:56 snj Exp $	*/
 
 /*
  * Copyright (C) 1984-2005  Mark Nudelman
@@ -22,6 +22,9 @@
 #if HAVE_STAT
 #include sys/stat.h
 #endif
+#if HAVE_ERRNO_H
+#include errno.h
+#endif
 
 extern int sc_width;
 extern int utf_mode;
@@ -1362,10 +1365,20 @@
 	char *filename;
 	FILE *f;
 	char *p;
+#ifdef HAVE_STAT
+	struct stat st;
+#endif
 
 	filename = histfile_name();
 	if (filename == NULL)
 		return;
+#ifdef HAVE_STAT
+	/* ignore devices/fifos; allow symlinks */
+	if (stat(filename, st)  0)
+		return;
+	if (!S_ISREG(st.st_mode))
+		return;
+#endif
 	f = fopen(filename, r);
 	free(filename);
 	if (f == NULL)
@@ -1442,10 +1455,22 @@
 #if CMD_HISTORY
 	char *filename;
 	FILE *f;
+#ifdef HAVE_STAT
+	struct stat st;
+#endif
 
 	filename = histfile_name();
 	if (filename == NULL)
 		return;
+#ifdef HAVE_STAT
+	/* ignore devices/fifos; allow symlinks */
+	if (stat(filename, st)  0) {
+		if (errno != ENOENT)
+			return;
+	}
+	else if (!S_ISREG(st.st_mode))
+		return;
+#endif
 	f = fopen(filename, w);
 	free(filename);
 	if (f == NULL)



CVS commit: [netbsd-5] src/etc/defaults

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 06:09:56 UTC 2009

Modified Files:
src/etc/defaults [netbsd-5]: rc.conf

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1195):
etc/defaults/rc.conf: revision 1.107
Make rtsold_flags default to -a as per PR 39657.


To generate a diff of this commit:
cvs rdiff -u -r1.95.2.4 -r1.95.2.5 src/etc/defaults/rc.conf

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

Modified files:

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.95.2.4 src/etc/defaults/rc.conf:1.95.2.5
--- src/etc/defaults/rc.conf:1.95.2.4	Sun May 10 21:32:57 2009
+++ src/etc/defaults/rc.conf	Fri Dec 18 06:09:56 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.95.2.4 2009/05/10 21:32:57 snj Exp $
+#	$NetBSD: rc.conf,v 1.95.2.5 2009/12/18 06:09:56 snj Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -233,7 +233,7 @@
 gated=NO
 mrouted=NO		mrouted_flags=
 route6d=NO		route6d_flags=
-rtsold=NO		rtsold_flags=		# for ip6mode=autohost only
+rtsold=NO		rtsold_flags=-a	# for ip6mode=autohost only
 
 # Daemons used to boot other hosts over a network.
 #



CVS commit: [matt-nb5-mips64] src/bin/pax

2009-12-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 18 06:12:25 UTC 2009

Modified Files:
src/bin/pax [matt-nb5-mips64]: Makefile ar_io.c

Log Message:
Make this compile on snow leopard.


To generate a diff of this commit:
cvs rdiff -u -r1.37.12.1 -r1.37.12.2 src/bin/pax/Makefile
cvs rdiff -u -r1.48.22.1 -r1.48.22.2 src/bin/pax/ar_io.c

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

Modified files:

Index: src/bin/pax/Makefile
diff -u src/bin/pax/Makefile:1.37.12.1 src/bin/pax/Makefile:1.37.12.2
--- src/bin/pax/Makefile:1.37.12.1	Tue Dec 15 19:53:21 2009
+++ src/bin/pax/Makefile	Fri Dec 18 06:12:25 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37.12.1 2009/12/15 19:53:21 matt Exp $
+#	$NetBSD: Makefile,v 1.37.12.2 2009/12/18 06:12:25 matt Exp $
 #   @(#)Makefile	8.1 (Berkeley) 5/31/93
 
 .include bsd.own.mk
@@ -29,7 +29,7 @@
 CPPFLAGS+=	-DHOSTPROG
 .else	# {	! HOSTPROG
 # XXX: Interix does not have it; we need a conditional for it.
-CPPFLAGS+=	-DHAVE_MTIO_H
+CPPFLAGS+=	-DHAVE_SYS_MTIO_H
 
 LINKS+=	${BINDIR}/pax ${BINDIR}/tar
 SYMLINKS+=${BINDIR}/tar /usr/bin/tar

Index: src/bin/pax/ar_io.c
diff -u src/bin/pax/ar_io.c:1.48.22.1 src/bin/pax/ar_io.c:1.48.22.2
--- src/bin/pax/ar_io.c:1.48.22.1	Tue Dec 15 19:53:21 2009
+++ src/bin/pax/ar_io.c	Fri Dec 18 06:12:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ar_io.c,v 1.48.22.1 2009/12/15 19:53:21 matt Exp $	*/
+/*	$NetBSD: ar_io.c,v 1.48.22.2 2009/12/18 06:12:25 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)ar_io.c	8.2 (Berkeley) 4/18/94;
 #else
-__RCSID($NetBSD: ar_io.c,v 1.48.22.1 2009/12/15 19:53:21 matt Exp $);
+__RCSID($NetBSD: ar_io.c,v 1.48.22.2 2009/12/18 06:12:25 matt Exp $);
 #endif
 #endif /* not lint */
 
@@ -99,7 +99,7 @@
 time_t starttime;			/* time the run started */
 int force_one_volume;			/* 1 if we ignore volume changes */
 
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
 static int get_phys(void);
 #endif
 extern sigset_t s_mask;
@@ -129,7 +129,7 @@
 int
 ar_open(const char *name)
 {
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
 	struct mtget mb;
 #endif
 
@@ -220,7 +220,7 @@
 	}
 
 	if (S_ISCHR(arsb.st_mode)) {
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
 		artyp = ioctl(arfd, MTIOCGET, mb) ? ISCHR : ISTAPE;
 #else
 		tty_warn(1, System does not have tape support);
@@ -452,7 +452,7 @@
 	/* mimic cpio's block count first */
 	if (frmt  strcmp(NM_CPIO, argv0) == 0) {
 		(void)fprintf(listf, OFFT_F  blocks\n,
-		(rdcnt ? rdcnt : wrcnt) / 5120);
+		(OFFT_T)(rdcnt ? rdcnt : wrcnt) / 5120);
 	}
 
 	ar_summary(0);
@@ -941,7 +941,7 @@
 	long fsbz;
 	off_t cpos;
 	off_t mpos;
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
 	struct mtop mb;
 #endif
 
@@ -965,7 +965,7 @@
 	case ISRMT:
 #endif /* SUPPORT_RMT */
 	case ISTAPE:
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
 		/*
 		 * if the last i/o was a successful data transfer, we assume
 		 * the fault is just a bad record on the tape that we are now
@@ -1109,7 +1109,7 @@
 ar_rev(off_t sksz)
 {
 	off_t cpos;
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
 	int phyblk;
 	struct mtop mb;
 #endif
@@ -1180,7 +1180,7 @@
 #ifdef SUPPORT_RMT
 	case ISRMT:
 #endif /* SUPPORT_RMT */
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
 		/*
 		 * Calculate and move the proper number of PHYSICAL tape
 		 * blocks. If the sksz is not an even multiple of the physical
@@ -1242,7 +1242,7 @@
 	return 0;
 }
 
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
 /*
  * get_phys()
  *	Determine the physical block size on a tape drive. We need the physical



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

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 06:12:51 UTC 2009

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

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1196):
sys/sys/stat.h: revision 1.59
Parenthesize S_IS*() macro arguments to prevent breakage with certain
arguments - see PR 41919.  Approved by dholland.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.57.4.1 src/sys/sys/stat.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/stat.h
diff -u src/sys/sys/stat.h:1.57 src/sys/sys/stat.h:1.57.4.1
--- src/sys/sys/stat.h:1.57	Thu Jul 31 05:38:06 2008
+++ src/sys/sys/stat.h	Fri Dec 18 06:12:51 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.h,v 1.57 2008/07/31 05:38:06 simonb Exp $	*/
+/*	$NetBSD: stat.h,v 1.57.4.1 2009/12/18 06:12:51 snj Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -168,21 +168,21 @@
 #define	S_ARCH2	_S_ARCH2
 #endif
 
-#define	S_ISDIR(m)	((m  _S_IFMT) == _S_IFDIR)	/* directory */
-#define	S_ISCHR(m)	((m  _S_IFMT) == _S_IFCHR)	/* char special */
-#define	S_ISBLK(m)	((m  _S_IFMT) == _S_IFBLK)	/* block special */
-#define	S_ISREG(m)	((m  _S_IFMT) == _S_IFREG)	/* regular file */
-#define	S_ISFIFO(m)	((m  _S_IFMT) == _S_IFIFO)	/* fifo */
+#define	S_ISDIR(m)	(((m)  _S_IFMT) == _S_IFDIR)	/* directory */
+#define	S_ISCHR(m)	(((m)  _S_IFMT) == _S_IFCHR)	/* char special */
+#define	S_ISBLK(m)	(((m)  _S_IFMT) == _S_IFBLK)	/* block special */
+#define	S_ISREG(m)	(((m)  _S_IFMT) == _S_IFREG)	/* regular file */
+#define	S_ISFIFO(m)	(((m)  _S_IFMT) == _S_IFIFO)	/* fifo */
 #if ((_POSIX_C_SOURCE - 0) = 200112L) || defined(_XOPEN_SOURCE) || \
 defined(_NETBSD_SOURCE)
-#define	S_ISLNK(m)	((m  _S_IFMT) == _S_IFLNK)	/* symbolic link */
+#define	S_ISLNK(m)	(((m)  _S_IFMT) == _S_IFLNK)	/* symbolic link */
 #endif
 #if ((_POSIX_C_SOURCE - 0) = 200112L) || ((_XOPEN_SOURCE - 0) = 600) || \
 defined(_NETBSD_SOURCE)
-#define	S_ISSOCK(m)	((m  _S_IFMT) == _S_IFSOCK)	/* socket */
+#define	S_ISSOCK(m)	(((m)  _S_IFMT) == _S_IFSOCK)	/* socket */
 #endif
 #if defined(_NETBSD_SOURCE)
-#define	S_ISWHT(m)	((m  _S_IFMT) == _S_IFWHT)	/* whiteout */
+#define	S_ISWHT(m)	(((m)  _S_IFMT) == _S_IFWHT)	/* whiteout */
 #endif
 
 #if defined(_NETBSD_SOURCE)



CVS commit: [netbsd-5] src/doc

2009-12-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 18 07:36:03 UTC 2009

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

Log Message:
Tickets 1175, 1180, 1181, 1184, and 1192-1196.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.161 -r1.1.2.162 src/doc/CHANGES-5.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-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.161 src/doc/CHANGES-5.1:1.1.2.162
--- src/doc/CHANGES-5.1:1.1.2.161	Fri Dec 11 09:37:30 2009
+++ src/doc/CHANGES-5.1	Fri Dec 18 07:36:02 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.161 2009/12/11 09:37:30 sborrill Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.162 2009/12/18 07:36:02 snj Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -15586,3 +15586,67 @@
 	order of ms, usually), just the same as before.
 	[tron, ticket #1191]
 
+sys/dev/pci/pcidevs1.1003
+sys/dev/pci/pcidevs.hregen
+sys/dev/pci/pcidevs_data.h			regen
+sys/dev/pci/piixide.c1.52
+
+	Add Intel 3400 devices.  Add support to piixide(4).
+	[sborrill, ticket #1175]
+
+sys/arch/x86/x86/coretemp.c			1.13
+
+	CPU model and CPU extended model cannot simply be summed; the
+	extended model differentiates different CPUs within a given model
+	type (i.e., model 0xe with extended model 0x1 is NOT the same as a
+	model 0xf).  Modern Xeons do not support MSR_IA32_EXT_CONFIG, so
+	use model and extended model correctly to avoid it
+	[sborrill, ticket #1180]
+
+sys/arch/x86/x86/intel_busclock.c		1.9
+
+	Interim workaround for modern Xeons that don't have the simplistic
+	view of bus speed and therefore do not support MSR_FSB_FREQ (e.g.,
+	X3400).
+	[sborrill, ticket #1181]
+
+sys/fs/puffs/puffs_vnops.c			1.141 via patch
+
+	Push all information cached in the vnode to the file server before
+	issuing INACTIVE.  PR kern/42194.  Also, send setattr in fsync
+	asynchronously if FSYNC_WAIT is not set.
+	[pooka, ticket #1184]
+
+usr.bin/btkey/device.c1.3
+usr.bin/btkey/btkey.c1.3
+
+	- If HCI commands fail (CommandComplete status != 0) then indicate
+	  ENODEV Operation Not Supported by Device rather than random errno.
+	- Accept uppercase hex digits when parsing a provided key.
+	[plunky, ticket #1192]
+
+sys/arch/sparc64/dev/lom.c			1.4
+
+	Merge change of OpenBSD rev 1.20: Remove debug printf and properly
+	dequeue command instead when a read times out on LOMLite2.
+	[nakayama, ticket #1193]
+
+usr.bin/less/less/cmdbuf.c			1.8
+
+	Don't attempt to read or write ~/.lesshst if it's not a regular file
+	or a symlink to a regular file. Previously, symlinking to /dev/null
+	would cause less to trash /dev/null if run with sufficient
+	privileges, as seen in PR misc/42237.
+	[dholland, ticket #1194]
+
+etc/defaults/rc.conf1.107
+
+	Make rtsold_flags default to -a as per PR 39657.
+	[dholland, ticket #1195]
+
+sys/sys/stat.h	1.59
+
+	Parenthesize S_IS*() macro arguments to prevent breakage with
+	certain arguments - see PR 41919.
+	[dholland, ticket #1196]
+