From owner-p4-projects@FreeBSD.ORG Mon Sep 10 15:48:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C96A616A420; Mon, 10 Sep 2007 15:48:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B4FA16A41A for ; Mon, 10 Sep 2007 15:48:10 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3A34F13C4DA for ; Mon, 10 Sep 2007 15:48:10 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8AFmAXL032822 for ; Mon, 10 Sep 2007 15:48:10 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8AFm975032819 for perforce@freebsd.org; Mon, 10 Sep 2007 15:48:09 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 10 Sep 2007 15:48:09 GMT Message-Id: <200709101548.l8AFm975032819@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 126272 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2007 15:48:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=126272 Change 126272 by rwatson@rwatson_zoo on 2007/09/10 15:48:00 Integrate TrustedBSD MAC2 branch. Affected files ... .. //depot/projects/trustedbsd/mac2/sys/amd64/linux32/linux32_proto.h#5 integrate .. //depot/projects/trustedbsd/mac2/sys/amd64/linux32/linux32_syscall.h#5 integrate .. //depot/projects/trustedbsd/mac2/sys/amd64/linux32/linux32_sysent.c#5 integrate .. //depot/projects/trustedbsd/mac2/sys/amd64/linux32/syscalls.master#5 integrate .. //depot/projects/trustedbsd/mac2/sys/compat/freebsd32/freebsd32_misc.c#5 integrate .. //depot/projects/trustedbsd/mac2/sys/compat/linux/linux_misc.c#7 integrate .. //depot/projects/trustedbsd/mac2/sys/dev/isp/isp_freebsd.h#4 integrate .. //depot/projects/trustedbsd/mac2/sys/dev/usb/if_zyd.c#1 branch .. //depot/projects/trustedbsd/mac2/sys/dev/usb/if_zydfw.h#1 branch .. //depot/projects/trustedbsd/mac2/sys/dev/usb/if_zydreg.h#1 branch .. //depot/projects/trustedbsd/mac2/sys/dev/usb/usbdevs#6 integrate .. //depot/projects/trustedbsd/mac2/sys/i386/linux/linux_proto.h#5 integrate .. //depot/projects/trustedbsd/mac2/sys/i386/linux/linux_syscall.h#5 integrate .. //depot/projects/trustedbsd/mac2/sys/i386/linux/linux_sysent.c#5 integrate .. //depot/projects/trustedbsd/mac2/sys/i386/linux/syscalls.master#5 integrate .. //depot/projects/trustedbsd/mac2/sys/kern/kern_ktrace.c#6 integrate .. //depot/projects/trustedbsd/mac2/sys/kern/vfs_syscalls.c#6 integrate .. //depot/projects/trustedbsd/mac2/sys/modules/zyd/Makefile#1 branch .. //depot/projects/trustedbsd/mac2/sys/netinet/ip_fw2.c#5 integrate .. //depot/projects/trustedbsd/mac2/sys/sys/mount.h#3 integrate Differences ... ==== //depot/projects/trustedbsd/mac2/sys/amd64/linux32/linux32_proto.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.31 2007/03/30 00:08:21 jkim Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.28 2007/03/30 00:06:21 jkim Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.32 2007/08/28 12:36:23 kib Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.29 2007/08/28 12:26:34 kib Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -734,6 +734,11 @@ char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)]; char val3_l_[PADL_(int)]; int val3; char val3_r_[PADR_(int)]; }; +struct linux_sched_getaffinity_args { + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char len_l_[PADL_(l_uint)]; l_uint len; char len_r_[PADR_(l_uint)]; + char user_mask_ptr_l_[PADL_(l_ulong *)]; l_ulong * user_mask_ptr; char user_mask_ptr_r_[PADR_(l_ulong *)]; +}; struct linux_set_thread_area_args { char desc_l_[PADL_(struct l_user_desc *)]; struct l_user_desc * desc; char desc_r_[PADR_(struct l_user_desc *)]; }; @@ -1099,6 +1104,7 @@ int linux_fremovexattr(struct thread *, struct linux_fremovexattr_args *); int linux_tkill(struct thread *, struct linux_tkill_args *); int linux_sys_futex(struct thread *, struct linux_sys_futex_args *); +int linux_sched_getaffinity(struct thread *, struct linux_sched_getaffinity_args *); int linux_set_thread_area(struct thread *, struct linux_set_thread_area_args *); int linux_fadvise64(struct thread *, struct linux_fadvise64_args *); int linux_exit_group(struct thread *, struct linux_exit_group_args *); @@ -1172,6 +1178,13 @@ #endif /* COMPAT_FREEBSD4 */ + +#ifdef COMPAT_FREEBSD6 + +#define nosys linux_nosys + +#endif /* COMPAT_FREEBSD6 */ + #define LINUX_SYS_AUE_linux_fork AUE_FORK #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_waitpid AUE_WAIT4 @@ -1346,6 +1359,7 @@ #define LINUX_SYS_AUE_linux_fremovexattr AUE_NULL #define LINUX_SYS_AUE_linux_tkill AUE_NULL #define LINUX_SYS_AUE_linux_sys_futex AUE_NULL +#define LINUX_SYS_AUE_linux_sched_getaffinity AUE_NULL #define LINUX_SYS_AUE_linux_set_thread_area AUE_NULL #define LINUX_SYS_AUE_linux_fadvise64 AUE_NULL #define LINUX_SYS_AUE_linux_exit_group AUE_EXIT ==== //depot/projects/trustedbsd/mac2/sys/amd64/linux32/linux32_syscall.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.31 2007/03/30 00:08:21 jkim Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.28 2007/03/30 00:06:21 jkim Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.32 2007/08/28 12:36:23 kib Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.29 2007/08/28 12:26:34 kib Exp */ #define LINUX_SYS_exit 1 @@ -222,6 +222,7 @@ #define LINUX_SYS_linux_fremovexattr 237 #define LINUX_SYS_linux_tkill 238 #define LINUX_SYS_linux_sys_futex 240 +#define LINUX_SYS_linux_sched_getaffinity 242 #define LINUX_SYS_linux_set_thread_area 243 #define LINUX_SYS_linux_fadvise64 250 #define LINUX_SYS_linux_exit_group 252 ==== //depot/projects/trustedbsd/mac2/sys/amd64/linux32/linux32_sysent.c#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.31 2007/03/30 00:08:21 jkim Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.28 2007/03/30 00:06:21 jkim Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.32 2007/08/28 12:36:23 kib Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.29 2007/08/28 12:26:34 kib Exp */ #include @@ -262,7 +262,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 239 = linux_sendfile64 */ { AS(linux_sys_futex_args), (sy_call_t *)linux_sys_futex, AUE_NULL, NULL, 0, 0 }, /* 240 = linux_sys_futex */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 241 = linux_sched_setaffinity */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 242 = linux_sched_getaffinity */ + { AS(linux_sched_getaffinity_args), (sy_call_t *)linux_sched_getaffinity, AUE_NULL, NULL, 0, 0 }, /* 242 = linux_sched_getaffinity */ { AS(linux_set_thread_area_args), (sy_call_t *)linux_set_thread_area, AUE_NULL, NULL, 0, 0 }, /* 243 = linux_set_thread_area */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 244 = linux_get_thread_area */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 245 = linux_io_setup */ ==== //depot/projects/trustedbsd/mac2/sys/amd64/linux32/syscalls.master#5 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.28 2007/03/30 00:06:21 jkim Exp $ + $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.29 2007/08/28 12:26:34 kib Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -408,7 +408,8 @@ 240 AUE_NULL STD { int linux_sys_futex(void *uaddr, int op, int val, \ struct l_timespec *timeout, void *uaddr2, int val3); } 241 AUE_NULL UNIMPL linux_sched_setaffinity -242 AUE_NULL UNIMPL linux_sched_getaffinity +242 AUE_NULL STD { int linux_sched_getaffinity(l_pid_t pid, l_uint len, \ + l_ulong *user_mask_ptr); } 243 AUE_NULL STD { int linux_set_thread_area(struct l_user_desc *desc); } 244 AUE_NULL UNIMPL linux_get_thread_area 245 AUE_NULL UNIMPL linux_io_setup ==== //depot/projects/trustedbsd/mac2/sys/compat/freebsd32/freebsd32_misc.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.66 2007/07/04 23:04:41 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.67 2007/08/28 20:28:11 jhb Exp $"); #include "opt_compat.h" @@ -135,28 +135,28 @@ static void copy_statfs(struct statfs *in, struct statfs32 *out) { - + + statfs_scale_blocks(in, INT32_MAX); bzero(out, sizeof(*out)); CP(*in, *out, f_bsize); - CP(*in, *out, f_iosize); + out->f_iosize = MIN(in->f_iosize, INT32_MAX); CP(*in, *out, f_blocks); CP(*in, *out, f_bfree); CP(*in, *out, f_bavail); - CP(*in, *out, f_files); - CP(*in, *out, f_ffree); + out->f_files = MIN(in->f_files, INT32_MAX); + out->f_ffree = MIN(in->f_ffree, INT32_MAX); CP(*in, *out, f_fsid); CP(*in, *out, f_owner); CP(*in, *out, f_type); CP(*in, *out, f_flags); - CP(*in, *out, f_flags); - CP(*in, *out, f_syncwrites); - CP(*in, *out, f_asyncwrites); + out->f_syncwrites = MIN(in->f_syncwrites, INT32_MAX); + out->f_asyncwrites = MIN(in->f_asyncwrites, INT32_MAX); strlcpy(out->f_fstypename, in->f_fstypename, MFSNAMELEN); strlcpy(out->f_mntonname, in->f_mntonname, min(MNAMELEN, FREEBSD4_MNAMELEN)); - CP(*in, *out, f_syncreads); - CP(*in, *out, f_asyncreads); + out->f_syncreads = MIN(in->f_syncreads, INT32_MAX); + out->f_asyncreads = MIN(in->f_asyncreads, INT32_MAX); strlcpy(out->f_mntfromname, in->f_mntfromname, min(MNAMELEN, FREEBSD4_MNAMELEN)); } ==== //depot/projects/trustedbsd/mac2/sys/compat/linux/linux_misc.c#7 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.213 2007/06/12 00:11:57 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.214 2007/08/28 12:26:35 kib Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -1713,3 +1713,24 @@ return (error); } + +/* + * XXX: fake one.. waiting for real implementation of affinity mask. + */ +int +linux_sched_getaffinity(struct thread *td, + struct linux_sched_getaffinity_args *args) +{ + int error; + cpumask_t i = ~0; + + if (args->len < sizeof(cpumask_t)) + return (EINVAL); + + error = copyout(&i, args->user_mask_ptr, sizeof(cpumask_t)); + if (error) + return (EFAULT); + + td->td_retval[0] = sizeof(cpumask_t); + return (0); +} ==== //depot/projects/trustedbsd/mac2/sys/dev/isp/isp_freebsd.h#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.106 2007/07/02 20:08:20 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.107 2007/08/28 00:09:12 jkim Exp $ */ /*- * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions * @@ -184,8 +184,8 @@ const struct firmware * fw; union { struct { - char wwnn[17]; - char wwpn[17]; + char wwnn[19]; + char wwpn[19]; } fc; } sysctl_info; #endif ==== //depot/projects/trustedbsd/mac2/sys/dev/usb/usbdevs#6 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.326 2007/07/25 07:11:08 imp Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.327 2007/08/29 21:00:57 imp Exp $ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ /*- @@ -865,6 +865,8 @@ /* ASUS products */ product ASUS WL167G 0x1707 WL-167g Wireless Adapter +product ASUS WL159G 0x170c WL-159g +product ASUS A9T_WIFI 0x171b A9T wireless product ASUS RT2573_1 0x1723 RT2573 product ASUS RT2573_2 0x1724 RT2573 @@ -1054,6 +1056,9 @@ product CURITEL HX57XB 0x2101 CDMA 2000 1xRTT USB modem (HX-570/575B/PR-600) product CURITEL PC5740 0x3701 Broadband Wireless modem +/* CyberTAN Technology products */ +product CYBERTAN TG54USB 0x1666 TG54USB + /* Cypress Semiconductor products */ product CYPRESS MOUSE 0x0001 mouse product CYPRESS THERMO 0x0002 thermometer @@ -1121,6 +1126,9 @@ /* DMI products */ product DMI CFSM_RW 0xa109 CF/SM Reader/Writer +/* DrayTek products */ +product DRAYTEK VIGOR550 0x0550 Vigor550 + /* EIZO products */ product EIZO HUB 0x0000 hub product EIZO MONITOR 0x0001 monitor @@ -1200,6 +1208,9 @@ /* FEIYA products */ product FEIYA 5IN1 0x1132 5-in-1 Card Reader +/* Fiberline */ +product FIBERLINE WL430U 0x6003 WL-430U + /* Fossil, Inc products */ product FOSSIL WRISTPDA 0x0002 Wrist PDA @@ -1585,6 +1596,7 @@ product MELCO PCOPRS1 0x00b3 PC-OP-RS1 RemoteStation product MELCO SG54HP 0x00d8 WLI-U2-SG54HP product MELCO G54HP 0x00d9 WLI-U2-G54HP +product MELCO KG54L 0x00da WLI-U2-KG54L /* MetaGeek products */ product METAGEEK WISPYX 0x083e MetaGeek Wi-Spy 2.4x @@ -1815,6 +1827,7 @@ product PHILIPS PCA646VC 0x0303 PCA646VC PC Camera product PHILIPS PCVC680K 0x0308 PCVC680K Vesta Pro PC Camera product PHILIPS DSS150 0x0471 DSS 150 Digital Speaker System +product PHILIPS SNU5600 0x1236 SNU5600 product PHILIPS UM10016 0x1552 ISP 1581 Hi-Speed USB MPEG2 Encoder Reference Kit product PHILIPS DIVAUSB 0x1801 DIVA USB mp3 player @@ -1832,6 +1845,7 @@ product PLANEX2 GWUS54SG 0xc002 GW-US54SG product PLANEX2 GWUS54GZL 0xc007 GW-US54GZL product PLANEX2 GWUSMM 0xed02 GW-USMM +product PLANEX3 GWUS54GZ 0xab10 GW-US54GZ product PLANEX3 GU1000T 0xab11 GU-1000T product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini @@ -1930,6 +1944,8 @@ /* Sagem products */ product SAGEM USBSERIAL 0x0027 USB-Serial Controller +product SAGEM XG760A 0x004a XG-760A +product SAGEM XG76NA 0x0062 XG-76NA /* Samsung products */ product SAMSUNG ML6060 0x3008 ML-6060 laser printer @@ -1957,6 +1973,9 @@ product SCANLOGIC SL11R 0x0002 SL11R IDE Adapter product SCANLOGIC 336CX 0x0300 Phantom 336CX - C3 scanner +/* Senao products */ +product SENAO NUB8301 0x2000 NUB-8301 + /* ShanTou products */ product SHANTOU ST268 0x0268 ST268 @@ -2114,6 +2133,9 @@ product SURECOM RT2570 0x11f3 RT2570 product SURECOM RT2573 0x31f3 RT2573 +/* Sweex products */ +product SWEEX ZD1211 0x1809 ZD1211 + /* System TALKS, Inc. */ product SYSTEMTALKS SGCX2UL 0x1920 SGC-X2UL @@ -2133,6 +2155,11 @@ /* TEAC products */ product TEAC FD05PUB 0x0000 FD-05PUB floppy +/* Tekram Technology products */ +product TEKRAM QUICKWLAN 0x1630 QuickWLAN +product TEKRAM ZD1211_1 0x5630 ZD1211 +product TEKRAM ZD1211_2 0x6630 ZD1211 + /* Telex Communications products */ product TELEX MIC1 0x0001 Enhanced USB Microphone @@ -2166,6 +2193,7 @@ product TRUMPION MP3 0x1200 MP3 player /* TwinMOS */ +product TWINMOS G240 0xa006 G240 product TWINMOS MDIV 0x1325 Memory Disk IV /* Ubiquam products */ @@ -2187,12 +2215,17 @@ product UMEDIA TEW444UBEU_NF 0x3007 TEW-444UB EU (no firmware) product UMEDIA TEW429UB_A 0x300a TEW-429UB_A product UMEDIA TEW429UB 0x300b TEW-429UB +product UMEDIA TEW429UBC1 0x300d TEW-429UB C1 +product UMEDIA ALL0298V2 0x3204 ALL0298 v2 product UMEDIA AR5523_2 0x3205 AR5523 product UMEDIA AR5523_2_NF 0x3206 AR5523 (no firmware) /* Universal Access products */ product UNIACCESS PANACHE 0x0101 Panache Surf USB ISDN Adapter +/* U.S. Robotics products */ +product USR USR5423 0x0121 USR5423 WLAN + /* VidzMedia products */ product VIDZMEDIA MONSTERTV 0x4fb1 MonsterTV P2H @@ -2213,6 +2246,7 @@ /* VTech products */ product VTECH RT2570 0x3012 RT2570 +product VTECH ZD1211B 0x3014 ZD1211B /* Wacom products */ product WACOM CT0405U 0x0000 CT-0405-U Tablet @@ -2265,8 +2299,10 @@ product ZCOM M4Y750 0x0001 M4Y-750 product ZCOM XI725 0x0002 XI-725/726 product ZCOM XI735 0x0005 XI-735 +product ZCOM ZD1211 0x0011 ZD1211 product ZCOM AR5523 0x0012 AR5523 product ZCOM AR5523_NF 0x0013 AR5523 driver (no firmware) +product ZCOM ZD1211B 0x001a ZD1211B /* Zinwell products */ product ZINWELL RT2570 0x0260 RT2570 @@ -2277,6 +2313,15 @@ /* Zoran Microelectronics products */ product ZORAN EX20DSC 0x4343 Digital Camera EX-20 DSC +/* Zydas Technology Corporation products */ +product ZYDAS ZD1211 0x1211 ZD1211 WLAN abg +product ZYDAS ZD1211B 0x1215 ZD1211B + /* ZyXEL Communication Co. products */ product ZYXEL OMNI56K 0x1500 Omni 56K Plus product ZYXEL 980N 0x2011 Scorpion-980N keyboard +product ZYXEL ZYAIRG220 0x3401 ZyAIR G-220 +product ZYXEL G200V2 0x3407 G-200 v2 +product ZYXEL AG225H 0x3409 AG-225H +product ZYXEL M202 0x340a M-202 +product ZYXEL G220V2 0x340f G-220 v2 ==== //depot/projects/trustedbsd/mac2/sys/i386/linux/linux_proto.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/i386/linux/linux_proto.h,v 1.92 2007/03/29 02:11:46 julian Exp $ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.86 2007/02/15 00:54:40 jkim Exp + * $FreeBSD: src/sys/i386/linux/linux_proto.h,v 1.93 2007/08/28 12:32:01 kib Exp $ + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.88 2007/08/28 12:26:35 kib Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -731,6 +731,11 @@ char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)]; char val3_l_[PADL_(int)]; int val3; char val3_r_[PADR_(int)]; }; +struct linux_sched_getaffinity_args { + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char len_l_[PADL_(l_uint)]; l_uint len; char len_r_[PADR_(l_uint)]; + char user_mask_ptr_l_[PADL_(l_ulong *)]; l_ulong * user_mask_ptr; char user_mask_ptr_r_[PADR_(l_ulong *)]; +}; struct linux_set_thread_area_args { char desc_l_[PADL_(struct l_user_desc *)]; struct l_user_desc * desc; char desc_r_[PADR_(struct l_user_desc *)]; }; @@ -1118,6 +1123,7 @@ int linux_fremovexattr(struct thread *, struct linux_fremovexattr_args *); int linux_tkill(struct thread *, struct linux_tkill_args *); int linux_sys_futex(struct thread *, struct linux_sys_futex_args *); +int linux_sched_getaffinity(struct thread *, struct linux_sched_getaffinity_args *); int linux_set_thread_area(struct thread *, struct linux_set_thread_area_args *); int linux_get_thread_area(struct thread *, struct linux_get_thread_area_args *); int linux_fadvise64(struct thread *, struct linux_fadvise64_args *); @@ -1192,6 +1198,13 @@ #endif /* COMPAT_FREEBSD4 */ + +#ifdef COMPAT_FREEBSD6 + +#define nosys linux_nosys + +#endif /* COMPAT_FREEBSD6 */ + #define LINUX_SYS_AUE_linux_fork AUE_FORK #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_waitpid AUE_WAIT4 @@ -1366,6 +1379,7 @@ #define LINUX_SYS_AUE_linux_fremovexattr AUE_NULL #define LINUX_SYS_AUE_linux_tkill AUE_NULL #define LINUX_SYS_AUE_linux_sys_futex AUE_NULL +#define LINUX_SYS_AUE_linux_sched_getaffinity AUE_NULL #define LINUX_SYS_AUE_linux_set_thread_area AUE_NULL #define LINUX_SYS_AUE_linux_get_thread_area AUE_NULL #define LINUX_SYS_AUE_linux_fadvise64 AUE_NULL ==== //depot/projects/trustedbsd/mac2/sys/i386/linux/linux_syscall.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/i386/linux/linux_syscall.h,v 1.85 2007/03/29 02:11:46 julian Exp $ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.86 2007/02/15 00:54:40 jkim Exp + * $FreeBSD: src/sys/i386/linux/linux_syscall.h,v 1.86 2007/08/28 12:32:01 kib Exp $ + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.88 2007/08/28 12:26:35 kib Exp */ #define LINUX_SYS_exit 1 @@ -228,6 +228,7 @@ #define LINUX_SYS_linux_fremovexattr 237 #define LINUX_SYS_linux_tkill 238 #define LINUX_SYS_linux_sys_futex 240 +#define LINUX_SYS_linux_sched_getaffinity 242 #define LINUX_SYS_linux_set_thread_area 243 #define LINUX_SYS_linux_get_thread_area 244 #define LINUX_SYS_linux_fadvise64 250 ==== //depot/projects/trustedbsd/mac2/sys/i386/linux/linux_sysent.c#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/i386/linux/linux_sysent.c,v 1.92 2007/03/29 02:11:46 julian Exp $ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.86 2007/02/15 00:54:40 jkim Exp + * $FreeBSD: src/sys/i386/linux/linux_sysent.c,v 1.93 2007/08/28 12:32:01 kib Exp $ + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.88 2007/08/28 12:26:35 kib Exp */ #include @@ -261,7 +261,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 239 = linux_sendfile64 */ { AS(linux_sys_futex_args), (sy_call_t *)linux_sys_futex, AUE_NULL, NULL, 0, 0 }, /* 240 = linux_sys_futex */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 241 = linux_sched_setaffinity */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 242 = linux_sched_getaffinity */ + { AS(linux_sched_getaffinity_args), (sy_call_t *)linux_sched_getaffinity, AUE_NULL, NULL, 0, 0 }, /* 242 = linux_sched_getaffinity */ { AS(linux_set_thread_area_args), (sy_call_t *)linux_set_thread_area, AUE_NULL, NULL, 0, 0 }, /* 243 = linux_set_thread_area */ { AS(linux_get_thread_area_args), (sy_call_t *)linux_get_thread_area, AUE_NULL, NULL, 0, 0 }, /* 244 = linux_get_thread_area */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 245 = linux_io_setup */ ==== //depot/projects/trustedbsd/mac2/sys/i386/linux/syscalls.master#5 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/i386/linux/syscalls.master,v 1.87 2007/03/29 02:11:46 julian Exp $ + $FreeBSD: src/sys/i386/linux/syscalls.master,v 1.88 2007/08/28 12:26:35 kib Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -410,7 +410,8 @@ 240 AUE_NULL STD { int linux_sys_futex(void *uaddr, int op, int val, \ struct l_timespec *timeout, void *uaddr2, int val3); } 241 AUE_NULL UNIMPL linux_sched_setaffinity -242 AUE_NULL UNIMPL linux_sched_getaffinity +242 AUE_NULL STD { int linux_sched_getaffinity(l_pid_t pid, l_uint len, \ + l_ulong *user_mask_ptr); } 243 AUE_NULL STD { int linux_set_thread_area(struct l_user_desc *desc); } 244 AUE_NULL STD { int linux_get_thread_area(struct l_user_desc *desc); } 245 AUE_NULL UNIMPL linux_io_setup ==== //depot/projects/trustedbsd/mac2/sys/kern/kern_ktrace.c#6 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_ktrace.c,v 1.120 2007/06/13 20:01:42 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_ktrace.c,v 1.121 2007/08/29 21:17:11 jhb Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -444,8 +444,6 @@ ktruserret(struct thread *td) { - if (STAILQ_EMPTY(&td->td_proc->p_ktr)) - return; ktrace_enter(td); sx_xlock(&ktrace_sx); ktr_drain(td); ==== //depot/projects/trustedbsd/mac2/sys/kern/vfs_syscalls.c#6 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.441 2007/07/04 22:57:21 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.442 2007/08/28 20:28:11 jhb Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -206,6 +206,47 @@ } /* + * Used by statfs conversion routines to scale the block size up if + * necessary so that all of the block counts are <= 'max_size'. Note + * that 'max_size' should be a bitmask, i.e. 2^n - 1 for some non-zero + * value of 'n'. + */ +void +statfs_scale_blocks(struct statfs *sf, long max_size) +{ + uint64_t count; + int shift; + + KASSERT(powerof2(max_size + 1), ("%s: invalid max_size", __func__)); + + /* + * Attempt to scale the block counts to give a more accurate + * overview to userland of the ratio of free space to used + * space. To do this, find the largest block count and compute + * a divisor that lets it fit into a signed integer <= max_size. + */ + if (sf->f_bavail < 0) + count = -sf->f_bavail; + else + count = sf->f_bavail; + count = MAX(sf->f_blocks, MAX(sf->f_bfree, count)); + if (count <= max_size) + return; + + count >>= flsl(max_size); + shift = 0; + while (count > 0) { + shift++; + count >>=1; + } + + sf->f_bsize <<= shift; + sf->f_blocks >>= shift; + sf->f_bfree >>= shift; + sf->f_bavail >>= shift; +} + +/* * Get filesystem statistics. */ #ifndef _SYS_SYSPROTO_H_ @@ -636,12 +677,13 @@ struct ostatfs *osp; { + statfs_scale_blocks(nsp, LONG_MAX); bzero(osp, sizeof(*osp)); - osp->f_bsize = MIN(nsp->f_bsize, LONG_MAX); + osp->f_bsize = nsp->f_bsize; osp->f_iosize = MIN(nsp->f_iosize, LONG_MAX); - osp->f_blocks = MIN(nsp->f_blocks, LONG_MAX); - osp->f_bfree = MIN(nsp->f_bfree, LONG_MAX); - osp->f_bavail = MIN(nsp->f_bavail, LONG_MAX); + osp->f_blocks = nsp->f_blocks; + osp->f_bfree = nsp->f_bfree; + osp->f_bavail = nsp->f_bavail; osp->f_files = MIN(nsp->f_files, LONG_MAX); osp->f_ffree = MIN(nsp->f_ffree, LONG_MAX); osp->f_owner = nsp->f_owner; ==== //depot/projects/trustedbsd/mac2/sys/netinet/ip_fw2.c#5 (text+ko) ==== @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.172 2007/08/26 18:38:30 maxim Exp $ + * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.173 2007/08/29 19:34:28 green Exp $ */ #define DEB(x) @@ -3077,7 +3077,6 @@ else at->af = AF_LINK; at->hdr = ip; - m_tag_prepend(m, mtag); break; } ==== //depot/projects/trustedbsd/mac2/sys/sys/mount.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)mount.h 8.21 (Berkeley) 5/20/95 - * $FreeBSD: src/sys/sys/mount.h,v 1.226 2007/04/22 16:18:10 rwatson Exp $ + * $FreeBSD: src/sys/sys/mount.h,v 1.227 2007/08/28 20:28:12 jhb Exp $ */ #ifndef _SYS_MOUNT_H_ @@ -653,6 +653,7 @@ struct mntarg *mount_argb(struct mntarg *ma, int flag, const char *name); struct mntarg *mount_argf(struct mntarg *ma, const char *name, const char *fmt, ...); struct mntarg *mount_argsu(struct mntarg *ma, const char *name, const void *val, int len); +void statfs_scale_blocks(struct statfs *sf, long max_size); struct vfsconf *vfs_byname(const char *); struct vfsconf *vfs_byname_kld(const char *, struct thread *td, int *); void vfs_mount_destroy(struct mount *);