PERFORCE change 103348 for review

Robert Watson rwatson at FreeBSD.org
Sun Aug 6 17:17:39 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=103348

Change 103348 by rwatson at rwatson_zoo on 2006/08/06 17:16:36

	Integrate TrustedBSD base branch; fix mac_associate_nfsd_label()
	prototype.

Affected files ...

.. //depot/projects/trustedbsd/base/etc/defaults/rc.conf#57 integrate
.. //depot/projects/trustedbsd/base/gnu/usr.bin/groff/tmac/mdoc.local#28 integrate
.. //depot/projects/trustedbsd/base/sbin/dump/optr.c#16 integrate
.. //depot/projects/trustedbsd/base/sbin/ipfw/ipfw2.c#41 integrate
.. //depot/projects/trustedbsd/base/share/examples/drivers/make_device_driver.sh#5 integrate
.. //depot/projects/trustedbsd/base/sys/amd64/amd64/pmap.c#33 integrate
.. //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_stream.c#24 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/usbdevs#55 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uscanner.c#25 integrate
.. //depot/projects/trustedbsd/base/sys/i386/i386/pmap.c#67 integrate
.. //depot/projects/trustedbsd/base/sys/kern/Makefile#4 integrate
.. //depot/projects/trustedbsd/base/sys/kern/uipc_syscalls.c#56 integrate
.. //depot/projects/trustedbsd/base/sys/kern/uipc_usrreq.c#42 integrate
.. //depot/projects/trustedbsd/base/sys/kern/vfs_lookup.c#24 integrate
.. //depot/projects/trustedbsd/base/sys/kern/vfs_subr.c#78 integrate
.. //depot/projects/trustedbsd/base/sys/netatalk/ddp_usrreq.c#17 integrate
.. //depot/projects/trustedbsd/base/sys/security/mac_biba/mac_biba.c#50 integrate
.. //depot/projects/trustedbsd/base/sys/sys/mac_policy.h#47 integrate
.. //depot/projects/trustedbsd/base/sys/sys/param.h#56 integrate
.. //depot/projects/trustedbsd/base/sys/vm/swap_pager.c#47 integrate
.. //depot/projects/trustedbsd/base/sys/vm/vm_fault.c#47 integrate
.. //depot/projects/trustedbsd/base/sys/vm/vm_page.c#63 integrate
.. //depot/projects/trustedbsd/base/tools/tools/net80211/wlaninject/wlaninject.c#2 integrate
.. //depot/projects/trustedbsd/base/usr.sbin/kldxref/kldxref.c#13 integrate

Differences ...

==== //depot/projects/trustedbsd/base/etc/defaults/rc.conf#57 (text+ko) ====

@@ -15,7 +15,7 @@
 # For a more detailed explanation of all the rc.conf variables, please
 # refer to the rc.conf(5) manual page.
 #
-# $FreeBSD: src/etc/defaults/rc.conf,v 1.290 2006/07/21 15:55:18 yar Exp $
+# $FreeBSD: src/etc/defaults/rc.conf,v 1.291 2006/08/05 20:28:50 njl Exp $
 
 ##############################################################
 ###  Important initial Boot-time options  ####################
@@ -516,9 +516,9 @@
 devfs_system_ruleset=""	# The name of a ruleset to apply to /dev
 devfs_set_rulesets=""	# A list of /mount/dev=ruleset_name settings to
 			# apply (must be mounted already, i.e. fstab(5))
-performance_cx_lowest="LOW"	# Online CPU idle state
+performance_cx_lowest="HIGH"	# Online CPU idle state
 performance_cpu_freq="NONE"	# Online CPU frequency
-economy_cx_lowest="LOW"		# Offline CPU idle state
+economy_cx_lowest="HIGH"	# Offline CPU idle state
 economy_cpu_freq="NONE"		# Offline CPU frequency
 virecover_enable="YES"	# Perform housekeeping for the vi(1) editor
 ugidfw_enable="NO"	# Load mac_bsdextended(4) rules on boot

==== //depot/projects/trustedbsd/base/gnu/usr.bin/groff/tmac/mdoc.local#28 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.52 2006/01/12 15:33:18 ru Exp $
+.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.53 2006/08/05 20:38:23 yar Exp $
 .\"
 .\"     %beginstrip%
 .
@@ -34,6 +34,7 @@
 .\" FreeBSD .Lb values
 .ds doc-str-Lb-libarchive  Streaming Archive Library (libarchive, \-larchive)
 .ds doc-str-Lb-libbluetooth Bluetooth User Library (libbluetooth, \-lbluetooth)
