Re: CVS commit: src/sys/sys

2011-02-18 Thread Jonathan A. Kollasch
On Thu, Feb 17, 2011 at 07:28:46PM +, Matt Thomas wrote:
 Module Name:  src
 Committed By: matt
 Date: Thu Feb 17 19:28:46 UTC 2011
 
 Modified Files:
   src/sys/sys: lwp.h
 
 Log Message:
 Move lwp_getpcb to the area with the rest of the _KERNEL function 
 declarations.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.143 -r1.144 src/sys/sys/lwp.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 

This (probably) is what broke the gdb build in its kvm code.
Apparently it needs _KMEMUSER defined.

I'd fix this myself but I don't know exactly where in the
gdb build that should be defined.

Jonahan Kollasch


Re: CVS commit: src/sys

2011-02-18 Thread Mindaugas Rasiukevicius
matthew green m...@eterna.com.au wrote:
  Add PCU (Per-CPU Unit) - an interface to manage synchronization of any
  per CPU context tied with an LWP.  Main use - lazy FPU handling on SMP.
  
  Requested by matt@, will be used on mips64.  Note: implementation will
  be improved to use IPIs before adopting on x86.  OK ad@.
 
 why is this compiled on every port when no one uses it yet and most
 of them never will?

All SMP capable architectures, except VAX, can use this.  To avoid the
differences between SMP and UP code, it is probably worth to provide
dummy PCU interface for UP as well.

Anyway, your point is fully valid at the moment - I have put it under
option PCU, so it could be defined in std.arch files.

-- 
Mindaugas


Re: CVS commit: src/sys/sys

2011-02-18 Thread Aymeric Vincent
Jonathan A. Kollasch jakll...@kollasch.net writes:

 On Thu, Feb 17, 2011 at 07:28:46PM +, Matt Thomas wrote:
 
 Log Message:
 Move lwp_getpcb to the area with the rest of the _KERNEL function 
 declarations.

 This (probably) is what broke the gdb build in its kvm code.
 Apparently it needs _KMEMUSER defined.

Joerg just fixed that. However, usr.sbin/crash is broken at least on
i386 because of this change.

I think adding -D_KERNEL in usr.sbin/crash/Makefile is gross. Unless you
prefer to make lwp_getpcb() declaration dependent on _KMEMUSER or on a
new macro, could you please revert this change, Matt?

Regards,
 Aymeric


Re: CVS commit: src/sys/net

2011-02-18 Thread Mindaugas Rasiukevicius
Christos Zoulas chris...@netbsd.org wrote:
 Module Name:  src
 Committed By: christos
 Date: Sat Feb 19 01:12:40 UTC 2011
 
 Modified Files:
   src/sys/net: bpf_filter.c
 
 Log Message:
 Avoid stack memory disclosure by keeping track during filter validation
 time of initialized memory. Idea taken from linux.

Can you use kmem(9), please?

-- 
Mindaugas


Re: CVS commit: src/sys/sys

2011-02-18 Thread Jukka Ruohonen
On Sat, Feb 19, 2011 at 02:01:46AM +, Matt Thomas wrote:
 Module Name:  src
 Committed By: matt
 Date: Sat Feb 19 02:01:46 UTC 2011
 
 Modified Files:
   src/sys/sys: cdefs.h
 
 Log Message:
 Add __CTASSERT(x)

Why can't there be just a single CTASSERT(x)? Alternatively, a lower-case
___ctassert(x) would perhaps be better for userspace, given the existing
practices used in cdefs(3).

- Jukka.


Re: CVS commit: src/sys/sys

2011-02-18 Thread Matt Thomas

On Feb 18, 2011, at 7:39 PM, Jukka Ruohonen wrote:

 On Sat, Feb 19, 2011 at 02:01:46AM +, Matt Thomas wrote:
 Module Name: src
 Committed By:matt
 Date:Sat Feb 19 02:01:46 UTC 2011
 
 Modified Files:
  src/sys/sys: cdefs.h
 
 Log Message:
 Add __CTASSERT(x)
 
 Why can't there be just a single CTASSERT(x)? Alternatively, a lower-case
 ___ctassert(x) would perhaps be better for userspace, given the existing
 practices used in cdefs(3).

CTASSERT violates the user namespace hence __CTASSERT.
I could undefine CTASSERT for the kernel but that would mean changing
a bunch of code so adding a CTASSERT alias was easier. 




CVS commit: src/sys/ufs/ffs

2011-02-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Feb 18 08:39:13 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_snapshot.c

Log Message:
Revert rev. 1.101.  Dead snapshots would hang around until unmount.

Adresses PR #44568 (WAPBL doens't play nice with snapshots).


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/ufs/ffs/ffs_snapshot.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/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.103 src/sys/ufs/ffs/ffs_snapshot.c:1.104
--- src/sys/ufs/ffs/ffs_snapshot.c:1.103	Wed Feb 16 19:43:50 2011
+++ src/sys/ufs/ffs/ffs_snapshot.c	Fri Feb 18 08:39:13 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.103 2011/02/16 19:43:50 hannken Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.104 2011/02/18 08:39:13 hannken Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.103 2011/02/16 19:43:50 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.104 2011/02/18 08:39:13 hannken Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -280,7 +280,6 @@
 	fs-fs_snapinum[snaploc] = ip-i_number;
 
 	mutex_enter(si-si_lock);
-	vref(vp);
 	if (is_active_snapshot(si, ip))
 		panic(ffs_snapshot: %PRIu64 already on list, ip-i_number);
 	TAILQ_INSERT_TAIL(si-si_snapshots, ip, i_nextsnap);
@@ -394,7 +393,8 @@
 			(void) ffs_truncate(vp, (off_t)0, 0, NOCRED);
 			UFS_WAPBL_END(mp);
 		}
-	}
+	} else
+		vref(vp);
 	return (error);
 }
 
@@ -1313,8 +1313,10 @@
 		if (xp == ip)
 			break;
 	mutex_exit(si-si_lock);
+	if (xp != NULL)
+		vrele(ITOV(ip));
 #ifdef DEBUG
-	if (snapdebug  xp == NULL)
+	else if (snapdebug)
 		printf(ffs_snapgone: lost snapshot vnode %llu\n,
 		(unsigned long long)ip-i_number);
 #endif
@@ -1382,7 +1384,6 @@
 			free(ip-i_snapblklist, M_UFSMNT);
 			ip-i_snapblklist = NULL;
 		}
-		vrele(vp);
 	} else
 		mutex_exit(si-si_lock);
 	/*
@@ -1763,25 +1764,28 @@
 ffs_snapshot_unmount(struct mount *mp)
 {
 	struct vnode *devvp = VFSTOUFS(mp)-um_devvp;
-	struct inode *ip;
+	struct inode *xp;
+	struct vnode *vp = NULL;
 	struct snap_info *si;
-	bool list_empty = true;
 
 	si = VFSTOUFS(mp)-um_snapinfo;
 	mutex_enter(si-si_lock);
-	while ((ip = TAILQ_FIRST(si-si_snapshots)) != 0) {
-		list_empty = false;
-		TAILQ_REMOVE(si-si_snapshots, ip, i_nextsnap);
-		if (ip-i_snapblklist == si-si_snapblklist)
+	while ((xp = TAILQ_FIRST(si-si_snapshots)) != 0) {
+		vp = ITOV(xp);
+		TAILQ_REMOVE(si-si_snapshots, xp, i_nextsnap);
+		if (xp-i_snapblklist == si-si_snapblklist)
 			si-si_snapblklist = NULL;
-		free(ip-i_snapblklist, M_UFSMNT);
-		si-si_gen++;
-		mutex_exit(si-si_lock);
-		vrele(ITOV(ip));
-		mutex_enter(si-si_lock);
+		free(xp-i_snapblklist, M_UFSMNT);
+		if (xp-i_nlink  0) {
+			si-si_gen++;
+			mutex_exit(si-si_lock);
+			vrele(vp);
+			mutex_enter(si-si_lock);
+		}
 	}
+	si-si_gen++;
 	mutex_exit(si-si_lock);
-	if (! list_empty)
+	if (vp)
 		fscow_disestablish(mp, ffs_copyonwrite, devvp);
 }
 



CVS commit: [bouyer-quota2] src/sys/ufs/ffs

2011-02-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 18 09:51:16 UTC 2011

Modified Files:
src/sys/ufs/ffs [bouyer-quota2]: ffs_snapshot.c

Log Message:
Sync with HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.102.4.5 -r1.102.4.6 src/sys/ufs/ffs/ffs_snapshot.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/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.5 src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.6
--- src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.5	Thu Feb 17 13:28:15 2011
+++ src/sys/ufs/ffs/ffs_snapshot.c	Fri Feb 18 09:51:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.102.4.5 2011/02/17 13:28:15 bouyer Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.102.4.6 2011/02/18 09:51:16 bouyer Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.102.4.5 2011/02/17 13:28:15 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.102.4.6 2011/02/18 09:51:16 bouyer Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -288,7 +288,6 @@
 	fs-fs_snapinum[snaploc] = ip-i_number;
 
 	mutex_enter(si-si_lock);
-	vref(vp);
 	if (is_active_snapshot(si, ip))
 		panic(ffs_snapshot: %PRIu64 already on list, ip-i_number);
 	TAILQ_INSERT_TAIL(si-si_snapshots, ip, i_nextsnap);
@@ -402,7 +401,8 @@
 			(void) ffs_truncate(vp, (off_t)0, 0, NOCRED);
 			UFS_WAPBL_END(mp);
 		}
-	}
+	} else
+		vref(vp);
 	return (error);
 }
 
@@ -1321,8 +1321,10 @@
 		if (xp == ip)
 			break;
 	mutex_exit(si-si_lock);
+	if (xp != NULL)
+		vrele(ITOV(ip));
 #ifdef DEBUG
-	if (snapdebug  xp == NULL)
+	else if (snapdebug)
 		printf(ffs_snapgone: lost snapshot vnode %llu\n,
 		(unsigned long long)ip-i_number);
 #endif
@@ -1390,7 +1392,6 @@
 			free(ip-i_snapblklist, M_UFSMNT);
 			ip-i_snapblklist = NULL;
 		}
-		vrele(vp);
 	} else
 		mutex_exit(si-si_lock);
 	/*
@@ -1775,25 +1776,28 @@
 ffs_snapshot_unmount(struct mount *mp)
 {
 	struct vnode *devvp = VFSTOUFS(mp)-um_devvp;
-	struct inode *ip;
+	struct inode *xp;
+	struct vnode *vp = NULL;
 	struct snap_info *si;
-	bool list_empty = true;
 
 	si = VFSTOUFS(mp)-um_snapinfo;
 	mutex_enter(si-si_lock);
-	while ((ip = TAILQ_FIRST(si-si_snapshots)) != 0) {
-		list_empty = false;
-		TAILQ_REMOVE(si-si_snapshots, ip, i_nextsnap);
-		if (ip-i_snapblklist == si-si_snapblklist)
+	while ((xp = TAILQ_FIRST(si-si_snapshots)) != 0) {
+		vp = ITOV(xp);
+		TAILQ_REMOVE(si-si_snapshots, xp, i_nextsnap);
+		if (xp-i_snapblklist == si-si_snapblklist)
 			si-si_snapblklist = NULL;
-		free(ip-i_snapblklist, M_UFSMNT);
-		si-si_gen++;
-		mutex_exit(si-si_lock);
-		vrele(ITOV(ip));
-		mutex_enter(si-si_lock);
+		free(xp-i_snapblklist, M_UFSMNT);
+		if (xp-i_nlink  0) {
+			si-si_gen++;
+			mutex_exit(si-si_lock);
+			vrele(vp);
+			mutex_enter(si-si_lock);
+		}
 	}
+	si-si_gen++;
 	mutex_exit(si-si_lock);
-	if (! list_empty)
+	if (vp)
 		fscow_disestablish(mp, ffs_copyonwrite, devvp);
 }
 



CVS commit: src/usr.bin/rump_allserver

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 09:54:03 UTC 2011

Modified Files:
src/usr.bin/rump_allserver: rump_allserver.1 rump_allserver.c

Log Message:
Use host instead of the slightly more cryptic e to indicate
that the size of the mapping should be taken from the host file
size.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/rump_allserver/rump_allserver.1
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/rump_allserver/rump_allserver.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/rump_allserver/rump_allserver.1
diff -u src/usr.bin/rump_allserver/rump_allserver.1:1.14 src/usr.bin/rump_allserver/rump_allserver.1:1.15
--- src/usr.bin/rump_allserver/rump_allserver.1:1.14	Thu Feb 17 16:59:46 2011
+++ src/usr.bin/rump_allserver/rump_allserver.1	Fri Feb 18 09:54:03 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: rump_allserver.1,v 1.14 2011/02/17 16:59:46 pooka Exp $
+.\	$NetBSD: rump_allserver.1,v 1.15 2011/02/18 09:54:03 pooka Exp $
 .\
 .\ Copyright (c) 2010 Antti Kantee.  All rights reserved.
 .\
@@ -90,11 +90,11 @@
 .Xr dd 1 ,
 this argument accepts a suffix as the multiplier for the number.
 The special value
-.Dq e
+.Dq host
 indicates that the current size of
 .Ar hostpath
 will be used.
-It is assumed that
+In this case it is assumed that
 .Ar hostpath
 exists and is a regular file.
 .It OR

Index: src/usr.bin/rump_allserver/rump_allserver.c
diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.18 src/usr.bin/rump_allserver/rump_allserver.c:1.19
--- src/usr.bin/rump_allserver/rump_allserver.c:1.18	Thu Feb 17 16:59:46 2011
+++ src/usr.bin/rump_allserver/rump_allserver.c	Fri Feb 18 09:54:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_allserver.c,v 1.18 2011/02/17 16:59:46 pooka Exp $	*/
+/*	$NetBSD: rump_allserver.c,v 1.19 2011/02/18 09:54:03 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: rump_allserver.c,v 1.18 2011/02/17 16:59:46 pooka Exp $);
+__RCSID($NetBSD: rump_allserver.c,v 1.19 2011/02/18 09:54:03 pooka Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -175,7 +175,7 @@
 		size already given\n);
 		usage();
 	}
-	if (strcmp(value, e) == 0) {
+	if (strcmp(value, host) == 0) {
 		if (foffset != 0) {
 			fprintf(stderr,
 			cannot specify 



CVS commit: src/sys/uvm

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 10:43:53 UTC 2011

Modified Files:
src/sys/uvm: uvm_glue.c

Log Message:
make this build w/o HAVE_CPU_UAREA_ROUTINES


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/uvm/uvm_glue.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/uvm/uvm_glue.c
diff -u src/sys/uvm/uvm_glue.c:1.148 src/sys/uvm/uvm_glue.c:1.149
--- src/sys/uvm/uvm_glue.c:1.148	Thu Feb 17 19:27:13 2011
+++ src/sys/uvm/uvm_glue.c	Fri Feb 18 10:43:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_glue.c,v 1.148 2011/02/17 19:27:13 matt Exp $	*/
+/*	$NetBSD: uvm_glue.c,v 1.149 2011/02/18 10:43:52 drochner Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_glue.c,v 1.148 2011/02/17 19:27:13 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_glue.c,v 1.149 2011/02/18 10:43:52 drochner Exp $);
 
 #include opt_kgdb.h
 #include opt_kstack.h
@@ -341,11 +341,11 @@
 
 	uvm_uarea_cache = pool_cache_init(USPACE, USPACE_ALIGN, 0, flags,
 	uarea, uvm_uarea_allocator, IPL_NONE, NULL, NULL, NULL);
-	if (uvm_uarea_system_cache != uvm_uarea_cache) {
-		uvm_uarea_system_cache = pool_cache_init(USPACE, USPACE_ALIGN,
-		0, flags, uareasys, uvm_uarea_system_allocator,
-		IPL_NONE, NULL, NULL, NULL);
-	}
+#if defined(__HAVE_CPU_UAREA_ROUTINES)
+	uvm_uarea_system_cache = pool_cache_init(USPACE, USPACE_ALIGN,
+	0, flags, uareasys, uvm_uarea_system_allocator,
+	IPL_NONE, NULL, NULL, NULL);
+#endif
 }
 
 /*



CVS commit: src/sys/opencrypto

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 10:50:57 UTC 2011

Modified Files:
src/sys/opencrypto: deflate.c

Log Message:
address the obvious byteorder and alignment problems in gzip size/crc
tail, should fix PR kern/44210 by Wolfgang Stukenbrock
being here, fix a bug in crc calculation of decompressed data, and
actually verify the crc


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/opencrypto/deflate.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/opencrypto/deflate.c
diff -u src/sys/opencrypto/deflate.c:1.16 src/sys/opencrypto/deflate.c:1.17
--- src/sys/opencrypto/deflate.c:1.16	Thu Feb 17 17:10:18 2011
+++ src/sys/opencrypto/deflate.c	Fri Feb 18 10:50:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: deflate.c,v 1.16 2011/02/17 17:10:18 drochner Exp $ */
+/*	$NetBSD: deflate.c,v 1.17 2011/02/18 10:50:56 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/deflate.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /* $OpenBSD: deflate.c,v 1.3 2001/08/20 02:45:22 hugh Exp $ */
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: deflate.c,v 1.16 2011/02/17 17:10:18 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: deflate.c,v 1.17 2011/02/18 10:50:56 drochner Exp $);
 
 #include sys/types.h
 #include sys/malloc.h
@@ -243,7 +243,7 @@
 	struct deflate_buf *buf, *tmp;
 	size_t nbufs;
 	u_int32_t crc;
-	u_int32_t isize;
+	u_int32_t isize, icrc;
 
 	DPRINTF((gzip_global: decomp %d, size %d\n, decomp, size));
 
@@ -300,7 +300,10 @@
 			DPRINTF((gzip_global.%d: gzip header ok\n,__LINE__));
 		}
 
