From owner-p4-projects@FreeBSD.ORG Fri Sep 22 18:55:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F2D9C16A416; Fri, 22 Sep 2006 18:55:36 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE81116A407 for ; Fri, 22 Sep 2006 18:55:36 +0000 (UTC) (envelope-from als@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CD8D43D5D for ; Fri, 22 Sep 2006 18:55:32 +0000 (GMT) (envelope-from als@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8MItW8w046299 for ; Fri, 22 Sep 2006 18:55:32 GMT (envelope-from als@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8MItUxJ046296 for perforce@freebsd.org; Fri, 22 Sep 2006 18:55:30 GMT (envelope-from als@FreeBSD.org) Date: Fri, 22 Sep 2006 18:55:30 GMT Message-Id: <200609221855.k8MItUxJ046296@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to als@FreeBSD.org using -f From: Alex Lyashkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 106515 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: Fri, 22 Sep 2006 18:55:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=106515 Change 106515 by als@als_head on 2006/09/22 18:55:07 update workdir to last head. Affected files ... .. //depot/projects/jail2/sys/amd64/include/stdarg.h#2 integrate .. //depot/projects/jail2/sys/amd64/isa/atpic_vector.S#2 integrate .. //depot/projects/jail2/sys/arm/include/stdarg.h#2 integrate .. //depot/projects/jail2/sys/bsm/audit.h#3 integrate .. //depot/projects/jail2/sys/bsm/audit_internal.h#4 integrate .. //depot/projects/jail2/sys/bsm/audit_kevents.h#4 integrate .. //depot/projects/jail2/sys/bsm/audit_record.h#5 integrate .. //depot/projects/jail2/sys/compat/freebsd32/freebsd32.h#3 integrate .. //depot/projects/jail2/sys/compat/freebsd32/freebsd32_misc.c#3 integrate .. //depot/projects/jail2/sys/compat/freebsd32/freebsd32_proto.h#5 integrate .. //depot/projects/jail2/sys/compat/freebsd32/freebsd32_syscall.h#5 integrate .. //depot/projects/jail2/sys/compat/freebsd32/freebsd32_syscalls.c#5 integrate .. //depot/projects/jail2/sys/compat/freebsd32/freebsd32_sysent.c#5 integrate .. //depot/projects/jail2/sys/compat/freebsd32/syscalls.master#5 integrate .. //depot/projects/jail2/sys/conf/NOTES#6 integrate .. //depot/projects/jail2/sys/conf/files#5 integrate .. //depot/projects/jail2/sys/conf/kern.pre.mk#3 integrate .. //depot/projects/jail2/sys/conf/options#5 integrate .. //depot/projects/jail2/sys/contrib/dev/ath/freebsd/ah_if.m#2 delete .. //depot/projects/jail2/sys/contrib/dev/ath/freebsd/ah_osdep.c#2 delete .. //depot/projects/jail2/sys/contrib/dev/ath/freebsd/ah_osdep.h#2 delete .. //depot/projects/jail2/sys/dev/acpica/acpi.c#4 integrate .. //depot/projects/jail2/sys/dev/ath/ah_osdep.c#1 branch .. //depot/projects/jail2/sys/dev/ath/ah_osdep.h#1 branch .. //depot/projects/jail2/sys/dev/ath/if_ath.c#4 integrate .. //depot/projects/jail2/sys/dev/ath/if_athvar.h#4 integrate .. //depot/projects/jail2/sys/dev/bce/if_bce.c#4 integrate .. //depot/projects/jail2/sys/dev/bge/if_bge.c#5 integrate .. //depot/projects/jail2/sys/dev/bktr/bktr_i2c.h#2 integrate .. //depot/projects/jail2/sys/dev/em/if_em.c#5 integrate .. //depot/projects/jail2/sys/dev/kbdmux/kbdmux.c#3 integrate .. //depot/projects/jail2/sys/dev/mfi/mfi.c#5 integrate .. //depot/projects/jail2/sys/dev/mfi/mfivar.h#3 integrate .. //depot/projects/jail2/sys/dev/mpt/mpt_cam.c#5 integrate .. //depot/projects/jail2/sys/dev/pci/pci.c#3 integrate .. //depot/projects/jail2/sys/dev/uart/uart_kbd_sun.c#2 integrate .. //depot/projects/jail2/sys/dev/usb/if_cdce.c#3 integrate .. //depot/projects/jail2/sys/fs/devfs/devfs.h#2 integrate .. //depot/projects/jail2/sys/fs/devfs/devfs_devs.c#3 integrate .. //depot/projects/jail2/sys/fs/devfs/devfs_vfsops.c#3 integrate .. //depot/projects/jail2/sys/fs/devfs/devfs_vnops.c#3 integrate .. //depot/projects/jail2/sys/i386/include/stdarg.h#2 integrate .. //depot/projects/jail2/sys/i386/isa/atpic_vector.s#2 integrate .. //depot/projects/jail2/sys/i386/linux/linux_machdep.c#4 integrate .. //depot/projects/jail2/sys/i386/linux/linux_proto.h#5 integrate .. //depot/projects/jail2/sys/i386/linux/linux_syscall.h#5 integrate .. //depot/projects/jail2/sys/i386/linux/linux_sysent.c#5 integrate .. //depot/projects/jail2/sys/i386/linux/syscalls.master#5 integrate .. //depot/projects/jail2/sys/ia64/include/stdarg.h#2 integrate .. //depot/projects/jail2/sys/kern/init_sysent.c#5 integrate .. //depot/projects/jail2/sys/kern/kern_mac.c#3 integrate .. //depot/projects/jail2/sys/kern/kern_proc.c#3 integrate .. //depot/projects/jail2/sys/kern/kern_resource.c#4 integrate .. //depot/projects/jail2/sys/kern/kern_thr.c#4 integrate .. //depot/projects/jail2/sys/kern/kern_umtx.c#4 integrate .. //depot/projects/jail2/sys/kern/syscalls.c#5 integrate .. //depot/projects/jail2/sys/kern/syscalls.master#5 integrate .. //depot/projects/jail2/sys/kern/systrace_args.c#4 integrate .. //depot/projects/jail2/sys/kern/sysv_msg.c#3 integrate .. //depot/projects/jail2/sys/kern/sysv_sem.c#4 integrate .. //depot/projects/jail2/sys/kern/sysv_shm.c#3 integrate .. //depot/projects/jail2/sys/kern/tty.c#3 integrate .. //depot/projects/jail2/sys/kern/uipc_mbuf.c#2 integrate .. //depot/projects/jail2/sys/kern/uipc_socket.c#6 integrate .. //depot/projects/jail2/sys/kern/vfs_default.c#2 integrate .. //depot/projects/jail2/sys/kern/vfs_mount.c#5 integrate .. //depot/projects/jail2/sys/kern/vfs_syscalls.c#5 integrate .. //depot/projects/jail2/sys/modules/ath/Makefile#2 integrate .. //depot/projects/jail2/sys/modules/ath_hal/Makefile#2 integrate .. //depot/projects/jail2/sys/modules/ath_rate_amrr/Makefile#2 integrate .. //depot/projects/jail2/sys/modules/ath_rate_onoe/Makefile#2 integrate .. //depot/projects/jail2/sys/modules/ath_rate_sample/Makefile#2 integrate .. //depot/projects/jail2/sys/net/if_loop.c#3 integrate .. //depot/projects/jail2/sys/netinet6/in6.c#4 integrate .. //depot/projects/jail2/sys/powerpc/include/stdarg.h#2 integrate .. //depot/projects/jail2/sys/security/audit/audit_bsm.c#5 integrate .. //depot/projects/jail2/sys/security/audit/audit_bsm_token.c#5 integrate .. //depot/projects/jail2/sys/security/audit/audit_worker.c#3 integrate .. //depot/projects/jail2/sys/security/mac/mac_inet.c#3 integrate .. //depot/projects/jail2/sys/security/mac/mac_internal.h#3 integrate .. //depot/projects/jail2/sys/security/mac/mac_net.c#2 integrate .. //depot/projects/jail2/sys/security/mac/mac_pipe.c#2 integrate .. //depot/projects/jail2/sys/security/mac/mac_posix_sem.c#2 integrate .. //depot/projects/jail2/sys/security/mac/mac_process.c#2 integrate .. //depot/projects/jail2/sys/security/mac/mac_socket.c#2 integrate .. //depot/projects/jail2/sys/security/mac/mac_sysv_msg.c#2 integrate .. //depot/projects/jail2/sys/security/mac/mac_sysv_sem.c#2 integrate .. //depot/projects/jail2/sys/security/mac/mac_sysv_shm.c#2 integrate .. //depot/projects/jail2/sys/security/mac/mac_vfs.c#3 integrate .. //depot/projects/jail2/sys/sparc64/include/stdarg.h#2 integrate .. //depot/projects/jail2/sys/sparc64/sparc64/pmap.c#3 integrate .. //depot/projects/jail2/sys/sparc64/sparc64/tsb.c#2 integrate .. //depot/projects/jail2/sys/sys/cdefs.h#2 integrate .. //depot/projects/jail2/sys/sys/rtprio.h#2 integrate .. //depot/projects/jail2/sys/sys/syscall.h#5 integrate .. //depot/projects/jail2/sys/sys/syscall.mk#5 integrate .. //depot/projects/jail2/sys/sys/sysproto.h#5 integrate .. //depot/projects/jail2/sys/sys/thr.h#3 integrate .. //depot/projects/jail2/sys/sys/umtx.h#3 integrate .. //depot/projects/jail2/sys/ufs/ffs/ffs_softdep.c#2 integrate Differences ... ==== //depot/projects/jail2/sys/amd64/include/stdarg.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/stdarg.h,v 1.8 2005/03/11 22:16:09 peter Exp $ + * $FreeBSD: src/sys/amd64/include/stdarg.h,v 1.9 2006/09/21 01:37:01 kan Exp $ */ #ifndef _MACHINE_STDARG_H_ @@ -42,7 +42,7 @@ #ifdef __GNUCLIKE_BUILTIN_STDARG #define va_start(ap, last) \ - __builtin_stdarg_start((ap), (last)) + __builtin_va_start((ap), (last)) #define va_arg(ap, type) \ __builtin_va_arg((ap), type) ==== //depot/projects/jail2/sys/amd64/isa/atpic_vector.S#2 (text+ko) ==== @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * from: vector.s, 386BSD 0.1 unknown origin - * $FreeBSD: src/sys/amd64/isa/atpic_vector.S,v 1.46 2005/12/08 18:33:30 jhb Exp $ + * $FreeBSD: src/sys/amd64/isa/atpic_vector.S,v 1.47 2006/09/20 20:52:11 wkoszek Exp $ */ /* @@ -41,7 +41,7 @@ #include "assym.s" /* - * Macros for interrupt interrupt entry, call to handler, and exit. + * Macros for interrupt entry, call to handler, and exit. */ #define INTR(irq_num, vec_name) \ .text ; \ ==== //depot/projects/jail2/sys/arm/include/stdarg.h#2 (text+ko) ==== @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/arm/include/stdarg.h,v 1.3 2005/03/02 21:33:22 joerg Exp $ + * $FreeBSD: src/sys/arm/include/stdarg.h,v 1.4 2006/09/21 01:37:02 kan Exp $ */ #ifndef _MACHINE_STDARG_H_ @@ -45,7 +45,7 @@ #ifdef __GNUCLIKE_BUILTIN_STDARG #define va_start(ap, last) \ - __builtin_stdarg_start((ap), (last)) + __builtin_va_start((ap), (last)) #define va_arg(ap, type) \ __builtin_va_arg((ap), type) ==== //depot/projects/jail2/sys/bsm/audit.h#3 (text) ==== @@ -30,8 +30,8 @@ * * @APPLE_BSD_LICENSE_HEADER_END@ * - * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#31 $ - * $FreeBSD: src/sys/bsm/audit.h,v 1.5 2006/08/26 08:17:58 rwatson Exp $ + * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#34 $ + * $FreeBSD: src/sys/bsm/audit.h,v 1.6 2006/09/21 07:27:02 rwatson Exp $ */ #ifndef _BSM_AUDIT_H @@ -59,23 +59,19 @@ * Triggers for the audit daemon. */ #define AUDIT_TRIGGER_MIN 1 -#define AUDIT_TRIGGER_LOW_SPACE 1 -#define AUDIT_TRIGGER_OPEN_NEW 2 -#define AUDIT_TRIGGER_READ_FILE 3 -#define AUDIT_TRIGGER_CLOSE_AND_DIE 4 -#define AUDIT_TRIGGER_NO_SPACE 5 -#define AUDIT_TRIGGER_MAX 5 +#define AUDIT_TRIGGER_LOW_SPACE 1 /* Below low watermark. */ +#define AUDIT_TRIGGER_ROTATE_KERNEL 2 /* Kernel requests rotate. */ +#define AUDIT_TRIGGER_READ_FILE 3 /* Re-read config file. */ +#define AUDIT_TRIGGER_CLOSE_AND_DIE 4 /* Terminate audit. */ +#define AUDIT_TRIGGER_NO_SPACE 5 /* Below min free space. */ +#define AUDIT_TRIGGER_ROTATE_USER 6 /* User requests roate. */ +#define AUDIT_TRIGGER_MAX 6 /* - * Special file that will be read for trigger events from the kernel - * (FreeBSD). + * The special device filename (FreeBSD). */ -#define AUDIT_TRIGGER_FILE "/dev/audit" - -/* - * The special device filename. - */ #define AUDITDEV_FILENAME "audit" +#define AUDIT_TRIGGER_FILE ("/dev/" AUDITDEV_FILENAME) /* * Pre-defined audit IDs @@ -182,12 +178,12 @@ #define AUDIT_PERZONE 0x2000 /* - * Audit queue control parameters. + * Default audit queue control parameters. */ #define AQ_HIWATER 100 #define AQ_MAXHIGH 10000 #define AQ_LOWATER 10 -#define AQ_BUFSZ 1024 +#define AQ_BUFSZ MAXAUDITDATA #define AQ_MAXBUFSZ 1048576 /* ==== //depot/projects/jail2/sys/bsm/audit_internal.h#4 (text) ==== @@ -34,8 +34,8 @@ * * @APPLE_BSD_LICENSE_HEADER_END@ * - * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#11 $ - * $FreeBSD: src/sys/bsm/audit_internal.h,v 1.4 2006/09/02 10:49:44 rwatson Exp $ + * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#14 $ + * $FreeBSD: src/sys/bsm/audit_internal.h,v 1.5 2006/09/21 07:27:02 rwatson Exp $ */ #ifndef _AUDIT_INTERNAL_H ==== //depot/projects/jail2/sys/bsm/audit_kevents.h#4 (text) ==== @@ -30,8 +30,8 @@ * * @APPLE_BSD_LICENSE_HEADER_END@ * - * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#26 $ - * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.7 2006/08/26 08:17:58 rwatson Exp $ + * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#28 $ + * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.8 2006/09/21 07:27:02 rwatson Exp $ */ #ifndef _BSM_AUDIT_KEVENTS_H_ @@ -468,6 +468,9 @@ #define AUE_EXTATTR_SET_LINK 43111 /* FreeBSD. */ #define AUE_EXTATTR_LIST_LINK 43112 /* FreeBSD. */ #define AUE_EXTATTR_DELETE_LINK 43113 /* FreeBSD. */ +#define AUE_KENV 43114 /* FreeBSD. */ +#define AUE_JAIL_ATTACH 43115 /* FreeBSD. */ +#define AUE_SYSCTL_WRITE 43116 /* FreeBSD. */ /* * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the ==== //depot/projects/jail2/sys/bsm/audit_record.h#5 (text) ==== @@ -30,8 +30,8 @@ * * @APPLE_BSD_LICENSE_HEADER_END@ * - * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#19 $ - * $FreeBSD: src/sys/bsm/audit_record.h,v 1.5 2006/09/01 11:45:39 wsalamon Exp $ + * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#21 $ + * $FreeBSD: src/sys/bsm/audit_record.h,v 1.6 2006/09/21 07:27:02 rwatson Exp $ */ #ifndef _BSM_AUDIT_RECORD_H_ ==== //depot/projects/jail2/sys/compat/freebsd32/freebsd32.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/freebsd32/freebsd32.h,v 1.5 2006/08/17 22:50:32 imp Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32.h,v 1.6 2006/09/22 15:04:28 davidxu Exp $ */ #ifndef _COMPAT_FREEBSD32_FREEBSD32_H_ @@ -103,4 +103,18 @@ int32_t f_spare[2]; }; +struct thr_param32 { + uint32_t start_func; + uint32_t arg; + uint32_t stack_base; + uint32_t stack_size; + uint32_t tls_base; + uint32_t tls_size; + uint32_t child_tid; + uint32_t parent_tid; + int32_t flags; + uint32_t rtp; + uint32_t spare[3]; +}; + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_H_ */ ==== //depot/projects/jail2/sys/compat/freebsd32/freebsd32_misc.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.58 2006/08/16 00:02:36 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.59 2006/09/22 15:04:28 davidxu Exp $"); #include "opt_compat.h" @@ -67,7 +67,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -2121,6 +2123,60 @@ return (error); } +int +freebsd32_thr_new(struct thread *td, + struct freebsd32_thr_new_args *uap) +{ + struct thr_param32 param32; + struct thr_param param; + int error; + + if (uap->param_size < 0 || + uap->param_size > sizeof(struct thr_param32)) + return (EINVAL); + bzero(¶m, sizeof(struct thr_param)); + bzero(¶m32, sizeof(struct thr_param32)); + error = copyin(uap->param, ¶m32, uap->param_size); + if (error != 0) + return (error); + param.start_func = PTRIN(param32.start_func); + param.arg = PTRIN(param32.arg); + param.stack_base = PTRIN(param32.stack_base); + param.stack_size = param32.stack_size; + param.tls_base = PTRIN(param32.tls_base); + param.tls_size = param32.tls_size; + param.child_tid = PTRIN(param32.child_tid); + param.parent_tid = PTRIN(param32.parent_tid); + param.flags = param32.flags; + param.rtp = PTRIN(param32.rtp); + param.spare[0] = PTRIN(param32.spare[0]); + param.spare[1] = PTRIN(param32.spare[1]); + param.spare[2] = PTRIN(param32.spare[2]); + + return (kern_thr_new(td, ¶m)); +} + +int +freebsd32_thr_suspend(struct thread *td, struct freebsd32_thr_suspend_args *uap) +{ + struct timespec32 ts32; + struct timespec ts, *tsp; + int error; + + error = 0; + tsp = NULL; + if (uap->timeout != NULL) { + error = copyin((const void *)uap->timeout, (void *)&ts32, + sizeof(struct timespec32)); + if (error != 0) + return (error); + ts.tv_sec = ts32.tv_sec; + ts.tv_nsec = ts32.tv_nsec; + tsp = &ts; + } + return (kern_thr_suspend(td, tsp)); +} + #if 0 int ==== //depot/projects/jail2/sys/compat/freebsd32/freebsd32_proto.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.62 2006/09/17 13:29:35 rwatson Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.65 2006/09/22 15:05:33 davidxu Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.78 2006/09/22 15:04:28 davidxu Exp */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -280,6 +280,20 @@ char oucp_l_[PADL_(struct freebsd32_ucontext *)]; struct freebsd32_ucontext * oucp; char oucp_r_[PADR_(struct freebsd32_ucontext *)]; char ucp_l_[PADL_(const struct freebsd32_ucontext *)]; const struct freebsd32_ucontext * ucp; char ucp_r_[PADR_(const struct freebsd32_ucontext *)]; }; +struct freebsd32_thr_suspend_args { + char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; +}; +struct freebsd32_umtx_op_args { + char obj_l_[PADL_(void *)]; void * obj; char obj_r_[PADR_(void *)]; + char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; + char val_l_[PADL_(uintptr_t)]; uintptr_t val; char val_r_[PADR_(uintptr_t)]; + char uaddr_l_[PADL_(void *)]; void * uaddr; char uaddr_r_[PADR_(void *)]; + char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)]; +}; +struct freebsd32_thr_new_args { + char param_l_[PADL_(struct thr_param32 *)]; struct thr_param32 * param; char param_r_[PADR_(struct thr_param32 *)]; + char param_size_l_[PADL_(int)]; int param_size; char param_size_r_[PADR_(int)]; +}; int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *); int freebsd32_recvmsg(struct thread *, struct freebsd32_recvmsg_args *); int freebsd32_sendmsg(struct thread *, struct freebsd32_sendmsg_args *); @@ -326,6 +340,9 @@ int freebsd32_getcontext(struct thread *, struct freebsd32_getcontext_args *); int freebsd32_setcontext(struct thread *, struct freebsd32_setcontext_args *); int freebsd32_swapcontext(struct thread *, struct freebsd32_swapcontext_args *); +int freebsd32_thr_suspend(struct thread *, struct freebsd32_thr_suspend_args *); +int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *); +int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *); #ifdef COMPAT_43 @@ -461,6 +478,9 @@ #define FREEBSD32_SYS_AUE_freebsd32_getcontext AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_setcontext AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_swapcontext AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_umtx_op AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_thr_new AUE_NULL #undef PAD_ #undef PADL_ ==== //depot/projects/jail2/sys/compat/freebsd32/freebsd32_syscall.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.60 2006/09/17 13:29:35 rwatson Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.63 2006/09/22 15:05:33 davidxu Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.78 2006/09/22 15:04:28 davidxu Exp */ #define FREEBSD32_SYS_syscall 0 @@ -300,20 +300,19 @@ #define FREEBSD32_SYS_freebsd32_getcontext 421 #define FREEBSD32_SYS_freebsd32_setcontext 422 #define FREEBSD32_SYS_freebsd32_swapcontext 423 -#define FREEBSD32_SYS_thr_create 430 #define FREEBSD32_SYS_thr_exit 431 #define FREEBSD32_SYS_thr_self 432 #define FREEBSD32_SYS_thr_kill 433 #define FREEBSD32_SYS__umtx_lock 434 #define FREEBSD32_SYS__umtx_unlock 435 #define FREEBSD32_SYS_jail_attach 436 -#define FREEBSD32_SYS_thr_suspend 442 +#define FREEBSD32_SYS_freebsd32_thr_suspend 442 #define FREEBSD32_SYS_thr_wake 443 #define FREEBSD32_SYS_kldunloadf 444 +#define FREEBSD32_SYS_freebsd32_umtx_op 454 +#define FREEBSD32_SYS_freebsd32_thr_new 455 #define FREEBSD32_SYS_sigqueue 456 #define FREEBSD32_SYS_abort2 463 #define FREEBSD32_SYS_thr_set_name 464 -#define FREEBSD32_SYS_thr_setscheduler 466 -#define FREEBSD32_SYS_thr_getscheduler 467 -#define FREEBSD32_SYS_thr_setschedparam 468 +#define FREEBSD32_SYS_rtprio_thread 466 #define FREEBSD32_SYS_MAXSYSCALL 471 ==== //depot/projects/jail2/sys/compat/freebsd32/freebsd32_syscalls.c#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.51 2006/09/17 13:29:35 rwatson Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.54 2006/09/22 15:05:33 davidxu Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.78 2006/09/22 15:04:28 davidxu Exp */ const char *freebsd32_syscallnames[] = { @@ -437,7 +437,7 @@ "#427", /* 427 = __acl_delete_link */ "#428", /* 428 = __acl_aclcheck_link */ "#429", /* 429 = sigwait */ - "thr_create", /* 430 = thr_create */ + "#430", /* 430 = thr_create; */ "thr_exit", /* 431 = thr_exit */ "thr_self", /* 432 = thr_self */ "thr_kill", /* 433 = thr_kill */ @@ -449,7 +449,7 @@ "#439", /* 439 = extattr_list_link */ "#440", /* 440 = kse_switchin */ "#441", /* 441 = ksem_timedwait */ - "thr_suspend", /* 442 = thr_suspend */ + "freebsd32_thr_suspend", /* 442 = freebsd32_thr_suspend */ "thr_wake", /* 443 = thr_wake */ "kldunloadf", /* 444 = kldunloadf */ "#445", /* 445 = audit */ @@ -461,8 +461,8 @@ "#451", /* 451 = getaudit_addr */ "#452", /* 452 = setaudit_addr */ "#453", /* 453 = auditctl */ - "#454", /* 454 = _umtx_op */ - "#455", /* 455 = thr_new */ + "freebsd32_umtx_op", /* 454 = freebsd32_umtx_op */ + "freebsd32_thr_new", /* 455 = freebsd32_thr_new */ "sigqueue", /* 456 = sigqueue */ "#457", /* 457 = kmq_open */ "#458", /* 458 = kmq_setattr */ @@ -473,9 +473,9 @@ "abort2", /* 463 = abort2 */ "thr_set_name", /* 464 = thr_set_name */ "#465", /* 465 = aio_fsync */ - "thr_setscheduler", /* 466 = thr_setscheduler */ - "thr_getscheduler", /* 467 = thr_getscheduler */ - "thr_setschedparam", /* 468 = thr_setschedparam */ + "rtprio_thread", /* 466 = rtprio_thread */ + "#467", /* 467 = nosys */ + "#468", /* 468 = nosys */ "#469", /* 469 = __getpath_fromfd */ "#470", /* 470 = __getpath_fromaddr */ }; ==== //depot/projects/jail2/sys/compat/freebsd32/freebsd32_sysent.c#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.61 2006/09/17 13:29:35 rwatson Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.64 2006/09/22 15:05:34 davidxu Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.78 2006/09/22 15:04:28 davidxu Exp */ #include "opt_compat.h" @@ -462,7 +462,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 427 = __acl_delete_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 428 = __acl_aclcheck_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 429 = sigwait */ - { AS(thr_create_args), (sy_call_t *)thr_create, AUE_NULL, NULL, 0, 0 }, /* 430 = thr_create */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 430 = thr_create; */ { AS(thr_exit_args), (sy_call_t *)thr_exit, AUE_NULL, NULL, 0, 0 }, /* 431 = thr_exit */ { AS(thr_self_args), (sy_call_t *)thr_self, AUE_NULL, NULL, 0, 0 }, /* 432 = thr_self */ { AS(thr_kill_args), (sy_call_t *)thr_kill, AUE_NULL, NULL, 0, 0 }, /* 433 = thr_kill */ @@ -474,7 +474,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 439 = extattr_list_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 440 = kse_switchin */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 441 = ksem_timedwait */ - { AS(thr_suspend_args), (sy_call_t *)thr_suspend, AUE_NULL, NULL, 0, 0 }, /* 442 = thr_suspend */ + { AS(freebsd32_thr_suspend_args), (sy_call_t *)freebsd32_thr_suspend, AUE_NULL, NULL, 0, 0 }, /* 442 = freebsd32_thr_suspend */ { AS(thr_wake_args), (sy_call_t *)thr_wake, AUE_NULL, NULL, 0, 0 }, /* 443 = thr_wake */ { AS(kldunloadf_args), (sy_call_t *)kldunloadf, AUE_MODUNLOAD, NULL, 0, 0 }, /* 444 = kldunloadf */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 445 = audit */ @@ -486,8 +486,8 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 451 = getaudit_addr */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 452 = setaudit_addr */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 453 = auditctl */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 454 = _umtx_op */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 455 = thr_new */ + { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0 }, /* 454 = freebsd32_umtx_op */ + { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0 }, /* 455 = freebsd32_thr_new */ { AS(sigqueue_args), (sy_call_t *)sigqueue, AUE_NULL, NULL, 0, 0 }, /* 456 = sigqueue */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 457 = kmq_open */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 458 = kmq_setattr */ @@ -498,9 +498,9 @@ { AS(abort2_args), (sy_call_t *)abort2, AUE_NULL, NULL, 0, 0 }, /* 463 = abort2 */ { AS(thr_set_name_args), (sy_call_t *)thr_set_name, AUE_NULL, NULL, 0, 0 }, /* 464 = thr_set_name */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 465 = aio_fsync */ - { AS(thr_setscheduler_args), (sy_call_t *)thr_setscheduler, AUE_NULL, NULL, 0, 0 }, /* 466 = thr_setscheduler */ - { AS(thr_getscheduler_args), (sy_call_t *)thr_getscheduler, AUE_NULL, NULL, 0, 0 }, /* 467 = thr_getscheduler */ - { AS(thr_setschedparam_args), (sy_call_t *)thr_setschedparam, AUE_NULL, NULL, 0, 0 }, /* 468 = thr_setschedparam */ + { AS(rtprio_thread_args), (sy_call_t *)rtprio_thread, AUE_RTPRIO, NULL, 0, 0 }, /* 466 = rtprio_thread */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 467 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 468 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 469 = __getpath_fromfd */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 470 = __getpath_fromaddr */ }; ==== //depot/projects/jail2/sys/compat/freebsd32/syscalls.master#5 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.78 2006/09/22 15:04:28 davidxu Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; @@ -715,8 +715,7 @@ 428 AUE_NULL UNIMPL __acl_aclcheck_link ; XXX implement 429 AUE_SIGWAIT UNIMPL sigwait -430 AUE_NULL NOPROTO { int thr_create(ucontext_t *ctx, long *id, \ - int flag s); } +430 AUE_NULL UNIMPL thr_create; 431 AUE_NULL NOPROTO { void thr_exit(long *state); } 432 AUE_NULL NOPROTO { int thr_self(long *id); } 433 AUE_NULL NOPROTO { int thr_kill(long id, int sig); } @@ -728,8 +727,8 @@ 439 AUE_EXTATTR_LIST_LINK UNIMPL extattr_list_link 440 AUE_NULL UNIMPL kse_switchin 441 AUE_NULL UNIMPL ksem_timedwait -442 AUE_NULL NOPROTO { int thr_suspend( \ - const struct timespec *timeout); } +442 AUE_NULL STD { int freebsd32_thr_suspend( \ + const struct timespec32 *timeout); } 443 AUE_NULL NOPROTO { int thr_wake(long id); } 444 AUE_MODUNLOAD NOPROTO { int kldunloadf(int fileid, int flags); } 445 AUE_AUDIT UNIMPL audit @@ -741,8 +740,12 @@ 451 AUE_GETAUDIT_ADDR UNIMPL getaudit_addr 452 AUE_SETAUDIT_ADDR UNIMPL setaudit_addr 453 AUE_AUDITCTL UNIMPL auditctl -454 AUE_NULL UNIMPL _umtx_op -455 AUE_NULL UNIMPL thr_new +454 AUE_NULL STD { int freebsd32_umtx_op(void *obj, int op,\ + uintptr_t val, void *uaddr, \ + void *uaddr2); } +455 AUE_NULL STD { int freebsd32_thr_new( \ + struct thr_param32 *param, \ + int param_size); } 456 AUE_NULL NOPROTO { int sigqueue(pid_t pid, int signum, \ void *value); } 457 AUE_NULL UNIMPL kmq_open @@ -754,14 +757,9 @@ 463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } 464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); } 465 AUE_NULL UNIMPL aio_fsync -466 AUE_NULL NOPROTO { int thr_setscheduler(long id, int policy,\ - const struct sched_param *param, \ - int param_size); } -467 AUE_NULL NOPROTO { int thr_getscheduler(long id, int *policy,\ - struct sched_param *param, \ - int param_size); } -468 AUE_NULL NOPROTO { int thr_setschedparam(long id, \ - const struct sched_param *param, \ - int param_size); } +466 AUE_RTPRIO NOPROTO { int rtprio_thread(int function, \ + lwpid_t lwpid, struct rtprio *rtp); } +467 AUE_NULL UNIMPL nosys +468 AUE_NULL UNIMPL nosys 469 AUE_NULL UNIMPL __getpath_fromfd 470 AUE_NULL UNIMPL __getpath_fromaddr ==== //depot/projects/jail2/sys/conf/NOTES#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1380 2006/08/27 12:57:37 marck Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1381 2006/09/20 13:33:40 rwatson Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -996,7 +996,6 @@ options MAC options MAC_BIBA options MAC_BSDEXTENDED -options MAC_DEBUG options MAC_IFOFF options MAC_LOMAC options MAC_MLS ==== //depot/projects/jail2/sys/conf/files#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1140 2006/08/14 21:09:37 imp Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1142 2006/09/18 17:23:35 sam Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -255,8 +255,6 @@ contrib/dev/acpica/utobject.c optional acpi contrib/dev/acpica/utstate.c optional acpi contrib/dev/acpica/utxface.c optional acpi -contrib/dev/ath/freebsd/ah_osdep.c optional ath_hal \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ @@ -478,15 +476,17 @@ dev/ata/atapi-cd.c optional atapicd dev/ata/atapi-fd.c optional atapifd dev/ata/atapi-tape.c optional atapist +dev/ath/ah_osdep.c optional ath_hal \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr dev/ath/ath_rate/onoe/onoe.c optional ath_rate_onoe \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath.c optional ath \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_pci.c optional ath pci \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" + compile-with "${NORMAL_C} -I$S/dev/ath" dev/awi/am79c930.c optional awi dev/awi/awi.c optional awi dev/awi/if_awi_pccard.c optional awi pccard ==== //depot/projects/jail2/sys/conf/kern.pre.mk#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.76 2006/07/17 18:43:16 obrien Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.78 2006/09/18 16:49:14 sam Exp $ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. @@ -58,12 +58,6 @@ # include path into contrib'ed source files. INCLUDES+= -I$S/contrib/altq -# ... and the same for Atheros HAL when the author builds it from -# non-distributable sources. -.if defined(ATH_BUILDING_FROM_SOURCE) -INCLUDES+= -I$S/contrib/dev/ath -.endif - .if make(depend) || make(kernel-depend) # ... and the same for ipfilter @@ -73,7 +67,7 @@ INCLUDES+= -I$S/contrib/pf # ... and the same for Atheros HAL -INCLUDES+= -I$S/contrib/dev/ath/freebsd +INCLUDES+= -I$S/dev/ath # ... and the same for the NgATM stuff INCLUDES+= -I$S/contrib/ngatm ==== //depot/projects/jail2/sys/conf/options#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.557 2006/08/17 00:37:03 julian Exp $ +# $FreeBSD: src/sys/conf/options,v 1.558 2006/09/20 13:33:40 rwatson Exp $ # # On the handling of kernel options # @@ -103,7 +103,6 @@ MAC_ALWAYS_LABEL_MBUF opt_mac.h MAC_BIBA opt_dontuse.h MAC_BSDEXTENDED opt_dontuse.h -MAC_DEBUG opt_mac.h MAC_IFOFF opt_dontuse.h MAC_LOMAC opt_dontuse.h MAC_MLS opt_dontuse.h ==== //depot/projects/jail2/sys/dev/acpica/acpi.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.228 2006/09/11 19:32:54 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.229 2006/09/21 18:56:03 jhb Exp $"); #include "opt_acpi.h" #include @@ -1083,7 +1083,7 @@ * If we know about this address, deactivate it and release it to the * local pool. If we don't, pass this request up to the parent. */ - if (acpi_sysres_find(bus, type, rman_get_start(r)) == NULL) { + if (acpi_sysres_find(bus, type, rman_get_start(r)) != NULL) { if (rman_get_flags(r) & RF_ACTIVE) { ret = bus_deactivate_resource(child, type, rid, r); if (ret != 0) ==== //depot/projects/jail2/sys/dev/ath/if_ath.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.153 2006/08/10 16:31:37 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.155 2006/09/18 16:26:19 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -117,7 +117,6 @@ static void ath_fatal_proc(void *, int); static void ath_rxorn_proc(void *, int); static void ath_bmiss_proc(void *, int); -static void ath_radar_proc(void *, int); static int ath_key_alloc(struct ieee80211com *, const struct ieee80211_key *, ieee80211_keyix *, ieee80211_keyix *); @@ -257,7 +256,7 @@ } while (0) #define KEYPRINTF(sc, ix, hk, mac) do { \ if (sc->sc_debug & ATH_DEBUG_KEYCACHE) \ - ath_keyprint(__func__, ix, hk, mac); \ + ath_keyprint(sc, __func__, ix, hk, mac); \ } while (0) static void ath_printrxbuf(struct ath_buf *bf, u_int ix, int); static void ath_printtxbuf(struct ath_buf *bf, u_int qnum, u_int ix, int done); @@ -345,18 +344,6 @@ */ for (i = 0; i < sc->sc_keymax; i++) ath_hal_keyreset(ah, i); - /* - * Mark key cache slots associated with global keys - * as in use. If we knew TKIP was not to be used we - * could leave the +32, +64, and +32+64 slots free. - * XXX only for splitmic. - */ - for (i = 0; i < IEEE80211_WEP_NKID; i++) { - setbit(sc->sc_keymap, i); - setbit(sc->sc_keymap, i+32); - setbit(sc->sc_keymap, i+64); - setbit(sc->sc_keymap, i+32+64); - } /* * Collect the channel list using the default country @@ -403,7 +390,6 @@ TASK_INIT(&sc->sc_rxorntask, 0, ath_rxorn_proc, sc); TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc); TASK_INIT(&sc->sc_bstucktask,0, ath_bstuck_proc, sc); - TASK_INIT(&sc->sc_radartask, 0, ath_radar_proc, sc); /* * Allocate hardware transmit queues: one queue for @@ -545,12 +531,30 @@ */ if (ath_hal_ciphersupported(ah, HAL_CIPHER_MIC)) ic->ic_caps |= IEEE80211_C_TKIPMIC; - if (ath_hal_tkipsplit(ah)) + /* + * If the h/w supports storing tx+rx MIC keys + * in one cache slot automatically enable use. + */ + if (ath_hal_hastkipsplit(ah) || + !ath_hal_settkipsplit(ah, AH_FALSE)) sc->sc_splitmic = 1; } sc->sc_hasclrkey = ath_hal_ciphersupported(ah, HAL_CIPHER_CLR); sc->sc_mcastkey = ath_hal_getmcastkeysearch(ah); /* + * Mark key cache slots associated with global keys + * as in use. If we knew TKIP was not to be used we + * could leave the +32, +64, and +32+64 slots free. + */ + for (i = 0; i < IEEE80211_WEP_NKID; i++) { + setbit(sc->sc_keymap, i); + setbit(sc->sc_keymap, i+64); + if (sc->sc_splitmic) { + setbit(sc->sc_keymap, i+32); + setbit(sc->sc_keymap, i+32+64); + } + } + /* * TPC support can be done either with a global cap or * per-packet support. The latter is not available on * all parts. We're a bit pedantic here as all parts @@ -878,24 +882,6 @@ } } -static void -ath_radar_proc(void *arg, int pending) -{ - struct ath_softc *sc = arg; - struct ifnet *ifp = sc->sc_ifp; - struct ath_hal *ah = sc->sc_ah; - HAL_CHANNEL hchan; - - if (ath_hal_procdfs(ah, &hchan)) { - if_printf(ifp, "radar detected on channel %u/0x%x/0x%x\n", - hchan.channel, hchan.channelFlags, hchan.privFlags); - /* - * Initiate channel change. - */ - /* XXX not yet */ - } -} - static u_int ath_chan2flags(struct ieee80211com *ic, struct ieee80211_channel *chan) { @@ -1323,7 +1309,7 @@ #ifdef ATH_DEBUG static void -ath_keyprint(const char *tag, u_int ix, +ath_keyprint(struct ath_softc *sc, const char *tag, u_int ix, const HAL_KEYVAL *hk, const u_int8_t mac[IEEE80211_ADDR_LEN]) { static const char *ciphers[] = { @@ -1341,9 +1327,16 @@ printf("%02x", hk->kv_val[i]); printf(" mac %s", ether_sprintf(mac)); if (hk->kv_type == HAL_CIPHER_TKIP) { - printf(" mic "); + printf(" %s ", sc->sc_splitmic ? "mic" : "rxmic"); for (i = 0; i < sizeof(hk->kv_mic); i++) printf("%02x", hk->kv_mic[i]); +#if HAL_ABI_VERSION > 0x06052200 + if (!sc->sc_splitmic) { + printf(" txmic "); + for (i = 0; i < sizeof(hk->kv_txmic); i++) + printf("%02x", hk->kv_txmic[i]); + } +#endif } printf("\n"); } @@ -1364,21 +1357,34 @@ KASSERT(k->wk_cipher->ic_cipher == IEEE80211_CIPHER_TKIP, ("got a non-TKIP key, cipher %u", k->wk_cipher->ic_cipher)); - KASSERT(sc->sc_splitmic, ("key cache !split")); if ((k->wk_flags & IEEE80211_KEY_XR) == IEEE80211_KEY_XR) { - /* - * TX key goes at first index, RX key at the rx index. - * The hal handles the MIC keys at index+64. - */ - memcpy(hk->kv_mic, k->wk_txmic, sizeof(hk->kv_mic)); - KEYPRINTF(sc, k->wk_keyix, hk, zerobssid); - if (!ath_hal_keyset(ah, k->wk_keyix, hk, zerobssid)) - return 0; + if (sc->sc_splitmic) { + /* + * TX key goes at first index, RX key at the rx index. + * The hal handles the MIC keys at index+64. + */ + memcpy(hk->kv_mic, k->wk_txmic, sizeof(hk->kv_mic)); + KEYPRINTF(sc, k->wk_keyix, hk, zerobssid); + if (!ath_hal_keyset(ah, k->wk_keyix, hk, zerobssid)) + return 0; - memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic)); - KEYPRINTF(sc, k->wk_keyix+32, hk, mac); - /* XXX delete tx key on failure? */ - return ath_hal_keyset(ah, k->wk_keyix+32, hk, mac); + memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic)); + KEYPRINTF(sc, k->wk_keyix+32, hk, mac); + /* XXX delete tx key on failure? */ + return ath_hal_keyset(ah, k->wk_keyix+32, hk, mac); + } else { + /* + * Room for both TX+RX MIC keys in one key cache + * slot, just set key at the first index; the hal + * will handle the reset. + */ + memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic)); +#if HAL_ABI_VERSION > 0x06052200 + memcpy(hk->kv_txmic, k->wk_txmic, sizeof(hk->kv_txmic)); +#endif + KEYPRINTF(sc, k->wk_keyix, hk, mac); + return ath_hal_keyset(ah, k->wk_keyix, hk, mac); + } } else if (k->wk_flags & IEEE80211_KEY_XR) { /* * TX/RX key goes at first index. @@ -1447,8 +1453,7 @@ mac = mac0; if (hk.kv_type == HAL_CIPHER_TKIP && - (k->wk_flags & IEEE80211_KEY_SWMIC) == 0 && - sc->sc_splitmic) { + (k->wk_flags & IEEE80211_KEY_SWMIC) == 0) { return ath_keyset_tkip(sc, k, &hk, mac); } else { KEYPRINTF(sc, k->wk_keyix, &hk, mac); @@ -1513,6 +1518,54 @@ } /* + * Allocate tx/rx key slots for TKIP. We allocate two slots for + * each key, one for decrypt/encrypt and the other for the MIC. + */ >>> TRUNCATED FOR MAIL (1000 lines) <<<