+.ds doc-str-Lb-libbsm      Basic Security Module User Library (libbsm, \-lbsm)
 .ds doc-str-Lb-libc_r      Reentrant C\~Library (libc_r, \-lc_r)
 .ds doc-str-Lb-libcalendar Calendar Arithmetic Library (libcalendar, \-lcalendar)
 .ds doc-str-Lb-libcam      Common Access Method User Library (libcam, \-lcam)

==== //depot/projects/trustedbsd/base/sbin/dump/optr.c#16 (text+ko) ====

@@ -32,7 +32,7 @@
 static char sccsid[] = "@(#)optr.c	8.2 (Berkeley) 1/6/94";
 #endif
 static const char rcsid[] =
-  "$FreeBSD: src/sbin/dump/optr.c,v 1.32 2005/02/16 06:48:35 obrien Exp $";
+  "$FreeBSD: src/sbin/dump/optr.c,v 1.35 2006/08/06 14:23:50 marck Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -190,6 +190,7 @@
 {
 	double percent;
 	time_t	tnow, tdone;
+	char *tdone_str;
 	int deltat, hours, mins;
 
 	(void)time(&tnow);
@@ -207,15 +208,17 @@
 		hours = deltat / 3600;
 		mins = (deltat % 3600) / 60;
 
+		tdone_str = ctime(&tdone);
+		tdone_str[strlen(tdone_str) - 1] = '\0';
 		setproctitle(
 		    "%s: pass %d: %3.2f%% done, finished in %d:%02d at %s",
-		    disk, passno, percent, hours, mins, ctime(&tdone));
+		    disk, passno, percent, hours, mins, tdone_str);
 		if (tnow >= tschedule) {
 			tschedule = tnow + 300;
 			if (blockswritten < 500)
 				return;
-			msg("%3.2f%% done, finished in %d:%02d at %s", percent,
-			    hours, mins, ctime(&tdone));
+			msg("%3.2f%% done, finished in %d:%02d at %s\n", percent,
+			    hours, mins, tdone_str);
 		}
 	}
 }

==== //depot/projects/trustedbsd/base/sbin/ipfw/ipfw2.c#41 (text+ko) ====

@@ -17,7 +17,7 @@
  *
  * NEW command line interface for IP firewall facility
  *
- * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.91 2006/06/15 09:39:22 oleg Exp $
+ * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.92 2006/08/05 13:58:50 stefanf Exp $
  */
 
 #include <sys/param.h>
@@ -2243,7 +2243,7 @@
 		char buf[30];
 		char prefix[80];
 