-		isize = *((uint32_t *)data[size-sizeof(uint32_t)]);
+		memcpy(isize, data[size-sizeof(uint32_t)], sizeof(uint32_t));
+		LE32TOH(isize);
+		memcpy(icrc, data[size-2*sizeof(uint32_t)], sizeof(uint32_t));
+		LE32TOH(icrc);
 
 		DPRINTF((gzip_global: isize = %d (%02x %02x %02x %02x)\n,
 isize,
@@ -399,7 +402,7 @@
 	for (j = 0; j  i; j++) {
 		if (decomp) {
 			/* update crc for decompressed data */
-			crc = crc32(crc, buf[j].out, buf[j].size);
+			crc = crc32(crc, buf[j].out, MIN(count, buf[j].size));
 		}
 		if (count  buf[j].size) {
 			memcpy(output, buf[j].out, buf[j].size);
@@ -418,8 +421,10 @@
 
 	if (!decomp) {
 		/* fill in CRC and ISIZE */
-		((uint32_t *)output)[0] = crc;
-		((uint32_t *)output)[1] = size;
+		HTOLE32(crc);
+		memcpy(output, crc, sizeof(uint32_t));
+		HTOLE32(size);
+		memcpy(output + sizeof(uint32_t), size, sizeof(uint32_t));
 
 		DPRINTF((gzip_global: size = 0x%x (%02x %02x %02x %02x)\n,
 size,
@@ -427,6 +432,12 @@
 output[3],
 output[5],
 output[4]));
+	} else {
+		if (crc != icrc || result != isize) {
+			free(*out, M_CRYPTO_DATA);
+			*out = NULL;
+			return 0;
+		}
 	}
 
 	return result;



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 11:41:33 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
Use the env variable RUMPHIJACK to specify what facilities should
be hijacked.  If it's not specified, the default is
path=/rump,socket=all:nolocal.

So, if you're moof and want to relive your domain/os days (??),
you can do this:

pain-rustique:51:~ setenv RUMPHIJACK 'path=//'
pain-rustique:52:~ df //dev
Filesystem   1K-blocks   Used  Avail %Cap Mounted on
rumpfs1  1  0 100% /
pain-rustique:53:~ df /dev
Filesystem   1K-blocks   Used  Avail %Cap Mounted on
/dev/wd0a   1019864 280640 688232  28% /


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.48 src/lib/librumphijack/hijack.c:1.49
--- src/lib/librumphijack/hijack.c:1.48	Thu Feb 17 17:18:08 2011
+++ src/lib/librumphijack/hijack.c	Fri Feb 18 11:41:32 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.48 2011/02/17 17:18:08 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.49 2011/02/18 11:41:32 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.48 2011/02/17 17:18:08 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.49 2011/02/18 11:41:32 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -300,15 +300,124 @@
 	return (void *)rv;
 }
 
-static int pwdinrump = 0;
+/*
+ * This tracks if our process is in a subdirectory of /rump.
+ * It's preserved over exec.
+ */
+static bool pwdinrump = false;
+
+/*
+ * These variables are set from the RUMPHIJACK string and control
+ * which operations can product rump kernel file descriptors.
+ * This should be easily extendable for future needs.
+ */
+#define RUMPHIJACK_DEFAULT path=/rump,socket=all:nolocal
+static bool rumpsockets[PF_MAX];
+static const char *rumpprefix;
+static size_t rumpprefixlen;
+
+static struct {
+	int pf;
+	const char *name;
+} socketmap[] = {
+	{ PF_INET, inet },
+	{ PF_LINK, link },
+	{ PF_ROUTE, route },
+	{ PF_INET6, inet6 },
+	{ -1, NULL }
+};
+
+static void
+sockparser(char *buf)
+{
+	char *p, *l;
+	bool value;
+	int i;
+
+	/* if all is present, it must be specified first */
+	if (strncmp(buf, all, strlen(all)) == 0) {
+		for (i = 0; i  __arraycount(rumpsockets); i++) {
+			rumpsockets[i] = true;
+		}
+		buf += strlen(all);
+		if (*buf == ':')
+			buf++;
+	}
+
+	for (p = strtok_r(buf, :, l); p; p = strtok_r(NULL, :, l)) {
+		value = true;
+		if (strncmp(p, no, strlen(no)) == 0) {
+			value = false;
+			p += strlen(no);
+		}
 
-/* low calorie sockets? */
-static bool hostlocalsockets = true;
+		for (i = 0; socketmap[i].name; i++) {
+			if (strcmp(p, socketmap[i].name) == 0) {
+rumpsockets[socketmap[i].pf] = value;
+break;
+			}
+		}
+		if (socketmap[i].name == NULL) {
+			warnx(invalid socket specifier %s, p);
+		}
+	}
+}
+
+static void
+pathparser(char *buf)
+{
+
+	if (*buf != '/')
+		errx(1, hijack path specifier must begin with ``/'');
+
+	if ((rumpprefix = strdup(buf)) == NULL)
+		err(1, strdup);
+	rumpprefixlen = strlen(rumpprefix);
+}
+
+static struct {
+	void (*parsefn)(char *);
+	const char *name;
+} hijackparse[] = {
+	{ sockparser, socket },
+	{ pathparser, path },
+	{ NULL, NULL },
+};
+
+static void
+parsehijack(char *hijack)
+{
+	char *p, *p2, *l;
+	const char *hijackcopy;
+	int i;
+
+	if ((hijackcopy = strdup(hijack)) == NULL)
+		err(1, strdup);
+
+	/* disable everything explicitly */
+	for (i = 0; i  PF_MAX; i++)
+		rumpsockets[i] = false;
+
+	for (p = strtok_r(hijack, ,, l); p; p = strtok_r(NULL, ,, l)) {
+		p2 = strchr(p, '=');
+		if (!p2)
+			errx(1, invalid hijack specifier: %s, hijackcopy);
+
+		for (i = 0; hijackparse[i].parsefn; i++) {
+			if (strncmp(hijackparse[i].name, p,
+			(size_t)(p2-p)) == 0) {
+hijackparse[i].parsefn(p2+1);
+break;
+			}
+		}
+	}
+
+}
 
 static void __attribute__((constructor))
 rcinit(void)
 {
-	char buf[64];
+	char buf[1024];
 	extern void *(*rumpclient_dlsym)(void *, const char *);
 	unsigned i, j;
 
@@ -349,6 +458,12 @@
 	if (rumpclient_init() == -1)
 		err(1, rumpclient init);
 
+	/* check which syscalls we're supposed to hijack */
+	if (getenv_r(RUMPHIJACK, buf, sizeof(buf)) == -1) {
+		strcpy(buf, RUMPHIJACK_DEFAULT);
+	}
+	parsehijack(buf);
+
 	/* set client persistence level */
 	if (getenv_r(RUMPHIJACK_RETRYCONNECT, buf, sizeof(buf)) != -1) {
 		if (strcmp(buf, die) == 0)
@@ -375,7 +490,7 @@
 		unsetenv(RUMPHIJACK__DUP2MASK);
 	}
 	if (getenv_r(RUMPHIJACK__PWDINRUMP, buf, sizeof(buf)) == 0) {
-		pwdinrump = strtoul(buf, NULL, 10);
+		pwdinrump = true;
 		unsetenv(RUMPHIJACK__PWDINRUMP);
 	}
 }
@@ -413,15 +528,17 @@
 
 #define 

CVS commit: [bouyer-quota2] src/sys/ufs/ufs

2011-02-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 18 11:46:43 UTC 2011

Modified Files:
src/sys/ufs/ufs [bouyer-quota2]: ufs_quota2.c

Log Message:
Only use B_MODIFY when needed, avoid unecessery copy on write when using
snapshots.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/ufs/ufs/ufs_quota2.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/ufs/ufs/ufs_quota2.c
diff -u src/sys/ufs/ufs/ufs_quota2.c:1.1.2.15 src/sys/ufs/ufs/ufs_quota2.c:1.1.2.16
--- src/sys/ufs/ufs/ufs_quota2.c:1.1.2.15	Sat Feb 12 21:48:09 2011
+++ src/sys/ufs/ufs/ufs_quota2.c	Fri Feb 18 11:46:43 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota2.c,v 1.1.2.15 2011/02/12 21:48:09 bouyer Exp $ */
+/* $NetBSD: ufs_quota2.c,v 1.1.2.16 2011/02/18 11:46:43 bouyer Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -28,7 +28,7 @@
   */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ufs_quota2.c,v 1.1.2.15 2011/02/12 21:48:09 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: ufs_quota2.c,v 1.1.2.16 2011/02/18 11:46:43 bouyer Exp $);
 
 #include sys/buf.h
 #include sys/param.h
@@ -64,7 +64,7 @@
  */
 
 static int quota2_bwrite(struct mount *, struct buf *);
-static int getinoquota2(struct inode *, int, struct buf **,
+static int getinoquota2(struct inode *, bool, bool, struct buf **,
 struct quota2_entry **);
 static int getq2h(struct ufsmount *, int, struct buf **,
 struct quota2_header **, int);
@@ -321,7 +321,7 @@
 }
 
 static int
-getinoquota2(struct inode *ip, int alloc, struct buf **bpp,
+getinoquota2(struct inode *ip, bool alloc, bool modify, struct buf **bpp,
 struct quota2_entry **q2ep)
 {
 	int error;
@@ -365,7 +365,7 @@
 		}
 
 		if ((dq-dq2_lblkno | dq-dq2_blkoff) == 0) {
-			if (alloc == 0) {
+			if (!alloc) {
 continue;
 			}
 			/* need to alloc a new on-disk quot */
@@ -377,7 +377,8 @@
 return error;
 		} else {
 			error = getq2e(ump, i, dq-dq2_lblkno,
-			dq-dq2_blkoff, bpp[i], q2ep[i], B_MODIFY);
+			dq-dq2_blkoff, bpp[i], q2ep[i],
+			modify ? B_MODIFY : 0);
 			if (error)
 return error;
 		}
@@ -400,7 +401,7 @@
 	const int needswap = UFS_MPNEEDSWAP(ump);
 	int i;
 
-	if ((error = getinoquota2(ip, change  0, bp, q2e)) != 0)
+	if ((error = getinoquota2(ip, change  0, change != 0, bp, q2e)) != 0)
 		return error;
 	if (change == 0) {
 		for (i = 0; i  MAXQUOTAS; i++) {



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 12:22:46 UTC 2011

Modified Files:
src/lib/librumphijack: rumphijack.3

Log Message:
Document .Ev RUMPHIJACK


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librumphijack/rumphijack.3

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

Modified files:

Index: src/lib/librumphijack/rumphijack.3
diff -u src/lib/librumphijack/rumphijack.3:1.3 src/lib/librumphijack/rumphijack.3:1.4
--- src/lib/librumphijack/rumphijack.3:1.3	Wed Feb 16 19:46:42 2011
+++ src/lib/librumphijack/rumphijack.3	Fri Feb 18 12:22:46 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: rumphijack.3,v 1.3 2011/02/16 19:46:42 pooka Exp $
+.\ $NetBSD: rumphijack.3,v 1.4 2011/02/18 12:22:46 pooka Exp $
 .\
 .\ Copyright (c) 2011 Antti Kantee.  All rights reserved.
 .\
@@ -23,7 +23,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd February 16, 2011
+.Dd February 18, 2011
 .Dt RUMPHIJACK 3
 .Os
 .Sh NAME
@@ -46,7 +46,57 @@
 The behaviour of hijacked applications is affected by the following
 environment variables:
 .Bl -tag -width 12345
-.It Dv RUMPHIJACK_RETRYCONNECT
+.It Ev RUMPHIJACK
+If present, this variable specifies which system calls should be
+hijacked.
+The string is parsed as a comma-separated list of
+.Dq name=value
+tuples.
+The possible lefthandside names are:
+.Bl -tag -width xxsocketxx
+.It Dq path
+Pathname-based system calls are hijacked if the path the system
+call is directed to resides under
+.Ar value .
+In case of an absolute pathname argument, a direct comparison is made.
+In case of a relative pathname, the current working direct is
+examined.
+.It Dq socket
+The specifier
+.Ar value
+contains a colon-separated list of which protocol families should
+be hijacked.
+The special value
+.Dq all
+can be specified as the first element.
+It indicates that all protocol families should be hijacked.
+Some can then be disabled by prepending
+.Dq no
+to the name of the protocol family.
+.Pp
+For example,
+.Dq inet:inet6
+specifies that only
+.Dv PF_INET
+and
+.Dv PF_INET6
+sockets should be hijacked,
+while
+.Dq all:noinet
+specifies that all protocol families except
+.Dv PF_INET
+should be hijacked.
+.El
+.Pp
+If the environment variable is unset, the default value
+.Qq path=/rump,socket=all:nolocal
+is used.
+The rationale for this is to have networked X clients work
+out-of-the-box: X clients use local sockets to communicate with
+the server, so local sockets must be used as a host service.
+.Pp
+An empty string as a value means no calls are hijacked.
+.It Ev RUMPHIJACK_RETRYCONNECT
 Change how
 .Xr rumpclient 3
 attempts to reconnect to the server in case the connection is lost.
@@ -70,12 +120,6 @@
 .Xr rumpclient 3
 for more discussion.
 .El
-.Pp
-Currently
-.Nm
-supports only TCP/IP related system calls.
-The set of supported subsystems may change later along with the usage
-of the library.
 .Sh EXAMPLES
 Use an alternate TCP/IP stack for firefox with a persistent server
 connection:



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

2011-02-18 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Feb 18 13:01:22 UTC 2011

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

Log Message:
Cast pthread_self(3) to uintptr_t. ACPICA 20100915:

The ACPI_THREAD_ID type is no longer configurable, internally it is now
always UINT64.  This simplifies the ACPICA code, especially any printf
output.  UINT64 is the only common data type for all thread_id types across
all operating systems.  It is now up to the host OSL to cast the native
thread_id type to UINT64 before returning the value to ACPICA (via
AcpiOsGetThreadId).  Lin Ming, Bob Moore.


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

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

Modified files:

Index: src/sys/external/bsd/acpica/dist/osunixxf.c
diff -u src/sys/external/bsd/acpica/dist/osunixxf.c:1.1.1.2 src/sys/external/bsd/acpica/dist/osunixxf.c:1.2
--- src/sys/external/bsd/acpica/dist/osunixxf.c:1.1.1.2	Thu Feb 17 10:00:51 2011
+++ src/sys/external/bsd/acpica/dist/osunixxf.c	Fri Feb 18 13:01:22 2011
@@ -1157,7 +1157,7 @@
 void)
 {
 
-return (ACPI_CAST_PTHREAD_T (pthread_self()));
+	return (uintptr_t)(ACPI_CAST_PTHREAD_T (pthread_self()));
 }
 
 



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 13:04:52 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
give the signmonkey a banana


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.49 src/lib/librumphijack/hijack.c:1.50
--- src/lib/librumphijack/hijack.c:1.49	Fri Feb 18 11:41:32 2011
+++ src/lib/librumphijack/hijack.c	Fri Feb 18 13:04:52 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.49 2011/02/18 11:41:32 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.50 2011/02/18 13:04:52 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.49 2011/02/18 11:41:32 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.50 2011/02/18 13:04:52 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -336,7 +336,7 @@
 
 	/* if all is present, it must be specified first */
 	if (strncmp(buf, all, strlen(all)) == 0) {
-		for (i = 0; i  __arraycount(rumpsockets); i++) {
+		for (i = 0; i  (int)__arraycount(rumpsockets); i++) {
 			rumpsockets[i] = true;
 		}
 		buf += strlen(all);



CVS commit: src/tests/fs

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 13:07:54 UTC 2011

Modified Files:
src/tests/fs: Makefile
Added Files:
src/tests/fs/hfs: Makefile colon.hfs.bz2.uue t_pathconvert.c

Log Message:
Add test case for /-: conversion from PR kern/44523 by
Taylor R Campbell.

I adjusted the test to uudecode + bunzip2 the supplied image, and
removed the null-finder from the dirent code, since it had an
off-by-one which made the test fail.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tests/fs/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/fs/hfs/Makefile \
src/tests/fs/hfs/colon.hfs.bz2.uue src/tests/fs/hfs/t_pathconvert.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/fs/Makefile
diff -u src/tests/fs/Makefile:1.19 src/tests/fs/Makefile:1.20
--- src/tests/fs/Makefile:1.19	Sun Aug  1 08:32:17 2010
+++ src/tests/fs/Makefile	Fri Feb 18 13:07:54 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2010/08/01 08:32:17 pooka Exp $
+# $NetBSD: Makefile,v 1.20 2011/02/18 13:07:54 pooka Exp $
 
 .include bsd.own.mk
 
@@ -6,7 +6,7 @@
 
 SUBDIR+= 	common .WAIT
 
-TESTS_SUBDIRS+=	ffs kernfs lfs msdosfs nfs nullfs psshfs ptyfs puffs
+TESTS_SUBDIRS+=	ffs hfs kernfs lfs msdosfs nfs nullfs psshfs ptyfs puffs
 TESTS_SUBDIRS+=	tmpfs umapfs union
 TESTS_SUBDIRS+=	vfs
 

Added files:

Index: src/tests/fs/hfs/Makefile
diff -u /dev/null src/tests/fs/hfs/Makefile:1.1
--- /dev/null	Fri Feb 18 13:07:54 2011
+++ src/tests/fs/hfs/Makefile	Fri Feb 18 13:07:54 2011
@@ -0,0 +1,15 @@
+#	$NetBSD: Makefile,v 1.1 2011/02/18 13:07:54 pooka Exp $
+#
+
+TESTSDIR=	${TESTSBASE}/fs/hfs
+
+TESTS_C=	t_pathconvert
+
+FILES=		colon.hfs.bz2.uue
+FILESDIR=	${TESTSDIR}
+
+LDADD+=	-lrumpfs_hfs		# fs drivers
+LDADD+=	-lrumpdev_disk -lrumpdev# disk drivers
+LDADD+=	-lrumpvfs -lrump -lrumpuser -lpthread			# base
+
+.include bsd.test.mk
Index: src/tests/fs/hfs/colon.hfs.bz2.uue
diff -u /dev/null src/tests/fs/hfs/colon.hfs.bz2.uue:1.1
--- /dev/null	Fri Feb 18 13:07:54 2011
+++ src/tests/fs/hfs/colon.hfs.bz2.uue	Fri Feb 18 13:07:54 2011
@@ -0,0 +1,35 @@
+begin 644 colon.hfs.bz2
+M0EIH.3%!629363%?)5P``$+[_UOQ_]__^_O\+1K30045,CBA$'P
+M'DA:2!KIT`3V\VRA*ZPAUVK`E%-)E,IME3T33U--DFRCU,T33T@]-1HQ1M
+M(/2@TGI@9#1B#0F@TT:``R9/4$I$4PTF$Q,B8T)IY(VD:9`3(80TB
+M`$,8C$P$T9!HR:81B,:`D20A3T:GI`9``#(H-`:-```:`
+M08!#1B:`R:83)ID`$:-,`F`)A!H9`Q,@#``8F3`3`30%241HC(4_4GJU-
+M1Y31IM)ID`]3(TH`#0#0T`:!H!A@!H`*9A\L.@+P;@Y:4C2%YM29
+M)Z`H8SU'0U30JHOQ^.'A/7!GQK%#GT'!B0OU+G:^A5RVH2$4VDLT@
+M65#T*A/GU+(_VI$+*$`TJ4J1(B1S-YV+\J^\Z6EK+@TU[0OQJ+;*HW.MN
+M=HTL,CQHCE$C3#EW'#8!IGYY[*)]U$!0W6L;#U:*4X6IT@^*5!16E)%(:*
+MA[$BJX1022R8T4#20D@+ZHA_2_9$72HDSJ-FJ7Z15%U2`@BJGD5'+*A
+M@M6?K^MS^LOC8I)EI6[`O3`#CCKU:M6F6A00-$/:LH+!E7(G33)I*5QT
+M4[$M.$5OJZQKO59^7LNANB-1PEMLB*TT\[=;@7C@EYFG#:K@GLR8^48Y
+MU*QN%C56,Q?,.BW;R9.7;9Z;2,+07U,QGK13C,!FYO^3/?))OZ27I4`@;=
+M4C-$,N=UX98G_0DK)BTS-^)R+8NZ,B3JU:@85-MM@/$$.UFCNQW/?=
+M'ZL4BR[\3S\.KS#1Z2I^+16EM54PV3%K7M$E`.N2E*,8-@V.E3$
+M,K\RU$5E//5.'K6A+44]9=\WF$J@Q1!43!WLA!?XLR2GOU6G-,W]92)1`
+MC@M4A4'FVAA`Q_%1B@L_`Z;T`0[W6SCI%W=H%Y2#EIN[RS3+(:S
+MLMCN$1APB(6_#U!5*#IDA;MLNX`J(:/B8I,UNWB3CDPU2.@(ORCKK
+MK(1*RZ+9V$I2PLER`U4BFIY'VTJ#\NYN2-9DRCIP1([QBLNKT:%1K-P5
+MY)2NL9KM8=ACPMLBSJ(00HA*QYRUL:'A%8F5]22@@@D,;3[C,4.9$P)DK
+M\N+DK'4TLDI*LD8DEM`B3!)=Z,E/#BSM)O*_$9ZZPSI%3*/=47CG8DJ
+MD]U*[RTUH7SC41(FD1V@DT9B\,_CR;`,Y-E8*MM?Z*?BPU`I[I5^G-B$$A.
+M\78DC*:*',@VKX0HL8O)DL-9GG!8NK.2XS2I.;Z3%Q9OIL8?(6-*DEGHW
+MX^A?%APXI:C@,A/6=)7#$UI;1Y6A'C#/EW-*T(8WC9=`B`%\)M5HIS[\
+MV1%+H,,()X19,:)U:Y?V\-T!^]'A\%%%+Z6.PQQI$]3#11IRB#.9-L)^!
+MB-WJYVQVMP^;7VDK?-[M;DQF][:M3)$-F@*(CXT128KESC.#OPP+`$D`G-
+MA6$DKT2V\;3+*:U+2]66T]'1$A`=33.FMDA1G\MA$1V_/+2]%!GTQI'8E03
+M=?AO,S0#0V,9IS,;8KGKL_$RKJFE62392;]B2933`4\$VJ-0$;)-/A]R
+M[D*/0:F1=%1R!B98=^RD4B^;4O-6'*J4J)EVNWN[+!_$)1\;@+#*W5MG'
+MKUWYE^[,*T:U)Y]NUI,00H%874G/?LJ0K)51^BXZ+AI*2O[PI`V*%Q@X\YV
+M!V?D08^;*TYO4R)T6G5:M;_M5M*;H4V)1IKCL$01$`#1R%N5,'_B[DBGA(
+%*^2K@^
+`
+end
Index: src/tests/fs/hfs/t_pathconvert.c
diff -u /dev/null src/tests/fs/hfs/t_pathconvert.c:1.1
--- /dev/null	Fri Feb 18 13:07:54 2011
+++ src/tests/fs/hfs/t_pathconvert.c	Fri Feb 18 13:07:54 2011
@@ -0,0 +1,83 @@
+/*	$NetBSD: t_pathconvert.c,v 1.1 2011/02/18 13:07:54 pooka Exp $	*/
+
+#include sys/types.h
+#include sys/mount.h
+
+#include atf-c.h
+#include dirent.h
+#include errno.h
+#include fcntl.h
+#include limits.h
+#include stdio.h
+#include stdlib.h
+#include unistd.h
+#include string.h
+
+#include rump/rump.h
+#include rump/rump_syscalls.h
+
+#include fs/hfs/hfs.h
+
+#include ../../h_macros.h
+
+ATF_TC(colonslash);
+ATF_TC_HEAD(colonslash, tc)
+{
+	atf_tc_set_md_var(tc, descr, HFS+ colons/slashes (PR kern/44523));
+	atf_tc_set_md_var(tc, timeout, 2);
+}
+
+#define IMGNAME colon.hfs
+#define FAKEBLK /dev/blk
+#define FUNNY_FILENAME foo:bar
+ATF_TC_BODY(colonslash, tc)
+{
+	struct hfs_args args;
+	int dirfd, fd;

CVS commit: src/etc/mtree

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 13:08:41 UTC 2011

Modified Files:
src/etc/mtree: NetBSD.dist.tests

Log Message:
hfs


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/etc/mtree/NetBSD.dist.tests

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/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.27 src/etc/mtree/NetBSD.dist.tests:1.28
--- src/etc/mtree/NetBSD.dist.tests:1.27	Wed Feb  9 14:34:42 2011
+++ src/etc/mtree/NetBSD.dist.tests	Fri Feb 18 13:08:41 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.27 2011/02/09 14:34:42 pooka Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.28 2011/02/18 13:08:41 pooka Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -20,6 +20,7 @@
 ./usr/libdata/debug/usr/tests/dev/sysmon
 ./usr/libdata/debug/usr/tests/fs
 ./usr/libdata/debug/usr/tests/fs/ffs
+./usr/libdata/debug/usr/tests/fs/hfs
 ./usr/libdata/debug/usr/tests/fs/kernfs
 ./usr/libdata/debug/usr/tests/fs/lfs
 ./usr/libdata/debug/usr/tests/fs/msdosfs
@@ -126,6 +127,7 @@
 ./usr/tests/dev/sysmon
 ./usr/tests/fs
 ./usr/tests/fs/ffs
+./usr/tests/fs/hfs
 ./usr/tests/fs/kernfs
 ./usr/tests/fs/lfs
 ./usr/tests/fs/msdosfs



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

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 13:10:04 UTC 2011

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

Log Message:
hfs


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.250 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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.249 src/distrib/sets/lists/tests/mi:1.250
--- src/distrib/sets/lists/tests/mi:1.249	Wed Feb 16 16:02:52 2011
+++ src/distrib/sets/lists/tests/mi	Fri Feb 18 13:10:04 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.249 2011/02/16 16:02:52 pooka Exp $
+# $NetBSD: mi,v 1.250 2011/02/18 13:10:04 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -231,6 +231,8 @@
 ./usr/libdata/debug/usr/tests/fs/ffs/t_snapshot.debug			tests-fs-debug		debug,atf
 ./usr/libdata/debug/usr/tests/fs/ffs/t_snapshot_log.debug			tests-fs-debug		debug,atf
 ./usr/libdata/debug/usr/tests/fs/ffs/t_snapshot_v2.debug			tests-fs-debug		debug,atf
+./usr/libdata/debug/usr/tests/fs/hfs	tests-fs-debug
+./usr/libdata/debug/usr/tests/fs/hfs/t_pathconvert.debug			tests-fs-debug		debug,atf
 ./usr/libdata/debug/usr/tests/fs/kernfs	tests-fs-debug
 ./usr/libdata/debug/usr/tests/fs/kernfs/t_basic.debug			tests-fs-debug		debug,atf
 ./usr/libdata/debug/usr/tests/fs/lfs	tests-fs-debug
@@ -1182,6 +1184,10 @@
 ./usr/tests/fs/ffs/t_snapshot			tests-fs-tests		atf
 ./usr/tests/fs/ffs/t_snapshot_log			tests-fs-tests		atf
 ./usr/tests/fs/ffs/t_snapshot_v2			tests-fs-tests		atf
+./usr/tests/fs/hfstests-fs-tests
+./usr/tests/fs/hfs/Atffile			tests-fs-tests		atf
+./usr/tests/fs/hfs/colon.hfs.bz2.uue			tests-fs-tests		atf
+./usr/tests/fs/hfs/t_pathconvert			tests-fs-tests		atf
 ./usr/tests/fs/kernfstests-fs-tests
 ./usr/tests/fs/kernfs/Atffile			tests-fs-tests		atf
 ./usr/tests/fs/kernfs/t_basic			tests-fs-tests		atf



CVS commit: src/sys/kern

2011-02-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Feb 18 13:24:40 UTC 2011

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

Log Message:
Adjust previous: set the dealloc soft limit to half hard limit.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/kern/vfs_wapbl.c

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

Modified files:

Index: src/sys/kern/vfs_wapbl.c
diff -u src/sys/kern/vfs_wapbl.c:1.41 src/sys/kern/vfs_wapbl.c:1.42
--- src/sys/kern/vfs_wapbl.c:1.41	Wed Feb 16 19:43:05 2011
+++ src/sys/kern/vfs_wapbl.c	Fri Feb 18 13:24:40 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_wapbl.c,v 1.41 2011/02/16 19:43:05 hannken Exp $	*/
+/*	$NetBSD: vfs_wapbl.c,v 1.42 2011/02/18 13:24:40 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #define WAPBL_INTERNAL
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.41 2011/02/16 19:43:05 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.42 2011/02/18 13:24:40 hannken Exp $);
 
 #include sys/param.h
 #include sys/bitops.h
@@ -852,8 +852,7 @@
 		  ((wl-wl_bufcount + (lockcount * 10)) 
 		   wl-wl_bufcount_max / 2) ||
 		  (wapbl_transaction_len(wl)  wl-wl_circ_size / 2) ||
-		  (wl-wl_dealloccnt =
-		   (wl-wl_dealloclim - (wl-wl_dealloclim  8)));
+		  (wl-wl_dealloccnt = (wl-wl_dealloclim / 2));
 	mutex_exit(wl-wl_mtx);
 
 	if (doflush) {



CVS commit: src/sys/dev/acpi

2011-02-18 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Feb 18 13:56:03 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_wakedev.c

Log Message:
A small cleanup for the previous; use kmem(9), add assertions, etc.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/acpi/acpi_wakedev.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/acpi/acpi_wakedev.c
diff -u src/sys/dev/acpi/acpi_wakedev.c:1.22 src/sys/dev/acpi/acpi_wakedev.c:1.23
--- src/sys/dev/acpi/acpi_wakedev.c:1.22	Thu Feb 17 19:36:49 2011
+++ src/sys/dev/acpi/acpi_wakedev.c	Fri Feb 18 13:56:03 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_wakedev.c,v 1.22 2011/02/17 19:36:49 jruoho Exp $ */
+/* $NetBSD: acpi_wakedev.c,v 1.23 2011/02/18 13:56:03 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010, 2011 Jared D. McNeill jmcne...@invisible.ca
@@ -27,13 +27,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_wakedev.c,v 1.22 2011/02/17 19:36:49 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_wakedev.c,v 1.23 2011/02/18 13:56:03 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
+#include sys/kmem.h
 #include sys/sysctl.h
-#include sys/systm.h
-#include sys/malloc.h
 
 #include dev/acpi/acpireg.h
 #include dev/acpi/acpivar.h
@@ -52,10 +51,8 @@
 	NULL,
 };
 
-MALLOC_DECLARE(M_ACPI);
-
-static int32_t acpi_wakedev_acpinode = CTL_EOL;
-static int32_t acpi_wakedev_wakenode = CTL_EOL;
+static int32_t	acpi_wakedev_acpinode = CTL_EOL;
+static int32_t	acpi_wakedev_wakenode = CTL_EOL;
 
 static void	acpi_wakedev_power(struct acpi_devnode *, ACPI_OBJECT *);
 static void	acpi_wakedev_set(struct acpi_devnode *, int);
@@ -65,11 +62,14 @@
 acpi_wakedev_init(struct acpi_devnode *ad)
 {
 	ACPI_OBJECT *elm, *obj;
-	ACPI_HANDLE hdl = NULL;
-	ACPI_INTEGER val = 0;
+	ACPI_INTEGER val;
+	ACPI_HANDLE hdl;
 	ACPI_BUFFER buf;
 	ACPI_STATUS rv;
 
+	KASSERT(ad != NULL  ad-ad_wakedev == NULL);
+	KASSERT(ad-ad_devinfo-Type == ACPI_TYPE_DEVICE);
+
 	rv = acpi_eval_struct(ad-ad_handle, _PRW, buf);
 
 	if (ACPI_FAILURE(rv))
@@ -82,7 +82,7 @@
 		goto out;
 	}
 
-	if (obj-Package.Count  2) {
+	if (obj-Package.Count  2 || obj-Package.Count  UINT32_MAX) {
 		rv = AE_LIMIT;
 		goto out;
 	}
@@ -100,6 +100,7 @@
 
 	case ACPI_TYPE_INTEGER:
 		val = elm-Integer.Value;
+		hdl = NULL;
 		break;
 
 	case ACPI_TYPE_PACKAGE:
@@ -126,8 +127,7 @@
 		goto out;
 	}
 
-	ad-ad_wakedev = malloc(sizeof(*ad-ad_wakedev),
-	M_ACPI, M_NOWAIT | M_ZERO);
+	ad-ad_wakedev = kmem_zalloc(sizeof(*ad-ad_wakedev), KM_NOSLEEP);
 
 	if (ad-ad_wakedev == NULL)
 		return;
@@ -146,13 +146,13 @@
 		ad-ad_wakedev-aw_sleep = elm-Integer.Value;
 
 	/*
-	 * Rest of the elements are references
-	 * to power resources. Store these.
+	 * The rest of the elements are reference
+	 * handles to power resources. Store these.
 	 */
 	acpi_wakedev_power(ad, obj);
 
 	/*
-	 * Last but not least, mark GPEs for wake.
+	 * Last but not least, mark the GPE for wake.
 	 */
 	rv = AcpiSetupGpeForWake(ad-ad_handle, hdl, val);
 
@@ -209,7 +209,7 @@
 	aw-aw_enable = false;
 
 	if (acpi_match_hid(ad-ad_devinfo, acpi_wakedev_default))
-		ad-ad_wakedev-aw_enable = true;
+		aw-aw_enable = true;
 
 	if (acpi_wakedev_acpinode == CTL_EOL ||
 	acpi_wakedev_wakenode == CTL_EOL)
@@ -229,7 +229,7 @@
 
 	err = sysctl_createv(NULL, 0, NULL, NULL,
 	CTLFLAG_READWRITE, CTLTYPE_BOOL, str,
-	NULL, NULL, 0, ad-ad_wakedev-aw_enable, 0, CTL_HW,
+	NULL, NULL, 0, aw-aw_enable, 0, CTL_HW,
 	acpi_wakedev_acpinode, acpi_wakedev_wakenode,
 	CTL_CREATE, CTL_EOL);
 
@@ -311,7 +311,6 @@
 	 */
 	if (aw-aw_enable != true)
 		rv = AcpiSetGpeWakeMask(hdl, val, ACPI_GPE_DISABLE);
-
 	else {
 		rv = AcpiSetGpeWakeMask(hdl, val, ACPI_GPE_ENABLE);
 
@@ -324,7 +323,13 @@
 			goto out;
 
 		/*
-		 * Turn on power resources.
+		 * Turn power resources on.
+		 *
+		 * XXX: We should also turn these off for devices
+		 *	that are not allowed to wake the system.
+		 *	However, as these are not yet integrated
+		 *	with pmf(9), we can not risk devices to
+		 *	possibly resume in a power-off state.
 		 */
 		for (i = 0; i  __arraycount(aw-aw_power); i++) {
 
@@ -335,11 +340,11 @@
 		}
 	}
 
+out:
 	if (state  aw-aw_sleep)
 		aprint_error_dev(ad-ad_root, sleep state S%d 
 		loses wake for %s\n, state, ad-ad_name);
 
-out:
 	if (ACPI_FAILURE(rv)  rv != AE_NOT_FOUND)
 		aprint_error_dev(ad-ad_root, failed to set wake GPE 
 		for %s: %s\n, ad-ad_name, AcpiFormatException(rv));



CVS commit: src/sys/dev/wscons

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 18 13:56:11 UTC 2011

Modified Files:
src/sys/dev/wscons: wsdisplay_vcons.c wsdisplay_vconsvar.h

Log Message:
add vcons_hard_switch, for switching w/o callouts (eg. entering ddb)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/wscons/wsdisplay_vcons.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/wscons/wsdisplay_vconsvar.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/wscons/wsdisplay_vcons.c
diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.23 src/sys/dev/wscons/wsdisplay_vcons.c:1.24
--- src/sys/dev/wscons/wsdisplay_vcons.c:1.23	Wed Feb  9 13:19:18 2011
+++ src/sys/dev/wscons/wsdisplay_vcons.c	Fri Feb 18 13:56:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_vcons.c,v 1.23 2011/02/09 13:19:18 jmcneill Exp $ */
+/*	$NetBSD: wsdisplay_vcons.c,v 1.24 2011/02/18 13:56:11 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsdisplay_vcons.c,v 1.23 2011/02/09 13:19:18 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsdisplay_vcons.c,v 1.24 2011/02/18 13:56:11 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1479,3 +1479,21 @@
 		atomic_inc_uint(scr-scr_dirty);
 #endif
 }
+
+void
+vcons_hard_switch(struct vcons_screen *scr)
+{
+	struct vcons_data *vd = scr-scr_vd;
+	struct vcons_screen *oldscr = vd-active;
+
+	if (oldscr) {
+		SCREEN_INVISIBLE(oldscr);
+		oldscr-scr_ri.ri_flg = ~RI_CURSOR;
+	}
+	SCREEN_VISIBLE(scr);
+	vd-active = scr;
+	vd-wanted = NULL;
+
+	if (vd-show_screen_cb != NULL)
+		vd-show_screen_cb(scr);
+}

Index: src/sys/dev/wscons/wsdisplay_vconsvar.h
diff -u src/sys/dev/wscons/wsdisplay_vconsvar.h:1.17 src/sys/dev/wscons/wsdisplay_vconsvar.h:1.18
--- src/sys/dev/wscons/wsdisplay_vconsvar.h:1.17	Wed Feb  9 13:19:19 2011
+++ src/sys/dev/wscons/wsdisplay_vconsvar.h	Fri Feb 18 13:56:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_vconsvar.h,v 1.17 2011/02/09 13:19:19 jmcneill Exp $ */
+/*	$NetBSD: wsdisplay_vconsvar.h,v 1.18 2011/02/18 13:56:11 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -177,5 +177,6 @@
 
 void	vcons_enable_polling(struct vcons_data *);
 void	vcons_disable_polling(struct vcons_data *);
+void	vcons_hard_switch(struct vcons_screen *);
 
 #endif /* _WSDISPLAY_VCONS_H_ */



CVS commit: src/sys/dev/wsfb

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 18 13:56:59 UTC 2011

Modified Files:
src/sys/dev/wsfb: genfb.c

Log Message:
call vcons_hard_switch to switch to the console screen when entering polling
mode, makes ddb-from-X work with genfb on x86


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.36 src/sys/dev/wsfb/genfb.c:1.37
--- src/sys/dev/wsfb/genfb.c:1.36	Sat Feb 12 17:15:27 2011
+++ src/sys/dev/wsfb/genfb.c	Fri Feb 18 13:56:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.36 2011/02/12 17:15:27 phx Exp $ */
+/*	$NetBSD: genfb.c,v 1.37 2011/02/18 13:56:58 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: genfb.c,v 1.36 2011/02/12 17:15:27 phx Exp $);
+__KERNEL_RCSID(0, $NetBSD: genfb.c,v 1.37 2011/02/18 13:56:58 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -692,6 +692,7 @@
 	struct genfb_softc *sc = device_private(dev);
 
 	SCREEN_ENABLE_DRAWING(sc-sc_console_screen);
+	vcons_hard_switch(sc-sc_console_screen);
 	vcons_enable_polling(sc-vd);
 }
 



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 14:25:04 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
uhm, put PF_LOCAL on the socketlist


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.50 src/lib/librumphijack/hijack.c:1.51
--- src/lib/librumphijack/hijack.c:1.50	Fri Feb 18 13:04:52 2011
+++ src/lib/librumphijack/hijack.c	Fri Feb 18 14:25:04 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.50 2011/02/18 13:04:52 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.51 2011/02/18 14:25:04 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.50 2011/02/18 13:04:52 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.51 2011/02/18 14:25:04 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -320,6 +320,7 @@
 	int pf;
 	const char *name;
 } socketmap[] = {
+	{ PF_LOCAL, local },
 	{ PF_INET, inet },
 	{ PF_LINK, link },
 	{ PF_ROUTE, route },



CVS commit: src/sys/modules/drm

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 18 14:26:40 UTC 2011

Modified Files:
src/sys/modules/drm: Makefile

Log Message:
add drm_sman, drm_mm, drm_hashtab


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/drm/Makefile

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

Modified files:

Index: src/sys/modules/drm/Makefile
diff -u src/sys/modules/drm/Makefile:1.3 src/sys/modules/drm/Makefile:1.4
--- src/sys/modules/drm/Makefile:1.3	Mon Jun 22 13:13:08 2009
+++ src/sys/modules/drm/Makefile	Fri Feb 18 14:26:40 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2009/06/22 13:13:08 tron Exp $
+# $NetBSD: Makefile,v 1.4 2011/02/18 14:26:40 jmcneill Exp $
 
 .include ../Makefile.inc
 
@@ -14,12 +14,15 @@
 SRCS+=	drm_drawable.c
 SRCS+=	drm_drv.c
 SRCS+=	drm_fops.c
+SRCS+=	drm_hashtab.c
 SRCS+=	drm_ioctl.c
 SRCS+=	drm_irq.c
 SRCS+=	drm_lock.c
 SRCS+=	drm_memory.c
+SRCS+=	drm_mm.c
 SRCS+=	drm_pci.c
 SRCS+=	drm_scatter.c
+SRCS+=	drm_sman.c
 SRCS+=	drm_sysctl.c
 SRCS+=	drm_vm.c
 



CVS commit: src/sys/modules/viadrm

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 18 14:26:52 UTC 2011

Modified Files:
src/sys/modules/viadrm: Makefile

Log Message:
add via_dmablit


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/viadrm/Makefile

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

Modified files:

Index: src/sys/modules/viadrm/Makefile
diff -u src/sys/modules/viadrm/Makefile:1.2 src/sys/modules/viadrm/Makefile:1.3
--- src/sys/modules/viadrm/Makefile:1.2	Fri Feb 18 02:00:36 2011
+++ src/sys/modules/viadrm/Makefile	Fri Feb 18 14:26:52 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2011/02/18 02:00:36 jmcneill Exp $
+# $NetBSD: Makefile,v 1.3 2011/02/18 14:26:52 jmcneill Exp $
 
 .include ../Makefile.inc
 
@@ -10,6 +10,7 @@
 
 SRCS=	via_drv.c
 SRCS+=	via_dma.c
+SRCS+=	via_dmablit.c
 SRCS+=	via_ds.c
 SRCS+=	via_irq.c
 SRCS+=	via_map.c



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 14:33:11 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
fix rename


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.51 src/lib/librumphijack/hijack.c:1.52
--- src/lib/librumphijack/hijack.c:1.51	Fri Feb 18 14:25:04 2011
+++ src/lib/librumphijack/hijack.c	Fri Feb 18 14:33:11 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.51 2011/02/18 14:25:04 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.52 2011/02/18 14:33:11 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.51 2011/02/18 14:25:04 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.52 2011/02/18 14:33:11 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -689,6 +689,25 @@
 	return rv;
 }
 
+int
+rename(const char *from, const char *to)
+{
+	int (*op_rename)(const char *, const char *);
+
+	if (path_isrump(from)) {
+		if (!path_isrump(to))
+			return EXDEV;
+
+		from = path_host2rump(from);
+		to = path_host2rump(to);
+		op_rename = GETSYSCALL(rump, RENAME);
+	} else {
+		op_rename = GETSYSCALL(host, RENAME);
+	}
+
+	return op_rename(from, to);
+}
+
 int __socket30(int, int, int);
 int
 __socket30(int domain, int type, int protocol)
@@ -1618,12 +1637,6 @@
 	(const char *, char *, size_t),	\
 	(path, buf, bufsiz))
 
-/* XXX: cross-kernel renames need to be blocked */
-PATHCALL(int, rename, DUALCALL_RENAME,	\
-	(const char *path, const char *to),\
-	(const char *, const char *),	\
-	(path, to))
-
 PATHCALL(int, mkdir, DUALCALL_MKDIR,	\
 	(const char *path, mode_t mode),\
 	(const char *, mode_t),		\



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 14:44:46 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
block cross-kernel rename in the other direction also


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.52 src/lib/librumphijack/hijack.c:1.53
--- src/lib/librumphijack/hijack.c:1.52	Fri Feb 18 14:33:11 2011
+++ src/lib/librumphijack/hijack.c	Fri Feb 18 14:44:46 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.52 2011/02/18 14:33:11 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.53 2011/02/18 14:44:46 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.52 2011/02/18 14:33:11 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.53 2011/02/18 14:44:46 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -702,6 +702,9 @@
 		to = path_host2rump(to);
 		op_rename = GETSYSCALL(rump, RENAME);
 	} else {
+		if (path_isrump(to))
+			return EXDEV;
+
 		op_rename = GETSYSCALL(host, RENAME);
 	}
 



CVS commit: [bouyer-quota2] src/sys

2011-02-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 18 14:45:59 UTC 2011

Modified Files:
src/sys/rump/fs/lib/libffs [bouyer-quota2]: Makefile
src/sys/rump/librump/rumpvfs [bouyer-quota2]: Makefile.rumpvfs
src/sys/ufs [bouyer-quota2]: files.ufs

Log Message:
quota2_subr.c is not used outside of ufs_quota2.c in kernel, so make it
compiled conditionally on QUOTA2 again


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.2 -r1.12.4.3 src/sys/rump/fs/lib/libffs/Makefile
cvs rdiff -u -r1.28.4.1 -r1.28.4.2 \
src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
cvs rdiff -u -r1.24.6.4 -r1.24.6.5 src/sys/ufs/files.ufs

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/fs/lib/libffs/Makefile
diff -u src/sys/rump/fs/lib/libffs/Makefile:1.12.4.2 src/sys/rump/fs/lib/libffs/Makefile:1.12.4.3
--- src/sys/rump/fs/lib/libffs/Makefile:1.12.4.2	Tue Feb 15 16:45:57 2011
+++ src/sys/rump/fs/lib/libffs/Makefile	Fri Feb 18 14:45:59 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12.4.2 2011/02/15 16:45:57 bouyer Exp $
+#	$NetBSD: Makefile,v 1.12.4.3 2011/02/18 14:45:59 bouyer Exp $
 #
 
 .PATH:  ${.CURDIR}/../../../../ufs/ffs ${.CURDIR}/../../../../ufs/ufs
@@ -11,7 +11,7 @@
 
 SRCS+=	ufs_bmap.c ufs_dirhash.c ufs_extattr.c ufs_ihash.c ufs_inode.c	\
 	ufs_lookup.c ufs_vfsops.c ufs_vnops.c ufs_wapbl.c \
-	ufs_quota.c ufs_quota2.c
+	ufs_quota.c ufs_quota2.c quota2_subr.c
 
 CPPFLAGS+=	-DFFS_EI -DUFS_DIRHASH -DWAPBL -DAPPLE_UFS -DUFS_EXTATTR \
 		-DQUOTA2

Index: src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
diff -u src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.28.4.1 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.28.4.2
--- src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.28.4.1	Tue Feb 15 16:45:57 2011
+++ src/sys/rump/librump/rumpvfs/Makefile.rumpvfs	Fri Feb 18 14:45:59 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpvfs,v 1.28.4.1 2011/02/15 16:45:57 bouyer Exp $
+#	$NetBSD: Makefile.rumpvfs,v 1.28.4.2 2011/02/18 14:45:59 bouyer Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -51,7 +51,7 @@
 SRCS+=	mfs_miniroot.c
 
 #quota2 plists
-SRCS+= quota1_subr.c quota2_subr.c quota2_prop.c 
+SRCS+= quota1_subr.c quota2_prop.c 
 
 # dev
 # firmload is technically part of rumpdev, but it's pure vfs in nature.

Index: src/sys/ufs/files.ufs
diff -u src/sys/ufs/files.ufs:1.24.6.4 src/sys/ufs/files.ufs:1.24.6.5
--- src/sys/ufs/files.ufs:1.24.6.4	Tue Feb 15 16:45:57 2011
+++ src/sys/ufs/files.ufs	Fri Feb 18 14:45:59 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.ufs,v 1.24.6.4 2011/02/15 16:45:57 bouyer Exp $
+#	$NetBSD: files.ufs,v 1.24.6.5 2011/02/18 14:45:59 bouyer Exp $
 
 deffs	FFS
 deffs	EXT2FS
@@ -63,7 +63,7 @@
 file	ufs/ufs/ufs_quota1.c		quota  (ffs | lfs | mfs | ext2fs)
 file	ufs/ufs/ufs_quota2.c		quota2  (ffs | lfs | mfs | ext2fs)
 file	ufs/ufs/quota1_subr.c
-file	ufs/ufs/quota2_subr.c
+file	ufs/ufs/quota2_subr.c		quota2  (ffs | lfs | mfs | ext2fs)
 file	ufs/ufs/quota2_prop.c
 file	ufs/ufs/ufs_vfsops.c		ffs | lfs | mfs | ext2fs
 file	ufs/ufs/ufs_vnops.c		ffs | lfs | mfs | ext2fs



CVS commit: src/sys/ufs/ffs

2011-02-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 18 14:48:54 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_snapshot.c

Log Message:
Initialize error in snapshot_expunge(); if the list is empty error would
be returned uninitialized. t_snapshot_v2 was failing for me when
librumpffs was compiled DGB=-g.
No idea why gcc didn't catch this ...


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/ufs/ffs/ffs_snapshot.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/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.104 src/sys/ufs/ffs/ffs_snapshot.c:1.105
--- src/sys/ufs/ffs/ffs_snapshot.c:1.104	Fri Feb 18 08:39:13 2011
+++ src/sys/ufs/ffs/ffs_snapshot.c	Fri Feb 18 14:48:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.104 2011/02/18 08:39:13 hannken Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.105 2011/02/18 14:48:54 bouyer Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.104 2011/02/18 08:39:13 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.105 2011/02/18 14:48:54 bouyer Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -563,7 +563,7 @@
 snapshot_expunge(struct mount *mp, struct vnode *vp, struct fs *copy_fs,
 daddr_t *snaplistsize, daddr_t **snaplist)
 {
-	int cg, error, len, loc;
+	int cg, error = 0, len, loc;
 	daddr_t blkno, *blkp;
 	struct fs *fs = VFSTOUFS(mp)-um_fs;
 	struct inode *xp;



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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb 18 16:02:48 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: topcat.c

Log Message:
Make local functions and variables static.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/topcat.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/hp300/dev/topcat.c
diff -u src/sys/arch/hp300/dev/topcat.c:1.2 src/sys/arch/hp300/dev/topcat.c:1.3
--- src/sys/arch/hp300/dev/topcat.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/topcat.c	Fri Feb 18 16:02:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: topcat.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: topcat.c,v 1.3 2011/02/18 16:02:48 tsutsui Exp $	*/
 /*	$OpenBSD: topcat.c,v 1.15 2006/08/11 18:33:13 miod Exp $	*/
 
 /*
@@ -129,10 +129,10 @@
 	int		sc_scode;
 };
 
-int	topcat_dio_match(device_t, cfdata_t, void *);
-void	topcat_dio_attach(device_t, device_t, void *);
-int	topcat_intio_match(device_t, cfdata_t, void *);
-void	topcat_intio_attach(device_t, device_t, void *);
+static int	topcat_dio_match(device_t, cfdata_t, void *);
+static void	topcat_dio_attach(device_t, device_t, void *);
+static int	topcat_intio_match(device_t, cfdata_t, void *);
+static void	topcat_intio_attach(device_t, device_t, void *);
 
 CFATTACH_DECL_NEW(topcat_dio, sizeof(struct topcat_softc),
 topcat_dio_match, topcat_dio_attach, NULL, NULL);
@@ -140,17 +140,17 @@
 CFATTACH_DECL_NEW(topcat_intio, sizeof(struct topcat_softc),
 topcat_intio_match, topcat_intio_attach, NULL, NULL);
 
-void	topcat_end_attach(struct topcat_softc *, uint8_t);
-int	topcat_reset(struct diofb *, int, struct diofbreg *);
-void	topcat_restore(struct diofb *);
-int	topcat_setcmap(struct diofb *, struct wsdisplay_cmap *);
-void	topcat_setcolor(struct diofb *, u_int);
-int	topcat_windowmove(struct diofb *, uint16_t, uint16_t, uint16_t,
-	uint16_t, uint16_t, uint16_t, int16_t, int16_t);
+static void	topcat_end_attach(struct topcat_softc *, uint8_t);
+static int	topcat_reset(struct diofb *, int, struct diofbreg *);
+static void	topcat_restore(struct diofb *);
+static int	topcat_setcmap(struct diofb *, struct wsdisplay_cmap *);
+static void	topcat_setcolor(struct diofb *, u_int);
+static int	topcat_windowmove(struct diofb *, uint16_t, uint16_t, uint16_t,
+		uint16_t, uint16_t, uint16_t, int16_t, int16_t);
 
-int	topcat_ioctl(void *, void *, u_long, void *, int, struct lwp *);
+static int	topcat_ioctl(void *, void *, u_long, void *, int, struct lwp *);
 
-struct	wsdisplay_accessops	topcat_accessops = {
+static struct wsdisplay_accessops topcat_accessops = {
 	topcat_ioctl,
 	diofb_mmap,
 	diofb_alloc_screen,



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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb 18 16:05:22 UTC 2011

Modified Files:
src/sys/arch/hp300/include: bus.h

Log Message:
Add definitions for stream methods.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hp300/include/bus.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/hp300/include/bus.h
diff -u src/sys/arch/hp300/include/bus.h:1.16 src/sys/arch/hp300/include/bus.h:1.17
--- src/sys/arch/hp300/include/bus.h:1.16	Sat Feb 12 05:15:39 2011
+++ src/sys/arch/hp300/include/bus.h	Fri Feb 18 16:05:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.h,v 1.16 2011/02/12 05:15:39 tsutsui Exp $	*/
+/*	$NetBSD: bus.h,v 1.17 2011/02/18 16:05:22 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -727,6 +727,35 @@
 #undef __HP300_copy_region_N
 
 /*
+ * Bus stream operations--defined in terms of non-stream counterparts
+ */
+#define	__BUS_SPACE_HAS_STREAM_METHODS 1
+#define	bus_space_read_stream_1 bus_space_read_1
+#define	bus_space_read_stream_2 bus_space_read_2
+#define	bus_space_read_stream_4 bus_space_read_4
+#define	bus_space_read_stream_8 bus_space_read_8
+#define	bus_space_read_multi_stream_1 bus_space_read_multi_1
+#define	bus_space_read_multi_stream_2 bus_space_read_multi_2
+#define	bus_space_read_multi_stream_4 bus_space_read_multi_4
+#define	bus_space_read_multi_stream_8 bus_space_read_multi_8
+#define	bus_space_read_region_stream_1 bus_space_read_region_1
+#define	bus_space_read_region_stream_2 bus_space_read_region_2
+#define	bus_space_read_region_stream_4 bus_space_read_region_4
+#define	bus_space_read_region_stream_8 bus_space_read_region_8
+#define	bus_space_write_stream_1 bus_space_write_1
+#define	bus_space_write_stream_2 bus_space_write_2
+#define	bus_space_write_stream_4 bus_space_write_4
+#define	bus_space_write_stream_8 bus_space_write_8
+#define	bus_space_write_multi_stream_1 bus_space_write_multi_1
+#define	bus_space_write_multi_stream_2 bus_space_write_multi_2
+#define	bus_space_write_multi_stream_4 bus_space_write_multi_4
+#define	bus_space_write_multi_stream_8 bus_space_write_multi_8
+#define	bus_space_write_region_stream_1 bus_space_write_region_1
+#define	bus_space_write_region_stream_2 bus_space_write_region_2
+#define	bus_space_write_region_stream_4 bus_space_write_region_4
+#define	bus_space_write_region_stream_8	bus_space_write_region_8
+
+/*
  * Bus read/write barrier methods.
  *
  *	void bus_space_barrier(bus_space_tag_t tag,



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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb 18 16:06:20 UTC 2011

Modified Files:
src/sys/arch/hp300/conf: files.hp300

Log Message:
sgc takes slot, not scode.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/hp300/conf/files.hp300

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/hp300/conf/files.hp300
diff -u src/sys/arch/hp300/conf/files.hp300:1.82 src/sys/arch/hp300/conf/files.hp300:1.83
--- src/sys/arch/hp300/conf/files.hp300:1.82	Sat Feb 12 15:49:01 2011
+++ src/sys/arch/hp300/conf/files.hp300	Fri Feb 18 16:06:20 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.hp300,v 1.82 2011/02/12 15:49:01 tsutsui Exp $
+#	$NetBSD: files.hp300,v 1.83 2011/02/18 16:06:20 tsutsui Exp $
 #
 # hp300-specific configuration info
 
@@ -46,7 +46,7 @@
 # SGC bus
 #
 
-device	sgc { scode = -1 }
+device	sgc { slot = -1 }
 attach	sgc at mainbus
 file	arch/hp300/dev/sgc.c		sgc
 



CVS commit: src/lib/librmt

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 16:10:10 UTC 2011

Modified Files:
src/lib/librmt: rmtlib.c

Log Message:
Improve isrmt() check: it cannot be a rmt fd if there are no pipes
open for the fd.  Prevents collision with rumphijack.

Also, prevent potential hyperspace memory access.

Does someone want to write tests for this facility?


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/librmt/rmtlib.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/librmt/rmtlib.c
diff -u src/lib/librmt/rmtlib.c:1.22 src/lib/librmt/rmtlib.c:1.23
--- src/lib/librmt/rmtlib.c:1.22	Tue Aug 31 05:12:35 2010
+++ src/lib/librmt/rmtlib.c	Fri Feb 18 16:10:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmtlib.c,v 1.22 2010/08/31 05:12:35 enami Exp $	*/
+/*	$NetBSD: rmtlib.c,v 1.23 2011/02/18 16:10:09 pooka Exp $	*/
 
 /*
  *	rmt --- remote tape emulator subroutines
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: rmtlib.c,v 1.22 2010/08/31 05:12:35 enami Exp $);
+__RCSID($NetBSD: rmtlib.c,v 1.23 2011/02/18 16:10:09 pooka Exp $);
 
 #define RMTIOCTL	1
 /* #define USE_REXEC	1 */	/* rexec code courtesy of Dan Kegel, srs!dan */
@@ -670,8 +670,10 @@
 int
 isrmt(int fd)
 {
+	int unbias = fd - REM_BIAS;
 
-	return (fd = REM_BIAS);
+	return (fd = REM_BIAS)  unbias  MAXUNIT 
+	(WRITE(unbias) != -1 || READ(unbias) != -1);
 }
 
 



CVS commit: src/sys/netipsec

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 16:10:11 UTC 2011

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

Log Message:
deal with IPv6 address scope, so that SA lookup for
link-local addresses works
(PR kern/43071 is related, but refers to KAME IPSEC)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/netipsec/ipsec_input.c

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

Modified files:

Index: src/sys/netipsec/ipsec_input.c
diff -u src/sys/netipsec/ipsec_input.c:1.25 src/sys/netipsec/ipsec_input.c:1.26
--- src/sys/netipsec/ipsec_input.c:1.25	Thu Feb 17 20:20:18 2011
+++ src/sys/netipsec/ipsec_input.c	Fri Feb 18 16:10:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_input.c,v 1.25 2011/02/17 20:20:18 drochner Exp $	*/
+/*	$NetBSD: ipsec_input.c,v 1.26 2011/02/18 16:10:11 drochner Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $	*/
 /*	$OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $	*/
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.25 2011/02/17 20:20:18 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.26 2011/02/18 16:10:11 drochner Exp $);
 
 /*
  * IPsec input processing.
@@ -75,6 +75,7 @@
 #ifdef INET6
 #include netinet6/ip6_var.h
 #include netinet6/ip6_private.h
+#include netinet6/scope6_var.h
 #endif
 #include netinet/in_pcb.h
 #ifdef INET6
@@ -204,6 +205,10 @@
 		m_copydata(m, offsetof(struct ip6_hdr, ip6_dst),
 		sizeof(struct in6_addr),
 		dst_address.sin6.sin6_addr);
+		if (sa6_recoverscope(dst_address.sin6)) {
+			m_freem(m);
+			return EINVAL;
+		}
 		break;
 #endif /* INET6 */
 	default:



CVS commit: src/sys/netipsec

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 16:12:26 UTC 2011

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

Log Message:
do proper statistics counting for outbound packets, fixes PR kern/30182
by Gilles Roy


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

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

Modified files:

Index: src/sys/netipsec/ipsec_output.c
diff -u src/sys/netipsec/ipsec_output.c:1.31 src/sys/netipsec/ipsec_output.c:1.32
--- src/sys/netipsec/ipsec_output.c:1.31	Thu Feb 10 20:42:30 2011
+++ src/sys/netipsec/ipsec_output.c	Fri Feb 18 16:12:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_output.c,v 1.31 2011/02/10 20:42:30 drochner Exp $	*/
+/*	$NetBSD: ipsec_output.c,v 1.32 2011/02/18 16:12:26 drochner Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipsec_output.c,v 1.31 2011/02/10 20:42:30 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipsec_output.c,v 1.32 2011/02/18 16:12:26 drochner Exp $);
 
 /*
  * IPsec output processing.
@@ -263,6 +263,8 @@
 		goto bad;
 	}
 
+	key_sa_recordxfer(sav, m);
+
 	/*
 	 * If there's another (bundled) SA to apply, do so.
 	 * Note that this puts a burden on the kernel stack size.



CVS commit: src/lib/librumpclient

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 16:22:10 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c

Log Message:
I think I skipped the class where they taught that multiplication
is done before addition...


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/librumpclient/rumpclient.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/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.32 src/lib/librumpclient/rumpclient.c:1.33
--- src/lib/librumpclient/rumpclient.c:1.32	Wed Feb 16 19:26:58 2011
+++ src/lib/librumpclient/rumpclient.c	Fri Feb 18 16:22:10 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.32 2011/02/16 19:26:58 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.33 2011/02/18 16:22:10 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -1002,7 +1002,7 @@
 	for (nelem = 0; envp  envp[nelem]; nelem++)
 		continue;
 
-	newenv = malloc(sizeof(*newenv) * nelem+3);
+	newenv = malloc(sizeof(*newenv) * (nelem+3));
 	if (newenv == NULL) {
 		free(envstr2);
 		free(envstr);



CVS commit: src/sys/arch/powerpc/oea

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 18 16:40:51 UTC 2011

Modified Files:
src/sys/arch/powerpc/oea: pmap.c pmap_kernel.c

Log Message:
Move powerpc_mmap_flags since pmap.c can get compiled multiple time resulting
in multiple defintions of powerpc_mmap_flags.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/oea/pmap_kernel.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/powerpc/oea/pmap.c
diff -u src/sys/arch/powerpc/oea/pmap.c:1.77 src/sys/arch/powerpc/oea/pmap.c:1.78
--- src/sys/arch/powerpc/oea/pmap.c:1.77	Tue Feb 15 19:39:12 2011
+++ src/sys/arch/powerpc/oea/pmap.c	Fri Feb 18 16:40:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.77 2011/02/15 19:39:12 macallan Exp $	*/
+/*	$NetBSD: pmap.c,v 1.78 2011/02/18 16:40:50 matt Exp $	*/
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.77 2011/02/15 19:39:12 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.78 2011/02/18 16:40:50 matt Exp $);
 
 #define	PMAP_NOOPNAMES
 
@@ -3520,16 +3520,3 @@
 	}
 #endif
 }
-
-u_int
-powerpc_mmap_flags(paddr_t pa)
-{
-	u_int flags = PMAP_MD_NOCACHE;
-
-	if (pa  POWERPC_MMAP_FLAG_PREFETCHABLE)
-		flags |= PMAP_MD_PREFETCHABLE;
-	if (pa  POWERPC_MMAP_FLAG_CACHEABLE)
-		flags = ~PMAP_MD_NOCACHE;
-	return flags;
-}
-

Index: src/sys/arch/powerpc/oea/pmap_kernel.c
diff -u src/sys/arch/powerpc/oea/pmap_kernel.c:1.3 src/sys/arch/powerpc/oea/pmap_kernel.c:1.4
--- src/sys/arch/powerpc/oea/pmap_kernel.c:1.3	Sat Feb 12 18:23:10 2011
+++ src/sys/arch/powerpc/oea/pmap_kernel.c	Fri Feb 18 16:40:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_kernel.c,v 1.3 2011/02/12 18:23:10 matt Exp $	*/
+/*	$NetBSD: pmap_kernel.c,v 1.4 2011/02/18 16:40:50 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: pmap_kernel.c,v 1.3 2011/02/12 18:23:10 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: pmap_kernel.c,v 1.4 2011/02/18 16:40:50 matt Exp $);
 
 #include opt_ddb.h
 #include opt_pmap.h
@@ -41,6 +41,18 @@
 extern struct pmap kernel_pmap_;
 struct pmap *const kernel_pmap_ptr = kernel_pmap_;
 
+u_int
+powerpc_mmap_flags(paddr_t pa)
+{
+	u_int flags = PMAP_MD_NOCACHE;
+
+	if (pa  POWERPC_MMAP_FLAG_PREFETCHABLE)
+		flags |= PMAP_MD_PREFETCHABLE;
+	if (pa  POWERPC_MMAP_FLAG_CACHEABLE)
+		flags = ~PMAP_MD_NOCACHE;
+	return flags;
+}
+
 #ifdef PMAP_NEEDS_FIXUP
 #include powerpc/instr.h
 



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

2011-02-18 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Feb 18 17:26:08 UTC 2011

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

Log Message:
Revert previous.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/acpica/dist/osunixxf.c

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

Modified files:

Index: src/sys/external/bsd/acpica/dist/osunixxf.c
diff -u src/sys/external/bsd/acpica/dist/osunixxf.c:1.2 src/sys/external/bsd/acpica/dist/osunixxf.c:1.3
--- src/sys/external/bsd/acpica/dist/osunixxf.c:1.2	Fri Feb 18 13:01:22 2011
+++ src/sys/external/bsd/acpica/dist/osunixxf.c	Fri Feb 18 17:26:07 2011
@@ -1156,8 +1156,7 @@
 AcpiOsGetThreadId (
 void)
 {
-
-	return (uintptr_t)(ACPI_CAST_PTHREAD_T (pthread_self()));
+return (ACPI_CAST_PTHREAD_T (pthread_self()));
 }
 
 



CVS commit: src/sys/external/bsd/acpica/dist/include/platform

2011-02-18 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Feb 18 17:31:14 UTC 2011

Modified Files:
src/sys/external/bsd/acpica/dist/include/platform: acnetbsd.h

Log Message:
Provide ACPI_CAST_PTHREAD_T(x).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.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/external/bsd/acpica/dist/include/platform/acnetbsd.h
diff -u src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h:1.4 src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h:1.5
--- src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h:1.4	Thu Feb 17 10:12:50 2011
+++ src/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h	Fri Feb 18 17:31:14 2011
@@ -1,7 +1,7 @@
 /**
  *
  * Name: acnetbsd.h - OS specific defines, etc.
- *   $Revision: 1.4 $
+ *   $Revision: 1.5 $
  *
  */
 
@@ -51,6 +51,7 @@
 
 #define ACPI_UINTPTR_T		uintptr_t
 #define ACPI_USE_LOCAL_CACHE
+#define ACPI_CAST_PTHREAD_T(x)((ACPI_THREAD_ID) ACPI_TO_INTEGER (x))
 
 #ifdef _LP64
 #define ACPI_MACHINE_WIDTH  64



CVS commit: src/external/bsd/acpica/bin/iasl

2011-02-18 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Feb 18 17:34:22 UTC 2011

Modified Files:
src/external/bsd/acpica/bin/iasl: Makefile

Log Message:
Build this for NetBSD, not Linux. Thanks to Takahiro HAYASHI
for pointing this out.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/acpica/bin/iasl/Makefile

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

Modified files:

Index: src/external/bsd/acpica/bin/iasl/Makefile
diff -u src/external/bsd/acpica/bin/iasl/Makefile:1.2 src/external/bsd/acpica/bin/iasl/Makefile:1.3
--- src/external/bsd/acpica/bin/iasl/Makefile:1.2	Thu Feb 17 18:26:20 2011
+++ src/external/bsd/acpica/bin/iasl/Makefile	Fri Feb 18 17:34:22 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2011/02/17 18:26:20 jruoho Exp $
+# $NetBSD: Makefile,v 1.3 2011/02/18 17:34:22 jruoho Exp $
 
 .if (${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64)
 PROG=	iasl
@@ -11,7 +11,7 @@
 .include bsd.own.mk
 
 CPPFLAGS+=	-I${TOPDIR}/../include -I${TOPDIR} -I.
-CPPFLAGS+=	-D_LINUX -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT
+CPPFLAGS+=	-D__NetBSD__ -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT
 CPPFLAGS+=	-D_USE_BERKELEY_YACC
 LDADD+=		-ll -ly -lrt -lpthread
 DPADD+=		${LIBL} ${LIBY} ${LIBRT} ${LIBPTHREAD}



CVS commit: src/sys/arch/amd64/amd64

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 18:00:52 UTC 2011

Modified Files:
src/sys/arch/amd64/amd64: db_disasm.c

Log Message:
fix misinterpretation of REX prefixes where use of the accumulator
as operand is hardwired into the instruction code,
mostly from Wolfgang Stukenbrock per PR port-amd64/44405


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/amd64/db_disasm.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/amd64/amd64/db_disasm.c
diff -u src/sys/arch/amd64/amd64/db_disasm.c:1.13 src/sys/arch/amd64/amd64/db_disasm.c:1.14
--- src/sys/arch/amd64/amd64/db_disasm.c:1.13	Sat Mar 14 21:04:03 2009
+++ src/sys/arch/amd64/amd64/db_disasm.c	Fri Feb 18 18:00:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.13 2009/03/14 21:04:03 dsl Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.14 2011/02/18 18:00:52 drochner Exp $	*/
 
 /* 
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.13 2009/03/14 21:04:03 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.14 2011/02/18 18:00:52 drochner Exp $);
 
 #ifndef _KERNEL
 #include stubs.h
@@ -1393,11 +1393,9 @@
 		case Si:
 			db_printf(%s, db_seg_reg[f_reg(inst)]);
 			break;
-		case A: {
-			int ext = ((rex  REX_w) != 0);
-			db_printf(%s, db_reg[ext][size][0]);	/* acc */
+		case A:
+			db_printf(%s, db_reg[0][size][0]);	/* acc */
 			break;
-		}
 		case BX:
 			if (seg)
 db_printf(%s:, seg);



CVS commit: [bouyer-quota2] src/external/bsd/acpica/bin/iasl

2011-02-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 18 19:05:45 UTC 2011

Modified Files:
src/external/bsd/acpica/bin/iasl [bouyer-quota2]: Makefile

Log Message:
Sync with HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/external/bsd/acpica/bin/iasl/Makefile

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

Modified files:

Index: src/external/bsd/acpica/bin/iasl/Makefile
diff -u src/external/bsd/acpica/bin/iasl/Makefile:1.1.2.2 src/external/bsd/acpica/bin/iasl/Makefile:1.1.2.3
--- src/external/bsd/acpica/bin/iasl/Makefile:1.1.2.2	Thu Feb 17 11:57:26 2011
+++ src/external/bsd/acpica/bin/iasl/Makefile	Fri Feb 18 19:05:45 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.2.2 2011/02/17 11:57:26 bouyer Exp $
+# $NetBSD: Makefile,v 1.1.2.3 2011/02/18 19:05:45 bouyer Exp $
 
 .if (${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64)
 PROG=	iasl
@@ -11,146 +11,66 @@
 .include bsd.own.mk
 
 CPPFLAGS+=	-I${TOPDIR}/../include -I${TOPDIR} -I.
-CPPFLAGS+=	-D_LINUX -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT
+CPPFLAGS+=	-D__NetBSD__ -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT
 CPPFLAGS+=	-D_USE_BERKELEY_YACC
 LDADD+=		-ll -ly -lrt -lpthread
 DPADD+=		${LIBL} ${LIBY} ${LIBRT} ${LIBPTHREAD}
 
-DPSRCS=	aslcompilerparse.c
+DPSRCS= aslcompilerparse.c
 DPSRCS+=aslcompilerlex.c
 
 .PATH:	${TOPDIR}
-SRCS=	aslcompilerparse.c
-SRCS+=	aslcompilerlex.c
-SRCS+=	aslanalyze.c
-SRCS+=	aslcodegen.c
-SRCS+=	aslcompile.c
-SRCS+=	aslerror.c
-SRCS+=	aslfiles.c
-SRCS+=	asllength.c
-SRCS+=	asllisting.c
-SRCS+=	aslload.c
-SRCS+=	asllookup.c
-SRCS+=	aslmain.c
-SRCS+=	aslmap.c
-SRCS+=	aslopcodes.c
-SRCS+=	asloperands.c
-SRCS+=	aslpredef.c
-SRCS+=	aslresource.c
-SRCS+=	aslrestype1.c
-SRCS+=	aslrestype1i.c
-SRCS+=	aslrestype2.c
-SRCS+=	aslrestype2d.c
-SRCS+=	aslrestype2e.c
-SRCS+=	aslrestype2q.c
-SRCS+=	aslrestype2w.c
-SRCS+=	aslstartup.c
-SRCS+=	asltree.c
-SRCS+=	aslutils.c
-SRCS+=	asltransform.c
-SRCS+=	aslfold.c
-SRCS+=	aslstubs.c
-SRCS+=	aslopt.c
-SRCS+=	dtcompile.c
-SRCS+=	dtfield.c
-SRCS+=	dtio.c
-SRCS+=	dtsubtable.c
-SRCS+=	dttable.c
-SRCS+=	dtutils.c
-.PATH: ${TOPDIR}/../common
-SRCS+=	getopt.c
-.PATH: ${TOPDIR}/../utilities
-SRCS+=	utalloc.c
-SRCS+=	utcache.c
-SRCS+=	utcopy.c
-SRCS+=	utdebug.c
-SRCS+=	utdelete.c
-SRCS+=	utglobal.c
-SRCS+=	utinit.c
-SRCS+=	utlock.c
-SRCS+=	utobject.c
-SRCS+=	utmisc.c
-SRCS+=	utmath.c
-SRCS+=	utmutex.c
-SRCS+=	utresrc.c
-SRCS+=	utstate.c
-SRCS+=	utxface.c
-.PATH: ${TOPDIR}/../namespace
-SRCS+=	nsaccess.c
-SRCS+=	nsalloc.c
-SRCS+=	nsdump.c
-SRCS+=	nsnames.c
-SRCS+=	nsobject.c
-SRCS+=	nsparse.c
-SRCS+=	nssearch.c
-SRCS+=	nsutils.c
-SRCS+=	nswalk.c
-SRCS+=	nsxfobj.c
-.PATH: ${TOPDIR}/../parser
-SRCS+=	psargs.c
-SRCS+=	psloop.c
-SRCS+=	psopcode.c
-SRCS+=	psparse.c
-SRCS+=	psscope.c
-SRCS+=	pstree.c
-SRCS+=	psutils.c
-SRCS+=	pswalk.c
-.PATH: ${TOPDIR}/../dispatcher
-SRCS+=	dmextern.c
-SRCS+=	dswscope.c
-SRCS+=	dswstate.c
-SRCS+=	dsfield.c
-SRCS+=	dsobject.c
-SRCS+=	dsopcode.c
-SRCS+=	dsutils.c
-SRCS+=	dswexec.c
-SRCS+=	dswload.c
-.PATH: ${TOPDIR}/../executer
-SRCS+=	exconvrt.c
-SRCS+=	excreate.c
-SRCS+=	exdump.c
-SRCS+=	exmisc.c
-SRCS+=	exmutex.c
-SRCS+=	exnames.c
-SRCS+=	exoparg1.c
-SRCS+=	exoparg2.c
-SRCS+=	exoparg3.c
-SRCS+=	exoparg6.c
-SRCS+=	exprep.c
-SRCS+=	exregion.c
-SRCS+=	exresnte.c
-SRCS+=	exresolv.c
-SRCS+=	exresop.c
-SRCS+=	exstore.c
-SRCS+=	exstoren.c
-SRCS+=	exstorob.c
-SRCS+=	exsystem.c
-SRCS+=	exutils.c
+SRCS+=  aslcompilerparse.c aslcompilerlex.c adfile.c \
+	aslanalyze.c aslbtypes.c aslcodegen.c aslcompile.c  \
+	aslerror.c aslfiles.c aslfold.c asllength.c \
+	asllisting.c aslload.c asllookup.c aslmain.c aslmap.c   \
+	aslopcodes.c asloperands.c aslopt.c aslpredef.c \
+	aslresource.c aslrestype1.c aslrestype1i.c  \
+	aslrestype2.c aslrestype2d.c aslrestype2e.c \
+	aslrestype2q.c aslrestype2w.c aslstartup.c aslstubs.c   \
+	asltransform.c asltree.c aslutils.c asluuid.c   \
+	aslwalks.c dtcompile.c dtexpress.c dtfield.c dtio.c \
+	dtsubtable.c dttable.c dttemplate.c dtutils.c
+
 .PATH: ${TOPDIR}/../common
-SRCS+=	adfile.c
-SRCS+=	adisasm.c
-SRCS+=	adwalk.c
-SRCS+=	dmrestag.c
-SRCS+=	dmtable.c
-SRCS+=	dmtbinfo.c
-SRCS+=	dmtbdump.c
+SRCS+=  adisasm.c adwalk.c dmextern.c dmrestag.c dmtable.c \
+	dmtbdump.c dmtbinfo.c getopt.c
+
 .PATH: ${TOPDIR}/../debugger
-SRCS+=	dbfileio.c
+SRCS+=  dbfileio.c
+
 .PATH: ${TOPDIR}/../disassembler
-SRCS+=	dmbuffer.c
-SRCS+=	dmnames.c
-SRCS+=	dmopcode.c
-SRCS+=	dmobject.c
-SRCS+=	dmresrc.c
-SRCS+=	dmresrcl.c
-SRCS+=	dmresrcs.c
-SRCS+=	dmutils.c
-SRCS+=	dmwalk.c
+SRCS+=  dmbuffer.c dmnames.c dmobject.c dmopcode.c dmresrc.c\
+	dmresrcl.c dmresrcs.c dmutils.c dmwalk.c
+
+.PATH: ${TOPDIR}/../dispatcher
+SRCS+=  dsargs.c dscontrol.c dsfield.c dsobject.c dsopcode.c\
+	dsutils.c dswexec.c dswload.c dswload2.c dswscope.c \
+	dswstate.c
+
+.PATH: ${TOPDIR}/../executer
+SRCS+=  

CVS commit: src/sys/netipsec

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 19:06:45 UTC 2011

Modified Files:
src/sys/netipsec: ipsec.c ipsec.h xform.h xform_ah.c xform_esp.c
xform_ipcomp.c xform_ipip.c xform_tcp.c

Log Message:
sprinkle some const, documenting that the SA is not supposed to
change during an xform operation


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/netipsec/ipsec.c
cvs rdiff -u -r1.24 -r1.25 src/sys/netipsec/ipsec.h \
src/sys/netipsec/xform_ipip.c
cvs rdiff -u -r1.4 -r1.5 src/sys/netipsec/xform.h
cvs rdiff -u -r1.29 -r1.30 src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.26 -r1.27 src/sys/netipsec/xform_esp.c
cvs rdiff -u -r1.22 -r1.23 src/sys/netipsec/xform_ipcomp.c
cvs rdiff -u -r1.5 -r1.6 src/sys/netipsec/xform_tcp.c

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

Modified files:

Index: src/sys/netipsec/ipsec.c
diff -u src/sys/netipsec/ipsec.c:1.49 src/sys/netipsec/ipsec.c:1.50
--- src/sys/netipsec/ipsec.c:1.49	Fri Feb 11 17:53:35 2011
+++ src/sys/netipsec/ipsec.c	Fri Feb 18 19:06:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec.c,v 1.49 2011/02/11 17:53:35 drochner Exp $	*/
+/*	$NetBSD: ipsec.c,v 1.50 2011/02/18 19:06:45 drochner Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $	*/
 /*	$KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipsec.c,v 1.49 2011/02/11 17:53:35 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipsec.c,v 1.50 2011/02/18 19:06:45 drochner Exp $);
 
 /*
  * IPsec controller part.
@@ -1937,7 +1937,7 @@
  * based on RFC 2401.
  */
 int
-ipsec_chkreplay(u_int32_t seq, struct secasvar *sav)
+ipsec_chkreplay(u_int32_t seq, const struct secasvar *sav)
 {
 	const struct secreplay *replay;
 	u_int32_t diff;
@@ -1995,7 +1995,7 @@
  *	1:	NG
  */
 int
-ipsec_updatereplay(u_int32_t seq, struct secasvar *sav)
+ipsec_updatereplay(u_int32_t seq, const struct secasvar *sav)
 {
 	struct secreplay *replay;
 	u_int32_t diff;
@@ -2127,7 +2127,7 @@
 
 /* Return a printable string for the address. */
 const char *
-ipsec_address(union sockaddr_union* sa)
+ipsec_address(const union sockaddr_union* sa)
 {
 	switch (sa-sa.sa_family) {
 #if INET
@@ -2146,11 +2146,11 @@
 }
 
 const char *
-ipsec_logsastr(struct secasvar *sav)
+ipsec_logsastr(const struct secasvar *sav)
 {
 	static char buf[256];
 	char *p;
-	struct secasindex *saidx = sav-sah-saidx;
+	const struct secasindex *saidx = sav-sah-saidx;
 
 	IPSEC_ASSERT(saidx-src.sa.sa_family == saidx-dst.sa.sa_family,
 		(ipsec_logsastr: address family mismatch));

Index: src/sys/netipsec/ipsec.h
diff -u src/sys/netipsec/ipsec.h:1.24 src/sys/netipsec/ipsec.h:1.25
--- src/sys/netipsec/ipsec.h:1.24	Sun May 10 02:13:07 2009
+++ src/sys/netipsec/ipsec.h	Fri Feb 18 19:06:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec.h,v 1.24 2009/05/10 02:13:07 elad Exp $	*/
+/*	$NetBSD: ipsec.h,v 1.25 2011/02/18 19:06:45 drochner Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.h,v 1.2.4.2 2004/02/14 22:23:23 bms Exp $	*/
 /*	$KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $	*/
 
@@ -299,8 +299,8 @@
 
 struct secas;
 struct tcpcb;
-int ipsec_chkreplay (u_int32_t, struct secasvar *);
-int ipsec_updatereplay (u_int32_t, struct secasvar *);
+int ipsec_chkreplay (u_int32_t, const struct secasvar *);
+int ipsec_updatereplay (u_int32_t, const struct secasvar *);
 
 size_t ipsec4_hdrsiz (struct mbuf *, u_int, struct inpcb *);
 #ifdef __FreeBSD__
@@ -311,8 +311,8 @@
 #endif
 
 union sockaddr_union;
-const char *ipsec_address(union sockaddr_union* sa);
-const char *ipsec_logsastr (struct secasvar *);
+const char *ipsec_address(const union sockaddr_union* sa);
+const char *ipsec_logsastr (const struct secasvar *);
 
 void ipsec_dumpmbuf (struct mbuf *);
 
Index: src/sys/netipsec/xform_ipip.c
diff -u src/sys/netipsec/xform_ipip.c:1.24 src/sys/netipsec/xform_ipip.c:1.25
--- src/sys/netipsec/xform_ipip.c:1.24	Sun Apr 27 12:58:48 2008
+++ src/sys/netipsec/xform_ipip.c	Fri Feb 18 19:06:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ipip.c,v 1.24 2008/04/27 12:58:48 degroote Exp $	*/
+/*	$NetBSD: xform_ipip.c,v 1.25 2011/02/18 19:06:45 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_ipip.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xform_ipip.c,v 1.24 2008/04/27 12:58:48 degroote Exp $);
+__KERNEL_RCSID(0, $NetBSD: xform_ipip.c,v 1.25 2011/02/18 19:06:45 drochner Exp $);
 
 /*
  * IP-inside-IP processing
@@ -429,7 +429,7 @@
 int protoff
 )
 {
-	struct secasvar *sav;
+	const struct secasvar *sav;
 	u_int8_t tp, otos;
 	struct secasindex *saidx;
 	int error;
@@ -667,7 +667,7 @@
 static int
 ipe4_input(
 struct mbuf *m,
-struct secasvar *sav,
+  

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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb 18 19:15:06 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: sgc.c

Log Message:
Make local functions static.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/sgc.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/hp300/dev/sgc.c
diff -u src/sys/arch/hp300/dev/sgc.c:1.1 src/sys/arch/hp300/dev/sgc.c:1.2
--- src/sys/arch/hp300/dev/sgc.c:1.1	Sat Feb 12 05:15:39 2011
+++ src/sys/arch/hp300/dev/sgc.c	Fri Feb 18 19:15:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sgc.c,v 1.1 2011/02/12 05:15:39 tsutsui Exp $	*/
+/*	$NetBSD: sgc.c,v 1.2 2011/02/18 19:15:06 tsutsui Exp $	*/
 /*	$OpenBSD: sgc.c,v 1.6 2010/04/15 20:35:21 miod Exp $	*/
 
 /*
@@ -55,9 +55,9 @@
 	struct bus_space_tag sc_tag;
 };
 
-int	sgcmatch(device_t, cfdata_t, void *);
-void	sgcattach(device_t, device_t, void *);
-int	sgcprint(void *, const char *);
+static int	sgcmatch(device_t, cfdata_t, void *);
+static void	sgcattach(device_t, device_t, void *);
+static int	sgcprint(void *, const char *);
 
 CFATTACH_DECL_NEW(sgc, sizeof(struct sgc_softc),
 sgcmatch, sgcattach, NULL, NULL);



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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb 18 19:15:44 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diofb.c dnkbd.c dvbox.c gbox.c hyper.c rbox.c
topcat.c tvrx.c

Log Message:
Use aprint_normal(9) and variants.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/diofb.c \
src/sys/arch/hp300/dev/dvbox.c src/sys/arch/hp300/dev/gbox.c \
src/sys/arch/hp300/dev/hyper.c src/sys/arch/hp300/dev/rbox.c \
src/sys/arch/hp300/dev/tvrx.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp300/dev/dnkbd.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/topcat.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/hp300/dev/diofb.c
diff -u src/sys/arch/hp300/dev/diofb.c:1.2 src/sys/arch/hp300/dev/diofb.c:1.3
--- src/sys/arch/hp300/dev/diofb.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/diofb.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: diofb.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: diofb.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $	*/
 
 /*
@@ -305,16 +305,16 @@
 {
 	struct wsemuldisplaydev_attach_args waa;
 
-	printf(: %dx%d, fb-dwidth, fb-dheight);
+	aprint_normal(: %dx%d, fb-dwidth, fb-dheight);
 
 	if (fb-planes == 1)
-		printf( monochrome);
+		aprint_normal( monochrome);
 	else
-		printf(x%d, fb-planes);
+		aprint_normal(x%d, fb-planes);
 
 	if (descr != NULL)
-		printf( %s, descr);
-	printf( frame buffer\n);
+		aprint_normal( %s, descr);
+	aprint_normal( frame buffer\n);
 
 	fb-scrlist[0] = fb-wsd;
 	fb-wsl.nscreens = 1;
Index: src/sys/arch/hp300/dev/dvbox.c
diff -u src/sys/arch/hp300/dev/dvbox.c:1.2 src/sys/arch/hp300/dev/dvbox.c:1.3
--- src/sys/arch/hp300/dev/dvbox.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/dvbox.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dvbox.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: dvbox.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: dvbox.c,v 1.13 2006/08/11 18:33:13 miod Exp $	*/
 
 /*
@@ -235,7 +235,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (dvbox_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			printf(: can't map framebuffer\n);
+			aprint_error(: can't reset framebuffer\n);
 			return;
 		}
 	}
Index: src/sys/arch/hp300/dev/gbox.c
diff -u src/sys/arch/hp300/dev/gbox.c:1.2 src/sys/arch/hp300/dev/gbox.c:1.3
--- src/sys/arch/hp300/dev/gbox.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/gbox.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: gbox.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: gbox.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: gbox.c,v 1.15 2007/01/07 15:13:52 miod Exp $	*/
 
 /*
@@ -244,7 +244,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (gbox_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			printf(: can't map framebuffer\n);
+			aprint_error(: can't reset framebuffer\n);
 			return;
 		}
 	}
Index: src/sys/arch/hp300/dev/hyper.c
diff -u src/sys/arch/hp300/dev/hyper.c:1.2 src/sys/arch/hp300/dev/hyper.c:1.3
--- src/sys/arch/hp300/dev/hyper.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/hyper.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hyper.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: hyper.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: hyper.c,v 1.15 2006/04/14 21:05:43 miod Exp $	*/
 
 /*
@@ -187,7 +187,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (hyper_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			printf(: can't map framebuffer\n);
+			aprint_error(: can't reset framebuffer\n);
 			return;
 		}
 	}
Index: src/sys/arch/hp300/dev/rbox.c
diff -u src/sys/arch/hp300/dev/rbox.c:1.2 src/sys/arch/hp300/dev/rbox.c:1.3
--- src/sys/arch/hp300/dev/rbox.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/rbox.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbox.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: rbox.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: rbox.c,v 1.14 2006/08/11 18:33:13 miod Exp $	*/
 
 /*
@@ -235,7 +235,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (rbox_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			printf(: can't map framebuffer\n);
+			aprint_error(: can't reset framebuffer\n);
 			return;
 		}
 	}
Index: src/sys/arch/hp300/dev/tvrx.c
diff -u src/sys/arch/hp300/dev/tvrx.c:1.2 src/sys/arch/hp300/dev/tvrx.c:1.3
--- src/sys/arch/hp300/dev/tvrx.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/tvrx.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tvrx.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: tvrx.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: tvrx.c,v 1.1 2006/04/14 21:05:43 miod Exp $	*/
 
 /*
@@ -120,7 +120,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (tvrx_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			

CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 19:27:07 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
hijack libc-internal name for lseek so that libc-internal callers
go to the right kernel too.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.53 src/lib/librumphijack/hijack.c:1.54
--- src/lib/librumphijack/hijack.c:1.53	Fri Feb 18 14:44:46 2011
+++ src/lib/librumphijack/hijack.c	Fri Feb 18 19:27:06 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.53 2011/02/18 14:44:46 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.54 2011/02/18 19:27:06 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.53 2011/02/18 14:44:46 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.54 2011/02/18 19:27:06 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -121,6 +121,7 @@
 #define REALREAD _sys_read
 #define REALGETDENTS __getdents30
 #define REALMOUNT __mount50
+#define REALLSEEK _lseek
 
 int REALSELECT(int, fd_set *, fd_set *, fd_set *, struct timeval *);
 int REALPOLLTS(struct pollfd *, nfds_t,
@@ -136,6 +137,7 @@
 int REALLUTIMES(const char *, const struct timeval [2]);
 int REALFUTIMES(int, const struct timeval [2]);
 int REALMOUNT(const char *, const char *, int, void *, size_t);
+off_t REALLSEEK(int, off_t, int);
 
 #define S(a) __STRING(a)
 struct sysnames {
@@ -184,7 +186,7 @@
 	{ DUALCALL_FSTATVFS1,	fstatvfs1,	RSYS_NAME(FSTATVFS1)	},
 	{ DUALCALL_CHDIR,	chdir,	RSYS_NAME(CHDIR)	},
 	{ DUALCALL_FCHDIR,	fchdir,	RSYS_NAME(FCHDIR)	},
-	{ DUALCALL_LSEEK,	lseek,	RSYS_NAME(LSEEK)	},
+	{ DUALCALL_LSEEK,	S(REALLSEEK),	RSYS_NAME(LSEEK)	},
 	{ DUALCALL_GETDENTS,	__getdents30,	RSYS_NAME(GETDENTS)	},
 	{ DUALCALL_UNLINK,	unlink,	RSYS_NAME(UNLINK)	},
 	{ DUALCALL_SYMLINK,	symlink,	RSYS_NAME(SYMLINK)	},
@@ -1546,7 +1548,7 @@
 	(int, struct statvfs *, int),	\
 	(fd, buf, flags))
 
-FDCALL(off_t, lseek, DUALCALL_LSEEK,	\
+FDCALL(off_t, REALLSEEK, DUALCALL_LSEEK,\
 	(int fd, off_t offset, int whence),\
 	(int, off_t, int),		\
 	(fd, offset, whence))



CVS commit: [bouyer-quota2] src/sys

2011-02-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 18 19:54:45 UTC 2011

Modified Files:
src/sys/sys [bouyer-quota2]: stat.h
src/sys/ufs/ffs [bouyer-quota2]: ffs_snapshot.c
src/sys/ufs/ufs [bouyer-quota2]: ufs_bmap.c ufs_readwrite.c ufs_vnops.c

Log Message:
Add a new inode flag, SF_SNAPINVAL, to be set on SF_SNAPSHOT inodes when
the snapshot is invalid.
Set SF_SNAPSHOT | SF_SNAPINVAL early when initializing a snapshot indode,
so that quota are bypassed for allocations on this inode.
Set SF_SNAPSHOT | SF_SNAPINVAL (instead of clearing SF_SNAPSHOT) when
expuge()ing a snapshot inode, so that userland tools working on the
snapshot (e.g. fsck or dump) can properly handle this inode.

The main point at this time is to have fsck_ffs -X properly compute quotas;
as a bonus persistent snapshots files won't show up in a dump(8) from a
snapshot.

This may also help speeding up taking snapshots, by bypassing expuge()
for snapshot inodes completely (but this needs more thoughs).

Briefly discussed with hannken@ in private mail.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.59.8.1 src/sys/sys/stat.h
cvs rdiff -u -r1.102.4.6 -r1.102.4.7 src/sys/ufs/ffs/ffs_snapshot.c
cvs rdiff -u -r1.48 -r1.48.34.1 src/sys/ufs/ufs/ufs_bmap.c
cvs rdiff -u -r1.95 -r1.95.4.1 src/sys/ufs/ufs/ufs_readwrite.c
cvs rdiff -u -r1.186.4.1 -r1.186.4.2 src/sys/ufs/ufs/ufs_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/sys/stat.h
diff -u src/sys/sys/stat.h:1.59 src/sys/sys/stat.h:1.59.8.1
--- src/sys/sys/stat.h:1.59	Thu Aug 27 07:28:42 2009
+++ src/sys/sys/stat.h	Fri Feb 18 19:54:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.h,v 1.59 2009/08/27 07:28:42 mouse Exp $	*/
+/*	$NetBSD: stat.h,v 1.59.8.1 2011/02/18 19:54:44 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -195,6 +195,7 @@
 /*	SF_NOUNLINK	0x0010	   [NOT IMPLEMENTED] */
 #define	SF_SNAPSHOT	0x0020	/* snapshot inode */
 #define	SF_LOG		0x0040	/* WAPBL log file inode */
+#define	SF_SNAPINVAL	0x0080	/* snapshot is invalid */
 
 #ifdef _KERNEL
 /*

Index: src/sys/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.6 src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.7
--- src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.6	Fri Feb 18 09:51:16 2011
+++ src/sys/ufs/ffs/ffs_snapshot.c	Fri Feb 18 19:54:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.102.4.6 2011/02/18 09:51:16 bouyer Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.102.4.7 2011/02/18 19:54:44 bouyer Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.102.4.6 2011/02/18 09:51:16 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.102.4.7 2011/02/18 19:54:44 bouyer Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -194,7 +194,7 @@
 	/*
 	 * If the vnode already is a snapshot, return.
 	 */
-	if (VTOI(vp)-i_flags  SF_SNAPSHOT) {
+	if ((VTOI(vp)-i_flags  (SF_SNAPSHOT | SF_SNAPINVAL)) == SF_SNAPSHOT) {
 		if (ctime) {
 			ctime-tv_sec = DIP(VTOI(vp), mtime);
 			ctime-tv_nsec = DIP(VTOI(vp), mtimensec);
@@ -215,18 +215,6 @@
 	error = snapshot_setup(mp, vp);
 	if (error)
 		goto out;
-	/* shapshot inodes are not accounted in quotas */
-#if defined(QUOTA) || defined(QUOTA2)
-	chkdq(ip, -DIP(ip, blocks), l-l_cred, 0);
-	chkiq(ip, -1, l-l_cred, 0);
-#endif
-	/*
-	 * Change inode to snapshot type file.
-	 */
-	ip-i_flags |= SF_SNAPSHOT;
-	DIP_ASSIGN(ip, flags, ip-i_flags);
-	ip-i_flag |= IN_CHANGE | IN_UPDATE;
-
 
 	/*
 	 * Copy all the cylinder group maps. Although the
@@ -239,6 +227,14 @@
 	error = cgaccount(vp, 1, NULL);
 	if (error)
 		goto out;
+
+	/*
+	 * snapshot is now valid
+	 */
+	ip-i_flags = ~SF_SNAPINVAL;
+	DIP_ASSIGN(ip, flags, ip-i_flags);
+	ip-i_flag |= IN_CHANGE | IN_UPDATE;
+
 	/*
 	 * Ensure that the snapshot is completely on disk.
 	 * Since we have marked it as a snapshot it is safe to
@@ -418,6 +414,7 @@
 	struct fs *fs = VFSTOUFS(mp)-um_fs;
 	struct lwp *l = curlwp;
 	const int wbreak = blocks_in_journal(fs)/8;
+	struct inode *ip = VTOI(vp);
 
 	/*
 	 * Check mount, exclusive reference and owner.
@@ -436,6 +433,22 @@
 		if (error)
 			return error;
 	}
+
+	/* Change inode to snapshot type file. */
+	error = UFS_WAPBL_BEGIN(mp);
+	if (error)
+		return error;
+#if defined(QUOTA) || defined(QUOTA2)
+	/* shapshot inodes are not accounted in quotas */
+	chkiq(ip, -1, l-l_cred, 0);
+#endif
+	ip-i_flags |= (SF_SNAPSHOT | SF_SNAPINVAL);
+	DIP_ASSIGN(ip, flags, ip-i_flags);
+	ip-i_flag |= IN_CHANGE | IN_UPDATE;
+	ffs_update(vp, NULL, NULL, UPDATE_WAIT);
+	UFS_WAPBL_END(mp);
+
+	KASSERT(ip-i_flags  SF_SNAPSHOT);
 	/*
 	 * Write an empty list of preallocated blocks to the end of
 	 * the snapshot to set size to at least that of the filesystem.
@@ -571,7 +584,7 @@
 snapshot_expunge(struct mount *mp, struct vnode 

CVS commit: src/sys/opencrypto

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 19:56:02 UTC 2011

Modified Files:
src/sys/opencrypto: cryptodev.c cryptosoft_xform.c

Log Message:
more const


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/opencrypto/cryptodev.c
cvs rdiff -u -r1.12 -r1.13 src/sys/opencrypto/cryptosoft_xform.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/opencrypto/cryptodev.c
diff -u src/sys/opencrypto/cryptodev.c:1.53 src/sys/opencrypto/cryptodev.c:1.54
--- src/sys/opencrypto/cryptodev.c:1.53	Mon Aug  2 19:59:35 2010
+++ src/sys/opencrypto/cryptodev.c	Fri Feb 18 19:56:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptodev.c,v 1.53 2010/08/02 19:59:35 jakllsch Exp $ */
+/*	$NetBSD: cryptodev.c,v 1.54 2011/02/18 19:56:01 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $	*/
 /*	$OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $	*/
 
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cryptodev.c,v 1.53 2010/08/02 19:59:35 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: cryptodev.c,v 1.54 2011/02/18 19:56:01 drochner Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -97,11 +97,11 @@
 	u_int32_t	ses;
 
 	u_int32_t	cipher;		/* note: shares name space in crd_alg */
-	struct enc_xform *txform;
+	const struct enc_xform *txform;
 	u_int32_t	mac;		/* note: shares name space in crd_alg */
-	struct auth_hash *thash;
+	const struct auth_hash *thash;
 	u_int32_t	comp_alg;	/* note: shares name space in crd_alg */
-	struct comp_algo *tcomp;
+	const struct comp_algo *tcomp;
 
 	void *		key;
 	int		keylen;
@@ -166,7 +166,8 @@
 static struct	csession *cseadd(struct fcrypt *, struct csession *);
 static struct	csession *csecreate(struct fcrypt *, u_int64_t, void *,
 u_int64_t, void *, u_int64_t, u_int32_t, u_int32_t, u_int32_t,
-struct enc_xform *, struct auth_hash *, struct comp_algo *);
+const struct enc_xform *, const struct auth_hash *,
+const struct comp_algo *);
 static int	csefree(struct csession *);
 
 static int	cryptodev_key(struct crypt_kop *);
@@ -977,8 +978,8 @@
 static struct csession *
 csecreate(struct fcrypt *fcr, u_int64_t sid, void *key, u_int64_t keylen,
 void *mackey, u_int64_t mackeylen, u_int32_t cipher, u_int32_t mac,
-u_int32_t comp_alg, struct enc_xform *txform, struct auth_hash *thash,
-struct comp_algo *tcomp)
+u_int32_t comp_alg, const struct enc_xform *txform,
+const struct auth_hash *thash, const struct comp_algo *tcomp)
 {
 	struct csession *cse;
 
@@ -1475,9 +1476,9 @@
 	struct cryptoini cria, crie;
 	struct cryptoini cric;		/* compressor */
 	struct cryptoini *crihead = NULL;
-	struct enc_xform *txform = NULL;
-	struct auth_hash *thash = NULL;
-	struct comp_algo *tcomp = NULL;
+	const struct enc_xform *txform = NULL;
+	const struct auth_hash *thash = NULL;
+	const struct comp_algo *tcomp = NULL;
 	struct csession *cse;
 	u_int64_t sid;
 	int error = 0;

Index: src/sys/opencrypto/cryptosoft_xform.c
diff -u src/sys/opencrypto/cryptosoft_xform.c:1.12 src/sys/opencrypto/cryptosoft_xform.c:1.13
--- src/sys/opencrypto/cryptosoft_xform.c:1.12	Wed Mar 25 01:26:13 2009
+++ src/sys/opencrypto/cryptosoft_xform.c	Fri Feb 18 19:56:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptosoft_xform.c,v 1.12 2009/03/25 01:26:13 darran Exp $ */
+/*	$NetBSD: cryptosoft_xform.c,v 1.13 2011/02/18 19:56:02 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /*	$OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $	*/
 
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: cryptosoft_xform.c,v 1.12 2009/03/25 01:26:13 darran Exp $);
+__KERNEL_RCSID(1, $NetBSD: cryptosoft_xform.c,v 1.13 2011/02/18 19:56:02 drochner Exp $);
 
 #include crypto/blowfish/blowfish.h
 #include crypto/cast128/cast128.h
@@ -55,14 +55,14 @@
 #include sys/sha1.h
 
 struct swcr_auth_hash {
-	struct auth_hash *auth_hash;
+	const struct auth_hash *auth_hash;
 	void (*Init)(void *);
 	int  (*Update)(void *, const uint8_t *, uint16_t);
 	void (*Final)(uint8_t *, void *);
 };
 
 struct swcr_enc_xform {
-	struct enc_xform *enc_xform;
+	const struct enc_xform *enc_xform;
 	void (*encrypt)(void *, uint8_t *);
 	void (*decrypt)(void *, uint8_t *);
 	int  (*setkey)(uint8_t **, const uint8_t *, int len);
@@ -70,7 +70,7 @@
 };
 
 struct swcr_comp_algo {
-	struct comp_algo *comp_algo;
+	const struct comp_algo *comp_algo;
 	uint32_t (*compress)(uint8_t *, uint32_t, uint8_t **);
 	uint32_t (*decompress)(uint8_t *, uint32_t, uint8_t **);
 };



CVS commit: src/sys/netipsec

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 20:40:58 UTC 2011

Modified Files:
src/sys/netipsec: key.c keydb.h xform.h xform_ah.c xform_esp.c
xform_ipcomp.c xform_ipip.c xform_tcp.c

Log Message:
more const


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/netipsec/key.c
cvs rdiff -u -r1.7 -r1.8 src/sys/netipsec/keydb.h
cvs rdiff -u -r1.5 -r1.6 src/sys/netipsec/xform.h
cvs rdiff -u -r1.30 -r1.31 src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.27 -r1.28 src/sys/netipsec/xform_esp.c
cvs rdiff -u -r1.23 -r1.24 src/sys/netipsec/xform_ipcomp.c
cvs rdiff -u -r1.25 -r1.26 src/sys/netipsec/xform_ipip.c
cvs rdiff -u -r1.6 -r1.7 src/sys/netipsec/xform_tcp.c

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

Modified files:

Index: src/sys/netipsec/key.c
diff -u src/sys/netipsec/key.c:1.64 src/sys/netipsec/key.c:1.65
--- src/sys/netipsec/key.c:1.64	Sun Sep  5 06:52:53 2010
+++ src/sys/netipsec/key.c	Fri Feb 18 20:40:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: key.c,v 1.64 2010/09/05 06:52:53 spz Exp $	*/
+/*	$NetBSD: key.c,v 1.65 2011/02/18 20:40:58 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $	*/
 /*	$KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $	*/
 	
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: key.c,v 1.64 2010/09/05 06:52:53 spz Exp $);
+__KERNEL_RCSID(0, $NetBSD: key.c,v 1.65 2011/02/18 20:40:58 drochner Exp $);
 
 /*
  * This code is referd to RFC 2367
@@ -6001,7 +6001,7 @@
 key_getcomb_esp(void)
 {
 	struct sadb_comb *comb;
-	struct enc_xform *algo;
+	const struct enc_xform *algo;
 	struct mbuf *result = NULL, *m, *n;
 	int encmin;
 	int i, off, o;
@@ -6102,7 +6102,7 @@
 key_getcomb_ah(void)
 {
 	struct sadb_comb *comb;
-	struct auth_hash *algo;
+	const struct auth_hash *algo;
 	struct mbuf *m;
 	u_int16_t minkeysize, maxkeysize;
 	int i;
@@ -6157,7 +6157,7 @@
 key_getcomb_ipcomp(void)
 {
 	struct sadb_comb *comb;
-	struct comp_algo *algo;
+	const struct comp_algo *algo;
 	struct mbuf *m;
 	int i;
 	const int l = PFKEY_ALIGN8(sizeof(struct sadb_comb));
@@ -6755,7 +6755,7 @@
 		off += PFKEY_ALIGN8(sizeof(*sup));
 
 		for (i = 1; i = SADB_AALG_MAX; i++) {
-			struct auth_hash *aalgo;
+			const struct auth_hash *aalgo;
 			u_int16_t minkeysize, maxkeysize;
 
 			aalgo = ah_algorithm_lookup(i);
@@ -6779,7 +6779,7 @@
 		off += PFKEY_ALIGN8(sizeof(*sup));
 
 		for (i = 1; i = SADB_EALG_MAX; i++) {
-			struct enc_xform *ealgo;
+			const struct enc_xform *ealgo;
 
 			ealgo = esp_algorithm_lookup(i);
 			if (!ealgo)

Index: src/sys/netipsec/keydb.h
diff -u src/sys/netipsec/keydb.h:1.7 src/sys/netipsec/keydb.h:1.8
--- src/sys/netipsec/keydb.h:1.7	Sat Aug 28 07:16:51 2010
+++ src/sys/netipsec/keydb.h	Fri Feb 18 20:40:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: keydb.h,v 1.7 2010/08/28 07:16:51 spz Exp $	*/
+/*	$NetBSD: keydb.h,v 1.8 2011/02/18 20:40:58 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/keydb.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$KAME: keydb.h,v 1.14 2000/08/02 17:58:26 sakane Exp $	*/
 
@@ -122,10 +122,10 @@
 	 * to interface to the OpenBSD crypto support.  This was done
 	 * to distinguish this code from the mainline KAME code.
 	 */
-	struct xformsw *tdb_xform;	/* transform */
-	struct enc_xform *tdb_encalgxform;	/* encoding algorithm */
-	struct auth_hash *tdb_authalgxform;	/* authentication algorithm */
-	struct comp_algo *tdb_compalgxform;	/* compression algorithm */
+	const struct xformsw *tdb_xform;	/* transform */
+	const struct enc_xform *tdb_encalgxform; /* encoding algorithm */
+	const struct auth_hash *tdb_authalgxform; /* authentication algorithm */
+	const struct comp_algo *tdb_compalgxform; /* compression algorithm */
 	u_int64_t tdb_cryptoid;		/* crypto session id */
 
 #ifdef IPSEC_NAT_T

Index: src/sys/netipsec/xform.h
diff -u src/sys/netipsec/xform.h:1.5 src/sys/netipsec/xform.h:1.6
--- src/sys/netipsec/xform.h:1.5	Fri Feb 18 19:06:45 2011
+++ src/sys/netipsec/xform.h	Fri Feb 18 20:40:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform.h,v 1.5 2011/02/18 19:06:45 drochner Exp $	*/
+/*	$NetBSD: xform.h,v 1.6 2011/02/18 20:40:58 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_ipsp.h,v 1.119 2002/03/14 01:27:11 millert Exp $	*/
 /*
@@ -89,7 +89,7 @@
 #define	XFT_CONF	0x0100
 #define	XFT_COMP	0x1000
 	const char	*xf_name;		/* human-readable name */
-	int	(*xf_init)(struct secasvar*, struct xformsw*);	/* setup */
+	int	(*xf_init)(struct secasvar*, const struct xformsw*);/* setup */
 	int	(*xf_zeroize)(struct secasvar*);		/* cleanup */
 	int	(*xf_input)(struct mbuf*, const struct secasvar*, /* input */
 			int, int);
@@ -111,17 +111,18 @@
 			struct mbuf **, int, int);
 
 /* XF_AH */
-extern int ah_init0(struct secasvar *, struct xformsw *, struct cryptoini *);
+extern int ah_init0(struct secasvar *, const struct 

CVS commit: src/lib/libedit

2011-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 18 20:53:05 UTC 2011

Modified Files:
src/lib/libedit: read.c

Log Message:
PR/44599: Steven Vernon: libedit acts as if no data read if editmode is turned
off because nread is uninitialized in the edit disabled case.
Confidential:   no
Severity:   serious
Priority:   medium
Responsible:lib-bug-people
State:  open
Class:  sw-bug
Submitter-Id:   net
Arrival-Date:   Fri Feb 18 19:35:00 + 2011
Release:sources as of 2011/02/04
Organization:


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/lib/libedit/read.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/libedit/read.c
diff -u src/lib/libedit/read.c:1.57 src/lib/libedit/read.c:1.58
--- src/lib/libedit/read.c:1.57	Wed Jul 21 14:18:52 2010
+++ src/lib/libedit/read.c	Fri Feb 18 15:53:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: read.c,v 1.57 2010/07/21 18:18:52 christos Exp $	*/
+/*	$NetBSD: read.c,v 1.58 2011/02/18 20:53:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)read.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: read.c,v 1.57 2010/07/21 18:18:52 christos Exp $);
+__RCSID($NetBSD: read.c,v 1.58 2011/02/18 20:53:05 christos Exp $);
 #endif
 #endif /* not lint  not SCCSID */
 
@@ -469,7 +469,7 @@
 	int retval;
 	el_action_t cmdnum = 0;
 	int num;		/* how many chars we have read at NL */
-	Char ch;
+	Char ch, *cp;
 	int crlf = 0;
 	int nrb;
 #ifdef FIONREAD
@@ -481,9 +481,9 @@
 	*nread = 0;
 
 	if (el-el_flags  NO_TTY) {
-		Char *cp = el-el_line.buffer;
 		size_t idx;
 
+		cp = el-el_line.buffer;
 		while ((num = (*el-el_read.read_char)(el, cp)) == 1) {
 			/* make sure there is space for next character */
 			if (cp + 1 = el-el_line.limit) {
@@ -504,10 +504,7 @@
 			el-el_errno = errno;
 		}
 
-		el-el_line.cursor = el-el_line.lastchar = cp;
-		*cp = '\0';
-		*nread = (int)(el-el_line.cursor - el-el_line.buffer);
-		goto done;
+		goto noedit;
 	}
 
 
@@ -530,7 +527,6 @@
 		read_prepare(el);
 
 	if (el-el_flags  EDIT_DISABLED) {
-		Char *cp;
 		size_t idx;
 
 		if ((el-el_flags  UNBUFFERED) == 0)
@@ -562,9 +558,7 @@
 			el-el_errno = errno;
 		}
 
-		el-el_line.cursor = el-el_line.lastchar = cp;
-		*cp = '\0';
-		goto done;
+		goto noedit;
 	}
 
 	for (num = OKCMD; num == OKCMD;) {	/* while still editing this
@@ -707,6 +701,11 @@
 	} else {
 		*nread = (int)(el-el_line.lastchar - el-el_line.buffer);
 	}
+	goto done;
+noedit:
+	el-el_line.cursor = el-el_line.lastchar = cp;
+	*cp = '\0';
+	*nread = (int)(el-el_line.cursor - el-el_line.buffer);
 done:
 	if (*nread == 0) {
 		if (num == -1) {



CVS commit: src/sys/sys

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 18 21:06:12 UTC 2011

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

Log Message:
Add a __noprofile keyword to disable the profiling of a function.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/sys/cdefs.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/cdefs.h
diff -u src/sys/sys/cdefs.h:1.81 src/sys/sys/cdefs.h:1.82
--- src/sys/sys/cdefs.h:1.81	Sat Dec 25 22:30:52 2010
+++ src/sys/sys/cdefs.h	Fri Feb 18 21:06:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.81 2010/12/25 22:30:52 joerg Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.82 2011/02/18 21:06:12 matt Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -218,6 +218,12 @@
 #define	__used		__unused
 #endif
 
+#if __GNUC_PREREQ__(3, 1)
+#define	__noprofile	__attribute__((__no_instrument_function__))
+#else
+#define	__noprofile	/* nothing */
+#endif
+
 #if defined(__cplusplus)
 #define	__BEGIN_EXTERN_C	extern C {
 #define	__END_EXTERN_C		}



CVS commit: src/sys/arch/powerpc

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 18 21:08:19 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: booke_stubs.c
src/sys/arch/powerpc/oea: pmap_kernel.c

Log Message:
Make sure stub routines are not profiled.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/booke_stubs.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/oea/pmap_kernel.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/powerpc/booke/booke_stubs.c
diff -u src/sys/arch/powerpc/booke/booke_stubs.c:1.3 src/sys/arch/powerpc/booke/booke_stubs.c:1.4
--- src/sys/arch/powerpc/booke/booke_stubs.c:1.3	Sat Feb 12 18:23:09 2011
+++ src/sys/arch/powerpc/booke/booke_stubs.c	Fri Feb 18 21:08:18 2011
@@ -38,7 +38,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: booke_stubs.c,v 1.3 2011/02/12 18:23:09 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: booke_stubs.c,v 1.4 2011/02/18 21:08:18 matt Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -47,7 +47,7 @@
 #include powerpc/instr.h
 #include powerpc/booke/cpuvar.h
 
-#define	__stub	__section(.stub)
+#define	__stub	__section(.stub) __noprofile
 
 void tlb_set_asid(uint32_t) __stub;
 

Index: src/sys/arch/powerpc/oea/pmap_kernel.c
diff -u src/sys/arch/powerpc/oea/pmap_kernel.c:1.4 src/sys/arch/powerpc/oea/pmap_kernel.c:1.5
--- src/sys/arch/powerpc/oea/pmap_kernel.c:1.4	Fri Feb 18 16:40:50 2011
+++ src/sys/arch/powerpc/oea/pmap_kernel.c	Fri Feb 18 21:08:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_kernel.c,v 1.4 2011/02/18 16:40:50 matt Exp $	*/
+/*	$NetBSD: pmap_kernel.c,v 1.5 2011/02/18 21:08:18 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: pmap_kernel.c,v 1.4 2011/02/18 16:40:50 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: pmap_kernel.c,v 1.5 2011/02/18 21:08:18 matt Exp $);
 
 #include opt_ddb.h
 #include opt_pmap.h
@@ -69,7 +69,7 @@
 	powerpc_fixup_stubs(_ftext, _etext, __stub_pmap_start, __stub_pmap_end);
 }
 
-#define	__stub	__section(.stub.pmap)
+#define	__stub	__section(.stub.pmap) __noprofile
 
 int	pmap_pte_spill(struct pmap *, vaddr_t, bool)		__stub;
 void	pmap_real_memory(paddr_t *, psize_t *)			__stub;



CVS commit: [matt-nb5-pq3] src/sys

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 18 21:12:17 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke [matt-nb5-pq3]: booke_stubs.c
src/sys/sys [matt-nb5-pq3]: cdefs.h

Log Message:
Add __noprofile attribute and use it to prevent stubs from being profiled.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/powerpc/booke/booke_stubs.c
cvs rdiff -u -r1.69 -r1.69.14.1 src/sys/sys/cdefs.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/powerpc/booke/booke_stubs.c
diff -u src/sys/arch/powerpc/booke/booke_stubs.c:1.1.2.1 src/sys/arch/powerpc/booke/booke_stubs.c:1.1.2.2
--- src/sys/arch/powerpc/booke/booke_stubs.c:1.1.2.1	Fri Jan  7 01:26:19 2011
+++ src/sys/arch/powerpc/booke/booke_stubs.c	Fri Feb 18 21:12:17 2011
@@ -38,7 +38,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: booke_stubs.c,v 1.1.2.1 2011/01/07 01:26:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: booke_stubs.c,v 1.1.2.2 2011/02/18 21:12:17 matt Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -47,7 +47,7 @@
 #include powerpc/instr.h
 #include powerpc/booke/cpuvar.h
 
-#define	__stub	__section(.stub)
+#define	__stub	__section(.stub) __noprofile
 
 void tlb_set_asid(uint32_t) __stub;
 

Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.69 src/sys/sys/cdefs.h:1.69.14.1
--- src/sys/sys/cdefs.h:1.69	Sun Aug 17 00:23:02 2008
+++ src/sys/sys/cdefs.h	Fri Feb 18 21:12:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.69 2008/08/17 00:23:02 gmcgarry Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.69.14.1 2011/02/18 21:12:17 matt Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -63,6 +63,12 @@
 #include sys/cdefs_aout.h
 #endif
 
+#if __GNUC_PREREQ__(3, 1)
+#define	__noprofile	__attribute__((__no_instrument_function__))
+#else
+#define	__noprofile	/* nothing */
+#endif
+
 #if defined(__cplusplus)
 #define	__BEGIN_DECLS		extern C {
 #define	__END_DECLS		}



CVS commit: [matt-nb5-pq3] src/sys/arch/powerpc/booke

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 18 21:17:23 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke [matt-nb5-pq3]: booke_stubs.c

Log Message:
Mark splhigh as __noprofile.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/powerpc/booke/booke_stubs.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/powerpc/booke/booke_stubs.c
diff -u src/sys/arch/powerpc/booke/booke_stubs.c:1.1.2.2 src/sys/arch/powerpc/booke/booke_stubs.c:1.1.2.3
--- src/sys/arch/powerpc/booke/booke_stubs.c:1.1.2.2	Fri Feb 18 21:12:17 2011
+++ src/sys/arch/powerpc/booke/booke_stubs.c	Fri Feb 18 21:17:22 2011
@@ -38,7 +38,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: booke_stubs.c,v 1.1.2.2 2011/02/18 21:12:17 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: booke_stubs.c,v 1.1.2.3 2011/02/18 21:17:22 matt Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -218,7 +218,7 @@
  * This is called by softint_cleanup and can't be a stub but it can call
  * a stub.
  */
-int 
+int __noprofile
 splhigh(void)
 {
 	return splraise(IPL_HIGH);



CVS commit: [matt-nb5-pq3] src/sys/arch/powerpc/include

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 18 21:37:47 UTC 2011

Modified Files:
src/sys/arch/powerpc/include [matt-nb5-pq3]: profile.h

Log Message:
For BookE, PSL_DR/PSL_IR will never be set so we need our own MCOUNT_ENTER
MCOUNT_EXIT.  And if we need to do that, might as well use wrtee to the work
(which will emit the right wrtee/wrteei instructions).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.88.1 src/sys/arch/powerpc/include/profile.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/powerpc/include/profile.h
diff -u src/sys/arch/powerpc/include/profile.h:1.7 src/sys/arch/powerpc/include/profile.h:1.7.88.1
--- src/sys/arch/powerpc/include/profile.h:1.7	Fri Jul  7 21:28:03 2006
+++ src/sys/arch/powerpc/include/profile.h	Fri Feb 18 21:37:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.7 2006/07/07 21:28:03 ross Exp $	*/
+/*	$NetBSD: profile.h,v 1.7.88.1 2011/02/18 21:37:47 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -26,6 +26,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifdef _KERNEL_OPT
+#include opt_ppcarch.h
+#endif
+
 #define	_MCOUNT_DECL	void __mcount
 
 #ifdef _LP64
@@ -122,6 +126,12 @@
 #endif
 
 #ifdef _KERNEL
+#ifdef PPC_BOOKE
+#include powerpc/booke/cpuvar.h
+
+#define MCOUNT_ENTER	do s = wrtee(0); while (/*CONSTCOND*/ 0)
+#define MCOUNT_EXIT	wrtee(s)
+#else
 #define MCOUNT_ENTER		\
 	__asm volatile(mfmsr %0 : =r(s));			\
 	if ((s  (PSL_IR | PSL_DR)) != (PSL_IR | PSL_DR))	\
@@ -132,3 +142,5 @@
 #define MCOUNT_EXIT		\
 	__asm volatile(mtmsr %0 :: r(s))
 #endif
+
+#endif



CVS commit: src/sys/dev/ppbus

2011-02-18 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Feb 18 21:38:17 UTC 2011

Modified Files:
src/sys/dev/ppbus: ppbus_conf.h

Log Message:
Include sys/gpio.h for GPIOMAXNAME to make it compile again when a gpio(4)
device is attached.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ppbus/ppbus_conf.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/ppbus/ppbus_conf.h
diff -u src/sys/dev/ppbus/ppbus_conf.h:1.11 src/sys/dev/ppbus/ppbus_conf.h:1.12
--- src/sys/dev/ppbus/ppbus_conf.h:1.11	Tue Apr 29 14:07:37 2008
+++ src/sys/dev/ppbus/ppbus_conf.h	Fri Feb 18 21:38:17 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ppbus_conf.h,v 1.11 2008/04/29 14:07:37 cegger Exp $ */
+/* $NetBSD: ppbus_conf.h,v 1.12 2011/02/18 21:38:17 phx Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
@@ -34,6 +34,7 @@
 #include gpio.h
 
 #include sys/device.h
+#include sys/gpio.h
 #include sys/mutex.h
 #include sys/queue.h
 



CVS commit: src/sys/opencrypto

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 22:02:09 UTC 2011

Modified Files:
src/sys/opencrypto: deflate.c

Log Message:
redo result buffer allocation, to avoid dynamic allocations:
-use exponentially growing buffer sizes instead of just linear extension
-drop the dynamic allocation of buffer metadata introduced in rev.1.8 --
 if the initial array is not sufficient something is wrong
-apply some (arbitrary, heuristic) limit so that compressed data
 which extract into insane amounts of constant data don't kill the system
This addresses PR kern/36864 by Wolfgang Stukenbrock. Some tuning
might be useful, but hopefully this is an improvement already.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/opencrypto/deflate.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/opencrypto/deflate.c
diff -u src/sys/opencrypto/deflate.c:1.17 src/sys/opencrypto/deflate.c:1.18
--- src/sys/opencrypto/deflate.c:1.17	Fri Feb 18 10:50:56 2011
+++ src/sys/opencrypto/deflate.c	Fri Feb 18 22:02:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: deflate.c,v 1.17 2011/02/18 10:50:56 drochner Exp $ */
+/*	$NetBSD: deflate.c,v 1.18 2011/02/18 22:02:09 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/deflate.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /* $OpenBSD: deflate.c,v 1.3 2001/08/20 02:45:22 hugh Exp $ */
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: deflate.c,v 1.17 2011/02/18 10:50:56 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: deflate.c,v 1.18 2011/02/18 22:02:09 drochner Exp $);
 
 #include sys/types.h
 #include sys/malloc.h
@@ -79,16 +79,10 @@
 	u_int8_t *output;
 	u_int32_t count, result, tocopy;
 	int error, i, j;
-	struct deflate_buf *buf, *tmp;
-	size_t len;
+	struct deflate_buf buf[ZBUF];
 
 	DPRINTF((deflate_global: size %d\n, size));
 
-	len = ZBUF;
-	buf = malloc(len*sizeof(struct deflate_buf), M_CRYPTO_DATA, M_NOWAIT);
-	if (buf == NULL)
-		return 0;
-
 	memset(zbuf, 0, sizeof(z_stream));
 	zbuf.next_in = data;	/* data that is going to be processed */
 	zbuf.zalloc = ocf_zalloc;
@@ -110,7 +104,7 @@
 	}
 	buf[0].out = malloc(buf[0].size, M_CRYPTO_DATA, M_NOWAIT);
 	if (buf[0].out == NULL)
-		goto bad3;
+		return 0;
 	i = 1;
 
 	zbuf.next_out = buf[0].out;
@@ -142,21 +136,15 @@
 		else if (error != Z_OK)
 			goto bad;
 		else if (zbuf.avail_out == 0) {
-			if (i == len) {
-len += ZBUF;
-tmp = realloc(buf,len*sizeof(struct deflate_buf),
-			  M_CRYPTO_DATA, M_NOWAIT);
-if (tmp == NULL)
-	goto bad;
-buf = tmp;
-			}
 			/* we need more output space, allocate size */
-			buf[i].out = malloc(size, M_CRYPTO_DATA, M_NOWAIT);
+			int nextsize = buf[i-1].size * 2;
+			if (i == ZBUF || nextsize  100)
+goto bad;
+			buf[i].out = malloc(nextsize, M_CRYPTO_DATA, M_NOWAIT);
 			if (buf[i].out == NULL)
 goto bad;
 			zbuf.next_out = buf[i].out;
-			buf[i].size = size;
-			zbuf.avail_out = buf[i].size;
+			zbuf.avail_out = buf[i].size = nextsize;
 			i++;
 		}
 	}
@@ -181,7 +169,6 @@
 	} else {
 		*out = buf[0].out;
 	}
-	free(buf, M_CRYPTO_DATA);
 	if (decomp)
 		inflateEnd(zbuf);
 	else
@@ -196,8 +183,6 @@
 bad2:
 	for (j = 0; j  i; j++)
 		free(buf[j].out, M_CRYPTO_DATA);
-bad3:
-	free(buf, M_CRYPTO_DATA);
 	return 0;
 }
 



CVS commit: src/gnu/usr.bin/gdb6/libgdb

2011-02-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 18 22:27:51 UTC 2011

Modified Files:
src/gnu/usr.bin/gdb6/libgdb: Makefile

Log Message:
bsd-kvm.c needs -D_KMEMUSER now.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/gnu/usr.bin/gdb6/libgdb/Makefile

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

Modified files:

Index: src/gnu/usr.bin/gdb6/libgdb/Makefile
diff -u src/gnu/usr.bin/gdb6/libgdb/Makefile:1.9 src/gnu/usr.bin/gdb6/libgdb/Makefile:1.10
--- src/gnu/usr.bin/gdb6/libgdb/Makefile:1.9	Fri May 28 19:11:23 2010
+++ src/gnu/usr.bin/gdb6/libgdb/Makefile	Fri Feb 18 22:27:51 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2010/05/28 19:11:23 jklos Exp $
+#	$NetBSD: Makefile,v 1.10 2011/02/18 22:27:51 joerg Exp $
 
 .include bsd.own.mk
 
@@ -13,6 +13,7 @@
 
 SRCS=		${G_LIBGDB_OBS:.o=.c}
 GCPPFLAGS=	${G_INTERNAL_CFLAGS}
+CPPFLAGS.bsd-kvm.c=	-D_KMEMUSER
 CPPFLAGS=	-I${.CURDIR} \
 		-I${.CURDIR}/../arch/${MACHINE_ARCH} \
 		-I${DIST}/gdb \



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

2011-02-18 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Fri Feb 18 22:32:34 UTC 2011

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

Log Message:
Import pkg_install 20110215.

--- 20110215:
Fix audit-history subcommand to include patterns making use of [x-y] notation.

--- 20101212:
Don't warn about _ALPHA, _BETA, _PATCH, _RC, _STABLE mismatches when
pkg_add'ing on NetBSD.

--- 20101122:
Fix crash in pkg_info -X on hand-written packages.

--- 20100915:
Allow https URLs.

--- 20100914:
Add -D flag to pkg_install, to override the pkg_add -U check that
all depending packages have their dependencies satisfied by the new
package.  Essentially, split off this particular behavior as a special
case of -f, so that -f works as before, unforced works as before, and
one can give -D to override exactly this check, leaving all other
checks intact.

The -D flag is in support of make replace, as the workflow for make
replace is that inter-package dependencies are sometimes violated (but
then one must replace the depending packages, which is what
pkg_rolling-replace does via the unsafe_depends flags).

Add missing break statement in option parsing of pkg_add -C, riding
the version bump.

Status:

Vendor Tag: PKGSRC
Release Tags:   pkg_install-20110215

U src/external/bsd/pkg_install/dist/add/add.h
U src/external/bsd/pkg_install/dist/add/main.c
U src/external/bsd/pkg_install/dist/add/perform.c
U src/external/bsd/pkg_install/dist/add/pkg_add.1
U src/external/bsd/pkg_install/dist/bpm/bpm.sh.in
U src/external/bsd/pkg_install/dist/bpm/bpm.1
U src/external/bsd/pkg_install/dist/admin/admin.h
U src/external/bsd/pkg_install/dist/admin/audit-packages.8
U src/external/bsd/pkg_install/dist/admin/audit-packages.sh.in
U src/external/bsd/pkg_install/dist/admin/audit.c
U src/external/bsd/pkg_install/dist/admin/check.c
U src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.8
U src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.sh.in
U src/external/bsd/pkg_install/dist/admin/main.c
U src/external/bsd/pkg_install/dist/admin/pkg_admin.1
U src/external/bsd/pkg_install/dist/create/build.c
U src/external/bsd/pkg_install/dist/create/create.h
U src/external/bsd/pkg_install/dist/create/main.c
U src/external/bsd/pkg_install/dist/create/perform.c
U src/external/bsd/pkg_install/dist/create/pkg_create.1
U src/external/bsd/pkg_install/dist/create/pl.c
U src/external/bsd/pkg_install/dist/create/util.c
U src/external/bsd/pkg_install/dist/delete/pkg_delete.1
U src/external/bsd/pkg_install/dist/delete/pkg_delete.c
U src/external/bsd/pkg_install/dist/info/info.h
U src/external/bsd/pkg_install/dist/info/main.c
U src/external/bsd/pkg_install/dist/info/perform.c
U src/external/bsd/pkg_install/dist/info/pkg_info.1
U src/external/bsd/pkg_install/dist/info/show.c
U src/external/bsd/pkg_install/dist/lib/automatic.c
U src/external/bsd/pkg_install/dist/lib/config.h.in
U src/external/bsd/pkg_install/dist/lib/conflicts.c
U src/external/bsd/pkg_install/dist/lib/defs.h
U src/external/bsd/pkg_install/dist/lib/dewey.c
U src/external/bsd/pkg_install/dist/lib/dewey.h
U src/external/bsd/pkg_install/dist/lib/fexec.c
U src/external/bsd/pkg_install/dist/lib/file.c
U src/external/bsd/pkg_install/dist/lib/global.c
U src/external/bsd/pkg_install/dist/lib/gpgsig.c
U src/external/bsd/pkg_install/dist/lib/iterate.c
U src/external/bsd/pkg_install/dist/lib/lib.h
U src/external/bsd/pkg_install/dist/lib/license.c
U src/external/bsd/pkg_install/dist/lib/lpkg.c
U src/external/bsd/pkg_install/dist/lib/opattern.c
U src/external/bsd/pkg_install/dist/lib/parse-config.c
U src/external/bsd/pkg_install/dist/lib/pkcs7.c
U src/external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in
U src/external/bsd/pkg_install/dist/lib/pkg_io.c
U src/external/bsd/pkg_install/dist/lib/pkg_signature.c
U src/external/bsd/pkg_install/dist/lib/pkg_summary.5
U src/external/bsd/pkg_install/dist/lib/pkgdb.c
U src/external/bsd/pkg_install/dist/lib/pkgsrc.7
U src/external/bsd/pkg_install/dist/lib/plist.c
U src/external/bsd/pkg_install/dist/lib/remove.c
U src/external/bsd/pkg_install/dist/lib/str.c
U src/external/bsd/pkg_install/dist/lib/var.c
U src/external/bsd/pkg_install/dist/lib/version.c
C src/external/bsd/pkg_install/dist/lib/version.h
U src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c
U src/external/bsd/pkg_install/dist/lib/xwrapper.c
U src/external/bsd/pkg_install/dist/x509/pkgsrc.cnf
U src/external/bsd/pkg_install/dist/x509/pkgsrc.sh
U src/external/bsd/pkg_install/dist/x509/signing.txt

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

cvs checkout -jPKGSRC:yesterday -jPKGSRC 
src/external/bsd/pkg_install/dist



CVS commit: src/doc

2011-02-18 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Fri Feb 18 22:45:46 UTC 2011

Modified Files:
src/doc: 3RDPARTY

Log Message:
pkg_install is now at 20110215


To generate a diff of this commit:
cvs rdiff -u -r1.812 -r1.813 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.812 src/doc/3RDPARTY:1.813
--- src/doc/3RDPARTY:1.812	Wed Feb 16 03:45:23 2011
+++ src/doc/3RDPARTY	Fri Feb 18 22:45:46 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.812 2011/02/16 03:45:23 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.813 2011/02/18 22:45:46 aymeric Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -869,8 +869,8 @@
 reachover Makefiles are in src/usr.sbin/pf.
 
 Package:	pkg_install
-Version:	20081002
-Current Vers.:	20081002
+Version:	20110215
+Current Vers.:	20110215
 Maintainer:	The pkgsrc developers
 Home Page:	http://www.pkgsrc.org
 Mailing List:	tech-...@netbsd.org



CVS commit: src/sys/conf

2011-02-18 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri Feb 18 22:49:03 UTC 2011

Modified Files:
src/sys/conf: files

Log Message:
Compile subr_pcu.c under option PCU.


To generate a diff of this commit:
cvs rdiff -u -r1.999 -r1.1000 src/sys/conf/files

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

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.999 src/sys/conf/files:1.1000
--- src/sys/conf/files:1.999	Thu Feb 17 18:32:29 2011
+++ src/sys/conf/files	Fri Feb 18 22:49:03 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.999 2011/02/17 18:32:29 rmind Exp $
+#	$NetBSD: files,v 1.1000 2011/02/18 22:49:03 rmind Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -1533,7 +1533,7 @@
 file	kern/subr_lwp_specificdata.c
 file	kern/subr_once.c
 file	kern/subr_optstr.c
-file	kern/subr_pcu.c
+file	kern/subr_pcu.c			pcu
 file	kern/subr_percpu.c
 file	kern/subr_pool.c
 file	kern/subr_prf.c



CVS commit: src/sys/dev/pci

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 18 22:52:54 UTC 2011

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add Adaptec RAID 3405


To generate a diff of this commit:
cvs rdiff -u -r1.1057 -r1.1058 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.1057 src/sys/dev/pci/pcidevs:1.1058
--- src/sys/dev/pci/pcidevs:1.1057	Thu Feb  3 22:03:09 2011
+++ src/sys/dev/pci/pcidevs	Fri Feb 18 22:52:53 2011
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1057 2011/02/03 22:03:09 njoly Exp $
+$NetBSD: pcidevs,v 1.1058 2011/02/18 22:52:53 jmcneill Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -855,6 +855,7 @@
 product ADP2 ASR2200S_SUB2M	0x0287	ASR-2200S
 product ADP2 ASR2410SA		0x0290	ASR-2410SA
 product ADP2 AAR2810SA		0x0292	AAR-2810SA
+product ADP2 3405		0x02bb	RAID 3405
 product ADP2 AAC364		0x0364	AAC-364
 product ADP2 ASR5400S		0x0365	ASR-5400S
 product ADP2 PERC_2QC		0x1364	Dell PERC 2/QC



CVS commit: src/sys/dev/pci

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 18 22:54:27 UTC 2011

Modified Files:
src/sys/dev/pci: aac_pci.c

Log Message:
add Adaptec RAID 3405


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/aac_pci.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/aac_pci.c
diff -u src/sys/dev/pci/aac_pci.c:1.31 src/sys/dev/pci/aac_pci.c:1.32
--- src/sys/dev/pci/aac_pci.c:1.31	Fri May  7 13:59:51 2010
+++ src/sys/dev/pci/aac_pci.c	Fri Feb 18 22:54:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: aac_pci.c,v 1.31 2010/05/07 13:59:51 is Exp $	*/
+/*	$NetBSD: aac_pci.c,v 1.32 2011/02/18 22:54:27 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: aac_pci.c,v 1.31 2010/05/07 13:59:51 is Exp $);
+__KERNEL_RCSID(0, $NetBSD: aac_pci.c,v 1.32 2011/02/18 22:54:27 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -353,6 +353,14 @@
 		0,
 		IBM ServeRAID 8k
 	},
+	{	PCI_VENDOR_ADP2,
+		PCI_PRODUCT_ADP2_ASR2200S,
+		PCI_VENDOR_ADP2,
+		PCI_PRODUCT_ADP2_3405,
+		AAC_HWIF_I960RX,
+		0,
+		Adaptec RAID 3405
+	},
 	{
 		PCI_VENDOR_DEC,
 		PCI_PRODUCT_DEC_21554,



CVS commit: [matt-nb5-pq3] src/sys/arch/evbppc/pmppc

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 18 23:13:49 UTC 2011

Modified Files:
src/sys/arch/evbppc/pmppc [matt-nb5-pq3]: machdep.c

Log Message:
Add a call to cpu_model_init() after bss is cleared.


To generate a diff of this commit:
cvs rdiff -u -r1.3.18.1 -r1.3.18.2 src/sys/arch/evbppc/pmppc/machdep.c

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

Modified files:

Index: src/sys/arch/evbppc/pmppc/machdep.c
diff -u src/sys/arch/evbppc/pmppc/machdep.c:1.3.18.1 src/sys/arch/evbppc/pmppc/machdep.c:1.3.18.2
--- src/sys/arch/evbppc/pmppc/machdep.c:1.3.18.1	Fri Jan  7 01:41:47 2011
+++ src/sys/arch/evbppc/pmppc/machdep.c	Fri Feb 18 23:13:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.3.18.1 2011/01/07 01:41:47 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.3.18.2 2011/02/18 23:13:48 matt Exp $	*/
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.3.18.1 2011/01/07 01:41:47 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.3.18.2 2011/02/18 23:13:48 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_ddb.h
@@ -108,6 +108,7 @@
 #include machine/pmppc.h
 
 #include powerpc/oea/bat.h
+#include powerpc/oea/cpufeat.h
 #include arch/powerpc/pic/picvar.h
 
 #include ddb/db_extern.h
@@ -185,6 +186,8 @@
 
 	memset(edata, 0, end - edata); /* clear BSS */
 
+	cpu_model_init();
+
 	pmppc_setup();
 
 	physmemr[0].start = 0;



CVS commit: src/lib/csu/common

2011-02-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 18 23:37:36 UTC 2011

Modified Files:
src/lib/csu/common: crt0-common.c

Log Message:
Allow building with the changed weakref semantic in GCC 4.2 and clang.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/csu/common/crt0-common.c

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

Modified files:

Index: src/lib/csu/common/crt0-common.c
diff -u src/lib/csu/common/crt0-common.c:1.2 src/lib/csu/common/crt0-common.c:1.3
--- src/lib/csu/common/crt0-common.c:1.2	Tue Feb  8 02:03:13 2011
+++ src/lib/csu/common/crt0-common.c	Fri Feb 18 23:37:36 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0-common.c,v 1.2 2011/02/08 02:03:13 matt Exp $ */
+/* $NetBSD: crt0-common.c,v 1.3 2011/02/18 23:37:36 joerg Exp $ */
 
 /*
  * Copyright (c) 1998 Christos Zoulas
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: crt0-common.c,v 1.2 2011/02/08 02:03:13 matt Exp $);
+__RCSID($NetBSD: crt0-common.c,v 1.3 2011/02/18 23:37:36 joerg Exp $);
 
 #include sys/types.h
 #include sys/syscall.h
@@ -57,7 +57,14 @@
  * if we happen to be compiling without -static but with without any
  * shared libs present, things will still work.
  */
+
+#if __GNUC_PREREQ__(4,2)
+static int rtld_DYNAMIC __attribute__((__weakref__, __alias__(_DYNAMIC)));
+#define	DYNAMIC_SYM	rtld_DYNAMIC
+#else
 extern int _DYNAMIC __weak_reference(_DYNAMIC);
+#define	DYNAMIC_SYM	_DYNAMIC
+#endif
 
 #ifdef MCRT0
 extern void	monstartup(u_long, u_long);
@@ -104,7 +111,7 @@
 	if (ps_strings != NULL)
 		__ps_strings = ps_strings;
 
-	if (_DYNAMIC != NULL) {
+	if (DYNAMIC_SYM != NULL) {
 		if (obj == NULL)
 			_FATAL(NULL Obj_Entry pointer in GOT\n);
 		if (obj-magic != RTLD_MAGIC)



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

2011-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 18 23:38:58 UTC 2011

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

Log Message:
add ifmpls since MPLS was added


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 src/sys/arch/amd64/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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.307 src/sys/arch/amd64/conf/GENERIC:1.308
--- src/sys/arch/amd64/conf/GENERIC:1.307	Wed Feb 16 15:23:21 2011
+++ src/sys/arch/amd64/conf/GENERIC	Fri Feb 18 18:38:58 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.307 2011/02/16 20:23:21 jym Exp $
+# $NetBSD: GENERIC,v 1.308 2011/02/18 23:38:58 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.307 $
+#ident 		GENERIC-$Revision: 1.308 $
 
 maxusers	64		# estimated number of users
 
@@ -1131,6 +1131,7 @@
 #pseudo-device	carp			# Common Address Redundancy Protocol
 pseudo-device	ipfilter		# IP filter (firewall) and NAT
 pseudo-device	loop			# network loopback
+#pseudo-device	ifmpls			# MPLS pseudo-interface 
 pseudo-device	ppp			# Point-to-Point Protocol
 pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
 pseudo-device	sl			# Serial Line IP



CVS commit: src/lib/libc/net

2011-02-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 18 23:41:57 UTC 2011

Modified Files:
src/lib/libc/net: nsdispatch.c

Log Message:
Support the different weakref semantic in GCC 4.2 and clang.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libc/net/nsdispatch.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/net/nsdispatch.c
diff -u src/lib/libc/net/nsdispatch.c:1.34 src/lib/libc/net/nsdispatch.c:1.35
--- src/lib/libc/net/nsdispatch.c:1.34	Thu Feb  5 13:21:11 2009
+++ src/lib/libc/net/nsdispatch.c	Fri Feb 18 23:41:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nsdispatch.c,v 1.34 2009/02/05 13:21:11 lukem Exp $	*/
+/*	$NetBSD: nsdispatch.c,v 1.35 2011/02/18 23:41:57 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: nsdispatch.c,v 1.34 2009/02/05 13:21:11 lukem Exp $);
+__RCSID($NetBSD: nsdispatch.c,v 1.35 2011/02/18 23:41:57 joerg Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -172,12 +172,15 @@
 /*
  * Runtime determination of whether we are dynamically linked or not.
  */
-#ifdef __ELF__
-extern	int			_DYNAMIC __weak_reference(_DYNAMIC);
-#define	is_dynamic()		(_DYNAMIC != NULL)
-#else
+#ifndef __ELF__
 #define	is_dynamic()		(0)	/* don't bother - switch to ELF! */
-#endif /* __ELF__ */
+#elif __GNUC_PREREQ__(4,2)
+static int rtld_DYNAMIC __attribute__((__weakref__, __alias__(_DYNAMIC)));
+#define	is_dynamic()		(rtld_DYNAMIC != NULL)
+#else
+extern int _DYNAMIC __weak_reference(_DYNAMIC);
+#define	is_dynamic()		(_DYNAMIC != NULL)
+#endif
 
 
 /*



CVS commit: src/sys/arch

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb 19 00:13:56 UTC 2011

Modified Files:
src/sys/arch/amd64/conf: GENERIC
src/sys/arch/i386/conf: GENERIC

Log Message:
add VCONS_DRAW_INTR


To generate a diff of this commit:
cvs rdiff -u -r1.308 -r1.309 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.1016 -r1.1017 src/sys/arch/i386/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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.308 src/sys/arch/amd64/conf/GENERIC:1.309
--- src/sys/arch/amd64/conf/GENERIC:1.308	Fri Feb 18 23:38:58 2011
+++ src/sys/arch/amd64/conf/GENERIC	Sat Feb 19 00:13:55 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.308 2011/02/18 23:38:58 christos Exp $
+# $NetBSD: GENERIC,v 1.309 2011/02/19 00:13:55 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.308 $
+#ident 		GENERIC-$Revision: 1.309 $
 
 maxusers	64		# estimated number of users
 
@@ -373,6 +373,7 @@
 options 	PMS_ELANTECH_TOUCHPAD	# Enable support for Elantech Touchpads
 vga*		at pci? dev ? function ?
 genfb*		at pci? dev ? function ?
+options 	VCONS_DRAW_INTR
 wsdisplay*	at vga? console ?
 wsdisplay*	at wsemuldisplaydev?
 wskbd*		at pckbd? console ?

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1016 src/sys/arch/i386/conf/GENERIC:1.1017
--- src/sys/arch/i386/conf/GENERIC:1.1016	Wed Feb 16 07:30:27 2011
+++ src/sys/arch/i386/conf/GENERIC	Sat Feb 19 00:13:55 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1016 2011/02/16 07:30:27 jruoho Exp $
+# $NetBSD: GENERIC,v 1.1017 2011/02/19 00:13:55 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1016 $
+#ident 		GENERIC-$Revision: 1.1017 $
 
 maxusers	64		# estimated number of users
 
@@ -549,6 +549,7 @@
 vga*		at pci? dev ? function ?
 pcdisplay0	at isa?			# CGA, MDA, EGA, HGA
 genfb*		at pci? dev ? function ?
+options 	VCONS_DRAW_INTR
 #machfb* 	at pci? dev ? function ? # ATI Mach64 framebuffer driver
 wsdisplay*	at vga? console ?
 wsdisplay*	at pcdisplay? console ?



CVS commit: src/sys/sys

2011-02-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Feb 19 00:22:50 UTC 2011

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

Log Message:
Move lwp_getpcb() into a (_KERNEL || _KMEMUSER) ifdef.  Unbreaks crash(8).


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/sys/lwp.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.146 src/sys/sys/lwp.h:1.147
--- src/sys/sys/lwp.h:1.146	Thu Feb 17 21:02:26 2011
+++ src/sys/sys/lwp.h	Sat Feb 19 00:22:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.146 2011/02/17 21:02:26 christos Exp $	*/
+/*	$NetBSD: lwp.h,v 1.147 2011/02/19 00:22:50 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -277,6 +277,15 @@
 #define	LSONPROC	7	/* Process is currently on a CPU. */
 #define	LSSUSPENDED	8	/* Not running, not signalable. */
 
+#if defined(_KERNEL) || defined(_KMEMUSER)
+static inline void *
+lwp_getpcb(struct lwp *l)
+{
+
+	return l-l_addr;
+}
+#endif /* _KERNEL || _KMEMUSER */
+
 #ifdef _KERNEL
 #define	LWP_CACHE_CREDS(l, p)		\
 do {	\
@@ -285,13 +294,6 @@
 		lwp_update_creds(l);	\
 } while (/* CONSTCOND */ 0)
 
-static __inline void *
-lwp_getpcb(struct lwp *l)
-{
-
-	return l-l_addr;
-}
-
 void	lwpinit(void);
 void	lwp0_init(void);
 void	lwp_sys_init(void);



CVS commit: src/sys/net

2011-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 19 01:12:40 UTC 2011

Modified Files:
src/sys/net: bpf_filter.c

Log Message:
Avoid stack memory disclosure by keeping track during filter validation time
of initialized memory. Idea taken from linux.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/net/bpf_filter.c

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

Modified files:

Index: src/sys/net/bpf_filter.c
diff -u src/sys/net/bpf_filter.c:1.41 src/sys/net/bpf_filter.c:1.42
--- src/sys/net/bpf_filter.c:1.41	Sun Dec  5 17:40:56 2010
+++ src/sys/net/bpf_filter.c	Fri Feb 18 20:12:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf_filter.c,v 1.41 2010/12/05 22:40:56 mrg Exp $	*/
+/*	$NetBSD: bpf_filter.c,v 1.42 2011/02/19 01:12:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bpf_filter.c,v 1.41 2010/12/05 22:40:56 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpf_filter.c,v 1.42 2011/02/19 01:12:39 christos Exp $);
 
 #if 0
 #if !(defined(lint) || defined(KERNEL))
@@ -461,11 +461,16 @@
  * The kernel needs to be able to verify an application's filter code.
  * Otherwise, a bogus program could easily crash the system.
  */
+CTASSERT(BPF_MEMWORDS == sizeof(uint16_t) * NBBY);
+
 int
 bpf_validate(const struct bpf_insn *f, int signed_len)
 {
-	u_int i, from, len;
+	u_int i, from, len, ok = 0;
 	const struct bpf_insn *p;
+#if defined(KERNEL) || defined(_KERNEL)
+	uint16_t *mem, invalid;
+#endif
 
 	len = (u_int)signed_len;
 	if (len  1)
@@ -474,8 +479,19 @@
 	if (len  BPF_MAXINSNS)
 		return 0;
 #endif
+	if (BPF_CLASS(f[len - 1].code) != BPF_RET)
+		return 0;
+
+#if defined(KERNEL) || defined(_KERNEL)
+	mem = malloc(sizeof(*mem) * len, M_TEMP, M_WAITOK|M_ZERO);
+	invalid = ~0;	/* All is invalid on startup */
+#endif
 
 	for (i = 0; i  len; ++i) {
+#if defined(KERNEL) || defined(_KERNEL)
+		/* blend in any invalid bits for current pc */
+		invalid |= mem[i];
+#endif
 		p = f[i];
 		switch (BPF_CLASS(p-code)) {
 		/*
@@ -496,7 +512,10 @@
  * is done runtime.
  */
 if (p-k = BPF_MEMWORDS)
-	return 0;
+	goto out;
+/* check for current memory invalid */
+if (invalid  (1  p-k))
+	goto out;
 #endif
 break;
 			case BPF_ABS:
@@ -506,13 +525,17 @@
 			case BPF_LEN:
 break;
 			default:
-return 0;
+goto out;
 			}
 			break;
 		case BPF_ST:
 		case BPF_STX:
 			if (p-k = BPF_MEMWORDS)
-return 0;
+goto out;
+#if defined(KERNEL) || defined(_KERNEL)
+			/* validate the memory word */
+			invalid = ~(1  p-k);
+#endif
 			break;
 		case BPF_ALU:
 			switch (BPF_OP(p-code)) {
@@ -530,10 +553,10 @@
  * Check for constant division by 0.
  */
 if (BPF_SRC(p-code) == BPF_K  p-k == 0)
-	return 0;
+	goto out;
 break;
 			default:
-return 0;
+goto out;
 			}
 			break;
 		case BPF_JMP:
@@ -566,22 +589,37 @@
 			from = i + 1;
 			switch (BPF_OP(p-code)) {
 			case BPF_JA:
-#if defined(KERNEL) || defined(_KERNEL)
-if (from + p-k  from || from + p-k = len)
-#else
 if (from + p-k = len)
+	goto out;
+#if defined(KERNEL) || defined(_KERNEL)
+if (from + p-k  from)
+	goto out;
+/*
+ * mark the currently invalid bits for the
+ * destination
+ */
+mem[from + p-k] |= invalid;
+invalid = 0;
 #endif
-	return 0;
 break;
 			case BPF_JEQ:
 			case BPF_JGT:
 			case BPF_JGE:
 			case BPF_JSET:
 if (from + p-jt = len || from + p-jf = len)
-	return 0;
+	goto out;
+#if defined(KERNEL) || defined(_KERNEL)
+/*
+ * mark the currently invalid bits for both
+ * possible jump destinations
+ */
+mem[from + p-jt] |= invalid;
+mem[from + p-jf] |= invalid;
+invalid = 0;
+#endif
 break;
 			default:
-return 0;
+goto out;
 			}
 			break;
 		case BPF_RET:
@@ -589,9 +627,13 @@
 		case BPF_MISC:
 			break;
 		default:
-			return 0;
+			goto out;
 		}
 	}
-
-	return BPF_CLASS(f[len - 1].code) == BPF_RET;
+	ok = 1;
+out:
+#if defined(KERNEL) || defined(_KERNEL)
+	free(mem, M_TEMP);
+#endif
+	return ok;
 }



CVS commit: src/sys/sys

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 19 02:01:46 UTC 2011

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

Log Message:
Add __CTASSERT(x)


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/sys/cdefs.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/cdefs.h
diff -u src/sys/sys/cdefs.h:1.82 src/sys/sys/cdefs.h:1.83
--- src/sys/sys/cdefs.h:1.82	Fri Feb 18 21:06:12 2011
+++ src/sys/sys/cdefs.h	Sat Feb 19 02:01:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.82 2011/02/18 21:06:12 matt Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.83 2011/02/19 02:01:46 matt Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -126,6 +126,13 @@
 #endif
 
 /*
+ * Compile Time Assertion.
+ */
+#define	__CTASSERT(x)		__CTASSERT0(x, __ctassert, __LINE__)
+#define	__CTASSERT0(x, y, z)	__CTASSERT1(x, y, z)
+#define	__CTASSERT1(x, y, z)	typedef char y ## z[(x) ? 1 : -1];
+
+/*
  * The following macro is used to remove const cast-away warnings
  * from gcc -Wcast-qual; it should be used with caution because it
  * can hide valid errors; in particular most valid uses are in



CVS commit: src/sys/lib/libkern

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 19 02:02:14 UTC 2011

Modified Files:
src/sys/lib/libkern: libkern.h

Log Message:
Define CTASSERT in terms of __CTASSERT


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/lib/libkern/libkern.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/lib/libkern/libkern.h
diff -u src/sys/lib/libkern/libkern.h:1.96 src/sys/lib/libkern/libkern.h:1.97
--- src/sys/lib/libkern/libkern.h:1.96	Wed Jan 26 01:02:46 2011
+++ src/sys/lib/libkern/libkern.h	Sat Feb 19 02:02:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: libkern.h,v 1.96 2011/01/26 01:02:46 matt Exp $	*/
+/*	$NetBSD: libkern.h,v 1.97 2011/02/19 02:02:14 matt Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -192,9 +192,7 @@
 #endif
 #endif
 
-#define	CTASSERT(x)		_CTASSERT(x, __LINE__)
-#define	_CTASSERT(x, y)		__CTASSERT(x, y)
-#define	__CTASSERT(x, y)	typedef char __ctassert ## y[(x) ? 1 : -1];
+#define	CTASSERT(x)		__CTASSERT(x)
 
 #ifndef DIAGNOSTIC
 #define _DIAGASSERT(a)	(void)0



CVS commit: src/sys/sys

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 19 02:21:21 UTC 2011

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

Log Message:
Make __CTASSERT use __COUNTER__ instead of __LINE__ if the cpp supports it.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/sys/cdefs.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/cdefs.h
diff -u src/sys/sys/cdefs.h:1.83 src/sys/sys/cdefs.h:1.84
--- src/sys/sys/cdefs.h:1.83	Sat Feb 19 02:01:46 2011
+++ src/sys/sys/cdefs.h	Sat Feb 19 02:21:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.83 2011/02/19 02:01:46 matt Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.84 2011/02/19 02:21:21 matt Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -128,7 +128,11 @@
 /*
  * Compile Time Assertion.
  */
+#ifdef __COUNTER__
+#define	__CTASSERT(x)		__CTASSERT0(x, __ctassert, __COUNTER__)
+#else
 #define	__CTASSERT(x)		__CTASSERT0(x, __ctassert, __LINE__)
+#endif
 #define	__CTASSERT0(x, y, z)	__CTASSERT1(x, y, z)
 #define	__CTASSERT1(x, y, z)	typedef char y ## z[(x) ? 1 : -1];
 



CVS commit: src/sys/net

2011-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 19 02:22:27 UTC 2011

Modified Files:
src/sys/net: bpf_filter.c

Log Message:
Use __CTASSERT


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/net/bpf_filter.c

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

Modified files:

Index: src/sys/net/bpf_filter.c
diff -u src/sys/net/bpf_filter.c:1.42 src/sys/net/bpf_filter.c:1.43
--- src/sys/net/bpf_filter.c:1.42	Sat Feb 19 01:12:39 2011
+++ src/sys/net/bpf_filter.c	Sat Feb 19 02:22:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf_filter.c,v 1.42 2011/02/19 01:12:39 christos Exp $	*/
+/*	$NetBSD: bpf_filter.c,v 1.43 2011/02/19 02:22:27 matt Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bpf_filter.c,v 1.42 2011/02/19 01:12:39 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpf_filter.c,v 1.43 2011/02/19 02:22:27 matt Exp $);
 
 #if 0
 #if !(defined(lint) || defined(KERNEL))
@@ -461,7 +461,7 @@
  * The kernel needs to be able to verify an application's filter code.
  * Otherwise, a bogus program could easily crash the system.
  */
-CTASSERT(BPF_MEMWORDS == sizeof(uint16_t) * NBBY);
+__CTASSERT(BPF_MEMWORDS == sizeof(uint16_t) * NBBY);
 
 int
 bpf_validate(const struct bpf_insn *f, int signed_len)



CVS commit: src/sys/net

2011-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 19 04:10:47 UTC 2011

Modified Files:
src/sys/net: bpf_filter.c

Log Message:
Use kmem instead of malloc. Requested by rmind.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/net/bpf_filter.c

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

Modified files:

Index: src/sys/net/bpf_filter.c
diff -u src/sys/net/bpf_filter.c:1.43 src/sys/net/bpf_filter.c:1.44
--- src/sys/net/bpf_filter.c:1.43	Fri Feb 18 21:22:27 2011
+++ src/sys/net/bpf_filter.c	Fri Feb 18 23:10:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf_filter.c,v 1.43 2011/02/19 02:22:27 matt Exp $	*/
+/*	$NetBSD: bpf_filter.c,v 1.44 2011/02/19 04:10:47 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bpf_filter.c,v 1.43 2011/02/19 02:22:27 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpf_filter.c,v 1.44 2011/02/19 04:10:47 christos Exp $);
 
 #if 0
 #if !(defined(lint) || defined(KERNEL))
@@ -48,6 +48,7 @@
 
 #include sys/param.h
 #include sys/time.h
+#include sys/kmem.h
 #include sys/endian.h
 
 #define EXTRACT_SHORT(p)	be16dec(p)
@@ -466,7 +467,7 @@
 int
 bpf_validate(const struct bpf_insn *f, int signed_len)
 {
-	u_int i, from, len, ok = 0;
+	u_int i, from, len, ok = 0, size;
 	const struct bpf_insn *p;
 #if defined(KERNEL) || defined(_KERNEL)
 	uint16_t *mem, invalid;
@@ -483,7 +484,7 @@
 		return 0;
 
 #if defined(KERNEL) || defined(_KERNEL)
-	mem = malloc(sizeof(*mem) * len, M_TEMP, M_WAITOK|M_ZERO);
+	mem = kmem_zalloc(size = sizeof(*mem) * len, KM_SLEEP);
 	invalid = ~0;	/* All is invalid on startup */
 #endif
 
@@ -633,7 +634,7 @@
 	ok = 1;
 out:
 #if defined(KERNEL) || defined(_KERNEL)
-	free(mem, M_TEMP);
+	kmem_free(mem, size);
 #endif
 	return ok;
 }



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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:35:00 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: hil_intio.c

Log Message:
- make local functions static
- use aprint_erorr(9)
- some KNF


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/hil_intio.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/hp300/dev/hil_intio.c
diff -u src/sys/arch/hp300/dev/hil_intio.c:1.1 src/sys/arch/hp300/dev/hil_intio.c:1.2
--- src/sys/arch/hp300/dev/hil_intio.c:1.1	Sun Feb  6 18:26:51 2011
+++ src/sys/arch/hp300/dev/hil_intio.c	Sat Feb 19 05:34:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hil_intio.c,v 1.1 2011/02/06 18:26:51 tsutsui Exp $	*/
+/*	$NetBSD: hil_intio.c,v 1.2 2011/02/19 05:34:59 tsutsui Exp $	*/
 /*	$OpenBSD: hil_intio.c,v 1.8 2007/01/06 20:10:57 miod Exp $	*/
 
 /*
@@ -44,8 +44,8 @@
 #include machine/hil_machdep.h
 #include dev/hil/hilvar.h
 
-int	hil_intio_match(device_t, cfdata_t, void *);
-void	hil_intio_attach(device_t, device_t, void *);
+static int	hil_intio_match(device_t, cfdata_t, void *);
+static void	hil_intio_attach(device_t, device_t, void *);
 
 CFATTACH_DECL_NEW(hil_intio, sizeof(struct hil_softc),
 hil_intio_match, hil_intio_attach, NULL, NULL);
@@ -61,12 +61,12 @@
 
 	/* Allow only one instance. */
 	if (hil_matched != 0)
-		return (0);
+		return 0;
 
 	if (badaddr((void *)ia-ia_addr))	/* should not happen! */
-		return (0);
+		return 0;
 
-	return (1);
+	return 1;
 }
 
 int hil_is_console = -1;	/* undecided */
@@ -81,7 +81,7 @@
 	sc-sc_bst = ia-ia_bst;
 	if (bus_space_map(sc-sc_bst, ia-ia_iobase,
 	HILMAPSIZE, 0, sc-sc_bsh) != 0) {
-		printf(: couldn't map hil controller\n);
+		aprint_error(: couldn't map hil controller\n);
 		return;
 	}
 



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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:36:50 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: hil_intio.c

Log Message:
Actually check that the configured console device is a wsdisplay.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/hil_intio.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/hp300/dev/hil_intio.c
diff -u src/sys/arch/hp300/dev/hil_intio.c:1.2 src/sys/arch/hp300/dev/hil_intio.c:1.3
--- src/sys/arch/hp300/dev/hil_intio.c:1.2	Sat Feb 19 05:34:59 2011
+++ src/sys/arch/hp300/dev/hil_intio.c	Sat Feb 19 05:36:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hil_intio.c,v 1.2 2011/02/19 05:34:59 tsutsui Exp $	*/
+/*	$NetBSD: hil_intio.c,v 1.3 2011/02/19 05:36:49 tsutsui Exp $	*/
 /*	$OpenBSD: hil_intio.c,v 1.8 2007/01/06 20:10:57 miod Exp $	*/
 
 /*
@@ -88,7 +88,8 @@
 	/*
 	 * Check that the configured console device is a wsdisplay.
 	 */
-	hil_is_console = 1;
+	if (major(cn_tab-cn_dev) != devsw_name2chr(wsdisplay, NULL, 0))
+		hil_is_console = 0;
 
 	hil_attach(sc, hil_is_console);
 	intr_establish(hil_intr, sc, ia-ia_ipl, IPL_TTY);



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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:37:55 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: dnkbdmap.c dnkbdmap.h

Log Message:
u_int8_t - uint8_t


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/dnkbdmap.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/dnkbdmap.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/hp300/dev/dnkbdmap.c
diff -u src/sys/arch/hp300/dev/dnkbdmap.c:1.2 src/sys/arch/hp300/dev/dnkbdmap.c:1.3
--- src/sys/arch/hp300/dev/dnkbdmap.c:1.2	Sat Feb 12 16:36:37 2011
+++ src/sys/arch/hp300/dev/dnkbdmap.c	Sat Feb 19 05:37:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbdmap.c,v 1.2 2011/02/12 16:36:37 tsutsui Exp $	*/
+/*	$NetBSD: dnkbdmap.c,v 1.3 2011/02/19 05:37:55 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbdmap.c,v 1.2 2005/05/06 22:22:53 miod Exp $	*/
 /*
  * Copyright (c) 2005, Miodrag Vallat
@@ -40,7 +40,7 @@
  * Translate Domain keycodes to US keyboard XT scancodes, for proper
  * X11-over-wsmux operation.
  */
-const u_int8_t dnkbd_raw[0x80] = {
+const uint8_t dnkbd_raw[0x80] = {
 0x00, 0x00, 0x00, 0x00, 0x44, 0x3b, 0x3c, 0x3d,
 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x00, 0x00,
 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x01, 0x01,

Index: src/sys/arch/hp300/dev/dnkbdmap.h
diff -u src/sys/arch/hp300/dev/dnkbdmap.h:1.1 src/sys/arch/hp300/dev/dnkbdmap.h:1.2
--- src/sys/arch/hp300/dev/dnkbdmap.h:1.1	Sat Feb 12 15:49:01 2011
+++ src/sys/arch/hp300/dev/dnkbdmap.h	Sat Feb 19 05:37:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbdmap.h,v 1.1 2011/02/12 15:49:01 tsutsui Exp $	*/
+/*	$NetBSD: dnkbdmap.h,v 1.2 2011/02/19 05:37:55 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbdmap.h,v 1.1 2005/04/22 11:59:11 miod Exp $	*/
 /*
  * Copyright (c) 2005, Miodrag Vallat
@@ -26,4 +26,4 @@
  */
 
 extern const struct wscons_keydesc dnkbd_keydesctab[];
-extern const u_int8_t dnkbd_raw[0x80];
+extern const uint8_t dnkbd_raw[0x80];



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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:40:59 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diodevs

Log Message:
Move recently supported framebuffers out of the unsupported list.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/dev/diodevs

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/hp300/dev/diodevs
diff -u src/sys/arch/hp300/dev/diodevs:1.13 src/sys/arch/hp300/dev/diodevs:1.14
--- src/sys/arch/hp300/dev/diodevs:1.13	Sun Feb  6 04:06:11 2011
+++ src/sys/arch/hp300/dev/diodevs	Sat Feb 19 05:40:58 2011
@@ -1,4 +1,4 @@
-$NetBSD: diodevs,v 1.13 2011/02/06 04:06:11 tsutsui Exp $
+$NetBSD: diodevs,v 1.14 2011/02/19 05:40:58 tsutsui Exp $
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -66,15 +66,15 @@
 framebuffer HRMCATSEYE	0x07	1	high-res mono catseye display
 framebuffer DAVINCI	0x08	2	98730/98731 (\davinci\) display
 framebuffer XXXCATSEYE	0x09	1	catseye display
+framebuffer TIGERSHARK	0x0c	3	TurboVRX (\tigershark\) display
 framebuffer HYPERION	0x0e	1	A1096A (\hyperion\) display
+framebuffer A1474MID	0x10	4	A1474-69511 on-board mid-res graphics
+framebuffer A147xVGA	0x11	4	A147x-69510 on-board VGA graphics
 
 /* Unsupported framebuffers. */
 
 framebuffer XGENESIS	0x0b	1	x-genesis display
-framebuffer TIGERSHARK	0x0c	3	TurboVRX (\tigershark\) display
 framebuffer YGENESIS	0x0d	1	y-genesis display
-framebuffer A1474MID	0x10	4	A1474-69511 on-board mid-res graphics
-framebuffer A147xVGA	0x11	4	A147x-69510 on-board VGA graphics
 /* No ID info about A1474-69515 on-board high-res graphics */
 
 /* Devices not yet supported.  Descriptions are lacking. */



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

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:41:38 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diodevs.h diodevs_data.h

Log Message:
Regen from diodevs rev 1.14:
 Move recently supported framebuffers out of the unsupported list.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hp300/dev/diodevs.h \
src/sys/arch/hp300/dev/diodevs_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/arch/hp300/dev/diodevs.h
diff -u src/sys/arch/hp300/dev/diodevs.h:1.16 src/sys/arch/hp300/dev/diodevs.h:1.17
--- src/sys/arch/hp300/dev/diodevs.h:1.16	Sun Feb  6 04:06:58 2011
+++ src/sys/arch/hp300/dev/diodevs.h	Sat Feb 19 05:41:38 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs.h,v 1.16 2011/02/06 04:06:58 tsutsui Exp $	*/
+/*	$NetBSD: diodevs.h,v 1.17 2011/02/19 05:41:38 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.13 2011/02/06 04:06:11 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.14 2011/02/19 05:40:58 tsutsui Exp 
  */
 
 /*-
@@ -114,26 +114,26 @@
 #define	DIO_DEVICE_SECID_XXXCATSEYE	0x09
 #define	DIO_DEVICE_DESC_XXXCATSEYE	catseye display
 
+#define	DIO_DEVICE_SECID_TIGERSHARK	0x0c
+#define	DIO_DEVICE_DESC_TIGERSHARK	TurboVRX (\tigershark\) display
+
 #define	DIO_DEVICE_SECID_HYPERION	0x0e
 #define	DIO_DEVICE_DESC_HYPERION	A1096A (\hyperion\) display
 
+#define	DIO_DEVICE_SECID_A1474MID	0x10
+#define	DIO_DEVICE_DESC_A1474MID	A1474-69511 on-board mid-res graphics
+
+#define	DIO_DEVICE_SECID_A147xVGA	0x11
+#define	DIO_DEVICE_DESC_A147xVGA	A147x-69510 on-board VGA graphics
+
 /* Unsupported framebuffers. */
 
 
 #define	DIO_DEVICE_SECID_XGENESIS	0x0b
 #define	DIO_DEVICE_DESC_XGENESIS	x-genesis display
 
-#define	DIO_DEVICE_SECID_TIGERSHARK	0x0c
-#define	DIO_DEVICE_DESC_TIGERSHARK	TurboVRX (\tigershark\) display
-
 #define	DIO_DEVICE_SECID_YGENESIS	0x0d
 #define	DIO_DEVICE_DESC_YGENESIS	y-genesis display
-
-#define	DIO_DEVICE_SECID_A1474MID	0x10
-#define	DIO_DEVICE_DESC_A1474MID	A1474-69511 on-board mid-res graphics
-
-#define	DIO_DEVICE_SECID_A147xVGA	0x11
-#define	DIO_DEVICE_DESC_A147xVGA	A147x-69510 on-board VGA graphics
 /* No ID info about A1474-69515 on-board high-res graphics */
 
 /* Devices not yet supported.  Descriptions are lacking. */
Index: src/sys/arch/hp300/dev/diodevs_data.h
diff -u src/sys/arch/hp300/dev/diodevs_data.h:1.16 src/sys/arch/hp300/dev/diodevs_data.h:1.17
--- src/sys/arch/hp300/dev/diodevs_data.h:1.16	Sun Feb  6 04:06:58 2011
+++ src/sys/arch/hp300/dev/diodevs_data.h	Sat Feb 19 05:41:38 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs_data.h,v 1.16 2011/02/06 04:06:58 tsutsui Exp $	*/
+/*	$NetBSD: diodevs_data.h,v 1.17 2011/02/19 05:41:38 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.13 2011/02/06 04:06:11 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.14 2011/02/19 05:40:58 tsutsui Exp 
  */
 
 /*-
@@ -62,12 +62,12 @@
 	{ 0x39,	0x07,	1 },
 	{ 0x39,	0x08,	2 },
 	{ 0x39,	0x09,	1 },
-	{ 0x39,	0x0e,	1 },
-	{ 0x39,	0x0b,	1 },
 	{ 0x39,	0x0c,	3 },
-	{ 0x39,	0x0d,	1 },
+	{ 0x39,	0x0e,	1 },
 	{ 0x39,	0x10,	4 },
 	{ 0x39,	0x11,	4 },
+	{ 0x39,	0x0b,	1 },
+	{ 0x39,	0x0d,	1 },
 	{ 0x03,	0,	1 },
 	{ 0x04,	0,	1 },
 	{ 0x06,	0,	1 },
@@ -114,12 +114,12 @@
 	{ 0x39,	0x07,	DIO_DEVICE_DESC_HRMCATSEYE },
 	{ 0x39,	0x08,	DIO_DEVICE_DESC_DAVINCI },
 	{ 0x39,	0x09,	DIO_DEVICE_DESC_XXXCATSEYE },
-	{ 0x39,	0x0e,	DIO_DEVICE_DESC_HYPERION },
-	{ 0x39,	0x0b,	DIO_DEVICE_DESC_XGENESIS },
 	{ 0x39,	0x0c,	DIO_DEVICE_DESC_TIGERSHARK },
-	{ 0x39,	0x0d,	DIO_DEVICE_DESC_YGENESIS },
+	{ 0x39,	0x0e,	DIO_DEVICE_DESC_HYPERION },
 	{ 0x39,	0x10,	DIO_DEVICE_DESC_A1474MID },
 	{ 0x39,	0x11,	DIO_DEVICE_DESC_A147xVGA },
+	{ 0x39,	0x0b,	DIO_DEVICE_DESC_XGENESIS },
+	{ 0x39,	0x0d,	DIO_DEVICE_DESC_YGENESIS },
 	{ 0x03,	0,	DIO_DEVICE_DESC_MISC0 },
 	{ 0x04,	0,	DIO_DEVICE_DESC_MISC1 },
 	{ 0x06,	0,	DIO_DEVICE_DESC_PARALLEL },



CVS commit: src

2011-02-18 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Sat Feb 19 07:11:10 UTC 2011

Modified Files:
src/sbin/raidctl: raidctl.c
src/sys/dev/raidframe: raidframevar.h rf_copyback.c rf_disks.c
rf_netbsdkintf.c rf_reconstruct.c

Log Message:
Define accessors for number of blocks and partition size in the
component label and use them where appropriate.  Disscussed on tech-kern.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sbin/raidctl/raidctl.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/raidframe/raidframevar.h
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/raidframe/rf_copyback.c
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/raidframe/rf_disks.c
cvs rdiff -u -r1.281 -r1.282 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/raidframe/rf_reconstruct.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/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.51 src/sbin/raidctl/raidctl.c:1.52
--- src/sbin/raidctl/raidctl.c:1.51	Wed Feb  9 11:22:49 2011
+++ src/sbin/raidctl/raidctl.c	Sat Feb 19 07:11:10 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: raidctl.c,v 1.51 2011/02/09 11:22:49 pooka Exp $   */
+/*  $NetBSD: raidctl.c,v 1.52 2011/02/19 07:11:10 enami Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: raidctl.c,v 1.51 2011/02/09 11:22:49 pooka Exp $);
+__RCSID($NetBSD: raidctl.c,v 1.52 2011/02/19 07:11:10 enami Exp $);
 #endif
 
 
@@ -743,9 +743,9 @@
 	printf(   sectPerSU: %d, SUsPerPU: %d, SUsPerRU: %d\n,
 	   component_label.sectPerSU, component_label.SUsPerPU, 
 	   component_label.SUsPerRU);
-	printf(   Queue size: %d, blocksize: %d, numBlocks: %u\n,
+	printf(   Queue size: %d, blocksize: %d, numBlocks: %PRIu64\n,
 	   component_label.maxOutstanding, component_label.blockSize,
-	   component_label.numBlocks);
+	   rf_component_label_numblocks(component_label));
 	printf(   RAID Level: %c\n, (char) component_label.parityConfig);
 	printf(   Autoconfig: %s\n, 
 	   component_label.autoconfigure ? Yes : No );

Index: src/sys/dev/raidframe/raidframevar.h
diff -u src/sys/dev/raidframe/raidframevar.h:1.14 src/sys/dev/raidframe/raidframevar.h:1.15
--- src/sys/dev/raidframe/raidframevar.h:1.14	Mon Nov  1 02:35:24 2010
+++ src/sys/dev/raidframe/raidframevar.h	Sat Feb 19 07:11:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: raidframevar.h,v 1.14 2010/11/01 02:35:24 mrg Exp $ */
+/*	$NetBSD: raidframevar.h,v 1.15 2011/02/19 07:11:09 enami Exp $ */
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -444,9 +444,9 @@
 	int maxOutstanding;   /* maxOutstanding disk requests */
 	int blockSize;/* size of component block.
  (disklabel-d_secsize) */
-	u_int numBlocks;  /* number of blocks on this component.  May
+	u_int __numBlocks;/* number of blocks on this component.  May
 			 be smaller than the partition size. */
-	u_int partitionSize;  /* number of blocks on this *partition*.
+	u_int __partitionSize;/* number of blocks on this *partition*.
  Must exactly match the partition size
  from the disklabel. */
 	/* Parity map stuff. */
@@ -476,6 +476,43 @@
 	int future_use2[42];  /* More future expansion */
 } RF_ComponentLabel_t;
 
+/*
+ * Following four functions are access macros for the number of blocks
+ * and partition size in component label.
+ */
+static inline RF_SectorCount_t
+rf_component_label_numblocks(const RF_ComponentLabel_t *cl)
+{
+
+	return ((RF_SectorCount_t)cl-numBlocksHi  32) |
+	cl-__numBlocks;
+}
+
+static inline void
+rf_component_label_set_numblocks(RF_ComponentLabel_t *cl, RF_SectorCount_t siz)
+{
+
+	cl-numBlocksHi = siz  32;
+	cl-__numBlocks = siz;
+}
+
+static inline RF_SectorCount_t
+rf_component_label_partitionsize(const RF_ComponentLabel_t *cl)
+{
+
+	return ((RF_SectorCount_t)cl-partitionSizeHi  32) |
+	cl-__partitionSize;
+}
+
+static inline void
+rf_component_label_set_partitionsize(RF_ComponentLabel_t *cl,
+RF_SectorCount_t siz)
+{
+
+	cl-partitionSizeHi = siz  32;
+	cl-__partitionSize = siz;
+}
+
 typedef struct RF_SingleComponent_s {
 	int row;
 	int column;

Index: src/sys/dev/raidframe/rf_copyback.c
diff -u src/sys/dev/raidframe/rf_copyback.c:1.44 src/sys/dev/raidframe/rf_copyback.c:1.45
--- src/sys/dev/raidframe/rf_copyback.c:1.44	Fri Nov 19 06:44:40 2010
+++ src/sys/dev/raidframe/rf_copyback.c	Sat Feb 19 07:11:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_copyback.c,v 1.44 2010/11/19 06:44:40 dholland Exp $	*/
+/*	$NetBSD: rf_copyback.c,v 1.45 2011/02/19 07:11:09 enami Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -38,7 +38,7 @@
  /
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_copyback.c,v 1.44 

CVS commit: src/sys/ufs/ffs

2011-02-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Feb 18 08:39:13 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_snapshot.c

Log Message:
Revert rev. 1.101.  Dead snapshots would hang around until unmount.

Adresses PR #44568 (WAPBL doens't play nice with snapshots).


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/ufs/ffs/ffs_snapshot.c

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



CVS commit: [bouyer-quota2] src/sys/ufs/ffs

2011-02-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 18 09:51:16 UTC 2011

Modified Files:
src/sys/ufs/ffs [bouyer-quota2]: ffs_snapshot.c

Log Message:
Sync with HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.102.4.5 -r1.102.4.6 src/sys/ufs/ffs/ffs_snapshot.c

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



CVS commit: src/usr.bin/rump_allserver

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 09:54:03 UTC 2011

Modified Files:
src/usr.bin/rump_allserver: rump_allserver.1 rump_allserver.c

Log Message:
Use host instead of the slightly more cryptic e to indicate
that the size of the mapping should be taken from the host file
size.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/rump_allserver/rump_allserver.1
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/rump_allserver/rump_allserver.c

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



CVS commit: src/sys/uvm

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 10:43:53 UTC 2011

Modified Files:
src/sys/uvm: uvm_glue.c

Log Message:
make this build w/o HAVE_CPU_UAREA_ROUTINES


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/uvm/uvm_glue.c

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



CVS commit: src/sys/opencrypto

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 10:50:57 UTC 2011

Modified Files:
src/sys/opencrypto: deflate.c

Log Message:
address the obvious byteorder and alignment problems in gzip size/crc
tail, should fix PR kern/44210 by Wolfgang Stukenbrock
being here, fix a bug in crc calculation of decompressed data, and
actually verify the crc


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/opencrypto/deflate.c

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



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 11:41:33 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
Use the env variable RUMPHIJACK to specify what facilities should
be hijacked.  If it's not specified, the default is
path=/rump,socket=all:nolocal.

So, if you're moof and want to relive your domain/os days (??),
you can do this:

pain-rustique:51:~ setenv RUMPHIJACK 'path=//'
pain-rustique:52:~ df //dev
Filesystem   1K-blocks   Used  Avail %Cap Mounted on
rumpfs1  1  0 100% /
pain-rustique:53:~ df /dev
Filesystem   1K-blocks   Used  Avail %Cap Mounted on
/dev/wd0a   1019864 280640 688232  28% /


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/lib/librumphijack/hijack.c

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



CVS commit: [bouyer-quota2] src/sys/ufs/ufs

2011-02-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 18 11:46:43 UTC 2011

Modified Files:
src/sys/ufs/ufs [bouyer-quota2]: ufs_quota2.c

Log Message:
Only use B_MODIFY when needed, avoid unecessery copy on write when using
snapshots.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/ufs/ufs/ufs_quota2.c

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



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 12:22:46 UTC 2011

Modified Files:
src/lib/librumphijack: rumphijack.3

Log Message:
Document .Ev RUMPHIJACK


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librumphijack/rumphijack.3

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



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 13:04:52 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
give the signmonkey a banana


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/lib/librumphijack/hijack.c

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



CVS commit: src/tests/fs

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 13:07:54 UTC 2011

Modified Files:
src/tests/fs: Makefile
Added Files:
src/tests/fs/hfs: Makefile colon.hfs.bz2.uue t_pathconvert.c

Log Message:
Add test case for /-: conversion from PR kern/44523 by
Taylor R Campbell.

I adjusted the test to uudecode + bunzip2 the supplied image, and
removed the null-finder from the dirent code, since it had an
off-by-one which made the test fail.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tests/fs/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/fs/hfs/Makefile \
src/tests/fs/hfs/colon.hfs.bz2.uue src/tests/fs/hfs/t_pathconvert.c

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



CVS commit: src/etc/mtree

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 13:08:41 UTC 2011

Modified Files:
src/etc/mtree: NetBSD.dist.tests

Log Message:
hfs


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/etc/mtree/NetBSD.dist.tests

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/tests

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 13:10:04 UTC 2011

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

Log Message:
hfs


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.250 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/kern

2011-02-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Feb 18 13:24:40 UTC 2011

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

Log Message:
Adjust previous: set the dealloc soft limit to half hard limit.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/kern/vfs_wapbl.c

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



CVS commit: src/sys/dev/acpi

2011-02-18 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Feb 18 13:56:03 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_wakedev.c

Log Message:
A small cleanup for the previous; use kmem(9), add assertions, etc.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/acpi/acpi_wakedev.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/wscons

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 18 13:56:11 UTC 2011

Modified Files:
src/sys/dev/wscons: wsdisplay_vcons.c wsdisplay_vconsvar.h

Log Message:
add vcons_hard_switch, for switching w/o callouts (eg. entering ddb)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/wscons/wsdisplay_vcons.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/wscons/wsdisplay_vconsvar.h

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



CVS commit: src/sys/dev/wsfb

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 18 13:56:59 UTC 2011

Modified Files:
src/sys/dev/wsfb: genfb.c

Log Message:
call vcons_hard_switch to switch to the console screen when entering polling
mode, makes ddb-from-X work with genfb on x86


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/wsfb/genfb.c

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



CVS commit: src/lib/librumphijack

2011-02-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Feb 18 14:25:04 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
uhm, put PF_LOCAL on the socketlist


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/lib/librumphijack/hijack.c

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/drm

2011-02-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 18 14:26:10 UTC 2011

Modified Files:
src/sys/external/bsd/drm/conf: files.drm
src/sys/external/bsd/drm/dist/bsd-core: drmP.h drm_linux_list.h
drm_memory.c via_drv.c
src/sys/external/bsd/drm/dist/shared-core: via_dma.c via_drm.h
via_drv.h via_irq.c via_map.c via_mm.c via_verifier.c
via_verifier.h via_video.c
Added Files:
src/sys/external/bsd/drm/dist/bsd-core: drm_hashtab.c drm_hashtab.h
drm_mm.c drm_mm.h drm_sman.c drm_sman.h via_dmablit.c via_dmablit.h

Log Message:
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm/conf/files.drm
cvs rdiff -u -r1.19 -r1.20 src/sys/external/bsd/drm/dist/bsd-core/drmP.h
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm/dist/bsd-core/drm_hashtab.c \
src/sys/external/bsd/drm/dist/bsd-core/drm_hashtab.h \
src/sys/external/bsd/drm/dist/bsd-core/drm_mm.c \
src/sys/external/bsd/drm/dist/bsd-core/drm_mm.h \
src/sys/external/bsd/drm/dist/bsd-core/drm_sman.c \
src/sys/external/bsd/drm/dist/bsd-core/drm_sman.h \
src/sys/external/bsd/drm/dist/bsd-core/via_dmablit.c \
src/sys/external/bsd/drm/dist/bsd-core/via_dmablit.h
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm/dist/bsd-core/via_drv.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/shared-core/via_dma.c \
src/sys/external/bsd/drm/dist/shared-core/via_drv.h \
src/sys/external/bsd/drm/dist/shared-core/via_irq.c \
src/sys/external/bsd/drm/dist/shared-core/via_map.c \
src/sys/external/bsd/drm/dist/shared-core/via_mm.c \
src/sys/external/bsd/drm/dist/shared-core/via_verifier.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/drm/dist/shared-core/via_drm.h \
src/sys/external/bsd/drm/dist/shared-core/via_verifier.h \
src/sys/external/bsd/drm/dist/shared-core/via_video.c

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



  1   2   >