-		if (p->next.sle_next != (struct dn_pipe *)DN_IS_PIPE)
+		if (SLIST_NEXT(p, next) != (struct dn_pipe *)DN_IS_PIPE)
 			break;	/* done with pipes, now queues */
 
 		/*
@@ -2282,7 +2282,7 @@
 	for (fs = next; nbytes >= sizeof *fs; fs = next) {
 		char prefix[80];
 
-		if (fs->next.sle_next != (struct dn_flow_set *)DN_IS_QUEUE)
+		if (SLIST_NEXT(fs, next) != (struct dn_flow_set *)DN_IS_QUEUE)
 			break;
 		l = sizeof(*fs) + fs->rq_elements * sizeof(*q);
 		next = (char *)fs + l;

==== //depot/projects/trustedbsd/base/share/examples/drivers/make_device_driver.sh#5 (text+ko) ====

@@ -12,6 +12,7 @@
 # cd /sys/modules/foo; make depend; make; make install; kldload foo
 #
 # arg1 to this script is expected to be lowercase "foo"
+# arg2 path to the kernel sources, "/sys" if omitted
 #
 # Trust me, RUN THIS SCRIPT :)
 #
@@ -19,19 +20,21 @@
 #   o generate foo_isa.c, foo_pci.c, foo_pccard.c, foo_cardbus.c, and foovar.h
 #   o Put pccard stuff in here.
 #
-# $FreeBSD: src/share/examples/drivers/make_device_driver.sh,v 1.21 2003/10/03 19:31:55 dds Exp $"
+# $FreeBSD: src/share/examples/drivers/make_device_driver.sh,v 1.23 2006/08/06 11:06:35 rik Exp $"
 #
 #
 if [ "X${1}" = "X" ]; then
 	echo "Hey, how about some help here... give me a device name!"
 	exit 1
 fi
+if [ "X${2}" = "X" ]; then
+	TOP=`cd /sys; pwd -P`
+	echo "Using ${TOP} as the path to the kernel sources!"
+else
+	TOP=${2}
+fi
 UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"`
 
-HERE=`pwd`
-cd /sys
-TOP=`pwd`
-
 RCS_KEYWORD=FreeBSD
 
 if [ -d ${TOP}/modules/${1} ]; then
@@ -46,7 +49,7 @@
 		echo "Cleaning up from prior runs"
 		rm -rf ${TOP}/dev/${1}
 		rm -rf ${TOP}/modules/${1}
-		rm ${TOP}/i386/conf/files.${UPPER}
+		rm ${TOP}/conf/files.${UPPER}
 		rm ${TOP}/i386/conf/${UPPER}
 		rm ${TOP}/sys/${1}io.h
 		;;
@@ -58,7 +61,7 @@
 
 echo "The following files will be created:"
 echo ${TOP}/modules/${1}
-echo ${TOP}/i386/conf/files.${UPPER}
+echo ${TOP}/conf/files.${UPPER}
 echo ${TOP}/i386/conf/${UPPER}
 echo ${TOP}/dev/${1}
 echo ${TOP}/dev/${1}/${1}.c
@@ -79,7 +82,7 @@
 # First add the file to a local file list.
 #######################################################################
 
-cat >${TOP}/i386/conf/files.${UPPER} <<DONE
+cat >${TOP}/conf/files.${UPPER} <<DONE
 dev/${1}/${1}.c	 optional ${1}
 DONE
 
@@ -88,12 +91,14 @@
 #######################################################################
 cat >${TOP}/i386/conf/${UPPER} <<DONE
 # Configuration file for kernel type: ${UPPER}
-ident	${UPPER}
 # \$${RCS_KEYWORD}$
+
+include		GENERIC
+
+ident		${UPPER}
+
 DONE
 
-grep -v GENERIC < /sys/i386/conf/GENERIC >>${TOP}/i386/conf/${UPPER}
-
 cat >>${TOP}/i386/conf/${UPPER} <<DONE
 options		DDB		# trust me, you'll need this
 device		${1}
@@ -152,8 +157,6 @@
 
 #include <machine/bus.h>
 #include <machine/resource.h>
-#include <machine/bus_pio.h>
-#include <machine/bus_memio.h>
 #include <sys/rman.h>
 
 #include <dev/pci/pcireg.h>
@@ -198,7 +201,7 @@
 	struct resource* res_irq;	/* Resource for irq range. */
 	struct resource* res_drq;	/* Resource for dma channel. */
 	device_t device;
-	dev_t dev;
+	struct cdev *dev;
 	void	*intr_cookie;
 	void	*vaddr;			/* Virtual address of mem resource. */
 	char	buffer[BUFFERSIZE];	/* If we need to buffer something. */
@@ -219,8 +222,8 @@
 static d_poll_t		${1}poll;
 static	void		${1}intr(void *arg);
 
-#define CDEV_MAJOR 20
 static struct cdevsw ${1}_cdevsw = {
+	.d_version =	D_VERSION,
 	.d_open =	${1}open,
 	.d_close =	${1}close,
 	.d_read =	${1}read,
@@ -229,7 +232,6 @@
 	.d_poll =	${1}poll,
 	.d_mmap =	${1}mmap,
 	.d_name =	"${1}",
-	.d_maj =	CDEV_MAJOR,
 };
 
 static devclass_t ${1}_devclass;
@@ -818,7 +820,7 @@
 }
 
 static int
-${1}ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+${1}ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
 {
 	struct ${1}_softc *scp = DEV2SOFTC(dev);
 
@@ -840,7 +842,7 @@
  * This should get you started.
  */
 static int
-${1}open(dev_t dev, int oflags, int devtype, struct thread *td)
+${1}open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
 	struct ${1}_softc *scp = DEV2SOFTC(dev);
 
@@ -852,7 +854,7 @@
 }
 
 static int
-${1}close(dev_t dev, int fflag, int devtype, struct thread *td)
+${1}close(struct cdev *dev, int fflag, int devtype, struct thread *td)
 {
 	struct ${1}_softc *scp = DEV2SOFTC(dev);
 
@@ -864,7 +866,7 @@
 }
 
 static int
-${1}read(dev_t dev, struct uio *uio, int ioflag)
+${1}read(struct cdev *dev, struct uio *uio, int ioflag)
 {
 	struct ${1}_softc *scp = DEV2SOFTC(dev);
 	int	 toread;
@@ -879,7 +881,7 @@
 }
 
 static int
-${1}write(dev_t dev, struct uio *uio, int ioflag)
+${1}write(struct cdev *dev, struct uio *uio, int ioflag)
 {
 	struct ${1}_softc *scp = DEV2SOFTC(dev);
 	int	towrite;
@@ -894,7 +896,7 @@
 }
 
 static int
-${1}mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
+${1}mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
 {
 	struct ${1}_softc *scp = DEV2SOFTC(dev);
 
@@ -913,7 +915,7 @@
 }
 
 static int
-${1}poll(dev_t dev, int which, struct thread *td)
+${1}poll(struct cdev *dev, int which, struct thread *td)
 {
 	struct ${1}_softc *scp = DEV2SOFTC(dev);
 
@@ -967,15 +969,23 @@
 .include <bsd.kmod.mk>
 DONE
 
-(cd ${TOP}/modules/${1}; make depend; make )
-exit
+echo -n "Do you want to build the '${1}' module? [Y]"
+read VAL
+if [ "-z" "$VAL" ]; then
+	VAL=YES
+fi
+case ${VAL} in
+[yY]*)
+	(cd ${TOP}/modules/${1}; make depend; make )
+	;;
+*)
+#	exit
+	;;
+esac
 
-config ${UPPER}
-cd ../../compile/${UPPER}
-make depend
-make ${1}.o
-make
-exit
+echo ""
+echo "To build the kernel you should merge ${TOP}/conf/files.${UPPER} " \
+	"into one of the ${TOP}/conf/files*"
 
 #--------------end of script---------------
 #

==== //depot/projects/trustedbsd/base/sys/amd64/amd64/pmap.c#33 (text+ko) ====

@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.568 2006/08/01 19:06:04 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.569 2006/08/06 06:29:16 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -2506,7 +2506,6 @@
 retry:
 		p = vm_page_lookup(object, pindex);
 		if (p != NULL) {
-			vm_page_lock_queues();
 			if (vm_page_sleep_if_busy(p, FALSE, "init4p"))
 				goto retry;
 		} else {
@@ -2525,8 +2524,8 @@
 			p = vm_page_lookup(object, pindex);
 			vm_page_lock_queues();
 			vm_page_wakeup(p);
+			vm_page_unlock_queues();
 		}
-		vm_page_unlock_queues();
 
 		ptepa = VM_PAGE_TO_PHYS(p);
 		if (ptepa & (NBPDR - 1))

==== //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_stream.c#24 (text+ko) ====

@@ -36,11 +36,10 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.61 2006/07/28 16:56:17 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.62 2006/08/05 22:04:21 rwatson Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
-#include "opt_mac.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -50,7 +49,6 @@
 #include <sys/lock.h>
 #include <sys/malloc.h>
 #include <sys/file.h> 		/* Must come after sys/malloc.h */
-#include <sys/mac.h>
 #include <sys/mbuf.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>

==== //depot/projects/trustedbsd/base/sys/dev/usb/usbdevs#55 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/sys/dev/usb/usbdevs,v 1.263 2006/07/24 19:47:00 imp Exp $
+$FreeBSD: src/sys/dev/usb/usbdevs,v 1.264 2006/08/06 12:01:42 bms Exp $
 /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */
 
 /*-
@@ -890,6 +890,7 @@
 product EPSON 1670		0x011f	Perfection 1670 scanner
 product EPSON 1270		0x0120	Perfection 1270 scanner
 product EPSON 2480		0x0121  Perfection 2480 scanner
+product EPSON 3500		0x080e	CX-3500/3600/3650 MFP
 product EPSON RX425		0x080f	Stylus Photo RX425 scanner
 
 /* e-TEK Labs products */

==== //depot/projects/trustedbsd/base/sys/dev/usb/uscanner.c#25 (text+ko) ====

@@ -5,7 +5,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/uscanner.c,v 1.71 2006/06/18 17:28:08 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/uscanner.c,v 1.72 2006/08/06 12:01:42 bms Exp $");
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -213,6 +213,7 @@
  {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_GT9700F }, USC_KEEP_OPEN },
  {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_GT9300UF }, 0 },
  {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_2480 }, 0 },
+ {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_3500 }, USC_KEEP_OPEN },
 
   /* UMAX */
  {{ USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA1220U }, 0 },

==== //depot/projects/trustedbsd/base/sys/i386/i386/pmap.c#67 (text+ko) ====

@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.572 2006/08/01 19:06:05 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.573 2006/08/06 06:29:16 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -2581,7 +2581,6 @@
 retry:
 		p = vm_page_lookup(object, pindex);
 		if (p != NULL) {
-			vm_page_lock_queues();
 			if (vm_page_sleep_if_busy(p, FALSE, "init4p"))
 				goto retry;
 		} else {
@@ -2600,8 +2599,8 @@
 			p = vm_page_lookup(object, pindex);
 			vm_page_lock_queues();
 			vm_page_wakeup(p);
+			vm_page_unlock_queues();
 		}
-		vm_page_unlock_queues();
 
 		ptepa = VM_PAGE_TO_PHYS(p);
 		if (ptepa & (NBPDR - 1))

==== //depot/projects/trustedbsd/base/sys/kern/Makefile#4 (text+ko) ====

@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.2 (Berkeley) 3/21/94
-# $FreeBSD: src/sys/kern/Makefile,v 1.12 2005/07/13 20:50:17 jhb Exp $
+# $FreeBSD: src/sys/kern/Makefile,v 1.13 2006/08/05 19:25:14 jb Exp $
 
 # Makefile for kernel tags files, init_sysent, etc.
 
@@ -11,10 +11,11 @@
 sysent:  init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscall.mk \
 ../sys/sysproto.h
 
-init_sysent.c syscalls.c ../sys/syscall.h \
+init_sysent.c syscalls.c systrace_args.c ../sys/syscall.h \
 ../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master
 	-mv -f init_sysent.c init_sysent.c.bak
 	-mv -f syscalls.c syscalls.c.bak
+	-mv -f systrace_args.c systrace_args.c.bak
 	-mv -f ../sys/syscall.h ../sys/syscall.h.bak
 	-mv -f ../sys/syscall.mk ../sys/syscall.mk.bak
 	-mv -f ../sys/sysproto.h ../sys/sysproto.h.bak

==== //depot/projects/trustedbsd/base/sys/kern/uipc_syscalls.c#56 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.235 2006/08/04 05:53:20 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.236 2006/08/06 01:00:09 alc Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -2038,14 +2038,14 @@
 				VM_OBJECT_LOCK(obj);
 				goto retry_lookup;
 			}
-		} else {
-			vm_page_lock_queues();
-			if (vm_page_sleep_if_busy(pg, TRUE, "sfpbsy"))
-				goto retry_lookup;
+		} else if (vm_page_sleep_if_busy(pg, TRUE, "sfpbsy"))
+			goto retry_lookup;
+		else {
 			/*
 			 * Wire the page so it does not get ripped out from
 			 * under us.
 			 */
+			vm_page_lock_queues();
 			vm_page_wire(pg);
 			vm_page_unlock_queues();
 		}

==== //depot/projects/trustedbsd/base/sys/kern/uipc_usrreq.c#42 (text+ko) ====

@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.184 2006/08/02 14:30:58 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.185 2006/08/06 10:39:21 rwatson Exp $");
 
 #include "opt_mac.h"
 
@@ -800,9 +800,6 @@
 	.pru_sense =		uipc_sense,
 	.pru_shutdown =		uipc_shutdown,
 	.pru_sockaddr =		uipc_sockaddr,
-	.pru_sosend =		sosend_generic,
-	.pru_soreceive =	soreceive_generic,
-	.pru_sopoll =		sopoll_generic,
 	.pru_close =		uipc_close,
 };
 

==== //depot/projects/trustedbsd/base/sys/kern/vfs_lookup.c#24 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.91 2006/04/29 07:13:49 kris Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.93 2006/08/05 21:40:59 rwatson Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_mac.h"
@@ -88,7 +88,7 @@
     "Enables/Disables shared locks for path name translation");
 
 /*
- * Convert a pathname into a pointer to a locked inode.
+ * Convert a pathname into a pointer to a locked vnode.
  *
  * The FOLLOW flag is set when symbolic links are to be followed
  * when they occur at the end of the name translation process.
@@ -108,12 +108,11 @@
  *	}
  */
 int
-namei(ndp)
-	register struct nameidata *ndp;
+namei(struct nameidata *ndp)
 {
-	register struct filedesc *fdp;	/* pointer to file descriptor state */
-	register char *cp;		/* pointer into pathname argument */
-	register struct vnode *dp;	/* the directory we are searching */
+	struct filedesc *fdp;	/* pointer to file descriptor state */
+	char *cp;		/* pointer into pathname argument */
+	struct vnode *dp;	/* the directory we are searching */
 	struct iovec aiov;		/* uio for reading symbolic links */
 	struct uio auio;
 	int error, linklen;
@@ -343,11 +342,10 @@
  *	    if WANTPARENT set, return unlocked parent in ni_dvp
  */
 int
-lookup(ndp)
-	register struct nameidata *ndp;
+lookup(struct nameidata *ndp)
 {
-	register char *cp;		/* pointer into pathname argument */
-	register struct vnode *dp = 0;	/* the directory we are searching */
+	char *cp;		/* pointer into pathname argument */
+	struct vnode *dp = 0;	/* the directory we are searching */
 	struct vnode *tdp;		/* saved dp */
 	struct mount *mp;		/* mount table entry */
 	int docache;			/* == 0 do not cache last component */
@@ -607,7 +605,7 @@
 		/*
 		 * We return with ni_vp NULL to indicate that the entry
 		 * doesn't currently exist, leaving a pointer to the
-		 * (possibly locked) directory inode in ndp->ni_dvp.
+		 * (possibly locked) directory vnode in ndp->ni_dvp.
 		 */
 		if (cnp->cn_flags & SAVESTART) {
 			ndp->ni_startdir = ndp->ni_dvp;
@@ -766,9 +764,7 @@
  *    Used by lookup to re-aquire things.
  */
 int
-relookup(dvp, vpp, cnp)
-	struct vnode *dvp, **vpp;
-	struct componentname *cnp;
+relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
 {
 	struct thread *td = cnp->cn_thread;
 	struct vnode *dp = 0;		/* the directory we are searching */
@@ -859,7 +855,7 @@
 		/*
 		 * We return with ni_vp NULL to indicate that the entry
 		 * doesn't currently exist, leaving a pointer to the
-		 * (possibly locked) directory inode in ndp->ni_dvp.
+		 * (possibly locked) directory vnode in ndp->ni_dvp.
 		 */
 		return (0);
 	}
@@ -910,9 +906,7 @@
  * Free data allocated by namei(); see namei(9) for details.
  */
 void
-NDFREE(ndp, flags)
-     struct nameidata *ndp;
-     const u_int flags;
+NDFREE(struct nameidata *ndp, const u_int flags)
 {
 	int unlock_dvp;
 	int unlock_vp;

==== //depot/projects/trustedbsd/base/sys/kern/vfs_subr.c#78 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.678 2006/07/15 06:44:27 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.679 2006/08/06 10:43:35 rwatson Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mac.h"
@@ -3134,6 +3134,9 @@
  * and optional call-by-reference privused argument allowing vaccess()
  * to indicate to the caller whether privilege was used to satisfy the
  * request (obsoleted).  Returns 0 on success, or an errno on failure.
+ *
+ * The ifdef'd CAPABILITIES version is here for reference, but is not
+ * actually used.
  */
 int
 vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid,
@@ -3207,9 +3210,11 @@
 	/*
 	 * Build a capability mask to determine if the set of capabilities
 	 * satisfies the requirements when combined with the granted mask
-	 * from above.
-	 * For each capability, if the capability is required, bitwise
-	 * or the request type onto the cap_granted mask.
+	 * from above.  For each capability, if the capability is required,
+	 * bitwise or the request type onto the cap_granted mask.
+	 *
+	 * Note: This is never actually used, but is here for reference
+	 * purposes.
 	 */
 	cap_granted = 0;
 
@@ -3219,7 +3224,8 @@
 		 * VEXEC requests, instead of CAP_DAC_EXECUTE.
 		 */
 		if ((acc_mode & VEXEC) && ((dac_granted & VEXEC) == 0) &&
-		    !cap_check(cred, NULL, CAP_DAC_READ_SEARCH, SUSER_ALLOWJAIL))
+		    !cap_check(cred, NULL, CAP_DAC_READ_SEARCH,
+		    SUSER_ALLOWJAIL))
 			cap_granted |= VEXEC;
 	} else {
 		if ((acc_mode & VEXEC) && ((dac_granted & VEXEC) == 0) &&

==== //depot/projects/trustedbsd/base/sys/netatalk/ddp_usrreq.c#17 (text+ko) ====

@@ -24,7 +24,7 @@
  *	+1-313-764-2278
  *	netatalk at umich.edu
  *
- * $FreeBSD: src/sys/netatalk/ddp_usrreq.c,v 1.51 2006/07/21 17:11:13 rwatson Exp $
+ * $FreeBSD: src/sys/netatalk/ddp_usrreq.c,v 1.52 2006/08/05 14:14:34 rwatson Exp $
  */
 
 #include <sys/param.h>
@@ -217,6 +217,7 @@
 	DDP_LOCK(ddp);
 	at_pcbdisconnect(ddp);
 	DDP_UNLOCK(ddp);
+	soisdisconnected(so);
 }
 
 static void
@@ -230,6 +231,7 @@
 	DDP_LOCK(ddp);
 	at_pcbdisconnect(ddp);
 	DDP_UNLOCK(ddp);
+	soisdisconnected(so);
 }
 
 void 

==== //depot/projects/trustedbsd/base/sys/security/mac_biba/mac_biba.c#50 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/security/mac_biba/mac_biba.c,v 1.92 2006/07/10 19:13:32 csjp Exp $
+ * $FreeBSD: src/sys/security/mac_biba/mac_biba.c,v 1.93 2006/08/06 16:56:15 rwatson Exp $
  */
 
 /*
@@ -3019,7 +3019,7 @@
 	return (0);
 }
 
-static int
+static void
 mac_biba_associate_nfsd_label(struct ucred *cred)
 {
 	struct mac_biba *label;
@@ -3028,7 +3028,6 @@
 	mac_biba_set_effective(label, MAC_BIBA_TYPE_LOW, 0, NULL);
 	mac_biba_set_range(label, MAC_BIBA_TYPE_LOW, 0, NULL,
 	    MAC_BIBA_TYPE_HIGH, 0, NULL);
-	return (0);
 }
 
 static struct mac_policy_ops mac_biba_ops =

==== //depot/projects/trustedbsd/base/sys/sys/mac_policy.h#47 (text+ko) ====

@@ -35,7 +35,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sys/mac_policy.h,v 1.72 2006/04/26 14:18:55 rwatson Exp $
+ * $FreeBSD: src/sys/sys/mac_policy.h,v 1.73 2006/08/06 16:56:15 rwatson Exp $
  */
 /*
  * Kernel interface for MAC policy modules.
@@ -589,7 +589,7 @@
 typedef int	(*mpo_check_vnode_write_t)(struct ucred *active_cred,
 		    struct ucred *file_cred, struct vnode *vp,
 		    struct label *label);
-typedef int	(*mpo_associate_nfsd_label_t)(struct ucred *cred);
+typedef void	(*mpo_associate_nfsd_label_t)(struct ucred *cred);
 
 struct mac_policy_ops {
 	/*

==== //depot/projects/trustedbsd/base/sys/sys/param.h#56 (text+ko) ====

@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)param.h	8.3 (Berkeley) 4/4/95
- * $FreeBSD: src/sys/sys/param.h,v 1.269 2006/07/29 19:44:07 simon Exp $
+ * $FreeBSD: src/sys/sys/param.h,v 1.270 2006/08/05 20:35:11 jb Exp $
  */
 
 #ifndef _SYS_PARAM_H_
@@ -331,4 +331,20 @@
 #define ctodb(db)			/* calculates pages to devblks */ \
 	((db) << (PAGE_SHIFT - DEV_BSHIFT))
 
+/*
+ * Solaris compatibility definitions.
+ */
+#ifdef _SOLARIS_C_SOURCE
+#define	PAGESIZE	PAGE_SIZE
+
+/*
+ * The OpenSolaris version is set according to the version last imported
+ * from http://dlc.sun.com/osol/on/downloads/current/. In FreeBSD header
+ * files it can be used to detemine the level of compatibility that the
+ * FreeBSD headers provide to OpenSolaris code. Perhaps one day there
+ * will be a really, really Single Unix Specification.
+ */
+#define __OpenSolaris_version 20060731
+#endif
+
 #endif	/* _SYS_PARAM_H_ */

==== //depot/projects/trustedbsd/base/sys/vm/swap_pager.c#47 (text+ko) ====

@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/swap_pager.c,v 1.280 2006/08/03 23:56:11 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/swap_pager.c,v 1.281 2006/08/05 19:07:07 alc Exp $");
 
 #include "opt_mac.h"
 #include "opt_swap.h"
@@ -1424,11 +1424,6 @@
 				 * NOTE: for reads, m->dirty will probably
 				 * be overridden by the original caller of
 				 * getpages so don't play cute tricks here.
-				 *
-				 * XXX IT IS NOT LEGAL TO FREE THE PAGE HERE
-				 * AS THIS MESSES WITH object->memq, and it is
-				 * not legal to mess with object->memq from an
-				 * interrupt.
 				 */
 				m->valid = 0;
 				if (i != bp->b_pager.pg_reqpage)

==== //depot/projects/trustedbsd/base/sys/vm/vm_fault.c#47 (text+ko) ====

@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.217 2006/07/21 23:22:49 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.218 2006/08/06 00:17:17 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -389,10 +389,8 @@
 				VM_OBJECT_LOCK(fs.object);
 				if (fs.m == vm_page_lookup(fs.object,
 				    fs.pindex)) {
-					vm_page_lock_queues();
-					if (!vm_page_sleep_if_busy(fs.m, TRUE,
-					    "vmpfw"))
-						vm_page_unlock_queues();
+					vm_page_sleep_if_busy(fs.m, TRUE,
+					    "vmpfw");
 				}
 				vm_object_pip_wakeup(fs.object);
 				VM_OBJECT_UNLOCK(fs.object);

==== //depot/projects/trustedbsd/base/sys/vm/vm_page.c#63 (text+ko) ====

@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_page.c,v 1.320 2006/08/03 23:56:11 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_page.c,v 1.321 2006/08/06 00:15:40 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -496,9 +496,10 @@
 vm_page_sleep_if_busy(vm_page_t m, int also_m_busy, const char *msg)
 {
 
-	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
 	VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
 	if ((m->flags & PG_BUSY) || (also_m_busy && m->busy)) {
+		if (!mtx_owned(&vm_page_queue_mtx))
+			vm_page_lock_queues();
 		vm_page_flag_set(m, PG_WANTED | PG_REFERENCED);
 		vm_page_unlock_queues();
 

==== //depot/projects/trustedbsd/base/tools/tools/net80211/wlaninject/wlaninject.c#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/tools/tools/net80211/wlaninject/wlaninject.c,v 1.1 2006/08/05 05:13:31 sam Exp $
+ * $FreeBSD: src/tools/tools/net80211/wlaninject/wlaninject.c,v 1.2 2006/08/05 18:21:04 sam Exp $
  */
 #include <stdlib.h>
 #include <stdio.h>
@@ -145,7 +145,7 @@
 	int rc;
 
 	iov[0].iov_base = p;
-	iov[0].iov_len = sizeof(*p);
+	iov[0].iov_len = p->ibp_len;
 
 	iov[1].iov_base = buf;
 	iov[1].iov_len = buflen;
@@ -486,11 +486,14 @@
 
 int do_verify(struct ieee80211_frame *sent, int slen, void *got, int glen)
 {
+#define BIT(n)  (1<<(n))
 	struct bpf_hdr *bpfh = got;
 	struct ieee80211_frame *wh;
 	struct ieee80211_radiotap_header *rth;
 	int i;
 	unsigned char *ptr, *ptr2;
+	uint32_t present;
+	uint8_t rflags;
 
 	/* get the 802.11 header */
 	glen -= bpfh->bh_hdrlen;
@@ -503,7 +506,18 @@
 	glen -= rth->it_len;
 	assert(glen > 0);
 	wh = (struct ieee80211_frame*) ((char*)rth + rth->it_len);
-	glen -= 4; /* 802.11 CRC */
+
+        /* check if FCS/CRC is included in packet */
+	present = le32toh(rth->it_present);
+	if (present & BIT(IEEE80211_RADIOTAP_FLAGS)) {
+		if (present & BIT(IEEE80211_RADIOTAP_TSFT))
+			rflags = ((const uint8_t *)rth)[8];
+		else
+			rflags = ((const uint8_t *)rth)[0];
+	} else  
+		rflags = 0;
+	if (rflags & IEEE80211_RADIOTAP_F_FCS)
+		glen -= IEEE80211_CRC_LEN;
 	assert(glen > 0);
 	
 	/* did we receive the packet we sent? */
@@ -526,6 +540,7 @@
 			       i, *ptr, *ptr2);
 	}
 	return -1;
+#undef BIT
 }
 
 int main(int argc, char *argv[])
@@ -534,10 +549,10 @@
 	char *iface = "ath0";
 	char *verify = NULL;
 	int chan = 1;
-	union {
+	struct {
 		struct ieee80211_frame w;
 		unsigned char buf[2048];
-	} u;
+	} __packed u;
 	int len = 0;
 	int ch;
 	struct ieee80211_bpf_params params;
@@ -546,6 +561,8 @@
 
 	memset(&u, 0, sizeof(u));
 	memset(&params, 0, sizeof(params));
+	params.ibp_vers = IEEE80211_BPF_VERSION;
+	params.ibp_len = sizeof(struct ieee80211_bpf_params) - 6,
 	params.ibp_rate0 = 2;		/* 1 MB/s XXX */
 	params.ibp_try0 = 1;		/* no retransmits */
 	params.ibp_power = 100;		/* nominal max */
@@ -763,15 +780,35 @@
 		setup_if(verify, chan);
 		fd2 = open_bpf(verify);
 	}
-	inject(fd, u.buf, len, &params);
+	inject(fd, wh, len, &params);
 	close(fd);
 	if (verify) {
 		char buf2[4096];
 		int rc;
 		int max = 10;
+		int timeout = 2;
+		fd_set fds;
+		struct timeval tv;
+		time_t start;
 
 		printf("Verifying via %s\n", verify);
+		start = time(NULL);
 		while (max--) {
+			FD_ZERO(&fds);
+			FD_SET(fd2, &fds);
+
+			tv.tv_usec = 0;
+			tv.tv_sec = time(NULL) - start;
+			if (tv.tv_sec >= timeout) {
+				timeout = 0;
+				break;
+			}
+			tv.tv_sec = timeout - tv.tv_sec;
+			if (select(fd2+1, &fds, NULL, NULL, &tv) == -1)
+				err(1, "select()");

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the trustedbsd-cvs mailing list