From owner-p4-projects@FreeBSD.ORG Sun Aug 6 00:12:38 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 CC2F416A4E0; Sun, 6 Aug 2006 00:12:38 +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 8A26616A4DA for ; Sun, 6 Aug 2006 00:12:38 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42EA543D45 for ; Sun, 6 Aug 2006 00:12:38 +0000 (GMT) (envelope-from marcel@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 k760Cc28070175 for ; Sun, 6 Aug 2006 00:12:38 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k760CbLV070172 for perforce@freebsd.org; Sun, 6 Aug 2006 00:12:37 GMT (envelope-from marcel@freebsd.org) Date: Sun, 6 Aug 2006 00:12:37 GMT Message-Id: <200608060012.k760CbLV070172@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103303 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: Sun, 06 Aug 2006 00:12:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=103303 Change 103303 by marcel@marcel_nfs on 2006/08/06 00:12:09 Remove unused variable. Affected files ... .. //depot/projects/gdb/sys/kern/imgact_elf.c#16 edit Differences ... ==== //depot/projects/gdb/sys/kern/imgact_elf.c#16 (text+ko) ==== @@ -902,7 +902,7 @@ void *hdr; off_t offset; size_t pre_hdrsz, post_hdrsz; - int error, idx; + int error; /* Size the program segments. */ seginfo.count = 0; From owner-p4-projects@FreeBSD.ORG Sun Aug 6 00:14:42 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 0189A16A4E2; Sun, 6 Aug 2006 00:14:42 +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 C585816A4E0 for ; Sun, 6 Aug 2006 00:14:41 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 928F843D49 for ; Sun, 6 Aug 2006 00:14:41 +0000 (GMT) (envelope-from marcel@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 k760EfFu070272 for ; Sun, 6 Aug 2006 00:14:41 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k760EfN4070269 for perforce@freebsd.org; Sun, 6 Aug 2006 00:14:41 GMT (envelope-from marcel@freebsd.org) Date: Sun, 6 Aug 2006 00:14:41 GMT Message-Id: <200608060014.k760EfN4070269@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103304 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: Sun, 06 Aug 2006 00:14:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=103304 Change 103304 by marcel@marcel_nfs on 2006/08/06 00:13:42 o Replace gregset_t and fpregset_t with struct reg and struct fpreg (resp). o Add PS_NOXREG error code. Affected files ... .. //depot/projects/gdb/include/proc_service.h#9 edit Differences ... ==== //depot/projects/gdb/include/proc_service.h#9 (text+ko) ==== @@ -40,20 +40,21 @@ PS_BADLID, /* Bad LWP Id. */ PS_BADPID, /* Bad process Id. */ PS_NOFREGS, /* FPU register set not available. */ - PS_NOSYM /* Symbol not found. */ + PS_NOSYM, /* Symbol not found. */ + PS_NOXREG /* No arch. dep. registers available. */ } ps_err_e; struct ps_prochandle; /* Opaque type. Defined by the implementor. */ __BEGIN_DECLS ps_err_e ps_lcontinue(struct ps_prochandle *, lwpid_t); -ps_err_e ps_lgetfpregs(struct ps_prochandle *, lwpid_t, fpregset_t *); -ps_err_e ps_lgetregs(struct ps_prochandle *, lwpid_t, gregset_t *); +ps_err_e ps_lgetfpregs(struct ps_prochandle *, lwpid_t, struct fpreg *); +ps_err_e ps_lgetregs(struct ps_prochandle *, lwpid_t, struct reg *); ps_err_e ps_lgetxregs(struct ps_prochandle *, lwpid_t, void *); ps_err_e ps_lgetxregsize(struct ps_prochandle *, lwpid_t, int *); ps_err_e ps_linfo(struct ps_prochandle *, lwpid_t, void *); -ps_err_e ps_lsetfpregs(struct ps_prochandle *, lwpid_t, const fpregset_t *); -ps_err_e ps_lsetregs(struct ps_prochandle *, lwpid_t, const gregset_t *); +ps_err_e ps_lsetfpregs(struct ps_prochandle *, lwpid_t, const struct fpreg *); +ps_err_e ps_lsetregs(struct ps_prochandle *, lwpid_t, const struct reg *); ps_err_e ps_lsetxregs(struct ps_prochandle *, lwpid_t, const void *); ps_err_e ps_lstop(struct ps_prochandle *, lwpid_t); ps_err_e ps_pcontinue(struct ps_prochandle *); From owner-p4-projects@FreeBSD.ORG Sun Aug 6 09:07:04 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 14F0B16A4E2; Sun, 6 Aug 2006 09:07:04 +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 CA40A16A4DF for ; Sun, 6 Aug 2006 09:07:03 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A13843D69 for ; Sun, 6 Aug 2006 09:06:58 +0000 (GMT) (envelope-from rdivacky@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 k7696wpW031845 for ; Sun, 6 Aug 2006 09:06:58 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7696wvv031842 for perforce@freebsd.org; Sun, 6 Aug 2006 09:06:58 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 6 Aug 2006 09:06:58 GMT Message-Id: <200608060906.k7696wvv031842@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103314 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: Sun, 06 Aug 2006 09:07:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=103314 Change 103314 by rdivacky@rdivacky_witten on 2006/08/06 09:06:41 Extend the debuging printf in for the futex_atomic_op() to include uaddr. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.c#18 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.c#18 (text+ko) ==== @@ -387,8 +387,8 @@ oparg = 1 << oparg; #ifdef DEBUG - printf("futex_atomic_op: op = %d, cmp = %d, oparg = %d, cmparg = %d\n", - op, cmp, oparg, cmparg); + printf("futex_atomic_op: op = %d, cmp = %d, oparg = %d, cmparg = %d, uaddr = %p\n", + op, cmp, oparg, cmparg, uaddr); #endif /* XXX: linux verifies access here and returns EFAULT */ From owner-p4-projects@FreeBSD.ORG Sun Aug 6 09:18:16 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 0426916A4E1; Sun, 6 Aug 2006 09:18:16 +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 B9BF216A4DA for ; Sun, 6 Aug 2006 09:18:15 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 535A943D45 for ; Sun, 6 Aug 2006 09:18:15 +0000 (GMT) (envelope-from rdivacky@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 k769IFAx032462 for ; Sun, 6 Aug 2006 09:18:15 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k769ICXa032459 for perforce@freebsd.org; Sun, 6 Aug 2006 09:18:12 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 6 Aug 2006 09:18:12 GMT Message-Id: <200608060918.k769ICXa032459@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103315 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: Sun, 06 Aug 2006 09:18:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=103315 Change 103315 by rdivacky@rdivacky_witten on 2006/08/06 09:17:48 IFC Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/identcpu.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/pmap.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/amd64/include/pmap.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/arm/pmap.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/i386/loader/main.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/pc98/loader/main.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/compat/svr4/svr4_sockio.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/compat/svr4/svr4_stream.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/conf/files.powerpc#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/conf/options#7 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/ddb/db_ps.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ata/ata-chipset.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ata/ata-pci.h#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ath/if_ath.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ath/if_athioctl.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/bktr/CHANGELOG.TXT#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/dc/dcphy.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/dc/pnphy.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/dpt/dpt_scsi.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/README#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em_hw.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em_hw.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em_osdep.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/fe/if_fe.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp_freebsd.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp_ioctl.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp_library.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp_target.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp_target.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp_tpublic.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ixgb/if_ixgb.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/mxge/if_mxge.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/patm/if_patm_intr.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/pci/pcivar.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/powermac_nvram/powermac_nvram.c#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/dev/powermac_nvram/powermac_nvramvar.h#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ral/rt2560.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/re/if_re.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/sk/if_sk.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/sym/sym_fw1.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/sym/sym_fw2.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ubsec/ubsec.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/usb/if_ural.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/wi/if_wavelan_ieee.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/wi/if_wi.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/wi/if_wireg.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/fs/hpfs/hpfs.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/fs/msdosfs/msdosfs_vfsops.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/geom/bde/g_bde_work.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/geom/mirror/g_mirror.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/geom/raid3/g_raid3.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/i386/i386/identcpu.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/i386/i386/pmap.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/i386/i386/tsc.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/ia64/ia64/pmap.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/Makefile#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/init_sysent.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_fork.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_ktrace.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_resource.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_syscalls.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_tc.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_time.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/makesyscalls.sh#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/subr_bus.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/subr_rman.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/syscalls.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/systrace_args.c#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_sockbuf.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_socket.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_socket2.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_syscalls.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_usrreq.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/vfs_lookup.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/vfs_syscalls.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/modules/Makefile#7 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/modules/powermac_nvram/Makefile#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/net/bridgestp.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/bridgestp.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/if_bridge.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/if_bridgevar.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/if_faith.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/if_gif.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/if_gre.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/if_stf.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/if_var.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/if_vlan.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/net_osdep.h#2 delete .. //depot/projects/soc2006/rdivacky_linuxolator/netatalk/ddp_pcb.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netatalk/ddp_usrreq.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netgraph/ng_ether.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet/in_gif.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet/ip_encap.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet/ip_fw2.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet/tcp_subr.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ah_aesxcbcmac.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ah_core.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ah_input.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ah_output.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/esp_aesctr.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/esp_core.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/esp_input.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/esp_output.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/esp_rijndael.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/frag6.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/icmp6.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/in6.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/in6_cksum.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/in6_gif.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/in6_ifattach.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/in6_proto.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/in6_src.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ip6_forward.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ip6_input.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ip6_mroute.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ip6_output.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ipcomp_core.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ipcomp_input.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ipcomp_output.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/ipsec.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/mld6.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/nd6.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/nd6_nbr.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/nd6_rtr.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netinet6/udp6_output.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netkey/key.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netkey/keydb.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netncp/ncp_sock.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netsmb/smb_trantcp.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/nfsserver/nfs.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/nfsserver/nfs_srvcache.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/nfsserver/nfs_srvsubs.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/nfsserver/nfs_syscalls.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/pci/if_rlreg.h#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/pci/ncr.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/powerpc/conf/GENERIC#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/powerpc/powerpc/intr_machdep.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/powerpc/powerpc/machdep.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/powerpc/powerpc/mmu_if.m#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/powerpc/powerpc/mmu_oea.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/powerpc/powerpc/pmap_dispatch.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sparc64/sparc64/pmap.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/kernel.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/param.h#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/socketvar.h#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/stat.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/syscall.h#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/syscall.mk#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/sysent.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/sysproto.h#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/systm.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/time.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/types.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/ufs/ufs/ufs_lookup.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/pmap.h#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/swap_pager.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/vm_fault.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/vm_object.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/vm_page.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/vm_pageout.c#2 integrate Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/identcpu.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.147 2006/07/12 06:04:11 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.148 2006/08/01 01:23:39 obrien Exp $"); #include "opt_cpu.h" @@ -296,8 +296,8 @@ "\034RDTSCP" /* RDTSCP */ "\035" /* Undefined */ "\036LM" /* 64 bit long mode */ - "\0373DNow+" /* AMD 3DNow! Extensions */ - "\0403DNow" /* AMD 3DNow! */ + "\0373DNow!+" /* AMD 3DNow! Extensions */ + "\0403DNow!" /* AMD 3DNow! */ ); } ==== //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/pmap.c#6 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.567 2006/07/20 17:48:40 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)) @@ -2972,7 +2971,7 @@ * Clear the write and modified bits in each of the given page's mappings. */ void -pmap_clear_write(vm_page_t m) +pmap_remove_write(vm_page_t m) { pv_entry_t pv; pmap_t pmap; @@ -3002,23 +3001,6 @@ } /* - * pmap_page_protect: - * - * Lower the permission for all mappings to a given page. - */ -void -pmap_page_protect(vm_page_t m, vm_prot_t prot) -{ - if ((prot & VM_PROT_WRITE) == 0) { - if (prot & (VM_PROT_READ | VM_PROT_EXECUTE)) { - pmap_clear_write(m); - } else { - pmap_remove_all(m); - } - } -} - -/* * pmap_ts_referenced: * * Return a count of reference bits for a page, clearing those bits. ==== //depot/projects/soc2006/rdivacky_linuxolator/amd64/include/pmap.h#2 (text+ko) ==== @@ -39,7 +39,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.132 2006/05/01 22:07:00 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.133 2006/08/02 16:24:23 alc Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -81,6 +81,8 @@ #define PGEX_P 0x01 /* Protection violation vs. not present */ #define PGEX_W 0x02 /* during a Write cycle */ #define PGEX_U 0x04 /* access from User mode (UPL) */ +#define PGEX_RSV 0x08 /* reserved PTE field is non-zero */ +#define PGEX_I 0x10 /* during an instruction fetch */ /* * Pte related macros. This is complicated by having to deal with ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/arm/pmap.c#5 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.66 2006/07/20 23:26:22 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.67 2006/08/01 19:06:04 alc Exp $"); #include #include #include @@ -2759,32 +2759,6 @@ /* - * pmap_page_protect: - * - * Lower the permission for all mappings to a given page. - */ -void -pmap_page_protect(vm_page_t m, vm_prot_t prot) -{ - switch(prot) { - case VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE: - case VM_PROT_READ|VM_PROT_WRITE: - return; - - case VM_PROT_READ: - case VM_PROT_READ|VM_PROT_EXECUTE: - pmap_clearbit(m, PVF_WRITE); - break; - - default: - pmap_remove_all(m); - break; - } - -} - - -/* * Remove all pages from specified address space * this aids process exit speeds. Also, this code * is special cased for current process only, but @@ -4464,7 +4438,7 @@ * Clear the write and modified bits in each of the given page's mappings. */ void -pmap_clear_write(vm_page_t m) +pmap_remove_write(vm_page_t m) { if (m->md.pvh_attrs & PVF_WRITE) ==== //depot/projects/soc2006/rdivacky_linuxolator/boot/i386/loader/main.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.36 2005/12/21 02:17:58 sobomax Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.37 2006/08/04 07:56:32 yar Exp $"); /* * MD bootstrap main() and assorted miscellaneous @@ -226,7 +226,7 @@ /* * If we are booted by an old bootstrap, we have to guess at the BIOS - * unit number. We will loose if there is more than one disk type + * unit number. We will lose if there is more than one disk type * and we are not booting from the lowest-numbered disk type * (ie. SCSI when IDE also exists). */ ==== //depot/projects/soc2006/rdivacky_linuxolator/boot/pc98/loader/main.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/pc98/loader/main.c,v 1.22 2005/12/21 06:10:42 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/pc98/loader/main.c,v 1.23 2006/08/04 07:56:32 yar Exp $"); /* * MD bootstrap main() and assorted miscellaneous @@ -218,7 +218,7 @@ /* * If we are booted by an old bootstrap, we have to guess at the BIOS - * unit number. We will loose if there is more than one disk type + * unit number. We will lose if there is more than one disk type * and we are not booting from the lowest-numbered disk type * (ie. SCSI when IDE also exists). */ ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/svr4/svr4_sockio.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_sockio.c,v 1.17 2005/08/09 10:19:41 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_sockio.c,v 1.18 2006/08/04 21:15:09 brooks Exp $"); #include #include @@ -104,7 +104,7 @@ */ IFNET_RLOCK(); TAILQ_FOREACH(ifp, &ifnet, if_link) - if (TAILQ_FIRST(&ifp->if_addrhead) == NULL) + if (TAILQ_EMPTY(&ifp->if_addrhead)) ifnum++; else TAILQ_FOREACH(ifa, &ifp->if_addrhead, ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/svr4/svr4_stream.c#5 (text+ko) ==== @@ -36,11 +36,10 @@ */ #include -__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 #include @@ -50,7 +49,6 @@ #include #include #include /* Must come after sys/malloc.h */ -#include #include #include #include ==== //depot/projects/soc2006/rdivacky_linuxolator/conf/files.powerpc#4 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.powerpc,v 1.56 2006/07/26 19:44:42 marcel Exp $ +# $FreeBSD: src/sys/conf/files.powerpc,v 1.57 2006/08/01 22:19:01 sobomax Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -128,3 +128,5 @@ powerpc/psim/uart_iobus.c optional uart psim dev/scc/scc_bfe_macio.c optional scc powermac + +dev/powermac_nvram/powermac_nvram.c optional powermac powermac_nvram ==== //depot/projects/soc2006/rdivacky_linuxolator/conf/options#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.555 2006/07/29 18:38:53 marcel Exp $ +# $FreeBSD: src/sys/conf/options,v 1.556 2006/08/03 05:19:33 jb Exp $ # # On the handling of kernel options # @@ -93,6 +93,7 @@ GEOM_UZIP opt_geom.h GEOM_VOL opt_geom.h GEOM_ZERO opt_geom.h +KSE opt_global.h KSTACK_MAX_PAGES KSTACK_PAGES KTRACE @@ -598,6 +599,7 @@ PCFCLOCK_VERBOSE opt_pcfclock.h PCFCLOCK_MAX_RETRIES opt_pcfclock.h +KDTRACE opt_kdtrace.h KTR opt_global.h KTR_ALQ opt_ktr.h KTR_MASK opt_ktr.h ==== //depot/projects/soc2006/rdivacky_linuxolator/ddb/db_ps.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ddb/db_ps.c,v 1.61 2006/07/12 21:22:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_ps.c,v 1.63 2006/08/01 22:30:55 jhb Exp $"); #include #include @@ -57,10 +57,10 @@ * * 1 2 3 4 5 6 7 * 1234567890123456789012345678901234567890123456789012345678901234567890 - * pid uid ppid pgrp state wmesg wchan cmd - * < wmesg > < wchan > - * (threaded) - * < wmesg > < wchan > + * pid ppid pgrp uid state wmesg wchan cmd + * < wmesg > < wchan > + * (threaded) + * < wmesg > < wchan > * * For machines with 64-bit pointers, we expand the wchan field 8 more * characters. @@ -83,9 +83,9 @@ p = &proc0; #ifdef __LP64__ - db_printf(" pid uid ppid pgrp state wmesg wchan cmd\n"); + db_printf(" pid ppid pgrp uid state wmesg wchan cmd\n"); #else - db_printf(" pid uid ppid pgrp state wmesg wchan cmd\n"); + db_printf(" pid ppid pgrp uid state wmesg wchan cmd\n"); #endif while (--np >= 0 && !db_pager_quit) { if (p == NULL) { @@ -98,9 +98,9 @@ cred = p->p_ucred; pgrp = p->p_pgrp; - db_printf("%5d %4d %5d %5d ", p->p_pid, - cred != NULL ? cred->cr_ruid : 0, pp->p_pid, - pgrp != NULL ? pgrp->pg_id : 0); + db_printf("%5d %5d %5d %5d ", p->p_pid, pp->p_pid, + pgrp != NULL ? pgrp->pg_id : 0, + cred != NULL ? cred->cr_ruid : 0); /* Determine our primary process state. */ switch (p->p_state) { @@ -207,7 +207,7 @@ void *wchan; if (all) { - db_printf(" %9d ", td->td_tid); + db_printf("%6d ", td->td_tid); switch (td->td_state) { case TDS_RUNNING: snprintf(state, sizeof(state), "Run"); ==== //depot/projects/soc2006/rdivacky_linuxolator/dev/ata/ata-chipset.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.166 2006/07/24 10:44:50 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.167 2006/08/05 11:41:46 sos Exp $"); #include "opt_ata.h" #include @@ -2772,17 +2772,17 @@ { ATA_NFORCE3_PRO_S1, 0, 0, 0, ATA_SA150, "nForce3 Pro" }, { ATA_NFORCE3_PRO_S2, 0, 0, 0, ATA_SA150, "nForce3 Pro" }, { ATA_NFORCE_MCP04, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nForce MCP" }, - { ATA_NFORCE_MCP04_S1, 0, 0, NV4BYTE, ATA_SA150, "nForce MCP" }, - { ATA_NFORCE_MCP04_S2, 0, 0, NV4BYTE, ATA_SA150, "nForce MCP" }, + { ATA_NFORCE_MCP04_S1, 0, 0, NV4, ATA_SA150, "nForce MCP" }, + { ATA_NFORCE_MCP04_S2, 0, 0, NV4, ATA_SA150, "nForce MCP" }, { ATA_NFORCE_CK804, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nForce CK804" }, - { ATA_NFORCE_CK804_S1, 0, 0, NV4BYTE, ATA_SA300, "nForce CK804" }, - { ATA_NFORCE_CK804_S2, 0, 0, NV4BYTE, ATA_SA300, "nForce CK804" }, + { ATA_NFORCE_CK804_S1, 0, 0, NV4, ATA_SA300, "nForce CK804" }, + { ATA_NFORCE_CK804_S2, 0, 0, NV4, ATA_SA300, "nForce CK804" }, { ATA_NFORCE_MCP51, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nForce MCP51" }, - { ATA_NFORCE_MCP51_S1, 0, 0, NV4WORD, ATA_SA300, "nForce MCP51" }, - { ATA_NFORCE_MCP51_S2, 0, 0, NV4WORD, ATA_SA300, "nForce MCP51" }, + { ATA_NFORCE_MCP51_S1, 0, 0, NV4LONG, ATA_SA300, "nForce MCP51" }, + { ATA_NFORCE_MCP51_S2, 0, 0, NV4LONG, ATA_SA300, "nForce MCP51" }, { ATA_NFORCE_MCP55, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nForce MCP55" }, - { ATA_NFORCE_MCP55_S1, 0, 0, NV4WORD, ATA_SA300, "nForce MCP55" }, - { ATA_NFORCE_MCP55_S2, 0, 0, NV4WORD, ATA_SA300, "nForce MCP55" }, + { ATA_NFORCE_MCP55_S1, 0, 0, NV4LONG, ATA_SA300, "nForce MCP55" }, + { ATA_NFORCE_MCP55_S2, 0, 0, NV4LONG, ATA_SA300, "nForce MCP55" }, { 0, 0, 0, 0, 0, 0}} ; char buffer[64] ; @@ -2821,19 +2821,19 @@ /* enable control access */ pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) | 0x04,1); - if (ctlr->chip->cfg2 == NV4BYTE) { + if (ctlr->chip->cfg2 & NV4LONG) { /* clear interrupt status */ - ATA_OUTB(ctlr->r_res2, offset, 0xff); + ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff); /* enable device and PHY state change interrupts */ - ATA_OUTB(ctlr->r_res2, offset + 1, 0xdd); + ATA_OUTL(ctlr->r_res2, offset + 4, 0x00dd00dd); } else { /* clear interrupt status */ - ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff); + ATA_OUTB(ctlr->r_res2, offset, 0xff); /* enable device and PHY state change interrupts */ - ATA_OUTL(ctlr->r_res2, offset + 4, 0x00dd00dd); + ATA_OUTB(ctlr->r_res2, offset + 1, 0xdd); } /* enable PCI interrupt */ @@ -2881,18 +2881,18 @@ struct ata_channel *ch = device_get_softc(dev); int offset = ctlr->chip->cfg2 & NV4 ? 0x0440 : 0x0010; struct ata_connect_task *tp; - int shift = ch->unit << (ctlr->chip->cfg2 == NV4BYTE ? 2 : 4); + int shift = ch->unit << (ctlr->chip->cfg2 & NV4LONG ? 4 : 2); u_int32_t status; /* get and clear interrupt status */ - if (ctlr->chip->cfg2 == NV4BYTE) { + if (ctlr->chip->cfg2 & NV4LONG) { + status = ATA_INL(ctlr->r_res2, offset); + ATA_OUTL(ctlr->r_res2, offset, (0x0f << shift)); + } + else { status = ATA_INB(ctlr->r_res2, offset); ATA_OUTB(ctlr->r_res2, offset, (0x0f << shift)); } - else { - status = ATA_INL(ctlr->r_res2, offset); - ATA_OUTL(ctlr->r_res2, offset, (0x0f << shift)); - } /* check for and handle connect events */ if (((status & (0x0c << shift)) == (0x04 << shift)) && ==== //depot/projects/soc2006/rdivacky_linuxolator/dev/ata/ata-pci.h#4 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.66 2006/07/24 10:44:50 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.67 2006/08/05 11:41:46 sos Exp $ */ /* structure holding chipset config info */ @@ -392,8 +392,7 @@ #define AMDBUG 0x0002 #define NVIDIA 0x0004 #define NV4 0x0010 -#define NV4BYTE 0x0030 -#define NV4WORD 0x0050 +#define NV4LONG 0x0030 #define VIACLK 0x0100 #define VIABUG 0x0200 #define VIABAR 0x0400 ==== //depot/projects/soc2006/rdivacky_linuxolator/dev/ath/if_ath.c#5 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.150 2006/07/26 03:48:41 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.151 2006/08/05 05:07:17 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -180,6 +180,8 @@ static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode); static void ath_sysctlattach(struct ath_softc *); +static int ath_raw_xmit(struct ieee80211_node *, + struct mbuf *, const struct ieee80211_bpf_params *); static void ath_bpfattach(struct ath_softc *); static void ath_announce(struct ath_softc *); @@ -607,6 +609,7 @@ ic->ic_crypto.cs_key_set = ath_key_set; ic->ic_crypto.cs_key_update_begin = ath_key_update_begin; ic->ic_crypto.cs_key_update_end = ath_key_update_end; + ic->ic_raw_xmit = ath_raw_xmit; /* complete initialization */ ieee80211_media_init(ic, ath_media_change, ieee80211_media_status); @@ -3353,6 +3356,126 @@ } static int +ath_tx_dmasetup(struct ath_softc *sc, struct ath_buf *bf, struct mbuf *m0) +{ + struct mbuf *m; + int error; + + /* + * Load the DMA map so any coalescing is done. This + * also calculates the number of descriptors we need. + */ + error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m0, + bf->bf_segs, &bf->bf_nseg, + BUS_DMA_NOWAIT); + if (error == EFBIG) { + /* XXX packet requires too many descriptors */ + bf->bf_nseg = ATH_TXDESC+1; + } else if (error != 0) { + sc->sc_stats.ast_tx_busdma++; + m_freem(m0); + return error; + } + /* + * Discard null packets and check for packets that + * require too many TX descriptors. We try to convert + * the latter to a cluster. + */ + if (bf->bf_nseg > ATH_TXDESC) { /* too many desc's, linearize */ + sc->sc_stats.ast_tx_linear++; + m = ath_defrag(m0, M_DONTWAIT, ATH_TXDESC); + if (m == NULL) { + m_freem(m0); + sc->sc_stats.ast_tx_nombuf++; + return ENOMEM; + } + m0 = m; + error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m0, + bf->bf_segs, &bf->bf_nseg, + BUS_DMA_NOWAIT); + if (error != 0) { + sc->sc_stats.ast_tx_busdma++; + m_freem(m0); + return error; + } + KASSERT(bf->bf_nseg <= ATH_TXDESC, + ("too many segments after defrag; nseg %u", bf->bf_nseg)); + } else if (bf->bf_nseg == 0) { /* null packet, discard */ + sc->sc_stats.ast_tx_nodata++; + m_freem(m0); + return EIO; + } + DPRINTF(sc, ATH_DEBUG_XMIT, "%s: m %p len %u\n", + __func__, m0, m0->m_pkthdr.len); + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREWRITE); + bf->bf_m = m0; + + return 0; +} + +static void +ath_tx_handoff(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf) +{ + struct ath_hal *ah = sc->sc_ah; + struct ath_desc *ds, *ds0; + int i; + + /* + * Fillin the remainder of the descriptor info. + */ + ds0 = ds = bf->bf_desc; + for (i = 0; i < bf->bf_nseg; i++, ds++) { + ds->ds_data = bf->bf_segs[i].ds_addr; + if (i == bf->bf_nseg - 1) + ds->ds_link = 0; + else + ds->ds_link = bf->bf_daddr + sizeof(*ds) * (i + 1); + ath_hal_filltxdesc(ah, ds + , bf->bf_segs[i].ds_len /* segment length */ + , i == 0 /* first segment */ + , i == bf->bf_nseg - 1 /* last segment */ + , ds0 /* first descriptor */ + ); + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: %d: %08x %08x %08x %08x %08x %08x\n", + __func__, i, ds->ds_link, ds->ds_data, + ds->ds_ctl0, ds->ds_ctl1, ds->ds_hw[0], ds->ds_hw[1]); + } + /* + * Insert the frame on the outbound list and pass it on + * to the hardware. Multicast frames buffered for power + * save stations and transmit from the CAB queue are stored + * on a s/w only queue and loaded on to the CAB queue in + * the SWBA handler since frames only go out on DTIM and + * to avoid possible races. + */ + ATH_TXQ_LOCK(txq); + ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); + if (txq != &sc->sc_mcastq) { + if (txq->axq_link == NULL) { + ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: TXDP[%u] = %p (%p) depth %d\n", __func__, + txq->axq_qnum, (caddr_t)bf->bf_daddr, bf->bf_desc, + txq->axq_depth); + } else { + *txq->axq_link = bf->bf_daddr; + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: link[%u](%p)=%p (%p) depth %d\n", __func__, + txq->axq_qnum, txq->axq_link, + (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth); + } + txq->axq_link = &bf->bf_desc[bf->bf_nseg - 1].ds_link; + ath_hal_txstart(ah, txq->axq_qnum); + } else { + if (txq->axq_link != NULL) + *txq->axq_link = bf->bf_daddr; + txq->axq_link = &bf->bf_desc[bf->bf_nseg - 1].ds_link; + } + ATH_TXQ_UNLOCK(txq); +} + +static int ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf, struct mbuf *m0) { @@ -3360,11 +3483,11 @@ struct ath_hal *ah = sc->sc_ah; struct ifnet *ifp = sc->sc_ifp; const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; - int i, error, iswep, ismcast, ismrr; + int error, iswep, ismcast, ismrr; int keyix, hdrlen, pktlen, try0; u_int8_t rix, txrate, ctsrate; u_int8_t cix = 0xff; /* NB: silence compiler */ - struct ath_desc *ds, *ds0; + struct ath_desc *ds; struct ath_txq *txq; struct ieee80211_frame *wh; u_int subtype, flags, ctsduration; @@ -3372,7 +3495,6 @@ const HAL_RATE_TABLE *rt; HAL_BOOL shortPreamble; struct ath_node *an; - struct mbuf *m; u_int pri; wh = mtod(m0, struct ieee80211_frame *); @@ -3438,50 +3560,10 @@ * Load the DMA map so any coalescing is done. This * also calculates the number of descriptors we need. */ - error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m0, - bf->bf_segs, &bf->bf_nseg, - BUS_DMA_NOWAIT); - if (error == EFBIG) { - /* XXX packet requires too many descriptors */ - bf->bf_nseg = ATH_TXDESC+1; - } else if (error != 0) { - sc->sc_stats.ast_tx_busdma++; - m_freem(m0); - return error; - } - /* - * Discard null packets and check for packets that - * require too many TX descriptors. We try to convert - * the latter to a cluster. - */ - if (bf->bf_nseg > ATH_TXDESC) { /* too many desc's, linearize */ - sc->sc_stats.ast_tx_linear++; - m = ath_defrag(m0, M_DONTWAIT, ATH_TXDESC); - if (m == NULL) { - m_freem(m0); - sc->sc_stats.ast_tx_nombuf++; - return ENOMEM; - } - m0 = m; - error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m0, - bf->bf_segs, &bf->bf_nseg, - BUS_DMA_NOWAIT); - if (error != 0) { - sc->sc_stats.ast_tx_busdma++; - m_freem(m0); - return error; - } - KASSERT(bf->bf_nseg <= ATH_TXDESC, - ("too many segments after defrag; nseg %u", bf->bf_nseg)); - } else if (bf->bf_nseg == 0) { /* null packet, discard */ - sc->sc_stats.ast_tx_nodata++; - m_freem(m0); - return EIO; - } - DPRINTF(sc, ATH_DEBUG_XMIT, "%s: m %p len %u\n", __func__, m0, pktlen); - bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREWRITE); - bf->bf_m = m0; + error = ath_tx_dmasetup(sc, bf, m0); bf->bf_node = ni; /* NB: held reference */ + m0 = bf->bf_m; /* NB: may have changed */ + wh = mtod(m0, struct ieee80211_frame *); /* setup descriptors */ ds = bf->bf_desc; @@ -3763,60 +3845,7 @@ if (ismrr) ath_rate_setupxtxdesc(sc, an, ds, shortPreamble, rix); - /* - * Fillin the remainder of the descriptor info. - */ - ds0 = ds; - for (i = 0; i < bf->bf_nseg; i++, ds++) { - ds->ds_data = bf->bf_segs[i].ds_addr; - if (i == bf->bf_nseg - 1) - ds->ds_link = 0; - else - ds->ds_link = bf->bf_daddr + sizeof(*ds) * (i + 1); - ath_hal_filltxdesc(ah, ds - , bf->bf_segs[i].ds_len /* segment length */ - , i == 0 /* first segment */ - , i == bf->bf_nseg - 1 /* last segment */ - , ds0 /* first descriptor */ - ); - DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: %d: %08x %08x %08x %08x %08x %08x\n", - __func__, i, ds->ds_link, ds->ds_data, - ds->ds_ctl0, ds->ds_ctl1, ds->ds_hw[0], ds->ds_hw[1]); - } - /* - * Insert the frame on the outbound list and pass it on - * to the hardware. Multicast frames buffered for power - * save stations and transmit from the CAB queue are stored - * on a s/w only queue and loaded on to the CAB queue in - * the SWBA handler since frames only go out on DTIM and - * to avoid possible races. - */ - ATH_TXQ_LOCK(txq); - ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); - if (txq != &sc->sc_mcastq) { - if (txq->axq_link == NULL) { - ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); - DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: TXDP[%u] = %p (%p) depth %d\n", __func__, - txq->axq_qnum, (caddr_t)bf->bf_daddr, bf->bf_desc, - txq->axq_depth); - } else { - *txq->axq_link = bf->bf_daddr; - DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: link[%u](%p)=%p (%p) depth %d\n", __func__, - txq->axq_qnum, txq->axq_link, - (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth); - } - txq->axq_link = &bf->bf_desc[bf->bf_nseg - 1].ds_link; - ath_hal_txstart(ah, txq->axq_qnum); - } else { - if (txq->axq_link != NULL) - *txq->axq_link = bf->bf_daddr; - txq->axq_link = &bf->bf_desc[bf->bf_nseg - 1].ds_link; - } - ATH_TXQ_UNLOCK(txq); - + ath_tx_handoff(sc, txq, bf); return 0; } @@ -5480,6 +5509,232 @@ sc->sc_rx_th.wr_ihdr.it_present = htole32(ATH_RX_RADIOTAP_PRESENT); } +static int +ath_tx_raw_start(struct ath_softc *sc, struct ieee80211_node *ni, + struct ath_buf *bf, struct mbuf *m0, + const struct ieee80211_bpf_params *params) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ath_hal *ah = sc->sc_ah; + int error, ismcast, ismrr; + int hdrlen, pktlen, try0, txantenna; + u_int8_t rix, cix, txrate, ctsrate, rate1, rate2, rate3; + struct ath_txq *txq; + struct ieee80211_frame *wh; + u_int flags, ctsduration; + HAL_PKT_TYPE atype; + const HAL_RATE_TABLE *rt; + struct ath_desc *ds; + u_int pri; + + wh = mtod(m0, struct ieee80211_frame *); + ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); + hdrlen = ieee80211_anyhdrsize(wh); + /* + * Packet length must not include any + * pad bytes; deduct them here. + */ + /* XXX honor IEEE80211_BPF_DATAPAD */ + pktlen = m0->m_pkthdr.len - (hdrlen & 3) + IEEE80211_CRC_LEN; + + error = ath_tx_dmasetup(sc, bf, m0); + if (error != 0) + return error; + m0 = bf->bf_m; /* NB: may have changed */ + wh = mtod(m0, struct ieee80211_frame *); + bf->bf_node = ni; /* NB: held reference */ + + flags = HAL_TXDESC_CLRDMASK; /* XXX needed for crypto errs */ + flags |= HAL_TXDESC_INTREQ; /* force interrupt */ + if (params->ibp_flags & IEEE80211_BPF_RTS) + flags |= HAL_TXDESC_RTSENA; + else if (params->ibp_flags & IEEE80211_BPF_CTS) + flags |= HAL_TXDESC_CTSENA; + /* XXX leave ismcast to injector? */ + if ((params->ibp_flags & IEEE80211_BPF_NOACK) || ismcast) + flags |= HAL_TXDESC_NOACK; + + rt = sc->sc_currates; + KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); + rix = ath_tx_findrix(rt, params->ibp_rate0); + txrate = rt->info[rix].rateCode; + if (params->ibp_flags & IEEE80211_BPF_SHORTPRE) + txrate |= rt->info[rix].shortPreamble; + try0 = params->ibp_try0; + ismrr = (params->ibp_try1 != 0); + txantenna = params->ibp_pri >> 2; + if (txantenna == 0) /* XXX? */ + txantenna = sc->sc_txantenna; + ctsduration = 0; + if (flags & (HAL_TXDESC_CTSENA | HAL_TXDESC_RTSENA)) { + cix = ath_tx_findrix(rt, params->ibp_ctsrate); + ctsrate = rt->info[cix].rateCode; + if (params->ibp_flags & IEEE80211_BPF_SHORTPRE) { + ctsrate |= rt->info[cix].shortPreamble; + if (flags & HAL_TXDESC_RTSENA) /* SIFS + CTS */ + ctsduration += rt->info[cix].spAckDuration; + ctsduration += ath_hal_computetxtime(ah, + rt, pktlen, rix, AH_TRUE); + if ((flags & HAL_TXDESC_NOACK) == 0) /* SIFS + ACK */ + ctsduration += rt->info[rix].spAckDuration; + } else { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Aug 6 09:27:28 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 08B3A16A4E0; Sun, 6 Aug 2006 09:27:28 +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 D9C6A16A4DD for ; Sun, 6 Aug 2006 09:27:27 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2913343D66 for ; Sun, 6 Aug 2006 09:27:27 +0000 (GMT) (envelope-from piso@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 k769RRfA032916 for ; Sun, 6 Aug 2006 09:27:27 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k769RQmX032913 for perforce@freebsd.org; Sun, 6 Aug 2006 09:27:26 GMT (envelope-from piso@freebsd.org) Date: Sun, 6 Aug 2006 09:27:26 GMT Message-Id: <200608060927.k769RQmX032913@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 103316 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: Sun, 06 Aug 2006 09:27:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=103316 Change 103316 by piso@piso_newluxor on 2006/08/06 09:27:11 And if i updated correctly the loop variable, the stray logic will work even better: this makes my re happy again. Affected files ... .. //depot/projects/soc2006/intr_filter/i386/i386/intr_machdep.c#10 edit Differences ... ==== //depot/projects/soc2006/intr_filter/i386/i386/intr_machdep.c#10 (text+ko) ==== @@ -173,9 +173,10 @@ walk_intr_src(void) { static int i = 0; - for (; i X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 83FAB16A4E1; Sun, 6 Aug 2006 10:18:34 +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 5ECE516A4DE for ; Sun, 6 Aug 2006 10:18:34 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 060DA43D53 for ; Sun, 6 Aug 2006 10:18:34 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76AIXXP037508 for ; Sun, 6 Aug 2006 10:18:33 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76AIVDj037505 for perforce@freebsd.org; Sun, 6 Aug 2006 10:18:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 10:18:31 GMT Message-Id: <200608061018.k76AIVDj037505@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 103317 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: Sun, 06 Aug 2006 10:18:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=103317 Change 103317 by rwatson@rwatson_zoo on 2006/08/06 10:17:32 Initial placement of MAC checks in audit system calls. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_syscalls.c#19 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_syscalls.c#19 (text+ko) ==== @@ -29,7 +29,17 @@ * $FreeBSD: src/sys/security/audit/audit_syscalls.c,v 1.4 2006/06/05 22:36:12 rwatson Exp $ */ +/* + * XXXRW: The MAC checks here vary in location based on when the arguments + * they need have been copied in. Probably, we should universally adopt the + * order: (1) copy in arguments (2) audit arguments (3) MAC check + * (4) suser() check. + */ + +#include "opt_mac.h" + #include +#include #include #include #include @@ -112,6 +122,12 @@ goto free_out; } +#ifdef MAC + error = mac_check_system_audit(td->td_ucred, rec, uap->length); + if (error) + goto free_out; +#endif + /* * Attach the user audit record to the kernel audit record. Because * this system call is an auditable event, we will write the user @@ -148,6 +164,13 @@ struct proc *tp; AUDIT_ARG(cmd, uap->cmd); + +#ifdef MAC + error = mac_check_system_auditon(td->td_ucred, uap->cmd); + if (error) + return (error); +#endif + error = suser(td); if (error) return (error); @@ -394,6 +417,12 @@ int error; au_id_t id; +#ifdef MAC + error = mac_check_proc_getauid(td->td_ucred); + if (error) + return (error); +#endif + error = suser(td); if (error) return (error); @@ -426,6 +455,12 @@ audit_arg_auid(id); +#ifdef MAC + error = mac_check_proc_setauid(td->td_ucred, id); + if (error) + return (error); +#endif + /* * XXX: Integer write on static pointer dereference: doesn't need * locking? @@ -454,6 +489,12 @@ struct auditinfo ai; int error; +#ifdef MAC + error = mac_check_proc_getaudit(td->td_ucred); + if (error) + return (error); +#endif + error = suser(td); if (error) return (error); @@ -483,6 +524,12 @@ audit_arg_auditinfo(&ai); +#ifdef MAC + error = mac_check_proc_setaudit(td->td_ucred, &ai); + if (error) + return (error); +#endif + /* * XXXRW: Test privilege while holding the proc lock? */ @@ -500,6 +547,12 @@ { int error; +#ifdef MAC + error = mac_check_proc_getaudit(td->td_ucred); + if (error) + return (error); +#endif + error = suser(td); if (error) return (error); @@ -516,6 +569,13 @@ error = suser(td); if (error) return (error); + +#ifdef MAC + error = mac_check_proc_setaudit(td->td_ucred, NULL); + if (error) + return (error); +#endif + return (ENOSYS); } From owner-p4-projects@FreeBSD.ORG Sun Aug 6 10:34:55 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 2560C16A4DF; Sun, 6 Aug 2006 10:34:55 +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 DC1D516A4DD for ; Sun, 6 Aug 2006 10:34:54 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A608F43D46 for ; Sun, 6 Aug 2006 10:34:54 +0000 (GMT) (envelope-from rdivacky@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 k76AYs45039310 for ; Sun, 6 Aug 2006 10:34:54 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76AYsJm039307 for perforce@freebsd.org; Sun, 6 Aug 2006 10:34:54 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 6 Aug 2006 10:34:54 GMT Message-Id: <200608061034.k76AYsJm039307@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103318 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: Sun, 06 Aug 2006 10:34:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=103318 Change 103318 by rdivacky@rdivacky_witten on 2006/08/06 10:34:19 Add linux_tgkill() syscall. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/syscalls.master#21 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/syscalls.master#21 (text+ko) ==== @@ -436,7 +436,7 @@ struct linux_timespec *rqtp, struct linux_timespec *rmtp); } 268 AUE_NULL STD { int linux_statfs64(void); } 269 AUE_NULL STD { int linux_fstatfs64(void); } -270 AUE_NULL STD { int linux_tgkill(void); } +270 AUE_NULL STD { int linux_tgkill(int tgid, int pid, int sig); } 271 AUE_NULL STD { int linux_utimes(void); } 272 AUE_NULL STD { int linux_fadvise64_64(void); } 273 AUE_NULL UNIMPL From owner-p4-projects@FreeBSD.ORG Sun Aug 6 10:34:55 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 8D90816A565; Sun, 6 Aug 2006 10:34:55 +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 69B3A16A562 for ; Sun, 6 Aug 2006 10:34:55 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B67143D46 for ; Sun, 6 Aug 2006 10:34:55 +0000 (GMT) (envelope-from rdivacky@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 k76AYtFr039317 for ; Sun, 6 Aug 2006 10:34:55 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76AYsE8039313 for perforce@freebsd.org; Sun, 6 Aug 2006 10:34:54 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 6 Aug 2006 10:34:54 GMT Message-Id: <200608061034.k76AYsE8039313@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103319 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: Sun, 06 Aug 2006 10:34:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=103319 Change 103319 by rdivacky@rdivacky_witten on 2006/08/06 10:34:42 Regen after syscalls.master update. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_proto.h#21 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_syscall.h#21 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_sysent.c#21 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_proto.h#21 (text+ko) ==== @@ -11,10 +11,7 @@ #include #include -#include -#include #include - #include struct proc; @@ -791,7 +788,9 @@ register_t dummy; }; struct linux_tgkill_args { - register_t dummy; + char tgid_l_[PADL_(int)]; int tgid; char tgid_r_[PADR_(int)]; + char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)]; + char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; }; struct linux_utimes_args { register_t dummy; ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_syscall.h#21 (text+ko) ==== ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_sysent.c#21 (text+ko) ==== @@ -19,315 +19,315 @@ /* The casts are bogus but will do for now. */ struct sysent linux_sysent[] = { #define nosys linux_nosys - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 0 = setup */ - { AS(sys_exit_args), (sy_call_t *)sys_exit, AUE_EXIT }, /* 1 = exit */ - { 0, (sy_call_t *)linux_fork, AUE_FORK }, /* 2 = linux_fork */ - { AS(read_args), (sy_call_t *)read, AUE_NULL }, /* 3 = read */ - { AS(write_args), (sy_call_t *)write, AUE_NULL }, /* 4 = write */ - { AS(linux_open_args), (sy_call_t *)linux_open, AUE_OPEN_RWTC }, /* 5 = linux_open */ - { AS(close_args), (sy_call_t *)close, AUE_CLOSE }, /* 6 = close */ - { AS(linux_waitpid_args), (sy_call_t *)linux_waitpid, AUE_WAIT4 }, /* 7 = linux_waitpid */ - { AS(linux_creat_args), (sy_call_t *)linux_creat, AUE_O_CREAT }, /* 8 = linux_creat */ - { AS(linux_link_args), (sy_call_t *)linux_link, AUE_LINK }, /* 9 = linux_link */ - { AS(linux_unlink_args), (sy_call_t *)linux_unlink, AUE_UNLINK }, /* 10 = linux_unlink */ - { AS(linux_execve_args), (sy_call_t *)linux_execve, AUE_EXECVE }, /* 11 = linux_execve */ - { AS(linux_chdir_args), (sy_call_t *)linux_chdir, AUE_CHDIR }, /* 12 = linux_chdir */ - { AS(linux_time_args), (sy_call_t *)linux_time, AUE_NULL }, /* 13 = linux_time */ - { AS(linux_mknod_args), (sy_call_t *)linux_mknod, AUE_MKNOD }, /* 14 = linux_mknod */ - { AS(linux_chmod_args), (sy_call_t *)linux_chmod, AUE_CHMOD }, /* 15 = linux_chmod */ - { AS(linux_lchown16_args), (sy_call_t *)linux_lchown16, AUE_LCHOWN }, /* 16 = linux_lchown16 */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 17 = break */ - { AS(linux_stat_args), (sy_call_t *)linux_stat, AUE_STAT }, /* 18 = linux_stat */ - { AS(linux_lseek_args), (sy_call_t *)linux_lseek, AUE_LSEEK }, /* 19 = linux_lseek */ - { 0, (sy_call_t *)linux_getpid, AUE_GETPID }, /* 20 = linux_getpid */ - { AS(linux_mount_args), (sy_call_t *)linux_mount, AUE_MOUNT }, /* 21 = linux_mount */ - { AS(linux_oldumount_args), (sy_call_t *)linux_oldumount, AUE_UMOUNT }, /* 22 = linux_oldumount */ - { AS(linux_setuid16_args), (sy_call_t *)linux_setuid16, AUE_SETUID }, /* 23 = linux_setuid16 */ - { 0, (sy_call_t *)linux_getuid16, AUE_GETUID }, /* 24 = linux_getuid16 */ - { 0, (sy_call_t *)linux_stime, AUE_SETTIMEOFDAY }, /* 25 = linux_stime */ - { AS(linux_ptrace_args), (sy_call_t *)linux_ptrace, AUE_PTRACE }, /* 26 = linux_ptrace */ - { AS(linux_alarm_args), (sy_call_t *)linux_alarm, AUE_NULL }, /* 27 = linux_alarm */ - { AS(linux_fstat_args), (sy_call_t *)linux_fstat, AUE_FSTAT }, /* 28 = linux_fstat */ - { 0, (sy_call_t *)linux_pause, AUE_NULL }, /* 29 = linux_pause */ - { AS(linux_utime_args), (sy_call_t *)linux_utime, AUE_UTIME }, /* 30 = linux_utime */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 31 = stty */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 32 = gtty */ - { AS(linux_access_args), (sy_call_t *)linux_access, AUE_ACCESS }, /* 33 = linux_access */ - { AS(linux_nice_args), (sy_call_t *)linux_nice, AUE_NICE }, /* 34 = linux_nice */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 35 = ftime */ - { 0, (sy_call_t *)sync, AUE_SYNC }, /* 36 = sync */ - { AS(linux_kill_args), (sy_call_t *)linux_kill, AUE_KILL }, /* 37 = linux_kill */ - { AS(linux_rename_args), (sy_call_t *)linux_rename, AUE_RENAME }, /* 38 = linux_rename */ - { AS(linux_mkdir_args), (sy_call_t *)linux_mkdir, AUE_MKDIR }, /* 39 = linux_mkdir */ - { AS(linux_rmdir_args), (sy_call_t *)linux_rmdir, AUE_RMDIR }, /* 40 = linux_rmdir */ - { AS(dup_args), (sy_call_t *)dup, AUE_DUP }, /* 41 = dup */ - { AS(linux_pipe_args), (sy_call_t *)linux_pipe, AUE_PIPE }, /* 42 = linux_pipe */ - { AS(linux_times_args), (sy_call_t *)linux_times, AUE_NULL }, /* 43 = linux_times */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 44 = prof */ - { AS(linux_brk_args), (sy_call_t *)linux_brk, AUE_NULL }, /* 45 = linux_brk */ - { AS(linux_setgid16_args), (sy_call_t *)linux_setgid16, AUE_SETGID }, /* 46 = linux_setgid16 */ - { 0, (sy_call_t *)linux_getgid16, AUE_GETGID }, /* 47 = linux_getgid16 */ - { AS(linux_signal_args), (sy_call_t *)linux_signal, AUE_NULL }, /* 48 = linux_signal */ - { 0, (sy_call_t *)linux_geteuid16, AUE_GETEUID }, /* 49 = linux_geteuid16 */ - { 0, (sy_call_t *)linux_getegid16, AUE_GETEGID }, /* 50 = linux_getegid16 */ - { AS(acct_args), (sy_call_t *)acct, AUE_ACCT }, /* 51 = acct */ - { AS(linux_umount_args), (sy_call_t *)linux_umount, AUE_UMOUNT }, /* 52 = linux_umount */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 53 = lock */ - { AS(linux_ioctl_args), (sy_call_t *)linux_ioctl, AUE_IOCTL }, /* 54 = linux_ioctl */ - { AS(linux_fcntl_args), (sy_call_t *)linux_fcntl, AUE_FCNTL }, /* 55 = linux_fcntl */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 56 = mpx */ - { AS(setpgid_args), (sy_call_t *)setpgid, AUE_SETPGRP }, /* 57 = setpgid */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 58 = ulimit */ - { 0, (sy_call_t *)linux_olduname, AUE_NULL }, /* 59 = linux_olduname */ - { AS(umask_args), (sy_call_t *)umask, AUE_UMASK }, /* 60 = umask */ - { AS(chroot_args), (sy_call_t *)chroot, AUE_CHROOT }, /* 61 = chroot */ - { AS(linux_ustat_args), (sy_call_t *)linux_ustat, AUE_NULL }, /* 62 = linux_ustat */ - { AS(dup2_args), (sy_call_t *)dup2, AUE_DUP2 }, /* 63 = dup2 */ - { 0, (sy_call_t *)linux_getppid, AUE_GETPPID }, /* 64 = linux_getppid */ - { 0, (sy_call_t *)getpgrp, AUE_GETPGRP }, /* 65 = getpgrp */ - { 0, (sy_call_t *)setsid, AUE_SETSID }, /* 66 = setsid */ - { AS(linux_sigaction_args), (sy_call_t *)linux_sigaction, AUE_NULL }, /* 67 = linux_sigaction */ - { 0, (sy_call_t *)linux_sgetmask, AUE_NULL }, /* 68 = linux_sgetmask */ - { AS(linux_ssetmask_args), (sy_call_t *)linux_ssetmask, AUE_NULL }, /* 69 = linux_ssetmask */ - { AS(linux_setreuid16_args), (sy_call_t *)linux_setreuid16, AUE_SETREUID }, /* 70 = linux_setreuid16 */ - { AS(linux_setregid16_args), (sy_call_t *)linux_setregid16, AUE_SETREGID }, /* 71 = linux_setregid16 */ - { AS(linux_sigsuspend_args), (sy_call_t *)linux_sigsuspend, AUE_NULL }, /* 72 = linux_sigsuspend */ - { AS(linux_sigpending_args), (sy_call_t *)linux_sigpending, AUE_NULL }, /* 73 = linux_sigpending */ - { AS(linux_sethostname_args), (sy_call_t *)linux_sethostname, AUE_SYSCTL }, /* 74 = linux_sethostname */ - { AS(linux_setrlimit_args), (sy_call_t *)linux_setrlimit, AUE_SETRLIMIT }, /* 75 = linux_setrlimit */ - { AS(linux_old_getrlimit_args), (sy_call_t *)linux_old_getrlimit, AUE_GETRLIMIT }, /* 76 = linux_old_getrlimit */ - { AS(getrusage_args), (sy_call_t *)getrusage, AUE_GETRUSAGE }, /* 77 = getrusage */ - { AS(gettimeofday_args), (sy_call_t *)gettimeofday, AUE_NULL }, /* 78 = gettimeofday */ - { AS(settimeofday_args), (sy_call_t *)settimeofday, AUE_SETTIMEOFDAY }, /* 79 = settimeofday */ - { AS(linux_getgroups16_args), (sy_call_t *)linux_getgroups16, AUE_GETGROUPS }, /* 80 = linux_getgroups16 */ - { AS(linux_setgroups16_args), (sy_call_t *)linux_setgroups16, AUE_SETGROUPS }, /* 81 = linux_setgroups16 */ - { AS(linux_old_select_args), (sy_call_t *)linux_old_select, AUE_SELECT }, /* 82 = linux_old_select */ - { AS(linux_symlink_args), (sy_call_t *)linux_symlink, AUE_SYMLINK }, /* 83 = linux_symlink */ - { AS(linux_lstat_args), (sy_call_t *)linux_lstat, AUE_LSTAT }, /* 84 = linux_lstat */ - { AS(linux_readlink_args), (sy_call_t *)linux_readlink, AUE_READLINK }, /* 85 = linux_readlink */ - { AS(linux_uselib_args), (sy_call_t *)linux_uselib, AUE_USELIB }, /* 86 = linux_uselib */ - { AS(swapon_args), (sy_call_t *)swapon, AUE_SWAPON }, /* 87 = swapon */ - { AS(linux_reboot_args), (sy_call_t *)linux_reboot, AUE_REBOOT }, /* 88 = linux_reboot */ - { AS(linux_readdir_args), (sy_call_t *)linux_readdir, AUE_O_GETDENTS }, /* 89 = linux_readdir */ - { AS(linux_mmap_args), (sy_call_t *)linux_mmap, AUE_MMAP }, /* 90 = linux_mmap */ - { AS(munmap_args), (sy_call_t *)munmap, AUE_MUNMAP }, /* 91 = munmap */ - { AS(linux_truncate_args), (sy_call_t *)linux_truncate, AUE_TRUNCATE }, /* 92 = linux_truncate */ - { AS(linux_ftruncate_args), (sy_call_t *)linux_ftruncate, AUE_FTRUNCATE }, /* 93 = linux_ftruncate */ - { AS(fchmod_args), (sy_call_t *)fchmod, AUE_FCHMOD }, /* 94 = fchmod */ - { AS(fchown_args), (sy_call_t *)fchown, AUE_FCHOWN }, /* 95 = fchown */ - { AS(linux_getpriority_args), (sy_call_t *)linux_getpriority, AUE_GETPRIORITY }, /* 96 = linux_getpriority */ - { AS(setpriority_args), (sy_call_t *)setpriority, AUE_SETPRIORITY }, /* 97 = setpriority */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 98 = profil */ - { AS(linux_statfs_args), (sy_call_t *)linux_statfs, AUE_STATFS }, /* 99 = linux_statfs */ - { AS(linux_fstatfs_args), (sy_call_t *)linux_fstatfs, AUE_FSTATFS }, /* 100 = linux_fstatfs */ - { AS(linux_ioperm_args), (sy_call_t *)linux_ioperm, AUE_NULL }, /* 101 = linux_ioperm */ - { AS(linux_socketcall_args), (sy_call_t *)linux_socketcall, AUE_NULL }, /* 102 = linux_socketcall */ - { AS(linux_syslog_args), (sy_call_t *)linux_syslog, AUE_NULL }, /* 103 = linux_syslog */ - { AS(linux_setitimer_args), (sy_call_t *)linux_setitimer, AUE_SETITIMER }, /* 104 = linux_setitimer */ - { AS(linux_getitimer_args), (sy_call_t *)linux_getitimer, AUE_GETITIMER }, /* 105 = linux_getitimer */ - { AS(linux_newstat_args), (sy_call_t *)linux_newstat, AUE_STAT }, /* 106 = linux_newstat */ - { AS(linux_newlstat_args), (sy_call_t *)linux_newlstat, AUE_LSTAT }, /* 107 = linux_newlstat */ - { AS(linux_newfstat_args), (sy_call_t *)linux_newfstat, AUE_FSTAT }, /* 108 = linux_newfstat */ - { 0, (sy_call_t *)linux_uname, AUE_NULL }, /* 109 = linux_uname */ - { AS(linux_iopl_args), (sy_call_t *)linux_iopl, AUE_NULL }, /* 110 = linux_iopl */ - { 0, (sy_call_t *)linux_vhangup, AUE_NULL }, /* 111 = linux_vhangup */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 112 = idle */ - { 0, (sy_call_t *)linux_vm86old, AUE_NULL }, /* 113 = linux_vm86old */ - { AS(linux_wait4_args), (sy_call_t *)linux_wait4, AUE_WAIT4 }, /* 114 = linux_wait4 */ - { 0, (sy_call_t *)linux_swapoff, AUE_SWAPOFF }, /* 115 = linux_swapoff */ - { AS(linux_sysinfo_args), (sy_call_t *)linux_sysinfo, AUE_NULL }, /* 116 = linux_sysinfo */ - { AS(linux_ipc_args), (sy_call_t *)linux_ipc, AUE_NULL }, /* 117 = linux_ipc */ - { AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC }, /* 118 = fsync */ - { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn, AUE_SIGRETURN }, /* 119 = linux_sigreturn */ - { AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK }, /* 120 = linux_clone */ - { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL }, /* 121 = setdomainname */ - { AS(linux_newuname_args), (sy_call_t *)linux_newuname, AUE_NULL }, /* 122 = linux_newuname */ - { AS(linux_modify_ldt_args), (sy_call_t *)linux_modify_ldt, AUE_NULL }, /* 123 = linux_modify_ldt */ - { 0, (sy_call_t *)linux_adjtimex, AUE_ADJTIME }, /* 124 = linux_adjtimex */ - { AS(mprotect_args), (sy_call_t *)mprotect, AUE_MPROTECT }, /* 125 = mprotect */ - { AS(linux_sigprocmask_args), (sy_call_t *)linux_sigprocmask, AUE_SIGPROCMASK }, /* 126 = linux_sigprocmask */ - { 0, (sy_call_t *)linux_create_module, AUE_NULL }, /* 127 = linux_create_module */ - { 0, (sy_call_t *)linux_init_module, AUE_NULL }, /* 128 = linux_init_module */ - { 0, (sy_call_t *)linux_delete_module, AUE_NULL }, /* 129 = linux_delete_module */ - { 0, (sy_call_t *)linux_get_kernel_syms, AUE_NULL }, /* 130 = linux_get_kernel_syms */ - { 0, (sy_call_t *)linux_quotactl, AUE_QUOTACTL }, /* 131 = linux_quotactl */ - { AS(getpgid_args), (sy_call_t *)getpgid, AUE_GETPGID }, /* 132 = getpgid */ - { AS(fchdir_args), (sy_call_t *)fchdir, AUE_FCHDIR }, /* 133 = fchdir */ - { 0, (sy_call_t *)linux_bdflush, AUE_BDFLUSH }, /* 134 = linux_bdflush */ - { AS(linux_sysfs_args), (sy_call_t *)linux_sysfs, AUE_NULL }, /* 135 = linux_sysfs */ - { AS(linux_personality_args), (sy_call_t *)linux_personality, AUE_PERSONALITY }, /* 136 = linux_personality */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 137 = afs_syscall */ - { AS(linux_setfsuid16_args), (sy_call_t *)linux_setfsuid16, AUE_SETFSUID }, /* 138 = linux_setfsuid16 */ - { AS(linux_setfsgid16_args), (sy_call_t *)linux_setfsgid16, AUE_SETFSGID }, /* 139 = linux_setfsgid16 */ - { AS(linux_llseek_args), (sy_call_t *)linux_llseek, AUE_LSEEK }, /* 140 = linux_llseek */ - { AS(linux_getdents_args), (sy_call_t *)linux_getdents, AUE_O_GETDENTS }, /* 141 = linux_getdents */ - { AS(linux_select_args), (sy_call_t *)linux_select, AUE_SELECT }, /* 142 = linux_select */ - { AS(flock_args), (sy_call_t *)flock, AUE_FLOCK }, /* 143 = flock */ - { AS(linux_msync_args), (sy_call_t *)linux_msync, AUE_MSYNC }, /* 144 = linux_msync */ - { AS(readv_args), (sy_call_t *)readv, AUE_READV }, /* 145 = readv */ - { AS(writev_args), (sy_call_t *)writev, AUE_WRITEV }, /* 146 = writev */ - { AS(linux_getsid_args), (sy_call_t *)linux_getsid, AUE_GETSID }, /* 147 = linux_getsid */ - { AS(linux_fdatasync_args), (sy_call_t *)linux_fdatasync, AUE_NULL }, /* 148 = linux_fdatasync */ - { AS(linux_sysctl_args), (sy_call_t *)linux_sysctl, AUE_SYSCTL }, /* 149 = linux_sysctl */ - { AS(mlock_args), (sy_call_t *)mlock, AUE_MLOCK }, /* 150 = mlock */ - { AS(munlock_args), (sy_call_t *)munlock, AUE_MUNLOCK }, /* 151 = munlock */ - { AS(mlockall_args), (sy_call_t *)mlockall, AUE_MLOCKALL }, /* 152 = mlockall */ - { 0, (sy_call_t *)munlockall, AUE_MUNLOCKALL }, /* 153 = munlockall */ - { AS(sched_setparam_args), (sy_call_t *)sched_setparam, AUE_SCHED_SETPARAM }, /* 154 = sched_setparam */ - { AS(sched_getparam_args), (sy_call_t *)sched_getparam, AUE_SCHED_GETPARAM }, /* 155 = sched_getparam */ - { AS(linux_sched_setscheduler_args), (sy_call_t *)linux_sched_setscheduler, AUE_SCHED_SETSCHEDULER }, /* 156 = linux_sched_setscheduler */ - { AS(linux_sched_getscheduler_args), (sy_call_t *)linux_sched_getscheduler, AUE_SCHED_GETSCHEDULER }, /* 157 = linux_sched_getscheduler */ - { 0, (sy_call_t *)sched_yield, AUE_NULL }, /* 158 = sched_yield */ - { AS(linux_sched_get_priority_max_args), (sy_call_t *)linux_sched_get_priority_max, AUE_SCHED_GET_PRIORITY_MAX }, /* 159 = linux_sched_get_priority_max */ - { AS(linux_sched_get_priority_min_args), (sy_call_t *)linux_sched_get_priority_min, AUE_SCHED_GET_PRIORITY_MIN }, /* 160 = linux_sched_get_priority_min */ - { AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval, AUE_SCHED_RR_GET_INTERVAL }, /* 161 = sched_rr_get_interval */ - { AS(nanosleep_args), (sy_call_t *)nanosleep, AUE_NULL }, /* 162 = nanosleep */ - { AS(linux_mremap_args), (sy_call_t *)linux_mremap, AUE_NULL }, /* 163 = linux_mremap */ - { AS(linux_setresuid16_args), (sy_call_t *)linux_setresuid16, AUE_SETRESUID }, /* 164 = linux_setresuid16 */ - { AS(linux_getresuid16_args), (sy_call_t *)linux_getresuid16, AUE_GETRESUID }, /* 165 = linux_getresuid16 */ - { 0, (sy_call_t *)linux_vm86, AUE_NULL }, /* 166 = linux_vm86 */ - { 0, (sy_call_t *)linux_query_module, AUE_NULL }, /* 167 = linux_query_module */ - { AS(poll_args), (sy_call_t *)poll, AUE_POLL }, /* 168 = poll */ - { 0, (sy_call_t *)linux_nfsservctl, AUE_NULL }, /* 169 = linux_nfsservctl */ - { AS(linux_setresgid16_args), (sy_call_t *)linux_setresgid16, AUE_SETRESGID }, /* 170 = linux_setresgid16 */ - { AS(linux_getresgid16_args), (sy_call_t *)linux_getresgid16, AUE_GETRESGID }, /* 171 = linux_getresgid16 */ - { 0, (sy_call_t *)linux_prctl, AUE_PRCTL }, /* 172 = linux_prctl */ - { AS(linux_rt_sigreturn_args), (sy_call_t *)linux_rt_sigreturn, AUE_NULL }, /* 173 = linux_rt_sigreturn */ - { AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction, AUE_NULL }, /* 174 = linux_rt_sigaction */ - { AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask, AUE_NULL }, /* 175 = linux_rt_sigprocmask */ - { AS(linux_rt_sigpending_args), (sy_call_t *)linux_rt_sigpending, AUE_NULL }, /* 176 = linux_rt_sigpending */ - { 0, (sy_call_t *)linux_rt_sigtimedwait, AUE_NULL }, /* 177 = linux_rt_sigtimedwait */ - { 0, (sy_call_t *)linux_rt_sigqueueinfo, AUE_NULL }, /* 178 = linux_rt_sigqueueinfo */ - { AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend, AUE_NULL }, /* 179 = linux_rt_sigsuspend */ - { AS(linux_pread_args), (sy_call_t *)linux_pread, AUE_PREAD }, /* 180 = linux_pread */ - { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite, AUE_PWRITE }, /* 181 = linux_pwrite */ - { AS(linux_chown16_args), (sy_call_t *)linux_chown16, AUE_CHOWN }, /* 182 = linux_chown16 */ - { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd, AUE_GETCWD }, /* 183 = linux_getcwd */ - { 0, (sy_call_t *)linux_capget, AUE_CAPGET }, /* 184 = linux_capget */ - { 0, (sy_call_t *)linux_capset, AUE_CAPSET }, /* 185 = linux_capset */ - { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack, AUE_NULL }, /* 186 = linux_sigaltstack */ - { 0, (sy_call_t *)linux_sendfile, AUE_SENDFILE }, /* 187 = linux_sendfile */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 188 = getpmsg */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 189 = putpmsg */ - { 0, (sy_call_t *)linux_vfork, AUE_VFORK }, /* 190 = linux_vfork */ - { AS(linux_getrlimit_args), (sy_call_t *)linux_getrlimit, AUE_GETRLIMIT }, /* 191 = linux_getrlimit */ - { AS(linux_mmap2_args), (sy_call_t *)linux_mmap2, AUE_MMAP }, /* 192 = linux_mmap2 */ - { AS(linux_truncate64_args), (sy_call_t *)linux_truncate64, AUE_TRUNCATE }, /* 193 = linux_truncate64 */ - { AS(linux_ftruncate64_args), (sy_call_t *)linux_ftruncate64, AUE_FTRUNCATE }, /* 194 = linux_ftruncate64 */ - { AS(linux_stat64_args), (sy_call_t *)linux_stat64, AUE_STAT }, /* 195 = linux_stat64 */ - { AS(linux_lstat64_args), (sy_call_t *)linux_lstat64, AUE_LSTAT }, /* 196 = linux_lstat64 */ - { AS(linux_fstat64_args), (sy_call_t *)linux_fstat64, AUE_FSTAT }, /* 197 = linux_fstat64 */ - { AS(linux_lchown_args), (sy_call_t *)linux_lchown, AUE_LCHOWN }, /* 198 = linux_lchown */ - { 0, (sy_call_t *)linux_getuid, AUE_GETUID }, /* 199 = linux_getuid */ - { 0, (sy_call_t *)linux_getgid, AUE_GETGID }, /* 200 = linux_getgid */ - { 0, (sy_call_t *)geteuid, AUE_GETEUID }, /* 201 = geteuid */ - { 0, (sy_call_t *)getegid, AUE_GETEGID }, /* 202 = getegid */ - { AS(setreuid_args), (sy_call_t *)setreuid, AUE_SETREUID }, /* 203 = setreuid */ - { AS(setregid_args), (sy_call_t *)setregid, AUE_SETREGID }, /* 204 = setregid */ - { AS(linux_getgroups_args), (sy_call_t *)linux_getgroups, AUE_GETGROUPS }, /* 205 = linux_getgroups */ - { AS(linux_setgroups_args), (sy_call_t *)linux_setgroups, AUE_SETGROUPS }, /* 206 = linux_setgroups */ - { AS(fchown_args), (sy_call_t *)fchown, AUE_NULL }, /* 207 = fchown */ - { AS(setresuid_args), (sy_call_t *)setresuid, AUE_SETRESUID }, /* 208 = setresuid */ - { AS(getresuid_args), (sy_call_t *)getresuid, AUE_GETRESUID }, /* 209 = getresuid */ - { AS(setresgid_args), (sy_call_t *)setresgid, AUE_SETRESGID }, /* 210 = setresgid */ - { AS(getresgid_args), (sy_call_t *)getresgid, AUE_GETRESGID }, /* 211 = getresgid */ - { AS(linux_chown_args), (sy_call_t *)linux_chown, AUE_CHOWN }, /* 212 = linux_chown */ - { AS(setuid_args), (sy_call_t *)setuid, AUE_SETUID }, /* 213 = setuid */ - { AS(setgid_args), (sy_call_t *)setgid, AUE_SETGID }, /* 214 = setgid */ - { AS(linux_setfsuid_args), (sy_call_t *)linux_setfsuid, AUE_SETFSUID }, /* 215 = linux_setfsuid */ - { AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid, AUE_SETFSGID }, /* 216 = linux_setfsgid */ - { AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root, AUE_PIVOT_ROOT }, /* 217 = linux_pivot_root */ - { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE }, /* 218 = linux_mincore */ - { AS(madvise_args), (sy_call_t *)madvise, AUE_MADVISE }, /* 219 = madvise */ - { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_O_GETDENTS }, /* 220 = linux_getdents64 */ - { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64, AUE_FCNTL }, /* 221 = linux_fcntl64 */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 222 = */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 223 = */ - { 0, (sy_call_t *)linux_gettid, AUE_NULL }, /* 224 = linux_gettid */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 225 = linux_readahead */ - { 0, (sy_call_t *)linux_setxattr, AUE_NULL }, /* 226 = linux_setxattr */ - { 0, (sy_call_t *)linux_lsetxattr, AUE_NULL }, /* 227 = linux_lsetxattr */ - { 0, (sy_call_t *)linux_fsetxattr, AUE_NULL }, /* 228 = linux_fsetxattr */ - { 0, (sy_call_t *)linux_getxattr, AUE_NULL }, /* 229 = linux_getxattr */ - { 0, (sy_call_t *)linux_lgetxattr, AUE_NULL }, /* 230 = linux_lgetxattr */ - { 0, (sy_call_t *)linux_fgetxattr, AUE_NULL }, /* 231 = linux_fgetxattr */ - { 0, (sy_call_t *)linux_listxattr, AUE_NULL }, /* 232 = linux_listxattr */ - { 0, (sy_call_t *)linux_llistxattr, AUE_NULL }, /* 233 = linux_llistxattr */ - { 0, (sy_call_t *)linux_flistxattr, AUE_NULL }, /* 234 = linux_flistxattr */ - { 0, (sy_call_t *)linux_removexattr, AUE_NULL }, /* 235 = linux_removexattr */ - { 0, (sy_call_t *)linux_lremovexattr, AUE_NULL }, /* 236 = linux_lremovexattr */ - { 0, (sy_call_t *)linux_fremovexattr, AUE_NULL }, /* 237 = linux_fremovexattr */ - { AS(linux_tkill_args), (sy_call_t *)linux_tkill, AUE_NULL }, /* 238 = linux_tkill */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 239 = linux_sendfile64 */ - { AS(linux_sys_futex_args), (sy_call_t *)linux_sys_futex, AUE_NULL }, /* 240 = linux_sys_futex */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 241 = linux_sched_setaffinity */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 242 = linux_sched_getaffinity */ - { AS(linux_set_thread_area_args), (sy_call_t *)linux_set_thread_area, AUE_NULL }, /* 243 = linux_set_thread_area */ - { AS(linux_get_thread_area_args), (sy_call_t *)linux_get_thread_area, AUE_NULL }, /* 244 = linux_get_thread_area */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 245 = linux_io_setup */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 246 = linux_io_destroy */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 247 = linux_io_getevents */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 248 = linux_io_submit */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 249 = linux_io_cancel */ - { 0, (sy_call_t *)linux_fadvise64, AUE_NULL }, /* 250 = linux_fadvise64 */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 251 = */ - { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT }, /* 252 = linux_exit_group */ - { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL }, /* 253 = linux_lookup_dcookie */ - { 0, (sy_call_t *)linux_epoll_create, AUE_NULL }, /* 254 = linux_epoll_create */ - { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL }, /* 255 = linux_epoll_ctl */ - { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL }, /* 256 = linux_epoll_wait */ - { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL }, /* 257 = linux_remap_file_pages */ - { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL }, /* 258 = linux_set_tid_address */ - { AS(linux_timer_create_args), (sy_call_t *)linux_timer_create, AUE_NULL }, /* 259 = linux_timer_create */ - { AS(linux_timer_settime_args), (sy_call_t *)linux_timer_settime, AUE_NULL }, /* 260 = linux_timer_settime */ - { AS(linux_timer_gettime_args), (sy_call_t *)linux_timer_gettime, AUE_NULL }, /* 261 = linux_timer_gettime */ - { AS(linux_timer_getoverrun_args), (sy_call_t *)linux_timer_getoverrun, AUE_NULL }, /* 262 = linux_timer_getoverrun */ - { AS(linux_timer_delete_args), (sy_call_t *)linux_timer_delete, AUE_NULL }, /* 263 = linux_timer_delete */ - { AS(linux_clock_settime_args), (sy_call_t *)linux_clock_settime, AUE_CLOCK_SETTIME }, /* 264 = linux_clock_settime */ - { AS(linux_clock_gettime_args), (sy_call_t *)linux_clock_gettime, AUE_NULL }, /* 265 = linux_clock_gettime */ - { AS(linux_clock_getres_args), (sy_call_t *)linux_clock_getres, AUE_NULL }, /* 266 = linux_clock_getres */ - { AS(linux_clock_nanosleep_args), (sy_call_t *)linux_clock_nanosleep, AUE_NULL }, /* 267 = linux_clock_nanosleep */ - { 0, (sy_call_t *)linux_statfs64, AUE_NULL }, /* 268 = linux_statfs64 */ - { 0, (sy_call_t *)linux_fstatfs64, AUE_NULL }, /* 269 = linux_fstatfs64 */ - { 0, (sy_call_t *)linux_tgkill, AUE_NULL }, /* 270 = linux_tgkill */ - { 0, (sy_call_t *)linux_utimes, AUE_NULL }, /* 271 = linux_utimes */ - { 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL }, /* 272 = linux_fadvise64_64 */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 273 = */ - { 0, (sy_call_t *)linux_mbind, AUE_NULL }, /* 274 = linux_mbind */ - { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL }, /* 275 = linux_get_mempolicy */ - { 0, (sy_call_t *)linux_set_mempolicy, AUE_NULL }, /* 276 = linux_set_mempolicy */ - { AS(linux_mq_open_args), (sy_call_t *)linux_mq_open, AUE_NULL }, /* 277 = linux_mq_open */ - { AS(linux_mq_unlink_args), (sy_call_t *)linux_mq_unlink, AUE_NULL }, /* 278 = linux_mq_unlink */ - { AS(linux_mq_timedsend_args), (sy_call_t *)linux_mq_timedsend, AUE_NULL }, /* 279 = linux_mq_timedsend */ - { AS(linux_mq_timedreceive_args), (sy_call_t *)linux_mq_timedreceive, AUE_NULL }, /* 280 = linux_mq_timedreceive */ - { AS(linux_mq_notify_args), (sy_call_t *)linux_mq_notify, AUE_NULL }, /* 281 = linux_mq_notify */ - { AS(linux_mq_getsetattr_args), (sy_call_t *)linux_mq_getsetattr, AUE_NULL }, /* 282 = linux_mq_getsetattr */ - { 0, (sy_call_t *)linux_kexec_load, AUE_NULL }, /* 283 = linux_kexec_load */ - { 0, (sy_call_t *)linux_waitid, AUE_NULL }, /* 284 = linux_waitid */ - { 0, (sy_call_t *)nosys, AUE_NULL }, /* 285 = */ - { 0, (sy_call_t *)linux_add_key, AUE_NULL }, /* 286 = linux_add_key */ - { 0, (sy_call_t *)linux_request_key, AUE_NULL }, /* 287 = linux_request_key */ - { 0, (sy_call_t *)linux_keyctl, AUE_NULL }, /* 288 = linux_keyctl */ - { 0, (sy_call_t *)linux_ioprio_set, AUE_NULL }, /* 289 = linux_ioprio_set */ - { 0, (sy_call_t *)linux_ioprio_get, AUE_NULL }, /* 290 = linux_ioprio_get */ - { 0, (sy_call_t *)linux_inotify_init, AUE_NULL }, /* 291 = linux_inotify_init */ - { 0, (sy_call_t *)linux_inotify_add_watch, AUE_NULL }, /* 292 = linux_inotify_add_watch */ - { 0, (sy_call_t *)linux_inotify_rm_watch, AUE_NULL }, /* 293 = linux_inotify_rm_watch */ - { 0, (sy_call_t *)linux_migrate_pages, AUE_NULL }, /* 294 = linux_migrate_pages */ - { 0, (sy_call_t *)linux_openat, AUE_NULL }, /* 295 = linux_openat */ - { 0, (sy_call_t *)linux_mkdirat, AUE_NULL }, /* 296 = linux_mkdirat */ - { 0, (sy_call_t *)linux_mknodat, AUE_NULL }, /* 297 = linux_mknodat */ - { 0, (sy_call_t *)linux_fchownat, AUE_NULL }, /* 298 = linux_fchownat */ - { 0, (sy_call_t *)linux_futimesat, AUE_NULL }, /* 299 = linux_futimesat */ - { 0, (sy_call_t *)linux_fstatat64, AUE_NULL }, /* 300 = linux_fstatat64 */ - { 0, (sy_call_t *)linux_unlinkat, AUE_NULL }, /* 301 = linux_unlinkat */ - { 0, (sy_call_t *)linux_renameat, AUE_NULL }, /* 302 = linux_renameat */ - { 0, (sy_call_t *)linux_linkat, AUE_NULL }, /* 303 = linux_linkat */ - { 0, (sy_call_t *)linux_symlinkat, AUE_NULL }, /* 304 = linux_symlinkat */ - { 0, (sy_call_t *)linux_readlinkat, AUE_NULL }, /* 305 = linux_readlinkat */ - { 0, (sy_call_t *)linux_fchmodat, AUE_NULL }, /* 306 = linux_fchmodat */ - { 0, (sy_call_t *)linux_faccessat, AUE_NULL }, /* 307 = linux_faccessat */ - { 0, (sy_call_t *)linux_pselect6, AUE_NULL }, /* 308 = linux_pselect6 */ - { 0, (sy_call_t *)linux_ppoll, AUE_NULL }, /* 309 = linux_ppoll */ - { 0, (sy_call_t *)linux_unshare, AUE_NULL }, /* 310 = linux_unshare */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 0 = setup */ + { AS(sys_exit_args), (sy_call_t *)sys_exit, AUE_EXIT, NULL, 0, 0 }, /* 1 = exit */ + { 0, (sy_call_t *)linux_fork, AUE_FORK, NULL, 0, 0 }, /* 2 = linux_fork */ + { AS(read_args), (sy_call_t *)read, AUE_NULL, NULL, 0, 0 }, /* 3 = read */ + { AS(write_args), (sy_call_t *)write, AUE_NULL, NULL, 0, 0 }, /* 4 = write */ + { AS(linux_open_args), (sy_call_t *)linux_open, AUE_OPEN_RWTC, NULL, 0, 0 }, /* 5 = linux_open */ + { AS(close_args), (sy_call_t *)close, AUE_CLOSE, NULL, 0, 0 }, /* 6 = close */ + { AS(linux_waitpid_args), (sy_call_t *)linux_waitpid, AUE_WAIT4, NULL, 0, 0 }, /* 7 = linux_waitpid */ + { AS(linux_creat_args), (sy_call_t *)linux_creat, AUE_O_CREAT, NULL, 0, 0 }, /* 8 = linux_creat */ + { AS(linux_link_args), (sy_call_t *)linux_link, AUE_LINK, NULL, 0, 0 }, /* 9 = linux_link */ + { AS(linux_unlink_args), (sy_call_t *)linux_unlink, AUE_UNLINK, NULL, 0, 0 }, /* 10 = linux_unlink */ + { AS(linux_execve_args), (sy_call_t *)linux_execve, AUE_EXECVE, NULL, 0, 0 }, /* 11 = linux_execve */ + { AS(linux_chdir_args), (sy_call_t *)linux_chdir, AUE_CHDIR, NULL, 0, 0 }, /* 12 = linux_chdir */ + { AS(linux_time_args), (sy_call_t *)linux_time, AUE_NULL, NULL, 0, 0 }, /* 13 = linux_time */ + { AS(linux_mknod_args), (sy_call_t *)linux_mknod, AUE_MKNOD, NULL, 0, 0 }, /* 14 = linux_mknod */ + { AS(linux_chmod_args), (sy_call_t *)linux_chmod, AUE_CHMOD, NULL, 0, 0 }, /* 15 = linux_chmod */ + { AS(linux_lchown16_args), (sy_call_t *)linux_lchown16, AUE_LCHOWN, NULL, 0, 0 }, /* 16 = linux_lchown16 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 17 = break */ + { AS(linux_stat_args), (sy_call_t *)linux_stat, AUE_STAT, NULL, 0, 0 }, /* 18 = linux_stat */ + { AS(linux_lseek_args), (sy_call_t *)linux_lseek, AUE_LSEEK, NULL, 0, 0 }, /* 19 = linux_lseek */ + { 0, (sy_call_t *)linux_getpid, AUE_GETPID, NULL, 0, 0 }, /* 20 = linux_getpid */ + { AS(linux_mount_args), (sy_call_t *)linux_mount, AUE_MOUNT, NULL, 0, 0 }, /* 21 = linux_mount */ + { AS(linux_oldumount_args), (sy_call_t *)linux_oldumount, AUE_UMOUNT, NULL, 0, 0 }, /* 22 = linux_oldumount */ + { AS(linux_setuid16_args), (sy_call_t *)linux_setuid16, AUE_SETUID, NULL, 0, 0 }, /* 23 = linux_setuid16 */ + { 0, (sy_call_t *)linux_getuid16, AUE_GETUID, NULL, 0, 0 }, /* 24 = linux_getuid16 */ + { 0, (sy_call_t *)linux_stime, AUE_SETTIMEOFDAY, NULL, 0, 0 }, /* 25 = linux_stime */ + { AS(linux_ptrace_args), (sy_call_t *)linux_ptrace, AUE_PTRACE, NULL, 0, 0 }, /* 26 = linux_ptrace */ + { AS(linux_alarm_args), (sy_call_t *)linux_alarm, AUE_NULL, NULL, 0, 0 }, /* 27 = linux_alarm */ + { AS(linux_fstat_args), (sy_call_t *)linux_fstat, AUE_FSTAT, NULL, 0, 0 }, /* 28 = linux_fstat */ + { 0, (sy_call_t *)linux_pause, AUE_NULL, NULL, 0, 0 }, /* 29 = linux_pause */ + { AS(linux_utime_args), (sy_call_t *)linux_utime, AUE_UTIME, NULL, 0, 0 }, /* 30 = linux_utime */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 31 = stty */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 32 = gtty */ + { AS(linux_access_args), (sy_call_t *)linux_access, AUE_ACCESS, NULL, 0, 0 }, /* 33 = linux_access */ + { AS(linux_nice_args), (sy_call_t *)linux_nice, AUE_NICE, NULL, 0, 0 }, /* 34 = linux_nice */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 35 = ftime */ + { 0, (sy_call_t *)sync, AUE_SYNC, NULL, 0, 0 }, /* 36 = sync */ + { AS(linux_kill_args), (sy_call_t *)linux_kill, AUE_KILL, NULL, 0, 0 }, /* 37 = linux_kill */ + { AS(linux_rename_args), (sy_call_t *)linux_rename, AUE_RENAME, NULL, 0, 0 }, /* 38 = linux_rename */ + { AS(linux_mkdir_args), (sy_call_t *)linux_mkdir, AUE_MKDIR, NULL, 0, 0 }, /* 39 = linux_mkdir */ + { AS(linux_rmdir_args), (sy_call_t *)linux_rmdir, AUE_RMDIR, NULL, 0, 0 }, /* 40 = linux_rmdir */ + { AS(dup_args), (sy_call_t *)dup, AUE_DUP, NULL, 0, 0 }, /* 41 = dup */ + { AS(linux_pipe_args), (sy_call_t *)linux_pipe, AUE_PIPE, NULL, 0, 0 }, /* 42 = linux_pipe */ + { AS(linux_times_args), (sy_call_t *)linux_times, AUE_NULL, NULL, 0, 0 }, /* 43 = linux_times */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 44 = prof */ + { AS(linux_brk_args), (sy_call_t *)linux_brk, AUE_NULL, NULL, 0, 0 }, /* 45 = linux_brk */ + { AS(linux_setgid16_args), (sy_call_t *)linux_setgid16, AUE_SETGID, NULL, 0, 0 }, /* 46 = linux_setgid16 */ + { 0, (sy_call_t *)linux_getgid16, AUE_GETGID, NULL, 0, 0 }, /* 47 = linux_getgid16 */ + { AS(linux_signal_args), (sy_call_t *)linux_signal, AUE_NULL, NULL, 0, 0 }, /* 48 = linux_signal */ + { 0, (sy_call_t *)linux_geteuid16, AUE_GETEUID, NULL, 0, 0 }, /* 49 = linux_geteuid16 */ + { 0, (sy_call_t *)linux_getegid16, AUE_GETEGID, NULL, 0, 0 }, /* 50 = linux_getegid16 */ + { AS(acct_args), (sy_call_t *)acct, AUE_ACCT, NULL, 0, 0 }, /* 51 = acct */ + { AS(linux_umount_args), (sy_call_t *)linux_umount, AUE_UMOUNT, NULL, 0, 0 }, /* 52 = linux_umount */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 53 = lock */ + { AS(linux_ioctl_args), (sy_call_t *)linux_ioctl, AUE_IOCTL, NULL, 0, 0 }, /* 54 = linux_ioctl */ + { AS(linux_fcntl_args), (sy_call_t *)linux_fcntl, AUE_FCNTL, NULL, 0, 0 }, /* 55 = linux_fcntl */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 56 = mpx */ + { AS(setpgid_args), (sy_call_t *)setpgid, AUE_SETPGRP, NULL, 0, 0 }, /* 57 = setpgid */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 58 = ulimit */ + { 0, (sy_call_t *)linux_olduname, AUE_NULL, NULL, 0, 0 }, /* 59 = linux_olduname */ + { AS(umask_args), (sy_call_t *)umask, AUE_UMASK, NULL, 0, 0 }, /* 60 = umask */ + { AS(chroot_args), (sy_call_t *)chroot, AUE_CHROOT, NULL, 0, 0 }, /* 61 = chroot */ + { AS(linux_ustat_args), (sy_call_t *)linux_ustat, AUE_NULL, NULL, 0, 0 }, /* 62 = linux_ustat */ + { AS(dup2_args), (sy_call_t *)dup2, AUE_DUP2, NULL, 0, 0 }, /* 63 = dup2 */ + { 0, (sy_call_t *)linux_getppid, AUE_GETPPID, NULL, 0, 0 }, /* 64 = linux_getppid */ + { 0, (sy_call_t *)getpgrp, AUE_GETPGRP, NULL, 0, 0 }, /* 65 = getpgrp */ + { 0, (sy_call_t *)setsid, AUE_SETSID, NULL, 0, 0 }, /* 66 = setsid */ + { AS(linux_sigaction_args), (sy_call_t *)linux_sigaction, AUE_NULL, NULL, 0, 0 }, /* 67 = linux_sigaction */ + { 0, (sy_call_t *)linux_sgetmask, AUE_NULL, NULL, 0, 0 }, /* 68 = linux_sgetmask */ + { AS(linux_ssetmask_args), (sy_call_t *)linux_ssetmask, AUE_NULL, NULL, 0, 0 }, /* 69 = linux_ssetmask */ + { AS(linux_setreuid16_args), (sy_call_t *)linux_setreuid16, AUE_SETREUID, NULL, 0, 0 }, /* 70 = linux_setreuid16 */ + { AS(linux_setregid16_args), (sy_call_t *)linux_setregid16, AUE_SETREGID, NULL, 0, 0 }, /* 71 = linux_setregid16 */ + { AS(linux_sigsuspend_args), (sy_call_t *)linux_sigsuspend, AUE_NULL, NULL, 0, 0 }, /* 72 = linux_sigsuspend */ + { AS(linux_sigpending_args), (sy_call_t *)linux_sigpending, AUE_NULL, NULL, 0, 0 }, /* 73 = linux_sigpending */ + { AS(linux_sethostname_args), (sy_call_t *)linux_sethostname, AUE_SYSCTL, NULL, 0, 0 }, /* 74 = linux_sethostname */ + { AS(linux_setrlimit_args), (sy_call_t *)linux_setrlimit, AUE_SETRLIMIT, NULL, 0, 0 }, /* 75 = linux_setrlimit */ + { AS(linux_old_getrlimit_args), (sy_call_t *)linux_old_getrlimit, AUE_GETRLIMIT, NULL, 0, 0 }, /* 76 = linux_old_getrlimit */ + { AS(getrusage_args), (sy_call_t *)getrusage, AUE_GETRUSAGE, NULL, 0, 0 }, /* 77 = getrusage */ + { AS(gettimeofday_args), (sy_call_t *)gettimeofday, AUE_NULL, NULL, 0, 0 }, /* 78 = gettimeofday */ + { AS(settimeofday_args), (sy_call_t *)settimeofday, AUE_SETTIMEOFDAY, NULL, 0, 0 }, /* 79 = settimeofday */ + { AS(linux_getgroups16_args), (sy_call_t *)linux_getgroups16, AUE_GETGROUPS, NULL, 0, 0 }, /* 80 = linux_getgroups16 */ + { AS(linux_setgroups16_args), (sy_call_t *)linux_setgroups16, AUE_SETGROUPS, NULL, 0, 0 }, /* 81 = linux_setgroups16 */ + { AS(linux_old_select_args), (sy_call_t *)linux_old_select, AUE_SELECT, NULL, 0, 0 }, /* 82 = linux_old_select */ + { AS(linux_symlink_args), (sy_call_t *)linux_symlink, AUE_SYMLINK, NULL, 0, 0 }, /* 83 = linux_symlink */ + { AS(linux_lstat_args), (sy_call_t *)linux_lstat, AUE_LSTAT, NULL, 0, 0 }, /* 84 = linux_lstat */ + { AS(linux_readlink_args), (sy_call_t *)linux_readlink, AUE_READLINK, NULL, 0, 0 }, /* 85 = linux_readlink */ + { AS(linux_uselib_args), (sy_call_t *)linux_uselib, AUE_USELIB, NULL, 0, 0 }, /* 86 = linux_uselib */ + { AS(swapon_args), (sy_call_t *)swapon, AUE_SWAPON, NULL, 0, 0 }, /* 87 = swapon */ + { AS(linux_reboot_args), (sy_call_t *)linux_reboot, AUE_REBOOT, NULL, 0, 0 }, /* 88 = linux_reboot */ + { AS(linux_readdir_args), (sy_call_t *)linux_readdir, AUE_O_GETDENTS, NULL, 0, 0 }, /* 89 = linux_readdir */ + { AS(linux_mmap_args), (sy_call_t *)linux_mmap, AUE_MMAP, NULL, 0, 0 }, /* 90 = linux_mmap */ + { AS(munmap_args), (sy_call_t *)munmap, AUE_MUNMAP, NULL, 0, 0 }, /* 91 = munmap */ + { AS(linux_truncate_args), (sy_call_t *)linux_truncate, AUE_TRUNCATE, NULL, 0, 0 }, /* 92 = linux_truncate */ + { AS(linux_ftruncate_args), (sy_call_t *)linux_ftruncate, AUE_FTRUNCATE, NULL, 0, 0 }, /* 93 = linux_ftruncate */ + { AS(fchmod_args), (sy_call_t *)fchmod, AUE_FCHMOD, NULL, 0, 0 }, /* 94 = fchmod */ + { AS(fchown_args), (sy_call_t *)fchown, AUE_FCHOWN, NULL, 0, 0 }, /* 95 = fchown */ + { AS(linux_getpriority_args), (sy_call_t *)linux_getpriority, AUE_GETPRIORITY, NULL, 0, 0 }, /* 96 = linux_getpriority */ + { AS(setpriority_args), (sy_call_t *)setpriority, AUE_SETPRIORITY, NULL, 0, 0 }, /* 97 = setpriority */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 98 = profil */ + { AS(linux_statfs_args), (sy_call_t *)linux_statfs, AUE_STATFS, NULL, 0, 0 }, /* 99 = linux_statfs */ + { AS(linux_fstatfs_args), (sy_call_t *)linux_fstatfs, AUE_FSTATFS, NULL, 0, 0 }, /* 100 = linux_fstatfs */ + { AS(linux_ioperm_args), (sy_call_t *)linux_ioperm, AUE_NULL, NULL, 0, 0 }, /* 101 = linux_ioperm */ + { AS(linux_socketcall_args), (sy_call_t *)linux_socketcall, AUE_NULL, NULL, 0, 0 }, /* 102 = linux_socketcall */ + { AS(linux_syslog_args), (sy_call_t *)linux_syslog, AUE_NULL, NULL, 0, 0 }, /* 103 = linux_syslog */ + { AS(linux_setitimer_args), (sy_call_t *)linux_setitimer, AUE_SETITIMER, NULL, 0, 0 }, /* 104 = linux_setitimer */ + { AS(linux_getitimer_args), (sy_call_t *)linux_getitimer, AUE_GETITIMER, NULL, 0, 0 }, /* 105 = linux_getitimer */ + { AS(linux_newstat_args), (sy_call_t *)linux_newstat, AUE_STAT, NULL, 0, 0 }, /* 106 = linux_newstat */ + { AS(linux_newlstat_args), (sy_call_t *)linux_newlstat, AUE_LSTAT, NULL, 0, 0 }, /* 107 = linux_newlstat */ + { AS(linux_newfstat_args), (sy_call_t *)linux_newfstat, AUE_FSTAT, NULL, 0, 0 }, /* 108 = linux_newfstat */ + { 0, (sy_call_t *)linux_uname, AUE_NULL, NULL, 0, 0 }, /* 109 = linux_uname */ + { AS(linux_iopl_args), (sy_call_t *)linux_iopl, AUE_NULL, NULL, 0, 0 }, /* 110 = linux_iopl */ + { 0, (sy_call_t *)linux_vhangup, AUE_NULL, NULL, 0, 0 }, /* 111 = linux_vhangup */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 112 = idle */ + { 0, (sy_call_t *)linux_vm86old, AUE_NULL, NULL, 0, 0 }, /* 113 = linux_vm86old */ + { AS(linux_wait4_args), (sy_call_t *)linux_wait4, AUE_WAIT4, NULL, 0, 0 }, /* 114 = linux_wait4 */ + { 0, (sy_call_t *)linux_swapoff, AUE_SWAPOFF, NULL, 0, 0 }, /* 115 = linux_swapoff */ + { AS(linux_sysinfo_args), (sy_call_t *)linux_sysinfo, AUE_NULL, NULL, 0, 0 }, /* 116 = linux_sysinfo */ + { AS(linux_ipc_args), (sy_call_t *)linux_ipc, AUE_NULL, NULL, 0, 0 }, /* 117 = linux_ipc */ + { AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC, NULL, 0, 0 }, /* 118 = fsync */ + { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn, AUE_SIGRETURN, NULL, 0, 0 }, /* 119 = linux_sigreturn */ + { AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK, NULL, 0, 0 }, /* 120 = linux_clone */ + { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 121 = setdomainname */ + { AS(linux_newuname_args), (sy_call_t *)linux_newuname, AUE_NULL, NULL, 0, 0 }, /* 122 = linux_newuname */ + { AS(linux_modify_ldt_args), (sy_call_t *)linux_modify_ldt, AUE_NULL, NULL, 0, 0 }, /* 123 = linux_modify_ldt */ + { 0, (sy_call_t *)linux_adjtimex, AUE_ADJTIME, NULL, 0, 0 }, /* 124 = linux_adjtimex */ + { AS(mprotect_args), (sy_call_t *)mprotect, AUE_MPROTECT, NULL, 0, 0 }, /* 125 = mprotect */ + { AS(linux_sigprocmask_args), (sy_call_t *)linux_sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0 }, /* 126 = linux_sigprocmask */ + { 0, (sy_call_t *)linux_create_module, AUE_NULL, NULL, 0, 0 }, /* 127 = linux_create_module */ + { 0, (sy_call_t *)linux_init_module, AUE_NULL, NULL, 0, 0 }, /* 128 = linux_init_module */ + { 0, (sy_call_t *)linux_delete_module, AUE_NULL, NULL, 0, 0 }, /* 129 = linux_delete_module */ + { 0, (sy_call_t *)linux_get_kernel_syms, AUE_NULL, NULL, 0, 0 }, /* 130 = linux_get_kernel_syms */ + { 0, (sy_call_t *)linux_quotactl, AUE_QUOTACTL, NULL, 0, 0 }, /* 131 = linux_quotactl */ + { AS(getpgid_args), (sy_call_t *)getpgid, AUE_GETPGID, NULL, 0, 0 }, /* 132 = getpgid */ + { AS(fchdir_args), (sy_call_t *)fchdir, AUE_FCHDIR, NULL, 0, 0 }, /* 133 = fchdir */ + { 0, (sy_call_t *)linux_bdflush, AUE_BDFLUSH, NULL, 0, 0 }, /* 134 = linux_bdflush */ + { AS(linux_sysfs_args), (sy_call_t *)linux_sysfs, AUE_NULL, NULL, 0, 0 }, /* 135 = linux_sysfs */ + { AS(linux_personality_args), (sy_call_t *)linux_personality, AUE_PERSONALITY, NULL, 0, 0 }, /* 136 = linux_personality */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 137 = afs_syscall */ + { AS(linux_setfsuid16_args), (sy_call_t *)linux_setfsuid16, AUE_SETFSUID, NULL, 0, 0 }, /* 138 = linux_setfsuid16 */ + { AS(linux_setfsgid16_args), (sy_call_t *)linux_setfsgid16, AUE_SETFSGID, NULL, 0, 0 }, /* 139 = linux_setfsgid16 */ + { AS(linux_llseek_args), (sy_call_t *)linux_llseek, AUE_LSEEK, NULL, 0, 0 }, /* 140 = linux_llseek */ + { AS(linux_getdents_args), (sy_call_t *)linux_getdents, AUE_O_GETDENTS, NULL, 0, 0 }, /* 141 = linux_getdents */ + { AS(linux_select_args), (sy_call_t *)linux_select, AUE_SELECT, NULL, 0, 0 }, /* 142 = linux_select */ + { AS(flock_args), (sy_call_t *)flock, AUE_FLOCK, NULL, 0, 0 }, /* 143 = flock */ + { AS(linux_msync_args), (sy_call_t *)linux_msync, AUE_MSYNC, NULL, 0, 0 }, /* 144 = linux_msync */ + { AS(readv_args), (sy_call_t *)readv, AUE_READV, NULL, 0, 0 }, /* 145 = readv */ + { AS(writev_args), (sy_call_t *)writev, AUE_WRITEV, NULL, 0, 0 }, /* 146 = writev */ + { AS(linux_getsid_args), (sy_call_t *)linux_getsid, AUE_GETSID, NULL, 0, 0 }, /* 147 = linux_getsid */ + { AS(linux_fdatasync_args), (sy_call_t *)linux_fdatasync, AUE_NULL, NULL, 0, 0 }, /* 148 = linux_fdatasync */ + { AS(linux_sysctl_args), (sy_call_t *)linux_sysctl, AUE_SYSCTL, NULL, 0, 0 }, /* 149 = linux_sysctl */ + { AS(mlock_args), (sy_call_t *)mlock, AUE_MLOCK, NULL, 0, 0 }, /* 150 = mlock */ + { AS(munlock_args), (sy_call_t *)munlock, AUE_MUNLOCK, NULL, 0, 0 }, /* 151 = munlock */ + { AS(mlockall_args), (sy_call_t *)mlockall, AUE_MLOCKALL, NULL, 0, 0 }, /* 152 = mlockall */ + { 0, (sy_call_t *)munlockall, AUE_MUNLOCKALL, NULL, 0, 0 }, /* 153 = munlockall */ + { AS(sched_setparam_args), (sy_call_t *)sched_setparam, AUE_SCHED_SETPARAM, NULL, 0, 0 }, /* 154 = sched_setparam */ + { AS(sched_getparam_args), (sy_call_t *)sched_getparam, AUE_SCHED_GETPARAM, NULL, 0, 0 }, /* 155 = sched_getparam */ + { AS(linux_sched_setscheduler_args), (sy_call_t *)linux_sched_setscheduler, AUE_SCHED_SETSCHEDULER, NULL, 0, 0 }, /* 156 = linux_sched_setscheduler */ + { AS(linux_sched_getscheduler_args), (sy_call_t *)linux_sched_getscheduler, AUE_SCHED_GETSCHEDULER, NULL, 0, 0 }, /* 157 = linux_sched_getscheduler */ + { 0, (sy_call_t *)sched_yield, AUE_NULL, NULL, 0, 0 }, /* 158 = sched_yield */ + { AS(linux_sched_get_priority_max_args), (sy_call_t *)linux_sched_get_priority_max, AUE_SCHED_GET_PRIORITY_MAX, NULL, 0, 0 }, /* 159 = linux_sched_get_priority_max */ + { AS(linux_sched_get_priority_min_args), (sy_call_t *)linux_sched_get_priority_min, AUE_SCHED_GET_PRIORITY_MIN, NULL, 0, 0 }, /* 160 = linux_sched_get_priority_min */ + { AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval, AUE_SCHED_RR_GET_INTERVAL, NULL, 0, 0 }, /* 161 = sched_rr_get_interval */ + { AS(nanosleep_args), (sy_call_t *)nanosleep, AUE_NULL, NULL, 0, 0 }, /* 162 = nanosleep */ + { AS(linux_mremap_args), (sy_call_t *)linux_mremap, AUE_NULL, NULL, 0, 0 }, /* 163 = linux_mremap */ + { AS(linux_setresuid16_args), (sy_call_t *)linux_setresuid16, AUE_SETRESUID, NULL, 0, 0 }, /* 164 = linux_setresuid16 */ + { AS(linux_getresuid16_args), (sy_call_t *)linux_getresuid16, AUE_GETRESUID, NULL, 0, 0 }, /* 165 = linux_getresuid16 */ + { 0, (sy_call_t *)linux_vm86, AUE_NULL, NULL, 0, 0 }, /* 166 = linux_vm86 */ + { 0, (sy_call_t *)linux_query_module, AUE_NULL, NULL, 0, 0 }, /* 167 = linux_query_module */ + { AS(poll_args), (sy_call_t *)poll, AUE_POLL, NULL, 0, 0 }, /* 168 = poll */ + { 0, (sy_call_t *)linux_nfsservctl, AUE_NULL, NULL, 0, 0 }, /* 169 = linux_nfsservctl */ + { AS(linux_setresgid16_args), (sy_call_t *)linux_setresgid16, AUE_SETRESGID, NULL, 0, 0 }, /* 170 = linux_setresgid16 */ + { AS(linux_getresgid16_args), (sy_call_t *)linux_getresgid16, AUE_GETRESGID, NULL, 0, 0 }, /* 171 = linux_getresgid16 */ + { 0, (sy_call_t *)linux_prctl, AUE_PRCTL, NULL, 0, 0 }, /* 172 = linux_prctl */ + { AS(linux_rt_sigreturn_args), (sy_call_t *)linux_rt_sigreturn, AUE_NULL, NULL, 0, 0 }, /* 173 = linux_rt_sigreturn */ + { AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction, AUE_NULL, NULL, 0, 0 }, /* 174 = linux_rt_sigaction */ + { AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask, AUE_NULL, NULL, 0, 0 }, /* 175 = linux_rt_sigprocmask */ + { AS(linux_rt_sigpending_args), (sy_call_t *)linux_rt_sigpending, AUE_NULL, NULL, 0, 0 }, /* 176 = linux_rt_sigpending */ + { 0, (sy_call_t *)linux_rt_sigtimedwait, AUE_NULL, NULL, 0, 0 }, /* 177 = linux_rt_sigtimedwait */ + { 0, (sy_call_t *)linux_rt_sigqueueinfo, AUE_NULL, NULL, 0, 0 }, /* 178 = linux_rt_sigqueueinfo */ + { AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend, AUE_NULL, NULL, 0, 0 }, /* 179 = linux_rt_sigsuspend */ + { AS(linux_pread_args), (sy_call_t *)linux_pread, AUE_PREAD, NULL, 0, 0 }, /* 180 = linux_pread */ + { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite, AUE_PWRITE, NULL, 0, 0 }, /* 181 = linux_pwrite */ + { AS(linux_chown16_args), (sy_call_t *)linux_chown16, AUE_CHOWN, NULL, 0, 0 }, /* 182 = linux_chown16 */ + { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd, AUE_GETCWD, NULL, 0, 0 }, /* 183 = linux_getcwd */ + { 0, (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0 }, /* 184 = linux_capget */ + { 0, (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0 }, /* 185 = linux_capset */ + { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack, AUE_NULL, NULL, 0, 0 }, /* 186 = linux_sigaltstack */ + { 0, (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0 }, /* 187 = linux_sendfile */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 188 = getpmsg */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 189 = putpmsg */ + { 0, (sy_call_t *)linux_vfork, AUE_VFORK, NULL, 0, 0 }, /* 190 = linux_vfork */ + { AS(linux_getrlimit_args), (sy_call_t *)linux_getrlimit, AUE_GETRLIMIT, NULL, 0, 0 }, /* 191 = linux_getrlimit */ + { AS(linux_mmap2_args), (sy_call_t *)linux_mmap2, AUE_MMAP, NULL, 0, 0 }, /* 192 = linux_mmap2 */ + { AS(linux_truncate64_args), (sy_call_t *)linux_truncate64, AUE_TRUNCATE, NULL, 0, 0 }, /* 193 = linux_truncate64 */ + { AS(linux_ftruncate64_args), (sy_call_t *)linux_ftruncate64, AUE_FTRUNCATE, NULL, 0, 0 }, /* 194 = linux_ftruncate64 */ + { AS(linux_stat64_args), (sy_call_t *)linux_stat64, AUE_STAT, NULL, 0, 0 }, /* 195 = linux_stat64 */ + { AS(linux_lstat64_args), (sy_call_t *)linux_lstat64, AUE_LSTAT, NULL, 0, 0 }, /* 196 = linux_lstat64 */ + { AS(linux_fstat64_args), (sy_call_t *)linux_fstat64, AUE_FSTAT, NULL, 0, 0 }, /* 197 = linux_fstat64 */ + { AS(linux_lchown_args), (sy_call_t *)linux_lchown, AUE_LCHOWN, NULL, 0, 0 }, /* 198 = linux_lchown */ + { 0, (sy_call_t *)linux_getuid, AUE_GETUID, NULL, 0, 0 }, /* 199 = linux_getuid */ + { 0, (sy_call_t *)linux_getgid, AUE_GETGID, NULL, 0, 0 }, /* 200 = linux_getgid */ + { 0, (sy_call_t *)geteuid, AUE_GETEUID, NULL, 0, 0 }, /* 201 = geteuid */ + { 0, (sy_call_t *)getegid, AUE_GETEGID, NULL, 0, 0 }, /* 202 = getegid */ + { AS(setreuid_args), (sy_call_t *)setreuid, AUE_SETREUID, NULL, 0, 0 }, /* 203 = setreuid */ + { AS(setregid_args), (sy_call_t *)setregid, AUE_SETREGID, NULL, 0, 0 }, /* 204 = setregid */ + { AS(linux_getgroups_args), (sy_call_t *)linux_getgroups, AUE_GETGROUPS, NULL, 0, 0 }, /* 205 = linux_getgroups */ + { AS(linux_setgroups_args), (sy_call_t *)linux_setgroups, AUE_SETGROUPS, NULL, 0, 0 }, /* 206 = linux_setgroups */ + { AS(fchown_args), (sy_call_t *)fchown, AUE_NULL, NULL, 0, 0 }, /* 207 = fchown */ + { AS(setresuid_args), (sy_call_t *)setresuid, AUE_SETRESUID, NULL, 0, 0 }, /* 208 = setresuid */ + { AS(getresuid_args), (sy_call_t *)getresuid, AUE_GETRESUID, NULL, 0, 0 }, /* 209 = getresuid */ + { AS(setresgid_args), (sy_call_t *)setresgid, AUE_SETRESGID, NULL, 0, 0 }, /* 210 = setresgid */ + { AS(getresgid_args), (sy_call_t *)getresgid, AUE_GETRESGID, NULL, 0, 0 }, /* 211 = getresgid */ + { AS(linux_chown_args), (sy_call_t *)linux_chown, AUE_CHOWN, NULL, 0, 0 }, /* 212 = linux_chown */ + { AS(setuid_args), (sy_call_t *)setuid, AUE_SETUID, NULL, 0, 0 }, /* 213 = setuid */ + { AS(setgid_args), (sy_call_t *)setgid, AUE_SETGID, NULL, 0, 0 }, /* 214 = setgid */ + { AS(linux_setfsuid_args), (sy_call_t *)linux_setfsuid, AUE_SETFSUID, NULL, 0, 0 }, /* 215 = linux_setfsuid */ + { AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid, AUE_SETFSGID, NULL, 0, 0 }, /* 216 = linux_setfsgid */ + { AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root, AUE_PIVOT_ROOT, NULL, 0, 0 }, /* 217 = linux_pivot_root */ + { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE, NULL, 0, 0 }, /* 218 = linux_mincore */ + { AS(madvise_args), (sy_call_t *)madvise, AUE_MADVISE, NULL, 0, 0 }, /* 219 = madvise */ + { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_O_GETDENTS, NULL, 0, 0 }, /* 220 = linux_getdents64 */ + { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64, AUE_FCNTL, NULL, 0, 0 }, /* 221 = linux_fcntl64 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 222 = */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 223 = */ + { 0, (sy_call_t *)linux_gettid, AUE_NULL, NULL, 0, 0 }, /* 224 = linux_gettid */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 225 = linux_readahead */ + { 0, (sy_call_t *)linux_setxattr, AUE_NULL, NULL, 0, 0 }, /* 226 = linux_setxattr */ + { 0, (sy_call_t *)linux_lsetxattr, AUE_NULL, NULL, 0, 0 }, /* 227 = linux_lsetxattr */ + { 0, (sy_call_t *)linux_fsetxattr, AUE_NULL, NULL, 0, 0 }, /* 228 = linux_fsetxattr */ + { 0, (sy_call_t *)linux_getxattr, AUE_NULL, NULL, 0, 0 }, /* 229 = linux_getxattr */ + { 0, (sy_call_t *)linux_lgetxattr, AUE_NULL, NULL, 0, 0 }, /* 230 = linux_lgetxattr */ + { 0, (sy_call_t *)linux_fgetxattr, AUE_NULL, NULL, 0, 0 }, /* 231 = linux_fgetxattr */ + { 0, (sy_call_t *)linux_listxattr, AUE_NULL, NULL, 0, 0 }, /* 232 = linux_listxattr */ + { 0, (sy_call_t *)linux_llistxattr, AUE_NULL, NULL, 0, 0 }, /* 233 = linux_llistxattr */ + { 0, (sy_call_t *)linux_flistxattr, AUE_NULL, NULL, 0, 0 }, /* 234 = linux_flistxattr */ + { 0, (sy_call_t *)linux_removexattr, AUE_NULL, NULL, 0, 0 }, /* 235 = linux_removexattr */ + { 0, (sy_call_t *)linux_lremovexattr, AUE_NULL, NULL, 0, 0 }, /* 236 = linux_lremovexattr */ + { 0, (sy_call_t *)linux_fremovexattr, AUE_NULL, NULL, 0, 0 }, /* 237 = linux_fremovexattr */ + { AS(linux_tkill_args), (sy_call_t *)linux_tkill, AUE_NULL, NULL, 0, 0 }, /* 238 = linux_tkill */ + { 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_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 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 246 = linux_io_destroy */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 247 = linux_io_getevents */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 248 = linux_io_submit */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 249 = linux_io_cancel */ + { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0 }, /* 250 = linux_fadvise64 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 251 = */ + { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0 }, /* 252 = linux_exit_group */ + { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0 }, /* 253 = linux_lookup_dcookie */ + { 0, (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0 }, /* 254 = linux_epoll_create */ + { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0 }, /* 255 = linux_epoll_ctl */ + { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0 }, /* 256 = linux_epoll_wait */ + { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0 }, /* 257 = linux_remap_file_pages */ + { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0 }, /* 258 = linux_set_tid_address */ + { AS(linux_timer_create_args), (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0 }, /* 259 = linux_timer_create */ + { AS(linux_timer_settime_args), (sy_call_t *)linux_timer_settime, AUE_NULL, NULL, 0, 0 }, /* 260 = linux_timer_settime */ + { AS(linux_timer_gettime_args), (sy_call_t *)linux_timer_gettime, AUE_NULL, NULL, 0, 0 }, /* 261 = linux_timer_gettime */ + { AS(linux_timer_getoverrun_args), (sy_call_t *)linux_timer_getoverrun, AUE_NULL, NULL, 0, 0 }, /* 262 = linux_timer_getoverrun */ + { AS(linux_timer_delete_args), (sy_call_t *)linux_timer_delete, AUE_NULL, NULL, 0, 0 }, /* 263 = linux_timer_delete */ + { AS(linux_clock_settime_args), (sy_call_t *)linux_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0 }, /* 264 = linux_clock_settime */ + { AS(linux_clock_gettime_args), (sy_call_t *)linux_clock_gettime, AUE_NULL, NULL, 0, 0 }, /* 265 = linux_clock_gettime */ + { AS(linux_clock_getres_args), (sy_call_t *)linux_clock_getres, AUE_NULL, NULL, 0, 0 }, /* 266 = linux_clock_getres */ + { AS(linux_clock_nanosleep_args), (sy_call_t *)linux_clock_nanosleep, AUE_NULL, NULL, 0, 0 }, /* 267 = linux_clock_nanosleep */ + { 0, (sy_call_t *)linux_statfs64, AUE_NULL, NULL, 0, 0 }, /* 268 = linux_statfs64 */ + { 0, (sy_call_t *)linux_fstatfs64, AUE_NULL, NULL, 0, 0 }, /* 269 = linux_fstatfs64 */ + { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0 }, /* 270 = linux_tgkill */ + { 0, (sy_call_t *)linux_utimes, AUE_NULL, NULL, 0, 0 }, /* 271 = linux_utimes */ + { 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0 }, /* 272 = linux_fadvise64_64 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 273 = */ + { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0 }, /* 274 = linux_mbind */ + { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0 }, /* 275 = linux_get_mempolicy */ + { 0, (sy_call_t *)linux_set_mempolicy, AUE_NULL, NULL, 0, 0 }, /* 276 = linux_set_mempolicy */ + { AS(linux_mq_open_args), (sy_call_t *)linux_mq_open, AUE_NULL, NULL, 0, 0 }, /* 277 = linux_mq_open */ + { AS(linux_mq_unlink_args), (sy_call_t *)linux_mq_unlink, AUE_NULL, NULL, 0, 0 }, /* 278 = linux_mq_unlink */ + { AS(linux_mq_timedsend_args), (sy_call_t *)linux_mq_timedsend, AUE_NULL, NULL, 0, 0 }, /* 279 = linux_mq_timedsend */ + { AS(linux_mq_timedreceive_args), (sy_call_t *)linux_mq_timedreceive, AUE_NULL, NULL, 0, 0 }, /* 280 = linux_mq_timedreceive */ + { AS(linux_mq_notify_args), (sy_call_t *)linux_mq_notify, AUE_NULL, NULL, 0, 0 }, /* 281 = linux_mq_notify */ + { AS(linux_mq_getsetattr_args), (sy_call_t *)linux_mq_getsetattr, AUE_NULL, NULL, 0, 0 }, /* 282 = linux_mq_getsetattr */ + { 0, (sy_call_t *)linux_kexec_load, AUE_NULL, NULL, 0, 0 }, /* 283 = linux_kexec_load */ + { 0, (sy_call_t *)linux_waitid, AUE_NULL, NULL, 0, 0 }, /* 284 = linux_waitid */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 285 = */ + { 0, (sy_call_t *)linux_add_key, AUE_NULL, NULL, 0, 0 }, /* 286 = linux_add_key */ + { 0, (sy_call_t *)linux_request_key, AUE_NULL, NULL, 0, 0 }, /* 287 = linux_request_key */ + { 0, (sy_call_t *)linux_keyctl, AUE_NULL, NULL, 0, 0 }, /* 288 = linux_keyctl */ + { 0, (sy_call_t *)linux_ioprio_set, AUE_NULL, NULL, 0, 0 }, /* 289 = linux_ioprio_set */ + { 0, (sy_call_t *)linux_ioprio_get, AUE_NULL, NULL, 0, 0 }, /* 290 = linux_ioprio_get */ + { 0, (sy_call_t *)linux_inotify_init, AUE_NULL, NULL, 0, 0 }, /* 291 = linux_inotify_init */ + { 0, (sy_call_t *)linux_inotify_add_watch, AUE_NULL, NULL, 0, 0 }, /* 292 = linux_inotify_add_watch */ + { 0, (sy_call_t *)linux_inotify_rm_watch, AUE_NULL, NULL, 0, 0 }, /* 293 = linux_inotify_rm_watch */ + { 0, (sy_call_t *)linux_migrate_pages, AUE_NULL, NULL, 0, 0 }, /* 294 = linux_migrate_pages */ + { 0, (sy_call_t *)linux_openat, AUE_NULL, NULL, 0, 0 }, /* 295 = linux_openat */ + { 0, (sy_call_t *)linux_mkdirat, AUE_NULL, NULL, 0, 0 }, /* 296 = linux_mkdirat */ + { 0, (sy_call_t *)linux_mknodat, AUE_NULL, NULL, 0, 0 }, /* 297 = linux_mknodat */ + { 0, (sy_call_t *)linux_fchownat, AUE_NULL, NULL, 0, 0 }, /* 298 = linux_fchownat */ + { 0, (sy_call_t *)linux_futimesat, AUE_NULL, NULL, 0, 0 }, /* 299 = linux_futimesat */ + { 0, (sy_call_t *)linux_fstatat64, AUE_NULL, NULL, 0, 0 }, /* 300 = linux_fstatat64 */ + { 0, (sy_call_t *)linux_unlinkat, AUE_NULL, NULL, 0, 0 }, /* 301 = linux_unlinkat */ + { 0, (sy_call_t *)linux_renameat, AUE_NULL, NULL, 0, 0 }, /* 302 = linux_renameat */ + { 0, (sy_call_t *)linux_linkat, AUE_NULL, NULL, 0, 0 }, /* 303 = linux_linkat */ + { 0, (sy_call_t *)linux_symlinkat, AUE_NULL, NULL, 0, 0 }, /* 304 = linux_symlinkat */ + { 0, (sy_call_t *)linux_readlinkat, AUE_NULL, NULL, 0, 0 }, /* 305 = linux_readlinkat */ + { 0, (sy_call_t *)linux_fchmodat, AUE_NULL, NULL, 0, 0 }, /* 306 = linux_fchmodat */ + { 0, (sy_call_t *)linux_faccessat, AUE_NULL, NULL, 0, 0 }, /* 307 = linux_faccessat */ + { 0, (sy_call_t *)linux_pselect6, AUE_NULL, NULL, 0, 0 }, /* 308 = linux_pselect6 */ + { 0, (sy_call_t *)linux_ppoll, AUE_NULL, NULL, 0, 0 }, /* 309 = linux_ppoll */ + { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0 }, /* 310 = linux_unshare */ }; From owner-p4-projects@FreeBSD.ORG Sun Aug 6 11:01:35 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 C897E16A4E6; Sun, 6 Aug 2006 11:01:35 +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 A3ECD16A4DD for ; Sun, 6 Aug 2006 11:01:35 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5290843D45 for ; Sun, 6 Aug 2006 11:01:35 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76B1Z1S041169 for ; Sun, 6 Aug 2006 11:01:35 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76B1ZBJ041166 for perforce@freebsd.org; Sun, 6 Aug 2006 11:01:35 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 11:01:35 GMT Message-Id: <200608061101.k76B1ZBJ041166@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 103326 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: Sun, 06 Aug 2006 11:01:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=103326 Change 103326 by rwatson@rwatson_zoo on 2006/08/06 11:01:27 In FreeBSD, assert the vnode lock when accessing MAC labels on vnodes. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/mac/mac_audit.c#5 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/mac/mac_audit.c#5 (text+ko) ==== @@ -71,6 +71,8 @@ int error; struct label *vl; + ASSERT_VOP_LOCKED(vp, "mac_check_system_auditctl"); + vl = (vp != NULL) ? vp->v_label : NULL; MAC_CHECK(check_system_auditctl, cred, vp, vl); From owner-p4-projects@FreeBSD.ORG Sun Aug 6 11:04:40 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 E5BF716A4DE; Sun, 6 Aug 2006 11:04:39 +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 BFEAB16A4DA for ; Sun, 6 Aug 2006 11:04:39 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8671043D46 for ; Sun, 6 Aug 2006 11:04:39 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76B4dcw042624 for ; Sun, 6 Aug 2006 11:04:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76B4ddh042621 for perforce@freebsd.org; Sun, 6 Aug 2006 11:04:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 11:04:39 GMT Message-Id: <200608061104.k76B4ddh042621@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 103327 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: Sun, 06 Aug 2006 11:04:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=103327 Change 103327 by rwatson@rwatson_zoo on 2006/08/06 11:03:57 Audit path/vnode argument to auditctl(). Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_syscalls.c#20 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_syscalls.c#20 (text+ko) ==== @@ -612,8 +612,8 @@ if (uap->path == NULL) return (EINVAL); - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE, UIO_USERSPACE, - uap->path, td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1, + UIO_USERSPACE, uap->path, td); flags = AUDIT_OPEN_FLAGS; error = vn_open(&nd, &flags, 0, -1); if (error) From owner-p4-projects@FreeBSD.ORG Sun Aug 6 11:05:41 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 AD6A816A4E1; Sun, 6 Aug 2006 11:05:41 +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 8773516A4DD for ; Sun, 6 Aug 2006 11:05:41 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DE8643D55 for ; Sun, 6 Aug 2006 11:05:41 +0000 (GMT) (envelope-from rdivacky@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 k76B5fVK042700 for ; Sun, 6 Aug 2006 11:05:41 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76B5fAU042697 for perforce@freebsd.org; Sun, 6 Aug 2006 11:05:41 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 6 Aug 2006 11:05:41 GMT Message-Id: <200608061105.k76B5fAU042697@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103328 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: Sun, 06 Aug 2006 11:05:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=103328 Change 103328 by rdivacky@rdivacky_witten on 2006/08/06 11:04:59 Implementation of linux_tgkill() syscall. Firefox uses it. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_signal.c#2 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_dummy.c#9 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_signal.c#2 (text+ko) ==== @@ -50,6 +50,9 @@ #include #include +struct linux_emuldata *em_find(pid_t pid, int locked); +extern struct rwlock emul_lock; + void linux_to_bsd_sigset(l_sigset_t *lss, sigset_t *bss) { @@ -447,3 +450,46 @@ tmp.pid = args->pid; return (kill(td, &tmp)); } + +int +linux_tgkill(struct thread *td, struct linux_tgkill_args *args) +{ + struct linux_emuldata *em; + struct linux_kill_args ka; + struct proc *p; + +#ifdef DEBUG + if (ldebug(tgkill)) + printf(ARGS(tgkill, "%d, %d, %d"), args->tgid, args->pid, args->sig); +#endif + + ka.pid = args->pid; + ka.signum = args->sig; + + if (args->tgid == -1) + return linux_kill(td, &ka); + + if ((p = pfind(args->pid)) == NULL) + return ESRCH; + + if (p->p_sysent != &elf_linux_sysvec) + return ESRCH; + + PROC_UNLOCK(p); + + em = em_find(args->pid, EMUL_UNLOCKED); + + if (em == NULL) { +#ifdef DEBUG + printf("emuldata not found.\n"); +#endif + return ESRCH; + } + + if (em->shared->group_pid != args->tgid) + return ESRCH; + + EMUL_RUNLOCK(&emul_lock); + + return linux_kill(td, &ka); +} ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_dummy.c#9 (text+ko) ==== @@ -75,7 +75,6 @@ DUMMY(remap_file_pages); DUMMY(statfs64); DUMMY(fstatfs64); -DUMMY(tgkill); DUMMY(utimes); DUMMY(fadvise64_64); DUMMY(mbind); From owner-p4-projects@FreeBSD.ORG Sun Aug 6 11:10:48 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 BD70616A4DF; Sun, 6 Aug 2006 11:10:48 +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 9621616A4DA for ; Sun, 6 Aug 2006 11:10:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12F6143D45 for ; Sun, 6 Aug 2006 11:10:48 +0000 (GMT) (envelope-from hselasky@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 k76BAmjW043025 for ; Sun, 6 Aug 2006 11:10:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76BAlB7043022 for perforce@freebsd.org; Sun, 6 Aug 2006 11:10:47 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 6 Aug 2006 11:10:47 GMT Message-Id: <200608061110.k76BAlB7043022@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103329 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: Sun, 06 Aug 2006 11:10:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=103329 Change 103329 by hselasky@hselasky_mini_itx on 2006/08/06 11:10:15 Finished converting "if_axe". Lots of changes again. Please test. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_axe.c#4 edit .. //depot/projects/usb/src/sys/dev/usb/if_axereg.h#3 add Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_axe.c#4 (text+ko) ==== @@ -1,0 +1,1360 @@ +/*- + * Copyright (c) 1997, 1998, 1999, 2000-2003 + * Bill Paul . All rights reserved. + * + * Copyright (c) 2006 + * Hans Petter Selasky. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Bill Paul. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the + * LinkSys USB200M and various other adapters. + * + * Manuals available from: + * http://www.asix.com.tw/datasheet/mac/Ax88172.PDF + * Note: you need the manual for the AX88170 chip (USB 1.x ethernet + * controller) to find the definitions for the RX control register. + * http://www.asix.com.tw/datasheet/mac/Ax88170.PDF + * + * Written by Bill Paul + * Senior Engineer + * Wind River Systems + */ + +/* + * The AX88172 provides USB ethernet supports at 10 and 100Mbps. + * It uses an external PHY (reference designs use a RealTek chip), + * and has a 64-bit multicast hash filter. There is some information + * missing from the manual which one needs to know in order to make + * the chip function: + * + * - You must set bit 7 in the RX control register, otherwise the + * chip won't receive any packets. + * - You must initialize all 3 IPG registers, or you won't be able + * to send any packets. + * + * Note that this device appears to only support loading the station + * address via autload from the EEPROM (i.e. there's no way to manaully + * set it). + * + * (Adam Weinberger wanted me to name this driver if_gir.c.) + */ + +/* + * NOTE: all function names beginning like "axe_cfg_" can only + * be called from within the config thread function ! + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#define usbd_config_td_cc axe_config_copy +#define usbd_config_td_softc axe_softc + +#include +#include +#include + +#include "usbdevs.h" + +#include +#include + +/* "device miibus" required. See GENERIC if you get errors here. */ +#include "miibus_if.h" + +#include + +__FBSDID("$FreeBSD: src/sys/dev/usb/if_axe.c,v 1.36 2006/02/14 12:44:55 glebius Exp $"); + +MODULE_DEPEND(axe, usb, 1, 1, 1); +MODULE_DEPEND(axe, ether, 1, 1, 1); +MODULE_DEPEND(axe, miibus, 1, 1, 1); + +#ifdef USB_DEBUG +#define DPRINTF(sc,n,fmt,...) \ + do { if (axe_debug > (n)) { \ + printf("%s:%s: " fmt, (sc)->sc_name, \ + __FUNCTION__,## __VA_ARGS__); } } while (0) + +static int axe_debug = 0; +SYSCTL_NODE(_hw_usb, OID_AUTO, axe, CTLFLAG_RW, 0, "USB axe"); +SYSCTL_INT(_hw_usb_axe, OID_AUTO, debug, CTLFLAG_RW, &axe_debug, 0, + "axe debug level"); +#else +#define DPRINTF(...) +#endif + + +/* + * Various supported device vendors/products. + */ +static struct axe_type axe_devs[] = { + { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88172 }, + { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100 }, + { USB_VENDOR_JVC, USB_PRODUCT_JVC_MP_PRX1 }, + { USB_VENDOR_LINKSYS2, USB_PRODUCT_LINKSYS2_USB200M }, + { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUAU2KTX }, + { USB_VENDOR_NETGEAR, USB_PRODUCT_NETGEAR_FA120 }, + { USB_VENDOR_SYSTEMTALKS, USB_PRODUCT_SYSTEMTALKS_SGCX2UL }, + { USB_VENDOR_SITECOM, USB_PRODUCT_SITECOM_LN029 }, + { 0, 0 } +}; + +/* prototypes */ + +static device_probe_t axe_probe; +static device_attach_t axe_attach; +static device_detach_t axe_detach; +static device_shutdown_t axe_shutdown; + +static void +axe_cfg_cmd(struct axe_softc *sc, u_int16_t cmd, u_int16_t index, + u_int16_t val, void *buf); +static int +axe_cfg_miibus_readreg(device_t dev, int phy, int reg); + +static int +axe_cfg_miibus_writereg(device_t dev, int phy, int reg, int val); + +static void +axe_cfg_miibus_statchg(device_t dev); + +static int +axe_ifmedia_upd_cb(struct ifnet *ifp); + +static void +axe_cfg_ifmedia_upd(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount); +static void +axe_ifmedia_sts_cb(struct ifnet *ifp, struct ifmediareq *ifmr); + +static void +axe_config_copy(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount); +static void +axe_cfg_setmulti(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount); +static void +axe_cfg_reset(struct axe_softc *sc); + +static void +axe_cfg_first_time_setup(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount); +static void +axe_intr_clear_stall_callback(struct usbd_xfer *xfer); + +static void +axe_intr_callback(struct usbd_xfer *xfer); + +static void +axe_bulk_read_clear_stall_callback(struct usbd_xfer *xfer); + +static void +axe_bulk_read_callback(struct usbd_xfer *xfer); + +static void +axe_bulk_write_clear_stall_callback(struct usbd_xfer *xfer); + +static void +axe_bulk_write_callback(struct usbd_xfer *xfer); + +static void +axe_cfg_tick(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount); +static void +axe_start_cb(struct ifnet *ifp); + +static void +axe_start_transfers(struct axe_softc *sc); + +static void +axe_init_cb(void *arg); + +static void +axe_cfg_init(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount); +static void +axe_cfg_promisc_upd(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount); +static int +axe_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data); + +static void +axe_watchdog(void *arg); + +static void +axe_cfg_stop(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount); + +static const struct usbd_config axe_config[AXE_ENDPT_MAX] = { + + [0] = { + .type = UE_BULK, + .endpoint = -1, /* any */ + .direction = UE_DIR_OUT, + .bufsize = MCLBYTES, + .flags = (USBD_USE_DMA|USBD_FORCE_SHORT_XFER), + .callback = &axe_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ + }, + + [1] = { + .type = UE_BULK, + .endpoint = -1, /* any */ + .direction = UE_DIR_IN, + .bufsize = MCLBYTES, + .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .callback = &axe_bulk_read_callback, + .timeout = 0, /* no timeout */ + }, + + [2] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = -1, + .bufsize = sizeof(usb_device_request_t), + .flags = USBD_USE_DMA, + .callback = &axe_bulk_write_clear_stall_callback, + .timeout = 1000, /* 1 second */ + }, + + [3] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = -1, + .bufsize = sizeof(usb_device_request_t), + .flags = USBD_USE_DMA, + .callback = &axe_bulk_read_clear_stall_callback, + .timeout = 1000, /* 1 second */ + }, + + [4] = { + .type = UE_INTERRUPT, + .endpoint = -1, /* any */ + .direction = UE_DIR_IN, + .flags = USBD_SHORT_XFER_OK, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &axe_intr_callback, + }, + + [5] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = -1, + .bufsize = sizeof(usb_device_request_t), + .flags = USBD_USE_DMA, + .callback = &axe_intr_clear_stall_callback, + .timeout = 1000, /* 1 second */ + }, +}; + +static device_method_t axe_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, axe_probe), + DEVMETHOD(device_attach, axe_attach), + DEVMETHOD(device_detach, axe_detach), + DEVMETHOD(device_shutdown, axe_shutdown), + + /* bus interface */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + /* MII interface */ + DEVMETHOD(miibus_readreg, axe_cfg_miibus_readreg), + DEVMETHOD(miibus_writereg, axe_cfg_miibus_writereg), + DEVMETHOD(miibus_statchg, axe_cfg_miibus_statchg), + + { 0, 0 } +}; + +static driver_t axe_driver = { + "axe", + axe_methods, + sizeof(struct axe_softc) +}; + +static devclass_t axe_devclass; + +DRIVER_MODULE(axe, uhub, axe_driver, axe_devclass, usbd_driver_load, 0); +DRIVER_MODULE(miibus, axe, miibus_driver, miibus_devclass, 0, 0); + +static void +axe_cfg_cmd(struct axe_softc *sc, u_int16_t cmd, u_int16_t index, + u_int16_t val, void *buf) +{ + usb_device_request_t req; + usbd_status err; + u_int16_t length = AXE_CMD_LEN(cmd); + + req.bmRequestType = (AXE_CMD_IS_WRITE(cmd) ? + UT_WRITE_VENDOR_DEVICE : + UT_READ_VENDOR_DEVICE); + req.bRequest = AXE_CMD_CMD(cmd); + USETW(req.wValue, val); + USETW(req.wIndex, index); + USETW(req.wLength, length); + + if (usbd_config_td_is_gone(&(sc->sc_config_td))) { + goto error; + } + + err = usbd_do_request_flags_mtx(sc->sc_udev, &(sc->sc_mtx), &req, + buf, 0, NULL, 1000); + + if (err) { + + DPRINTF(sc, 0, "device request failed, err=%s " + "(ignored)\n", usbd_errstr(err)); + + error: + + if ((req.bmRequestType & UT_READ) && length) { + bzero(buf, length); + } + } + return; +} + +static int +axe_cfg_miibus_readreg(device_t dev, int phy, int reg) +{ + struct axe_softc * sc = device_get_softc(dev); + u_int16_t val; + + mtx_lock(&(sc->sc_mtx)); /* XXX */ + +#if 0 + /* + * The chip tells us the MII address of any supported + * PHYs attached to the chip, so only read from those. + */ + + if ((sc->sc_phyaddrs[0] != AXE_NOPHY) && (phy != sc->sc_phyaddrs[0])) { + val = 0; + goto done; + } + + if ((sc->sc_phyaddrs[1] != AXE_NOPHY) && (phy != sc->sc_phyaddrs[1])) { + val = 0; + goto done; + } +#endif + if ((sc->sc_phyaddrs[0] != 0xFF) && (sc->sc_phyaddrs[0] != phy)) { + val = 0; + goto done; + } + + axe_cfg_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL); + axe_cfg_cmd(sc, AXE_CMD_MII_READ_REG, reg, phy, &val); + axe_cfg_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL); + + val = le16toh(val); + + if (val) { + sc->sc_phyaddrs[0] = phy; + } + + done: + mtx_unlock(&(sc->sc_mtx)); /* XXX */ + + return (val); +} + +static int +axe_cfg_miibus_writereg(device_t dev, int phy, int reg, int val) +{ + struct axe_softc * sc = device_get_softc(dev); + + val = htole16(val); + + mtx_lock(&(sc->sc_mtx)); /* XXX */ + + axe_cfg_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL); + axe_cfg_cmd(sc, AXE_CMD_MII_WRITE_REG, reg, phy, &val); + axe_cfg_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL); + + mtx_unlock(&(sc->sc_mtx)); /* XXX */ + + return 0; +} + +static void +axe_cfg_miibus_statchg(device_t dev) +{ + /* doesn't seem to be necessary */ + return; +} + +/* + * Set media options. + */ +static int +axe_ifmedia_upd_cb(struct ifnet *ifp) +{ + struct axe_softc *sc = ifp->if_softc; + + mtx_lock(&(sc->sc_mtx)); + usbd_config_td_queue_command + (&(sc->sc_config_td), &axe_cfg_ifmedia_upd, 0); + mtx_unlock(&(sc->sc_mtx)); + + return 0; +} + +static void +axe_cfg_ifmedia_upd(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount) +{ + struct ifnet * ifp = sc->sc_ifp; + struct mii_data * mii = GET_MII(sc); + + if ((cc == NULL) || + (ifp == NULL) || + (mii == NULL)) { + /* not ready */ + return; + } + + sc->sc_flags |= AXE_FLAG_WAIT_LINK; + + if (mii->mii_instance) { + struct mii_softc *miisc; + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) { + mii_phy_reset(miisc); + } + } + + mii_mediachg(mii); + + return; +} + +/* + * Report current media status. + */ +static void +axe_ifmedia_sts_cb(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + struct axe_softc *sc = ifp->if_softc; + + mtx_lock(&(sc->sc_mtx)); + + ifmr->ifm_active = sc->sc_media_active; + ifmr->ifm_status = sc->sc_media_status; + + mtx_unlock(&(sc->sc_mtx)); + + return; +} + +static void +axe_config_copy(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount) +{ + struct ifnet * ifp = sc->sc_ifp; + struct ifmultiaddr * ifma; + u_int8_t h; + u_int8_t i; + + bzero(cc, sizeof(*cc)); + + if (ifp) { + for (i = 0; i < ETHER_ADDR_LEN; i++) { + cc->if_lladdr[i] = IF_LLADDR(ifp)[i]; + } + + cc->if_flags = ifp->if_flags; + + /* compute hash bits for multicast filter */ + + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) + { + if (ifma->ifma_addr->sa_family != AF_LINK) { + continue; + } + + h = (ether_crc32_be + (LLADDR((struct sockaddr_dl *)(ifma->ifma_addr)), + ETHER_ADDR_LEN) >> 26); + + cc->if_hash[(h >> 3)] |= (1 << (h & 7)); + } + IF_ADDR_UNLOCK(ifp); + } + return; +} + +static void +axe_cfg_setmulti(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount) +{ + u_int16_t rxmode; + + if (cc == NULL) { + /* nothing to do */ + return; + } + + axe_cfg_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, &rxmode); + + rxmode = le16toh(rxmode); + + if (cc->if_flags & (IFF_ALLMULTI|IFF_PROMISC)) { + rxmode |= AXE_RXCMD_ALLMULTI; + axe_cfg_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL); + return; + } + + rxmode &= ~AXE_RXCMD_ALLMULTI; + + axe_cfg_cmd(sc, AXE_CMD_WRITE_MCAST, 0, 0, cc->if_hash); + axe_cfg_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL); + + return; +} + +static void +axe_cfg_reset(struct axe_softc *sc) +{ + usbd_status err; + + mtx_unlock(&(sc->sc_mtx)); + + mtx_lock(&Giant); + + err = usbreq_set_config(sc->sc_udev, AXE_CONFIG_NO); + + mtx_unlock(&Giant); + + mtx_lock(&(sc->sc_mtx)); + + if (err) { + DPRINTF(sc, 0, "reset failed (ignored)\n"); + } + + /* wait a little while for the + * chip to get its brains in order: + */ + err = usbd_config_td_sleep(&(sc->sc_config_td), hz/100); + + return; +} + +/* + * Probe for a AX88172 chip. + */ +static int +axe_probe(device_t dev) +{ + struct usb_attach_arg *uaa = device_get_ivars(dev); + struct axe_type *t; + + if (uaa->iface != NULL) { + return UMATCH_NONE; + } + + t = axe_devs; + while(t->axe_vid) { + if ((uaa->vendor == t->axe_vid) && + (uaa->product == t->axe_did)) { + return UMATCH_VENDOR_PRODUCT; + } + t++; + } + return UMATCH_NONE; +} + +/* + * Attach the interface. Allocate softc structures, do ifmedia + * setup and ethernet/BPF attach. + */ +static int +axe_attach(device_t dev) +{ + struct usb_attach_arg *uaa = device_get_ivars(dev); + struct axe_softc *sc = device_get_softc(dev); + int32_t error; + + if (sc == NULL) { + return ENOMEM; + } + + sc->sc_udev = uaa->device; + sc->sc_dev = dev; + sc->sc_unit = device_get_unit(dev); + + usbd_set_desc(dev, uaa->device); + + snprintf(sc->sc_name, sizeof(sc->sc_name), "%s", + device_get_nameunit(dev)); + + mtx_init(&(sc->sc_mtx), "axe lock", NULL, MTX_DEF | MTX_RECURSE); + + __callout_init_mtx(&(sc->sc_watchdog), + &(sc->sc_mtx), CALLOUT_RETURNUNLOCKED); + + error = usbd_set_config_no(uaa->device, AXE_CONFIG_NO, 1); + + if (error) { + device_printf(dev, "setting config " + "number failed!\n"); + goto detach; + } + + error = usbd_transfer_setup(uaa->device, AXE_IFACE_IDX, + sc->sc_xfer, axe_config, AXE_ENDPT_MAX, + sc, &(sc->sc_mtx), &(sc->sc_mem_wait)); + if (error) { + device_printf(dev, "allocating USB " + "transfers failed!\n"); + goto detach; + } + + error = usbd_config_td_setup(&(sc->sc_config_td), sc, &(sc->sc_mtx), + &axe_config_copy, NULL, + sizeof(struct axe_config_copy), 16); + if (error) { + device_printf(dev, "could not setup config " + "thread!\n"); + goto detach; + } + + mtx_lock(&(sc->sc_mtx)); + + sc->sc_flags |= AXE_FLAG_WAIT_LINK; + + /* start setup */ + + usbd_config_td_queue_command + (&(sc->sc_config_td), &axe_cfg_first_time_setup, 0); + + /* start watchdog (will exit mutex) */ + + axe_watchdog(sc); + + return 0; /* success */ + + detach: + axe_detach(dev); + return ENXIO; /* failure */ +} + +static void +axe_cfg_first_time_setup(struct axe_softc *sc, + struct axe_config_copy *cc, u_int16_t refcount) +{ + struct ifnet * ifp; + int error; + u_int8_t eaddr[min(ETHER_ADDR_LEN,6)]; + + /* set default value */ + bzero(eaddr, sizeof(eaddr)); + + /* + * Get station address. + */ + axe_cfg_cmd(sc, AXE_CMD_READ_NODEID, 0, 0, eaddr); + + /* + * Load IPG values and PHY indexes. + */ + axe_cfg_cmd(sc, AXE_CMD_READ_IPG012, 0, 0, sc->sc_ipgs); + axe_cfg_cmd(sc, AXE_CMD_READ_PHYID, 0, 0, sc->sc_phyaddrs); + + /* + * Work around broken adapters that appear to lie about + * their PHY addresses. + */ + sc->sc_phyaddrs[0] = sc->sc_phyaddrs[1] = 0xFF; + + mtx_unlock(&(sc->sc_mtx)); + + ifp = if_alloc(IFT_ETHER); + + mtx_lock(&(sc->sc_mtx)); + + if (ifp == NULL) { + printf("%s: could not if_alloc()\n", + sc->sc_name); + goto done; + } + + ifp->if_softc = sc; + if_initname(ifp, "axe", sc->sc_unit); + ifp->if_mtu = ETHERMTU; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_ioctl = axe_ioctl_cb; + ifp->if_start = axe_start_cb; + ifp->if_watchdog = NULL; + ifp->if_init = axe_init_cb; + ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + + /* XXX need Giant when accessing + * the device structures ! + */ + + mtx_unlock(&(sc->sc_mtx)); + + mtx_lock(&Giant); + + error = mii_phy_probe(sc->sc_dev, &(sc->sc_miibus), + &axe_ifmedia_upd_cb, + &axe_ifmedia_sts_cb); + mtx_unlock(&Giant); + + mtx_lock(&(sc->sc_mtx)); + + if (error) { + printf("%s: MII without any PHY!\n", + sc->sc_name); + if_free(ifp); + goto done; + } + + sc->sc_ifp = ifp; + + /* + * Call MI attach routine. + */ + + ether_ifattach(ifp, eaddr); + + done: + return; +} + +static int +axe_detach(device_t dev) +{ + struct axe_softc * sc = device_get_softc(dev); + struct ifnet * ifp; + + mtx_lock(&(sc->sc_mtx)); + + usbd_config_td_stop(&(sc->sc_config_td)); + + __callout_stop(&sc->sc_watchdog); + + axe_cfg_stop(sc, NULL, 0); + + ifp = sc->sc_ifp; + + mtx_unlock(&(sc->sc_mtx)); + + /* get rid of any late children */ + bus_generic_detach(dev); + + if (ifp) { + ether_ifdetach(ifp); + if_free(ifp); + } + + usbd_transfer_unsetup(sc->sc_xfer, AXE_ENDPT_MAX); + + usbd_transfer_drain(&(sc->sc_mem_wait), &(sc->sc_mtx)); + + usbd_config_td_unsetup(&(sc->sc_config_td)); + + mtx_destroy(&(sc->sc_mtx)); + + return 0; +} + +static void +axe_intr_clear_stall_callback(struct usbd_xfer *xfer) +{ + struct axe_softc *sc = xfer->priv_sc; + struct usbd_xfer *xfer_other = sc->sc_xfer[4]; + + USBD_CHECK_STATUS(xfer); + + tr_setup: + /* start clear stall */ + usbd_clear_stall_tr_setup(xfer, xfer_other); + return; + + tr_transferred: + usbd_clear_stall_tr_transferred(xfer, xfer_other); + + sc->sc_flags &= ~AXE_FLAG_INTR_STALL; + usbd_transfer_start(xfer_other); + return; + + tr_error: + /* bomb out */ + sc->sc_flags &= ~AXE_FLAG_INTR_STALL; + DPRINTF(sc, 0, "interrupt read pipe stopped\n"); + return; +} + +static void +axe_intr_callback(struct usbd_xfer *xfer) +{ + struct axe_softc *sc = xfer->priv_sc; + + USBD_CHECK_STATUS(xfer); + + tr_transferred: + + /* do nothing */ + + tr_setup: + if (sc->sc_flags & AXE_FLAG_INTR_STALL) { + usbd_transfer_start(sc->sc_xfer[5]); + } else { + usbd_start_hardware(xfer); + } + return; + + tr_error: + if (xfer->error != USBD_CANCELLED) { + /* start clear stall */ + sc->sc_flags |= AXE_FLAG_INTR_STALL; + usbd_transfer_start(sc->sc_xfer[5]); + } + return; +} + +static void +axe_bulk_read_clear_stall_callback(struct usbd_xfer *xfer) +{ + struct axe_softc *sc = xfer->priv_sc; + struct usbd_xfer *xfer_other = sc->sc_xfer[1]; + + USBD_CHECK_STATUS(xfer); + + tr_setup: + /* start clear stall */ + usbd_clear_stall_tr_setup(xfer, xfer_other); + return; + + tr_transferred: + usbd_clear_stall_tr_transferred(xfer, xfer_other); + + sc->sc_flags &= ~AXE_FLAG_READ_STALL; + usbd_transfer_start(xfer_other); + return; + + tr_error: + /* bomb out */ + sc->sc_flags &= ~AXE_FLAG_READ_STALL; + DPRINTF(sc, 0, "bulk read pipe stopped\n"); + return; +} + +static void +axe_bulk_read_callback(struct usbd_xfer *xfer) +{ + struct axe_softc *sc = xfer->priv_sc; + struct ifnet *ifp = sc->sc_ifp; + struct mbuf *m; + + USBD_CHECK_STATUS(xfer); + + tr_error: + if (xfer->error != USBD_CANCELLED) { + /* try to clear stall first */ + sc->sc_flags |= AXE_FLAG_READ_STALL; + usbd_transfer_start(sc->sc_xfer[3]); + } + DPRINTF(sc, 0, "bulk read error, %s\n", + usbd_errstr(xfer->error)); + return; + + tr_transferred: + + if (xfer->actlen < sizeof(struct ether_header)) { + ifp->if_ierrors++; + goto tr_setup; + } + + m = usbd_ether_get_mbuf(); + + if (m == NULL) { + ifp->if_ierrors++; + goto tr_setup; + } + + xfer->actlen = min(xfer->actlen, m->m_len); + + usbd_copy_out(&(xfer->buf_data), 0, m->m_data, xfer->actlen); + + ifp->if_ipackets++; + m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.len = m->m_len = xfer->actlen; + + (ifp->if_input)(ifp, m); + + tr_setup: + + if (sc->sc_flags & AXE_FLAG_READ_STALL) { + usbd_transfer_start(sc->sc_xfer[3]); + } else { + usbd_start_hardware(xfer); + } + return; +} + +static void +axe_bulk_write_clear_stall_callback(struct usbd_xfer *xfer) +{ + struct axe_softc *sc = xfer->priv_sc; + struct usbd_xfer *xfer_other = sc->sc_xfer[0]; + + USBD_CHECK_STATUS(xfer); + + tr_setup: + /* start clear stall */ + usbd_clear_stall_tr_setup(xfer, xfer_other); + return; + + tr_transferred: + usbd_clear_stall_tr_transferred(xfer, xfer_other); + + sc->sc_flags &= ~AXE_FLAG_WRITE_STALL; + usbd_transfer_start(xfer_other); + return; + + tr_error: + /* bomb out */ + sc->sc_flags &= ~AXE_FLAG_WRITE_STALL; + DPRINTF(sc, 0, "bulk write pipe stopped\n"); + return; +} + +static void +axe_bulk_write_callback(struct usbd_xfer *xfer) +{ + struct axe_softc *sc = xfer->priv_sc; + struct ifnet *ifp = sc->sc_ifp; + struct mbuf *m; + + USBD_CHECK_STATUS(xfer); + + tr_error: + DPRINTF(sc, 10, "transfer error, %s\n", + usbd_errstr(xfer->error)); + + if (xfer->error != USBD_CANCELLED) { + /* try to clear stall first */ + sc->sc_flags |= AXE_FLAG_WRITE_STALL; + usbd_transfer_start(sc->sc_xfer[2]); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Aug 6 11:16:57 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 2E8DB16A4E5; Sun, 6 Aug 2006 11:16:57 +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 09A9316A4E1 for ; Sun, 6 Aug 2006 11:16:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E6A343D49 for ; Sun, 6 Aug 2006 11:16:56 +0000 (GMT) (envelope-from hselasky@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 k76BGu0l043292 for ; Sun, 6 Aug 2006 11:16:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76BGtmo043289 for perforce@freebsd.org; Sun, 6 Aug 2006 11:16:55 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 6 Aug 2006 11:16:55 GMT Message-Id: <200608061116.k76BGtmo043289@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103330 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: Sun, 06 Aug 2006 11:16:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=103330 Change 103330 by hselasky@hselasky_mini_itx on 2006/08/06 11:16:46 Try to get the mii-locking right. Until further lock the driver's private lock, sc->sc_mtx, from all mii-callbacks, hence during attach there are some problems, and it is not possible to hold sc->sc_mtx when calling "mii_phy_probe()", because this function calls memory allocation functions that can sleep. Add some more debugging statements. Cleanup some comments. Move an include file further up. And some other small things. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_aue.c#5 edit .. //depot/projects/usb/src/sys/dev/usb/if_auereg.h#4 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_aue.c#5 (text+ko) ==== @@ -101,6 +101,9 @@ #include +/* "device miibus" required. See GENERIC if you get errors here. */ +#include "miibus_if.h" + __FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.96 2006/02/14 12:44:55 glebius Exp $"); MODULE_DEPEND(aue, usb, 1, 1, 1); @@ -121,9 +124,6 @@ #define DPRINTF(...) #endif -/* "device miibus" required. See GENERIC if you get errors here. */ -#include "miibus_if.h" - /* * Various supported device vendors/products. */ @@ -550,6 +550,8 @@ struct aue_softc * sc = device_get_softc(dev); u_int16_t i; + mtx_lock(&(sc->sc_mtx)); /* XXX */ + /* * The Am79C901 HomePNA PHY actually contains * two transceivers: a 1Mbps HomePNA PHY and a @@ -564,12 +566,14 @@ (sc->sc_product == USB_PRODUCT_ADMTEK_PEGASUS)) { if (phy == 3) { - return (0); + i = 0; + goto done; } #ifdef notdef if (phy != 1) { - return (0); + i = 0; + goto done; } #endif } @@ -596,6 +600,9 @@ i = aue_cfg_csr_read_2(sc, AUE_PHY_DATA); + done: + mtx_unlock(&(sc->sc_mtx)); /* XXX */ + return i; } @@ -609,6 +616,8 @@ return (0); } + mtx_lock(&(sc->sc_mtx)); /* XXX */ + aue_cfg_csr_write_2(sc, AUE_PHY_DATA, data); aue_cfg_csr_write_1(sc, AUE_PHY_ADDR, phy); aue_cfg_csr_write_1(sc, AUE_PHY_CTL, reg | AUE_PHYCTL_WRITE); @@ -629,6 +638,8 @@ } } + mtx_unlock(&(sc->sc_mtx)); /* XXX */ + return(0); } @@ -638,6 +649,8 @@ struct aue_softc * sc = device_get_softc(dev); struct mii_data * mii = GET_MII(sc); + mtx_lock(&(sc->sc_mtx)); /* XXX */ + AUE_CFG_CLRBIT(sc, AUE_CTL0, AUE_CTL0_RX_ENB | AUE_CTL0_TX_ENB); if (IFM_SUBTYPE(mii->mii_media_active) == IFM_100_TX) { @@ -665,6 +678,8 @@ aue_cfg_miibus_writereg(dev, 0, 0x1b, auxmode | 0x04); } + mtx_unlock(&(sc->sc_mtx)); /* XXX */ + return; } @@ -672,7 +687,7 @@ aue_cfg_setmulti(struct aue_softc *sc, struct aue_config_copy *cc, u_int16_t refcount) { - u_int16_t i; + u_int16_t i; if (cc == NULL) { /* nothing to do */ @@ -821,7 +836,9 @@ __callout_init_mtx(&(sc->sc_watchdog), &(sc->sc_mtx), CALLOUT_RETURNUNLOCKED); - if (usbd_set_config_no(uaa->device, AUE_CONFIG_NO, 0)) { + error = usbd_set_config_no(uaa->device, AUE_CONFIG_NO, 0); + + if (error) { device_printf(dev, "setting config " "number failed!\n"); goto detach; @@ -870,11 +887,15 @@ struct aue_config_copy *cc, u_int16_t refcount) { struct ifnet * ifp; - u_int8_t eaddr[ETHER_ADDR_LEN]; + int error; + u_int8_t eaddr[min(ETHER_ADDR_LEN,6)]; /* reset the adapter */ aue_cfg_reset(sc); + /* set default value */ + bzero(eaddr, sizeof(eaddr)); + /* get station address from the EEPROM */ aue_cfg_read_eeprom(sc, eaddr, 0, 3); @@ -900,17 +921,20 @@ ifp->if_init = aue_init_cb; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; - /* XXX: we need Giant when we - * clobber with the bus: - * - * FIXME: right here we are locking - * in the wrong order: + /* XXX need Giant when accessing + * the device structures ! */ mtx_unlock(&(sc->sc_mtx)); mtx_lock(&Giant); + error = mii_phy_probe(sc->sc_dev, &(sc->sc_miibus), + &aue_ifmedia_upd_cb, + &aue_ifmedia_sts_cb); + + mtx_unlock(&Giant); + mtx_lock(&(sc->sc_mtx)); /* @@ -926,18 +950,13 @@ * end up getting the children deleted twice, which will crash * the system. */ - if (mii_phy_probe(sc->sc_dev, &(sc->sc_miibus), - &aue_ifmedia_upd_cb, - &aue_ifmedia_sts_cb)) { - printf("%s: MII without any PHY!\n", - sc->sc_name); - if_free(ifp); - mtx_unlock(&Giant); - goto done; + if (error) { + printf("%s: MII without any PHY!\n", + sc->sc_name); + if_free(ifp); + goto done; } - mtx_unlock(&Giant); - sc->sc_ifp = ifp; /* @@ -1081,10 +1100,6 @@ return; } -/* - * A frame has been uploaded: pass the resulting mbuf chain up to - * the higher level protocols. - */ static void aue_bulk_read_callback(struct usbd_xfer *xfer) { @@ -1100,14 +1115,12 @@ sc->sc_flags |= AUE_FLAG_READ_STALL; usbd_transfer_start(sc->sc_xfer[3]); } + DPRINTF(sc, 0, "bulk read error, %s\n", + usbd_errstr(xfer->error)); return; tr_transferred: - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - goto tr_setup; - } - if (xfer->actlen <= (4 + ETHER_CRC_LEN)) { ifp->if_ierrors++; goto tr_setup; @@ -1221,8 +1234,8 @@ } if (sc->sc_flags & AUE_FLAG_WAIT_LINK) { - /* don't send anything while a command - * is pending, or there is no link ! + /* don't send anything + * if there is no link ! */ goto done; } @@ -1277,7 +1290,7 @@ { struct ifnet * ifp = sc->sc_ifp; struct ifmultiaddr * ifma; - u_int16_t h; + u_int8_t h; u_int8_t i; bzero(cc, sizeof(*cc)); @@ -1298,9 +1311,9 @@ continue; } - h = ether_crc32_le - (LLADDR((struct sockaddr_dl *)(ifma->ifma_addr)), - ETHER_ADDR_LEN) & ((1 << AUE_BITS) - 1); + h = (ether_crc32_le + (LLADDR((struct sockaddr_dl *)(ifma->ifma_addr)), + ETHER_ADDR_LEN)) & ((1 << AUE_BITS) - 1); cc->if_hash[(h >> 3)] |= (1 << (h & 7)); } @@ -1563,7 +1576,8 @@ if (mii == NULL) { error = EINVAL; } else { - error = ifmedia_ioctl(ifp, (void *)data, &(mii->mii_media), command); + error = ifmedia_ioctl + (ifp, (void *)data, &(mii->mii_media), command); } break; @@ -1597,6 +1611,8 @@ /* * Stop the adapter and free any mbufs allocated to the * RX and TX lists. + * + * NOTE: can be called when "ifp" is NULL */ static void aue_cfg_stop(struct aue_softc *sc, ==== //depot/projects/usb/src/sys/dev/usb/if_auereg.h#4 (text+ko) ==== @@ -193,10 +193,9 @@ #define AUE_RXSTAT_DRIBBLE 0x10 #define AUE_RXSTAT_MASK 0x1E -#define AUE_INC(x, y) (x) = ((x) + 1) % (y) +#define GET_MII(sc) ((sc)->sc_miibus ? \ + device_get_softc((sc)->sc_miibus) : NULL) -#define GET_MII(sc) ((sc)->sc_miibus ? device_get_softc((sc)->sc_miibus) : NULL) - struct aue_softc { struct usbd_config_td sc_config_td; struct usbd_memory_wait sc_mem_wait; @@ -211,7 +210,6 @@ device_t sc_dev; u_int32_t sc_unit; - u_int32_t sc_media_active; u_int32_t sc_media_status; From owner-p4-projects@FreeBSD.ORG Sun Aug 6 13:19:34 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 C458B16A4DE; Sun, 6 Aug 2006 13:19:34 +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 937A116A4DA for ; Sun, 6 Aug 2006 13:19:34 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AF9C43D45 for ; Sun, 6 Aug 2006 13:19:34 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76DJYx1059995 for ; Sun, 6 Aug 2006 13:19:34 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76DJYia059992 for perforce@freebsd.org; Sun, 6 Aug 2006 13:19:34 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 13:19:34 GMT Message-Id: <200608061319.k76DJYia059992@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 103334 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: Sun, 06 Aug 2006 13:19:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=103334 Change 103334 by rwatson@rwatson_peppercorn on 2006/08/06 13:19:15 Audit ia32 system calls on ia64. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/ia64/ia32/ia32_trap.c#6 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/ia64/ia32/ia32_trap.c#6 (text+ko) ==== @@ -46,6 +46,8 @@ #include #include +#include + extern char *syscallnames[]; static void @@ -122,7 +124,9 @@ PTRACESTOP_SC(p, td, S_PT_SCE); + AUDIT_SYSCALL_ENTER(code, td); error = (*callp->sy_call)(td, args64); + AUDIT_SYSCALL_EXIT(error, td); } switch (error) { From owner-p4-projects@FreeBSD.ORG Sun Aug 6 13:21:38 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 058F616A4E5; Sun, 6 Aug 2006 13:21:38 +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 D351316A4E1 for ; Sun, 6 Aug 2006 13:21:37 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90BB043D4C for ; Sun, 6 Aug 2006 13:21:37 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76DLbbu060229 for ; Sun, 6 Aug 2006 13:21:37 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76DLbRE060226 for perforce@freebsd.org; Sun, 6 Aug 2006 13:21:37 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 13:21:37 GMT Message-Id: <200608061321.k76DLbRE060226@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 103335 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: Sun, 06 Aug 2006 13:21:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=103335 Change 103335 by rwatson@rwatson_peppercorn on 2006/08/06 13:21:12 Audit IA64 system calls. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/ia64/ia64/trap.c#10 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/ia64/ia64/trap.c#10 (text+ko) ==== @@ -72,6 +72,8 @@ #include #endif +#include + #include static int print_usertrap = 0; @@ -1016,7 +1018,9 @@ PTRACESTOP_SC(p, td, S_PT_SCE); + AUDIT_SYSCALL_ENTER(code, td); error = (*callp->sy_call)(td, args); + AUDIT_SYSCALL_EXIT(error, td); if (error != EJUSTRETURN) { /* From owner-p4-projects@FreeBSD.ORG Sun Aug 6 13:22:41 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 95DA816A4E0; Sun, 6 Aug 2006 13:22:41 +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 567D916A4DA for ; Sun, 6 Aug 2006 13:22:41 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D84443D46 for ; Sun, 6 Aug 2006 13:22:41 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76DMfFN060291 for ; Sun, 6 Aug 2006 13:22:41 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76DMefE060288 for perforce@freebsd.org; Sun, 6 Aug 2006 13:22:40 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 13:22:40 GMT Message-Id: <200608061322.k76DMefE060288@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 103336 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: Sun, 06 Aug 2006 13:22:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=103336 Change 103336 by rwatson@rwatson_peppercorn on 2006/08/06 13:22:21 Audit PowerPC system calls. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/powerpc/powerpc/trap.c#8 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/powerpc/powerpc/trap.c#8 (text+ko) ==== @@ -55,6 +55,8 @@ #endif #include +#include + #include #include #include @@ -418,7 +420,9 @@ PTRACESTOP_SC(p, td, S_PT_SCE); + AUDIT_SYSCALL_ENTER(code, td); error = (*callp->sy_call)(td, params); + AUDIT_SYSCALL_EXIT(error, td); CTR3(KTR_SYSC, "syscall: p=%s %s ret=%x", p->p_comm, syscallnames[code], td->td_retval[0]); From owner-p4-projects@FreeBSD.ORG Sun Aug 6 13:26:49 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 1764B16A4EB; Sun, 6 Aug 2006 13:26:49 +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 A624616A4DE for ; Sun, 6 Aug 2006 13:26:48 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC1DE43D64 for ; Sun, 6 Aug 2006 13:26:46 +0000 (GMT) (envelope-from rdivacky@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 k76DQkjh060519 for ; Sun, 6 Aug 2006 13:26:46 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76DQk6B060516 for perforce@freebsd.org; Sun, 6 Aug 2006 13:26:46 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 6 Aug 2006 13:26:46 GMT Message-Id: <200608061326.k76DQk6B060516@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103337 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: Sun, 06 Aug 2006 13:26:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=103337 Change 103337 by rdivacky@rdivacky_witten on 2006/08/06 13:26:24 A few small fixes: o in CLONE_PARENT_SETTID use the actual variable in sizeof o add dummy handler for CLONE_PARENT and add this flag o add handler for CLONE_THREAD which nulls exit_signal o copyout the correct pid in sched_tail Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#32 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#32 (text+ko) ==== @@ -358,7 +358,8 @@ #define CLONE_FS 0x200 #define CLONE_FILES 0x400 #define CLONE_SIGHAND 0x800 -#define CLONE_PID 0x1000 +#define CLONE_PID 0x1000 /* this flag does not exist in linux */ +#define CLONE_PARENT 0x00008000 #define CLONE_THREAD 0x10000 #define CLONE_SETTLS 0x80000 #define CLONE_CHILD_CLEARTID 0x00200000 @@ -432,13 +433,23 @@ EMUL_RUNLOCK(&emul_lock); return (EINVAL); } - error = copyout(&em->shared->group_pid, args->parent_tidptr, sizeof(td->td_proc->p_pid)); + error = copyout(&em->shared->group_pid, args->parent_tidptr, sizeof(em->shared->group_pid)); if (error) { EMUL_RUNLOCK(&emul_lock); return (error); } } + + if (args->flags & CLONE_PARENT) + printf("linux_clone: CLONE_PARENT\n"); + if (args->flags & CLONE_THREAD) { + // p2->p_pgrp = td->td_proc->p_pgrp; + // p2->p_pptr = td->td_proc->p_pptr; + exit_signal = 0; + printf("linux_clone: CLONE_THREADS\n"); + } + if (args->flags & CLONE_CHILD_SETTID) em->child_set_tid = args->child_tidptr; else @@ -1327,13 +1338,13 @@ if (em == NULL) { #ifdef DEBUG - // printf(LMSG("we didnt find emuldata for the userreting process.\n")); + printf(LMSG("we didnt find emuldata for the userreting process.\n")); #endif return; } if (em->child_set_tid != NULL) - error = copyout(&p->p_pid, em->child_set_tid, sizeof(p->p_pid)); + error = copyout(&em->shared->group_pid, em->child_set_tid, sizeof(em->shared->group_pid)); EMUL_RUNLOCK(&emul_lock); return; From owner-p4-projects@FreeBSD.ORG Sun Aug 6 13:32:31 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 1E5DF16A4E0; Sun, 6 Aug 2006 13:32:31 +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 E66F416A4DA for ; Sun, 6 Aug 2006 13:32:30 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4762F43D53 for ; Sun, 6 Aug 2006 13:32:30 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76DWUSg061989 for ; Sun, 6 Aug 2006 13:32:30 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76DVrDl061498 for perforce@freebsd.org; Sun, 6 Aug 2006 13:31:53 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 13:31:53 GMT Message-Id: <200608061331.k76DVrDl061498@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 103338 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: Sun, 06 Aug 2006 13:32:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=103338 Change 103338 by rwatson@rwatson_zoo on 2006/08/06 13:30:53 Integrate trustedbsd_mac. See @103245 for a detailed list of changes merged. Of particular note: - All syscalls now MPSAFE. This conflicted with changes to add MAC framework entry points for system calls, now believed to be resolved but possibly requiring further fixing. - NFSd associate entry point looped back. Affected files ... .. //depot/projects/trustedbsd/mac/MAINTAINERS#34 integrate .. //depot/projects/trustedbsd/mac/Makefile.inc1#67 integrate .. //depot/projects/trustedbsd/mac/ObsoleteFiles.inc#8 integrate .. //depot/projects/trustedbsd/mac/UPDATING#57 integrate .. //depot/projects/trustedbsd/mac/bin/dd/Makefile#9 integrate .. //depot/projects/trustedbsd/mac/bin/sh/histedit.c#9 integrate .. //depot/projects/trustedbsd/mac/bin/sh/parser.c#16 integrate .. //depot/projects/trustedbsd/mac/bin/sh/sh.1#24 integrate .. //depot/projects/trustedbsd/mac/bin/test/test.1#7 integrate .. //depot/projects/trustedbsd/mac/contrib/texinfo/FREEBSD-upgrade#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/CHANGES#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ChangeLog.0_9_7-stable_not-in-head#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/ChangeLog.0_9_7-stable_not-in-head_FIPS#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/Configure#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/FAQ#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/FREEBSD-Xlist#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/FREEBSD-upgrade#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/INSTALL#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/LICENSE#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/Makefile.org#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/Makefile.shared#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/NEWS#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/PROBLEMS#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/README#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/CA.pl#8 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/CA.pl.in#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/CA.sh#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/apps.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/apps.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/asn1pars.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/ca.c#8 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/ciphers.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/crl.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/der_chop#7 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/der_chop.in#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/dgst.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/dh.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/dhparam.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/dsa.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/dsaparam.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/ec.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/ecparam.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/enc.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/engine.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/gendh.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/gendsa.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/genrsa.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/ocsp.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/openssl.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/openssl.cnf#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/passwd.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/pkcs12.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/prime.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/progs.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/progs.pl#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/rand.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/req.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/rsa.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/rsautl.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/s_apps.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/s_cb.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/s_client.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/s_server.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/s_socket.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/s_time.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/sess_id.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/smime.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/speed.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/spkac.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/timeouts.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/verify.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/version.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/apps/x509.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/bugs/VC16.bug#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/ICE-CA.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/ICE-root.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/ICE-user.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/ICE.crl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/RegTP-4R.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/argena.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/argeng.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/ca-cert.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/demo/ca-cert.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/demo/dsa-ca.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/demo/dsa-pca.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/demo/nortelCA.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/demo/pca-cert.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/demo/timCA.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/demo/tjhCA.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/demo/vsigntca.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/dsa-ca.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/dsa-pca.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/expired/RegTP-4R.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/expired/factory.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/expired/rsa-cca.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/expired/vsign2.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/factory.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/nortelCA.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/pca-cert.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/rsa-cca.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/timCA.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/tjhCA.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/vsign2.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/vsigntca.pem#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/certs/wellsfgo.pem#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/comm.txt#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/comms.txt#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/config#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/LPdir_nyi.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/LPdir_unix.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/LPdir_vms.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/LPdir_win.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/LPdir_win32.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/LPdir_wince.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/aes/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/aes/aes.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/aes/aes_cbc.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/aes/aes_cfb.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/aes/aes_core.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/aes/aes_locl.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/aes/asm/aes-586.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/aes/asm/aes-ia64.S#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_bitstr.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_bool.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_bytes.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_d2i_fp.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_digest.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_dup.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_enum.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_gentm.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_hdr.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_i2d_fp.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_int.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_mbstr.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_meth.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_object.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_octet.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_print.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_set.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_sign.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_strex.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_type.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_utctm.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/a_verify.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/asn1.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/asn1_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/asn1_gen.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/asn1_lib.c#8 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/asn1_mac.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/asn1_par.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/asn1t.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/asn_moid.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/asn_pack.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/d2i_pr.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/d2i_pu.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/evp_asn1.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/i2d_pr.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/i2d_pu.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/n_pkey.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/p5_pbe.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/p5_pbev2.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/t_bitst.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/t_crl.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/t_pkey.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/t_req.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/t_spki.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/t_x509.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/tasn_dec.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/tasn_enc.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/tasn_fre.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/tasn_new.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/tasn_typ.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/tasn_utl.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/x_bignum.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/x_crl.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/x_long.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/x_name.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/x_pkey.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/x_pubkey.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/x_x509.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/asn1/x_x509a.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bf/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bf/bf_enc.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bf/bf_opts.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bf/bfspeed.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bf/bftest.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/b_dump.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/b_print.c#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/b_sock.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bf_nbio.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bio.h#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bio_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bio_lcl.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bio_lib.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bss_acpt.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bss_conn.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bss_dgram.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bss_fd.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bss_file.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bss_log.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bio/bss_sock.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.s#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.s.works#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/add.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/div.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/mul.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/mul_add.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/mul_c4.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/mul_c4.works.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/mul_c8.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/sqr.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/sqr_c4.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/sqr_c8.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha.works/sub.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/add.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/div.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/mul.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/mul_add.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/mul_c4.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/mul_c4.works.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/mul_c8.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/sqr.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/sqr_c4.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/sqr_c8.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/alpha/sub.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/bn-586.pl#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/bn-alpha.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/ca.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/co-alpha.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/mips1.s#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/pa-risc.s#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/ppc.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/r3000.s#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/sparcv8plus.S#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/asm/x86_64-gcc.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn.h#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_add.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_asm.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_blind.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_const.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_ctx.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_depr.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_div.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_exp.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_exp2.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_gcd.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_gf2m.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_kron.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_lcl.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_lib.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_mod.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_mont.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_mpi.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_mul.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_nist.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_prime.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_prime.pl#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_print.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_rand.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_recp.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_shift.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_sqr.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_sqrt.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bn_word.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/bntest.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/expspeed.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/bn/exptest.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/buffer/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/buffer/buf_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/buffer/buffer.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/buffer/buffer.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cast/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cast/cast.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cast/cast_lcl.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cast/cast_spd.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cast/castopts.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cast/casttest.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/comp/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/comp/c_zlib.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/comp/comp.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/comp/comp_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/comp/comp_lib.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/conf/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/conf/conf.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/conf/conf_def.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/conf/conf_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/conf/conf_lib.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/conf/conf_mod.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cpt_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cryptlib.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cryptlib.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/crypto.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/cversion.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/FILES0#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/asm/des_enc.m4#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/cfb64ede.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/cfb_enc.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/des.h#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/des_enc.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/des_locl.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/des_old.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/des_old.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/des_opts.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/destest.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/ecb3_enc.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/ede_cbcm_enc.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/fcrypt.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/read2pwd.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/set_key.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/speed.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/des/str2key.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dh/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dh/dh.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dh/dh_check.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dh/dh_depr.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dh/dh_err.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dh/dh_gen.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dh/dh_key.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dh/dhtest.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsa.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsa_depr.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsa_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsa_gen.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsa_key.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsa_lib.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsa_ossl.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsa_sign.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsa_vrf.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dsa/dsatest.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dso/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dso/dso.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dso/dso_dl.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dso/dso_dlfcn.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dso/dso_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dso/dso_lib.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/dso/dso_null.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ebcdic.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec2_mult.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec2_smpl.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec2_smpt.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_asn1.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_check.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_curve.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_cvt.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_err.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_key.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_lcl.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_lib.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_mult.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ec_print.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ecp_mont.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ecp_nist.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ecp_recp.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ecp_smpl.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ec/ectest.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdh/Makefile#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdh/ecdh.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdh/ecdhtest.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdh/ech_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdh/ech_key.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdh/ech_lib.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdh/ech_locl.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdh/ech_ossl.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/Makefile#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/ecdsa.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/ecdsatest.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/ecs_asn1.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/ecs_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/ecs_lib.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/ecs_locl.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/ecs_ossl.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/ecs_sign.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ecdsa/ecs_vrf.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_all.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_cnf.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_cryptodev.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_ctrl.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_dyn.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_err.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_fat.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_init.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_int.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_lib.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_list.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_openssl.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_padlock.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_pkey.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/eng_table.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/engine.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/enginetest.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw.ec#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_4758_cca.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_4758_cca_err.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_4758_cca_err.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_aep.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_aep_err.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_aep_err.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_atalla.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_atalla_err.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_atalla_err.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_cryptodev.c#4 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_cswift.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_cswift_err.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_cswift_err.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_ncipher.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_ncipher_err.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_ncipher_err.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_nuron.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_nuron_err.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_nuron_err.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_sureware.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_sureware_err.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_sureware_err.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_ubsec.c#3 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_ubsec_err.c#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/hw_ubsec_err.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/tb_cipher.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/tb_dh.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/tb_digest.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/tb_dsa.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/tb_ecdh.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/tb_ecdsa.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/tb_rand.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/tb_rsa.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/tb_store.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/vendor_defns/aep.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/vendor_defns/atalla.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/vendor_defns/cswift.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/vendor_defns/hw_4758_cca.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/vendor_defns/hw_ubsec.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/vendor_defns/hwcryptohook.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/engine/vendor_defns/sureware.h#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/err/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/err/err.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/err/err.h#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/err/err_all.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/err/err_prn.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/err/openssl.ec#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/bio_b64.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/bio_enc.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/bio_md.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/bio_ok.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/c_all.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/c_alld.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/digest.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_aes.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_bf.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_cast.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_des.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_des3.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_idea.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_null.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_old.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_rc2.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_rc4.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_rc5.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/e_xcbc_d.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/encode.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/evp.h#8 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/evp_enc.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/evp_err.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/evp_key.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/evp_lib.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/evp_pbe.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/evp_pkey.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/evp_test.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/evptests.txt#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_dss.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_dss1.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_ecdsa.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_md2.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_md4.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_md5.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_mdc2.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_null.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_ripemd.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_sha.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/m_sha1.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/names.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/p5_crpt.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/p5_crpt2.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/p_dec.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/p_enc.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/p_lib.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/p_open.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/p_seal.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/evp/p_verify.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ex_data.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/hmac/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/hmac/hmac.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/hmac/hmac.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ia64cpuid.S#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/idea/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/idea/i_skey.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/idea/idea.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/idea/idea_spd.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/idea/ideatest.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/krb5/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/krb5/krb5_asn.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/lhash/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/lhash/lhash.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/lhash/lhash.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md2/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md2/md2.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md2/md2_dgst.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md2/md2_one.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md2/md2test.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md32_common.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md4/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md4/md4.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md4/md4_dgst.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md4/md4_locl.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md4/md4_one.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md4/md4test.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md5/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md5/asm/md5-x86_64.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md5/md5.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md5/md5_dgst.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md5/md5_locl.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md5/md5_one.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/md5/md5test.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/mdc2/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/mdc2/mdc2.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/mdc2/mdc2_one.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/mdc2/mdc2dgst.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/mdc2/mdc2test.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/mem.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/mem_clr.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/mem_dbg.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/o_dir.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/o_dir.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/o_dir_test.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/o_str.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/o_str.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/o_names.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/obj_dat.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/obj_dat.h#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/obj_dat.pl#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/obj_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/obj_lib.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/obj_mac.h#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/obj_mac.num#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/objects.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/objects/objects.txt#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ocsp/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ocsp/ocsp.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ocsp/ocsp_cl.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ocsp/ocsp_err.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ocsp/ocsp_ext.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ocsp/ocsp_lib.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ocsp/ocsp_prn.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/opensslconf.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/opensslconf.h.in#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/opensslv.h#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ossl_typ.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem_all.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem_info.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem_lib.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem_oth.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem_pk8.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem_pkey.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem_seal.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pem/pem_xaux.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/perlasm/alpha.pl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/perlasm/cbc.pl#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/perlasm/x86_64-xlate.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/perlasm/x86asm.pl#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/perlasm/x86ms.pl#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/perlasm/x86nasm.pl#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/perlasm/x86unix.pl#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/p12_add.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/p12_crpt.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/p12_crt.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/p12_decr.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/p12_init.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/p12_key.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/p12_kiss.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/p12_mutl.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/p12_npas.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/pk12err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs12/pkcs12.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/bio_ber.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/example.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/pk7_asn1.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/pk7_attr.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/pk7_doit.c#9 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/pk7_lib.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/pk7_mime.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/pk7_smime.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/pkcs7.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pkcs7/pkcs7err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pqueue/Makefile#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pqueue/pq_compat.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pqueue/pq_test.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pqueue/pqueue.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/pqueue/pqueue.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/md_rand.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/rand.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/rand_egd.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/rand_err.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/rand_lib.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/rand_nw.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/rand_unix.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/rand_vms.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/rand_win.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/randfile.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rand/randtest.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc2/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc2/rc2.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc2/rc2_skey.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc2/rc2speed.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc2/rc2test.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/asm/rc4-586.pl#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/asm/rc4-ia64.S#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/rc4.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/rc4.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/rc4_enc.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/rc4_locl.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/rc4_skey.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/rc4speed.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc4/rc4test.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc5/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc5/rc5.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc5/rc5_locl.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rc5/rc5speed.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ripemd/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ripemd/ripemd.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ripemd/rmd_dgst.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ripemd/rmd_locl.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ripemd/rmd_one.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ripemd/rmdtest.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa.h#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_asn1.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_chk.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_depr.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_eay.c#8 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_err.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_gen.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_lib.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_null.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_oaep.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_pss.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_saos.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_sign.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_test.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/rsa/rsa_x931.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/asm/sha1-586.pl#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/asm/sha1-ia64.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/asm/sha512-ia64.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/asm/sha512-sse2.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha1_one.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha1dgst.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha1test.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha256.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha256t.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha512.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha512t.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha_dgst.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha_locl.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/sha_one.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sha/shatest.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/sparccpuid.S#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/stack/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/stack/safestack.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/stack/stack.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/stack/stack.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/store/Makefile#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/store/README#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/store/store.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/store/str_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/store/str_lib.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/store/str_locl.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/store/str_mem.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/store/str_meth.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/symhacks.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/threads/mttest.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/threads/th-lock.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/tmdiff.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/tmdiff.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/txt_db/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/txt_db/txt_db.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/txt_db/txt_db.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ui/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ui/ui.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ui/ui_err.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ui/ui_lib.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ui/ui_locl.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ui/ui_openssl.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/ui/ui_util.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/uid.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/by_dir.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/by_file.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509.h#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_att.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_cmp.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_lu.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_r2x.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_req.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_trs.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_txt.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_v3.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_vfy.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_vfy.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509_vpm.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509cset.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509name.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509spki.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x509type.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509/x_all.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/ext_dat.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/pcy_cache.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/pcy_data.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/pcy_int.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/pcy_lib.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/pcy_map.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/pcy_node.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/pcy_tree.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_akey.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_alt.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_bitst.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_conf.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_cpols.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_extku.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_ia5.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_info.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_int.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_lib.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_ncons.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_ocsp.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_pci.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_pcia.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_pcons.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_pmaps.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_prn.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_purp.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_skey.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_sxnet.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3_utl.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/v3err.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x509v3/x509v3.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x86_64cpuid.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/crypto/x86cpuid.pl#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/easy_tls/easy-tls.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/engines/zencod/hw_zencod.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/ssltest-ecc/ECC-RSAcertgen.sh#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/ssltest-ecc/ECCcertgen.sh#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/ssltest-ecc/README#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/ssltest-ecc/RSAcertgen.sh#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/ssltest-ecc/ssltest.sh#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/tunala/autoungunk.sh#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/tunala/cb.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/tunala/configure.in#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/tunala/test.sh#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/tunala/tunala.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/demos/tunala/tunala.h#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/HOWTO/certificates.txt#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/HOWTO/keys.txt#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/HOWTO/proxy_certificates.txt#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/CA.pl.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/asn1parse.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/ca.pod#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/config.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/dgst.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/ec.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/ecparam.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/enc.pod#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/errstr.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/req.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/s_client.pod#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/s_server.pod#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/x509.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/apps/x509v3_config.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/ASN1_STRING_print_ex.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/BIO_f_base64.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/BN_BLINDING_new.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/BN_add_word.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/BN_new.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/ERR_error_string.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/ERR_set_mark.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/EVP_BytesToKey.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/EVP_DigestInit.pod#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/EVP_EncryptInit.pod#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/EVP_SealInit.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/EVP_SignInit.pod#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/OPENSSL_Applink.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/OPENSSL_config.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/OPENSSL_ia32cap.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/PKCS12_create.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/PKCS7_sign.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/PKCS7_verify.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/RSA_sign.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/SMIME_write_PKCS7.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/X509_NAME_ENTRY_get_object.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/X509_NAME_add_entry_by_txt.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/X509_NAME_print_ex.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/blowfish.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/bn.pod#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/bn_internal.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/d2i_X509.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/d2i_X509_CRL.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/d2i_X509_REQ.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/des_modes.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/ecdsa.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/engine.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/hmac.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/threads.pod#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/crypto/x509.pod#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/fingerprints.txt#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/openssl.txt#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_CTX_get_ex_new_index.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_CTX_get_verify_mode.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_CTX_set_cert_store.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_CTX_set_info_callback.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_CTX_set_quiet_shutdown.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_CTX_use_certificate.pod#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_SESSION_get_ex_new_index.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_SESSION_get_time.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_SSL_CTX.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_ciphers.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_client_CA_list.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_current_cipher.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_default_timeout.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_error.pod#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_ex_new_index.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_fd.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_peer_cert_chain.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_peer_certificate.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_session.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_verify_result.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_get_version.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_pending.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_set_shutdown.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_shutdown.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_state_string.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/SSL_want.pod#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/d2i_SSL_SESSION.pod#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssl/ssl.pod#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/ssleay.txt#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/doc/standards.txt#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/e_os.h#8 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/e_os2.h#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/Makefile#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/axp.opt#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_4758cca.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_4758cca.ec#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_4758cca_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_4758cca_err.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_aep.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_aep.ec#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_aep_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_aep_err.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_atalla.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_atalla.ec#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_atalla_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_atalla_err.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_chil.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_chil.ec#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_chil_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_chil_err.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_cswift.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_cswift.ec#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_cswift_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_cswift_err.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_gmp.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_gmp.ec#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_gmp_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_gmp_err.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_nuron.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_nuron.ec#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_nuron_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_nuron_err.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_sureware.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_sureware.ec#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_sureware_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_sureware_err.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_ubsec.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_ubsec.ec#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_ubsec_err.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/e_ubsec_err.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/engine_vector.mar#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/vax.opt#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/vendor_defns/aep.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/vendor_defns/atalla.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/vendor_defns/cswift.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/vendor_defns/hw_4758_cca.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/vendor_defns/hw_ubsec.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/vendor_defns/hwcryptohook.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/engines/vendor_defns/sureware.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/openssl.spec#9 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/bio_ssl.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/d1_both.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/d1_clnt.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/d1_enc.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/d1_lib.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/d1_meth.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/d1_pkt.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/d1_srvr.c#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/dtls1.h#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/kssl.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/kssl.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s23_clnt.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s23_lib.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s23_meth.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s23_srvr.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s2_clnt.c#8 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s2_enc.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s2_lib.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s2_meth.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s2_srvr.c#8 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s3_both.c#5 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s3_clnt.c#10 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s3_enc.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s3_lib.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s3_meth.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s3_pkt.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/s3_srvr.c#11 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl.h#9 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl3.h#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_algs.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_asn1.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_cert.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_ciph.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_err.c#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_lib.c#8 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_locl.h#6 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_rsa.c#4 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_sess.c#9 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssl_txt.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/ssltest.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/t1_clnt.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/t1_enc.c#7 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/t1_lib.c#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/t1_meth.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/t1_srvr.c#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/ssl/tls1.h#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/CAss.cnf#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/P1ss.cnf#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/test/P2ss.cnf#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/test/Uss.cnf#2 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/bctest#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/evptests.txt#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/tcrl#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/testca#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/testenc#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/testfipsssl#2 delete .. //depot/projects/trustedbsd/mac/crypto/openssl/test/testgen#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/testss#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/testssl#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/testsslproxy#1 branch .. //depot/projects/trustedbsd/mac/crypto/openssl/test/tpkcs7#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/tpkcs7d#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/treq#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/trsa#3 integrate .. //depot/projects/trustedbsd/mac/crypto/openssl/test/tsid#3 integrate >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Aug 6 13:57:06 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 D645E16A4E1; Sun, 6 Aug 2006 13:57:05 +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 B01B916A4DE for ; Sun, 6 Aug 2006 13:57:05 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 101BE43D7C for ; Sun, 6 Aug 2006 13:57:02 +0000 (GMT) (envelope-from piso@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 k76Dv1cb076118 for ; Sun, 6 Aug 2006 13:57:01 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76Dv1bA076115 for perforce@freebsd.org; Sun, 6 Aug 2006 13:57:01 GMT (envelope-from piso@freebsd.org) Date: Sun, 6 Aug 2006 13:57:01 GMT Message-Id: <200608061357.k76Dv1bA076115@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 103339 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: Sun, 06 Aug 2006 13:57:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=103339 Change 103339 by piso@piso_newluxor on 2006/08/06 13:56:46 Re got its filter too. Affected files ... .. //depot/projects/soc2006/intr_filter/dev/re/if_re.c#8 edit .. //depot/projects/soc2006/intr_filter/pci/if_rlreg.h#4 edit Differences ... ==== //depot/projects/soc2006/intr_filter/dev/re/if_re.c#8 (text+ko) ==== @@ -241,10 +241,10 @@ static void re_poll (struct ifnet *, enum poll_cmd, int); static void re_poll_locked (struct ifnet *, enum poll_cmd, int); #endif -static int re_intr (void *); +static int re_filter (void *); static void re_tick (void *); static void re_tx_task (void *, int); -static void re_int_task (void *, int); +static void re_int_task (void *); static void re_start (struct ifnet *); static int re_ioctl (struct ifnet *, u_long, caddr_t); static void re_init (void *); @@ -1261,7 +1261,6 @@ IFQ_SET_READY(&ifp->if_snd); TASK_INIT(&sc->rl_txtask, 1, re_tx_task, ifp); - TASK_INIT(&sc->rl_inttask, 0, re_int_task, sc); /* * Call MI attach routine. @@ -1288,7 +1287,7 @@ /* Hook interrupt last to avoid having to lock softc */ error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET, - re_intr, NULL, sc, &sc->rl_intrhand); + re_filter, re_int_task, sc, &sc->rl_intrhand); if (error) { device_printf(dev, "couldn't set up irq\n"); ether_ifdetach(ifp); @@ -1900,7 +1899,7 @@ #endif /* DEVICE_POLLING */ static int -re_intr(arg) +re_filter(arg) void *arg; { struct rl_softc *sc; @@ -1915,15 +1914,12 @@ return(FILTER_STRAY); CSR_WRITE_2(sc, RL_IMR, 0); - taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_inttask); - - return(FILTER_HANDLED); + return(FILTER_HANDLED | FILTER_SCHEDULE_THREAD); } static void -re_int_task(arg, npending) +re_int_task(arg) void *arg; - int npending; { struct rl_softc *sc; struct ifnet *ifp; @@ -1976,11 +1972,6 @@ RL_UNLOCK(sc); - if ((CSR_READ_2(sc, RL_ISR) & RL_INTRS_CPLUS) || rval) { - taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_inttask); - return; - } - CSR_WRITE_2(sc, RL_IMR, RL_INTRS_CPLUS); return; ==== //depot/projects/soc2006/intr_filter/pci/if_rlreg.h#4 (text+ko) ==== @@ -732,7 +732,6 @@ #endif struct task rl_txtask; - struct task rl_inttask; struct mtx rl_intlock; int rl_txstart; From owner-p4-projects@FreeBSD.ORG Sun Aug 6 15:58:39 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 0BA2916A4E8; Sun, 6 Aug 2006 15:58:39 +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 B89FD16A4E5 for ; Sun, 6 Aug 2006 15:58:38 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6910343D6A for ; Sun, 6 Aug 2006 15:58:38 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76FwcME084537 for ; Sun, 6 Aug 2006 15:58:38 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76Fwc4u084534 for perforce@freebsd.org; Sun, 6 Aug 2006 15:58:38 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 15:58:38 GMT Message-Id: <200608061558.k76Fwc4u084534@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 103344 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: Sun, 06 Aug 2006 15:58:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=103344 Change 103344 by rwatson@rwatson_zoo on 2006/08/06 15:57:47 Correct mismerge. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_exec.c#84 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_exec.c#84 (text+ko) ==== @@ -354,8 +354,7 @@ */ ndp = &nd; NDINIT(ndp, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME | MPSAFE | - SAVESTART, - AUDITVNODE1, UIO_SYSSPACE, args->fname, td); + SAVESTART | AUDITVNODE1, UIO_SYSSPACE, args->fname, td); interpret: error = namei(ndp); From owner-p4-projects@FreeBSD.ORG Sun Aug 6 16:16:01 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 411C416A4E2; Sun, 6 Aug 2006 16:16:01 +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 E116C16A4DA for ; Sun, 6 Aug 2006 16:16:00 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ECAF43D46 for ; Sun, 6 Aug 2006 16:16:00 +0000 (GMT) (envelope-from piso@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 k76GG0OX086658 for ; Sun, 6 Aug 2006 16:16:00 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76GG0Wv086655 for perforce@freebsd.org; Sun, 6 Aug 2006 16:16:00 GMT (envelope-from piso@freebsd.org) Date: Sun, 6 Aug 2006 16:16:00 GMT Message-Id: <200608061616.k76GG0Wv086655@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 103345 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: Sun, 06 Aug 2006 16:16:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=103345 Change 103345 by piso@piso_newluxor on 2006/08/06 16:15:31 Add a comment when stray detection kicks in, and make some more code MI: adding a parameter to struct intr_event and an argument to intr_even_create will do the rest. Last commit before my summer break, see you @ 18/8 :) Affected files ... .. //depot/projects/soc2006/intr_filter/i386/i386/intr_machdep.c#11 edit Differences ... ==== //depot/projects/soc2006/intr_filter/i386/i386/intr_machdep.c#11 (text+ko) ==== @@ -78,6 +78,13 @@ static void intrcnt_updatename(struct intsrc *is); static void intrcnt_register(struct intsrc *is); +#if 0 +struct stray_stuff ss = { + .check_pending = isrc->is_pic->pic_source_pending(), + .enable_src = isrc->is_pic->pic_enable_source() +}; +#endif + /* * Register a new interrupt source with the global interrupt system. * The global interrupts need to be disabled when this function is @@ -183,18 +190,29 @@ } static void -stray_detection(void *arg __unused) +stray_detection(void *_arg) { struct intsrc *isrc; struct intr_event *ie; + void *(*walk_src)(void) = _arg; int thread; +/* + * XXX adding a parameter to struct intr_event, will make this MI, but + * to do that it's necessary to break intr_event_create and add an arg like: + * + * int (*is_pending)(void *); + * + * in that case, walk_src will return a "struct intr_event *", and... + */ + /* analyze all the interrupt sources... */ - while ((isrc = walk_intr_src()) != NULL) { + while ((isrc = walk_src()) != NULL) { ie = isrc->is_event; /* is this interrupt marked as being throttled? */ if (ie != NULL && ie->ie_count == INT_MAX) { /* and is the interrupt still pending? */ + /* XXX ... here we'll call "ie->is_pending(ie->ie_source)" */ if (isrc->is_pic->pic_source_pending(isrc)) { /* * yes, it's still pending: call filters... @@ -207,7 +225,7 @@ */ backoff++; // XXX we need thresholds... callout_reset(&callout_handle, hz*backoff, - &stray_detection, NULL); + &stray_detection, _arg); continue; } } @@ -216,7 +234,7 @@ * pending anymore: unmask it */ ie->ie_count = 0; - isrc->is_pic->pic_enable_source(isrc); + ie->ie_enable(ie->ie_source); } } } @@ -280,13 +298,13 @@ else isrc->is_pic->pic_disable_source(isrc, PIC_EOI); critical_exit(); - /* Interrupt storm logic */ if (thread & FILTER_STRAY) { + printf("Interrupt stray detected on \"%s\"; throttling interrupt source\n", ie->ie_name); ie->ie_count = INT_MAX; mtx_lock_spin(&intr_table_lock); - callout_reset(&callout_handle, hz, &stray_detection, NULL); + callout_reset(&callout_handle, hz, &stray_detection, &walk_intr_src); mtx_unlock_spin(&intr_table_lock); } From owner-p4-projects@FreeBSD.ORG Sun Aug 6 16:31:20 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 B804016A4E6; Sun, 6 Aug 2006 16:31:20 +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 9364116A4E2 for ; Sun, 6 Aug 2006 16:31:20 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D322C43D60 for ; Sun, 6 Aug 2006 16:31:19 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76GVJt6087690 for ; Sun, 6 Aug 2006 16:31:19 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76GVJYR087687 for perforce@freebsd.org; Sun, 6 Aug 2006 16:31:19 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 16:31:19 GMT Message-Id: <200608061631.k76GVJYR087687@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 103346 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: Sun, 06 Aug 2006 16:31:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=103346 Change 103346 by rwatson@rwatson_zoo on 2006/08/06 16:30:54 Update an additional send_pkt() instance added to ipfw2 for the MAC world order. Affected files ... .. //depot/projects/trustedbsd/mac/sys/netinet/ip_fw2.c#44 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/netinet/ip_fw2.c#44 (text+ko) ==== @@ -4177,7 +4177,7 @@ q->ack_fwd, TH_SYN); if (*mtailp != NULL) mtailp = &(*mtailp)->m_nextpkt; - *mtailp = send_pkt(&(q->id), q->ack_fwd - 1, + *mtailp = send_pkt(NULL, &(q->id), q->ack_fwd - 1, q->ack_rev, 0); if (*mtailp != NULL) mtailp = &(*mtailp)->m_nextpkt; From owner-p4-projects@FreeBSD.ORG Sun Aug 6 17:17: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 D1B0D16A4EB; Sun, 6 Aug 2006 17:17: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 AB62616A4E1 for ; Sun, 6 Aug 2006 17:17:36 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACD1943D7E for ; Sun, 6 Aug 2006 17:17:18 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76HHIiu099921 for ; Sun, 6 Aug 2006 17:17:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76HHIsc099918 for perforce@freebsd.org; Sun, 6 Aug 2006 17:17:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 17:17:18 GMT Message-Id: <200608061717.k76HHIsc099918@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 103348 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: Sun, 06 Aug 2006 17:17:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=103348 Change 103348 by rwatson@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 @@ -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 @@ -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} <${TOP}/conf/files.${UPPER} <${TOP}/i386/conf/${UPPER} <>${TOP}/i386/conf/${UPPER} - cat >>${TOP}/i386/conf/${UPPER} < #include -#include -#include #include #include @@ -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 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 -__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 -__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 #include @@ -50,7 +49,6 @@ #include #include #include /* Must come after sys/malloc.h */ -#include #include #include #include ==== //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 -__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 -__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 -__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 -__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 -__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 -__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@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 @@ -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 -__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 -__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 #include @@ -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 -__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 #include @@ -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 #include @@ -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(¶ms, 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, ¶ms); + inject(fd, wh, len, ¶ms); 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) <<< From owner-p4-projects@FreeBSD.ORG Sun Aug 6 17:18:21 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 C8E4216A4E0; Sun, 6 Aug 2006 17:18:21 +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 57B5716A4DD for ; Sun, 6 Aug 2006 17:18:21 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8A4643D45 for ; Sun, 6 Aug 2006 17:18:20 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k76HIK52000397 for ; Sun, 6 Aug 2006 17:18:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76HIKeC000394 for perforce@freebsd.org; Sun, 6 Aug 2006 17:18:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 6 Aug 2006 17:18:20 GMT Message-Id: <200608061718.k76HIKeC000394@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 103349 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: Sun, 06 Aug 2006 17:18:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=103349 Change 103349 by rwatson@rwatson_zoo on 2006/08/06 17:18:05 Integrate TrustedBSD MAC branch from TrustedBSD base branch; see @103348 for change description. Includes mac_nfsd_associate_label fix. Affected files ... .. //depot/projects/trustedbsd/mac/etc/defaults/rc.conf#49 integrate .. //depot/projects/trustedbsd/mac/gnu/usr.bin/groff/tmac/mdoc.local#26 integrate .. //depot/projects/trustedbsd/mac/sbin/dump/optr.c#15 integrate .. //depot/projects/trustedbsd/mac/sbin/ipfw/ipfw2.c#34 integrate .. //depot/projects/trustedbsd/mac/share/examples/drivers/make_device_driver.sh#4 integrate .. //depot/projects/trustedbsd/mac/sys/amd64/amd64/pmap.c#24 integrate .. //depot/projects/trustedbsd/mac/sys/compat/svr4/svr4_stream.c#23 integrate .. //depot/projects/trustedbsd/mac/sys/dev/usb/usbdevs#47 integrate .. //depot/projects/trustedbsd/mac/sys/dev/usb/uscanner.c#23 integrate .. //depot/projects/trustedbsd/mac/sys/i386/i386/pmap.c#55 integrate .. //depot/projects/trustedbsd/mac/sys/kern/Makefile#4 integrate .. //depot/projects/trustedbsd/mac/sys/kern/uipc_syscalls.c#57 integrate .. //depot/projects/trustedbsd/mac/sys/kern/uipc_usrreq.c#47 integrate .. //depot/projects/trustedbsd/mac/sys/kern/vfs_lookup.c#36 integrate .. //depot/projects/trustedbsd/mac/sys/kern/vfs_subr.c#86 integrate .. //depot/projects/trustedbsd/mac/sys/netatalk/ddp_usrreq.c#20 integrate .. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#263 integrate .. //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#247 integrate .. //depot/projects/trustedbsd/mac/sys/sys/param.h#49 integrate .. //depot/projects/trustedbsd/mac/sys/vm/swap_pager.c#42 integrate .. //depot/projects/trustedbsd/mac/sys/vm/vm_fault.c#38 integrate .. //depot/projects/trustedbsd/mac/sys/vm/vm_page.c#53 integrate .. //depot/projects/trustedbsd/mac/tools/tools/net80211/wlaninject/wlaninject.c#2 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/kldxref/kldxref.c#11 integrate Differences ... ==== //depot/projects/trustedbsd/mac/etc/defaults/rc.conf#49 (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/mac/gnu/usr.bin/groff/tmac/mdoc.local#26 (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/mac/sbin/dump/optr.c#15 (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 @@ -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/mac/sbin/ipfw/ipfw2.c#34 (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 @@ -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/mac/share/examples/drivers/make_device_driver.sh#4 (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} <${TOP}/conf/files.${UPPER} <${TOP}/i386/conf/${UPPER} <>${TOP}/i386/conf/${UPPER} - cat >>${TOP}/i386/conf/${UPPER} < #include -#include -#include #include #include @@ -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 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/mac/sys/amd64/amd64/pmap.c#24 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__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/mac/sys/compat/svr4/svr4_stream.c#23 (text+ko) ==== @@ -36,11 +36,10 @@ */ #include -__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 #include @@ -50,7 +49,6 @@ #include #include #include /* Must come after sys/malloc.h */ -#include #include #include #include ==== //depot/projects/trustedbsd/mac/sys/dev/usb/usbdevs#47 (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/mac/sys/dev/usb/uscanner.c#23 (text+ko) ==== @@ -5,7 +5,7 @@ */ #include -__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/mac/sys/i386/i386/pmap.c#55 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__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/mac/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/mac/sys/kern/uipc_syscalls.c#57 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__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/mac/sys/kern/uipc_usrreq.c#47 (text+ko) ==== @@ -50,7 +50,7 @@ */ #include -__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/mac/sys/kern/vfs_lookup.c#36 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__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/mac/sys/kern/vfs_subr.c#86 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__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" @@ -3141,6 +3141,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, @@ -3214,9 +3217,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; @@ -3226,7 +3231,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/mac/sys/netatalk/ddp_usrreq.c#20 (text+ko) ==== @@ -24,7 +24,7 @@ * +1-313-764-2278 * netatalk@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 @@ -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/mac/sys/security/mac_biba/mac_biba.c#263 (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 $ */ /* @@ -3088,7 +3088,7 @@ return (0); } -static int +static void mac_biba_associate_nfsd_label(struct ucred *cred) { struct mac_biba *label; @@ -3097,7 +3097,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/mac/sys/sys/mac_policy.h#247 (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. ==== //depot/projects/trustedbsd/mac/sys/sys/param.h#49 (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/mac/sys/vm/swap_pager.c#42 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include -__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/mac/sys/vm/vm_fault.c#38 (text+ko) ==== @@ -72,7 +72,7 @@ */ #include -__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 #include @@ -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/mac/sys/vm/vm_page.c#53 (text+ko) ==== @@ -97,7 +97,7 @@ */ #include -__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 #include @@ -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/mac/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 #include @@ -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(¶ms, 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, ¶ms); + inject(fd, wh, len, ¶ms); 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()"); + if (!FD_ISSET(fd2, &fds)) + continue; + if ((rc = read(fd2, buf2, sizeof(buf2))) == -1) err(1, "read()"); @@ -780,7 +817,7 @@ break; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Aug 6 17:29: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 A9DDA16A4E0; Sun, 6 Aug 2006 17:29:37 +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 5CFF416A4DE for ; Sun, 6 Aug 2006 17:29:37 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06E0643D46 for ; Sun, 6 Aug 2006 17:29:37 +0000 (GMT) (envelope-from marcel@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 k76HTafj001272 for ; Sun, 6 Aug 2006 17:29:36 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76HTatI001269 for perforce@freebsd.org; Sun, 6 Aug 2006 17:29:36 GMT (envelope-from marcel@freebsd.org) Date: Sun, 6 Aug 2006 17:29:36 GMT Message-Id: <200608061729.k76HTatI001269@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103350 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: Sun, 06 Aug 2006 17:29:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=103350 Change 103350 by marcel@marcel_nfs on 2006/08/06 17:29:29 Sync with the new world order. Affected files ... .. //depot/projects/gdb/gnu/usr.bin/gdb/libgdb/fbsd-threads.c#6 edit Differences ... ==== //depot/projects/gdb/gnu/usr.bin/gdb/libgdb/fbsd-threads.c#6 (text+ko) ==== @@ -111,22 +111,18 @@ td_event_msg_t *msg); static td_err_e (*td_thr_get_info_p) (const td_thrhandle_t *th, td_thrinfo_t *infop); -#ifdef PT_GETXMMREGS -static td_err_e (*td_thr_getxmmregs_p) (const td_thrhandle_t *th, - char *regset); -#endif +static td_err_e (*td_thr_getxregs_p) (const td_thrhandle_t *th, + void *regs); static td_err_e (*td_thr_getfpregs_p) (const td_thrhandle_t *th, - prfpregset_t *regset); + struct fpreg *regs); static td_err_e (*td_thr_getgregs_p) (const td_thrhandle_t *th, - prgregset_t gregs); -#ifdef PT_GETXMMREGS -static td_err_e (*td_thr_setxmmregs_p) (const td_thrhandle_t *th, - const char *fpregs); -#endif + struct reg *regs); +static td_err_e (*td_thr_setxregs_p) (const td_thrhandle_t *th, + const void *regs); static td_err_e (*td_thr_setfpregs_p) (const td_thrhandle_t *th, - const prfpregset_t *fpregs); + const struct fpreg *regs); static td_err_e (*td_thr_setgregs_p) (const td_thrhandle_t *th, - prgregset_t gregs); + const struct reg *regs); static td_err_e (*td_thr_event_enable_p) (const td_thrhandle_t *th, int event); static td_err_e (*td_thr_sstep_p) (td_thrhandle_t *th, int step); @@ -792,12 +788,10 @@ static void fbsd_lwp_fetch_registers (int regno) { - gregset_t gregs; - fpregset_t fpregs; + struct reg gregs; + struct fpreg fpregs; lwpid_t lwp; -#ifdef PT_GETXMMREGS - char xmmregs[512]; -#endif + char xregs[512]; if (!target_has_execution) { @@ -812,32 +806,26 @@ error ("Cannot get lwp %d registers: %s\n", lwp, safe_strerror (errno)); supply_gregset (&gregs); -#ifdef PT_GETXMMREGS - if (ptrace (PT_GETXMMREGS, lwp, xmmregs, 0) == 0) + if (ptrace (PT_GETXREGS, lwp, xregs, 0) == 0) { - i387_supply_fxsave (current_regcache, -1, xmmregs); + i387_supply_fxsave (current_regcache, -1, xregs); } else { -#endif if (ptrace (PT_GETFPREGS, lwp, (caddr_t) &fpregs, 0) == -1) error ("Cannot get lwp %d registers: %s\n ", lwp, safe_strerror (errno)); supply_fpregset (&fpregs); -#ifdef PT_GETXMMREGS } -#endif } static void fbsd_thread_fetch_registers (int regno) { - prgregset_t gregset; - prfpregset_t fpregset; + struct reg gregs; + struct fpreg fpregs; td_thrhandle_t th; td_err_e err; -#ifdef PT_GETXMMREGS - char xmmregs[512]; -#endif + char xregs[512]; if (!IS_THREAD (inferior_ptid)) { @@ -851,42 +839,36 @@ pid_to_thread_id (inferior_ptid), GET_THREAD (inferior_ptid), thread_db_err_str (err)); - err = td_thr_getgregs_p (&th, gregset); + err = td_thr_getgregs_p (&th, &gregs); if (err != TD_OK) error ("Cannot fetch general-purpose registers for thread %d: Thread ID=%ld, %s", pid_to_thread_id (inferior_ptid), GET_THREAD (inferior_ptid), thread_db_err_str (err)); -#ifdef PT_GETXMMREGS - err = td_thr_getxmmregs_p (&th, xmmregs); + err = td_thr_getxregs_p (&th, xregs); if (err == TD_OK) { - i387_supply_fxsave (current_regcache, -1, xmmregs); + i387_supply_fxsave (current_regcache, -1, xregs); } else { -#endif - err = td_thr_getfpregs_p (&th, &fpregset); + err = td_thr_getfpregs_p (&th, &fpregs); if (err != TD_OK) error ("Cannot get floating-point registers for thread %d: Thread ID=%ld, %s", pid_to_thread_id (inferior_ptid), GET_THREAD (inferior_ptid), thread_db_err_str (err)); - supply_fpregset (&fpregset); -#ifdef PT_GETXMMREGS + supply_fpregset (&fpregs); } -#endif - supply_gregset (gregset); + supply_gregset (&gregs); } static void fbsd_lwp_store_registers (int regno) { - gregset_t gregs; - fpregset_t fpregs; + struct reg gregs; + struct fpreg fpregs; lwpid_t lwp; -#ifdef PT_GETXMMREGS - char xmmregs[512]; -#endif + char xregs[512]; /* FIXME, is it possible ? */ if (!IS_LWP (inferior_ptid)) @@ -904,19 +886,17 @@ if (ptrace (PT_SETREGS, lwp, (caddr_t) &gregs, 0) == -1) error ("Cannot set lwp %d registers: %s\n", lwp, safe_strerror (errno)); -#ifdef PT_GETXMMREGS if (regno != -1) - if (ptrace (PT_GETXMMREGS, lwp, xmmregs, 0) == -1) - goto noxmm; + if (ptrace (PT_GETXREGS, lwp, xregs, 0) == -1) + goto nox; - i387_fill_fxsave (xmmregs, regno); - if (ptrace (PT_SETXMMREGS, lwp, xmmregs, 0) == -1) - goto noxmm; + i387_fill_fxsave (xregs, regno); + if (ptrace (PT_SETXREGS, lwp, xregs, 0) == -1) + goto nox; return; -noxmm: -#endif +nox: if (regno != -1) if (ptrace (PT_GETFPREGS, lwp, (caddr_t) &fpregs, 0) == -1) @@ -932,13 +912,11 @@ static void fbsd_thread_store_registers (int regno) { - prgregset_t gregset; - prfpregset_t fpregset; + struct reg gregs; + struct fpreg fpregs; td_thrhandle_t th; td_err_e err; -#ifdef PT_GETXMMREGS - char xmmregs[512]; -#endif + char xregs[512]; if (!IS_THREAD (inferior_ptid)) { @@ -958,34 +936,30 @@ char old_value[MAX_REGISTER_SIZE]; regcache_collect (regno, old_value); - err = td_thr_getgregs_p (&th, gregset); + err = td_thr_getgregs_p (&th, &gregs); if (err != TD_OK) error ("%s: td_thr_getgregs %s", __func__, thread_db_err_str (err)); - err = td_thr_getfpregs_p (&th, &fpregset); + err = td_thr_getfpregs_p (&th, &fpregs); if (err != TD_OK) error ("%s: td_thr_getfpgregs %s", __func__, thread_db_err_str (err)); supply_register (regno, old_value); } - fill_gregset (gregset, regno); - fill_fpregset (&fpregset, regno); -#ifdef PT_GETXMMREGS - i387_fill_fxsave (xmmregs, regno); -#endif + fill_gregset (&gregs, regno); + fill_fpregset (&fpregs, regno); + i387_fill_fxsave (xregs, regno); - err = td_thr_setgregs_p (&th, gregset); + err = td_thr_setgregs_p (&th, &gregs); if (err != TD_OK) error ("Cannot store general-purpose registers for thread %d: Thread ID=%d, %s", pid_to_thread_id (inferior_ptid), GET_THREAD (inferior_ptid), thread_db_err_str (err)); -#ifdef PT_GETXMMREGS - err = td_thr_setxmmregs_p (&th, xmmregs); + err = td_thr_setxregs_p (&th, xregs); if (err == TD_OK) return; -#endif - err = td_thr_setfpregs_p (&th, &fpregset); + err = td_thr_setfpregs_p (&th, &fpregs); if (err != TD_OK) error ("Cannot store floating-point registers for thread %d: Thread ID=%d, %s", pid_to_thread_id (inferior_ptid), GET_THREAD (inferior_ptid), @@ -1060,7 +1034,7 @@ td_thrhandle_t th; td_thrinfo_t ti; td_err_e err; - gregset_t gregs; + struct reg gregs; lwpid_t lwp; if (IS_THREAD (ptid)) @@ -1460,14 +1434,10 @@ resolve(td_ta_map_lwp2thr); resolve(td_ta_thr_iter); resolve(td_thr_get_info); -#ifdef PT_GETXMMREGS - resolve(td_thr_getxmmregs); -#endif + resolve(td_thr_getxregs); resolve(td_thr_getfpregs); resolve(td_thr_getgregs); -#ifdef PT_GETXMMREGS - resolve(td_thr_setxmmregs); -#endif + resolve(td_thr_setxregs); resolve(td_thr_setfpregs); resolve(td_thr_setgregs); resolve(td_thr_sstep); @@ -1586,7 +1556,7 @@ } ps_err_e -ps_lgetregs (struct ps_prochandle *ph, lwpid_t lwpid, prgregset_t gregset) +ps_lgetregs (struct ps_prochandle *ph, lwpid_t lwpid, struct reg *gregs) { struct cleanup *old_chain; @@ -1596,79 +1566,76 @@ inferior_ptid = BUILD_LWP (0, lwpid); target_fetch_registers (-1); - fill_gregset (gregset, -1); + fill_gregset (gregs, -1); do_cleanups (old_chain); return PS_OK; } ps_err_e -ps_lsetregs (struct ps_prochandle *ph, lwpid_t lwpid, const prgregset_t gregset) +ps_lsetregs (struct ps_prochandle *ph, lwpid_t lwpid, const struct reg *gregs) { struct cleanup *old_chain; old_chain = save_inferior_ptid (); inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid)); - supply_gregset (gregset); + supply_gregset (gregs); target_store_registers (-1); do_cleanups (old_chain); return PS_OK; } ps_err_e -ps_lgetfpregs (struct ps_prochandle *ph, lwpid_t lwpid, prfpregset_t *fpregset) +ps_lgetfpregs (struct ps_prochandle *ph, lwpid_t lwpid, struct fpreg *fpregs) { struct cleanup *old_chain; old_chain = save_inferior_ptid (); inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid)); target_fetch_registers (-1); - fill_fpregset (fpregset, -1); + fill_fpregset (fpregs, -1); do_cleanups (old_chain); return PS_OK; } ps_err_e ps_lsetfpregs (struct ps_prochandle *ph, lwpid_t lwpid, - const prfpregset_t *fpregset) + const struct fpreg *fpregs) { struct cleanup *old_chain; old_chain = save_inferior_ptid (); inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid)); - supply_fpregset (fpregset); + supply_fpregset (fpregs); target_store_registers (-1); do_cleanups (old_chain); return PS_OK; } -#ifdef PT_GETXMMREGS ps_err_e -ps_lgetxmmregs (struct ps_prochandle *ph, lwpid_t lwpid, char *xmmregs) +ps_lgetxregs (struct ps_prochandle *ph, lwpid_t lwpid, void *xregs) { struct cleanup *old_chain; old_chain = save_inferior_ptid (); inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid)); target_fetch_registers (-1); - i387_fill_fxsave (xmmregs, -1); + i387_fill_fxsave (xregs, -1); do_cleanups (old_chain); return PS_OK; } ps_err_e -ps_lsetxmmregs (struct ps_prochandle *ph, lwpid_t lwpid, - const char *xmmregs) +ps_lsetxregs (struct ps_prochandle *ph, lwpid_t lwpid, const void *xregs) { struct cleanup *old_chain; old_chain = save_inferior_ptid (); inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid)); - i387_supply_fxsave (current_regcache, -1, xmmregs); + i387_supply_fxsave (current_regcache, -1, xregs); target_store_registers (-1); do_cleanups (old_chain); return PS_OK; } -#endif ps_err_e ps_lstop(struct ps_prochandle *ph, lwpid_t lwpid) From owner-p4-projects@FreeBSD.ORG Sun Aug 6 18:18:02 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 4C53A16A4E9; Sun, 6 Aug 2006 18:18:02 +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 21D1216A4DA for ; Sun, 6 Aug 2006 18:18:02 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B120343D96 for ; Sun, 6 Aug 2006 18:17:37 +0000 (GMT) (envelope-from bushman@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 k76IHbjD005050 for ; Sun, 6 Aug 2006 18:17:37 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76IHb1n005047 for perforce@freebsd.org; Sun, 6 Aug 2006 18:17:37 GMT (envelope-from bushman@freebsd.org) Date: Sun, 6 Aug 2006 18:17:37 GMT Message-Id: <200608061817.k76IHb1n005047@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 103352 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: Sun, 06 Aug 2006 18:18:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=103352 Change 103352 by bushman@bushman_nss_ldap_cached on 2006/08/06 18:17:25 Testing of the SSL features made, after-fork-problems testing made, SASL testing made (not full yet) A lot of minor bugs fixed during testing. Thraded stress test is yet to go. Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/Makefile#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.h#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.h#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.h#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.h#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.h#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapschema.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapschema.h#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.h#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaptls.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaptls.h#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.h#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.h#8 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/Makefile#8 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.c#7 (text+ko) ==== @@ -192,7 +192,10 @@ int __ldap_setgrent(void *retval, void *mdata, va_list ap) { - + + if (__nss_ldap_configure() != NSS_LDAP_SUCCESS) + return (NS_UNAVAIL); + ldap_setgrent(); return (NS_UNAVAIL); } @@ -212,6 +215,9 @@ assert(mdata != NULL); + if (__nss_ldap_configure() != NSS_LDAP_SUCCESS) + return (NS_UNAVAIL); + switch ((enum nss_lookup_type)mdata) { case nss_lt_name: printf("GGG %s %d\n", __FILE__, __LINE__); ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.h#7 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.c#8 (text+ko) ==== @@ -270,7 +270,9 @@ int __ldap_setpwent(void *retval, void *mdata, va_list ap) { - + if (__nss_ldap_configure() != NSS_LDAP_SUCCESS) + return (NS_UNAVAIL); + ldap_setpwent(); return (NS_UNAVAIL); } @@ -290,6 +292,9 @@ assert(mdata != NULL); + if (__nss_ldap_configure() != NSS_LDAP_SUCCESS) + return (NS_UNAVAIL); + switch ((enum nss_lookup_type)mdata) { case nss_lt_name: name = va_arg(ap, char *); ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.h#8 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#4 (text+ko) ==== @@ -301,6 +301,8 @@ int __ldap_setservent(void *retval, void *mdata, va_list ap) { + if (__nss_ldap_configure() != NSS_LDAP_SUCCESS) + return (NS_UNAVAIL); ldap_setservent(); return (NS_UNAVAIL); @@ -320,6 +322,9 @@ assert(mdata != NULL); + if (__nss_ldap_configure() != NSS_LDAP_SUCCESS) + return (NS_UNAVAIL); + switch ((enum nss_lookup_type)mdata) { case nss_lt_name: name = va_arg(ap, char *); ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.h#4 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.c#8 (text+ko) ==== @@ -85,6 +85,7 @@ static int get_yesno(const char *str, int *value) { + printf("getyes_no %s\n", str); if (strcmp(str, "yes") == 0) { *value = NSS_LDAP_OPTION_YES; return (NSS_LDAP_SUCCESS); @@ -157,7 +158,7 @@ conf->idle_timelimit = 0; conf->search_timelimit = 0; conf->reconnect_sleeptime = 4; - conf->max_reconnect_sleeptime = 64; + conf->max_reconnect_sleeptime = 8; conf->max_conntries = 5; conf->max_reconnect_conntries = 2; conf->deref = NSS_LDAP_DEREF_NEVER; @@ -167,12 +168,11 @@ conf->restart = 0; conf->debug = 0; - conf->root_bind_dn = conf->bind_dn = strdup(""); - assert(conf->bind_dn != NULL); - conf->root_bind_pw = conf->bind_pw = strdup(""); - assert(conf->bind_pw != NULL); - conf->root_sasl_authid = conf->sasl_authid = strdup(""); - assert(conf->sasl_authid != NULL); + conf->bind_dn = NULL; + conf->bind_pw = NULL; + conf->sasl_authid = NULL; + + conf->tls_checkpeer = NSS_LDAP_OPTION_DEFAULT; //__nss_ldap_init_start_tls_simple_auth_method(&conf->connection_method); __nss_ldap_init_simple_auth_method(&conf->connection_method); @@ -437,19 +437,25 @@ } } else if (strcmp(fields[0], "restart") == 0) { if ((field_count == 2) && - (get_yesno(fields[2], &value) == - NSS_LDAP_SUCCESS)) + (get_yesno(fields[1], &value) == + NSS_LDAP_SUCCESS)) { conf->restart = value; + continue; + } } else if (strcmp(fields[0], "referrals") == 0) { if ((field_count == 2) && - (get_yesno(fields[2], &value) == - NSS_LDAP_SUCCESS)) + (get_yesno(fields[1], &value) == + NSS_LDAP_SUCCESS)) { conf->referrals = value; + continue; + } } else if (strcmp(fields[0], "rootuse_sasl") == 0) { if ((field_count == 2) && - (get_yesno(fields[2], &value) == - NSS_LDAP_SUCCESS)) + (get_yesno(fields[1], &value) == + NSS_LDAP_SUCCESS)) { conf->root_use_sasl = value; + continue; + } } else if (strcmp(fields[0], "rootsasl_auth_id") == 0) { if (field_count == 2) { free(conf->root_sasl_authid); @@ -480,6 +486,7 @@ conf->ssl_mode = NSS_LDAP_SSL_OFF; continue; } else if (strcmp(fields[1], "on") == 0) { + printf("BBBBBBBBBBBBBBBBBBBB%s %d\n", __FILE__, __LINE__); conf->ssl_mode = NSS_LDAP_SSL_ON; continue; } else if (strcmp(fields[1], "start_tls") == 0) { @@ -512,10 +519,13 @@ continue; } } else if (strcmp(fields[0], "tls_checkpeer") == 0) { + printf("field_count %d\n", field_count); if ((field_count == 2) && - (get_yesno(fields[2], &value) == - NSS_LDAP_SUCCESS)) + (get_yesno(fields[1], &value) == + NSS_LDAP_SUCCESS)) { conf->tls_checkpeer = value; + continue; + } } else if (strcmp(fields[0], "tls_cacertdir") == 0) { if (field_count == 2) { free(conf->tls_cacertdir); @@ -523,7 +533,8 @@ assert(conf->tls_cacertdir != NULL); continue; } - } else if (strcmp(fields[0], "tls_cacertfile") == 0) { + } else if ((strcmp(fields[0], "tls_cacertfile") == 0) || + (strcmp(fields[0], "tls_cacert") == 0)) { if (field_count == 2) { free(conf->tls_cacert); conf->tls_cacert = strdup(fields[1]); @@ -544,6 +555,13 @@ assert(conf->tls_ciphers); continue; } + } else if (strcmp(fields[0], "tls_cert") == 0) { + if (field_count == 2) { + free(conf->tls_cert); + conf->tls_cert = strdup(fields[1]); + assert(conf->tls_cert); + continue; + } } else if (strcmp(fields[0], "tls_key") == 0) { if (field_count == 2) { free(conf->tls_key); @@ -562,7 +580,7 @@ conf->uris = sl_init(); assert(conf->uris != NULL); - for (i = 1; i <= field_count; ++i) { + for (i = 1; i < field_count; ++i) { str = strdup(fields[i]); assert(str != NULL); rv = sl_add(conf->uris, str); @@ -570,6 +588,7 @@ /* TODO: write to logs */ } } + continue; } } break; @@ -580,6 +599,68 @@ res = NSS_LDAP_PARSE_ERROR; } fclose(fin); + + if (res == NSS_LDAP_SUCCESS) { + printf("%d -- conf->port\n", conf->port); + if ((conf->root_bind_dn == NULL) && + (conf->bind_dn != NULL)) { + conf->root_bind_dn = strdup(conf->bind_dn); + assert(conf->root_bind_dn != NULL); + } + + if ((conf->root_bind_pw == NULL) && + (conf->bind_pw != NULL)) { + conf->root_bind_pw = strdup(conf->bind_pw); + assert(conf->root_bind_pw != NULL); + } + + if ((conf->root_sasl_authid == NULL) && + (conf->sasl_authid != NULL)) { + conf->root_sasl_authid = strdup(conf->sasl_authid); + assert(conf->root_sasl_authid != NULL); + } + + printf("BBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCc %p\n", (void *)conf->sasl_authid); +#ifdef NSS_LDAP_SASL_AUTH_ENABLED + if (conf->sasl_authid == NULL) { +#endif + switch (conf->ssl_mode) { + case NSS_LDAP_SSL_OFF: + __nss_ldap_init_simple_auth_method( + &conf->connection_method); + break; + case NSS_LDAP_SSL_ON: + printf("BBBBBBBBBBBBBBBBBBBB%s %d\n", __FILE__, __LINE__); + __nss_ldap_init_ssl_simple_auth_method( + &conf->connection_method); + break; + case NSS_LDAP_SSL_START_TLS: + __nss_ldap_init_start_tls_simple_auth_method( + &conf->connection_method); + break; + default: + break; + } +#ifdef NSS_LDAP_SASL_AUTH_ENABLED + } else { + switch (conf->ssl_mode) { + case NSS_LDAP_SSL_OFF: + __nss_ldap_init_sasl_auth_method( + &conf->connection_method); + break; + case NSS_LDAP_SSL_ON: + __nss_ldap_init_ssl_sasl_auth_method( + &conf->connection_method); + break; + case NSS_LDAP_SSL_START_TLS: + __nss_ldap_init_start_tls_sasl_auth_method( + &conf->connection_method); + break; + } + } +#endif + } else + printf("CONFIG FAILED!\n"); return (res); } @@ -595,16 +676,13 @@ if (conf->uris != NULL) sl_free(conf->uris, 1); free(conf->base); - if (conf->root_bind_dn != conf->bind_dn) - free(conf->root_bind_dn); + free(conf->root_bind_dn); free(conf->bind_dn); - if (conf->root_bind_pw != conf->bind_pw) - free(conf->root_bind_pw); + free(conf->root_bind_pw); free(conf->bind_pw); free(conf->logdir); - if (conf->root_sasl_authid != conf->sasl_authid) - free(conf->root_sasl_authid); + free(conf->root_sasl_authid); free(conf->sasl_authid); free(conf->sasl_secprops); free(conf->krb5_ccname); ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.h#8 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.c#8 (text+ko) ==== @@ -47,13 +47,8 @@ static int compare_sockaddr(struct sockaddr *, struct sockaddr *); static int check_connection_socket(struct nss_ldap_connection *); -static int child_fork(struct nss_ldap_connection *, +static int check_close_connection(struct nss_ldap_connection *, struct nss_ldap_configuration *, struct nss_ldap_connection_error *); -static int parent_fork(struct nss_ldap_connection *, - struct nss_ldap_configuration *, struct nss_ldap_connection_error *); -static int prepare_fork(struct nss_ldap_connection *, - struct nss_ldap_configuration *, struct nss_ldap_connection_error *); - static int set_ssl_options(struct nss_ldap_connection *, struct nss_ldap_configuration *); @@ -74,6 +69,11 @@ socklen_t socknamelen; socklen_t peernamelen; int rv; + + if (conn->sock_fd == -1) { + printf("check_connection_socket: %d\n", conn->sock_fd); + return (NSS_LDAP_SUCCESS); + } socknamelen = sizeof(conn->sockname); peernamelen = sizeof(conn->peername); @@ -86,10 +86,12 @@ if (rv == -1) return (-1); - return (((compare_sockaddr((struct sockaddr *)conn->sockname, + rv = ((compare_sockaddr((struct sockaddr *)conn->sockname, (struct sockaddr *)sockname) == 0) && (compare_sockaddr((struct sockaddr *)conn->peername, - (struct sockaddr *)peername) == 0)) ? 0 : -1); + (struct sockaddr *)peername) == 0)) ? 0 : -1; + printf("check_connection_socket %d\n", rv); + return (rv); } static int @@ -98,8 +100,9 @@ struct nss_ldap_connection_error conn_err; int dummy_fd, backup_fd, rv; + printf("close_lost_connection: sock_fd: %d\n", conn->sock_fd); if (conn->sock_fd == -1) - return (-1); + return (NSS_LDAP_CONNECTION_ERROR); backup_fd = -1; dummy_fd = socket(PF_LOCAL, SOCK_STREAM, 0); @@ -108,8 +111,10 @@ goto fin; } + printf("close_lost_connection: dummy_fd: %d\n", dummy_fd); if (dummy_fd != conn->sock_fd) { backup_fd = dup(conn->sock_fd); + printf("close_lost_connection: backup_fd: %d\n", backup_fd); dup2(dummy_fd, conn->sock_fd); close (conn->sock_fd); @@ -120,6 +125,7 @@ if (dummy_fd != conn->sock_fd) dup2(backup_fd, conn->sock_fd); + printf("close_lost_connection: sock_fd: %d\n", conn->sock_fd); fin: if (dummy_fd != -1) close(dummy_fd); @@ -128,55 +134,21 @@ return (rv); } -static int -child_fork(struct nss_ldap_connection *conn, - struct nss_ldap_configuration *conf, - struct nss_ldap_connection_error *conn_err) -{ -} - static int -parent_fork(struct nss_ldap_connection *conn, +check_close_connection(struct nss_ldap_connection *conn, struct nss_ldap_configuration *conf, struct nss_ldap_connection_error *conn_err) { + int rv; + printf("nss_ldap: checking connection\n"); - if (check_connection_socket(conn) != 0) - return (close_lost_connection(conn)); - else - return (__nss_ldap_disconnect( - &__nss_ldap_conf->connection_method, - conn, conf, conn_err)); + if (check_connection_socket(conn) != 0) { + rv = close_lost_connection(conn); + return (NSS_LDAP_CONNECTION_ERROR); + } else + return (NSS_LDAP_SUCCESS); } -static int -prepare_fork(struct nss_ldap_connection *conn, - struct nss_ldap_configuration *conf, - struct nss_ldap_connection_error *conn_err) -{ - socklen_t socknamelen; - socklen_t peernamelen; - int off; - - if (conn->sock_fd == -1) - return (NSS_LDAP_GENERIC_ERROR); - - off = 0; - (void)setsockopt(conn->sock_fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&off, - sizeof(off)); - (void)fcntl(conn->sock_fd, F_SETFD, FD_CLOEXEC); - - socknamelen = sizeof(conn->sockname); - peernamelen = sizeof(conn->peername); - (void)getsockname(conn->sock_fd, (struct sockaddr *)&conn->sockname, - &socknamelen); - (void)getpeername(conn->sock_fd, (struct sockaddr *)&conn->peername, - &peernamelen); - - /* TODO: we should probably play with return codes a bit */ - return (NSS_LDAP_SUCCESS); -} - static int set_ssl_options(struct nss_ldap_connection *conn, struct nss_ldap_configuration *conf) @@ -184,7 +156,9 @@ int rv; rv = LDAP_SUCCESS; + printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa%s %d\n", __FILE__, __LINE__); if (conf->tls_rand != NULL) { + printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_RANDOM_FILE, conf->tls_rand); if (rv != LDAP_SUCCESS) @@ -192,6 +166,7 @@ } if (conf->tls_cacert != NULL) { + printf("%s %d %s\n", __FILE__, __LINE__, conf->tls_cacert); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, conf->tls_cacert); if (rv != LDAP_SUCCESS) @@ -199,6 +174,7 @@ } if (conf->tls_cacertdir != NULL) { + printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTDIR, conf->tls_cacertdir); if (rv != LDAP_SUCCESS) @@ -206,6 +182,7 @@ } if (conf->tls_cert != NULL) { + printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_CERTFILE, conf->tls_cert); if (rv != LDAP_SUCCESS) @@ -213,6 +190,7 @@ } if (conf->tls_ciphers != NULL) { + printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_CIPHER_SUITE, conf->tls_ciphers); if (rv != LDAP_SUCCESS) @@ -220,6 +198,7 @@ } if (conf->tls_key != NULL) { + printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_KEYFILE, conf->tls_key); if (rv != LDAP_SUCCESS) @@ -227,12 +206,14 @@ } if (conf->tls_checkpeer != NSS_LDAP_OPTION_DEFAULT) { + printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &conf->tls_checkpeer); if (rv != LDAP_SUCCESS) goto fin; } + printf("BBBBBBBBBBBBBBBBBBBBFFFFFFFFFFFFFFFF%s %d\n", __FILE__, __LINE__); fin: return (rv); } @@ -261,7 +242,8 @@ assert(conn != NULL); assert(conf != NULL); assert(err != NULL); - + + printf("%p\n", (void *)conf); return (method->auth_fn(conn, conf, err)); } @@ -278,49 +260,20 @@ return (method->disconnect_fn(conn, conf, err)); } - -int -__nss_ldap_prepare_fork(struct nss_ldap_connection_method *method, - struct nss_ldap_connection *conn, struct nss_ldap_configuration *conf, - struct nss_ldap_connection_error *err) -{ - - assert(method != NULL); - assert(conn != NULL); - assert(conf != NULL); - assert(err != NULL); - - return (method->prepare_fork_fn(conn, conf, err)); -} int -__nss_ldap_parent_fork(struct nss_ldap_connection_method *method, +__nss_ldap_check_close_connection(struct nss_ldap_connection_method *method, struct nss_ldap_connection *conn, struct nss_ldap_configuration *conf, struct nss_ldap_connection_error *err) { - assert(method != NULL); assert(conn != NULL); assert(conf != NULL); assert(err != NULL); - return (method->parent_fork_fn(conn, conf, err)); + return (method->check_close_fn(conn, conf, err)); } - -int -__nss_ldap_child_fork(struct nss_ldap_connection_method *method, - struct nss_ldap_connection *conn, struct nss_ldap_configuration *conf, - struct nss_ldap_connection_error *err) -{ - - assert(method != NULL); - assert(conn != NULL); - assert(conf != NULL); - assert(err != NULL); - - return (method->child_fork_fn(conn, conf, err)); -} - + int __nss_ldap_attach_connection(struct nss_ldap_connection *conn, LDAP *ld) { @@ -370,10 +323,11 @@ struct nss_ldap_configuration *conf, struct nss_ldap_connection_error *err) { + LDAPURLDesc url; struct nss_ldap_connection *conn; + char *ldapuri; int opt, rv; - assert(conn != NULL); assert(conf != NULL); assert(err != NULL); @@ -381,13 +335,35 @@ struct nss_ldap_connection)); assert(conn != NULL); memset(conn, 0, sizeof(struct nss_ldap_connection)); - - conn->ld = (LDAP *)ldap_init(request->host, request->port); - if (conn->ld == NULL) { + + printf("aiosfuoasf %s %d\n", __FILE__, __LINE__); + if (request->uri == NULL) { + memset( &url, 0, sizeof(url)); + url.lud_scheme = request->scheme; + url.lud_host = request->host; + url.lud_port = request->port; + url.lud_scope = LDAP_SCOPE_DEFAULT; + ldapuri = ldap_url_desc2str(&url); + + if (ldapuri == NULL) { + snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, + "cannot format the ldap URI"); + free(conn); + return (NULL); + } + + rv = ldap_initialize(&conn->ld, ldapuri); + free(ldapuri); + } else { + printf("aiosfuoasf %s %d %s\n", __FILE__, __LINE__, + request->uri); + rv = ldap_initialize(&conn->ld, request->uri); + } + + if (rv != NSS_LDAP_SUCCESS) { snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, - "ldap_init() error: %s\n", strerror(errno) - ); - err->err_num = errno; + "ldap_init() error: %s\n", ldap_err2string(rv)); + err->err_num = rv; free(conn); return (NULL); } @@ -467,11 +443,13 @@ /* TODO: write smth to logs */ } + conn->sock_fd = -2; rv = ldap_get_option(conn->ld, LDAP_OPT_DESC, &conn->sock_fd); if (rv != LDAP_SUCCESS) { conn->sock_fd = -1; /* TODO: write smth to logs */ } + printf("conn->sockfd %d %p\n", conn->sock_fd, (void *)conn->ld); rv = LDAP_SUCCESS; fin: @@ -479,6 +457,7 @@ err->err_num = rv; snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, "ldap_set_option() error: %s\n", ldap_err2string(rv)); + printf("err->description %s\n", err->description); ldap_unbind(conn->ld); free(conn); conn = NULL; @@ -497,11 +476,14 @@ char *matched_msg = NULL, *error_msg = NULL; char **referrals; LDAPControl **serverctrls; + char *err_str; struct timeval zerotime; char *bind_dn; char *bind_pw; + printf("%p\n", (void *)conf); + assert(conn != NULL); assert(conf != NULL); assert(err != NULL); @@ -523,10 +505,18 @@ /* If the returned message ID is less than zero, an error occurred. */ if ( msgid < 0 ) { /* NOTE: can't use ldap_result2error here */ - err->err_num = ldap_result2error(conn->ld, res, 0); + printf("aa%p\n", (void *)conf); + ldap_get_option(conn->ld, LDAP_OPT_ERROR_NUMBER, + (void *)&err->err_num); + printf("aa%p\n", (void *)conf); + if (ldap_get_option(conn->ld, LDAP_OPT_ERROR_STRING, + (void *)&err_str) != LDAP_SUCCESS) + err_str = NULL; snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, - "ldap_simple_bind() error: %s\n", - ldap_err2string(err->err_num)); + "ldap_simple_bind() error: %s; %s\n", + ldap_err2string(err->err_num), + err_str == NULL ? "" : err_str); + printf("aa%p %s\n", (void *)conf, err->description); return (NSS_LDAP_CONNECTION_ERROR); } @@ -536,10 +526,16 @@ switch ( rc ) { /* If ldap_result() returns -1, error occurred. */ case -1: - err->err_num = ldap_result2error(conn->ld, res, 0); + ldap_get_option(conn->ld, LDAP_OPT_ERROR_NUMBER, + (void *)&err->err_num); + if (ldap_get_option(conn->ld, LDAP_OPT_ERROR_STRING, + (void *)&err_str) != LDAP_SUCCESS) + err_str = NULL; snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, - "ldap_result() error: %s\n", - ldap_err2string(err->err_num)); + "ldap_result() error: %s; %s\n", + ldap_err2string(err->err_num), + err_str == NULL ? "" : err_str); + printf("---------------->> %s\n", err->description); return (NSS_LDAP_CONNECTION_ERROR); /* If ldap_result() returns 0, the timeout (specified by the @@ -634,6 +630,7 @@ method->connect_fn = __nss_ldap_simple_connect; method->auth_fn = __nss_ldap_simple_auth; method->disconnect_fn = __nss_ldap_simple_disconnect; + method->check_close_fn = check_close_connection; return (NSS_LDAP_SUCCESS); } @@ -653,11 +650,13 @@ if (conn == NULL) return (NULL); + printf("BBBBBBBBBBBBBBBBBBBB%s %d\n", __FILE__, __LINE__); opt = LDAP_OPT_X_TLS_HARD; rv = ldap_set_option(conn->ld, LDAP_OPT_X_TLS, &opt); if (rv != LDAP_SUCCESS) goto fin; + printf("BBBBBBBBBBBBBBBBBBBB%s %d\n", __FILE__, __LINE__); rv = set_ssl_options(conn, conf); if (rv != LDAP_SUCCESS) goto fin; @@ -676,11 +675,41 @@ } int -__nss_ldap_init_ssl_method(struct nss_ldap_connection_method *method) +__nss_ldap_init_ssl_simple_auth_method( + struct nss_ldap_connection_method *method) +{ + int rv; + assert(method != NULL); + + rv = __nss_ldap_init_simple_auth_method(method); + if (rv != NSS_LDAP_SUCCESS) + return (rv); + + /* Replacing standard connect routine with ssl-specific */ + method->connect_fn = __nss_ldap_ssl_connect; + + return (NSS_LDAP_SUCCESS); +} + +#ifdef NSS_LDAP_SASL_AUTH_ENABLED +int +__nss_ldap_init_ssl_sasl_auth_method( + struct nss_ldap_connection_method *method) { + int rv; + assert(method != NULL); + rv = __nss_ldap_init_sasl_auth_method(method); + if (rv != NSS_LDAP_SUCCESS) + return (rv); + + /* Replacing standard connect routine with start-tls specific */ + method->connect_fn = __nss_ldap_ssl_connect; + return (NSS_LDAP_SUCCESS); } +#endif /* NSS_LDAP_SASL_AUTH_ENABLED */ + #endif #if defined(NSS_LDAP_START_TLS_ENABLED) && defined(NSS_LDAP_SIMPLE_AUTH_ENABLED) @@ -783,6 +812,26 @@ return (NSS_LDAP_SUCCESS); } + +#ifdef NSS_LDAP_SASL_AUTH_ENABLED +int +__nss_ldap_init_start_tls_sasl_auth_method( + struct nss_ldap_connection_method *method) +{ + int rv; + assert(method != NULL); + + rv = __nss_ldap_init_sasl_auth_method(method); + if (rv != NSS_LDAP_SUCCESS) + return (rv); + + /* Replacing standard connect routine with start-tls specific */ + method->connect_fn = __nss_ldap_start_tls_connect; + + return (NSS_LDAP_SUCCESS); +} +#endif /* NSS_LDAP_SASL_AUTH_ENABLED */ + #endif #ifdef NSS_LDAP_SASL_AUTH_ENABLED @@ -816,6 +865,7 @@ if (interact_iter->result == NULL) return (LDAP_NO_MEMORY); #endif /* SASL_VERSION_MAJOR < 2 */ + interact_iter++; } return (LDAP_SUCCESS); @@ -827,7 +877,7 @@ struct nss_ldap_configuration *conf, struct nss_ldap_connection_error *err) { - char *pw, *dn; + char *pw, *dn, *err_str; int rv; /* Falling back to simple authentication if the config says so */ @@ -846,11 +896,37 @@ rv = ldap_sasl_interactive_bind_s(conn->ld, dn, "GSSAPI", NULL, NULL, LDAP_SASL_QUIET, nss_ldap_sasl_interact, pw); - if (rv != LDAP_SUCCESS) + if (rv != LDAP_SUCCESS) { + err->err_num = rv; + if (ldap_get_option(conn->ld, LDAP_OPT_ERROR_STRING, + (void *)&err_str) != LDAP_SUCCESS) + err_str = NULL; + snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, + "ldap_sasl_interactive_bind_s() error: %s; %s\n", + ldap_err2string(err->err_num), + err_str == NULL ? "" : err_str); + printf("---------------->> %s\n", err->description); return (NSS_LDAP_CONNECTION_ERROR); + } /* TODO: implement support for krb5-ccname config option */ return (NSS_LDAP_SUCCESS); } + +int +__nss_ldap_init_sasl_auth_method(struct nss_ldap_connection_method *method) +{ + int rv; + assert(method != NULL); + + rv = __nss_ldap_init_simple_auth_method(method); + if (rv != NSS_LDAP_SUCCESS) + return (rv); + + /* Replacing standard auth routine with SASL-specific */ + method->auth_fn = __nss_ldap_sasl_auth; + + return (NSS_LDAP_SUCCESS); +} #endif ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.h#8 (text+ko) ==== @@ -45,19 +45,19 @@ struct nss_ldap_connection_request { + char *uri; /* if it is NULL, other fields are used */ + + char *scheme; char *host; - int port; + int port; }; struct nss_ldap_connection { LDAP *ld; - int conn_type; char sockname[NSS_LDAP_SOCK_NAME_SIZE]; char peername[NSS_LDAP_SOCK_NAME_SIZE]; int sock_fd; - - void *mdata; }; struct nss_ldap_connection_error @@ -75,18 +75,12 @@ typedef int (*nss_ldap_conn_op_fn)(struct nss_ldap_connection *, struct nss_ldap_configuration *, struct nss_ldap_connection_error *); -typedef int (*nss_ldap_conn_fork_fn)(struct nss_ldap_connection *, - struct nss_ldap_configuration *, struct nss_ldap_connection_error *); - struct nss_ldap_connection_method { nss_ldap_conn_fn connect_fn; nss_ldap_conn_op_fn auth_fn; nss_ldap_conn_op_fn disconnect_fn; - - nss_ldap_conn_fork_fn prepare_fork_fn; - nss_ldap_conn_fork_fn parent_fork_fn; - nss_ldap_conn_fork_fn child_fork_fn; + nss_ldap_conn_op_fn check_close_fn; }; extern struct nss_ldap_connection *__nss_ldap_connect( @@ -102,14 +96,8 @@ struct nss_ldap_connection *, struct nss_ldap_configuration *, struct nss_ldap_connection_error *); - -extern int __nss_ldap_prepare_fork(struct nss_ldap_connection_method *, - struct nss_ldap_connection *, struct nss_ldap_configuration *, - struct nss_ldap_connection_error *); -extern int __nss_ldap_parent_fork(struct nss_ldap_connection_method *, - struct nss_ldap_connection *, struct nss_ldap_configuration *, - struct nss_ldap_connection_error *); -extern int __nss_ldap_child_fork(struct nss_ldap_connection_method *, +extern int __nss_ldap_check_close_connection( + struct nss_ldap_connection_method *, struct nss_ldap_connection *, struct nss_ldap_configuration *, struct nss_ldap_connection_error *); @@ -130,11 +118,24 @@ struct nss_ldap_connection_method *); #endif +#ifdef NSS_LDAP_SASL_AUTH_ENABLED +extern int __nss_ldap_sasl_auth(struct nss_ldap_connection *, + struct nss_ldap_configuration *, struct nss_ldap_connection_error *); +extern int __nss_ldap_init_sasl_auth_method( + struct nss_ldap_connection_method *); +#endif + #ifdef NSS_LDAP_SSL_ENABLED extern struct nss_ldap_connection *__nss_ldap_ssl_connect( struct nss_ldap_connection_request *, struct nss_ldap_configuration *, struct nss_ldap_connection_error *); -#endif +extern int __nss_ldap_init_ssl_simple_auth_method( + struct nss_ldap_connection_method *s); +#ifdef NSS_LDAP_SASL_AUTH_ENABLED +extern int __nss_ldap_init_ssl_sasl_auth_method( + struct nss_ldap_connection_method *s); +#endif /* NSS_LDAP_SASL_AUTH_ENABLED */ +#endif /* NSS_LDAP_SSL_ENABLED */ #if defined(NSS_LDAP_START_TLS_ENABLED) && defined(NSS_LDAP_SIMPLE_AUTH_ENABLED) extern struct nss_ldap_connection *__nss_ldap_start_tls_connect( @@ -143,11 +144,10 @@ extern int __nss_ldap_init_start_tls_simple_auth_method( struct nss_ldap_connection_method *); -#endif +#ifdef NSS_LDAP_SASL_AUTH_ENABLED +extern int __nss_ldap_init_start_tls_sasl_auth_method( + struct nss_ldap_connection_method *); +#endif /* NSS_LDAP_SASL_AUTH_ENABLED */ +#endif /* NSS_LDAP_START_TLS_ENABLED && NSS_LDAP_SIMPLE_AUTH_ENABLED */ -#ifdef NSS_LDAP_SASL_AUTH_ENABLED -extern int __nss_ldap_sasl_auth(struct nss_ldap_connection *, - struct nss_ldap_configuration *, struct nss_ldap_connection_error *); -#endif - #endif /* _LDAPCONN_H_ */ ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapschema.c#8 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Aug 6 18:25:03 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 5CD4716A4E0; Sun, 6 Aug 2006 18:25:03 +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 207B616A4DF for ; Sun, 6 Aug 2006 18:25:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6F9843DDE for ; Sun, 6 Aug 2006 18:23:00 +0000 (GMT) (envelope-from hselasky@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 k76IMiaA005366 for ; Sun, 6 Aug 2006 18:22:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76IMif7005363 for perforce@freebsd.org; Sun, 6 Aug 2006 18:22:44 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 6 Aug 2006 18:22:44 GMT Message-Id: <200608061822.k76IMif7005363@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103353 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: Sun, 06 Aug 2006 18:25:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=103353 Change 103353 by hselasky@hselasky_mini_itx on 2006/08/06 18:22:10 Bugfixes: Don't clear interrupt stall unless there is an error. The private mutex must allow recursation. Add some more debugging statements. Try to fix a LOR, locking order reversal problem. Change one "usbd_copy_in()" into "usbd_copy_out()". Add copyright statement. Affected files ... .. //depot/projects/usb/src/sys/dev/ata/ata-usb.c#3 edit Differences ... ==== //depot/projects/usb/src/sys/dev/ata/ata-usb.c#3 (text) ==== @@ -2,6 +2,9 @@ * Copyright (c) 2006 Søren Schmidt * All rights reserved. * + * Copyright (c) 2006 Hans Petter Selasky + * All rights reserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -112,10 +115,9 @@ u_int8_t last_xfer_no; u_int8_t reset_count; u_int8_t usb_speed; - u_int8_t intr_stall_cleared; + u_int8_t intr_stalled; u_int8_t maxlun; u_int8_t iface_no; - }; static const int atausbdebug = 0; @@ -352,7 +354,7 @@ sc->locked_ch = NULL; sc->restart_ch = NULL; sc->usb_speed = usbd_get_speed(uaa->device); - mtx_init(&(sc->locked_mtx), "ATAUSB lock", NULL, MTX_DEF); + mtx_init(&(sc->locked_mtx), "ATAUSB lock", NULL, (MTX_DEF|MTX_RECURSE)); __callout_init_mtx(&(sc->watchdog), &(sc->locked_mtx), CALLOUT_RETURNUNLOCKED); @@ -609,6 +611,7 @@ struct atausb_softc *sc = xfer->priv_sc; struct ata_request *request = sc->ata_request; struct ata_channel *ch; + u_int32_t tag; USBD_CHECK_STATUS(xfer); @@ -632,8 +635,10 @@ sc->timeout = (request->timeout * 1000) + 5000; + tag = UGETDW(sc->cbw.tag) + 1; + USETDW(sc->cbw.signature, CBWSIGNATURE); - USETDW(sc->cbw.tag, UGETDW(sc->cbw.tag) + 1); + USETDW(sc->cbw.tag, tag); USETDW(sc->cbw.transfer_length, request->bytecount); sc->cbw.flags = (request->flags & ATA_R_READ) ? CBWFLAGS_IN : CBWFLAGS_OUT; sc->cbw.lun = ch->unit; @@ -675,6 +680,12 @@ } tr_setup: + + if (atausbdebug > 1) { + device_printf(sc->dev, "%s: max_bulk=%d, ata_bytecount=%d\n", + __FUNCTION__, max_bulk, sc->ata_bytecount); + } + if (sc->ata_bytecount == 0) { atausb_transfer_start(sc, ATAUSB_T_BBB_STATUS); return; @@ -711,6 +722,11 @@ tr_setup: + if (atausbdebug > 1) { + device_printf(sc->dev, "%s: max_bulk=%d, ata_bytecount=%d\n", + __FUNCTION__, max_bulk, sc->ata_bytecount); + } + if (sc->ata_bytecount == 0) { atausb_transfer_start(sc, ATAUSB_T_BBB_STATUS); return; @@ -745,11 +761,11 @@ tr_transferred: - if (xfer->actlen != sizeof(sc->csw)) { + if (xfer->actlen < sizeof(sc->csw)) { bzero(&(sc->csw), sizeof(sc->csw)); } - usbd_copy_in(&(xfer->buf_data), 0, &(sc->csw), xfer->actlen); + usbd_copy_out(&(xfer->buf_data), 0, &(sc->csw), xfer->actlen); if (request->flags & (ATA_R_READ | ATA_R_WRITE)) { request->donecount = sc->ata_donecount; @@ -757,9 +773,8 @@ residue = UGETDW(sc->csw.residue); - if (!residue && - (request->bytecount - request->donecount)) { - residue = request->bytecount - request->donecount; + if (!residue) { + residue = (request->bytecount - request->donecount); } /* check CSW and handle eventual error */ @@ -807,7 +822,17 @@ sc->last_xfer_no = ATAUSB_T_BBB_COMMAND; sc->ata_request = NULL; + + if (atausbdebug > 1) { + device_printf(sc->dev, "%s: depreciated unlock!\n", + __FUNCTION__); + } + + mtx_unlock(xfer->priv_mtx); /* XXX depreciated! */ + ata_interrupt(device_get_softc(request->parent)); + + mtx_lock(xfer->priv_mtx); return; tr_setup: @@ -823,18 +848,23 @@ USBD_CHECK_STATUS(xfer); tr_transferred: + if (atausbdebug) { + device_printf(sc->dev, "Interrupt transfer " + "complete, %d bytes\n", xfer->actlen); + } + tr_setup: - if (!(sc->intr_stall_cleared)) { + if (sc->intr_stalled) { usbd_transfer_start(sc->xfer[ATAUSB_T_BBB_I_CLEAR_STALL]); - return; + } else { + usbd_start_hardware(xfer); } - usbd_start_hardware(xfer); return; tr_error: if (xfer->error != USBD_CANCELLED) { /* try to clear stall first */ - sc->intr_stall_cleared = 0; + sc->intr_stalled = 1; usbd_transfer_start(sc->xfer[ATAUSB_T_BBB_I_CLEAR_STALL]); } return; @@ -856,7 +886,7 @@ tr_transferred: usbd_clear_stall_tr_transferred(xfer, other_xfer); - sc->intr_stall_cleared = 1; + sc->intr_stalled = 0; usbd_transfer_start(other_xfer); return; @@ -864,7 +894,7 @@ /* bomb out (wait for watchdog to start * interrupt transfer again) */ - sc->intr_stall_cleared = 1; + sc->intr_stalled = 0; if (xfer->error != USBD_CANCELLED) { device_printf(sc->dev, "Interrupt transfer stopped!\n"); @@ -878,24 +908,34 @@ struct atausb_softc *sc = xfer->priv_sc; struct ata_request *request = sc->ata_request; + if (xfer->error != USBD_CANCELLED) { + + if (atausbdebug) { + device_printf(sc->dev, "transfer failed, %s, in state %d " + "-> BULK reset\n", usbd_errstr(xfer->error), + sc->last_xfer_no); + } + + /* start reset before any callback */ + + atausb_transfer_start(sc, ATAUSB_T_BBB_RESET1); + } + if (request) { request->result = (xfer->error == USBD_CANCELLED) ? ENXIO : EIO; sc->ata_request = NULL; + + if (atausbdebug > 1) { + device_printf(sc->dev, "%s: depreciated unlock!\n", + __FUNCTION__); + } + + mtx_unlock(xfer->priv_mtx); /* XXX depreciated! */ + ata_interrupt(device_get_softc(request->parent)); - } - if (xfer->error == USBD_CANCELLED) { - /* ignore */ - return; + mtx_lock(xfer->priv_mtx); } - - if (atausbdebug) { - device_printf(sc->dev, "transfer failed, %s, in state %d " - "-> BULK reset\n", usbd_errstr(xfer->error), - sc->last_xfer_no); - } - - atausb_transfer_start(sc, ATAUSB_T_BBB_RESET1); return; } From owner-p4-projects@FreeBSD.ORG Sun Aug 6 20:33:32 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 B3AF016A4E0; Sun, 6 Aug 2006 20:33:32 +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 75A0B16A4DE for ; Sun, 6 Aug 2006 20:33:32 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AEA643D45 for ; Sun, 6 Aug 2006 20:33:32 +0000 (GMT) (envelope-from jb@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 k76KXWB5015426 for ; Sun, 6 Aug 2006 20:33:32 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76KXVY8015423 for perforce@freebsd.org; Sun, 6 Aug 2006 20:33:31 GMT (envelope-from jb@freebsd.org) Date: Sun, 6 Aug 2006 20:33:31 GMT Message-Id: <200608062033.k76KXVY8015423@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103359 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: Sun, 06 Aug 2006 20:33:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=103359 Change 103359 by jb@jb_freebsd2 on 2006/08/06 20:32:38 Merge in KSE again, but only if the KSE kernel option is defined. Affected files ... .. //depot/projects/dtrace/src/sys/i386/i386/machdep.c#7 edit .. //depot/projects/dtrace/src/sys/kern/init_main.c#4 edit .. //depot/projects/dtrace/src/sys/kern/kern_resource.c#4 edit .. //depot/projects/dtrace/src/sys/kern/kern_switch.c#7 edit .. //depot/projects/dtrace/src/sys/kern/kern_thr.c#8 edit .. //depot/projects/dtrace/src/sys/kern/kern_thread.c#4 edit .. //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#11 edit .. //depot/projects/dtrace/src/sys/kern/tty.c#3 edit .. //depot/projects/dtrace/src/sys/posix4/ksched.c#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/i386/i386/machdep.c#7 (text+ko) ==== @@ -2079,7 +2079,11 @@ * This may be done better later if it gets more high level * components in it. If so just link td->td_proc here. */ +#ifdef KSE + proc_linkup(&proc0, &ksegrp0, &thread0); +#else proc_linkup(&proc0, &thread0); +#endif metadata_missing = 0; if (bootinfo.bi_modulep) { ==== //depot/projects/dtrace/src/sys/kern/init_main.c#4 (text+ko) ==== @@ -95,6 +95,9 @@ static struct pgrp pgrp0; struct proc proc0; struct thread thread0 __aligned(8); +#ifdef KSE +struct ksegrp ksegrp0; +#endif struct vmspace vmspace0; struct proc *initproc; @@ -221,9 +224,6 @@ if ((*sipp)->subsystem == SI_SUB_DONE) continue; -#if 0 - printf("\t*%p(%p)\n", (*sipp)->func, (*sipp)->udata); -#endif #if defined(VERBOSE_SYSINIT) if ((*sipp)->subsystem > last) { verbose = 1; @@ -274,10 +274,6 @@ /* Call function */ (*((*sipp)->func))((*sipp)->udata); -#if 0 - printf("mi_startup: pstate=0x%lx pil=0x%lx\n", - rdpr(pstate), rdpr(pil)); -#endif #if defined(VERBOSE_SYSINIT) if (verbose) @@ -392,17 +388,35 @@ struct proc *p; unsigned i; struct thread *td; +#ifdef KSE + struct ksegrp *kg; +#endif GIANT_REQUIRED; p = &proc0; td = &thread0; +#ifdef KSE + kg = &ksegrp0; +#endif /* * Initialize magic number. */ p->p_magic = P_MAGIC; +#ifdef KSE /* + * Initialize thread, process and ksegrp structures. + */ + procinit(); /* set up proc zone */ + threadinit(); /* set up thead, upcall and KSEGRP zones */ + + /* + * Initialise scheduler resources. + * Add scheduler specific parts to proc, ksegrp, thread as needed. + */ +#else + /* * Initialize thread and process structures. */ procinit(); /* set up proc zone */ @@ -412,6 +426,7 @@ * Initialise scheduler resources. * Add scheduler specific parts to proc, thread as needed. */ +#endif schedinit(); /* scheduler gets its house in order */ /* * Initialize sleep queue hash table @@ -447,8 +462,13 @@ STAILQ_INIT(&p->p_ktr); p->p_nice = NZERO; td->td_state = TDS_RUNNING; +#ifdef KSE + kg->kg_pri_class = PRI_TIMESHARE; + kg->kg_user_pri = PUSER; +#else td->td_pri_class = PRI_TIMESHARE; td->td_user_pri = PUSER; +#endif td->td_priority = PVM; td->td_base_pri = PUSER; td->td_oncpu = 0; @@ -611,7 +631,7 @@ p = td->td_proc; vfs_mountroot(); - + /* * Need just enough stack to hold the faked-up "execve()" arguments. */ @@ -687,7 +707,6 @@ args.fname = arg0; args.argv = uap; args.envv = NULL; - /* * Now try to exec the program. If can't for any reason ==== //depot/projects/dtrace/src/sys/kern/kern_resource.c#4 (text+ko) ==== @@ -292,7 +292,11 @@ { struct proc *curp; struct proc *p; +#ifdef KSE + struct ksegrp *kg; +#else struct thread *tdp; +#endif struct rtprio rtp; int cierror, error; @@ -328,14 +332,23 @@ * as leaving it zero. */ if (uap->pid == 0) { +#ifdef KSE + pri_to_rtp(td->td_ksegrp, &rtp); +#else pri_to_rtp(td, &rtp); +#endif } else { struct rtprio rtp2; rtp.type = RTP_PRIO_IDLE; rtp.prio = RTP_PRIO_MAX; +#ifdef KSE + FOREACH_KSEGRP_IN_PROC(p, kg) { + pri_to_rtp(kg, &rtp2); +#else FOREACH_THREAD_IN_PROC(p, tdp) { pri_to_rtp(tdp, &rtp2); +#endif if (rtp2.type < rtp.type || (rtp2.type == rtp.type && rtp2.prio < rtp.prio)) { @@ -376,19 +389,39 @@ } } +#ifdef KSE + /* + * If we are setting our own priority, set just our + * KSEGRP but if we are doing another process, + * do all the groups on that process. If we + * specify our own pid we do the latter. + */ +#else /* * If we are setting our own priority, set just our * thread but if we are doing another process, * do all the threads on that process. If we * specify our own pid we do the latter. */ +#endif mtx_lock_spin(&sched_lock); if (uap->pid == 0) { +#ifdef KSE + error = rtp_to_pri(&rtp, td->td_ksegrp); +#else error = rtp_to_pri(&rtp, td); +#endif } else { +#ifdef KSE + FOREACH_KSEGRP_IN_PROC(p, kg) { + if ((error = rtp_to_pri(&rtp, kg)) != 0) { + break; + } +#else FOREACH_THREAD_IN_PROC(p, td) { if ((error = rtp_to_pri(&rtp, td)) != 0) break; +#endif } } mtx_unlock_spin(&sched_lock); @@ -402,7 +435,11 @@ } int +#ifdef KSE +rtp_to_pri(struct rtprio *rtp, struct ksegrp *kg) +#else rtp_to_pri(struct rtprio *rtp, struct thread *td) +#endif { mtx_assert(&sched_lock, MA_OWNED); @@ -410,42 +447,85 @@ return (EINVAL); switch (RTP_PRIO_BASE(rtp->type)) { case RTP_PRIO_REALTIME: +#ifdef KSE + kg->kg_user_pri = PRI_MIN_REALTIME + rtp->prio; +#else td->td_user_pri = PRI_MIN_REALTIME + rtp->prio; +#endif break; case RTP_PRIO_NORMAL: +#ifdef KSE + kg->kg_user_pri = PRI_MIN_TIMESHARE + rtp->prio; +#else td->td_user_pri = PRI_MIN_TIMESHARE + rtp->prio; +#endif break; case RTP_PRIO_IDLE: +#ifdef KSE + kg->kg_user_pri = PRI_MIN_IDLE + rtp->prio; +#else td->td_user_pri = PRI_MIN_IDLE + rtp->prio; +#endif break; default: return (EINVAL); } +#ifdef KSE + sched_class(kg, rtp->type); + if (curthread->td_ksegrp == kg) { + sched_prio(curthread, kg->kg_user_pri); /* XXX dubious */ + } +#else sched_class(td, rtp->type); /* XXX fix */ if (curthread == td) sched_prio(curthread, td->td_user_pri); /* XXX dubious */ +#endif return (0); } void +#ifdef KSE +pri_to_rtp(struct ksegrp *kg, struct rtprio *rtp) +#else pri_to_rtp(struct thread *td, struct rtprio *rtp) +#endif { mtx_assert(&sched_lock, MA_OWNED); +#ifdef KSE + switch (PRI_BASE(kg->kg_pri_class)) { +#else switch (PRI_BASE(td->td_pri_class)) { +#endif case PRI_REALTIME: +#ifdef KSE + rtp->prio = kg->kg_user_pri - PRI_MIN_REALTIME; +#else rtp->prio = td->td_user_pri - PRI_MIN_REALTIME; +#endif break; case PRI_TIMESHARE: +#ifdef KSE + rtp->prio = kg->kg_user_pri - PRI_MIN_TIMESHARE; +#else rtp->prio = td->td_user_pri - PRI_MIN_TIMESHARE; +#endif break; case PRI_IDLE: +#ifdef KSE + rtp->prio = kg->kg_user_pri - PRI_MIN_IDLE; +#else rtp->prio = td->td_user_pri - PRI_MIN_IDLE; +#endif break; default: break; } +#ifdef KSE + rtp->type = kg->kg_pri_class; +#else rtp->type = td->td_pri_class; +#endif } #if defined(COMPAT_43) ==== //depot/projects/dtrace/src/sys/kern/kern_switch.c#7 (text+ko) ==== @@ -24,6 +24,69 @@ * SUCH DAMAGE. */ +#ifdef KSE +/*** +Here is the logic.. + +If there are N processors, then there are at most N KSEs (kernel +schedulable entities) working to process threads that belong to a +KSEGROUP (kg). If there are X of these KSEs actually running at the +moment in question, then there are at most M (N-X) of these KSEs on +the run queue, as running KSEs are not on the queue. + +Runnable threads are queued off the KSEGROUP in priority order. +If there are M or more threads runnable, the top M threads +(by priority) are 'preassigned' to the M KSEs not running. The KSEs take +their priority from those threads and are put on the run queue. + +The last thread that had a priority high enough to have a KSE associated +with it, AND IS ON THE RUN QUEUE is pointed to by +kg->kg_last_assigned. If no threads queued off the KSEGROUP have KSEs +assigned as all the available KSEs are activly running, or because there +are no threads queued, that pointer is NULL. + +When a KSE is removed from the run queue to become runnable, we know +it was associated with the highest priority thread in the queue (at the head +of the queue). If it is also the last assigned we know M was 1 and must +now be 0. Since the thread is no longer queued that pointer must be +removed from it. Since we know there were no more KSEs available, +(M was 1 and is now 0) and since we are not FREEING our KSE +but using it, we know there are STILL no more KSEs available, we can prove +that the next thread in the ksegrp list will not have a KSE to assign to +it, so we can show that the pointer must be made 'invalid' (NULL). + +The pointer exists so that when a new thread is made runnable, it can +have its priority compared with the last assigned thread to see if +it should 'steal' its KSE or not.. i.e. is it 'earlier' +on the list than that thread or later.. If it's earlier, then the KSE is +removed from the last assigned (which is now not assigned a KSE) +and reassigned to the new thread, which is placed earlier in the list. +The pointer is then backed up to the previous thread (which may or may not +be the new thread). + +When a thread sleeps or is removed, the KSE becomes available and if there +are queued threads that are not assigned KSEs, the highest priority one of +them is assigned the KSE, which is then placed back on the run queue at +the approipriate place, and the kg->kg_last_assigned pointer is adjusted down +to point to it. + +The following diagram shows 2 KSEs and 3 threads from a single process. + + RUNQ: --->KSE---KSE--... (KSEs queued at priorities from threads) + \ \____ + \ \ + KSEGROUP---thread--thread--thread (queued in priority order) + \ / + \_______________/ + (last_assigned) + +The result of this scheme is that the M available KSEs are always +queued at the priorities they have inherrited from the M highest priority +threads for that KSEGROUP. If this situation changes, the KSEs are +reassigned to keep this true. +***/ +#endif + #include __FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.122 2006/06/13 13:12:56 davidxu Exp $"); @@ -48,7 +111,6 @@ #include #endif - /* Uncomment this to enable logging of critical_enter/exit. */ #if 0 #define KTR_CRITICAL KTR_SCHED @@ -82,36 +144,79 @@ /************************************************************************ * Functions that manipulate runnability from a thread perspective. * ************************************************************************/ +#ifdef KSE /* + * Select the KSE that will be run next. From that find the thread, and + * remove it from the KSEGRP's run queue. If there is thread clustering, + * this will be what does it. + */ +#else +/* * Select the thread that will be run next. */ +#endif struct thread * choosethread(void) { +#ifdef KSE + struct kse *ke; +#endif struct thread *td; +#ifdef KSE + struct ksegrp *kg; +#endif #if defined(SMP) && (defined(__i386__) || defined(__amd64__)) if (smp_active == 0 && PCPU_GET(cpuid) != 0) { /* Shutting down, run idlethread on AP's */ td = PCPU_GET(idlethread); +#ifdef KSE + ke = td->td_kse; +#endif CTR1(KTR_RUNQ, "choosethread: td=%p (idle)", td); +#ifdef KSE + ke->ke_flags |= KEF_DIDRUN; +#else td->td_kse->ke_flags |= KEF_DIDRUN; +#endif TD_SET_RUNNING(td); return (td); } #endif retry: +#ifdef KSE + ke = sched_choose(); + if (ke) { + td = ke->ke_thread; + KASSERT((td->td_kse == ke), ("kse/thread mismatch")); + kg = ke->ke_ksegrp; + if (td->td_proc->p_flag & P_HADTHREADS) { + if (kg->kg_last_assigned == td) { + kg->kg_last_assigned = TAILQ_PREV(td, + threadqueue, td_runq); + } + TAILQ_REMOVE(&kg->kg_runq, td, td_runq); + } +#else td = sched_choose(); if (td) { +#endif CTR2(KTR_RUNQ, "choosethread: td=%p pri=%d", td, td->td_priority); } else { /* Simulate runq_choose() having returned the idle thread */ td = PCPU_GET(idlethread); +#ifdef KSE + ke = td->td_kse; +#endif CTR1(KTR_RUNQ, "choosethread: td=%p (idle)", td); } +#ifdef KSE + ke->ke_flags |= KEF_DIDRUN; +#else td->td_kse->ke_flags |= KEF_DIDRUN; +#endif /* * If we are in panic, only allow system threads, @@ -128,12 +233,105 @@ return (td); } +#ifdef KSE +/* + * Given a surplus system slot, try assign a new runnable thread to it. + * Called from: + * sched_thread_exit() (local) + * sched_switch() (local) + * sched_thread_exit() (local) + * remrunqueue() (local) (not at the moment) + */ +static void +slot_fill(struct ksegrp *kg) +{ + struct thread *td; + + mtx_assert(&sched_lock, MA_OWNED); + while (kg->kg_avail_opennings > 0) { + /* + * Find the first unassigned thread + */ + if ((td = kg->kg_last_assigned) != NULL) + td = TAILQ_NEXT(td, td_runq); + else + td = TAILQ_FIRST(&kg->kg_runq); + + /* + * If we found one, send it to the system scheduler. + */ + if (td) { + kg->kg_last_assigned = td; + sched_add(td, SRQ_YIELDING); + CTR2(KTR_RUNQ, "slot_fill: td%p -> kg%p", td, kg); + } else { + /* no threads to use up the slots. quit now */ + break; + } + } +} + +#ifdef SCHED_4BSD +/* + * Remove a thread from its KSEGRP's run queue. + * This in turn may remove it from a KSE if it was already assigned + * to one, possibly causing a new thread to be assigned to the KSE + * and the KSE getting a new priority. + */ +static void +remrunqueue(struct thread *td) +{ + struct thread *td2, *td3; + struct ksegrp *kg; + struct kse *ke; + + mtx_assert(&sched_lock, MA_OWNED); + KASSERT((TD_ON_RUNQ(td)), ("remrunqueue: Bad state on run queue")); + kg = td->td_ksegrp; + ke = td->td_kse; + CTR1(KTR_RUNQ, "remrunqueue: td%p", td); + TD_SET_CAN_RUN(td); + /* + * If it is not a threaded process, take the shortcut. + */ + if ((td->td_proc->p_flag & P_HADTHREADS) == 0) { + /* remve from sys run queue and free up a slot */ + sched_rem(td); + return; + } + td3 = TAILQ_PREV(td, threadqueue, td_runq); + TAILQ_REMOVE(&kg->kg_runq, td, td_runq); + if (ke->ke_state == KES_ONRUNQ) { + /* + * This thread has been assigned to the system run queue. + * We need to dissociate it and try assign the + * KSE to the next available thread. Then, we should + * see if we need to move the KSE in the run queues. + */ + sched_rem(td); + td2 = kg->kg_last_assigned; + KASSERT((td2 != NULL), ("last assigned has wrong value")); + if (td2 == td) + kg->kg_last_assigned = td3; + /* slot_fill(kg); */ /* will replace it with another */ + } +} +#endif +#endif + /* * Change the priority of a thread that is on the run queue. */ void +#ifdef KSE +adjustrunqueue( struct thread *td, int newpri) +#else adjustrunqueue(struct thread *td, int newpri) +#endif { +#ifdef KSE + struct ksegrp *kg; +#endif struct kse *ke; mtx_assert(&sched_lock, MA_OWNED); @@ -141,6 +339,44 @@ ke = td->td_kse; CTR1(KTR_RUNQ, "adjustrunqueue: td%p", td); +#ifdef KSE + /* + * If it is not a threaded process, take the shortcut. + */ + if ((td->td_proc->p_flag & P_HADTHREADS) == 0) { + /* We only care about the kse in the run queue. */ + td->td_priority = newpri; +#ifndef SCHED_CORE + if (ke->ke_rqindex != (newpri / RQ_PPQ)) +#else + if (ke->ke_rqindex != newpri) +#endif + { + sched_rem(td); + sched_add(td, SRQ_BORING); + } + return; + } + + /* It is a threaded process */ + kg = td->td_ksegrp; + if (ke->ke_state == KES_ONRUNQ +#ifdef SCHED_ULE + || ((ke->ke_flags & KEF_ASSIGNED) != 0 && + (ke->ke_flags & KEF_REMOVED) == 0) +#endif + ) { + if (kg->kg_last_assigned == td) { + kg->kg_last_assigned = + TAILQ_PREV(td, threadqueue, td_runq); + } + sched_rem(td); + } + TAILQ_REMOVE(&kg->kg_runq, td, td_runq); + TD_SET_CAN_RUN(td); + td->td_priority = newpri; + setrunqueue(td, SRQ_BORING); +#else /* We only care about the kse in the run queue. */ td->td_priority = newpri; #ifndef SCHED_CORE @@ -152,14 +388,170 @@ sched_rem(td); sched_add(td, SRQ_BORING); } +#endif +} + +#ifdef KSE +/* + * This function is called when a thread is about to be put on a + * ksegrp run queue because it has been made runnable or its + * priority has been adjusted and the ksegrp does not have a + * free kse slot. It determines if a thread from the same ksegrp + * should be preempted. If so, it tries to switch threads + * if the thread is on the same cpu or notifies another cpu that + * it should switch threads. + */ + +static void +maybe_preempt_in_ksegrp(struct thread *td) +#if !defined(SMP) +{ + struct thread *running_thread; + + mtx_assert(&sched_lock, MA_OWNED); + running_thread = curthread; + + if (running_thread->td_ksegrp != td->td_ksegrp) + return; + + if (td->td_priority >= running_thread->td_priority) + return; +#ifdef PREEMPTION +#ifndef FULL_PREEMPTION + if (td->td_priority > PRI_MAX_ITHD) { + running_thread->td_flags |= TDF_NEEDRESCHED; + return; + } +#endif /* FULL_PREEMPTION */ + + if (running_thread->td_critnest > 1) + running_thread->td_owepreempt = 1; + else + mi_switch(SW_INVOL, NULL); + +#else /* PREEMPTION */ + running_thread->td_flags |= TDF_NEEDRESCHED; +#endif /* PREEMPTION */ + return; +} + +#else /* SMP */ +{ + struct thread *running_thread; + int worst_pri; + struct ksegrp *kg; + cpumask_t cpumask,dontuse; + struct pcpu *pc; + struct pcpu *best_pcpu; + struct thread *cputhread; + + mtx_assert(&sched_lock, MA_OWNED); + + running_thread = curthread; + +#if !defined(KSEG_PEEMPT_BEST_CPU) + if (running_thread->td_ksegrp != td->td_ksegrp) { +#endif + kg = td->td_ksegrp; + + /* if someone is ahead of this thread, wait our turn */ + if (td != TAILQ_FIRST(&kg->kg_runq)) + return; + + worst_pri = td->td_priority; + best_pcpu = NULL; + dontuse = stopped_cpus | idle_cpus_mask; + + /* + * Find a cpu with the worst priority that runs at thread from + * the same ksegrp - if multiple exist give first the last run + * cpu and then the current cpu priority + */ + + SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { + cpumask = pc->pc_cpumask; + cputhread = pc->pc_curthread; + + if ((cpumask & dontuse) || + cputhread->td_ksegrp != kg) + continue; + + if (cputhread->td_priority > worst_pri) { + worst_pri = cputhread->td_priority; + best_pcpu = pc; + continue; + } + + if (cputhread->td_priority == worst_pri && + best_pcpu != NULL && + (td->td_lastcpu == pc->pc_cpuid || + (PCPU_GET(cpumask) == cpumask && + td->td_lastcpu != best_pcpu->pc_cpuid))) + best_pcpu = pc; + } + + /* Check if we need to preempt someone */ + if (best_pcpu == NULL) + return; + +#if defined(IPI_PREEMPTION) && defined(PREEMPTION) +#if !defined(FULL_PREEMPTION) + if (td->td_priority <= PRI_MAX_ITHD) +#endif /* ! FULL_PREEMPTION */ + { + ipi_selected(best_pcpu->pc_cpumask, IPI_PREEMPT); + return; + } +#endif /* defined(IPI_PREEMPTION) && defined(PREEMPTION) */ + + if (PCPU_GET(cpuid) != best_pcpu->pc_cpuid) { + best_pcpu->pc_curthread->td_flags |= TDF_NEEDRESCHED; + ipi_selected(best_pcpu->pc_cpumask, IPI_AST); + return; + } +#if !defined(KSEG_PEEMPT_BEST_CPU) + } +#endif + + if (td->td_priority >= running_thread->td_priority) + return; +#ifdef PREEMPTION + +#if !defined(FULL_PREEMPTION) + if (td->td_priority > PRI_MAX_ITHD) { + running_thread->td_flags |= TDF_NEEDRESCHED; + } +#endif /* ! FULL_PREEMPTION */ + + if (running_thread->td_critnest > 1) + running_thread->td_owepreempt = 1; + else + mi_switch(SW_INVOL, NULL); + +#else /* PREEMPTION */ + running_thread->td_flags |= TDF_NEEDRESCHED; +#endif /* PREEMPTION */ + return; } +#endif /* !SMP */ + +int limitcount; +#endif void setrunqueue(struct thread *td, int flags) { +#ifdef KSE + struct ksegrp *kg; + struct thread *td2; + struct thread *tda; + CTR3(KTR_RUNQ, "setrunqueue: td:%p kg:%p pid:%d", + td, td->td_ksegrp, td->td_proc->p_pid); +#else CTR2(KTR_RUNQ, "setrunqueue: td:%p pid:%d", td, td->td_proc->p_pid); +#endif CTR5(KTR_SCHED, "setrunqueue: %p(%s) prio %d by %p(%s)", td, td->td_proc->p_comm, td->td_priority, curthread, curthread->td_proc->p_comm); @@ -169,7 +561,101 @@ KASSERT((TD_CAN_RUN(td) || TD_IS_RUNNING(td)), ("setrunqueue: bad thread state")); TD_SET_RUNQ(td); +#ifdef KSE + kg = td->td_ksegrp; + if ((td->td_proc->p_flag & P_HADTHREADS) == 0) { + /* + * Common path optimisation: Only one of everything + * and the KSE is always already attached. + * Totally ignore the ksegrp run queue. + */ + if (kg->kg_avail_opennings != 1) { + if (limitcount < 1) { + limitcount++; + printf("pid %d: corrected slot count (%d->1)\n", + td->td_proc->p_pid, kg->kg_avail_opennings); + + } + kg->kg_avail_opennings = 1; + } + sched_add(td, flags); + return; + } + + /* + * If the concurrency has reduced, and we would go in the + * assigned section, then keep removing entries from the + * system run queue, until we are not in that section + * or there is room for us to be put in that section. + * What we MUST avoid is the case where there are threads of less + * priority than the new one scheduled, but it can not + * be scheduled itself. That would lead to a non contiguous set + * of scheduled threads, and everything would break. + */ + tda = kg->kg_last_assigned; + while ((kg->kg_avail_opennings <= 0) && + (tda && (tda->td_priority > td->td_priority))) { + /* + * None free, but there is one we can commandeer. + */ + CTR2(KTR_RUNQ, + "setrunqueue: kg:%p: take slot from td: %p", kg, tda); + sched_rem(tda); + tda = kg->kg_last_assigned = + TAILQ_PREV(tda, threadqueue, td_runq); + } + + /* + * Add the thread to the ksegrp's run queue at + * the appropriate place. + */ + TAILQ_FOREACH(td2, &kg->kg_runq, td_runq) { + if (td2->td_priority > td->td_priority) { + TAILQ_INSERT_BEFORE(td2, td, td_runq); + break; + } + } + if (td2 == NULL) { + /* We ran off the end of the TAILQ or it was empty. */ + TAILQ_INSERT_TAIL(&kg->kg_runq, td, td_runq); + } + + /* + * If we have a slot to use, then put the thread on the system + * run queue and if needed, readjust the last_assigned pointer. + * it may be that we need to schedule something anyhow + * even if the availabel slots are -ve so that + * all the items < last_assigned are scheduled. + */ + if (kg->kg_avail_opennings > 0) { + if (tda == NULL) { + /* + * No pre-existing last assigned so whoever is first + * gets the slot.. (maybe us) + */ + td2 = TAILQ_FIRST(&kg->kg_runq); + kg->kg_last_assigned = td2; + } else if (tda->td_priority > td->td_priority) { + td2 = td; + } else { + /* + * We are past last_assigned, so + * give the next slot to whatever is next, + * which may or may not be us. + */ + td2 = TAILQ_NEXT(tda, td_runq); + kg->kg_last_assigned = td2; + } + sched_add(td2, flags); + } else { + CTR3(KTR_RUNQ, "setrunqueue: held: td%p kg%p pid%d", + td, td->td_ksegrp, td->td_proc->p_pid); + if ((flags & SRQ_YIELDING) == 0) + maybe_preempt_in_ksegrp(td); + } +#else sched_add(td, flags); +#endif } /* @@ -281,6 +767,24 @@ */ MPASS(TD_ON_RUNQ(td)); MPASS(td->td_sched->ke_state != KES_ONRUNQ); +#ifdef KSE + if (td->td_proc->p_flag & P_HADTHREADS) { + /* + * If this is a threaded process we actually ARE on the + * ksegrp run queue so take it off that first. + * Also undo any damage done to the last_assigned pointer. + * XXX Fix setrunqueue so this isn't needed + */ + struct ksegrp *kg; + + kg = td->td_ksegrp; + if (kg->kg_last_assigned == td) + kg->kg_last_assigned = + TAILQ_PREV(td, threadqueue, td_runq); + TAILQ_REMOVE(&kg->kg_runq, td, td_runq); + } + +#endif TD_SET_RUNNING(td); CTR3(KTR_PROC, "preempting to thread %p (pid %d, %s)\n", td, td->td_proc->p_pid, td->td_proc->p_comm); @@ -395,10 +899,11 @@ rqh = &rq->rq_queues[pri]; CTR5(KTR_RUNQ, "runq_add: td=%p ke=%p pri=%d %d rqh=%p", ke->ke_thread, ke, ke->ke_thread->td_priority, pri, rqh); - if (flags & SRQ_PREEMPTED) + if (flags & SRQ_PREEMPTED) { TAILQ_INSERT_HEAD(rqh, ke, ke_procq); - else + } else { TAILQ_INSERT_TAIL(rqh, ke, ke_procq); + } } /* @@ -485,7 +990,11 @@ struct rqhead *rqh; int pri; +#ifdef KSE + KASSERT(ke->ke_proc->p_sflag & PS_INMEM, +#else KASSERT(ke->ke_thread->td_proc->p_sflag & PS_INMEM, +#endif ("runq_remove: process swapped out")); pri = ke->ke_rqindex; rqh = &rq->rq_queues[pri]; @@ -503,6 +1012,24 @@ #include extern struct mtx kse_zombie_lock; +#ifdef KSE +/* + * Allocate scheduler specific per-process resources. + * The thread and ksegrp have already been linked in. + * In this case just set the default concurrency value. + * + * Called from: + * proc_init() (UMA init method) + */ +void +sched_newproc(struct proc *p, struct ksegrp *kg, struct thread *td) +{ + + /* This can go in sched_fork */ + sched_init_concurrency(kg); +} +#endif + /* * thread is being either created or recycled. * Fix up the per-scheduler resources associated with it. @@ -523,4 +1050,63 @@ ke->ke_state = KES_THREAD; } +#ifdef KSE +/* + * Set up an initial concurrency of 1 + * and set the given thread (if given) to be using that + * concurrency slot. + * May be used "offline"..before the ksegrp is attached to the world + * and thus wouldn't need schedlock in that case. + * Called from: + * thr_create() + * proc_init() (UMA) via sched_newproc() + */ +void +sched_init_concurrency(struct ksegrp *kg) +{ + + CTR1(KTR_RUNQ,"kg %p init slots and concurrency to 1", kg); + kg->kg_concurrency = 1; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 7 08:21:29 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 59C7A16A4E9; Mon, 7 Aug 2006 08:21:29 +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 3079A16A4DD for ; Mon, 7 Aug 2006 08:21:29 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09F0843D46 for ; Mon, 7 Aug 2006 08:21:29 +0000 (GMT) (envelope-from gabor@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 k778LSmj022237 for ; Mon, 7 Aug 2006 08:21:28 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k778LS5f022234 for perforce@freebsd.org; Mon, 7 Aug 2006 08:21:28 GMT (envelope-from gabor@FreeBSD.org) Date: Mon, 7 Aug 2006 08:21:28 GMT Message-Id: <200608070821.k778LS5f022234@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103368 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, 07 Aug 2006 08:21:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=103368 Change 103368 by gabor@gabor_spitfire on 2006/08/07 08:20:52 Fix USE_RCORDER when DESTDIR set. Submitted by: sem Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#73 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#73 (text+ko) ==== @@ -5092,7 +5092,7 @@ @${ECHO_MSG} "===> Installing early rc.d startup script(s)" @${ECHO_CMD} "@cwd /" >> ${TMPPLIST} @for i in ${USE_RCORDER}; do \ - ${INSTALL_SCRIPT} ${WRKDIR}/$${i} /etc/rc.d/$${i%.sh}; \ + ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${DESTDIR}/etc/rc.d/$${i%.sh}; \ ${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ done @${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST} From owner-p4-projects@FreeBSD.ORG Mon Aug 7 08:27:20 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 8032D16A4E2; Mon, 7 Aug 2006 08:27:20 +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 4934516A4E0 for ; Mon, 7 Aug 2006 08:27:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F25543DC7 for ; Mon, 7 Aug 2006 08:26:37 +0000 (GMT) (envelope-from jb@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 k778QaCO022465 for ; Mon, 7 Aug 2006 08:26:36 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k778Qaj2022461 for perforce@freebsd.org; Mon, 7 Aug 2006 08:26:36 GMT (envelope-from jb@freebsd.org) Date: Mon, 7 Aug 2006 08:26:36 GMT Message-Id: <200608070826.k778Qaj2022461@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103369 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, 07 Aug 2006 08:27:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=103369 Change 103369 by jb@jb_freebsd2 on 2006/08/07 08:26:15 IFC Affected files ... .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#18 integrate .. //depot/projects/dtrace/ports/MOVED#10 integrate .. //depot/projects/dtrace/ports/UPDATING#10 integrate .. //depot/projects/dtrace/src/gnu/usr.bin/groff/tmac/mdoc.local#3 integrate .. //depot/projects/dtrace/src/sbin/dump/optr.c#4 integrate .. //depot/projects/dtrace/src/share/examples/drivers/make_device_driver.sh#3 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/pmap.c#13 integrate .. //depot/projects/dtrace/src/sys/compat/svr4/svr4_stream.c#7 integrate .. //depot/projects/dtrace/src/sys/dev/usb/usbdevs#6 integrate .. //depot/projects/dtrace/src/sys/dev/usb/uscanner.c#4 integrate .. //depot/projects/dtrace/src/sys/i386/i386/pmap.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_syscalls.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_usrreq.c#10 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_lookup.c#5 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_subr.c#9 integrate .. //depot/projects/dtrace/src/sys/netgraph/ng_pppoe.c#3 integrate .. //depot/projects/dtrace/src/sys/security/mac_biba/mac_biba.c#4 integrate .. //depot/projects/dtrace/src/sys/sparc64/sparc64/pmap.c#6 integrate .. //depot/projects/dtrace/src/sys/sys/mac_policy.h#4 integrate .. //depot/projects/dtrace/src/sys/vm/vm_fault.c#5 integrate .. //depot/projects/dtrace/src/sys/vm/vm_page.c#10 integrate .. //depot/projects/dtrace/src/tools/tools/net80211/Makefile#4 integrate .. //depot/projects/dtrace/src/tools/tools/net80211/README#2 integrate .. //depot/projects/dtrace/src/tools/tools/net80211/w00t/libw00t/w00t.c#2 integrate .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/Makefile#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/README#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/dics/Makefile#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/dics/dics.c#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/udps/Makefile#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/udps/udps.c#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/wesside/Makefile#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/wesside/wesside.c#1 branch .. //depot/projects/dtrace/www/zh_CN/includes.xsl#2 integrate .. //depot/projects/dtrace/www/zh_CN/news/news.xml#3 integrate .. //depot/projects/dtrace/www/zh_CN/news/press.xml#3 integrate Differences ... ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#18 (text+ko) ==== @@ -1,7 +1,7 @@ USE_X_PREFIX - The port installs in X11BASE, not + The port installs in X11BASE_REL, not PREFIX. @@ -6779,17 +6779,30 @@ - <makevar>PREFIX</makevar> + <makevar>PREFIX</makevar> and <makevar>DESTDIR</makevar> + + PREFIX determines the location where + the port will install. It is usually /usr/local, + or /opt. User can set PREFIX + to anything he wants. Your port must respect this variable. + + DESTDIR, if set by user, determines the + complete alternative environment, usually a jail, or an installed + system mounted elsewhere than /. + A port will actually install into + DESTDIR/PREFIX, and register + with the package database in DESTDIR/var/db/pkg. + It is very important to write ports that respect + DESTDIR. - Do try to make your port install relative to - PREFIX. The value of this variable will be set - to LOCALBASE (default + The value of PREFIX will be set + to LOCALBASE_REL (default /usr/local). If USE_X_PREFIX or USE_IMAKE is - set, PREFIX will be X11BASE (default + set, PREFIX will be X11BASE_REL (default /usr/X11R6). If USE_LINUX_PREFIX is set, PREFIX - will be LINUXBASE (default + will be LINUXBASE_REL (default /compat/linux). Avoiding the hard-coding of /usr/local or @@ -6799,7 +6812,7 @@ automatic; otherwise, this can often be done by simply replacing the occurrences of /usr/local (or /usr/X11R6 for X ports that do not use imake) - in the various scripts/Makefiles in the port to read + in the various Makefiles in the port to read ${PREFIX}, as this variable is automatically passed down to every stage of the build and install processes. @@ -6821,7 +6834,7 @@ to do that while you have it installed would do that. Do not set USE_X_PREFIX unless your port - truly requires it (i.e., it links against X libs or it needs to + truly requires it (i.e., it needs to reference files in X11BASE). The variable PREFIX can be reassigned in your @@ -6840,6 +6853,48 @@ -DPAGER=\"/usr/local/bin/less\". This way it will have a better chance of working if the system administrator has moved the whole /usr/local tree somewhere else. + + Note that LOCALBASE, + LINUXBASE, X11BASE, + DOCSDIR, EXAMPLESDIR, + DATADIR, DESKTOPDIR variables + already contain DESTDIR. Using + DESTDIR LOCALBASE is + wrong. Use LOCALBASE_REL, + LINUXBASE_REL, X11BASE_REL + if you need a variable relative to DESTDIR. + To keep things terse, TARGETDIR can be used to + replace DESTDIR PREFIX. + + Example of correct usage: + + post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/helper ${TARGETDIR}/bin/helper + ${INSTALL_DATA} ${WRKSRC}/guide.txt ${DOCSDIR} + + When referencing dependencies in the port, the + LOCALBASE is used, as we are working with + dependencies inside the target environment. For hardcoding file + paths in the software, LOCALBASE_REL must + be used, because the software will run inside the target + environment. + + Example of correct usage: + + RUN_DEPENDS= ${LOCALBASE}/share/gonzo/launch.dat:${PORTSDIR}/games/gonzo + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/gonzo/launch.dat|${LOCALBASE_REL}/share/gonzo/launch.dat}' ${WRKSRC}/main.c + @${REINPLACE_CMD} -e 's|/etc/game.conf|${PREFIX}/etc/game.conf|' ${WRKSRC}/loader.c + +post-install: + @${INSTALL_DATA} ${WRKSRC}/example/conf ${TARGETDIR}/etc/game.conf + + In packing lists and in pkg-* scripts, + %%LOCALBASE%%, %%LINUXBASE%% + and %%X11BASE%% expansions will contain paths + stripped of DESTDIR, as all these files are + processed of a context of target environment. ==== //depot/projects/dtrace/ports/MOVED#10 (text+ko) ==== @@ -1,7 +1,7 @@ # # MOVED - a list of (recently) moved or removed ports # -# $FreeBSD: ports/MOVED,v 1.1108 2006/08/04 14:57:47 acm Exp $ +# $FreeBSD: ports/MOVED,v 1.1111 2006/08/07 07:00:18 vanilla Exp $ # # Each entry consists of a single line containing the following four # fields in the order named, separated with the pipe (`|') character: @@ -2430,3 +2430,5 @@ net/svnc||2006-08-01|Has expired: mastersite gone, depends on unfetchable, antique version of vnc devel/p5-IPC-Mmap-SimpleShare||2006-08-01|Has expired devel/p5-Readonly-XS|devel/p5-Readonly|2006-08-02|p5-Readonly installs XS automatically +chinese/arnettf||2006-08-06|Renamed to chinese/CJKUnifonts +devel/SGE||2006-08-07|Has expired ==== //depot/projects/dtrace/ports/UPDATING#10 (text+ko) ==== @@ -6,6 +6,14 @@ time you update your ports collection, before attempting any port upgrades. +20060804: + AFFECTS: users of editors/jedit-devel + AUTHOR: question+fbsdports@closedsrc.org + + Starting with jEdit 4.3pre6, jedit-devel now requires Java 1.5+ to be + installed due to new features and classes used by the package. If you + cannot install or use Java 1.5, you will need to stay with jEdit 4.2. + 20060802: AFFECTS: users of www/linux-opera AUTHOR: mezz@FreeBSD.org @@ -3966,4 +3974,4 @@ 2) Update all p5-* modules. portupgrade -f p5-\* -$FreeBSD: ports/UPDATING,v 1.378 2006/08/03 18:45:53 blackend Exp $ +$FreeBSD: ports/UPDATING,v 1.379 2006/08/06 03:04:13 rafan Exp $ ==== //depot/projects/dtrace/src/gnu/usr.bin/groff/tmac/mdoc.local#3 (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/dtrace/src/sbin/dump/optr.c#4 (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.33 2006/08/05 12:50:38 rse Exp $"; + "$FreeBSD: src/sbin/dump/optr.c,v 1.35 2006/08/06 14:23:50 marck Exp $"; #endif /* not lint */ #include @@ -209,14 +209,15 @@ 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, strlen(tdone_str) - 1, tdone_str); + "%s: pass %d: %3.2f%% done, finished in %d:%02d at %s", + 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, + msg("%3.2f%% done, finished in %d:%02d at %s\n", percent, hours, mins, tdone_str); } } ==== //depot/projects/dtrace/src/share/examples/drivers/make_device_driver.sh#3 (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} <${TOP}/conf/files.${UPPER} <${TOP}/i386/conf/${UPPER} <>${TOP}/i386/conf/${UPPER} - cat >>${TOP}/i386/conf/${UPPER} < #include -#include -#include #include #include @@ -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 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/dtrace/src/sys/amd64/amd64/pmap.c#13 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__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/dtrace/src/sys/compat/svr4/svr4_stream.c#7 (text+ko) ==== @@ -36,11 +36,10 @@ */ #include -__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 #include @@ -50,7 +49,6 @@ #include #include #include /* Must come after sys/malloc.h */ -#include #include #include #include ==== //depot/projects/dtrace/src/sys/dev/usb/usbdevs#6 (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/dtrace/src/sys/dev/usb/uscanner.c#4 (text+ko) ==== @@ -5,7 +5,7 @@ */ #include -__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/dtrace/src/sys/i386/i386/pmap.c#9 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__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/dtrace/src/sys/kern/uipc_syscalls.c#9 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__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/dtrace/src/sys/kern/uipc_usrreq.c#10 (text+ko) ==== @@ -50,7 +50,7 @@ */ #include -__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" @@ -803,9 +803,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/dtrace/src/sys/kern/vfs_lookup.c#5 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.92 2006/08/05 21:08:47 rwatson 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" @@ -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 */ @@ -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 */ @@ -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/dtrace/src/sys/kern/vfs_subr.c#9 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__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/dtrace/src/sys/netgraph/ng_pppoe.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ * * Author: Julian Elischer * - * $FreeBSD: src/sys/netgraph/ng_pppoe.c,v 1.78 2006/01/27 10:56:22 glebius Exp $ + * $FreeBSD: src/sys/netgraph/ng_pppoe.c,v 1.79 2006/08/07 08:05:10 glebius Exp $ * $Whistle: ng_pppoe.c,v 1.10 1999/11/01 09:24:52 julian Exp $ */ @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -261,7 +262,7 @@ #define LEAVE(x) do { error = x; goto quit; } while(0) static void pppoe_start(sessp sp); -static void sendpacket(sessp sp); +static void ng_pppoe_sendpacket(sessp sp); static void pppoe_ticker(node_p node, hook_p hook, void *arg1, int arg2); static const struct pppoe_tag *scan_tags(sessp sp, const struct pppoe_hdr* ph); @@ -383,7 +384,8 @@ if ((i = neg->numtags++) < NUMTAGS) { neg->tags[i] = tp; } else { - printf("pppoe: asked to add too many tags to packet\n"); + log(LOG_NOTICE, "ng_pppoe: asked to add too many tags to " + "packet\n"); neg->numtags--; } } @@ -406,7 +408,7 @@ uint16_t length = 0; KASSERT((sp->neg != NULL) && (sp->neg->m != NULL), - ("%s: make_packet called from wrong state", __func__)); + ("%s: called from wrong state", __func__)); CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); dp = (char *)wh->ph.tag; @@ -415,7 +417,7 @@ tag++, count++) { tlen = ntohs((*tag)->tag_len) + sizeof(**tag); if ((length + tlen) > (ETHER_MAX_LEN - 4 - sizeof(*wh))) { - printf("pppoe: tags too long\n"); + log(LOG_NOTICE, "ng_pppoe: tags too long\n"); sp->neg->numtags = count; break; /* XXX chop off what's too long */ } @@ -714,18 +716,21 @@ case NGM_PPPOE_SERVICE: ourmsg = (struct ngpppoe_init_data *)msg->data; if (msg->header.arglen < sizeof(*ourmsg)) { - printf("pppoe: init data too small\n"); + log(LOG_ERR, "ng_pppoe[%x]: init data too " + "small\n", node->nd_ID); LEAVE(EMSGSIZE); } if (msg->header.arglen - sizeof(*ourmsg) > PPPOE_SERVICE_NAME_SIZE) { - printf("pppoe_rcvmsg: service name too big"); + log(LOG_ERR, "ng_pppoe[%x]: service name " + "too big\n", node->nd_ID); LEAVE(EMSGSIZE); } if (msg->header.arglen - sizeof(*ourmsg) < ourmsg->data_len) { - printf("pppoe: init data has bad length," - " %d should be %zd\n", ourmsg->data_len, + log(LOG_ERR, "ng_pppoe[%x]: init data has bad " + "length, %d should be %zd\n", node->nd_ID, + ourmsg->data_len, msg->header.arglen - sizeof (*ourmsg)); LEAVE(EMSGSIZE); } @@ -767,7 +772,8 @@ break; if (sp->state != PPPOE_SNONE) { - printf("pppoe: Session already active\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: Session already " + "active\n", node->nd_ID); LEAVE(EISCONN); } @@ -882,7 +888,8 @@ * If you do it twice you just overwrite. */ if (sp->state != PPPOE_PRIMED) { - printf("pppoe: Session not primed\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: session not " + "primed\n", node->nd_ID); LEAVE(EISCONN); } neg = sp->neg; @@ -1012,7 +1019,7 @@ insert_tag(sp, &uniqtag.hdr); insert_tag(sp, &sp->neg->service.hdr); make_packet(sp); - sendpacket(sp); + ng_pppoe_sendpacket(sp); } static int @@ -1105,7 +1112,8 @@ if( m->m_len < sizeof(*wh)) { m = m_pullup(m, sizeof(*wh)); /* Checks length */ if (m == NULL) { - printf("couldn't m_pullup\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: couldn't " + "m_pullup(wh)\n", node->nd_ID); LEAVE(ENOBUFS); } } @@ -1124,7 +1132,10 @@ if( m->m_len < m->m_pkthdr.len) { m = m_pullup(m, m->m_pkthdr.len); if (m == NULL) { - printf("couldn't m_pullup\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: " + "couldn't " + "m_pullup(pkthdr)\n", + node->nd_ID); LEAVE(ENOBUFS); } } @@ -1147,7 +1158,8 @@ } } if (m == NULL) { - printf("packet fragmented\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: packet " + "fragmented\n", node->nd_ID); LEAVE(EMSGSIZE); } } @@ -1204,13 +1216,15 @@ utag = get_tag(ph, PTT_HOST_UNIQ); if ((utag == NULL) || (ntohs(utag->tag_len) != sizeof(sp))) { - printf("no host unique field\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: no host " + "unique field\n", node->nd_ID); LEAVE(ENETUNREACH); } sendhook = pppoe_finduniq(node, utag); if (sendhook == NULL) { - printf("no matching session\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: no " + "matching session\n", node->nd_ID); LEAVE(ENETUNREACH); } @@ -1220,7 +1234,8 @@ */ sp = NG_HOOK_PRIVATE(sendhook); if (sp->state != PPPOE_SINIT) { - printf("session in wrong state\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: session " + "in wrong state\n", node->nd_ID); LEAVE(ENETUNREACH); } neg = sp->neg; @@ -1249,7 +1264,7 @@ scan_tags(sp, ph); make_packet(sp); sp->state = PPPOE_SREQ; - sendpacket(sp); + ng_pppoe_sendpacket(sp); break; case PADR_CODE: @@ -1311,7 +1326,7 @@ scan_tags(sp, ph); make_packet(sp); sp->state = PPPOE_NEWCONNECTED; - sendpacket(sp); + ng_pppoe_sendpacket(sp); /* * Having sent the last Negotiation header, * Set up the stored packet header to @@ -1560,7 +1575,7 @@ insert_tag(sp, &uniqtag.hdr); scan_tags(sp, ph); make_packet(sp); - sendpacket(sp); + ng_pppoe_sendpacket(sp); break; /* @@ -1655,8 +1670,9 @@ /* Generate a packet of that type. */ MGETHDR(m, M_DONTWAIT, MT_DATA); - if(m == NULL) - printf("pppoe: Session out of mbufs\n"); + if (m == NULL) + log(LOG_NOTICE, "ng_pppoe[%x]: session out of " + "mbufs\n", node->nd_ID); else { m->m_pkthdr.rcvif = NULL; m->m_pkthdr.len = m->m_len = sizeof(*wh); @@ -1749,13 +1765,14 @@ break; default: /* Timeouts have no meaning in other states. */ - printf("pppoe: unexpected timeout\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: unexpected timeout\n", + node->nd_ID); } } static void -sendpacket(sessp sp) +ng_pppoe_sendpacket(sessp sp) { struct mbuf *m0 = NULL; hook_p hook = sp->hook; @@ -1770,7 +1787,8 @@ case PPPOE_DEAD: case PPPOE_SNONE: case PPPOE_CONNECTED: - printf("pppoe: sendpacket: unexpected state\n"); + log(LOG_NOTICE, "%s: unexpected state %d\n", + __func__, sp->state); break; case PPPOE_NEWCONNECTED: >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 7 08:31:45 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 59A7516A4DE; Mon, 7 Aug 2006 08:31:45 +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 34C8716A4DA for ; Mon, 7 Aug 2006 08:31:45 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05EAD43DBD for ; Mon, 7 Aug 2006 08:29:49 +0000 (GMT) (envelope-from gabor@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 k778SdMU023010 for ; Mon, 7 Aug 2006 08:28:39 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k778SdfS023007 for perforce@freebsd.org; Mon, 7 Aug 2006 08:28:39 GMT (envelope-from gabor@FreeBSD.org) Date: Mon, 7 Aug 2006 08:28:39 GMT Message-Id: <200608070828.k778SdfS023007@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103370 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, 07 Aug 2006 08:31:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=103370 Change 103370 by gabor@gabor_spitfire on 2006/08/07 08:28:35 This change is to fix LDCONFIG_UNEXEC_CMD for DESTDIR. When deinstalling, pkg_delete runs already chrooted, so chrooting the unexec ldconfig call was wrong. Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#74 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#74 (text+ko) ==== @@ -1392,21 +1392,22 @@ .if defined(USE_LINUX_PREFIX) .if !defined(DESTDIR) LDCONFIG_CMD?= ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} +LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD} +LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG_CMD} .else LDCONFIG_CMD?= ${CHROOT} ${DESTDIR} ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} +LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD} +LDCONFIG_PLIST_UNEXEC_CMD?= ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} .endif -LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD} -LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG_CMD} .else .if !defined(DESTDIR) LDCONFIG_CMD?= ${LDCONFIG} -m ${LDCONFIG_RUNLIST} LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG} -m ${LDCONFIG_PLIST} -LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG} -R .else LDCONFIG_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_RUNLIST} LDCONFIG_PLIST_EXEC_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_PLIST} -LDCONFIG_PLIST_UNEXEC_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -R .endif +LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG} -R .endif PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg From owner-p4-projects@FreeBSD.ORG Mon Aug 7 09:47:41 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 EDCAC16A500; Mon, 7 Aug 2006 09:47:40 +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 A639D16A4FB for ; Mon, 7 Aug 2006 09:47:40 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 260CB43DBD for ; Mon, 7 Aug 2006 09:47:19 +0000 (GMT) (envelope-from jb@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 k779lIgC039713 for ; Mon, 7 Aug 2006 09:47:19 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k779lIdW039710 for perforce@freebsd.org; Mon, 7 Aug 2006 09:47:18 GMT (envelope-from jb@freebsd.org) Date: Mon, 7 Aug 2006 09:47:18 GMT Message-Id: <200608070947.k779lIdW039710@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103374 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, 07 Aug 2006 09:47:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=103374 Change 103374 by jb@jb_freebsd2 on 2006/08/07 09:47:13 Fix a merge problem with the NOKSE (aka bike_sched) case. Affected files ... .. //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#12 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#12 (text+ko) ==== @@ -913,8 +913,19 @@ void sched_exit(struct proc *p, struct thread *td) { +#ifdef KSE sched_exit_ksegrp(FIRST_KSEGRP_IN_PROC(p), td); sched_exit_thread(FIRST_THREAD_IN_PROC(p), td); +#else + struct thread *parent = FIRST_THREAD_IN_PROC(p); + + CTR3(KTR_SCHED, "sched_exit: %p(%s) prio %d", + td, td->td_proc->p_comm, td->td_priority); + + parent->td_estcpu = ESTCPULIM(parent->td_estcpu + td->td_estcpu); + if ((td->td_proc->p_flag & P_NOLOAD) == 0) + sched_load_rem(); +#endif } #ifdef KSE @@ -939,10 +950,16 @@ void sched_fork(struct thread *td, struct thread *childtd) { +#ifdef KSE sched_fork_ksegrp(td, childtd->td_ksegrp); sched_fork_thread(td, childtd); +#else + childtd->td_estcpu = td->td_estcpu; + sched_newthread(childtd); +#endif } +#ifdef KSE void sched_fork_ksegrp(struct thread *td, struct ksegrp *child) { @@ -955,6 +972,7 @@ { sched_newthread(childtd); } +#endif void sched_nice(struct proc *p, int nice) From owner-p4-projects@FreeBSD.ORG Mon Aug 7 11:14:12 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 66C8716A4E6; Mon, 7 Aug 2006 11:14:12 +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 08FD616A4E1 for ; Mon, 7 Aug 2006 11:14:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 962AF43D82 for ; Mon, 7 Aug 2006 11:14:08 +0000 (GMT) (envelope-from hselasky@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 k77BE8D1048899 for ; Mon, 7 Aug 2006 11:14:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77BE8eo048896 for perforce@freebsd.org; Mon, 7 Aug 2006 11:14:08 GMT (envelope-from hselasky@FreeBSD.org) Date: Mon, 7 Aug 2006 11:14:08 GMT Message-Id: <200608071114.k77BE8eo048896@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103378 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, 07 Aug 2006 11:14:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=103378 Change 103378 by hselasky@hselasky_mini_itx on 2006/08/07 11:13:37 Finished converting if_cdce. Lots of changes. Please test. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_cdce.c#4 edit .. //depot/projects/usb/src/sys/dev/usb/if_cdcereg.h#3 add Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_cdce.c#4 (text+ko) ==== @@ -1,0 +1,813 @@ +/* $NetBSD: if_cdce.c,v 1.4 2004/10/24 12:50:54 augustss Exp $ */ + +/* + * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul + * Copyright (c) 2003-2005 Craig Boston + * Copyright (c) 2004 Daniel Hartmeier + * Copyright (c) 2006 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Bill Paul. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul, THE VOICES IN HIS HEAD OR + * THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * USB Communication Device Class (Ethernet Networking Control Model) + * http://www.usb.org/developers/devclass_docs/usbcdc11.pdf + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "usbdevs.h" + +#include + +__FBSDID("$FreeBSD: src/sys/dev/usb/if_cdce.c,v 1.12 2005/12/29 17:29:18 netchild Exp $"); + +/* prototypes */ + +static device_probe_t cdce_probe; +static device_attach_t cdce_attach; +static device_detach_t cdce_detach; +static device_shutdown_t cdce_shutdown; + +static void +cdce_start_cb(struct ifnet *ifp); + +static void +cdce_start_transfers(struct cdce_softc *sc); + +static void +cdce_bulk_write_clear_stall_callback(struct usbd_xfer *xfer); + +static void +cdce_bulk_write_callback(struct usbd_xfer *xfer); + +static u_int32_t +cdce_m_crc32(struct mbuf *m, u_int32_t src_offset, u_int32_t src_len); + +static void +cdce_stop(struct cdce_softc *sc); + +static int +cdce_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data); + +static void +cdce_init_cb(void *arg); + +static void +cdce_bulk_read_clear_stall_callback(struct usbd_xfer *xfer); + +static void +cdce_bulk_read_callback(struct usbd_xfer *xfer); + +static int +cdce_ifmedia_upd_cb(struct ifnet *ifp); + +static void +cdce_ifmedia_sts_cb(struct ifnet * const ifp, struct ifmediareq *req); + +#define DPRINTF(...) + +static const struct usbd_config cdce_config[CDCE_ENDPT_MAX] = { + + [0] = { + .type = UE_BULK, + .endpoint = -1, /* any */ + .direction = UE_DIR_OUT, + .bufsize = (MCLBYTES + 4), + .flags = (USBD_USE_DMA|USBD_FORCE_SHORT_XFER), + .callback = &cdce_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ + }, + + [1] = { + .type = UE_BULK, + .endpoint = -1, /* any */ + .direction = UE_DIR_IN, + .bufsize = (MCLBYTES + 4), + .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .callback = &cdce_bulk_read_callback, + }, + + [2] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = -1, + .bufsize = sizeof(usb_device_request_t), + .flags = USBD_USE_DMA, + .callback = &cdce_bulk_write_clear_stall_callback, + .timeout = 1000, /* 1 second */ + }, + + [3] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = -1, + .bufsize = sizeof(usb_device_request_t), + .flags = USBD_USE_DMA, + .callback = &cdce_bulk_read_clear_stall_callback, + .timeout = 1000, /* 1 second */ + }, +}; + +static device_method_t cdce_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, cdce_probe), + DEVMETHOD(device_attach, cdce_attach), + DEVMETHOD(device_detach, cdce_detach), + DEVMETHOD(device_shutdown, cdce_shutdown), + + { 0, 0 } +}; + +static driver_t cdce_driver = { + "cdce", + cdce_methods, + sizeof(struct cdce_softc) +}; + +static devclass_t cdce_devclass; + +DRIVER_MODULE(cdce, uhub, cdce_driver, cdce_devclass, usbd_driver_load, 0); +MODULE_VERSION(cdce, 0); +MODULE_DEPEND(cdce, usb, 1, 1, 1); +MODULE_DEPEND(cdce, ether, 1, 1, 1); + +static const struct cdce_type cdce_devs[] = { + {{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2501 }, CDCE_FLAG_NO_UNION }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5500 }, CDCE_FLAG_ZAURUS }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300 }, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5600 }, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700 }, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750 }, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION }, + {{ USB_VENDOR_GMATE, USB_PRODUCT_GMATE_YP3X00 }, CDCE_FLAG_NO_UNION }, + {{ USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_ETHERNETGADGET }, CDCE_FLAG_NO_UNION }, +}; +#define cdce_lookup(v, p) ((const struct cdce_type *)usb_lookup(cdce_devs, v, p)) + +static int +cdce_probe(device_t dev) +{ + struct usb_attach_arg *uaa = device_get_ivars(dev); + usb_interface_descriptor_t *id; + + if (uaa->iface == NULL) { + return UMATCH_NONE; + } + + id = usbd_get_interface_descriptor(uaa->iface); + if (id == NULL) { + return UMATCH_NONE; + } + + if (cdce_lookup(uaa->vendor, uaa->product) != NULL) { + return UMATCH_VENDOR_PRODUCT; + } + + if ((id->bInterfaceClass == UICLASS_CDC) && + (id->bInterfaceSubClass == + UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL)) { + return UMATCH_IFACECLASS_GENERIC; + } + + return UMATCH_NONE; +} + +static int +cdce_attach(device_t dev) +{ + struct cdce_softc * sc = device_get_softc(dev); + struct usb_attach_arg * uaa = device_get_ivars(dev); + struct usbd_interface * iface; + const usb_cdc_union_descriptor_t * ud; + const usb_cdc_ethernet_descriptor_t * ue; + const usb_interface_descriptor_t *id; + const struct cdce_type * t; + struct ifnet * ifp; + int error; + u_int8_t i; + u_int8_t eaddr[ETHER_ADDR_LEN]; + u_int8_t eaddr_str[(ETHER_ADDR_LEN * 2) + 1]; + + if (sc == NULL) { + return ENOMEM; + } + + sc->sc_udev = uaa->device; + sc->sc_dev = dev; + sc->sc_unit = device_get_unit(dev); + + t = cdce_lookup(uaa->vendor, uaa->product); + if (t) { + sc->sc_flags = t->cdce_flags; + } + + usbd_set_desc(dev, uaa->device); + + snprintf(sc->sc_name, sizeof(sc->sc_name), "%s", + device_get_nameunit(dev)); + + mtx_init(&(sc->sc_mtx), "cdce lock", NULL, MTX_DEF | MTX_RECURSE); + + if (sc->sc_flags & CDCE_FLAG_NO_UNION) { + sc->sc_data_iface_index = uaa->iface_index; + sc->sc_data_iface_no = 0; /* not used */ + goto alloc_transfers; + } + + ud = ((const void *)usbd_find_descriptor + (usbd_get_config_descriptor(uaa->device), + UDESC_CS_INTERFACE, UDESCSUB_CDC_UNION)); + + if ((ud == NULL) || (ud->bLength < sizeof(*ud))) { + device_printf(dev, "no union descriptor!\n"); + goto detach; + } + + sc->sc_data_iface_no = ud->bSlaveInterface[0]; + + for (i=0; ; i++) { + + iface = usbd_get_iface(uaa->device, i); + + if (iface) { + + id = usbd_get_interface_descriptor(iface); + + if (id && (id->bInterfaceNumber == sc->sc_data_iface_no)) { + sc->sc_data_iface_index = i; + USBD_SET_IFACE_NO_PROBE(uaa->device, i); + break; + } + } else { + device_printf(dev, "no data interface found!\n"); + goto detach; + } + } + + /* + * + * The Data Class interface of a networking device shall have a minimum + * of two interface settings. The first setting (the default interface + * setting) includes no endpoints and therefore no networking traffic is + * exchanged whenever the default interface setting is selected. One or + * more additional interface settings are used for normal operation, and + * therefore each includes a pair of endpoints (one IN, and one OUT) to + * exchange network traffic. Select an alternate interface setting to + * initialize the network aspects of the device and to enable the + * exchange of network traffic. + * + * + * Some devices, most notably cable modems, include interface settings + * that have no IN or OUT endpoint, therefore loop through the list of all + * available interface settings looking for one with both IN and OUT + * endpoints. + */ + + alloc_transfers: + + for (i = 0; i < 32; i++) { + + error = usbreq_set_interface + (uaa->device, sc->sc_data_iface_index, i); + + if (error) { + device_printf(dev, "no valid alternate setting found!\n"); + goto detach; + } + + error = usbd_transfer_setup + (uaa->device, sc->sc_data_iface_index, + sc->sc_xfer, cdce_config, CDCE_ENDPT_MAX, + sc, &(sc->sc_mtx), &(sc->sc_mem_wait)); + + if (error == 0) { + break; + } + } + + ifmedia_init(&(sc->sc_ifmedia), 0, + &cdce_ifmedia_upd_cb, + &cdce_ifmedia_sts_cb); + + ue = ((const void *)usbd_find_descriptor + (usbd_get_config_descriptor(uaa->device), + UDESC_INTERFACE, UDESCSUB_CDC_ENF)); + + if ((ue == NULL) || (ue->bLength < sizeof(*ue)) || + usbreq_get_string_any(uaa->device, ue->iMacAddress, + eaddr_str, sizeof(eaddr_str))) { + + /* fake MAC address */ + + device_printf(dev, "faking MAC address\n"); + eaddr[0]= 0x2a; + memcpy(&eaddr[1], &ticks, sizeof(u_int32_t)); + eaddr[5] = sc->sc_unit; + + } else { + + bzero(eaddr, sizeof(eaddr)); + + for (i = 0; i < (ETHER_ADDR_LEN * 2); i++) { + + u_int8_t c = eaddr_str[i]; + + if ((c >= '0') && (c <= '9')) { + c -= '0'; + } else { + c -= 'A' - 10; + } + + c &= 0xf; + + if ((i & 1) == 0) { + c <<= 4; + } + eaddr[i / 2] |= c; + } + } + + ifp = if_alloc(IFT_ETHER); + + if (ifp == NULL) { + device_printf(dev, "cannot if_alloc()\n"); + goto detach; + } + + ifp->if_softc = sc; + if_initname(ifp, "cdce", sc->sc_unit); + ifp->if_mtu = ETHERMTU; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_ioctl = cdce_ioctl_cb; + ifp->if_output = ether_output; + ifp->if_start = cdce_start_cb; + ifp->if_init = cdce_init_cb; + ifp->if_baudrate = 11000000; + ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + + /* no IFM type for 11Mbps USB, so go with 10baseT */ + ifmedia_add(&sc->sc_ifmedia, IFM_ETHER | IFM_10_T, 0, 0); + ifmedia_set(&sc->sc_ifmedia, IFM_ETHER | IFM_10_T); + + sc->sc_ifp = ifp; + + ether_ifattach(ifp, eaddr); + + return 0; /* success */ + + detach: + cdce_detach(dev); + return ENXIO; /* failure */ +} + +static int +cdce_detach(device_t dev) +{ + struct cdce_softc * sc = device_get_softc(dev); + struct ifnet * ifp; + + mtx_lock(&(sc->sc_mtx)); + + cdce_stop(sc); + + ifp = sc->sc_ifp; + + mtx_unlock(&(sc->sc_mtx)); + + /* get rid of any late children */ + bus_generic_detach(dev); + + if (ifp) { + ether_ifdetach(ifp); + if_free(ifp); + ifmedia_removeall(&(sc->sc_ifmedia)); + } + + usbd_transfer_unsetup(sc->sc_xfer, CDCE_ENDPT_MAX); + + usbd_transfer_drain(&(sc->sc_mem_wait), &(sc->sc_mtx)); + + mtx_destroy(&(sc->sc_mtx)); + + return 0; +} + +static void +cdce_start_cb(struct ifnet *ifp) +{ + struct cdce_softc *sc = ifp->if_softc; + + mtx_lock(&(sc->sc_mtx)); + + cdce_start_transfers(sc); + + mtx_unlock(&(sc->sc_mtx)); + + return; +} + +static void +cdce_start_transfers(struct cdce_softc *sc) +{ + if ((sc->sc_flags & CDCE_FLAG_LL_READY) && + (sc->sc_flags & CDCE_FLAG_HL_READY)) { + + /* start the USB transfers, + * if not already started: + */ + usbd_transfer_start(sc->sc_xfer[1]); + usbd_transfer_start(sc->sc_xfer[0]); + } + return; +} + +static void +cdce_bulk_write_clear_stall_callback(struct usbd_xfer *xfer) +{ + struct cdce_softc *sc = xfer->priv_sc; + struct usbd_xfer *xfer_other = sc->sc_xfer[0]; + + USBD_CHECK_STATUS(xfer); + + tr_setup: + /* start clear stall */ + usbd_clear_stall_tr_setup(xfer, xfer_other); + return; + + tr_transferred: + usbd_clear_stall_tr_transferred(xfer, xfer_other); + + sc->sc_flags &= ~CDCE_FLAG_WRITE_STALL; + usbd_transfer_start(xfer_other); + return; + + tr_error: + /* bomb out */ + sc->sc_flags &= ~CDCE_FLAG_WRITE_STALL; + DPRINTF(sc, 0, "bulk write pipe stopped\n"); + return; +} + +static void +cdce_bulk_write_callback(struct usbd_xfer *xfer) +{ + struct cdce_softc *sc = xfer->priv_sc; + struct ifnet *ifp = sc->sc_ifp; + struct mbuf *m; + u_int32_t crc; + + USBD_CHECK_STATUS(xfer); + + tr_error: + DPRINTF(sc, 10, "transfer error, %s\n", + usbd_errstr(xfer->error)); + + if (xfer->error != USBD_CANCELLED) { + /* try to clear stall first */ + sc->sc_flags |= CDCE_FLAG_WRITE_STALL; + usbd_transfer_start(sc->sc_xfer[2]); + } + + ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + return; + + tr_transferred: + DPRINTF(sc, 10, "transfer complete\n"); + + ifp->if_opackets++; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + + tr_setup: + + if (sc->sc_flags & CDCE_FLAG_WRITE_STALL) { + usbd_transfer_start(sc->sc_xfer[2]); + goto done; + } + + IF_DEQUEUE(&(ifp->if_snd), m); + + if (m == NULL) { + goto done; + } + + if (m->m_pkthdr.len > MCLBYTES) { + m->m_pkthdr.len = MCLBYTES; + } + + xfer->length = m->m_pkthdr.len; + + usbd_m_copy_in(&(xfer->buf_data), 0, + m, 0, m->m_pkthdr.len); + + if (sc->sc_flags & CDCE_FLAG_ZAURUS) { + /* Zaurus wants a 32-bit CRC appended to every frame */ + + crc = htole32(cdce_m_crc32(m, 0, m->m_pkthdr.len)); + + usbd_copy_in(&(xfer->buf_data), + m->m_pkthdr.len, &crc, 4); + + xfer->length += 4; + } + + /* + * if there's a BPF listener, bounce a copy + * of this frame to him: + */ + BPF_MTAP(ifp, m); + + m_freem(m); + + usbd_start_hardware(xfer); + + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + + done: + return; +} + +static int32_t +#ifdef __FreeBSD__ +cdce_m_crc32_cb(void *arg, void *src, u_int32_t count) +#else +cdce_m_crc32_cb(void *arg, caddr_t src, u_int32_t count) +#endif +{ + register u_int32_t *p_crc = arg; + *p_crc = crc32_raw(src, count, *p_crc); + return 0; +} + +static u_int32_t +cdce_m_crc32(struct mbuf *m, u_int32_t src_offset, u_int32_t src_len) +{ + register int error; + u_int32_t crc = 0xFFFFFFFF; + error = m_apply(m, src_offset, src_len, &cdce_m_crc32_cb, &crc); + return (crc ^ 0xFFFFFFFF); +} + +static void +cdce_stop(struct cdce_softc *sc) +{ + struct ifnet *ifp = sc->sc_ifp; + + /* immediate configuration */ + + if (ifp) { + /* clear flags */ + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | + IFF_DRV_OACTIVE); + } + + sc->sc_flags &= ~(CDCE_FLAG_HL_READY| + CDCE_FLAG_LL_READY); + + /* stop all the transfers, + * if not already stopped: + */ + if (sc->sc_xfer[0]) { + usbd_transfer_stop(sc->sc_xfer[0]); + } + if (sc->sc_xfer[1]) { + usbd_transfer_stop(sc->sc_xfer[1]); + } + if (sc->sc_xfer[2]) { + usbd_transfer_stop(sc->sc_xfer[2]); + } + if (sc->sc_xfer[3]) { + usbd_transfer_stop(sc->sc_xfer[3]); + } + + return; +} + +static int +cdce_shutdown(device_t dev) +{ + struct cdce_softc *sc = device_get_softc(dev); + + mtx_lock(&(sc->sc_mtx)); + + cdce_stop(sc); + + mtx_unlock(&(sc->sc_mtx)); + + return (0); +} + +static int +cdce_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data) +{ + struct cdce_softc * sc = ifp->if_softc; + int error = 0; + + mtx_lock(&(sc->sc_mtx)); + + switch(command) { + case SIOCSIFFLAGS: + if (ifp->if_flags & IFF_UP) { + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { + cdce_init_cb(sc); + } + } else { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + cdce_stop(sc); + } + } + break; + + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + error = ifmedia_ioctl(ifp, (void *)data, &sc->sc_ifmedia, command); + break; + + default: + error = ether_ioctl(ifp, command, data); + break; + } + + mtx_unlock(&(sc->sc_mtx)); + + return (error); +} + +static void +cdce_init_cb(void *arg) +{ + struct cdce_softc * sc = arg; + struct ifnet * ifp; + + mtx_lock(&(sc->sc_mtx)); + + ifp = sc->sc_ifp; + + /* immediate configuration */ + + cdce_stop(sc); + + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + + sc->sc_flags |= (CDCE_FLAG_READ_STALL| + CDCE_FLAG_WRITE_STALL| + CDCE_FLAG_LL_READY| + CDCE_FLAG_HL_READY); + + cdce_start_transfers(sc); + + mtx_unlock(&(sc->sc_mtx)); + + return; +} + +static void +cdce_bulk_read_clear_stall_callback(struct usbd_xfer *xfer) +{ + struct cdce_softc *sc = xfer->priv_sc; + struct usbd_xfer *xfer_other = sc->sc_xfer[1]; + + USBD_CHECK_STATUS(xfer); + + tr_setup: + /* start clear stall */ + usbd_clear_stall_tr_setup(xfer, xfer_other); + return; + + tr_transferred: + usbd_clear_stall_tr_transferred(xfer, xfer_other); + + sc->sc_flags &= ~CDCE_FLAG_READ_STALL; + usbd_transfer_start(xfer_other); + return; + + tr_error: + /* bomb out */ + sc->sc_flags &= ~CDCE_FLAG_READ_STALL; + DPRINTF(sc, 0, "bulk read pipe stopped\n"); + return; +} + +static void +cdce_bulk_read_callback(struct usbd_xfer *xfer) +{ + struct cdce_softc *sc = xfer->priv_sc; + struct ifnet *ifp = sc->sc_ifp; + struct mbuf *m; + + USBD_CHECK_STATUS(xfer); + + tr_error: + if (xfer->error != USBD_CANCELLED) { + /* try to clear stall first */ + sc->sc_flags |= CDCE_FLAG_READ_STALL; + usbd_transfer_start(sc->sc_xfer[3]); + } + DPRINTF(sc, 0, "bulk read error, %s\n", + usbd_errstr(xfer->error)); + return; + + tr_transferred: + + if (sc->sc_flags & CDCE_FLAG_ZAURUS) { + + /* Strip off CRC added by Zaurus */ + if (xfer->actlen >= 4) { + xfer->actlen -= 4; + } + } + + if (xfer->actlen < sizeof(struct ether_header)) { + ifp->if_ierrors++; + goto tr_setup; + } + + m = usbd_ether_get_mbuf(); + + if (m == NULL) { + ifp->if_ierrors++; + goto tr_setup; + } + + xfer->actlen = min(xfer->actlen, m->m_len); + + usbd_copy_out(&(xfer->buf_data), 0, m->m_data, xfer->actlen); + + ifp->if_ipackets++; + m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.len = m->m_len = xfer->actlen; + + (ifp->if_input)(ifp, m); + + tr_setup: + + if (sc->sc_flags & CDCE_FLAG_READ_STALL) { + usbd_transfer_start(sc->sc_xfer[3]); + } else { + usbd_start_hardware(xfer); + } + return; +} + +static int +cdce_ifmedia_upd_cb(struct ifnet *ifp) +{ + /* no-op, cdce has only 1 possible media type */ + return 0; +} + +static void +cdce_ifmedia_sts_cb(struct ifnet * const ifp, struct ifmediareq *req) +{ + req->ifm_status = IFM_AVALID | IFM_ACTIVE; + req->ifm_active = IFM_ETHER | IFM_10_T; + return; +} From owner-p4-projects@FreeBSD.ORG Mon Aug 7 14:03:07 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 CF4FC16A4E5; Mon, 7 Aug 2006 14:03:06 +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 A995A16A4E0 for ; Mon, 7 Aug 2006 14:03:06 +0000 (UTC) (envelope-from howardsu@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64E3943D88 for ; Mon, 7 Aug 2006 14:02:42 +0000 (GMT) (envelope-from howardsu@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 k77E2gDo098962 for ; Mon, 7 Aug 2006 14:02:42 GMT (envelope-from howardsu@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77E2g23098958 for perforce@freebsd.org; Mon, 7 Aug 2006 14:02:42 GMT (envelope-from howardsu@FreeBSD.org) Date: Mon, 7 Aug 2006 14:02:42 GMT Message-Id: <200608071402.k77E2g23098958@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to howardsu@FreeBSD.org using -f From: Howard Su To: Perforce Change Reviews Cc: Subject: PERFORCE change 103384 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, 07 Aug 2006 14:03:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=103384 Change 103384 by howardsu@su_vm on 2006/08/07 14:02:02 Fix build on amd64. Affected files ... .. //depot/projects/dtrace/src/sys/kern/subr_prf.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/subr_prf.c#5 (text+ko) ==== @@ -327,8 +327,9 @@ char *p_bufr = bufr; int s_bufr = sizeof(bufr); int retval; - va_list ap_cp = ap; + va_list ap_cp; + va_copy(ap_cp, ap); /* Try to format the string using the buffer on the stack. */ retval = vsnprintf(p_bufr, s_bufr, fmt, ap); From owner-p4-projects@FreeBSD.ORG Mon Aug 7 19:05:01 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 4A64416A4E1; Mon, 7 Aug 2006 19:05:01 +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 2679A16A4DA for ; Mon, 7 Aug 2006 19:05:01 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA82C43D46 for ; Mon, 7 Aug 2006 19:05:00 +0000 (GMT) (envelope-from imp@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 k77J50pn054592 for ; Mon, 7 Aug 2006 19:05:00 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77J50o7054589 for perforce@freebsd.org; Mon, 7 Aug 2006 19:05:00 GMT (envelope-from imp@freebsd.org) Date: Mon, 7 Aug 2006 19:05:00 GMT Message-Id: <200608071905.k77J50o7054589@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103389 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, 07 Aug 2006 19:05:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=103389 Change 103389 by imp@imp_bugs on 2006/08/07 19:04:23 Implement watchdog. The OS has 30s to load and get to the point of disabling the watchdog before we reboot. 64s is the absolute max, and 30s seemed a good number. Usually it takes like 5s-10s. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#13 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/reset.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#13 (text) ==== @@ -40,7 +40,8 @@ /* XMODEM protocol */ int xmodem_rx(char *dst); -/* Reboot! Reset! */ +/* */ +void start_wdog(void); void reset(void); /* Delay us */ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/reset.c#2 (text+ko) ==== @@ -28,10 +28,11 @@ #include "lib.h" /* - * int getc(int seconds) + * void reset() * - * Reads a character from the DBGU port, if one is available within about - * seconds seconds. It assumes that DBGU has already been initialized. + * Forces a reset of the system. Uses watchdog timer of '1', which + * corresponds to 128 / SLCK seconds (SLCK is 32,768 Hz, so 128/32768 is + * 1 / 256 ~= 5.4ms */ void reset(void) @@ -40,3 +41,17 @@ AT91C_BASE_ST->ST_WDMR = 1 | AT91C_ST_RSTEN; AT91C_BASE_ST->ST_CR = AT91C_ST_WDRST; } + +/* + * void start_wdog() + * + * Starts a watchdog timer. We force the boot process to get to the point + * it can kick the watch dog part of the ST part for the OS's driver. + */ +void +start_wdog(void) +{ + // The following should effect a reset after 30 seconds. + AT91C_BASE_ST->ST_WDMR = (30 * (32768 / 128)) | AT91C_ST_RSTEN; + AT91C_BASE_ST->ST_CR = AT91C_ST_WDRST; +} From owner-p4-projects@FreeBSD.ORG Mon Aug 7 19:06:03 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 1B2D616A4E5; Mon, 7 Aug 2006 19:06:03 +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 E13A116A4DA for ; Mon, 7 Aug 2006 19:06:02 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94C2743D55 for ; Mon, 7 Aug 2006 19:06:02 +0000 (GMT) (envelope-from imp@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 k77J62p9054702 for ; Mon, 7 Aug 2006 19:06:02 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77J62Es054699 for perforce@freebsd.org; Mon, 7 Aug 2006 19:06:02 GMT (envelope-from imp@freebsd.org) Date: Mon, 7 Aug 2006 19:06:02 GMT Message-Id: <200608071906.k77J62Es054699@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103390 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, 07 Aug 2006 19:06:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=103390 Change 103390 by imp@imp_bugs on 2006/08/07 19:05:43 At the cost of a few bytes, make this more general. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#14 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/reset.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#14 (text) ==== @@ -41,7 +41,7 @@ int xmodem_rx(char *dst); /* */ -void start_wdog(void); +void start_wdog(int n); void reset(void); /* Delay us */ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/reset.c#3 (text+ko) ==== @@ -49,9 +49,9 @@ * it can kick the watch dog part of the ST part for the OS's driver. */ void -start_wdog(void) +start_wdog(int n) { - // The following should effect a reset after 30 seconds. - AT91C_BASE_ST->ST_WDMR = (30 * (32768 / 128)) | AT91C_ST_RSTEN; + // The following should effect a reset after N seconds. + AT91C_BASE_ST->ST_WDMR = (n * (32768 / 128)) | AT91C_ST_RSTEN; AT91C_BASE_ST->ST_CR = AT91C_ST_WDRST; } From owner-p4-projects@FreeBSD.ORG Mon Aug 7 19:07:19 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 C632216A4E5; Mon, 7 Aug 2006 19:07:19 +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 A432C16A4E1 for ; Mon, 7 Aug 2006 19:07:19 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E9BA43D5E for ; Mon, 7 Aug 2006 19:07:06 +0000 (GMT) (envelope-from bushman@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 k77J74SZ054755 for ; Mon, 7 Aug 2006 19:07:04 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77J74Lg054752 for perforce@freebsd.org; Mon, 7 Aug 2006 19:07:04 GMT (envelope-from bushman@freebsd.org) Date: Mon, 7 Aug 2006 19:07:04 GMT Message-Id: <200608071907.k77J74Lg054752@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 103391 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, 07 Aug 2006 19:07:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=103391 Change 103391 by bushman@bushman_nss_ldap_cached on 2006/08/07 19:06:44 Pretty everything is done. This is the just-in-case commit before the major sources cleanup (gotta remove all the weird debugging printfs). Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/Makefile#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.h#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.c#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.h#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.h#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.c#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.h#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.c#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.h#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapschema.c#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapschema.h#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.h#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaptls.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaptls.h#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.c#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.h#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.c#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.h#9 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/Makefile#9 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.c#8 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.h#8 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.c#9 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.h#9 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#5 (text+ko) ==== @@ -187,7 +187,7 @@ nss_ldap_destroy_servent(struct nss_ldap_parse_context *pctx) { - printf("here - %s %d\n", __FILE__, __LINE__); + printf("SAFDASPIFO UASFIOOASUIFIOAS FUOAISFUI OAUSFIOASUF!!!!!!!!!here - %s %d\n", __FILE__, __LINE__); assert(pctx != NULL); free(pctx->mdata_ext); } ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.h#5 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.c#9 (text+ko) ==== @@ -590,7 +590,14 @@ } continue; } - } + } else if (strcmp(fields[0], "use_sasl") == 0) { + if ((field_count == 2) && + (get_yesno(fields[1], &value) == + NSS_LDAP_SUCCESS)) { + conf->use_sasl = value; + continue; + } + } break; default: break; @@ -622,7 +629,7 @@ printf("BBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCc %p\n", (void *)conf->sasl_authid); #ifdef NSS_LDAP_SASL_AUTH_ENABLED - if (conf->sasl_authid == NULL) { + if (conf->use_sasl == 0) { #endif switch (conf->ssl_mode) { case NSS_LDAP_SSL_OFF: ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.h#9 (text+ko) ==== @@ -105,7 +105,8 @@ char *root_sasl_authid; char *sasl_secprops; char *krb5_ccname; - int root_use_sasl; + int root_use_sasl; + int use_sasl; char *tls_cacert; char *tls_cacertdir; ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.c#9 (text+ko) ==== @@ -348,6 +348,7 @@ if (ldapuri == NULL) { snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, "cannot format the ldap URI"); + printf("911 %s\n", err->description); free(conn); return (NULL); } @@ -521,8 +522,11 @@ } /* Check to see if the bind operation completed. */ + memset(&zerotime, 0, sizeof(zerotime)); while ( !finished ) { - rc = ldap_result( conn->ld, msgid, 0, &zerotime, &res ); + printf("FIININISHED %d %d %d %p\n", finished, rc, msgid, (void *)conn->ld); + res = NULL; + rc = ldap_result( conn->ld, msgid, 1, &zerotime, &res ); switch ( rc ) { /* If ldap_result() returns -1, error occurred. */ case -1: @@ -881,7 +885,7 @@ int rv; /* Falling back to simple authentication if the config says so */ - if (conf->root_use_sasl != NSS_LDAP_OPTION_YES) + if ((geteuid() == 0) && (conf->root_use_sasl != NSS_LDAP_OPTION_YES)) return (__nss_ldap_simple_auth(conn, conf, err)); dn = geteuid() == 0 ? conf->root_bind_dn : conf->bind_dn; ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.h#9 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapschema.c#9 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapschema.h#9 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.c#8 (text+ko) ==== @@ -121,6 +121,7 @@ printf("%s %d\n", __FILE__, __LINE__); if (ctx->msgid == -1) { + ldap_msgfree(ctx->msg); ctx->msg = NULL; return (NSS_LDAP_SUCCESS); } @@ -128,6 +129,10 @@ finished = 0; memset(&zerotime, 0, sizeof(struct timeval)); while (!finished) { + if (ctx->msg != NULL) { + ldap_msgfree(ctx->msg); + ctx->msg = NULL; + } rv = ldap_result( ctx->conn->ld, ctx->msgid, LDAP_MSG_ONE, &zerotime, &ctx->msg); @@ -161,10 +166,14 @@ assert(ctx != NULL); - if (ctx->msg != NULL) + if (ctx->msg != NULL) { ldap_msgfree(ctx->msg); + ctx->msg = NULL; + } destroy_request(&ctx->search_request); free(ctx); + + printf("ENDING SEEEEEEEEEEEEEARCHING\n"); } static void @@ -175,7 +184,7 @@ if (pctx->parse_destroy_fn != NULL) pctx->parse_destroy_fn(pctx); - free(pctx); + free(pctx); } struct nss_ldap_search_context * @@ -256,6 +265,7 @@ assert(pctx != NULL); + printf("ENDING PAAAAAAAAAAAARSING\n"); if (pctx->parse_destroy_fn != NULL) pctx->parse_destroy_fn(pctx); free(pctx); ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.h#8 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaptls.c#7 (text+ko) ==== @@ -109,17 +109,21 @@ int rv; rv = nss_ldap_connection_getstate(&st); - if (rv != NSS_LDAP_SUCCESS) + if (rv != NSS_LDAP_SUCCESS) { + printf("ABBCBCBCBBCBC %d %s\n", __LINE__, __FILE__); return (rv); + } st->instance = conn; st->destroy_fn = destroy_fn; + printf("ABBCBCBCBBCBC %d %s\n", __LINE__, __FILE__); return (NSS_LDAP_SUCCESS); } void tls_return_connection_def(struct nss_ldap_connection *conn) { + printf("ABBCBCBCBBCBC %d %s\n", __LINE__, __FILE__); /* DO NOTHING */ } @@ -223,6 +227,7 @@ assert(method != NULL); + printf("GET_CONNECTION %d %s\n", __LINE__, __FILE__); return (method->get_connection_fn(res)); } @@ -233,7 +238,7 @@ { assert(method != NULL); - + printf("SET_CONNECTION %d %s\n", __LINE__, __FILE__); return (method->set_connection_fn(conn, destroy_fn)); } @@ -243,7 +248,7 @@ { assert(method != NULL); - + printf("RETURN_CONNECTION %d %s\n", __LINE__, __FILE__); return (method->return_connection_fn(conn)); } ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaptls.h#7 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.c#9 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.h#9 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.c#9 (text+ko) ==== @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include "ldapschema.h" @@ -139,15 +140,20 @@ isthreaded = __isthreaded; path = NSS_LDAP_CONF_PATH; printf("conf- %s %d\n", __FILE__, __LINE__); - if ((__nss_ldap_conf != NULL) && (stat(path, &statbuf) != 0)) + memset(&statbuf, 0, sizeof(statbuf)); + result = stat(path, &statbuf); + printf("RV %d\n", result); + if ((__nss_ldap_conf != NULL) && (result != 0)) return (0); printf("conf- %s %d\n", __FILE__, __LINE__); if ((__nss_ldap_conf != NULL) && (statbuf.st_mtime <= confmod)) return (0); + printf("-=-=-=-= %s %ld %ld %p\n",path, statbuf.st_mtime, confmod, (void *)__nss_ldap_conf); if (isthreaded) { - result = pthread_mutex_trylock(&conf_lock); + result = pthread_mutex_lock(&conf_lock); if (result != 0) - return (0); + return (NSS_LDAP_GENERIC_ERROR); + result = pthread_rwlock_wrlock(&nss_ldap_lock); if (result != 0) goto fin2; @@ -158,17 +164,23 @@ printf("conf %s %d\n", __FILE__, __LINE__); atexit(nss_ldap_atexit); } + + printf("-=-=-=-=1 %s %ld %ld %p\n",path, statbuf.st_mtime, confmod, (void *)__nss_ldap_conf); confmod = statbuf.st_mtime; + printf("-=-=-=-=2 %s %ld %ld %p\n",path, statbuf.st_mtime, confmod, (void *)__nss_ldap_conf); memset(&config_file_error, 0, sizeof(struct nss_ldap_config_file_error)); __nss_ldap_init_default_config(&nss_ldap_conf); result = __nss_ldap_load_config_from_file(&nss_ldap_conf, path, &config_file_error); + result = __nss_ldap_load_config_from_file(&nss_ldap_conf, path, + &config_file_error); if (result == NSS_LDAP_SUCCESS) __nss_ldap_conf = &nss_ldap_conf; else { /* TODO: proper error handling */ + printf("I HATE THIS WORLD!\n"); } printf("conf %s %d\n", __FILE__, __LINE__); @@ -313,6 +325,7 @@ rv = __nss_ldap_auth(connection_method, *conn, __nss_ldap_conf, conn_error); if (rv != NSS_LDAP_SUCCESS) { + printf(">>>>>>>>>>>> %s %d\n", __FILE__, __LINE__); rv = __nss_ldap_disconnect(connection_method, *conn, __nss_ldap_conf, conn_error); if (rv != NSS_LDAP_SUCCESS) { @@ -536,6 +549,7 @@ if (tls_method == NULL) { if (pctx != NULL) { sctx = pctx->sctx; + printf("PARSECONTEXTDOOOOOOOOOOOOOONe %p %p\n", (void *)tls_method, (void *)pctx); __nss_ldap_end_parsing(pctx); if (sctx != NULL) @@ -546,10 +560,35 @@ } static int +nss_ldap_set_sigpipe_mask(sigset_t *oset) +{ + sigset_t new; + + sigemptyset(oset); + sigemptyset(&new); + + sigaddset(&new, SIGPIPE); + if (__isthreaded != 0) + return (pthread_sigmask(SIG_BLOCK, &new, oset)); + else + return (sigprocmask(SIG_BLOCK, &new, oset)); +} + +static int +nss_ldap_unset_sigpipe_mask(sigset_t *oset) +{ + if (__isthreaded != 0) + return (pthread_sigmask(SIG_SETMASK, oset, NULL)); + else + return (sigprocmask(SIG_SETMASK, oset, NULL)); +} + +static int nss_ldap_get_common(int map_id, char const *filter, void *mdata, char *buffer, size_t bufsize, nss_ldap_parse_next_fn parse_next_fn, nss_ldap_parse_destroy_fn parse_destroy_fn, int parse_tls) { + sigset_t signal_mask; struct nss_ldap_connection_method *connection_method; struct nss_ldap_search_method *search_method; struct nss_ldap_tls_method *tls_method; @@ -557,7 +596,7 @@ struct nss_ldap_connection_error conn_error; struct nss_ldap_connection *conn; struct nss_ldap_parse_context *pctx, pctx_model; - int rv, conn_flag; + int rv, conn_flag, signals_rv; assert(map_id < NSS_LDAP_MAP_MAX); assert(filter != NULL); @@ -568,6 +607,12 @@ search_method = &__nss_ldap_conf->search_method; tls_method = &__nss_ldap_conf->tls_method; + signals_rv = nss_ldap_set_sigpipe_mask(&signal_mask); + if (signals_rv != 0) { + printf("OMG! can't set signal mask!\n"); + /* TODO: do something really weird */ + } + pctx = NULL; conn = NULL; conn_flag = 0; @@ -642,6 +687,14 @@ parse_tls != 0 ? tls_method : NULL, pctx, map_id); if (conn != NULL) nss_ldap_connection_done(tls_method, conn); + + if (signals_rv == 0) { + signals_rv = nss_ldap_unset_sigpipe_mask(&signal_mask); + if (signals_rv != 0) { + printf("OMG!\n"); + /* TODO: do something */ + } + } // else // nss_ldap_connection_reset(tls_method, conn); @@ -687,6 +740,8 @@ { int rv, isthreaded; + printf("saasas\n"); + rv = nss_ldap_configure(); if (rv != NSS_LDAP_SUCCESS) return (NS_UNAVAIL); @@ -710,10 +765,11 @@ void __nss_ldap_setent(int map_id) { + sigset_t signal_mask; struct nss_ldap_search_method *search_method; struct nss_ldap_tls_method *tls_method; struct nss_ldap_parse_context *pctx; - int rv, isthreaded; + int rv, isthreaded, signals_rv; assert(map_id < NSS_LDAP_MAP_MAX); @@ -738,6 +794,12 @@ return; } + signals_rv = nss_ldap_set_sigpipe_mask(&signal_mask); + if (signals_rv != 0) { + printf("OMG! can't set signal mask!\n"); + /* TODO: do something really weird */ + } + if (pctx != NULL) parse_context_destroy_func(pctx); @@ -749,6 +811,14 @@ __nss_ldap_tls_return_parse_context(tls_method, map_id, NULL); + if (signals_rv == 0) { + signals_rv = nss_ldap_unset_sigpipe_mask(&signal_mask); + if (signals_rv != 0) { + printf("OMG!\n"); + /* TODO: do something */ + } + } + if (isthreaded) pthread_rwlock_unlock(&nss_ldap_lock); } ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.h#9 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Mon Aug 7 19:22:32 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 2D72216A4E1; Mon, 7 Aug 2006 19:22:32 +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 E505E16A4DF for ; Mon, 7 Aug 2006 19:22:31 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1040143D70 for ; Mon, 7 Aug 2006 19:22:25 +0000 (GMT) (envelope-from imp@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 k77JMOhu055657 for ; Mon, 7 Aug 2006 19:22:24 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77JMOAR055654 for perforce@freebsd.org; Mon, 7 Aug 2006 19:22:24 GMT (envelope-from imp@freebsd.org) Date: Mon, 7 Aug 2006 19:22:24 GMT Message-Id: <200608071922.k77JMOAR055654@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103392 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, 07 Aug 2006 19:22:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=103392 Change 103392 by imp@imp_bugs on 2006/08/07 19:22:07 Disable any pending watchdog timer in attach. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91_st.c#11 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91_st.c#11 (text+ko) ==== @@ -108,6 +108,8 @@ WR4(ST_RTMR, 1); /* Disable all interrupts */ WR4(ST_IDR, 0xffffffff); + /* disable watchdog timer */ + WR4(ST_WDMR, 0); return (0); } From owner-p4-projects@FreeBSD.ORG Mon Aug 7 19:54:08 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 D065D16A4E5; Mon, 7 Aug 2006 19:54:07 +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 7BBB116A4DF for ; Mon, 7 Aug 2006 19:54:07 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 338A543D45 for ; Mon, 7 Aug 2006 19:54:07 +0000 (GMT) (envelope-from imp@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 k77Js7bQ057294 for ; Mon, 7 Aug 2006 19:54:07 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77Js6aS057291 for perforce@freebsd.org; Mon, 7 Aug 2006 19:54:06 GMT (envelope-from imp@freebsd.org) Date: Mon, 7 Aug 2006 19:54:06 GMT Message-Id: <200608071954.k77Js6aS057291@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103394 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, 07 Aug 2006 19:54:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=103394 Change 103394 by imp@imp_bugs on 2006/08/07 19:53:09 implement actual watchdog device, when present. This implementation stretches the spec a little to match the #defines in sys/watchdog.h. I think this is acceptible given the size constraints of the kernel and how watchdogs are generally used. Likely not a big deal either way... Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91_st.c#12 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91_st.c#12 (text+ko) ==== @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -48,7 +49,8 @@ static struct at91st_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - device_t dev; + device_t sc_dev; + eventhandler_tag sc_wet; /* watchdog event handler tag */ } *timer_softc; #define RD4(off) \ @@ -56,6 +58,8 @@ #define WR4(off, val) \ bus_space_write_4(timer_softc->sc_st, timer_softc->sc_sh, (off), (val)) +static watchdog_fn at91st_watchdog; + static inline int st_crtr(void) { @@ -97,7 +101,7 @@ timer_softc = device_get_softc(dev); timer_softc->sc_st = sc->sc_st; - timer_softc->dev = dev; + timer_softc->sc_dev = dev; if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_ST_BASE, AT91RM92_ST_SIZE, &timer_softc->sc_sh) != 0) panic("couldn't subregion timer registers"); @@ -110,6 +114,11 @@ WR4(ST_IDR, 0xffffffff); /* disable watchdog timer */ WR4(ST_WDMR, 0); + + timer_softc->sc_wet = EVENTHANDLER_REGISTER(watchdog_list, + at91st_watchdog, dev, 0); + device_printf(dev, + "watchdog registered, timeout intervall max. 64 sec\n"); return (0); } @@ -142,7 +151,34 @@ #endif } +/* + * t below is in a weird unit. The watchdog is set to 2^t + * nanoseconds. Since our watchdog timer can't really do that too + * well, we approximate it by assuming that the timeout interval for + * the lsb is 2^22 ns, which is 4.194ms. This is an overestimation of + * the actual time (3.906ms), but close enough for watchdogging. + * These approximations, though a violation of the spec, improve the + * performance of the application which typically specifies things as + * WD_TO_32SEC. In that last case, we'd wait 32s before the wdog + * reset. The spec says we should wait closer to 34s, but given how + * it is likely to be used, and the extremely coarse nature time + * interval, I think this is the best solution. + */ static void +at91st_watchdog(void *argp, u_int cmd, int *error) +{ + uint32_t wdog; + int t; + + wdog = 0; + t = cmd & WD_INTERVAL; + if (cmd != 0 && t >= 22 && t <= 37) + wdog = (1 << (t - 22)) | ST_WDMR_RSTEN; + WR4(ST_WDMR, wdog); + WR4(ST_CR, ST_CR_WDRST); +} + +static void clock_intr(void *arg) { struct trapframe *fp = arg; @@ -163,7 +199,7 @@ struct resource *irq; int rid = 0; void *ih; - device_t dev = timer_softc->dev; + device_t dev = timer_softc->sc_dev; if (32768 % hz) { printf("Cannot get %d Hz clock; using 128Hz\n", hz); @@ -231,4 +267,3 @@ cpu_stopprofclock(void) { } - From owner-p4-projects@FreeBSD.ORG Mon Aug 7 20:53:44 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 F355016A4DF; Mon, 7 Aug 2006 20:53:43 +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 9D96E16A4DD for ; Mon, 7 Aug 2006 20:53:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B738843D4C for ; Mon, 7 Aug 2006 20:53:24 +0000 (GMT) (envelope-from jb@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 k77KrOhf069439 for ; Mon, 7 Aug 2006 20:53:24 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77KrNix069436 for perforce@freebsd.org; Mon, 7 Aug 2006 20:53:23 GMT (envelope-from jb@freebsd.org) Date: Mon, 7 Aug 2006 20:53:23 GMT Message-Id: <200608072053.k77KrNix069436@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103398 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, 07 Aug 2006 20:53:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=103398 Change 103398 by jb@jb_freebsd2 on 2006/08/07 20:52:48 IFC Affected files ... .. //depot/projects/dtrace/ports/MOVED#11 integrate .. //depot/projects/dtrace/src/libexec/tftpd/tftpd.8#3 integrate .. //depot/projects/dtrace/src/share/man/man4/acpi.4#6 integrate .. //depot/projects/dtrace/src/sys/conf/files#26 integrate .. //depot/projects/dtrace/src/sys/dev/acpica/acpi_pci_link.c#3 integrate .. //depot/projects/dtrace/src/sys/dev/bge/if_bge.c#9 integrate .. //depot/projects/dtrace/src/sys/dev/bge/if_bgereg.h#5 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_proto.c#4 delete .. //depot/projects/dtrace/src/sys/kern/uipc_usrreq.c#11 integrate .. //depot/projects/dtrace/src/sys/sys/domain.h#3 integrate .. //depot/projects/dtrace/src/sys/sys/param.h#10 integrate .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/README#2 integrate .. //depot/projects/dtrace/src/usr.sbin/mailwrapper/mailwrapper.8#3 integrate .. //depot/projects/dtrace/src/usr.sbin/mailwrapper/mailwrapper.c#3 integrate .. //depot/projects/dtrace/src/usr.sbin/ngctl/Makefile#3 integrate .. //depot/projects/dtrace/src/usr.sbin/ngctl/main.c#4 integrate .. //depot/projects/dtrace/www/tools/portsgrowth/ports.log#3 integrate Differences ... ==== //depot/projects/dtrace/ports/MOVED#11 (text+ko) ==== @@ -1,7 +1,7 @@ # # MOVED - a list of (recently) moved or removed ports # -# $FreeBSD: ports/MOVED,v 1.1111 2006/08/07 07:00:18 vanilla Exp $ +# $FreeBSD: ports/MOVED,v 1.1113 2006/08/07 13:18:43 vd Exp $ # # Each entry consists of a single line containing the following four # fields in the order named, separated with the pipe (`|') character: @@ -2432,3 +2432,10 @@ devel/p5-Readonly-XS|devel/p5-Readonly|2006-08-02|p5-Readonly installs XS automatically chinese/arnettf||2006-08-06|Renamed to chinese/CJKUnifonts devel/SGE||2006-08-07|Has expired +editors/eshell-emacs20|editors/emacs|2006-08-07|expired +devel/openorb||2006-08-07|Has expired: not really maintained anymore (last beta version is 2 years old) +japanese/xemacs-devel-canna+freewnn||2006-08-07|Has expired: Unsupported and broken very long time +japanese/xemacs-devel-canna+wnn6||2006-08-07|Has expired: Unsupported and broken very long time +japanese/xemacs-devel-freewnn||2006-08-07|Has expired: Unsupported and broken very long time +japanese/xemacs-devel-wnn6||2006-08-07|Has expired: Unsupported and broken very long time +x11/gtk2-theme-switch||2006-08-07|Has expired: nothing new in over 2 years, use x11/gtkchtheme ==== //depot/projects/dtrace/src/libexec/tftpd/tftpd.8#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/libexec/tftpd/tftpd.8,v 1.18 2004/07/07 19:57:14 ru Exp $ +.\" $FreeBSD: src/libexec/tftpd/tftpd.8,v 1.19 2006/08/07 16:05:55 yar Exp $ .\" .Dd September 14, 2000 .Dt TFTPD 8 @@ -39,7 +39,7 @@ .Nm tftpd .Nd Internet Trivial File Transfer Protocol server .Sh SYNOPSIS -.Nm /usr/libexec/tftpd +.Nm tftpd .Op Fl cClnw .Op Fl s Ar directory .Op Fl u Ar user @@ -70,8 +70,11 @@ .Nm will allow only publicly readable files to be accessed. -Files containing the string ``/\|\fB.\|.\fP\|/'' or starting with -``\|\fB.\|.\fP\|/'' are not allowed. +Files containing the string +.Dq Li "/../" +or starting with +.Dq Li "../" +are not allowed. Files may be written only if they already exist and are publicly writable. Note that this extends the concept of .Dq public @@ -85,7 +88,7 @@ .Nm with a list of directories by including up to 20 pathnames as server program arguments in -.Pa /etc/inetd.conf . +.Xr inetd.conf 5 . In this case access is restricted to files whose names are prefixed by the one of the given directories. The given directories are also treated as a search path for @@ -94,21 +97,24 @@ The .Fl s option provides additional security by changing -.Nm Ns No 's -root directory, thereby prohibiting accesses outside of the specified +the root directory of +.Nm , +thereby prohibiting accesses to outside of the specified .Ar directory . Because .Xr chroot 2 requires super-user privileges, .Nm -must be run as root. +must be run as +.Li root . However, after performing the -.Fn chroot , +.Xr chroot 2 +call, .Nm -will set its user id to that of the specified +will set its user ID to that of the specified .Ar user , or -.Dq nobody +.Dq Li nobody if no .Fl u option is specified. @@ -116,8 +122,9 @@ The options are: .Bl -tag -width Ds .It Fl c -Changes the default root directory of a connecting host via chroot based on the -connecting IP address. +Changes the default root directory of a connecting host via +.Xr chroot 2 +based on the connecting IP address. This prevents multiple clients from writing to the same file at the same time. If the directory does not exist, the client connection is refused. The @@ -131,15 +138,17 @@ Operates the same as .Fl c except it falls back to -.Fl s Ns No 's .Ar directory +specified via +.Fl s if a directory does not exist for the client's IP. .It Fl l Log all requests using .Xr syslog 3 with the facility of .Dv LOG_FTP . -Note: Logging of +.Sy Note : +Logging of .Dv LOG_FTP messages must also be enabled in the syslog configuration file, @@ -151,15 +160,15 @@ Cause .Nm to change its root directory to -.Pa directory . -After changing roots but before accepting commands, +.Ar directory . +After doing that but before accepting commands, .Nm will switch credentials to an unprivileged user. .It Fl u Ar user Switch credentials to .Ar user (default -.Dq nobody ) +.Dq Li nobody ) when the .Fl s option is used. @@ -169,7 +178,7 @@ .Ar umask for newly created files. The default is 022 -.Pq Dv S_IWGRP | S_IWOTH . +.Pq Dv S_IWGRP No | Dv S_IWOTH . .It Fl w Allow writes requests to create new files. By default @@ -179,8 +188,11 @@ .Sh SEE ALSO .Xr tftp 1 , .Xr chroot 2 , -.Xr inetd 8 , -.Xr syslogd 8 +.Xr syslog 3 , +.Xr inetd.conf 5 , +.Xr services 5 , +.Xr syslog.conf 5 , +.Xr inetd 8 .Rs .%A K. R. Sollins .%T The TFTP Protocol (Revision 2) ==== //depot/projects/dtrace/src/share/man/man4/acpi.4#6 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.58 2006/08/04 07:19:01 njl Exp $ +.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.59 2006/08/07 07:28:47 yar Exp $ .\" .Dd July 29, 2006 .Dt ACPI 4 @@ -71,7 +71,9 @@ is modified. .It Va hw.acpi.cpu.cx_lowest Lowest Cx state to use for idling the CPU. -A scheduling algorithm will select states between C1 and this setting +A scheduling algorithm will select states between +.Li C1 +and this setting as system load dictates. To enable ACPI CPU idling control, .Va machdep.cpu_idle_hlt @@ -79,12 +81,24 @@ .It Va hw.acpi.cpu.cx_supported List of supported CPU idle states and their transition latency in microseconds. -Each state has a type (e.g., C2). -C1 is equivalent to the ia32 HLT instruction, C2 provides a deeper -sleep with the same semantics, and C3 provides the deepest sleep +Each state has a type (e.g., +.Li C2 ) . +.Li C1 +is equivalent to the ia32 +.Li HLT +instruction, +.Li C2 +provides a deeper +sleep with the same semantics, and +.Li C3 +provides the deepest sleep but additionally requires bus mastering to be disabled. -States greater than C3 provide even more power savings with the same -semantics as the C3 state. +States greater than +.Li C3 +provide even more power savings with the same +semantics as the +.Li C3 +state. Deeper sleeps provide more power savings but increased transition latency when an interrupt occurs. .It Va hw.acpi.disable_on_reboot @@ -99,15 +113,17 @@ with legacy rebooting support. .It Va hw.acpi.lid_switch_state Suspend state -.Pq Dv S1 Ns No \- Ns Dv S5 +.Pq Li S1 Ns \[en] Ns Li S5 to enter when the lid switch (i.e., a notebook screen) is closed. -Default is NONE (do nothing). +Default is +.Dq Li NONE +(do nothing). .It Va hw.acpi.power_button_state Suspend state -.Pq Dv S1 Ns No \- Ns Dv S5 +.Pq Li S1 Ns \[en] Ns Li S5 to enter when the power button is pressed. Default is -.Dv S5 +.Li S5 (power-off nicely). .It Va hw.acpi.reset_video Reset the video adapter from real mode during the resume path. @@ -115,20 +131,20 @@ Default is 0 (disabled). .It Va hw.acpi.s4bios Indicate whether the system supports -.Dv S4BIOS . +.Li S4BIOS . This means that the BIOS can handle all the functions of suspending the system to disk. Otherwise, the OS is responsible for suspending to disk -.Pq Dv S4OS . +.Pq Li S4OS . Most current systems do not support -.Dv S4BIOS . +.Li S4BIOS . .It Va hw.acpi.sleep_button_state Suspend state -.Pq Dv S1 Ns No \- Ns Dv S5 +.Pq Li S1 Ns \[en] Ns Li S5 to enter when the sleep button is pressed. This is usually a special function button on the keyboard. Default is -.Dv S3 +.Li S3 (suspend-to-RAM). .It Va hw.acpi.sleep_delay Wait this number of seconds between preparing the system to suspend and @@ -136,31 +152,31 @@ Default is 1 second. .It Va hw.acpi.supported_sleep_state Suspend states -.Pq Dv S1 Ns No \- Ns Dv S5 +.Pq Li S1 Ns \[en] Ns Li S5 supported by the BIOS. .Bl -tag -width indent -.It Dv S1 +.It Li S1 Quick suspend to RAM. -The CPU enters a lower power state but most peripherals are left running. -.It Dv S2 +The CPU enters a lower power state, but most peripherals are left running. +.It Li S2 Lower power state than -.Dv S1 , +.Li S1 , but with the same basic characteristics. Not supported by many systems. -.It Dv S3 +.It Li S3 Suspend to RAM. -Most devices are powered off and the system stops running except for +Most devices are powered off, and the system stops running except for memory refresh. -.It Dv S4 +.It Li S4 Suspend to disk. -All devices are powered off and the system stops running. +All devices are powered off, and the system stops running. When resuming, the system starts as if from a cold power on. Not yet supported by .Fx unless -.Dv S4BIOS +.Li S4BIOS is available. -.It Dv S5 +.It Li S5 System shuts down cleanly and powers off. .El .It Va hw.acpi.verbose @@ -585,7 +601,7 @@ Disable APIC mode with .Va hint.apic.0.disabled or don't use the -.Dv C2 +.Li C2 and -.Dv C3 +.Li C3 states if APIC mode is enabled. ==== //depot/projects/dtrace/src/sys/conf/files#26 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1136 2006/07/29 18:38:53 marcel Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1137 2006/08/07 12:02:42 rwatson Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1434,7 +1434,6 @@ kern/uipc_mbuf.c standard kern/uipc_mbuf2.c standard kern/uipc_mqueue.c optional p1003_1b_mqueue -kern/uipc_proto.c standard kern/uipc_sem.c optional p1003_1b_semaphores kern/uipc_sockbuf.c standard kern/uipc_socket.c standard ==== //depot/projects/dtrace/src/sys/dev/acpica/acpi_pci_link.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.53 2006/01/06 16:14:32 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.54 2006/08/07 19:52:30 jhb Exp $"); #include "opt_acpi.h" #include @@ -941,19 +941,27 @@ KASSERT(!PCI_INTERRUPT_VALID(link->l_irq), ("%s: link already has an IRQ", __func__)); - /* Check for a tunable override and use it if it is valid. */ + /* Check for a tunable override. */ if (ACPI_SUCCESS(acpi_short_name(acpi_get_handle(dev), link_name, sizeof(link_name)))) { snprintf(tunable_buffer, sizeof(tunable_buffer), "hw.pci.link.%s.%d.irq", link_name, link->l_res_index); - if (getenv_int(tunable_buffer, &i) && - PCI_INTERRUPT_VALID(i) && link_valid_irq(link, i)) + if (getenv_int(tunable_buffer, &i) && PCI_INTERRUPT_VALID(i)) { + if (!link_valid_irq(link, i)) + device_printf(dev, + "Warning, IRQ %d is not listed as valid\n", + i); return (i); + } snprintf(tunable_buffer, sizeof(tunable_buffer), "hw.pci.link.%s.irq", link_name); - if (getenv_int(tunable_buffer, &i) && - PCI_INTERRUPT_VALID(i) && link_valid_irq(link, i)) + if (getenv_int(tunable_buffer, &i) && PCI_INTERRUPT_VALID(i)) { + if (!link_valid_irq(link, i)) + device_printf(dev, + "Warning, IRQ %d is not listed as valid\n", + i); return (i); + } } /* ==== //depot/projects/dtrace/src/sys/dev/bge/if_bge.c#9 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.135 2006/06/29 06:38:21 glebius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.136 2006/08/07 12:51:50 glebius Exp $"); /* * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. @@ -247,6 +247,7 @@ { BGE_CHIPID_BCM5750_B1, "BCM5750 B1" }, { BGE_CHIPID_BCM5750_C0, "BCM5750 C0" }, { BGE_CHIPID_BCM5750_C1, "BCM5750 C1" }, + { BGE_CHIPID_BCM5750_C2, "BCM5750 C2" }, { BGE_CHIPID_BCM5714_A0, "BCM5714 A0" }, { BGE_CHIPID_BCM5752_A0, "BCM5752 A0" }, { BGE_CHIPID_BCM5752_A1, "BCM5752 A1" }, ==== //depot/projects/dtrace/src/sys/dev/bge/if_bgereg.h#5 (text+ko) ==== @@ -30,7 +30,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.50 2006/06/28 09:12:29 glebius Exp $ + * $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.51 2006/08/07 12:51:50 glebius Exp $ */ /* @@ -257,6 +257,7 @@ #define BGE_CHIPID_BCM5750_B1 0x41010000 #define BGE_CHIPID_BCM5750_C0 0x42000000 #define BGE_CHIPID_BCM5750_C1 0x42010000 +#define BGE_CHIPID_BCM5750_C2 0x42020000 #define BGE_CHIPID_BCM5714_A0 0x50000000 #define BGE_CHIPID_BCM5752_A0 0x60000000 #define BGE_CHIPID_BCM5752_A1 0x60010000 ==== //depot/projects/dtrace/src/sys/kern/uipc_usrreq.c#11 (text+ko) ==== @@ -50,7 +50,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.185 2006/08/06 10:39:21 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.186 2006/08/07 12:02:42 rwatson Exp $"); #include "opt_mac.h" @@ -124,17 +124,18 @@ static int unp_rights; /* file descriptors in flight */ -SYSCTL_DECL(_net_local_stream); +SYSCTL_NODE(_net, PF_LOCAL, local, CTLFLAG_RW, 0, "Local domain"); +SYSCTL_NODE(_net_local, SOCK_STREAM, stream, CTLFLAG_RW, 0, "SOCK_STREAM"); +SYSCTL_NODE(_net_local, SOCK_DGRAM, dgram, CTLFLAG_RW, 0, "SOCK_DGRAM"); + SYSCTL_ULONG(_net_local_stream, OID_AUTO, sendspace, CTLFLAG_RW, &unpst_sendspace, 0, ""); SYSCTL_ULONG(_net_local_stream, OID_AUTO, recvspace, CTLFLAG_RW, &unpst_recvspace, 0, ""); -SYSCTL_DECL(_net_local_dgram); SYSCTL_ULONG(_net_local_dgram, OID_AUTO, maxdgram, CTLFLAG_RW, &unpdg_sendspace, 0, ""); SYSCTL_ULONG(_net_local_dgram, OID_AUTO, recvspace, CTLFLAG_RW, &unpdg_recvspace, 0, ""); -SYSCTL_DECL(_net_local); SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0, ""); /* @@ -187,6 +188,37 @@ static int unp_listen(struct socket *, struct unpcb *, int, struct thread *); +/* + * Definitions of protocols supported in the LOCAL domain. + */ +static struct domain localdomain; +static struct protosw localsw[] = { +{ + .pr_type = SOCK_STREAM, + .pr_domain = &localdomain, + .pr_flags = PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS, + .pr_ctloutput = &uipc_ctloutput, + .pr_usrreqs = &uipc_usrreqs +}, +{ + .pr_type = SOCK_DGRAM, + .pr_domain = &localdomain, + .pr_flags = PR_ATOMIC|PR_ADDR|PR_RIGHTS, + .pr_usrreqs = &uipc_usrreqs +}, +}; + +static struct domain localdomain = { + .dom_family = AF_LOCAL, + .dom_name = "local", + .dom_init = unp_init, + .dom_externalize = unp_externalize, + .dom_dispose = unp_dispose, + .dom_protosw = localsw, + .dom_protoswNPROTOSW = &localsw[sizeof(localsw)/sizeof(localsw[0])] +}; +DOMAIN_SET(local); + static void uipc_abort(struct socket *so) { ==== //depot/projects/dtrace/src/sys/sys/domain.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)domain.h 8.1 (Berkeley) 6/2/93 - * $FreeBSD: src/sys/sys/domain.h,v 1.21 2005/01/07 02:29:23 imp Exp $ + * $FreeBSD: src/sys/sys/domain.h,v 1.22 2006/08/07 12:02:43 rwatson Exp $ */ #ifndef _SYS_DOMAIN_H_ @@ -66,7 +66,6 @@ #ifdef _KERNEL extern int domain_init_status; extern struct domain *domains; -extern struct domain localdomain; extern void net_add_domain(void *); #define DOMAIN_SET(name) \ ==== //depot/projects/dtrace/src/sys/sys/param.h#10 (text+ko) ==== @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)param.h 8.3 (Berkeley) 4/4/95 - * $FreeBSD: src/sys/sys/param.h,v 1.270 2006/08/05 20:35:11 jb Exp $ + * $FreeBSD: src/sys/sys/param.h,v 1.271 2006/08/07 10:33:07 keramida Exp $ */ #ifndef _SYS_PARAM_H_ @@ -340,7 +340,7 @@ /* * 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 + * files it can be used to determine the level of compatibility that the * FreeBSD headers provide to OpenSolaris code. Perhaps one day there * will be a really, really Single Unix Specification. */ ==== //depot/projects/dtrace/src/tools/tools/net80211/wesside/README#2 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/tools/tools/net80211/wesside/README,v 1.1 2006/08/07 00:05:03 sam Exp $ +$FreeBSD: src/tools/tools/net80211/wesside/README,v 1.2 2006/08/07 17:08:05 keramida Exp $ This is an implementation of the frag attack described in: http://tapir.cs.ucl.ac.uk/bittau-wep.pdf @@ -17,9 +17,8 @@ - Or, by contacting someone on the Internet [udps] and telling it to flood. * Uses aircrack periodically to attempt to crack the WEP key. The supplied aircrack is modified to work with wesside. -* Binds to a tap interface to allow TX. RX works if a dictionary is being buil -t - [dics] and a packt with a known IV traverses the network. +* Binds to a tap interface to allow TX. RX works if a dictionary is being built + [dics] and a packet with a known IV traverses the network. Examples: ========= @@ -31,6 +30,6 @@ ./wesside -s ip_of_internet_box To build a dictionary: -[Internet box]~# ./dicts source_ip_of_box 100 +[Internet box]~# ./dics source_ip_of_box 100 ./wesside -s ip_of_internet_box Use tap3 as if it were the wifi. ==== //depot/projects/dtrace/src/usr.sbin/mailwrapper/mailwrapper.8#3 (text+ko) ==== @@ -1,5 +1,6 @@ -.\" $NetBSD: mailwrapper.8,v 1.6 1999/03/25 16:40:17 is Exp $ -.\" $FreeBSD: src/usr.sbin/mailwrapper/mailwrapper.8,v 1.12 2004/07/02 23:12:48 ru Exp $ +.\" $NetBSD: mailwrapper.8,v 1.11 2002/02/08 01:38:50 ross Exp $ +.\" $OpenBSD: mailwrapper.8,v 1.8 2003/06/12 12:59:51 jmc Exp $ +.\" $FreeBSD: src/usr.sbin/mailwrapper/mailwrapper.8,v 1.13 2006/08/07 10:22:08 delphij Exp $ .\" .\" Copyright (c) 1998 .\" Perry E. Metzger. All rights reserved. @@ -31,7 +32,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" The following requests are required for all man pages. -.Dd December 16, 1998 +.Dd August 7, 2006 .Dt MAILWRAPPER 8 .Os .Sh NAME @@ -84,10 +85,10 @@ based on calling name, or through a set of programs that provide similar functionality. .Pp -Although having replacement programs that plug replace +Although having drop-in replacements for .Xr sendmail 8 helps in installing alternative MTAs, it essentially makes the -configuration of the system depend on hard installing new programs in +configuration of the system depend on hand installing new programs in .Pa /usr . This leads to configuration problems for many administrators, since they may wish to install a new MTA without altering the system @@ -131,14 +132,15 @@ is typically set up as a symbolic link to .Nm which is not usually invoked on its own. +.Sh EXIT STATUS +The +.Nm +exits 0 on success, and \*[Gt]0 if an error occurs. .Sh DIAGNOSTICS The .Nm -utility will return an error value and print a diagnostic if its configuration -file is missing or malformed, or does not contain a mapping for the -name under which -.Nm -was invoked. +will print a diagnostic if its configuration file is missing or malformed, +or does not contain a mapping for the name under which it was invoked. .Sh SEE ALSO .Xr mail 1 , .Xr mailq 1 , ==== //depot/projects/dtrace/src/usr.sbin/mailwrapper/mailwrapper.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ -/* $OpenBSD: mailwrapper.c,v 1.15 2003/03/09 01:24:26 millert Exp $ */ -/* $NetBSD: mailwrapper.c,v 1.7 2003/02/17 21:18:46 is Exp $ */ +/* $OpenBSD: mailwrapper.c,v 1.16 2004/07/06 03:38:14 millert Exp $ */ +/* $NetBSD: mailwrapper.c,v 1.9 2003/03/09 08:10:43 mjl Exp $ */ /* * Copyright (c) 1998 @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/usr.sbin/mailwrapper/mailwrapper.c,v 1.10 2006/06/06 05:01:12 delphij Exp $"); +__FBSDID("$FreeBSD: src/usr.sbin/mailwrapper/mailwrapper.c,v 1.11 2006/08/07 10:29:18 delphij Exp $"); #include #include ==== //depot/projects/dtrace/src/usr.sbin/ngctl/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/usr.sbin/ngctl/Makefile,v 1.14 2004/01/26 10:27:18 ru Exp $ +# $FreeBSD: src/usr.sbin/ngctl/Makefile,v 1.15 2006/08/07 14:17:05 glebius Exp $ # $Whistle: Makefile,v 1.3 1999/01/16 00:10:11 archie Exp $ PROG= ngctl @@ -6,7 +6,18 @@ SRCS= main.c mkpeer.c config.c connect.c dot.c name.c show.c list.c \ msg.c debug.c shutdown.c rmhook.c status.c types.c write.c WARNS?= 3 + +.if defined(RELEASE_CRUNCH) +NGCTL_NO_LIBEDIT= +.endif + DPADD= ${LIBNETGRAPH} LDADD= -lnetgraph +.if !defined(NGCTL_NO_LIBEDIT) +CFLAGS+= -DEDITLINE +DPADD+= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAP} +LDADD+= -pthread -ledit -ltermcap +.endif + .include ==== //depot/projects/dtrace/src/usr.sbin/ngctl/main.c#4 (text+ko) ==== @@ -34,7 +34,7 @@ * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * - * $FreeBSD: src/usr.sbin/ngctl/main.c,v 1.20 2006/06/28 10:38:38 glebius Exp $ + * $FreeBSD: src/usr.sbin/ngctl/main.c,v 1.21 2006/08/07 14:17:05 glebius Exp $ * $Whistle: main.c,v 1.12 1999/11/29 19:17:46 archie Exp $ */ @@ -51,6 +51,11 @@ #include #include #include +#ifdef EDITLINE +#include +#include +#include +#endif #include @@ -63,6 +68,7 @@ /* Internal functions */ static int ReadFile(FILE *fp); +static void ReadSockets(fd_set); static int DoParseCommand(char *line); static int DoCommand(int ac, char **av); static int DoInteractive(void); @@ -72,6 +78,11 @@ static int ReadCmd(int ac, char **av); static int HelpCmd(int ac, char **av); static int QuitCmd(int ac, char **av); +#ifdef EDITLINE +static sig_atomic_t unblock; +static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; +static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +#endif /* List of commands */ static const struct ngcmd *const cmds[] = { @@ -211,8 +222,122 @@ return (CMDRTN_OK); } +#ifdef EDITLINE +/* Signal handler for Monitor() thread. */ +static void +Unblock(int signal) +{ + unblock = 1; +} + /* - * Interactive mode + * Thread that monitors csock and dsock while main thread + * can be blocked in el_gets(). + */ +static void * +Monitor(void *v) +{ + struct sigaction act; + const int maxfd = MAX(csock, dsock) + 1; + + act.sa_handler = Unblock; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGUSR1, &act, NULL); + + pthread_mutex_lock(&mutex); + for (;;) { + fd_set rfds; + + /* See if any data or control messages are arriving. */ + FD_ZERO(&rfds); + FD_SET(csock, &rfds); + FD_SET(dsock, &rfds); + unblock = 0; + if (select(maxfd, &rfds, NULL, NULL, NULL) <= 0) { + if (errno == EINTR) { + if (unblock == 1) + pthread_cond_wait(&cond, &mutex); + continue; + } + err(EX_OSERR, "select"); + } + + ReadSockets(rfds); + } + + return (NULL); +} + +static char * +Prompt(EditLine *el) +{ + return PROMPT; +} + +/* + * Here we start a thread, that will monitor the netgraph + * sockets and catch any unexpected messages or data on them, + * that can arrive while user edits his/her commands. + * + * Whenever we expect data on netgraph sockets, we send signal + * to monitoring thread. The signal forces it to exit select() + * system call and sleep on condvar until we wake it. While + * monitoring thread sleeps, we can do our work with netgraph + * sockets. + */ +static int +DoInteractive(void) +{ + pthread_t monitor; + EditLine *el; + History *hist; + HistEvent hev = { 0, "" }; + + (*help_cmd.func)(0, NULL); + pthread_create(&monitor, NULL, Monitor, NULL); + el = el_init(getprogname(), stdin, stdout, stderr); + if (el == NULL) + return (CMDRTN_ERROR); + el_set(el, EL_PROMPT, Prompt); + el_set(el, EL_SIGNAL, 1); + el_set(el, EL_EDITOR, "emacs"); + hist = history_init(); + if (hist == NULL) + return (CMDRTN_ERROR); + history(hist, &hev, H_SETSIZE, 100); + history(hist, &hev, H_SETUNIQUE, 1); + el_set(el, EL_HIST, history, (const char *)hist); + el_source(el, NULL); + + for (;;) { + const char *buf; + int count; + + if ((buf = el_gets(el, &count)) == NULL) { + printf("\n"); + break; + } + history(hist, &hev, H_ENTER, buf); + pthread_kill(monitor, SIGUSR1); + pthread_mutex_lock(&mutex); + if (DoParseCommand((char *)buf) == CMDRTN_QUIT) + break; + pthread_cond_signal(&cond); + pthread_mutex_unlock(&mutex); + } + + history_end(hist); + el_end(el); + pthread_cancel(monitor); + + return (CMDRTN_QUIT); +} + +#else /* !EDITLINE */ + +/* + * Interactive mode w/o libedit functionality. */ static int DoInteractive(void) @@ -246,28 +371,8 @@ printf("\n"); } - /* Display any incoming control message */ - if (FD_ISSET(csock, &rfds)) - MsgRead(); - - /* Display any incoming data packet */ - if (FD_ISSET(dsock, &rfds)) { - u_char *buf; - char hook[NG_HOOKSIZ]; - int rl; - - /* Read packet from socket */ - if ((rl = NgAllocRecvData(dsock, &buf, hook)) < 0) - err(EX_OSERR, "reading hook \"%s\"", hook); - if (rl == 0) - errx(EX_OSERR, "EOF from hook \"%s\"?", hook); + ReadSockets(rfds); - /* Write packet to stdout */ - printf("Rec'd data packet on hook \"%s\":\n", hook); - DumpAscii(buf, rl); - free(buf); - } - /* Get any user input */ if (FD_ISSET(0, &rfds)) { char buf[LINE_MAX]; @@ -282,6 +387,36 @@ } return (CMDRTN_QUIT); } +#endif /* !EDITLINE */ + +/* + * Read and process data on netgraph control and data sockets. + */ +static void +ReadSockets(fd_set rfds) +{ + /* Display any incoming control message. */ + if (FD_ISSET(csock, &rfds)) + MsgRead(); + + /* Display any incoming data packet. */ + if (FD_ISSET(dsock, &rfds)) { + char hook[NG_HOOKSIZ]; + u_char *buf; + int rl; + + /* Read packet from socket. */ + if ((rl = NgAllocRecvData(dsock, &buf, hook)) < 0) + err(EX_OSERR, "reading hook \"%s\"", hook); + if (rl == 0) + errx(EX_OSERR, "EOF from hook \"%s\"?", hook); + + /* Write packet to stdout. */ + printf("Rec'd data packet on hook \"%s\":\n", hook); + DumpAscii(buf, rl); + free(buf); + } +} /* * Parse a command line and execute the command ==== //depot/projects/dtrace/www/tools/portsgrowth/ports.log#3 (text+ko) ==== @@ -1383,3 +1383,179 @@ 2006/05/10 05:18:29 14590 2006/05/10 21:03:27 14610 2006/05/11 05:16:43 14613 +2006/05/11 21:16:11 14628 +2006/05/12 05:32:20 14630 +2006/05/12 21:06:19 14633 +2006/05/13 09:03:03 14632 +2006/05/13 21:00:59 14635 +2006/05/14 05:15:44 14636 +2006/05/14 21:01:56 14639 +2006/05/15 05:15:39 14645 +2006/05/15 21:01:46 14668 +2006/05/16 05:19:12 14671 +2006/05/16 21:01:50 14676 +2006/05/17 05:15:45 14677 +2006/05/17 21:04:17 14689 +2006/05/18 05:16:13 14689 +2006/05/18 21:02:03 14693 +2006/05/19 05:15:56 14694 +2006/05/19 21:02:07 14698 +2006/05/20 05:23:17 14707 +2006/05/20 21:02:07 14709 +2006/05/21 05:16:00 14709 +2006/05/21 21:02:25 14711 +2006/05/22 05:16:17 14727 +2006/05/22 21:02:51 14737 +2006/05/23 05:16:59 14737 +2006/05/23 21:02:43 14740 +2006/05/24 05:15:50 14742 +2006/05/24 21:05:40 14748 +2006/05/25 05:16:00 14750 +2006/05/25 21:01:53 14759 +2006/05/26 05:16:01 14767 +2006/05/26 21:01:55 14779 +2006/05/27 05:24:15 14780 +2006/05/27 13:16:17 14794 +2006/05/28 05:16:16 14798 +2006/05/28 05:16:16 14798 +2006/05/29 05:16:39 14802 +2006/05/29 21:03:04 14804 +2006/05/30 05:17:39 14807 +2006/05/30 21:02:40 14811 +2006/05/31 05:16:23 14814 +2006/05/31 21:02:06 14823 +2006/06/01 05:16:44 14825 +2006/06/01 21:02:24 14829 +2006/06/02 05:16:40 14830 +2006/06/02 21:15:48 14831 +2006/06/03 05:23:20 14836 +2006/06/03 17:16:22 14838 +2006/06/04 05:16:58 14839 +2006/06/04 21:03:32 14840 +2006/06/05 05:17:01 14840 +2006/06/05 21:07:51 14855 +2006/06/06 05:16:17 14860 +2006/06/06 21:05:28 14871 +2006/06/07 05:22:12 14871 +2006/06/07 21:03:22 14875 +2006/06/08 05:18:38 14881 +2006/06/08 21:03:08 14886 +2006/06/09 05:17:29 14886 +2006/06/09 17:16:53 14889 +2006/06/10 05:25:20 14892 >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 7 21:47:36 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 7C0B016A4DF; Mon, 7 Aug 2006 21:47: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 5612B16A4DD for ; Mon, 7 Aug 2006 21:47:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E318843D45 for ; Mon, 7 Aug 2006 21:47:35 +0000 (GMT) (envelope-from gonzo@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 k77LlZM9073419 for ; Mon, 7 Aug 2006 21:47:35 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77LlZuk073416 for perforce@freebsd.org; Mon, 7 Aug 2006 21:47:35 GMT (envelope-from gonzo@FreeBSD.org) Date: Mon, 7 Aug 2006 21:47:35 GMT Message-Id: <200608072147.k77LlZuk073416@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 103401 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, 07 Aug 2006 21:47:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=103401 Change 103401 by gonzo@gonzo_hq on 2006/08/07 21:47:00 o Implement all access functions from bus_space family: read(multi/region), write(multi/region), set(multi/region), copy(region). Affected files ... .. //depot/projects/mips2/src/sys/mips/include/bus.h#5 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/bus.h#5 (text+ko) ==== @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2006 Oleksandr Tymoshenko. * Copyright (c) KATO Takenori, 1999. * * All rights reserved. Unpublished rights reserved under the copyright @@ -239,209 +240,106 @@ * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle/offset and copy into buffer provided. */ -static __inline void bus_space_read_multi_1(bus_space_tag_t tag, +static __inline void bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t *addr, size_t count); -static __inline void bus_space_read_multi_2(bus_space_tag_t tag, +static __inline void bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, size_t count); -static __inline void bus_space_read_multi_4(bus_space_tag_t tag, +static __inline void bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, size_t count); static __inline void -bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t *addr, size_t count) { -#if 0 - if (tag == MIPS_BUS_SPACE_IO) - insb(bsh + offset, addr, count); - else { -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: movb (%2),%%al \n\ - stosb \n\ - loop 1b" : - "=D" (addr), "=c" (count) : - "r" (bsh + offset), "0" (addr), "1" (count) : - "%eax", "memory"); -#endif + volatile u_int8_t * ptr = (volatile u_int8_t *)(bsh + offset); + + for(; count > 0; count--, addr++, ptr++) { + *addr = *ptr; } -#endif } static __inline void -bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, size_t count) { -#if 0 - if (tag == MIPS_BUS_SPACE_IO) - insw(bsh + offset, addr, count); - else { -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: movw (%2),%%ax \n\ - stosw \n\ - loop 1b" : - "=D" (addr), "=c" (count) : - "r" (bsh + offset), "0" (addr), "1" (count) : - "%eax", "memory"); -#endif + volatile u_int16_t * ptr = (volatile u_int16_t *)(bsh + offset); + + for(; count > 0; count--, addr++, ptr++) { + *addr = *ptr; } -#endif } static __inline void -bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, size_t count) { -#if 0 - if (tag == MIPS_BUS_SPACE_IO) - insl(bsh + offset, addr, count); - else { -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: movl (%2),%%eax \n\ - stosl \n\ - loop 1b" : - "=D" (addr), "=c" (count) : - "r" (bsh + offset), "0" (addr), "1" (count) : - "%eax", "memory"); -#endif + volatile u_int32_t * ptr = (volatile u_int32_t *)(bsh + offset); + + for(; count > 0; count--, addr++, ptr++) { + *addr = *ptr; } -#endif } -#if 0 /* Cause a link error for bus_space_read_multi_8 */ -#define bus_space_read_multi_8 !!! bus_space_read_multi_8 unimplemented !!! -#endif - /* * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle and starting at `offset' and copy into * buffer provided. */ -static __inline void bus_space_read_region_1(bus_space_tag_t tag, +static __inline void bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t *addr, size_t count); -static __inline void bus_space_read_region_2(bus_space_tag_t tag, +static __inline void bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, size_t count); -static __inline void bus_space_read_region_4(bus_space_tag_t tag, +static __inline void bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, size_t count); static __inline void -bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t *addr, size_t count) { -#if 0 - if (tag == MIPS_BUS_SPACE_IO) { - int _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: inb %w2,%%al \n\ - stosb \n\ - incl %2 \n\ - loop 1b" : - "=D" (addr), "=c" (count), "=d" (_port_) : - "0" (addr), "1" (count), "2" (_port_) : - "%eax", "memory", "cc"); -#endif - } else { - bus_space_handle_t _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - repne \n\ - movsb" : - "=D" (addr), "=c" (count), "=S" (_port_) : - "0" (addr), "1" (count), "2" (_port_) : - "memory", "cc"); -#endif + volatile u_int8_t * ptr = (volatile u_int8_t *)(bsh + offset); + + for(; count > 0; count--, addr++) { + *addr = *ptr; } -#endif } static __inline void -bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, size_t count) { -#if 0 - if (tag == MIPS_BUS_SPACE_IO) { - int _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: inw %w2,%%ax \n\ - stosw \n\ - addl $2,%2 \n\ - loop 1b" : - "=D" (addr), "=c" (count), "=d" (_port_) : - "0" (addr), "1" (count), "2" (_port_) : - "%eax", "memory", "cc"); -#endif - } else { - bus_space_handle_t _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - repne \n\ - movsw" : - "=D" (addr), "=c" (count), "=S" (_port_) : - "0" (addr), "1" (count), "2" (_port_) : - "memory", "cc"); -#endif + volatile u_int16_t * ptr = (volatile u_int16_t *)(bsh + offset); + + for(; count > 0; count--, addr++) { + *addr = *ptr; } -#endif } static __inline void -bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, size_t count) { -#if 0 - if (tag == MIPS_BUS_SPACE_IO) { - int _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: inl %w2,%%eax \n\ - stosl \n\ - addl $4,%2 \n\ - loop 1b" : - "=D" (addr), "=c" (count), "=d" (_port_) : - "0" (addr), "1" (count), "2" (_port_) : - "%eax", "memory", "cc"); -#endif - } else { - bus_space_handle_t _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - repne \n\ - movsl" : - "=D" (addr), "=c" (count), "=S" (_port_) : - "0" (addr), "1" (count), "2" (_port_) : - "memory", "cc"); -#endif + volatile u_int32_t * ptr = (volatile u_int32_t *)(bsh + offset); + + for(; count > 0; count--, addr++) { + *addr = *ptr; } -#endif } #if 0 /* Cause a link error for bus_space_read_region_8 */ @@ -486,232 +384,115 @@ *(volatile u_int32_t *)(bsh + offset) = value; } -#if 0 /* Cause a link error for bus_space_write_8 */ -#define bus_space_write_8 !!! bus_space_write_8 not implemented !!! -#endif - /* * Write `count' 1, 2, 4, or 8 byte quantities from the buffer * provided to bus space described by tag/handle/offset. */ -static __inline void bus_space_write_multi_1(bus_space_tag_t tag, +static __inline void bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int8_t *addr, size_t count); -static __inline void bus_space_write_multi_2(bus_space_tag_t tag, +static __inline void bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int16_t *addr, size_t count); -static __inline void bus_space_write_multi_4(bus_space_tag_t tag, +static __inline void bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int32_t *addr, size_t count); static __inline void -bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int8_t *addr, size_t count) { -#if 0 - if (tag == MIPS_BUS_SPACE_IO) - outsb(bsh + offset, addr, count); - else { -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: lodsb \n\ - movb %%al,(%2) \n\ - loop 1b" : - "=S" (addr), "=c" (count) : - "r" (bsh + offset), "0" (addr), "1" (count) : - "%eax", "memory", "cc"); -#endif + volatile u_int8_t * ptr = (volatile u_int8_t *)(bsh + offset); + + for(; count > 0; count--, addr++, ptr++) { + *ptr = *addr; } -#endif } static __inline void -bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int16_t *addr, size_t count) { -#if 0 - if (tag == MIPS_BUS_SPACE_IO) - outsw(bsh + offset, addr, count); - else { -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: lodsw \n\ - movw %%ax,(%2) \n\ - loop 1b" : - "=S" (addr), "=c" (count) : - "r" (bsh + offset), "0" (addr), "1" (count) : - "%eax", "memory", "cc"); -#endif + volatile u_int16_t * ptr = (volatile u_int16_t *)(bsh + offset); + + for(; count > 0; count--, addr++, ptr++) { + *ptr = *addr; } -#endif } static __inline void -bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int32_t *addr, size_t count) { -#if 0 + volatile u_int32_t * ptr = (volatile u_int32_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) - outsl(bsh + offset, addr, count); - else { -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: lodsl \n\ - movl %%eax,(%2) \n\ - loop 1b" : - "=S" (addr), "=c" (count) : - "r" (bsh + offset), "0" (addr), "1" (count) : - "%eax", "memory", "cc"); -#endif + for(; count > 0; count--, addr++, ptr++) { + *ptr = *addr; } -#endif } -#if 0 /* Cause a link error for bus_space_write_multi_8 */ -#define bus_space_write_multi_8(t, h, o, a, c) \ - !!! bus_space_write_multi_8 unimplemented !!! -#endif - /* * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided * to bus space described by tag/handle starting at `offset'. */ -static __inline void bus_space_write_region_1(bus_space_tag_t tag, +static __inline void bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int8_t *addr, size_t count); -static __inline void bus_space_write_region_2(bus_space_tag_t tag, +static __inline void bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int16_t *addr, size_t count); -static __inline void bus_space_write_region_4(bus_space_tag_t tag, +static __inline void bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int32_t *addr, size_t count); static __inline void -bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int8_t *addr, size_t count) { -#if 0 + volatile u_int8_t * ptr = (volatile u_int8_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) { - int _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: lodsb \n\ - outb %%al,%w0 \n\ - incl %0 \n\ - loop 1b" : - "=d" (_port_), "=S" (addr), "=c" (count) : - "0" (_port_), "1" (addr), "2" (count) : - "%eax", "memory", "cc"); -#endif - } else { - bus_space_handle_t _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - repne \n\ - movsb" : - "=D" (_port_), "=S" (addr), "=c" (count) : - "0" (_port_), "1" (addr), "2" (count) : - "memory", "cc"); -#endif + for(; count > 0; count--, addr++) { + *ptr = *addr; } -#endif } static __inline void -bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int16_t *addr, size_t count) { -#if 0 + volatile u_int16_t * ptr = (volatile u_int16_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) { - int _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: lodsw \n\ - outw %%ax,%w0 \n\ - addl $2,%0 \n\ - loop 1b" : - "=d" (_port_), "=S" (addr), "=c" (count) : - "0" (_port_), "1" (addr), "2" (count) : - "%eax", "memory", "cc"); -#endif - } else { - bus_space_handle_t _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - repne \n\ - movsw" : - "=D" (_port_), "=S" (addr), "=c" (count) : - "0" (_port_), "1" (addr), "2" (count) : - "memory", "cc"); -#endif + for(; count > 0; count--, addr++) { + *ptr = *addr; } -#endif } static __inline void -bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, +bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int32_t *addr, size_t count) { -#if 0 + volatile u_int32_t * ptr = (volatile u_int32_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) { - int _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - 1: lodsl \n\ - outl %%eax,%w0 \n\ - addl $4,%0 \n\ - loop 1b" : - "=d" (_port_), "=S" (addr), "=c" (count) : - "0" (_port_), "1" (addr), "2" (count) : - "%eax", "memory", "cc"); -#endif - } else { - bus_space_handle_t _port_ = bsh + offset; -#ifdef __GNUCLIKE_ASM - __asm __volatile(" \n\ - cld \n\ - repne \n\ - movsl" : - "=D" (_port_), "=S" (addr), "=c" (count) : - "0" (_port_), "1" (addr), "2" (count) : - "memory", "cc"); -#endif + for(; count > 0; count--, addr++) { + *ptr = *addr; } -#endif } -#if 0 /* Cause a link error for bus_space_write_region_8 */ -#define bus_space_write_region_8 \ - !!! bus_space_write_region_8 unimplemented !!! -#endif - /* * Write the 1, 2, 4, or 8 byte value `val' to bus space described * by tag/handle/offset `count' times. @@ -734,54 +515,35 @@ bus_space_set_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t value, size_t count) { -#if 0 - bus_space_handle_t addr = bsh + offset; + volatile u_int8_t * ptr = (volatile u_int8_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - outb(addr, value); - else - while (count--) - *(volatile u_int8_t *)(addr) = value; -#endif + for(; count > 0; count--) { + *ptr = value; + } } static __inline void bus_space_set_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t value, size_t count) { -#if 0 - bus_space_handle_t addr = bsh + offset; + volatile u_int16_t * ptr = (volatile u_int16_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - outw(addr, value); - else - while (count--) - *(volatile u_int16_t *)(addr) = value; -#endif + for(; count > 0; count--) { + *ptr = value; + } } static __inline void bus_space_set_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t value, size_t count) { -#if 0 - bus_space_handle_t addr = bsh + offset; + volatile u_int32_t * ptr = (volatile u_int32_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - outl(addr, value); - else - while (count--) - *(volatile u_int32_t *)(addr) = value; -#endif + for(; count > 0; count--) { + *ptr = value; + } } -#if 0 /* Cause a link error for bus_space_set_multi_8 */ -#define bus_space_set_multi_8 !!! bus_space_set_multi_8 unimplemented !!! -#endif - /* * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described * by tag/handle starting at `offset'. @@ -804,54 +566,35 @@ bus_space_set_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t value, size_t count) { -#if 0 - bus_space_handle_t addr = bsh + offset; + volatile u_int8_t * ptr = (volatile u_int8_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) - for (; count != 0; count--, addr++) - outb(addr, value); - else - for (; count != 0; count--, addr++) - *(volatile u_int8_t *)(addr) = value; -#endif + for(; count > 0; count--, ptr++) { + *ptr = value; + } } static __inline void bus_space_set_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t value, size_t count) { -#if 0 - bus_space_handle_t addr = bsh + offset; + volatile u_int16_t * ptr = (volatile u_int16_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) - for (; count != 0; count--, addr += 2) - outw(addr, value); - else - for (; count != 0; count--, addr += 2) - *(volatile u_int16_t *)(addr) = value; -#endif + for(; count > 0; count--, ptr++) { + *ptr = value; + } } static __inline void bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t value, size_t count) { -#if 0 - bus_space_handle_t addr = bsh + offset; + volatile u_int32_t * ptr = (volatile u_int32_t *)(bsh + offset); - if (tag == MIPS_BUS_SPACE_IO) - for (; count != 0; count--, addr += 4) - outl(addr, value); - else - for (; count != 0; count--, addr += 4) - *(volatile u_int32_t *)(addr) = value; -#endif + for(; count > 0; count--, ptr++) { + *ptr = value; + } } -#if 0 /* Cause a link error for bus_space_set_region_8 */ -#define bus_space_set_region_8 !!! bus_space_set_region_8 unimplemented !!! -#endif - /* * Copy `count' 1, 2, 4, or 8 byte values from bus space starting * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. @@ -880,36 +623,12 @@ bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2, size_t count) { -#if 0 - bus_space_handle_t addr1 = bsh1 + off1; - bus_space_handle_t addr2 = bsh2 + off2; + volatile u_int8_t * ptr1 = (volatile u_int8_t *)(bsh1 + off1); + volatile u_int8_t * ptr2 = (volatile u_int8_t *)(bsh2 + off2); - if (tag == MIPS_BUS_SPACE_IO) { - if (addr1 >= addr2) { - /* src after dest: copy forward */ - for (; count != 0; count--, addr1++, addr2++) - outb(addr2, inb(addr1)); - } else { - /* dest after src: copy backwards */ - for (addr1 += (count - 1), addr2 += (count - 1); - count != 0; count--, addr1--, addr2--) - outb(addr2, inb(addr1)); - } - } else { - if (addr1 >= addr2) { - /* src after dest: copy forward */ - for (; count != 0; count--, addr1++, addr2++) - *(volatile u_int8_t *)(addr2) = - *(volatile u_int8_t *)(addr1); - } else { - /* dest after src: copy backwards */ - for (addr1 += (count - 1), addr2 += (count - 1); - count != 0; count--, addr1--, addr2--) - *(volatile u_int8_t *)(addr2) = - *(volatile u_int8_t *)(addr1); - } + for(; count > 0; count--, ptr1++, ptr2++) { + *ptr2 = *ptr1; } -#endif } static __inline void @@ -917,36 +636,12 @@ bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2, size_t count) { -#if 0 - bus_space_handle_t addr1 = bsh1 + off1; - bus_space_handle_t addr2 = bsh2 + off2; + volatile u_int16_t * ptr1 = (volatile u_int16_t *)(bsh1 + off1); + volatile u_int16_t * ptr2 = (volatile u_int16_t *)(bsh2 + off2); - if (tag == MIPS_BUS_SPACE_IO) { - if (addr1 >= addr2) { - /* src after dest: copy forward */ - for (; count != 0; count--, addr1 += 2, addr2 += 2) - outw(addr2, inw(addr1)); - } else { - /* dest after src: copy backwards */ - for (addr1 += 2 * (count - 1), addr2 += 2 * (count - 1); - count != 0; count--, addr1 -= 2, addr2 -= 2) - outw(addr2, inw(addr1)); - } - } else { - if (addr1 >= addr2) { - /* src after dest: copy forward */ - for (; count != 0; count--, addr1 += 2, addr2 += 2) - *(volatile u_int16_t *)(addr2) = - *(volatile u_int16_t *)(addr1); - } else { - /* dest after src: copy backwards */ - for (addr1 += 2 * (count - 1), addr2 += 2 * (count - 1); - count != 0; count--, addr1 -= 2, addr2 -= 2) - *(volatile u_int16_t *)(addr2) = - *(volatile u_int16_t *)(addr1); - } + for(; count > 0; count--, ptr1++, ptr2++) { + *ptr2 = *ptr1; } -#endif } static __inline void @@ -954,36 +649,12 @@ bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2, size_t count) { -#if 0 - bus_space_handle_t addr1 = bsh1 + off1; - bus_space_handle_t addr2 = bsh2 + off2; + volatile u_int32_t * ptr1 = (volatile u_int32_t *)(bsh1 + off1); + volatile u_int32_t * ptr2 = (volatile u_int32_t *)(bsh2 + off2); - if (tag == MIPS_BUS_SPACE_IO) { - if (addr1 >= addr2) { - /* src after dest: copy forward */ - for (; count != 0; count--, addr1 += 4, addr2 += 4) - outl(addr2, inl(addr1)); - } else { - /* dest after src: copy backwards */ - for (addr1 += 4 * (count - 1), addr2 += 4 * (count - 1); - count != 0; count--, addr1 -= 4, addr2 -= 4) - outl(addr2, inl(addr1)); - } - } else { - if (addr1 >= addr2) { - /* src after dest: copy forward */ - for (; count != 0; count--, addr1 += 4, addr2 += 4) - *(volatile u_int32_t *)(addr2) = - *(volatile u_int32_t *)(addr1); - } else { - /* dest after src: copy backwards */ - for (addr1 += 4 * (count - 1), addr2 += 4 * (count - 1); - count != 0; count--, addr1 -= 4, addr2 -= 4) - *(volatile u_int32_t *)(addr2) = - *(volatile u_int32_t *)(addr1); - } + for(; count > 0; count--, ptr1++, ptr2++) { + *ptr2 = *ptr1; } -#endif } #if 0 /* Cause a link error for bus_space_copy_8 */ From owner-p4-projects@FreeBSD.ORG Mon Aug 7 21:47:36 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 B2E3C16A539; Mon, 7 Aug 2006 21:47: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 85C6016A4EB for ; Mon, 7 Aug 2006 21:47:36 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B2F543D46 for ; Mon, 7 Aug 2006 21:47:36 +0000 (GMT) (envelope-from jb@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 k77LlaUp073425 for ; Mon, 7 Aug 2006 21:47:36 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77LlZ2n073422 for perforce@freebsd.org; Mon, 7 Aug 2006 21:47:35 GMT (envelope-from jb@freebsd.org) Date: Mon, 7 Aug 2006 21:47:35 GMT Message-Id: <200608072147.k77LlZ2n073422@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103402 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, 07 Aug 2006 21:47:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=103402 Change 103402 by jb@jb_freebsd2 on 2006/08/07 21:47:04 Remove a temporary file delivered by one of the many integrations. Affected files ... .. //depot/projects/dtrace/src/sys/boot/sparc64/loader/Makefile~#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Mon Aug 7 22:01:56 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 D6AE516A4DF; Mon, 7 Aug 2006 22:01:55 +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 AF0CF16A4DE for ; Mon, 7 Aug 2006 22:01:55 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D33F943D58 for ; Mon, 7 Aug 2006 22:01:54 +0000 (GMT) (envelope-from marcel@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 k77M1sGc074126 for ; Mon, 7 Aug 2006 22:01:54 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77M1rGJ074123 for perforce@freebsd.org; Mon, 7 Aug 2006 22:01:53 GMT (envelope-from marcel@freebsd.org) Date: Mon, 7 Aug 2006 22:01:53 GMT Message-Id: <200608072201.k77M1rGJ074123@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103403 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, 07 Aug 2006 22:01:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=103403 Change 103403 by marcel@marcel_nfs on 2006/08/07 22:01:07 The PT_GET{,DB,FP}REGS and PT_SET{,DB,FP}REGS requests are now based on a new data structure, called struct ptgetset. The struct ptregset is a meta-structure that describes the size of the register set and has two function pointers: one to build the register set from the thread's context and one to update the thread's context from the register set. These functions do the same as fill_*regs() and set_*regs() without having to hard code that. The 3 struct ptregset data structures are linked to from the process' sysentvec. As such, kern_ptrace() can now handle these requests without having to go through translation steps (see sys/i386/linux/linux_ptrace.c) or without having to hardcode special cases (see COMPAT_IA32). Add PT_GETXREGSIZE, PT_GETXREGS and PT_SETXREGS requests that too are based on struct ptregset. The data argument is used as an index, allowing for multiple extra (machine-specific) sets. The struct ptregset abtracts the MD differences between the extra registers. These requests are needed on ia64 and i386 and are to be used by GDB, in relation to proc_services.h and thread_db.h. Update procfs(4), thereby eliminating the hardcoding fo handling COMPAT_IA32. This commit does not have the changes to the various sysentvecs and is therefore incomplete... Affected files ... .. //depot/projects/gdb/sys/arm/arm/machdep.c#6 edit .. //depot/projects/gdb/sys/fs/procfs/procfs_ctl.c#4 edit .. //depot/projects/gdb/sys/fs/procfs/procfs_dbregs.c#4 edit .. //depot/projects/gdb/sys/fs/procfs/procfs_fpregs.c#4 edit .. //depot/projects/gdb/sys/fs/procfs/procfs_mem.c#4 edit .. //depot/projects/gdb/sys/fs/procfs/procfs_regs.c#4 edit .. //depot/projects/gdb/sys/i386/linux/linux_ptrace.c#4 edit .. //depot/projects/gdb/sys/ia64/ia64/machdep.c#15 edit .. //depot/projects/gdb/sys/kern/sys_process.c#11 edit .. //depot/projects/gdb/sys/sys/ptrace.h#7 edit .. //depot/projects/gdb/sys/sys/syscallsubr.h#4 edit .. //depot/projects/gdb/sys/sys/sysent.h#5 edit Differences ... ==== //depot/projects/gdb/sys/arm/arm/machdep.c#6 (text+ko) ==== @@ -364,7 +364,7 @@ uio.uio_segflg = UIO_SYSSPACE; uio.uio_rw = UIO_READ; uio.uio_td = td; - return proc_rwmem(td->td_proc, &uio); + return ptrace_rwmem(td->td_proc, &uio); } static int @@ -383,7 +383,7 @@ uio.uio_segflg = UIO_SYSSPACE; uio.uio_rw = UIO_WRITE; uio.uio_td = td; - return proc_rwmem(td->td_proc, &uio); + return ptrace_rwmem(td->td_proc, &uio); } int ==== //depot/projects/gdb/sys/fs/procfs/procfs_ctl.c#4 (text+ko) ==== @@ -245,7 +245,7 @@ * What does it mean to single step a threaded program? */ case PROCFS_CTL_STEP: - error = proc_sstep(FIRST_THREAD_IN_PROC(p)); /* XXXKSE */ + error = ptrace_sstep(FIRST_THREAD_IN_PROC(p)); /* XXXKSE */ PROC_UNLOCK(p); if (error) return (error); ==== //depot/projects/gdb/sys/fs/procfs/procfs_dbregs.c#4 (text+ko) ==== @@ -48,52 +48,27 @@ #include #include #include +#include #include #include #include +#include #include -#include - #include #include #ifdef COMPAT_IA32 -#include -#include -#include - extern struct sysentvec ia32_freebsd_sysvec; -/* - * PROC(write, dbregs, td2, &r) becomes - * proc_write_dbregs(td2, &r) or - * proc_write_dbregs32(td2, &r32) - * - * UIOMOVE_FROMBUF(r, uio) becomes - * uiomove_frombuf(&r, sizeof(r), uio) or - * uiomove_frombuf(&r32, sizeof(r32), uio) - */ -#define PROC(d, w, t, r) wrap32 ? \ - proc_ ## d ## _ ## w ## 32(t, r ## 32) : \ - proc_ ## d ## _ ## w(t, r) -#define UIOMOVE_FROMBUF(k, u) wrap32 ? \ - uiomove_frombuf(& k ## 32, sizeof(k ## 32), u) : \ - uiomove_frombuf(& k, sizeof(k), u) -#else -#define PROC(d, w, t, r) proc_ ## d ## _ ## w(t, r) -#define UIOMOVE_FROMBUF(k, u) uiomove_frombuf(& k, sizeof(k), u) #endif int procfs_doprocdbregs(PFS_FILL_ARGS) { + struct sysentvec *sv; + struct thread *td2; + void *buf; int error; - struct dbreg r; - struct thread *td2; -#ifdef COMPAT_IA32 - struct dbreg32 r32; - int wrap32 = 0; -#endif PROC_LOCK(p); KASSERT(p->p_lock > 0, ("proc not held")); @@ -104,19 +79,30 @@ /* XXXKSE: */ td2 = FIRST_THREAD_IN_PROC(p); + sv = td2->td_proc->p_sysent; + + if (sv->sv_dbreg == NULL) { + PROC_UNLOCK(p); + return (ENXIO); + } #ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) { - if (td2->td_proc->p_sysent != &ia32_freebsd_sysvec) { - PROC_UNLOCK(p); - return (EINVAL); - } - wrap32 = 1; + if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && + sv != &ia32_freebsd_sysvec) { + PROC_UNLOCK(p); + return (EINVAL); } #endif - error = PROC(read, dbregs, td2, &r); + + PROC_UNLOCK(p); + buf = malloc(sv->sv_dbreg->rs_size, M_TEMP, M_WAITOK); + if (buf == NULL) + return (ENOMEM); + + PROC_LOCK(p); + error = ptrace_read_regf(td2, buf, sv->sv_dbreg->rs_read); if (error == 0) { PROC_UNLOCK(p); - error = UIOMOVE_FROMBUF(r, uio); + error = uiomove_frombuf(buf, sv->sv_dbreg->rs_size, uio); PROC_LOCK(p); } if (error == 0 && uio->uio_rw == UIO_WRITE) { @@ -124,10 +110,12 @@ error = EBUSY; else /* XXXKSE: */ - error = PROC(write, dbregs, td2, &r); + error = ptrace_write_regf(td2, buf, + sv->sv_dbreg->rs_write); } PROC_UNLOCK(p); + free(buf, M_TEMP); uio->uio_offset = 0; return (error); } ==== //depot/projects/gdb/sys/fs/procfs/procfs_fpregs.c#4 (text+ko) ==== @@ -42,52 +42,27 @@ #include #include #include +#include #include #include #include +#include #include -#include - #include #include #ifdef COMPAT_IA32 -#include -#include -#include - extern struct sysentvec ia32_freebsd_sysvec; -/* - * PROC(write, fpregs, td2, &r) becomes - * proc_write_fpregs(td2, &r) or - * proc_write_fpregs32(td2, &r32) - * - * UIOMOVE_FROMBUF(r, uio) becomes - * uiomove_frombuf(&r, sizeof(r), uio) or - * uiomove_frombuf(&r32, sizeof(r32), uio) - */ -#define PROC(d, w, t, r) wrap32 ? \ - proc_ ## d ## _ ## w ## 32(t, r ## 32) : \ - proc_ ## d ## _ ## w(t, r) -#define UIOMOVE_FROMBUF(k, u) wrap32 ? \ - uiomove_frombuf(& k ## 32, sizeof(k ## 32), u) : \ - uiomove_frombuf(& k, sizeof(k), u) -#else -#define PROC(d, w, t, r) proc_ ## d ## _ ## w(t, r) -#define UIOMOVE_FROMBUF(k, u) uiomove_frombuf(& k, sizeof(k), u) #endif int procfs_doprocfpregs(PFS_FILL_ARGS) { + struct sysentvec *sv; + struct thread *td2; + void *buf; int error; - struct fpreg r; - struct thread *td2; -#ifdef COMPAT_IA32 - struct fpreg32 r32; - int wrap32 = 0; -#endif PROC_LOCK(p); KASSERT(p->p_lock > 0, ("proc not held")); @@ -98,19 +73,31 @@ /* XXXKSE: */ td2 = FIRST_THREAD_IN_PROC(p); + sv = td2->td_proc->p_sysent; + + if (sv->sv_fpreg == NULL) { + PROC_UNLOCK(p); + return (ENXIO); + } + #ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) { - if (td2->td_proc->p_sysent != &ia32_freebsd_sysvec) { - PROC_UNLOCK(p); - return (EINVAL); - } - wrap32 = 1; + if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && + sv != &ia32_freebsd_sysvec) { + PROC_UNLOCK(p); + return (EINVAL); } #endif - error = PROC(read, fpregs, td2, &r); + + PROC_UNLOCK(p); + buf = malloc(sv->sv_fpreg->rs_size, M_TEMP, M_WAITOK); + if (buf == NULL) + return (ENOMEM); + + PROC_LOCK(p); + error = ptrace_read_regf(td2, buf, sv->sv_fpreg->rs_read); if (error == 0) { PROC_UNLOCK(p); - error = UIOMOVE_FROMBUF(r, uio); + error = uiomove_frombuf(buf, sv->sv_fpreg->rs_size, uio); PROC_LOCK(p); } if (error == 0 && uio->uio_rw == UIO_WRITE) { @@ -118,10 +105,12 @@ error = EBUSY; else /* XXXKSE: */ - error = PROC(write, fpregs, td2, &r); + error = ptrace_write_regf(td2, buf, + sv->sv_fpreg->rs_write); } PROC_UNLOCK(p); + free(buf, M_TEMP); uio->uio_offset = 0; return (error); } ==== //depot/projects/gdb/sys/fs/procfs/procfs_mem.c#4 (text+ko) ==== @@ -65,7 +65,7 @@ error = p_candebug(td, p); PROC_UNLOCK(p); if (error == 0) - error = proc_rwmem(p, uio); + error = ptrace_rwmem(p, uio); return (error); } ==== //depot/projects/gdb/sys/fs/procfs/procfs_regs.c#4 (text+ko) ==== @@ -42,52 +42,27 @@ #include #include #include +#include #include #include #include +#include #include -#include - #include #include #ifdef COMPAT_IA32 -#include -#include -#include - extern struct sysentvec ia32_freebsd_sysvec; -/* - * PROC(write, regs, td2, &r) becomes - * proc_write_regs(td2, &r) or - * proc_write_regs32(td2, &r32) - * - * UIOMOVE_FROMBUF(r, uio) becomes - * uiomove_frombuf(&r, sizeof(r), uio) or - * uiomove_frombuf(&r32, sizeof(r32), uio) - */ -#define PROC(d, w, t, r) wrap32 ? \ - proc_ ## d ## _ ## w ## 32(t, r ## 32) : \ - proc_ ## d ## _ ## w(t, r) -#define UIOMOVE_FROMBUF(k, u) wrap32 ? \ - uiomove_frombuf(& k ## 32, sizeof(k ## 32), u) : \ - uiomove_frombuf(& k, sizeof(k), u) -#else -#define PROC(d, w, t, r) proc_ ## d ## _ ## w(t, r) -#define UIOMOVE_FROMBUF(k, u) uiomove_frombuf(& k, sizeof(k), u) #endif int procfs_doprocregs(PFS_FILL_ARGS) { + struct sysentvec *sv; + struct thread *td2; + void *buf; int error; - struct reg r; - struct thread *td2; -#ifdef COMPAT_IA32 - struct reg32 r32; - int wrap32 = 0; -#endif PROC_LOCK(p); KASSERT(p->p_lock > 0, ("proc not held")); @@ -98,19 +73,31 @@ /* XXXKSE: */ td2 = FIRST_THREAD_IN_PROC(p); + sv = td2->td_proc->p_sysent; + + if (sv->sv_reg == NULL) { + PROC_UNLOCK(p); + return (ENXIO); + } + #ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) { - if (td2->td_proc->p_sysent != &ia32_freebsd_sysvec) { - PROC_UNLOCK(p); - return (EINVAL); - } - wrap32 = 1; + if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && + sv != &ia32_freebsd_sysvec) { + PROC_UNLOCK(p); + return (EINVAL); } #endif - error = PROC(read, regs, td2, &r); + + PROC_UNLOCK(p); + buf = malloc(sv->sv_reg->rs_size, M_TEMP, M_WAITOK); + if (buf == NULL) + return (ENOMEM); + + PROC_LOCK(p); + error = ptrace_read_regf(td2, buf, sv->sv_reg->rs_read); if (error == 0) { PROC_UNLOCK(p); - error = UIOMOVE_FROMBUF(r, uio); + error = uiomove_frombuf(buf, sv->sv_reg->rs_size, uio); PROC_LOCK(p); } if (error == 0 && uio->uio_rw == UIO_WRITE) { @@ -118,10 +105,12 @@ error = EBUSY; else /* XXXKSE: */ - error = PROC(write, regs, td2, &r); + error = ptrace_write_regf(td2, buf, + sv->sv_reg->rs_write); } PROC_UNLOCK(p); + free(buf, M_TEMP); uio->uio_offset = 0; return (error); } ==== //depot/projects/gdb/sys/i386/linux/linux_ptrace.c#4 (text+ko) ==== @@ -269,13 +269,13 @@ case PTRACE_POKETEXT: case PTRACE_POKEDATA: case PTRACE_KILL: - error = kern_ptrace(td, req, pid, addr, uap->data); + error = kern_ptrace(td, req, pid, 0, addr, uap->data); break; case PTRACE_PEEKTEXT: case PTRACE_PEEKDATA: { /* need to preserve return value */ int rval = td->td_retval[0]; - error = kern_ptrace(td, req, pid, addr, 0); + error = kern_ptrace(td, req, pid, 0, addr, 0); if (error == 0) error = copyout(td->td_retval, (void *)uap->data, sizeof(l_int)); @@ -283,20 +283,20 @@ break; } case PTRACE_DETACH: - error = kern_ptrace(td, PT_DETACH, pid, (void *)1, + error = kern_ptrace(td, PT_DETACH, pid, 0, (void *)1, map_signum(uap->data)); break; case PTRACE_SINGLESTEP: case PTRACE_CONT: - error = kern_ptrace(td, req, pid, (void *)1, + error = kern_ptrace(td, req, pid, 0, (void *)1, map_signum(uap->data)); break; case PTRACE_ATTACH: - error = kern_ptrace(td, PT_ATTACH, pid, addr, uap->data); + error = kern_ptrace(td, PT_ATTACH, pid, 0, addr, uap->data); break; case PTRACE_GETREGS: /* Linux is using data where FreeBSD is using addr */ - error = kern_ptrace(td, PT_GETREGS, pid, &u.bsd_reg, 0); + error = kern_ptrace(td, PT_GETREGS, pid, 0, &u.bsd_reg, 0); if (error == 0) { map_regs_to_linux(&u.bsd_reg, &r.reg); error = copyout(&r.reg, (void *)uap->data, @@ -308,12 +308,13 @@ error = copyin((void *)uap->data, &r.reg, sizeof(r.reg)); if (error == 0) { map_regs_from_linux(&u.bsd_reg, &r.reg); - error = kern_ptrace(td, PT_SETREGS, pid, &u.bsd_reg, 0); + error = kern_ptrace(td, PT_SETREGS, pid, 0, &u.bsd_reg, + 0); } break; case PTRACE_GETFPREGS: /* Linux is using data where FreeBSD is using addr */ - error = kern_ptrace(td, PT_GETFPREGS, pid, &u.bsd_fpreg, 0); + error = kern_ptrace(td, PT_GETFPREGS, pid, 0, &u.bsd_fpreg, 0); if (error == 0) { map_fpregs_to_linux(&u.bsd_fpreg, &r.fpreg); error = copyout(&r.fpreg, (void *)uap->data, @@ -325,7 +326,7 @@ error = copyin((void *)uap->data, &r.fpreg, sizeof(r.fpreg)); if (error == 0) { map_fpregs_from_linux(&u.bsd_fpreg, &r.fpreg); - error = kern_ptrace(td, PT_SETFPREGS, pid, + error = kern_ptrace(td, PT_SETFPREGS, pid, 0, &u.bsd_fpreg, 0); } break; @@ -429,7 +430,8 @@ * as necessary. */ if (uap->addr < sizeof(struct linux_pt_reg)) { - error = kern_ptrace(td, PT_GETREGS, pid, &u.bsd_reg, 0); + error = kern_ptrace(td, PT_GETREGS, pid, 0, &u.bsd_reg, + 0); if (error != 0) break; @@ -444,7 +446,8 @@ (l_int)uap->data; map_regs_from_linux(&u.bsd_reg, &r.reg); - error = kern_ptrace(td, PT_SETREGS, pid, &u.bsd_reg, 0); + error = kern_ptrace(td, PT_SETREGS, pid, 0, &u.bsd_reg, + 0); } /* @@ -452,8 +455,8 @@ */ if (uap->addr >= LINUX_DBREG_OFFSET && uap->addr <= LINUX_DBREG_OFFSET + LINUX_DBREG_SIZE) { - error = kern_ptrace(td, PT_GETDBREGS, pid, &u.bsd_dbreg, - 0); + error = kern_ptrace(td, PT_GETDBREGS, pid, 0, + &u.bsd_dbreg, 0); if (error != 0) break; @@ -467,7 +470,7 @@ *(l_int *)((char *)&u.bsd_dbreg + uap->addr) = uap->data; - error = kern_ptrace(td, PT_SETDBREGS, pid, + error = kern_ptrace(td, PT_SETDBREGS, pid, 0, &u.bsd_dbreg, 0); } ==== //depot/projects/gdb/sys/ia64/ia64/machdep.c#15 (text+ko) ==== @@ -1115,9 +1115,9 @@ uio.uio_segflg = UIO_SYSSPACE; uio.uio_rw = UIO_WRITE; uio.uio_td = td; - error = proc_rwmem(td->td_proc, &uio); + error = ptrace_rwmem(td->td_proc, &uio); /* - * XXX proc_rwmem() doesn't currently return ENOSPC, + * XXX ptrace_rwmem() doesn't currently return ENOSPC, * so I think it can bogusly return 0. Neither do * we allow short writes. */ ==== //depot/projects/gdb/sys/kern/sys_process.c#11 (text+ko) ==== @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -74,32 +75,6 @@ }; #endif -/* - * Functions implemented using PROC_ACTION(): - * - * proc_read_regs(proc, regs) - * Get the current user-visible register set from the process - * and copy it into the regs structure (). - * The process is stopped at the time read_regs is called. - * - * proc_write_regs(proc, regs) - * Update the current register set from the passed in regs - * structure. Take care to avoid clobbering special CPU - * registers or privileged bits in the PSL. - * Depending on the architecture this may have fix-up work to do, - * especially if the IAR or PCW are modified. - * The process is stopped at the time write_regs is called. - * - * proc_read_fpregs, proc_write_fpregs - * deal with the floating point register set, otherwise as above. - * - * proc_read_dbregs, proc_write_dbregs - * deal with the processor debug register set, otherwise as above. - * - * proc_sstep(proc) - * Arrange for the process to trap after executing a single instruction. - */ - #define PROC_ACTION(action) do { \ int error; \ \ @@ -112,105 +87,28 @@ } while(0) int -proc_read_regs(struct thread *td, struct reg *regs) +ptrace_read_regf(struct thread *td, void *reg, ptregset_readf f) { - PROC_ACTION(fill_regs(td, regs)); + PROC_ACTION((*f)(td, reg)); } int -proc_write_regs(struct thread *td, struct reg *regs) +ptrace_write_regf(struct thread *td, const void *reg, ptregset_writef f) { - PROC_ACTION(set_regs(td, regs)); + PROC_ACTION((*f)(td, reg)); } int -proc_read_dbregs(struct thread *td, struct dbreg *dbregs) -{ - - PROC_ACTION(fill_dbregs(td, dbregs)); -} - -int -proc_write_dbregs(struct thread *td, struct dbreg *dbregs) -{ - - PROC_ACTION(set_dbregs(td, dbregs)); -} - -/* - * Ptrace doesn't support fpregs at all, and there are no security holes - * or translations for fpregs, so we can just copy them. - */ -int -proc_read_fpregs(struct thread *td, struct fpreg *fpregs) -{ - - PROC_ACTION(fill_fpregs(td, fpregs)); -} - -int -proc_write_fpregs(struct thread *td, struct fpreg *fpregs) -{ - - PROC_ACTION(set_fpregs(td, fpregs)); -} - -#ifdef COMPAT_IA32 -/* For 32 bit binaries, we need to expose the 32 bit regs layouts. */ -int -proc_read_regs32(struct thread *td, struct reg32 *regs32) -{ - - PROC_ACTION(fill_regs32(td, regs32)); -} - -int -proc_write_regs32(struct thread *td, struct reg32 *regs32) -{ - - PROC_ACTION(set_regs32(td, regs32)); -} - -int -proc_read_dbregs32(struct thread *td, struct dbreg32 *dbregs32) -{ - - PROC_ACTION(fill_dbregs32(td, dbregs32)); -} - -int -proc_write_dbregs32(struct thread *td, struct dbreg32 *dbregs32) -{ - - PROC_ACTION(set_dbregs32(td, dbregs32)); -} - -int -proc_read_fpregs32(struct thread *td, struct fpreg32 *fpregs32) -{ - - PROC_ACTION(fill_fpregs32(td, fpregs32)); -} - -int -proc_write_fpregs32(struct thread *td, struct fpreg32 *fpregs32) -{ - - PROC_ACTION(set_fpregs32(td, fpregs32)); -} -#endif - -int -proc_sstep(struct thread *td) +ptrace_sstep(struct thread *td) { PROC_ACTION(ptrace_single_step(td)); } int -proc_rwmem(struct proc *p, struct uio *uio) +ptrace_rwmem(struct proc *p, struct uio *uio) { vm_map_t map; vm_object_t backing_object, object = NULL; @@ -347,156 +245,164 @@ }; #endif -#ifdef COMPAT_IA32 -/* - * This CPP subterfuge is to try and reduce the number of ifdefs in - * the body of the code. - * COPYIN(uap->addr, &r.reg, sizeof r.reg); - * becomes either: - * copyin(uap->addr, &r.reg, sizeof r.reg); - * or - * copyin(uap->addr, &r.reg32, sizeof r.reg32); - * .. except this is done at runtime. - */ -#define COPYIN(u, k, s) wrap32 ? \ - copyin(u, k ## 32, s ## 32) : \ - copyin(u, k, s) -#define COPYOUT(k, u, s) wrap32 ? \ - copyout(k ## 32, u, s ## 32) : \ - copyout(k, u, s) -#else -#define COPYIN(u, k, s) copyin(u, k, s) -#define COPYOUT(k, u, s) copyout(k, u, s) -#endif /* * MPSAFE */ int ptrace(struct thread *td, struct ptrace_args *uap) { - /* - * XXX this obfuscation is to reduce stack usage, but the register - * structs may be too large to put on the stack anyway. - */ - union { - struct ptrace_io_desc piod; - struct ptrace_lwpinfo pl; - struct dbreg dbreg; - struct fpreg fpreg; - struct reg reg; -#ifdef COMPAT_IA32 - struct dbreg32 dbreg32; - struct fpreg32 fpreg32; - struct reg32 reg32; - struct ptrace_io_desc32 piod32; -#endif - } r; void *addr; - int error = 0; -#ifdef COMPAT_IA32 - int wrap32 = 0; + struct sysentvec *sv; + struct proc *p; + struct thread *td2; + size_t bufsz; + int error; + lwpid_t tid; - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) - wrap32 = 1; -#endif AUDIT_ARG(pid, uap->pid); AUDIT_ARG(cmd, uap->req); AUDIT_ARG(addr, uap->addr); AUDIT_ARG(value, uap->data); - addr = &r; + + tid = 0; + if (uap->req == PT_TRACE_ME) { + p = td->td_proc; + PROC_LOCK(p); + } else { + if (uap->pid <= PID_MAX) { + p = pfind(uap->pid); + if (p == NULL) + return (ESRCH); + } else { + tid = uap->pid; + sx_slock(&allproc_lock); + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + mtx_lock_spin(&sched_lock); + FOREACH_THREAD_IN_PROC(p, td2) { + if (td2->td_tid == tid) + break; + } + mtx_unlock_spin(&sched_lock); + if (td2 != NULL) + break; /* proc lock held */ + PROC_UNLOCK(p); + } + sx_sunlock(&allproc_lock); + if (p == NULL) + return (ESRCH); + uap->pid = p->p_pid; + } + } + + sv = p->p_sysent; + switch (uap->req) { case PT_GETREGS: + case PT_SETREGS: + bufsz = sv->sv_reg->rs_size; + break; case PT_GETFPREGS: + case PT_SETFPREGS: + bufsz = sv->sv_fpreg->rs_size; + break; case PT_GETDBREGS: + case PT_SETDBREGS: + bufsz = sv->sv_dbreg->rs_size; + break; + case PT_GETXREGSIZE: + bufsz = sizeof(size_t); + break; + case PT_GETXREGS: + case PT_SETXREGS: + if (uap->data < 0 || uap->data >= sv->sv_nxregs) { + PROC_UNLOCK(p); + return (EINVAL); + } + bufsz = sv->sv_xregs[uap->data].rs_size; + break; case PT_LWPINFO: + bufsz = sizeof(struct ptrace_lwpinfo); break; + case PT_IO: + if (sv == &ia32_freebsd_sysvec) + bufsz = sizeof(struct ptrace_io_desc32); + else + bufsz = sizeof(struct ptrace_io_desc); + break; + default: + bufsz = 0; + break; + } + PROC_UNLOCK(p); + + if (bufsz != 0) { + addr = malloc(bufsz, M_TEMP, M_WAITOK); + if (addr == NULL) + return (ENOMEM); + } else + addr = uap->addr; + + switch (uap->req) { case PT_SETREGS: - error = COPYIN(uap->addr, &r.reg, sizeof r.reg); - break; case PT_SETFPREGS: - error = COPYIN(uap->addr, &r.fpreg, sizeof r.fpreg); - break; case PT_SETDBREGS: - error = COPYIN(uap->addr, &r.dbreg, sizeof r.dbreg); - break; + case PT_SETXREGS: case PT_IO: - error = COPYIN(uap->addr, &r.piod, sizeof r.piod); + error = copyin(uap->addr, addr, bufsz); break; default: - addr = uap->addr; + error = 0; break; } if (error) - return (error); + goto out; - error = kern_ptrace(td, uap->req, uap->pid, addr, uap->data); + error = kern_ptrace(td, uap->req, uap->pid, tid, addr, uap->data); if (error) - return (error); + goto out; switch (uap->req) { - case PT_IO: - error = COPYOUT(&r.piod, uap->addr, sizeof r.piod); - break; + case PT_LWPINFO: + if (uap->data < bufsz) + bufsz = uap->data; + /* FALLTHROUGH */ case PT_GETREGS: - error = COPYOUT(&r.reg, uap->addr, sizeof r.reg); - break; case PT_GETFPREGS: - error = COPYOUT(&r.fpreg, uap->addr, sizeof r.fpreg); - break; case PT_GETDBREGS: - error = COPYOUT(&r.dbreg, uap->addr, sizeof r.dbreg); + case PT_GETXREGSIZE: + case PT_GETXREGS: + case PT_IO: + error = copyout(addr, uap->addr, bufsz); break; - case PT_LWPINFO: - error = copyout(&r.pl, uap->addr, uap->data); + default: + error = 0; break; } +out: + if (bufsz > 0) + free(addr, M_TEMP); return (error); } -#undef COPYIN -#undef COPYOUT - -#ifdef COMPAT_IA32 -/* - * PROC_READ(regs, td2, addr); - * becomes either: - * proc_read_regs(td2, addr); - * or - * proc_read_regs32(td2, addr); - * .. except this is done at runtime. There is an additional - * complication in that PROC_WRITE disallows 32 bit consumers - * from writing to 64 bit address space targets. - */ -#define PROC_READ(w, t, a) wrap32 ? \ - proc_read_ ## w ## 32(t, a) : \ - proc_read_ ## w (t, a) -#define PROC_WRITE(w, t, a) wrap32 ? \ - (safe ? proc_write_ ## w ## 32(t, a) : EINVAL ) : \ - proc_write_ ## w (t, a) -#else -#define PROC_READ(w, t, a) proc_read_ ## w (t, a) -#define PROC_WRITE(w, t, a) proc_write_ ## w (t, a) -#endif int -kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) +kern_ptrace(struct thread *td, int req, pid_t pid, lwpid_t tid, void *addr, int data) { struct iovec iov; struct uio uio; - struct proc *curp, *p, *pp; + struct proc *p, *pp; + struct sysentvec *sv; struct thread *td2 = NULL; struct ptrace_io_desc *piod = NULL; struct ptrace_lwpinfo *pl; int error, write, tmp, num; int proctree_locked = 0; - lwpid_t tid = 0, *buf; + lwpid_t *buf; #ifdef COMPAT_IA32 - int wrap32 = 0, safe = 0; struct ptrace_io_desc32 *piod32 = NULL; #endif - curp = td->td_proc; - /* Lock proctree before locking the process. */ switch (req) { case PT_TRACE_ME: @@ -519,35 +425,31 @@ p = td->td_proc; PROC_LOCK(p); } else { - if (pid <= PID_MAX) { - if ((p = pfind(pid)) == NULL) { - if (proctree_locked) - sx_xunlock(&proctree_lock); - return (ESRCH); + p = pfind(pid); + if (p == NULL) { + if (proctree_locked) + sx_xunlock(&proctree_lock); + return (ESRCH); + } + if (tid != 0) { + mtx_lock_spin(&sched_lock); + FOREACH_THREAD_IN_PROC(p, td2) { + if (td2->td_tid == tid) + break; } - } else { - /* this is slow, should be optimized */ - sx_slock(&allproc_lock); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 7 22:20:19 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 AD39916A4E1; Mon, 7 Aug 2006 22:20:19 +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 79EC516A4E0 for ; Mon, 7 Aug 2006 22:20:19 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C75343D46 for ; Mon, 7 Aug 2006 22:20:18 +0000 (GMT) (envelope-from jb@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 k77MKILM076529 for ; Mon, 7 Aug 2006 22:20:18 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77MKIr7076526 for perforce@freebsd.org; Mon, 7 Aug 2006 22:20:18 GMT (envelope-from jb@freebsd.org) Date: Mon, 7 Aug 2006 22:20:18 GMT Message-Id: <200608072220.k77MKIr7076526@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103404 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, 07 Aug 2006 22:20:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=103404 Change 103404 by jb@jb_freebsd2 on 2006/08/07 22:19:47 Sync to current (whitespace). Affected files ... .. //depot/projects/dtrace/src/etc/mtree/BSD.usr.dist#8 edit Differences ... ==== //depot/projects/dtrace/src/etc/mtree/BSD.usr.dist#8 (text+ko) ==== @@ -21,7 +21,7 @@ dtrace .. engines - .. + .. .. libdata gcc From owner-p4-projects@FreeBSD.ORG Mon Aug 7 22:36:40 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 EFA4B16A4E0; Mon, 7 Aug 2006 22:36:39 +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 C92E216A4DE for ; Mon, 7 Aug 2006 22:36:39 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A8BF43D53 for ; Mon, 7 Aug 2006 22:36:39 +0000 (GMT) (envelope-from imp@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 k77Madnf077455 for ; Mon, 7 Aug 2006 22:36:39 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77Maduk077448 for perforce@freebsd.org; Mon, 7 Aug 2006 22:36:39 GMT (envelope-from imp@freebsd.org) Date: Mon, 7 Aug 2006 22:36:39 GMT Message-Id: <200608072236.k77Maduk077448@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103405 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, 07 Aug 2006 22:36:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=103405 Change 103405 by imp@imp_lighthouse on 2006/08/07 22:36:18 proper watchdog prototype. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91_st.c#13 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91_st.c#13 (text+ko) ==== @@ -58,7 +58,7 @@ #define WR4(off, val) \ bus_space_write_4(timer_softc->sc_st, timer_softc->sc_sh, (off), (val)) -static watchdog_fn at91st_watchdog; +static void at91st_watchdog(void *, u_int, int *); static inline int st_crtr(void) From owner-p4-projects@FreeBSD.ORG Mon Aug 7 22:37:41 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 B8E6C16A4E0; Mon, 7 Aug 2006 22:37:41 +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 97D4616A4DD for ; Mon, 7 Aug 2006 22:37:41 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3911543D4C for ; Mon, 7 Aug 2006 22:37:41 +0000 (GMT) (envelope-from imp@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 k77Mbfj5077480 for ; Mon, 7 Aug 2006 22:37:41 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77Mbexe077477 for perforce@freebsd.org; Mon, 7 Aug 2006 22:37:40 GMT (envelope-from imp@freebsd.org) Date: Mon, 7 Aug 2006 22:37:40 GMT Message-Id: <200608072237.k77Mbexe077477@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103406 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, 07 Aug 2006 22:37:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=103406 Change 103406 by imp@imp_lighthouse on 2006/08/07 22:36:39 Give the OS 30s to boot. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#14 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#14 (text+ko) ==== @@ -53,6 +53,7 @@ fpga_load(); #endif EMAC_Init(); + start_wdog(30); LoadBootCommands(); if (getc(1) == -1) ExecuteEnvironmentFunctions(); From owner-p4-projects@FreeBSD.ORG Mon Aug 7 22:46:53 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 B357E16A4E1; Mon, 7 Aug 2006 22:46:53 +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 72DC316A4DA for ; Mon, 7 Aug 2006 22:46:53 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28B0243D53 for ; Mon, 7 Aug 2006 22:46:53 +0000 (GMT) (envelope-from jb@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 k77MkrOa077938 for ; Mon, 7 Aug 2006 22:46:53 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77MkrCj077927 for perforce@freebsd.org; Mon, 7 Aug 2006 22:46:53 GMT (envelope-from jb@freebsd.org) Date: Mon, 7 Aug 2006 22:46:53 GMT Message-Id: <200608072246.k77MkrCj077927@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103407 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, 07 Aug 2006 22:46:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=103407 Change 103407 by jb@jb_freebsd2 on 2006/08/07 22:46:36 IFC Affected files ... .. //depot/projects/dtrace/src/lib/libc/gen/syslog.c#4 integrate .. //depot/projects/dtrace/src/sbin/geom/class/eli/geom_eli.c#4 integrate Differences ... ==== //depot/projects/dtrace/src/lib/libc/gen/syslog.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/29/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.37 2006/05/11 09:10:33 davidxu Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.38 2006/08/07 20:12:18 phk Exp $"); #include "namespace.h" #include @@ -116,7 +116,7 @@ h->base += len; h->left -= len; } - return 0; + return len; } /* ==== //depot/projects/dtrace/src/sbin/geom/class/eli/geom_eli.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/class/eli/geom_eli.c,v 1.12 2006/06/06 22:06:24 pjd Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/class/eli/geom_eli.c,v 1.13 2006/08/07 20:09:09 pjd Exp $"); #include #include @@ -393,7 +393,7 @@ } } /* - * If md_iterations is equal to 0, user don't want PKCS5v2. + * If md_iterations is equal to 0, user don't want PKCS#5v2. */ if (md->md_iterations == 0) { g_eli_crypto_hmac_update(&ctx, md->md_salt, From owner-p4-projects@FreeBSD.ORG Tue Aug 8 00:20:57 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 D09D616A4E7; Tue, 8 Aug 2006 00:20:56 +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 ADC5716A4E2 for ; Tue, 8 Aug 2006 00:20:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB3E343D4C for ; Tue, 8 Aug 2006 00:20:54 +0000 (GMT) (envelope-from jb@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 k780KsU5086461 for ; Tue, 8 Aug 2006 00:20:54 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k780Ks4B086455 for perforce@freebsd.org; Tue, 8 Aug 2006 00:20:54 GMT (envelope-from jb@freebsd.org) Date: Tue, 8 Aug 2006 00:20:54 GMT Message-Id: <200608080020.k780Ks4B086455@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103413 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: Tue, 08 Aug 2006 00:20:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=103413 Change 103413 by jb@jb_freebsd2 on 2006/08/08 00:20:09 More KSE merges. "It's everywhere!" Affected files ... .. //depot/projects/dtrace/src/sys/amd64/amd64/machdep.c#6 edit .. //depot/projects/dtrace/src/sys/amd64/amd64/trap.c#6 edit .. //depot/projects/dtrace/src/sys/amd64/amd64/vm_machdep.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/amd64/amd64/machdep.c#6 (text+ko) ==== @@ -1137,7 +1137,11 @@ * This may be done better later if it gets more high level * components in it. If so just link td->td_proc here. */ +#ifdef KSE + proc_linkup(&proc0, &ksegrp0, &thread0); +#else proc_linkup(&proc0, &thread0); +#endif preload_metadata = (caddr_t)(uintptr_t)(modulep + KERNBASE); preload_bootstrap_relocate(KERNBASE); ==== //depot/projects/dtrace/src/sys/amd64/amd64/trap.c#6 (text+ko) ==== @@ -299,6 +299,10 @@ case T_PAGEFLT: /* page fault */ addr = frame.tf_addr; +#ifdef KSE + if (td->td_pflags & TDP_SA) + thread_user_enter(td); +#endif i = trap_pfault(&frame, TRUE); if (i == -1) goto userout; @@ -749,6 +753,10 @@ td->td_frame = &frame; if (td->td_ucred != p->p_ucred) cred_update_thread(td); +#ifdef KSE + if (p->p_flag & P_SA) + thread_user_enter(td); +#endif params = (caddr_t)frame.tf_rsp + sizeof(register_t); code = frame.tf_rax; orig_tf_rflags = frame.tf_rflags; ==== //depot/projects/dtrace/src/sys/amd64/amd64/vm_machdep.c#4 (text+ko) ==== @@ -244,7 +244,12 @@ * Initialize machine state (pcb and trap frame) for a new thread about to * upcall. Put enough state in the new thread's PCB to get it to go back * userret(), where we can intercept it again to set the return (upcall) + * ifdef KSE + * Address and stack, along with those from upcals that are from other sources + * such as those generated in thread_userret() itself. + * else * Address and stack, along with those from upcals that are from other sources. + * endif */ void cpu_set_upcall(struct thread *td, struct thread *td0) @@ -301,14 +306,31 @@ } /* + * ifdef KSE + * Set that machine state for performing an upcall that has to + * be done in thread_userret() so that those upcalls generated + * in thread_userret() itself can be done as well. + * else * Modify the machine state created by cpu_set_upcall() to arrange * for the new thread to make a specific call as its first act. + * endif */ void cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { +#ifdef KSE + /* + * Do any extra cleaning that needs to be done. + * The thread may have optional components + * that are not present in a fresh thread. + * This may be a recycled thread so make it look + * as though it's newly allocated. + */ + cpu_thread_clean(td); +#endif + /* * Set the trap frame to point at the beginning of the uts * function. From owner-p4-projects@FreeBSD.ORG Tue Aug 8 00:39:19 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 A0A2C16A4E1; Tue, 8 Aug 2006 00:39:19 +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 4D11A16A4DE for ; Tue, 8 Aug 2006 00:39:19 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA24B43D46 for ; Tue, 8 Aug 2006 00:39:18 +0000 (GMT) (envelope-from jb@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 k780dIX3088801 for ; Tue, 8 Aug 2006 00:39:18 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k780dIFe088798 for perforce@freebsd.org; Tue, 8 Aug 2006 00:39:18 GMT (envelope-from jb@freebsd.org) Date: Tue, 8 Aug 2006 00:39:18 GMT Message-Id: <200608080039.k780dIFe088798@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103414 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: Tue, 08 Aug 2006 00:39:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=103414 Change 103414 by jb@jb_freebsd2 on 2006/08/08 00:38:54 Put the KDTRACE kernel option in opt_global.h because that is included throughout the kernel build. Affected files ... .. //depot/projects/dtrace/src/sys/conf/options#17 edit .. //depot/projects/dtrace/src/sys/i386/i386/exception.s#7 edit .. //depot/projects/dtrace/src/sys/i386/i386/local_apic.c#5 edit .. //depot/projects/dtrace/src/sys/i386/i386/trap.c#11 edit .. //depot/projects/dtrace/src/sys/i386/i386/tsc.c#5 edit .. //depot/projects/dtrace/src/sys/kern/kern_synch.c#9 edit .. //depot/projects/dtrace/src/sys/kern/kern_tc.c#7 edit .. //depot/projects/dtrace/src/sys/kern/link_elf.c#8 edit .. //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#13 edit .. //depot/projects/dtrace/src/sys/kern/subr_pcpu.c#4 edit .. //depot/projects/dtrace/src/sys/sun4v/sun4v/tick.c#3 edit .. //depot/projects/dtrace/src/sys/sun4v/sun4v/trap.c#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/options#17 (text+ko) ==== @@ -601,7 +601,7 @@ PCFCLOCK_VERBOSE opt_pcfclock.h PCFCLOCK_MAX_RETRIES opt_pcfclock.h -KDTRACE opt_kdtrace.h +KDTRACE opt_global.h KTR opt_global.h KTR_ALQ opt_ktr.h KTR_MASK opt_ktr.h ==== //depot/projects/dtrace/src/sys/i386/i386/exception.s#7 (text+ko) ==== @@ -38,7 +38,6 @@ */ #include "opt_apic.h" -#include "opt_kdtrace.h" #include "opt_npx.h" #include ==== //depot/projects/dtrace/src/sys/i386/i386/local_apic.c#5 (text+ko) ==== @@ -38,7 +38,6 @@ #include "opt_cyclic.h" #include "opt_ddb.h" -#include "opt_kdtrace.h" #include #include ==== //depot/projects/dtrace/src/sys/i386/i386/trap.c#11 (text+ko) ==== @@ -49,7 +49,6 @@ #include "opt_hwpmc_hooks.h" #include "opt_isa.h" #include "opt_kdb.h" -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_npx.h" #include "opt_trap.h" ==== //depot/projects/dtrace/src/sys/i386/i386/tsc.c#5 (text+ko) ==== @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD: src/sys/i386/i386/tsc.c,v 1.206 2006/08/04 07:56:35 yar Exp $"); #include "opt_clock.h" -#include "opt_kdtrace.h" #include #include ==== //depot/projects/dtrace/src/sys/kern/kern_synch.c#9 (text+ko) ==== @@ -37,7 +37,6 @@ #include __FBSDID("$FreeBSD: src/sys/kern/kern_synch.c,v 1.281 2006/06/15 06:41:57 davidxu Exp $"); -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include ==== //depot/projects/dtrace/src/sys/kern/kern_tc.c#7 (text+ko) ==== @@ -10,7 +10,6 @@ #include __FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.177 2006/08/04 07:56:35 yar Exp $"); -#include "opt_kdtrace.h" #include "opt_ntp.h" #include ==== //depot/projects/dtrace/src/sys/kern/link_elf.c#8 (text+ko) ==== @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD: src/sys/kern/link_elf.c,v 1.90 2006/07/14 22:39:18 jkim Exp $"); #include "opt_gdb.h" -#include "opt_kdtrace.h" #include "opt_mac.h" #include ==== //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#13 (text+ko) ==== @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.86 2006/07/02 20:53:52 maxim Exp $"); #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #define kse td_sched ==== //depot/projects/dtrace/src/sys/kern/subr_pcpu.c#4 (text+ko) ==== @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD: src/sys/kern/subr_pcpu.c,v 1.8 2005/11/03 21:06:29 jhb Exp $"); #include "opt_ddb.h" -#include "opt_kdtrace.h" #include #include ==== //depot/projects/dtrace/src/sys/sun4v/sun4v/tick.c#3 (text+ko) ==== @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD: src/sys/sparc64/sparc64/tick.c,v 1.20 2006/02/11 09:33:07 phk Exp $"); -#include "opt_kdtrace.h" - #include #include #include ==== //depot/projects/dtrace/src/sys/sun4v/sun4v/trap.c#7 (text+ko) ==== @@ -42,7 +42,6 @@ #include "opt_ddb.h" #include "opt_ktr.h" -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_trap_trace.h" From owner-p4-projects@FreeBSD.ORG Tue Aug 8 00:44:26 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 4D14116A4DF; Tue, 8 Aug 2006 00:44:26 +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 28CEB16A4DD for ; Tue, 8 Aug 2006 00:44:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD18F43D46 for ; Tue, 8 Aug 2006 00:44:25 +0000 (GMT) (envelope-from jb@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 k780iPLN089224 for ; Tue, 8 Aug 2006 00:44:25 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k780iPkx089221 for perforce@freebsd.org; Tue, 8 Aug 2006 00:44:25 GMT (envelope-from jb@freebsd.org) Date: Tue, 8 Aug 2006 00:44:25 GMT Message-Id: <200608080044.k780iPkx089221@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103415 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: Tue, 08 Aug 2006 00:44:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=103415 Change 103415 by jb@jb_freebsd2 on 2006/08/08 00:43:52 Allow for the possibility that the KDTRACE option isn't defined. Of course it it isn't, then loading the dtrace module will fail, but when building this module, the kernel options aren't known. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#32 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#32 (text+ko) ==== @@ -29,7 +29,9 @@ * Use is subject to license terms. */ +#ifndef KDTRACE #define KDTRACE +#endif /* * DTrace - Dynamic Tracing for Solaris From owner-p4-projects@FreeBSD.ORG Tue Aug 8 01:16:11 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 3535A16A4E2; Tue, 8 Aug 2006 01:16:11 +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 EB12616A4E0 for ; Tue, 8 Aug 2006 01:16:10 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8422543D76 for ; Tue, 8 Aug 2006 01:16:06 +0000 (GMT) (envelope-from jb@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 k781G6t5099728 for ; Tue, 8 Aug 2006 01:16:06 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k781G5d3099725 for perforce@freebsd.org; Tue, 8 Aug 2006 01:16:05 GMT (envelope-from jb@freebsd.org) Date: Tue, 8 Aug 2006 01:16:05 GMT Message-Id: <200608080116.k781G5d3099725@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103416 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: Tue, 08 Aug 2006 01:16:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=103416 Change 103416 by jb@jb_freebsd2 on 2006/08/08 01:15:49 Missing space before an option name means that option is ignored. Affected files ... .. //depot/projects/dtrace/src/sys/conf/files#27 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/files#27 (text+ko) ==== @@ -1415,7 +1415,7 @@ kern/sys_pipe.c standard kern/sys_process.c standard kern/sys_socket.c standard -kern/syscalls.c optional witness | invariants |kdtrace +kern/syscalls.c optional witness | invariants | kdtrace kern/sysv_ipc.c standard kern/sysv_msg.c optional sysvmsg kern/sysv_sem.c optional sysvsem From owner-p4-projects@FreeBSD.ORG Tue Aug 8 10:39:05 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 03ADB16A4E0; Tue, 8 Aug 2006 10:39:05 +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 BB82E16A4DF for ; Tue, 8 Aug 2006 10:39:04 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C12143D46 for ; Tue, 8 Aug 2006 10:39:04 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k78Ad4rj075373 for ; Tue, 8 Aug 2006 10:39:04 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78Ad4hm075370 for perforce@freebsd.org; Tue, 8 Aug 2006 10:39:04 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 8 Aug 2006 10:39:04 GMT Message-Id: <200608081039.k78Ad4hm075370@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 103433 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: Tue, 08 Aug 2006 10:39:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=103433 Change 103433 by rwatson@rwatson_peppercorn on 2006/08/08 10:38:07 Allow NULL event descriptions and class lists. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_event.c#12 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_event.c#12 (text+ko) ==== @@ -27,7 +27,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_event.c#11 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_event.c#12 $ */ #include @@ -62,27 +62,32 @@ evdesc = strtok_r(NULL, eventdelim, &last); evclass = strtok_r(NULL, eventdelim, &last); - if ((evno == NULL) || (evname == NULL) || (evdesc == NULL) || - (evclass == NULL)) + if ((evno == NULL) || (evname == NULL)) return (NULL); if (strlen(evname) >= AU_EVENT_NAME_MAX) return (NULL); strcpy(e->ae_name, evname); - if (strlen(evdesc) >= AU_EVENT_DESC_MAX) - return (NULL); - strcpy(e->ae_desc, evdesc); + if (evdesc != NULL) { + if (strlen(evdesc) >= AU_EVENT_DESC_MAX) + return (NULL); + strcpy(e->ae_desc, evdesc); + } else + strcpy(e->ae_desc, ""); e->ae_number = atoi(evno); /* * Find out the mask that corresponds to the given list of classes. */ - if (getauditflagsbin(evclass, &evmask) != 0) + if (evclass != NULL) { + if (getauditflagsbin(evclass, &evmask) != 0) + e->ae_class = AU_NULL; + else + e->ae_class = evmask.am_success; + } else e->ae_class = AU_NULL; - else - e->ae_class = evmask.am_success; return (e); } From owner-p4-projects@FreeBSD.ORG Tue Aug 8 10:58:30 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 8CD3A16A4DF; Tue, 8 Aug 2006 10:58:30 +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 688E016A4DA for ; Tue, 8 Aug 2006 10:58:30 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2574043D53 for ; Tue, 8 Aug 2006 10:58:30 +0000 (GMT) (envelope-from gabor@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 k78AwUD2076299 for ; Tue, 8 Aug 2006 10:58:30 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78AwTcX076293 for perforce@freebsd.org; Tue, 8 Aug 2006 10:58:30 GMT (envelope-from gabor@FreeBSD.org) Date: Tue, 8 Aug 2006 10:58:30 GMT Message-Id: <200608081058.k78AwTcX076293@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103435 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: Tue, 08 Aug 2006 10:58:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=103435 Change 103435 by gabor@gabor_spitfire on 2006/08/08 10:58:11 Fix errors when FORCE_PKG_REGISTER is set when doing make package. Reported by: lofi Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#75 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#75 (text+ko) ==== @@ -5162,13 +5162,13 @@ fi @${RM} -rf ${PKG_DBDIR}/${PKGNAME} .endif -.if !exists(${PKG_DBDIR}/${PKGNAME}) -.if !defined(DESTDIR) - @${ECHO_MSG} "===> Registering installation for ${PKGNAME}" -.else - @${ECHO_MSG} "===> Registering installation for ${PKGNAME} in ${DESTDIR}" -.endif - @${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \ + @if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \ + if [ -z "${DESTDIR}" ] ; then \ + ${ECHO_CMD} "===> Registering installation for ${PKGNAME}"; \ + else \ + ${ECHO_MSG} "===> Registering installation for ${PKGNAME} in ${DESTDIR}"; \ + fi; \ + ${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \ ${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \ ${CP} ${DESCR} ${PKG_DBDIR}/${PKGNAME}/+DESC; \ ${ECHO_CMD} ${COMMENT:Q} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ @@ -5191,8 +5191,8 @@ ${ECHO_CMD} ${PKGNAME} >> ${PKG_DBDIR}/$$dep/+REQUIRED_BY; \ fi; \ fi; \ - done -.endif + done; \ + fi .if !defined(NO_MTREE) @if [ -f ${MTREE_FILE} ]; then \ ${CP} ${MTREE_FILE} ${PKG_DBDIR}/${PKGNAME}/+MTREE_DIRS; \ From owner-p4-projects@FreeBSD.ORG Tue Aug 8 12:38:38 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 66A7416A510; Tue, 8 Aug 2006 12:38:38 +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 41EFC16A500 for ; Tue, 8 Aug 2006 12:38:38 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE96043D49 for ; Tue, 8 Aug 2006 12:38:37 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k78Ccbtx085174 for ; Tue, 8 Aug 2006 12:38:37 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78CcbHF085171 for perforce@freebsd.org; Tue, 8 Aug 2006 12:38:37 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 8 Aug 2006 12:38:37 GMT Message-Id: <200608081238.k78CcbHF085171@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 103438 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: Tue, 08 Aug 2006 12:38:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=103438 Change 103438 by rwatson@rwatson_fledge on 2006/08/08 12:38:02 Mention OpenBSM portability more clearly. Affected files ... .. //depot/projects/trustedbsd/www/openbsm.page#10 edit Differences ... ==== //depot/projects/trustedbsd/www/openbsm.page#10 (text+ko) ==== @@ -29,7 +29,7 @@ - $P4: //depot/projects/trustedbsd/www/openbsm.page#9 $ + $P4: //depot/projects/trustedbsd/www/openbsm.page#10 $ @@ -43,8 +43,8 @@ //depot/projects/trustedbsd/openbsm/...

-

OpenBSM is an open source implementation of Sun's Basic Security - Module (BSM) Audit API and file format. +

OpenBSM is a portable, open source implementation of Sun's Basic + Security Module (BSM) Audit API and file format. BSM, the de facto industry standard for Audit, describes a set of system call and library interfaces for managing audit records, as well as a token stream file format that permits extensible and @@ -52,7 +52,11 @@ OpenBSM extends the BSM API and file format in a number of ways to support features present in the Mac OS X and FreeBSD operating systems, such as Mach task interfaces, sendfile(), and Linux system - calls present in the FreeBSD Linux emulation layer.

+ calls present in the FreeBSD Linux emulation layer. + OpenBSM is known to build on FreeBSD, Mac OS X, and Linux; some + components, such as the audit daemon, require up-to-date kernel + audit parts from the FreeBSD kernel audit implementation, but the + basic library and audit trail tools run on all three platforms.

The OpenBSM distribution includes system include files appropriate for inclusion in an operating system implementation of Audit, libbsm, From owner-p4-projects@FreeBSD.ORG Tue Aug 8 13:34:52 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 5004516A4E6; Tue, 8 Aug 2006 13:34:52 +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 2181216A4DD for ; Tue, 8 Aug 2006 13:34:52 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3EAE43D55 for ; Tue, 8 Aug 2006 13:34:51 +0000 (GMT) (envelope-from rdivacky@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 k78DYp9U097450 for ; Tue, 8 Aug 2006 13:34:51 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78DYplO097447 for perforce@freebsd.org; Tue, 8 Aug 2006 13:34:51 GMT (envelope-from rdivacky@FreeBSD.org) Date: Tue, 8 Aug 2006 13:34:51 GMT Message-Id: <200608081334.k78DYplO097447@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103441 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: Tue, 08 Aug 2006 13:34:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=103441 Change 103441 by rdivacky@rdivacky_witten on 2006/08/08 13:34:23 Copyout bsdpid (ie. linuxtid) in the cases of PARENT/CHILD_SETTID. Also make the file compilable with -DDEBUG. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#33 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#33 (text+ko) ==== @@ -433,7 +433,7 @@ EMUL_RUNLOCK(&emul_lock); return (EINVAL); } - error = copyout(&em->shared->group_pid, args->parent_tidptr, sizeof(em->shared->group_pid)); + error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid)); if (error) { EMUL_RUNLOCK(&emul_lock); return (error); @@ -1329,6 +1329,9 @@ { struct linux_emuldata *em; int error = 0; +#ifdef DEBUG + struct thread *td = FIRST_THREAD_IN_PROC(p); +#endif if (p->p_sysent != &elf_linux_sysvec) return; @@ -1344,7 +1347,7 @@ } if (em->child_set_tid != NULL) - error = copyout(&em->shared->group_pid, em->child_set_tid, sizeof(em->shared->group_pid)); + error = copyout(&p->p_pid, em->child_set_tid, sizeof(p->p_pid)); EMUL_RUNLOCK(&emul_lock); return; From owner-p4-projects@FreeBSD.ORG Tue Aug 8 14:04:30 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 AA31316A4E8; Tue, 8 Aug 2006 14:04:30 +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 82E4716A4E6 for ; Tue, 8 Aug 2006 14:04:30 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EE7743D6D for ; Tue, 8 Aug 2006 14:04:30 +0000 (GMT) (envelope-from rdivacky@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 k78E4UMq000444 for ; Tue, 8 Aug 2006 14:04:30 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78E4THX000441 for perforce@freebsd.org; Tue, 8 Aug 2006 14:04:29 GMT (envelope-from rdivacky@FreeBSD.org) Date: Tue, 8 Aug 2006 14:04:29 GMT Message-Id: <200608081404.k78E4THX000441@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103443 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: Tue, 08 Aug 2006 14:04:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=103443 Change 103443 by rdivacky@rdivacky_witten on 2006/08/08 14:04:14 Dont EMUL_RUNLOC(&emul_lock) in a case of em_find() returns NULL. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#7 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#34 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#7 (text+ko) ==== @@ -1341,7 +1341,6 @@ #ifdef DEBUG printf(LMSG("emuldata not found.\n")); #endif - EMUL_RUNLOCK(&emul_lock); return (0); } @@ -1362,7 +1361,6 @@ #ifdef DEBUG printf(LMSG("emuldata not found.\n")); #endif - EMUL_RUNLOCK(&emul_lock); return (0); } @@ -1388,7 +1386,6 @@ printf(LMSG("emuldata not found.\n")); #endif PROC_UNLOCK(pp); - EMUL_RUNLOCK(&emul_lock); return (0); } td->td_retval[0] = em->shared->group_pid; ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#34 (text+ko) ==== @@ -1370,7 +1370,6 @@ #ifdef DEBUG printf(LMSG("we didnt find emuldata for the userreting process.\n")); #endif - EMUL_RUNLOCK(&emul_lock); return (0); } From owner-p4-projects@FreeBSD.ORG Tue Aug 8 14:20:50 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 3697516A4F2; Tue, 8 Aug 2006 14:20:50 +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 EDECA16A4DD for ; Tue, 8 Aug 2006 14:20:49 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFB5043D7C for ; Tue, 8 Aug 2006 14:20:15 +0000 (GMT) (envelope-from rdivacky@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 k78EJp06001320 for ; Tue, 8 Aug 2006 14:19:51 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78EJp0R001317 for perforce@freebsd.org; Tue, 8 Aug 2006 14:19:51 GMT (envelope-from rdivacky@FreeBSD.org) Date: Tue, 8 Aug 2006 14:19:51 GMT Message-Id: <200608081419.k78EJp0R001317@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103445 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: Tue, 08 Aug 2006 14:20:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=103445 Change 103445 by rdivacky@rdivacky_witten on 2006/08/08 14:19:26 More informative messages in a case of em_find returns NULL. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#8 edit .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_signal.c#3 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#8 (text+ko) ==== @@ -1339,7 +1339,7 @@ if (em == NULL) { #ifdef DEBUG - printf(LMSG("emuldata not found.\n")); + printf(LMSG("emuldata not found in getpid.\n")); #endif return (0); } @@ -1359,7 +1359,7 @@ if (em == NULL) { #ifdef DEBUG - printf(LMSG("emuldata not found.\n")); + printf(LMSG("emuldata for current process not found in getppid.\n")); #endif return (0); } @@ -1383,7 +1383,7 @@ em = em_find(pp->p_pid, EMUL_LOCKED); if (em == NULL) { #ifdef DEBUG - printf(LMSG("emuldata not found.\n")); + printf(LMSG("emuldata for parent process not found in getppid.\n")); #endif PROC_UNLOCK(pp); return (0); ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_signal.c#3 (text+ko) ==== @@ -481,7 +481,7 @@ if (em == NULL) { #ifdef DEBUG - printf("emuldata not found.\n"); + printf("emuldata not found in tgkill.\n"); #endif return ESRCH; } From owner-p4-projects@FreeBSD.ORG Tue Aug 8 15:07:39 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 3EE9116A4DE; Tue, 8 Aug 2006 15:07:39 +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 DC13516A4E0 for ; Tue, 8 Aug 2006 15:07:38 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C55DC43D5A for ; Tue, 8 Aug 2006 15:07:37 +0000 (GMT) (envelope-from gonzo@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 k78F7bsI005480 for ; Tue, 8 Aug 2006 15:07:37 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78F7bUh005471 for perforce@freebsd.org; Tue, 8 Aug 2006 15:07:37 GMT (envelope-from gonzo@FreeBSD.org) Date: Tue, 8 Aug 2006 15:07:37 GMT Message-Id: <200608081507.k78F7bUh005471@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 103448 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: Tue, 08 Aug 2006 15:07:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=103448 Change 103448 by gonzo@gonzo_hq on 2006/08/08 15:07:25 o Heavily refactored GT code. "gt" device reduced to abstraction, bus methods proxy between nexus device and GT south bridge. gt_pci.c is a simplified version of GT pci bridge implementation from NetBSD. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips4k/malta/gt.c#2 edit .. //depot/projects/mips2/src/sys/mips/mips4k/malta/gt_pci.c#2 edit .. //depot/projects/mips2/src/sys/mips/mips4k/malta/gtvar.h#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips4k/malta/gt.c#2 (text+ko) ==== @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -39,20 +40,17 @@ #include #include +#include + #include #include -#include #include -#include -extern void irq_entry(void); -struct gt_softc *gt_softc; - static int gt_probe(device_t dev) { - device_set_desc(dev, "GT64120 device bus"); + device_set_desc(dev, "GT64120 chip"); return (0); } @@ -66,34 +64,13 @@ gt_attach(device_t dev) { struct gt_softc *sc = device_get_softc(dev); - /* int i; */ - - gt_softc = sc; - sc->sc_st = MIPS_BUS_SPACE_MEM; - sc->sc_sh = MALTA_PCIMEM1_BASE; sc->dev = dev; - if (bus_space_subregion(sc->sc_st, sc->sc_sh, - MIPS_PHYS_TO_KSEG1(MALTA_PCIMEM1_BASE), - MALTA_PCIMEM1_SIZE, &sc->sc_sys_sh) != 0) - panic("Enable to map IRQ registers"); - sc->sc_irq_rman.rm_type = RMAN_ARRAY; - sc->sc_irq_rman.rm_descr = "GT64120 IRQs"; - sc->sc_mem_rman.rm_type = RMAN_ARRAY; - sc->sc_mem_rman.rm_descr = "GT64120 Memory"; - if (rman_init(&sc->sc_irq_rman) != 0 || - rman_manage_region(&sc->sc_irq_rman, 1, 31) != 0) - panic("gt_attach: failed to set up IRQ rman"); - if (rman_init(&sc->sc_mem_rman) != 0 || - rman_manage_region(&sc->sc_mem_rman, - MIPS_PHYS_TO_KSEG1(MALTA_PCIMEM1_BASE), - MIPS_PHYS_TO_KSEG1(MALTA_PCIMEM1_BASE + - MALTA_PCIMEM1_SIZE)) != 0) - panic("gt_attach: failed to set up memory rman"); - /* XXXMIPS: Disable and clear all interrupts. */ device_add_child(dev, "pcib", 0); bus_generic_probe(dev); bus_generic_attach(dev); + + return (0); } @@ -101,140 +78,44 @@ gt_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { - struct gt_softc *sc = device_get_softc(dev); - struct resource_list_entry *rle; - struct gt_ivar *ivar = device_get_ivars(child); - struct resource_list *rl = &ivar->resources; - - if (device_get_parent(child) != dev) - return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, type, rid, start, end, count, flags)); - rle = resource_list_find(rl, type, *rid); - if (rle == NULL) - return (NULL); - if (rle->res) - panic("Resource rid %d type %d already in use", *rid, type); - if (start == 0UL && end == ~0UL) { - start = rle->start; - count = ulmax(count, rle->count); - end = ulmax(rle->end, start + count - 1); - } - switch (type) - { - case SYS_RES_IRQ: - rle->res = rman_reserve_resource(&sc->sc_irq_rman, - start, end, count, flags, child); - break; - case SYS_RES_MEMORY: - rle->res = rman_reserve_resource(&sc->sc_mem_rman, - start, end, count, flags, child); - rman_set_bustag(rle->res, MIPS_BUS_SPACE_MEM); - rman_set_bushandle(rle->res, start); - break; - } - if (rle->res) { - rle->start = rman_get_start(rle->res); - rle->end = rman_get_end(rle->res); - rle->count = count; - rman_set_rid(rle->res, *rid); - } - return (rle->res); } -static struct resource_list * -gt_get_resource_list(device_t dev, device_t child) -{ - struct gt_ivar *ivar; - - ivar = device_get_ivars(child); - return (&(ivar->resources)); -} - static int -gt_release_resource(device_t dev, device_t child, int type, - int rid, struct resource *r) -{ - struct resource_list *rl; - struct resource_list_entry *rle; - - rl = gt_get_resource_list(dev, child); - if (rl == NULL) - return (EINVAL); - rle = resource_list_find(rl, type, rid); - if (rle == NULL) - return (EINVAL); - rman_release_resource(r); - rle->res = NULL; - return (0); -} - -static int gt_setup_intr(device_t dev, device_t child, struct resource *ires, int flags, driver_intr_t *intr, void *arg, void **cookiep) { -#if 0 - int x = rman_get_start(ires); - printf("IRQ request: %d\n", x); - struct gt_softc *sc = device_get_softc(dev); - - if (rman_get_start(ires) == AT91RM92_IRQ_SYSTEM && !(flags & INTR_FAST)) - panic("All system interrupt ISRs must be type INTR_FAST"); - BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, intr, arg, - cookiep); - bus_space_write_4(sc->sc_st, sc->sc_sys_sh, IC_IECR, - 1 << rman_get_start(ires)); -#endif - printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); - return (0); + return BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, + intr, arg, cookiep); } static int gt_teardown_intr(device_t dev, device_t child, struct resource *res, void *cookie) { -#if 0 - struct gt_softc *sc = device_get_softc(dev); - bus_space_write_4(sc->sc_st, sc->sc_sys_sh, IC_IDCR, - 1 << rman_get_start(res)); return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, res, cookie)); -#endif - printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); - return (0); } static int -gt_activate_resource(device_t bus, device_t child, int type, int rid, +gt_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { - bus_space_handle_t p; - int error; - - if (type == SYS_RES_MEMORY) { - error = bus_space_map(rman_get_bustag(r), - rman_get_bushandle(r), rman_get_size(r), 0, &p); - if (error) - return (error); - rman_set_bushandle(r, p); - } - return (rman_activate_resource(r)); + return (BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, + type, rid, r)); } static device_method_t gt_methods[] = { DEVMETHOD(device_probe, gt_probe), + DEVMETHOD(device_identify, gt_identify), DEVMETHOD(device_attach, gt_attach), - DEVMETHOD(device_identify, gt_identify), - DEVMETHOD(bus_alloc_resource, gt_alloc_resource), DEVMETHOD(bus_setup_intr, gt_setup_intr), DEVMETHOD(bus_teardown_intr, gt_teardown_intr), + DEVMETHOD(bus_alloc_resource, gt_alloc_resource), DEVMETHOD(bus_activate_resource, gt_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_get_resource_list,gt_get_resource_list), - DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), - DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), - DEVMETHOD(bus_release_resource, gt_release_resource), DEVMETHOD(bus_print_child, bus_generic_print_child), {0, 0}, ==== //depot/projects/mips2/src/sys/mips/mips4k/malta/gt_pci.c#2 (text+ko) ==== @@ -44,8 +44,9 @@ #include #include + +#include #include -#include #include #include #include @@ -63,31 +64,140 @@ #include #include +#include +#include + #include #include #include #include "pcib_if.h" -extern struct gt_softc *gt_softc; + +#define ICU_LEN 16 /* number of ISA IRQs */ + +/* + * XXX: These defines are from NetBSD's . Respective file + * from FreeBSD src tree lacks some definitions. + */ +#define PIC_OCW1 1 +#define PIC_OCW2 0 +#define PIC_OCW3 0 + +#define OCW2_SELECT 0 +#define OCW2_ILS(x) ((x) << 0) /* interrupt level select */ + +#define OCW3_POLL_IRQ(x) ((x) & 0x7f) +#define OCW3_POLL_PENDING (1U << 7) + +struct intrhand { + LIST_ENTRY(intrhand) ih_list; + driver_intr_t *ih_func; + void *ih_arg; + int ih_irq; +}; + +struct pci_intrhead { + LIST_HEAD(, intrhand) intr_list; +}; struct gt_pci_softc { device_t sc_dev; bus_space_tag_t sc_st; bus_space_tag_t sc_pciio; bus_space_tag_t sc_pcimem; + bus_space_handle_t sc_ioh_icu1; + bus_space_handle_t sc_ioh_icu2; + bus_space_handle_t sc_ioh_elcr; + int sc_busno; struct rman sc_mem_rman; struct rman sc_io_rman; struct rman sc_irq_rman; uint32_t sc_mem; uint32_t sc_io; + + struct resource *sc_irq; + struct pci_intrhead sc_intrtab[ICU_LEN]; + uint16_t sc_imask; + uint16_t sc_elcr; + + uint16_t sc_reserved; + + void *sc_ih; }; +static void +gt_pci_set_icus(struct gt_pci_softc *sc) +{ + /* Enable the cascade IRQ (2) if 8-15 is enabled. */ + if ((sc->sc_imask & 0xff00) != 0xff00) + sc->sc_imask &= ~(1U << 2); + else + sc->sc_imask |= (1U << 2); + + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, PIC_OCW1, + sc->sc_imask & 0xff); + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, PIC_OCW1, + (sc->sc_imask >> 8) & 0xff); + + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_elcr, 0, + sc->sc_elcr & 0xff); + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_elcr, 1, + (sc->sc_elcr >> 8) & 0xff); +} + +static void +gt_pci_intr(void *v) +{ + struct gt_pci_softc *sc = v; + struct intrhand *ih; + int irq; + + for (;;) { + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, PIC_OCW3, + OCW3_SEL | OCW3_P); + irq = bus_space_read_1(sc->sc_pciio, sc->sc_ioh_icu1, PIC_OCW3); + if ((irq & OCW3_POLL_PENDING) == 0) + { + return; + } + + irq = OCW3_POLL_IRQ(irq); + + if (irq == 2) { + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, + PIC_OCW3, OCW3_SEL | OCW3_P); + irq = bus_space_read_1(sc->sc_pciio, sc->sc_ioh_icu2, + PIC_OCW3); + if (irq & OCW3_POLL_PENDING) + irq = OCW3_POLL_IRQ(irq) + 8; + else + irq = 2; + } + + LIST_FOREACH(ih, &sc->sc_intrtab[irq].intr_list, ih_list) + (*ih->ih_func)(ih->ih_arg); + + /* Send a specific EOI to the 8259. */ + if (irq > 7) { + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, + PIC_OCW2, OCW2_SELECT | OCW2_EOI | OCW2_SL | + OCW2_ILS(irq & 7)); + irq = 2; + } + + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, PIC_OCW2, + OCW2_SELECT | OCW2_EOI | OCW2_SL | OCW2_ILS(irq)); + } +} + + + static int gt_pci_probe(device_t dev) { - device_set_desc(dev, "GT64120 PCI bus"); + device_set_desc(dev, "GT64120 PCI bridge"); return (0); } @@ -97,8 +207,8 @@ uint32_t busno; struct gt_pci_softc *sc = device_get_softc(dev); + int rid, i; - sc->sc_st = gt_softc->sc_st; busno = 0; sc->sc_dev = dev; sc->sc_busno = busno; @@ -129,6 +239,130 @@ rman_manage_region(&sc->sc_irq_rman, 1, 31) != 0) panic("gt_pci_attach: failed to set up IRQ rman"); + /* + * Map the PIC/ELCR registers. + */ +#if 0 + if (bus_space_map(sc->sc_pciio, 0x4d0, 2, 0, &sc->sc_ioh_elcr) != 0) + device_printf(dev, "unable to map ELCR registers\n"); + if (bus_space_map(sc->sc_pciio, IO_ICU1, 2, 0, &sc->sc_ioh_icu1) != 0) + device_printf(dev, "unable to map ICU1 registers\n"); + if (bus_space_map(sc->sc_pciio, IO_ICU2, 2, 0, &sc->sc_ioh_icu2) != 0) + device_printf(dev, "unable to map ICU2 registers\n"); +#else + sc->sc_ioh_elcr = sc->sc_io + 0x4d0; + sc->sc_ioh_icu1 = sc->sc_io + IO_ICU1; + sc->sc_ioh_icu2 = sc->sc_io + IO_ICU2; +#endif + + + /* All interrupts default to "masked off". */ + sc->sc_imask = 0xffff; + + /* All interrupts default to edge-triggered. */ + sc->sc_elcr = 0; + + /* + * Initialize the 8259s. + */ + /* reset, program device, 4 bytes */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 0, + ICW1_RESET | ICW1_IC4); + /* + * XXX: values from NetBSD's + */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + 0/*XXX*/); + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + 1 << 2); + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + ICW4_8086); + + /* mask all interrupts */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 0, + sc->sc_imask & 0xff); + + /* enable special mask mode */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + OCW3_SEL | OCW3_ESMM | OCW3_SMM); + + /* read IRR by default */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + OCW3_SEL | OCW3_RR); + + /* reset, program device, 4 bytes */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 0, + ICW1_RESET | ICW1_IC4); + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + 0/*XXX*/); + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + 1 << 2); + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + ICW4_8086); + + /* mask all interrupts */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 0, + sc->sc_imask & 0xff); + + /* enable special mask mode */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + OCW3_SEL | OCW3_ESMM | OCW3_SMM); + + /* read IRR by default */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + OCW3_SEL | OCW3_RR); + + /* + * Default all interrupts to edge-triggered. + */ + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_elcr, 0, + sc->sc_elcr & 0xff); + bus_space_write_1(sc->sc_pciio, sc->sc_ioh_elcr, 1, + (sc->sc_elcr >> 8) & 0xff); + + /* + * Some ISA interrupts are reserved for devices that + * we know are hard-wired to certain IRQs. + */ + sc->sc_reserved = + (1U << 0) | /* timer */ + (1U << 1) | /* keyboard controller (keyboard) */ + (1U << 2) | /* PIC cascade */ + (1U << 3) | /* COM 2 */ + (1U << 4) | /* COM 1 */ + (1U << 6) | /* floppy */ + (1U << 7) | /* centronics */ + (1U << 8) | /* RTC */ + (1U << 9) | /* I2C */ + (1U << 12) | /* keyboard controller (mouse) */ + (1U << 14) | /* IDE primary */ + (1U << 15); /* IDE secondary */ + + /* Initialize our interrupt table. */ + for (i = 0; i < ICU_LEN; i++) { + LIST_INIT(&sc->sc_intrtab[i].intr_list); + } + + /* Hook up our interrupt handler. */ + if ((sc->sc_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, + MALTA_SOUTHBRIDGE_INTR, MALTA_SOUTHBRIDGE_INTR, 1, + RF_SHAREABLE | RF_ACTIVE)) == NULL) { + device_printf(dev, "unable to allocate IRQ resource\n"); + return ENXIO; + } + + if ((bus_setup_intr(dev, sc->sc_irq, INTR_FAST | INTR_MPSAFE, + gt_pci_intr, sc, &sc->sc_ih))) { + device_printf(dev, + "WARNING: unable to register interrupt handler\n"); + return ENXIO; + } + + if (sc->sc_ih == NULL) + + + + /* Initialize memory and i/o rmans. */ device_add_child(dev, "pci", busno); return (bus_generic_attach(dev)); @@ -263,9 +497,9 @@ */ switch (device) { case 9: /* - * PIIX4 IDE adapter + * PIIX4 IDE adapter. HW IRQ0 */ - return 2; + return 0; default: printf("No mapping for %d/%d/%d/%d\n", bus, device, func, pin); @@ -369,23 +603,53 @@ struct resource *ires, int flags, driver_intr_t *intr, void *arg, void **cookiep) { -#if 0 - return (BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, - intr, arg, cookiep)); -#endif - printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); - return (0); + struct gt_pci_softc *sc = device_get_softc(dev); + struct intrhand *ih; + int irq; + + irq = rman_get_start(ires); + if (irq >= ICU_LEN || irq == 2) + panic("%s: bad irq or type", __func__); + + ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT); + if (ih == NULL) + return ENOMEM; + + ih->ih_func = intr; + ih->ih_arg = arg; + ih->ih_irq = irq; + + /* Insert the handler into the table. */ + LIST_INSERT_HEAD(&sc->sc_intrtab[irq].intr_list, ih, ih_list); + + /* Enable it, set trigger mode. */ + sc->sc_imask &= ~(1 << irq); + sc->sc_elcr &= ~(1 << irq); + + gt_pci_set_icus(sc); + + *cookiep = (void *)ih; + + return 0; } static int gt_pci_teardown_intr(device_t dev, device_t child, struct resource *res, void *cookie) { -#if 0 - return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, res, cookie)); -#endif - printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); - return (0); + struct gt_pci_softc *sc = device_get_softc(dev); + struct intrhand *ih = cookie; + LIST_REMOVE(ih, ih_list); + + /* If there are no more handlers on this IRQ, disable it. */ + if (LIST_FIRST(&sc->sc_intrtab[ih->ih_irq].intr_list) == NULL) { + sc->sc_imask |= (1 << ih->ih_irq); + gt_pci_set_icus(sc); + } + + free(ih, M_DEVBUF); + + return 0; } static device_method_t gt_pci_methods[] = { ==== //depot/projects/mips2/src/sys/mips/mips4k/malta/gtvar.h#2 (text+ko) ==== @@ -31,16 +31,6 @@ struct gt_softc { device_t dev; - bus_space_tag_t sc_st; - bus_space_handle_t sc_sh; - bus_space_handle_t sc_sys_sh; - struct rman sc_irq_rman; - struct rman sc_mem_rman; }; -struct gt_ivar { - struct resource_list resources; -}; - - #endif /* _GTVAR_H_ */ From owner-p4-projects@FreeBSD.ORG Tue Aug 8 15:19:50 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 21DD816A4EA; Tue, 8 Aug 2006 15:19:50 +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 F075516A4E0 for ; Tue, 8 Aug 2006 15:19:49 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C5F543D7B for ; Tue, 8 Aug 2006 15:18:52 +0000 (GMT) (envelope-from rdivacky@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 k78FIqPC006069 for ; Tue, 8 Aug 2006 15:18:52 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78FIpCi006066 for perforce@freebsd.org; Tue, 8 Aug 2006 15:18:51 GMT (envelope-from rdivacky@FreeBSD.org) Date: Tue, 8 Aug 2006 15:18:51 GMT Message-Id: <200608081518.k78FIpCi006066@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103449 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: Tue, 08 Aug 2006 15:19:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=103449 Change 103449 by rdivacky@rdivacky_witten on 2006/08/08 15:18:25 Introduce poor-mans synchronization. This ensures that linux_proc_init() is always called before linux_schedtail. Sometimes it happened that linux_schedtail was called before proc_init which caused em_find() to return NULL. Now it should be fixed (this and the memleak it caused). Tested by: /glibc-2.3.6/configure --disable-sanity-checks Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#35 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#35 (text+ko) ==== @@ -1160,6 +1160,7 @@ linux_proc_init(struct thread *td, pid_t child, int flags) { struct linux_emuldata *em, *p_em; + struct proc *p; /* XXX: locking? */ if (child != 0) { @@ -1218,10 +1219,14 @@ if (child != 0) { LIST_INSERT_HEAD(&em->shared->threads, em, threads); EMUL_WUNLOCK(&emul_lock); + + p = pfind(child); + PROC_UNLOCK(p); + /* we might have a sleeping linux_schedtail */ + wakeup(p->p_emuldata); } else EMUL_RUNLOCK(&emul_lock); - return (0); } @@ -1324,6 +1329,8 @@ } } +extern int hz; /* in subr_param.c */ + void linux_schedtail(void *arg __unused, struct proc *p) { @@ -1336,10 +1343,18 @@ if (p->p_sysent != &elf_linux_sysvec) return; +retry: /* find the emuldata */ em = em_find(p->p_pid, EMUL_UNLOCKED); if (em == NULL) { + /* We might have been called before proc_init for this process so + * tsleep and be woken up by it. We use p->p_emuldata for this + */ + + error = tsleep(p->p_emuldata, PLOCK, "linux_schedtail", hz); + if (error == 0) + goto retry; #ifdef DEBUG printf(LMSG("we didnt find emuldata for the userreting process.\n")); #endif From owner-p4-projects@FreeBSD.ORG Tue Aug 8 15:38:27 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 5CAC916A4E2; Tue, 8 Aug 2006 15:38:27 +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 38B7216A4DD for ; Tue, 8 Aug 2006 15:38:27 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7925543D66 for ; Tue, 8 Aug 2006 15:38:16 +0000 (GMT) (envelope-from rdivacky@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 k78FcGUi007316 for ; Tue, 8 Aug 2006 15:38:16 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78FcGVi007313 for perforce@freebsd.org; Tue, 8 Aug 2006 15:38:16 GMT (envelope-from rdivacky@FreeBSD.org) Date: Tue, 8 Aug 2006 15:38:16 GMT Message-Id: <200608081538.k78FcGVi007313@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103450 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: Tue, 08 Aug 2006 15:38:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=103450 Change 103450 by rdivacky@rdivacky_witten on 2006/08/08 15:37:25 Dont sleep on p->p_emuldata which is usually NULL but on &p->p_emuldata which provides more sensible value. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#36 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#36 (text+ko) ==== @@ -1223,7 +1223,7 @@ p = pfind(child); PROC_UNLOCK(p); /* we might have a sleeping linux_schedtail */ - wakeup(p->p_emuldata); + wakeup(&p->p_emuldata); } else EMUL_RUNLOCK(&emul_lock); @@ -1352,7 +1352,7 @@ * tsleep and be woken up by it. We use p->p_emuldata for this */ - error = tsleep(p->p_emuldata, PLOCK, "linux_schedtail", hz); + error = tsleep(&p->p_emuldata, PLOCK, "linux_schedtail", hz); if (error == 0) goto retry; #ifdef DEBUG From owner-p4-projects@FreeBSD.ORG Tue Aug 8 15:55:42 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 21A1816A4E5; Tue, 8 Aug 2006 15:55:42 +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 B35E416A4E1 for ; Tue, 8 Aug 2006 15:55:41 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A366F43D5A for ; Tue, 8 Aug 2006 15:55:40 +0000 (GMT) (envelope-from gonzo@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 k78Ftet0008674 for ; Tue, 8 Aug 2006 15:55:40 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78FtetO008671 for perforce@freebsd.org; Tue, 8 Aug 2006 15:55:40 GMT (envelope-from gonzo@FreeBSD.org) Date: Tue, 8 Aug 2006 15:55:40 GMT Message-Id: <200608081555.k78FtetO008671@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 103451 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: Tue, 08 Aug 2006 15:55:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=103451 Change 103451 by gonzo@gonzo_hq on 2006/08/08 15:55:01 o Add proper resource handling for nexus device. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/nexus.c#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/nexus.c#2 (text+ko) ==== @@ -48,16 +48,17 @@ #include #include #include -#include #include #include -#include #include #include + +#include +#include #include - #include +#include static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); @@ -67,7 +68,7 @@ #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) -static struct rman mem_rman; +static struct rman irq_rman; static int nexus_probe(device_t); static int nexus_attach(device_t); @@ -109,23 +110,30 @@ { device_quiet(dev); /* suppress attach message for neatness */ - mem_rman.rm_start = 0; - mem_rman.rm_end = ~0u; - mem_rman.rm_type = RMAN_ARRAY; - mem_rman.rm_descr = "I/O memory addresses"; - if (rman_init(&mem_rman) - || rman_manage_region(&mem_rman, 0, ~0u)) - panic("nexus_probe mem_rman"); + irq_rman.rm_start = 0; + irq_rman.rm_end = 5; + irq_rman.rm_type = RMAN_ARRAY; + irq_rman.rm_descr = "Hardware IRQs"; + if (rman_init(&irq_rman) + || rman_manage_region(&irq_rman, 0, 5)) + panic("nexus_probe irq_rman"); + return (0); - return bus_generic_probe(dev); } static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_intr_t *intr, void *arg, void **cookiep) { - printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); + int irq; + + intr_disable(); + irq = rman_get_start(res); + if(irq > 5) + return(0); + cpu_establish_hardintr(irq, intr, arg); + intr_enable(); return (0); } @@ -166,6 +174,7 @@ { device_t child; struct nexus_device *ndev; + ndev = malloc(sizeof(struct nexus_device), M_NEXUSDEV, M_NOWAIT|M_ZERO); if (!ndev) @@ -195,8 +204,8 @@ int needactivate = flags & RF_ACTIVE; switch (type) { - case SYS_RES_MEMORY: - rm = &mem_rman; + case SYS_RES_IRQ: + rm = &irq_rman; break; default: @@ -208,8 +217,6 @@ return 0; rman_set_rid(rv, *rid); - rman_set_bustag(rv, MIPS_BUS_SPACE_MEM); - rman_set_bushandle(rv, rman_get_start(rv)); if (needactivate) { if (bus_activate_resource(child, type, *rid, rv)) { @@ -226,22 +233,6 @@ nexus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { - /* - * If this is a memory resource, map it into the kernel. - */ - if (rman_get_bustag(r) == MIPS_BUS_SPACE_MEM) { - caddr_t vaddr = 0; - u_int32_t paddr; - u_int32_t psize; - u_int32_t poffs; - - paddr = rman_get_start(r); - psize = rman_get_size(r); - poffs = paddr - trunc_page(paddr); - vaddr = (caddr_t) pmap_mapdev(paddr-poffs, psize+poffs) + poffs; - rman_set_virtual(r, vaddr); - rman_set_bushandle(r, (bus_space_handle_t) vaddr); - } return (rman_activate_resource(r)); } From owner-p4-projects@FreeBSD.ORG Tue Aug 8 16:06:57 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 C0FF816A4DE; Tue, 8 Aug 2006 16:06:57 +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 9B33A16A4E8 for ; Tue, 8 Aug 2006 16:06:57 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F2F343D73 for ; Tue, 8 Aug 2006 16:06:55 +0000 (GMT) (envelope-from gonzo@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 k78G6tOU010503 for ; Tue, 8 Aug 2006 16:06:55 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78G6t4B010500 for perforce@freebsd.org; Tue, 8 Aug 2006 16:06:55 GMT (envelope-from gonzo@FreeBSD.org) Date: Tue, 8 Aug 2006 16:06:55 GMT Message-Id: <200608081606.k78G6t4B010500@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 103452 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: Tue, 08 Aug 2006 16:06:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=103452 Change 103452 by gonzo@gonzo_hq on 2006/08/08 16:06:15 o Disable clock device initialization for cpu device explicitly. Rely on autoconfiguration stuff for that. Generick ticker code is on it's way. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/cpu.c#14 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/cpu.c#14 (text+ko) ==== @@ -287,16 +287,6 @@ static int cpu_probe(device_t dev) { - device_t clock; - - if (device_get_unit(dev) != 0) - panic("can't attach more cpus"); - device_set_desc(dev, "MIPS32 processor"); - - clock = device_add_child(dev, "mips32_clock", device_get_unit(dev)); - if (clock == NULL) - device_printf(dev, "mips32_clock failed to attach"); - return (0); } @@ -304,6 +294,9 @@ cpu_attach(device_t dev) { int error; +#ifdef notyet + device_t clock; +#endif cpu_hardirq_rman.rm_start = 0; cpu_hardirq_rman.rm_end = 5; @@ -324,6 +317,16 @@ return (error); } + if (device_get_unit(dev) != 0) + panic("can't attach more cpus"); + device_set_desc(dev, "MIPS32 processor"); + +#ifdef notyet + clock = device_add_child(dev, "clock", device_get_unit(dev)); + if (clock == NULL) + device_printf(dev, "clock failed to attach"); +#endif + return (bus_generic_attach(dev)); } @@ -355,9 +358,7 @@ intr = rman_get_start(res); -#if 0 cpu_establish_hardintr(intr, handler, arg); -#endif device_printf(child, "established CPU interrupt %d\n", intr); return (0); } From owner-p4-projects@FreeBSD.ORG Tue Aug 8 16:21:20 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 73BAB16A4E5; Tue, 8 Aug 2006 16:21:20 +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 3322716A4E0 for ; Tue, 8 Aug 2006 16:21:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBF6D43D5F for ; Tue, 8 Aug 2006 16:21:13 +0000 (GMT) (envelope-from gonzo@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 k78GLDom011126 for ; Tue, 8 Aug 2006 16:21:13 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78GLDgY011123 for perforce@freebsd.org; Tue, 8 Aug 2006 16:21:13 GMT (envelope-from gonzo@FreeBSD.org) Date: Tue, 8 Aug 2006 16:21:13 GMT Message-Id: <200608081621.k78GLDgY011123@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 103453 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: Tue, 08 Aug 2006 16:21:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=103453 Change 103453 by gonzo@gonzo_hq on 2006/08/08 16:21:08 o Set bootverbose for more detailed boot log. o Split tick_init into two routines: - tick_init_params detects frequency and set para,eters required for DELAY. - tick_init is called in cpu_initclocks as it should be. o Add generic MIPS32 clock device code. o Add DELAY implementation for introduced clock device. Affected files ... .. //depot/projects/mips2/src/sys/mips/include/clock.h#3 edit .. //depot/projects/mips2/src/sys/mips/mips/machdep.c#19 edit .. //depot/projects/mips2/src/sys/mips/mips/tick.c#3 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/clock.h#3 (text+ko) ==== @@ -32,7 +32,11 @@ #define wall_cmos_clock 0 #define adjkerntz 0 +void tick_init_params(void); void tick_init(void); int sysbeep(int pitch, int period); +extern uint64_t counter_freq; +extern int clocks_running; + #endif /* !_MACHINE_CLOCK_H_ */ ==== //depot/projects/mips2/src/sys/mips/mips/machdep.c#19 (text+ko) ==== @@ -53,23 +53,24 @@ #include #include +#include #include +#include #include -#include #include #include +#include #include #include #include #include -#include #ifdef DDB #include #endif int cold = 1; -int clocks_running; +int clocks_running = 0; long realmem = 0; extern int *end; @@ -91,6 +92,7 @@ int i; printf("entry: mips_init()\n"); + bootverbose = 1; realmem = btoc(64 << 20); @@ -339,10 +341,9 @@ void platform_start(int argc, char **argv) { - cninit(); mips_init(); - tick_init(); + tick_init_params(); } void setPQL2(int *const size, int *const ways); @@ -367,7 +368,8 @@ void cpu_initclocks() { - + tick_init(); + clocks_running = 1; } void @@ -383,15 +385,6 @@ } /* - * Wait for about n microseconds (at least!). - */ -void -DELAY(int n) -{ - -} - -/* * XXX Needed by syscons */ int ==== //depot/projects/mips2/src/sys/mips/mips/tick.c#3 (text+ko) ==== @@ -1,15 +1,16 @@ /*- * Copyright (c) 2006 Bruce M. Simpson + * Copyright (c) 2003-2004 Juli Mallett. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -37,19 +38,34 @@ #include #include #include -#include -#include +#include #include +#include +#include #include #include +#include +#include + #include #include #include uint64_t counter_freq; +uint64_t counts_per_hz; +uint32_t counts_per_usec; int counter_is_broken; u_int counter_present; +/* + * Device methods + */ +static int clock_probe(device_t); +static void clock_identify(driver_t *, device_t); +static int clock_attach(device_t); + + + static unsigned counter_get_timecount(struct timecounter *tc); static struct timecounter counter_timecounter = { @@ -64,7 +80,6 @@ static uint64_t tick_ticker(void) { - return ((uint64_t)mips_rd_count()); } @@ -73,14 +88,14 @@ #endif void -tick_init(void) +tick_init_params(void) { #ifdef notyet u_int64_t counterval[2]; #endif if (bootverbose) - printf("Calibrating MIPS32 clock ... "); + printf("Calibrating MIPS32 clock ... "); #ifdef notyet counterval[0] = mips_rd_count(); DELAY(1000000); @@ -90,19 +105,27 @@ #else /* XXX: The boot monitor told us the CPU frequency. */ { - char *cp = yamon_getenv("khz"); - printf("cp: %s", cp); - if (cp == NULL) { - printf("cannot determine clock frequency\n"); - return; - } - counter_freq = strtol(cp, (char **)NULL, 10) * 1000 ; + char *cp = yamon_getenv("khz"); + printf("cp: %s\n", cp); + if (cp == NULL) { + printf("cannot determine clock frequency, defaulting to 10MHz\n"); + counter_freq = 10000000; + } else + counter_freq = strtol(cp, (char **)NULL, 10) * 1000 ; } #endif + + counts_per_hz = counter_freq / hz; + counts_per_usec = counter_freq / 1000000; + if (bootverbose) printf("MIPS32 clock: %ju Hz\n", (intmax_t)counter_freq); + set_cputicker(tick_ticker, counter_freq, 1); +} +void tick_init(void) +{ if (counter_freq != 0 && !counter_is_broken) { counter_timecounter.tc_frequency = counter_freq; tc_init(&counter_timecounter); @@ -127,7 +150,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, counter_freq, CTLTYPE_QUAD | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_counter_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_counter_freq, "IU", ""); static unsigned counter_get_timecount(struct timecounter *tc) @@ -135,3 +158,125 @@ return (mips_rd_count()); } + +/* + * Wait for about n microseconds (at least!). + */ +void +DELAY(int n) +{ + uint32_t cur, last, delta, usecs; + /* + * This works by polling the timer and counting the + * number of microseconds that go by. + */ + last = mips_rd_count(); + delta = usecs = 0; + + while (n > usecs) { + cur = mips_rd_count(); + + /* Check to see if the timer has wrapped around. */ + if (last < cur) + delta += (last + (counts_per_hz - cur)); + else + delta += (last - cur); + + last = cur; + + if (delta >= counts_per_usec) { + usecs += delta / counts_per_usec; + delta %= counts_per_usec; + } + } +} + +/* + * Device section of file below + */ +static void +clock_intr(void *arg) +{ + struct trapframe *tf; + register_t usermode, pc; + + /* + * Set next clock edge. + */ + + mips_wr_compare(mips_rd_count() + counter_freq / hz); + + + /* + * Magic. Setting up with an arg of NULL means we get passed tf. + */ + tf = arg; + usermode = tf->tf_regs[TF_SR] & MIPS_SR_KSU_USER; + pc = tf->tf_regs[TF_EPC]; + + if (clocks_running) + { + hardclock(usermode, pc); + } + +} + +static int +clock_probe(device_t dev) +{ + if (device_get_unit(dev) != 0) + panic("can't attach more clocks"); + + device_set_desc(dev, "Generic MIPS32 ticker"); + return (0); +} + +static void +clock_identify(driver_t *drv, device_t parent) +{ + BUS_ADD_CHILD(parent, 0, "clock", 0); +} + +static int +clock_attach(device_t dev) +{ + struct resource *irq; + int error; + int rid; + + rid = 0; + irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 5, 5, 1, RF_ACTIVE); + if (irq == NULL) { + device_printf(dev, "failed to allocate irq\n"); + return (ENXIO); + } + error = bus_setup_intr(dev, irq, + INTR_TYPE_CLK | INTR_MPSAFE | INTR_FAST, + clock_intr, NULL, NULL); + if (error != 0) { + device_printf(dev, "bus_setup_intr returned %d\n", error); + return (error); + } + + mips_wr_compare(mips_rd_count() + counter_freq/hz); + return (0); +} + +static device_method_t clock_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, clock_probe), + DEVMETHOD(device_identify, clock_identify), + DEVMETHOD(device_attach, clock_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + + { 0, 0 } +}; + +static driver_t clock_driver = { + "clock", clock_methods, 32 +}; + +static devclass_t clock_devclass; + +DRIVER_MODULE(clock, nexus, clock_driver, clock_devclass, 0, 0); From owner-p4-projects@FreeBSD.ORG Tue Aug 8 19:19:04 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 CDA8216A4E8; Tue, 8 Aug 2006 19:19:03 +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 8936E16A4DA for ; Tue, 8 Aug 2006 19:19:03 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BECA43D46 for ; Tue, 8 Aug 2006 19:19:03 +0000 (GMT) (envelope-from bushman@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 k78JJ3Ra031861 for ; Tue, 8 Aug 2006 19:19:03 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78JJ2ea031858 for perforce@freebsd.org; Tue, 8 Aug 2006 19:19:02 GMT (envelope-from bushman@freebsd.org) Date: Tue, 8 Aug 2006 19:19:02 GMT Message-Id: <200608081919.k78JJ2ea031858@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 103459 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: Tue, 08 Aug 2006 19:19:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=103459 Change 103459 by bushman@bushman_nss_ldap_cached on 2006/08/08 19:18:12 Proper error logging implemented. All memory allocation errors are now properly handled (no more asserts there). Some other TODOs were fixed. Sources cleaned. The only stuff that is really untested to the moment is referrals. Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/Makefile#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.c#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.h#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.c#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.h#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.h#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.c#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.h#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.c#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.h#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapschema.c#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapschema.h#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.c#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.h#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaptls.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaptls.h#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.c#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.h#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.c#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.h#10 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/Makefile#10 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.c#9 (text+ko) ==== @@ -71,14 +71,12 @@ schema = &sctx->conf->schema; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_attr_gid(sctx, _ATM(schema, GROUP, gidNumber), &grp->gr_gid); if (rv != NSS_LDAP_SUCCESS) goto errfin; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_rdn_str(sctx, _ATM(schema, GROUP, cn), &grp->gr_name, &len, buf, buflen); @@ -87,7 +85,6 @@ buflen -= len; buf += len; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_attr_password(sctx, _ATM(schema, GROUP, userPassword), &grp->gr_passwd, &len, buf, buflen); @@ -96,7 +93,6 @@ buflen -= len; buf += len; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_attr_multi_str(sctx, _ATM(schema, GROUP, memberUid), &grp->gr_mem, &memlen, &len, buf, buflen); @@ -105,8 +101,6 @@ buflen -= len; buf += len; - printf("%s %d\n", __FILE__, __LINE__); - errfin: return (rv); } @@ -220,15 +214,12 @@ switch ((enum nss_lookup_type)mdata) { case nss_lt_name: - printf("GGG %s %d\n", __FILE__, __LINE__); name = va_arg(ap, char *); break; case nss_lt_id: - printf("GGG %s %d\n", __FILE__, __LINE__); gid = va_arg(ap, gid_t); break; case nss_lt_all: - printf("GGG %s %d\n", __FILE__, __LINE__); break; default: /* CONSIDERED UNREACHABLE */ ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.h#9 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.c#10 (text+ko) ==== @@ -71,7 +71,6 @@ schema = &sctx->conf->schema; - printf("here %s %d %p\n", __FILE__, __LINE__, (void *)sctx); if ((__nss_ldap_check_oc(sctx, "shadowAccount") == NSS_LDAP_SUCCESS) || (geteuid() != 0)) rv = __nss_ldap_assign_str("*", &pwd->pw_dir, &len, buf, @@ -86,7 +85,6 @@ buflen -= len; buf += len; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_attr_str(sctx, _ATM(schema, PASSWD, uid), &pwd->pw_name, &len, buf, buflen); @@ -95,7 +93,6 @@ buflen -= len; buf += len; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_attr_str(sctx, _AT(schema, gecos), &pwd->pw_gecos, &len, buf, buflen); @@ -111,7 +108,6 @@ buflen -= len; buf += len; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_attr_str(sctx, _AT(schema, homeDirectory), &pwd->pw_dir, &len, buf, buflen); @@ -123,7 +119,6 @@ buflen -= len; buf += len; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_attr_str(sctx, _AT(schema, loginShell), &pwd->pw_shell, &len, buf, buflen); @@ -135,7 +130,6 @@ buflen -= len; buf += len; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_attr_str(sctx, _AT(schema, loginClass), &pwd->pw_class, &len, buf, buflen); @@ -147,7 +141,6 @@ buflen -= len; buf += len; - printf("==> %d %s\n", __LINE__, __FILE__); rv = __nss_ldap_assign_attr_uid(sctx, _AT(schema, uidNumber), &pwd->pw_uid); ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_passwd.h#10 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#6 (text+ko) ==== @@ -115,7 +115,10 @@ if (serv_mdata_ext == NULL) { serv_mdata_ext = (struct services_mdata_ext *)malloc( sizeof(struct services_mdata_ext)); - assert(serv_mdata_ext != NULL); + if (serv_mdata_ext == NULL) { + rv = NSS_LDAP_MEMORY_ERROR; + goto errfin; + } serv_mdata_ext->offset = -1; serv_mdata_ext->count = 0; @@ -187,7 +190,6 @@ nss_ldap_destroy_servent(struct nss_ldap_parse_context *pctx) { - printf("SAFDASPIFO UASFIOOASUIFIOAS FUOAISFUI OAUSFIOASUF!!!!!!!!!here - %s %d\n", __FILE__, __LINE__); assert(pctx != NULL); free(pctx->mdata_ext); } ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.h#6 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.c#10 (text+ko) ==== @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -85,11 +86,10 @@ static int get_yesno(const char *str, int *value) { - printf("getyes_no %s\n", str); - if (strcmp(str, "yes") == 0) { + if ((strcmp(str, "yes") == 0) || (strcmp(str, "true") == 0)) { *value = NSS_LDAP_OPTION_YES; return (NSS_LDAP_SUCCESS); - } else if (strcmp(str, "no") == 0) { + } else if ((strcmp(str, "no") == 0) || (strcmp(str, "false") == 0)) { *value = NSS_LDAP_OPTION_NO; return (NSS_LDAP_SUCCESS); } @@ -152,7 +152,7 @@ conf->port = LDAP_PORT; conf->proto_version = NSS_LDAP_PROTO_VERSION_3; - conf->ssl_mode = NSS_LDAP_SSL_OFF;//NSS_LDAP_SSL_START_TLS; + conf->ssl_mode = NSS_LDAP_SSL_OFF; conf->search_limit = 0; conf->bind_timelimit = 30; conf->idle_timelimit = 0; @@ -168,13 +168,8 @@ conf->restart = 0; conf->debug = 0; - conf->bind_dn = NULL; - conf->bind_pw = NULL; - conf->sasl_authid = NULL; - conf->tls_checkpeer = NSS_LDAP_OPTION_DEFAULT; - //__nss_ldap_init_start_tls_simple_auth_method(&conf->connection_method); __nss_ldap_init_simple_auth_method(&conf->connection_method); __nss_ldap_init_default_search_method(&conf->search_method); __nss_ldap_init_default_tls_method(&conf->tls_method); @@ -193,50 +188,50 @@ assert(conf != NULL); assert(fname != NULL); - printf("fname: %s %d\n", fname, conf->proto_version); fin = fopen(fname, "r"); - if (fin == NULL) + if (fin == NULL) { + snprintf(err->buffer, sizeof(err->buffer), "can't open " + "configuration file '%s': %s", fname, strerror(errno)); + err->line = -1; return (NSS_LDAP_GENERIC_ERROR); + } res = NSS_LDAP_SUCCESS; line_num = 0; memset(buffer, 0, sizeof(buffer)); - while ((res == 0) && (fgets(buffer, sizeof(buffer) - 1, fin) != NULL)) { - printf("buffer: %s\n", buffer); + while ((res == NSS_LDAP_SUCCESS) && + (fgets(buffer, sizeof(buffer) - 1, fin) != NULL)) { field_count = strbreak(buffer, fields, sizeof(fields)); - ++line_num; - + ++line_num; if (field_count == 0) continue; switch (fields[0][0]) { case '#': - case '\0': - printf("== %s, %d ==\n", __FILE__, __LINE__); + case '\0': continue; - case 'b': - printf("== %s, %d ==\n", __FILE__, __LINE__); + case 'b': if (strcmp(fields[0], "base") == 0) { if (field_count == 2) { free(conf->base); conf->base = strdup(fields[1]); - assert(conf->base != NULL); - continue; + if (conf->base != NULL) + continue; } } else if (strcmp(fields[0], "binddn") == 0) { if (field_count == 2) { free(conf->bind_dn); conf->bind_dn = strdup(fields[1]); - assert(conf->bind_dn != NULL); - continue; + if (conf->bind_dn != NULL) + continue; } } else if (strcmp(fields[0], "bindpw") == 0) { if (field_count == 2) { free(conf->bind_pw); conf->bind_pw = strdup(fields[1]); - assert(conf->bind_pw != NULL); - continue; + if (conf->bind_pw != NULL) + continue; } } else if (strcmp(fields[0], "bind_timelimit") == 0) { if ((field_count == 2) && @@ -290,25 +285,28 @@ } } break; - case 'h': - printf("== %s, %d ==\n", __FILE__, __LINE__); + case 'h': if (strcmp(fields[0], "host") == 0) { if (field_count >= 2) { if (conf->hosts != NULL) sl_free(conf->hosts, 1); conf->hosts = sl_init(); - assert(conf->hosts != NULL); - - for (i = 1; i < field_count; ++i) { - str = strdup(fields[i]); - assert(str != NULL); - rv = sl_add(conf->hosts, str); - if (rv != 0) { - /* TODO: write to logs */ + if (conf->hosts != NULL) { + rv = 0; + for (i = 1; i < field_count; ++i) { + str = strdup(fields[i]); + if (str == NULL) { + rv = -1; + break; + } + rv = sl_add(conf->hosts, str); + if (rv != 0) + break; } + if (rv == 0); + continue; } - continue; } } break; @@ -327,13 +325,12 @@ if (field_count == 2) { free(conf->krb5_ccname); conf->krb5_ccname = strdup(fields[1]); - assert(conf->krb5_ccname != NULL); - continue; + if (conf->krb5_ccname != NULL) + continue; } } break; - case 'l': - printf("== %s, %d ==\n", __FILE__, __LINE__); + case 'l': /* NOTE: we'd probably better use * NSS_LDAP_PROTO_VERSION_2 and * NSS_LDAP_PROTO_VERSION_3 constants here */ @@ -348,13 +345,12 @@ if (field_count == 2) { free(conf->logdir); conf->logdir = strdup(fields[1]); - assert(conf->logdir); - continue; + if (conf->logdir != NULL) + continue; } } break; - case 'n': - printf("== %s, %d ==\n", __FILE__, __LINE__); + case 'n': if (strncmp(fields[0], NSS_BASE_PREFIX, NSS_BASE_PREFIX_SIZE) == 0) { @@ -408,8 +404,7 @@ } } break; - case 'p': - printf("== %s, %d ==\n", __FILE__, __LINE__); + case 'p': if (strcmp(fields[0], "port") == 0) { if ((field_count == 2) && (get_number(fields[1], 0, -1, &value) == @@ -419,21 +414,20 @@ } } break; - case 'r': - printf("== %s, %d ==\n", __FILE__, __LINE__); + case 'r': if (strcmp(fields[0], "rootbinddn") == 0) { if (field_count == 2) { free(conf->root_bind_dn); conf->root_bind_dn = strdup(fields[1]); - assert(conf->root_bind_dn != NULL); - continue; + if (conf->root_bind_dn != NULL) + continue; } } else if (strcmp(fields[0], "rootbindpw") == 0) { if (field_count == 2) { free(conf->root_bind_pw); conf->root_bind_pw = strdup(fields[1]); - assert(conf->root_bind_pw != NULL); - continue; + if (conf->root_bind_pw != NULL) + continue; } } else if (strcmp(fields[0], "restart") == 0) { if ((field_count == 2) && @@ -460,13 +454,12 @@ if (field_count == 2) { free(conf->root_sasl_authid); conf->root_sasl_authid = strdup(fields[1]); - assert(conf->root_sasl_authid != NULL); - continue; + if (conf->root_sasl_authid != NULL) + continue; } } break; - case 's': - printf("== %s, %d ==\n", __FILE__, __LINE__); + case 's': if (strcmp(fields[0], "scope") == 0) { if (field_count == 2) { if (strcmp(fields[1], "sub") == 0) { @@ -485,8 +478,7 @@ if (strcmp(fields[1], "off") == 0) { conf->ssl_mode = NSS_LDAP_SSL_OFF; continue; - } else if (strcmp(fields[1], "on") == 0) { - printf("BBBBBBBBBBBBBBBBBBBB%s %d\n", __FILE__, __LINE__); + } else if (strcmp(fields[1], "on") == 0) { conf->ssl_mode = NSS_LDAP_SSL_ON; continue; } else if (strcmp(fields[1], "start_tls") == 0) { @@ -498,15 +490,15 @@ if (field_count == 2) { free(conf->sasl_authid); conf->sasl_authid = strdup(fields[1]); - assert(conf->sasl_authid != NULL); - continue; + if (conf->sasl_authid != NULL) + continue; } } else if (strcmp(fields[0], "sasl_secprops") == 0) { if (field_count == 2) { free(conf->sasl_secprops); conf->sasl_secprops = strdup(fields[1]); - assert(conf->sasl_secprops != NULL); - continue; + if (conf->sasl_secprops != NULL) + continue; } } break; @@ -518,8 +510,7 @@ conf->search_timelimit = value; continue; } - } else if (strcmp(fields[0], "tls_checkpeer") == 0) { - printf("field_count %d\n", field_count); + } else if (strcmp(fields[0], "tls_checkpeer") == 0) { if ((field_count == 2) && (get_yesno(fields[1], &value) == NSS_LDAP_SUCCESS)) { @@ -530,65 +521,70 @@ if (field_count == 2) { free(conf->tls_cacertdir); conf->tls_cacertdir = strdup(fields[1]); - assert(conf->tls_cacertdir != NULL); - continue; + if (conf->tls_cacertdir != NULL) + continue; } } else if ((strcmp(fields[0], "tls_cacertfile") == 0) || (strcmp(fields[0], "tls_cacert") == 0)) { if (field_count == 2) { free(conf->tls_cacert); conf->tls_cacert = strdup(fields[1]); - assert(conf->tls_cacert != NULL); - continue; + if (conf->tls_cacert != NULL) + continue; } } else if (strcmp(fields[0], "tls_randfile") == 0) { if (field_count == 2) { free(conf->tls_rand); conf->tls_rand = strdup(fields[1]); - assert(conf->tls_rand); - continue; + if (conf->tls_rand != NULL) + continue; } } else if (strcmp(fields[0], "tls_ciphers") == 0) { if (field_count == 2) { free(conf->tls_ciphers); conf->tls_ciphers = strdup(fields[1]); - assert(conf->tls_ciphers); - continue; + if (conf->tls_ciphers != NULL) + continue; } } else if (strcmp(fields[0], "tls_cert") == 0) { if (field_count == 2) { free(conf->tls_cert); conf->tls_cert = strdup(fields[1]); - assert(conf->tls_cert); - continue; + if (conf->tls_cert != NULL) + continue; } } else if (strcmp(fields[0], "tls_key") == 0) { if (field_count == 2) { free(conf->tls_key); conf->tls_key = strdup(fields[1]); - assert(conf->tls_key); - continue; + if (conf->tls_key != NULL) + continue; } } break; case 'u': if (strcmp(fields[0], "uri") == 0) { if (field_count >= 2) { - if (conf->uris != NULL) - sl_free(conf->uris, 1); + if (conf->uris != NULL) + sl_free(conf->uris, 1); - conf->uris = sl_init(); - assert(conf->uris != NULL); - + conf->uris = sl_init(); + if (conf->uris != NULL) { + rv = 0; for (i = 1; i < field_count; ++i) { str = strdup(fields[i]); - assert(str != NULL); + if (str == NULL) { + rv = -1; + break; + } rv = sl_add(conf->uris, str); - if (rv != 0) { - /* TODO: write to logs */ - } + if (rv != 0) + break; } - continue; + + if (rv == 0) + continue; + } } } else if (strcmp(fields[0], "use_sasl") == 0) { if ((field_count == 2) && @@ -607,27 +603,28 @@ } fclose(fin); - if (res == NSS_LDAP_SUCCESS) { - printf("%d -- conf->port\n", conf->port); + if (res == NSS_LDAP_SUCCESS) { if ((conf->root_bind_dn == NULL) && (conf->bind_dn != NULL)) { conf->root_bind_dn = strdup(conf->bind_dn); - assert(conf->root_bind_dn != NULL); + if (conf->root_bind_dn == NULL) + res = NSS_LDAP_MEMORY_ERROR; } if ((conf->root_bind_pw == NULL) && (conf->bind_pw != NULL)) { conf->root_bind_pw = strdup(conf->bind_pw); - assert(conf->root_bind_pw != NULL); + if (conf->root_bind_pw == NULL) + res = NSS_LDAP_MEMORY_ERROR; } if ((conf->root_sasl_authid == NULL) && (conf->sasl_authid != NULL)) { conf->root_sasl_authid = strdup(conf->sasl_authid); - assert(conf->root_sasl_authid != NULL); + if (conf->root_sasl_authid == NULL) + res = NSS_LDAP_MEMORY_ERROR; } - - printf("BBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCc %p\n", (void *)conf->sasl_authid); + #ifdef NSS_LDAP_SASL_AUTH_ENABLED if (conf->use_sasl == 0) { #endif @@ -636,8 +633,7 @@ __nss_ldap_init_simple_auth_method( &conf->connection_method); break; - case NSS_LDAP_SSL_ON: - printf("BBBBBBBBBBBBBBBBBBBB%s %d\n", __FILE__, __LINE__); + case NSS_LDAP_SSL_ON: __nss_ldap_init_ssl_simple_auth_method( &conf->connection_method); break; @@ -663,11 +659,16 @@ __nss_ldap_init_start_tls_sasl_auth_method( &conf->connection_method); break; + default: + break; } } #endif - } else - printf("CONFIG FAILED!\n"); + } else { + snprintf(err->buffer, sizeof(err->buffer), "parse error in " + "configuration file '%s'", fname, line_num); + err->line = line_num; + } return (res); } ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconf.h#10 (text+ko) ==== @@ -31,9 +31,9 @@ #include -#define NSS_LDAP_SCOPE_SUB 0 -#define NSS_LDAP_SCOPE_ONE 1 -#define NSS_LDAP_SCOPE_BASE 2 +#define NSS_LDAP_SCOPE_SUB LDAP_SCOPE_SUB +#define NSS_LDAP_SCOPE_ONE LDAP_SCOPE_ONE +#define NSS_LDAP_SCOPE_BASE LDAP_SCOPE_BASE #define NSS_LDAP_DEREF_NEVER 0 #define NSS_LDAP_DEREF_FINDING 1 ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapconn.c#10 (text+ko) ==== @@ -70,10 +70,8 @@ socklen_t peernamelen; int rv; - if (conn->sock_fd == -1) { - printf("check_connection_socket: %d\n", conn->sock_fd); + if (conn->sock_fd == -1) return (NSS_LDAP_SUCCESS); - } socknamelen = sizeof(conn->sockname); peernamelen = sizeof(conn->peername); @@ -90,7 +88,7 @@ (struct sockaddr *)sockname) == 0) && (compare_sockaddr((struct sockaddr *)conn->peername, (struct sockaddr *)peername) == 0)) ? 0 : -1; - printf("check_connection_socket %d\n", rv); + return (rv); } @@ -100,7 +98,6 @@ struct nss_ldap_connection_error conn_err; int dummy_fd, backup_fd, rv; - printf("close_lost_connection: sock_fd: %d\n", conn->sock_fd); if (conn->sock_fd == -1) return (NSS_LDAP_CONNECTION_ERROR); @@ -111,12 +108,9 @@ goto fin; } - printf("close_lost_connection: dummy_fd: %d\n", dummy_fd); if (dummy_fd != conn->sock_fd) { backup_fd = dup(conn->sock_fd); - printf("close_lost_connection: backup_fd: %d\n", backup_fd); - dup2(dummy_fd, conn->sock_fd); - + dup2(dummy_fd, conn->sock_fd); close (conn->sock_fd); } memset(&conn_err, 0, sizeof(struct nss_ldap_connection_error)); @@ -125,7 +119,6 @@ if (dummy_fd != conn->sock_fd) dup2(backup_fd, conn->sock_fd); - printf("close_lost_connection: sock_fd: %d\n", conn->sock_fd); fin: if (dummy_fd != -1) close(dummy_fd); @@ -140,7 +133,6 @@ struct nss_ldap_connection_error *conn_err) { int rv; - printf("nss_ldap: checking connection\n"); if (check_connection_socket(conn) != 0) { rv = close_lost_connection(conn); @@ -156,64 +148,83 @@ int rv; rv = LDAP_SUCCESS; - printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa%s %d\n", __FILE__, __LINE__); if (conf->tls_rand != NULL) { - printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_RANDOM_FILE, conf->tls_rand); - if (rv != LDAP_SUCCESS) + if (rv != LDAP_SUCCESS) { + __nss_ldap_log(NSS_LDAP_LL_WARN, + "set_ssl_options failed: LDAP_OPT_X_TLS_RANDOM_FILE" + " can't be set"); goto fin; + } } if (conf->tls_cacert != NULL) { - printf("%s %d %s\n", __FILE__, __LINE__, conf->tls_cacert); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, conf->tls_cacert); - if (rv != LDAP_SUCCESS) + if (rv != LDAP_SUCCESS) { + __nss_ldap_log(NSS_LDAP_LL_WARN, + "set_ssl_options failed: LDAP_OPT_X_TLS_CACERTFILE" + " can't be set"); goto fin; + } } if (conf->tls_cacertdir != NULL) { - printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTDIR, conf->tls_cacertdir); - if (rv != LDAP_SUCCESS) + if (rv != LDAP_SUCCESS) { + __nss_ldap_log(NSS_LDAP_LL_WARN, + "set_ssl_options failed: LDAP_OPT_X_TLS_CACERTDIR" + " can't be set"); goto fin; + } } if (conf->tls_cert != NULL) { - printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_CERTFILE, conf->tls_cert); - if (rv != LDAP_SUCCESS) + if (rv != LDAP_SUCCESS) { + __nss_ldap_log(NSS_LDAP_LL_WARN, + "set_ssl_options failed: LDAP_OPT_X_TLS_CERTFILE" + " can't be set"); goto fin; + } } if (conf->tls_ciphers != NULL) { - printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_CIPHER_SUITE, conf->tls_ciphers); - if (rv != LDAP_SUCCESS) + if (rv != LDAP_SUCCESS) { + __nss_ldap_log(NSS_LDAP_LL_WARN, + "set_ssl_options failed: " + "LDAP_OPT_X_TLS_CIPHER_SUITE can't be set"); goto fin; + } } if (conf->tls_key != NULL) { - printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_KEYFILE, conf->tls_key); - if (rv != LDAP_SUCCESS) + if (rv != LDAP_SUCCESS) { + __nss_ldap_log(NSS_LDAP_LL_WARN, + "set_ssl_options failed: LDAP_OPT_X_TLS_KEYFILE" + " can't be set"); goto fin; + } } if (conf->tls_checkpeer != NSS_LDAP_OPTION_DEFAULT) { - printf("%s %d\n", __FILE__, __LINE__); rv = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &conf->tls_checkpeer); - if (rv != LDAP_SUCCESS) + if (rv != LDAP_SUCCESS) { + __nss_ldap_log(NSS_LDAP_LL_WARN, + "set_ssl_options failed: " + "LDAP_OPT_X_TLS_REQUIRE_CERT can't be set"); goto fin; + } } - printf("BBBBBBBBBBBBBBBBBBBBFFFFFFFFFFFFFFFF%s %d\n", __FILE__, __LINE__); fin: return (rv); } @@ -243,7 +254,6 @@ assert(conf != NULL); assert(err != NULL); - printf("%p\n", (void *)conf); return (method->auth_fn(conn, conf, err)); } @@ -305,17 +315,23 @@ struct nss_ldap_connection_error conn_err; int rv; - __nss_ldap_attach_connection(&tmp_conn, ld); + __nss_ldap_log(NSS_LDAP_LL_DEBUG_INT, + "ldap_simple_rebind_proc called"); + __nss_ldap_attach_connection(&tmp_conn, ld); memset(&conn_err, 0, sizeof(struct nss_ldap_connection_error)); rv = __nss_ldap_auth(&__nss_ldap_conf->connection_method, &tmp_conn, __nss_ldap_conf, &conn_err); + __nss_ldap_detach_connection(&tmp_conn); if (rv == NSS_LDAP_SUCCESS) return (LDAP_SUCCESS); - else + else { + __nss_ldap_log(NSS_LDAP_LL_DEBUG_INT, + "ldap_simple_rebind_proc failed"); return (LDAP_AUTH_UNKNOWN); + } } struct nss_ldap_connection * @@ -333,10 +349,14 @@ conn = (struct nss_ldap_connection *)malloc(sizeof( struct nss_ldap_connection)); - assert(conn != NULL); + if (conn == NULL) { + snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, + "malloc() error: %s\n", ldap_err2string(rv)); + err->err_num = errno; + return (NULL); + } memset(conn, 0, sizeof(struct nss_ldap_connection)); - printf("aiosfuoasf %s %d\n", __FILE__, __LINE__); if (request->uri == NULL) { memset( &url, 0, sizeof(url)); url.lud_scheme = request->scheme; @@ -348,18 +368,14 @@ if (ldapuri == NULL) { snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, "cannot format the ldap URI"); - printf("911 %s\n", err->description); free(conn); return (NULL); } rv = ldap_initialize(&conn->ld, ldapuri); free(ldapuri); - } else { - printf("aiosfuoasf %s %d %s\n", __FILE__, __LINE__, - request->uri); + } else rv = ldap_initialize(&conn->ld, request->uri); - } if (rv != NSS_LDAP_SUCCESS) { snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, @@ -381,7 +397,6 @@ break; } - printf("ldap_version: %d\n", conf->proto_version); rv = ldap_set_option(conn->ld, LDAP_OPT_PROTOCOL_VERSION, &opt); if (rv != LDAP_SUCCESS) @@ -422,35 +437,43 @@ rv = ldap_set_option(conn->ld, LDAP_OPT_RESTART, &conf->restart); if (rv != LDAP_SUCCESS) { - /* TODO: write smth to logs */ + __nss_ldap_log(NSS_LDAP_LL_WARN, + "__nss_ldap_simple_connect: LDAP_OPT_RESTART" + " can't be set"); } } opt = conf->bind_timelimit == 0 ? LDAP_NO_LIMIT : conf->bind_timelimit; rv = ldap_set_option(conn->ld, LDAP_OPT_NETWORK_TIMEOUT, &opt); if (rv != LDAP_SUCCESS) { - /* TODO: write smth to logs */ + __nss_ldap_log(NSS_LDAP_LL_WARN, + "__nss_ldap_simple_connect: LDAP_OPT_NETWORK_TIMEOUT" + " can't be set"); } opt = conf->search_timelimit == 0 ? LDAP_NO_LIMIT : conf->search_timelimit; rv = ldap_set_option(conn->ld, LDAP_OPT_TIMELIMIT, &opt); if (rv != LDAP_SUCCESS) { - /* TODO: write smth to logs */ + __nss_ldap_log(NSS_LDAP_LL_WARN, + "__nss_ldap_simple_connect: LDAP_OPT_TIMELIMIT" + " can't be set"); } rv = ldap_set_rebind_proc(conn->ld, ldap_simple_rebind_proc, NULL); if (rv != LDAP_SUCCESS) { - /* TODO: write smth to logs */ + __nss_ldap_log(NSS_LDAP_LL_WARN, + "__nss_ldap_simple_connect: ldap_set_rebind_proc failed"); } conn->sock_fd = -2; rv = ldap_get_option(conn->ld, LDAP_OPT_DESC, &conn->sock_fd); if (rv != LDAP_SUCCESS) { conn->sock_fd = -1; - /* TODO: write smth to logs */ + __nss_ldap_log(NSS_LDAP_LL_DEBUG_INT, + "__nss_ldap_simple_connect: LDAP_OPT_DESC" + " can't be retrieved"); } - printf("conn->sockfd %d %p\n", conn->sock_fd, (void *)conn->ld); rv = LDAP_SUCCESS; fin: @@ -458,10 +481,12 @@ err->err_num = rv; snprintf(err->description, NSS_LDAP_MAX_ERR_DESC_SIZE, "ldap_set_option() error: %s\n", ldap_err2string(rv)); - printf("err->description %s\n", err->description); ldap_unbind(conn->ld); free(conn); conn = NULL; + + __nss_ldap_log(NSS_LDAP_LL_ERR_INT, + "__nss_ldap_simple_connect failed"); } return (conn); @@ -483,8 +508,6 @@ char *bind_dn; char *bind_pw; - printf("%p\n", (void *)conf); - assert(conn != NULL); assert(conf != NULL); assert(err != NULL); @@ -494,22 +517,18 @@ else bind_dn = conf->root_bind_dn; - /* TODO: maybe we should have root_bind_pw? */ - bind_pw = conf->bind_pw; - - printf("bind_dn: %s, bind_pw: %s\n", bind_dn, bind_pw); - + if (geteuid() != 0) + bind_pw = conf->bind_pw; + else + bind_pw = conf->root_bind_pw; /* Send an LDAP bind request to the server. */ msgid = ldap_simple_bind(conn->ld, bind_dn, bind_pw); /* If the returned message ID is less than zero, an error occurred. */ if ( msgid < 0 ) { - /* NOTE: can't use ldap_result2error here */ - printf("aa%p\n", (void *)conf); ldap_get_option(conn->ld, LDAP_OPT_ERROR_NUMBER, (void *)&err->err_num); - printf("aa%p\n", (void *)conf); if (ldap_get_option(conn->ld, LDAP_OPT_ERROR_STRING, (void *)&err_str) != LDAP_SUCCESS) err_str = NULL; @@ -517,14 +536,14 @@ "ldap_simple_bind() error: %s; %s\n", ldap_err2string(err->err_num), err_str == NULL ? "" : err_str); - printf("aa%p %s\n", (void *)conf, err->description); + __nss_ldap_log(NSS_LDAP_LL_ERR_INT, + "__nss_ldap_simple_auth failed on ldap_simple_bind"); return (NSS_LDAP_CONNECTION_ERROR); } /* Check to see if the bind operation completed. */ memset(&zerotime, 0, sizeof(zerotime)); while ( !finished ) { - printf("FIININISHED %d %d %d %p\n", finished, rc, msgid, (void *)conn->ld); res = NULL; rc = ldap_result( conn->ld, msgid, 1, &zerotime, &res ); switch ( rc ) { @@ -539,7 +558,8 @@ "ldap_result() error: %s; %s\n", ldap_err2string(err->err_num), >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Aug 8 22:09:45 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 23F8816A4DD; Tue, 8 Aug 2006 22:09:44 +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 A068316A4E5 for ; Tue, 8 Aug 2006 22:09:44 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7219E43D46 for ; Tue, 8 Aug 2006 22:09:44 +0000 (GMT) (envelope-from imp@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 k78M9iFu060180 for ; Tue, 8 Aug 2006 22:09:44 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78M9iPF060177 for perforce@freebsd.org; Tue, 8 Aug 2006 22:09:44 GMT (envelope-from imp@freebsd.org) Date: Tue, 8 Aug 2006 22:09:44 GMT Message-Id: <200608082209.k78M9iPF060177@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103476 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: Tue, 08 Aug 2006 22:09:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=103476 Change 103476 by imp@imp_lighthouse on 2006/08/08 22:08:57 Only do the watchdog for automated boot Boot from SPI part Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/arm_init.S#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#15 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/arm_init.S#5 (text+ko) ==== @@ -109,11 +109,17 @@ .string "e 0x10000000 " .string " " #else +#if 0 .string "Bootloader for KB9202 Evaluation Board." .string "m 42 53 44 0 0 1 " .string "ip 206 168 13 194 " .string "server_ip 206 168 13 207 " .string "tftp 0x20000000 kernel.bin " .string "e 0x20000000 " +#else + .string "m 42 53 44 0 0 1" + .string "k 0x20000000" + .string "e 0x20000000" +#endif .word 0 #endif ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#15 (text+ko) ==== @@ -53,10 +53,11 @@ fpga_load(); #endif EMAC_Init(); - start_wdog(30); LoadBootCommands(); - if (getc(1) == -1) + if (getc(1) == -1) { + start_wdog(30); ExecuteEnvironmentFunctions(); + } Bootloader(getc); return (1); } From owner-p4-projects@FreeBSD.ORG Tue Aug 8 23:00:50 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 2852416A4E1; Tue, 8 Aug 2006 23:00:50 +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 C547F16A4DA for ; Tue, 8 Aug 2006 23:00:49 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FF5F43D46 for ; Tue, 8 Aug 2006 23:00:49 +0000 (GMT) (envelope-from imp@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 k78N0ndm062466 for ; Tue, 8 Aug 2006 23:00:49 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k78N0nfg062461 for perforce@freebsd.org; Tue, 8 Aug 2006 23:00:49 GMT (envelope-from imp@freebsd.org) Date: Tue, 8 Aug 2006 23:00:49 GMT Message-Id: <200608082300.k78N0nfg062461@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103477 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: Tue, 08 Aug 2006 23:00:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=103477 Change 103477 by imp@imp_lighthouse on 2006/08/08 22:59:54 Reorder the way we initialize the NIC. Initialize more of the nic when we set the MAC address. For that matter, set the mac address only once correctly in the tftp case, rather than twice, the first time incorrectly. In the non-ftp case we were setting it once incorrectly :-(. This has the nice side effect of +100 bytes free. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#12 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/loader_prompt.c#16 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#22 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#15 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#12 (text+ko) ==== @@ -171,7 +171,7 @@ static void ParseCommand(char *buffer) { - int argc; + int argc, i; if ((argc = BreakCommand(buffer)) < 1) return; @@ -261,17 +261,12 @@ { // "m // set mac address using 6 byte values - unsigned low_addr, high_addr; + unsigned char mac[6]; if (argc > 6) { - low_addr = (p_ASCIIToHex(argv[4]) << 24) | - (p_ASCIIToHex(argv[3]) << 16) | - (p_ASCIIToHex(argv[2]) << 8) | - p_ASCIIToHex(argv[1]); - high_addr = - (p_ASCIIToHex(argv[6]) << 8) | - p_ASCIIToHex(argv[5]); - SetMACAddress(low_addr, high_addr); + for (i = 0; i < 6; i++) + mac[i] = p_ASCIIToHex(argv[i + 1]); + SetMACAddress(mac); } break; } ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/loader_prompt.c#16 (text+ko) ==== @@ -222,7 +222,7 @@ static void ParseCommand(char *buffer) { - int argc; + int argc, i; if ((argc = BreakCommand(buffer)) < 1) return; @@ -278,17 +278,12 @@ { // "m // set mac address using 6 byte values - unsigned low_addr, high_addr; + unsigned char mac[6]; if (argc > 6) { - low_addr = (p_ASCIIToHex(argv[4]) << 24) | - (p_ASCIIToHex(argv[3]) << 16) | - (p_ASCIIToHex(argv[2]) << 8) | - p_ASCIIToHex(argv[1]); - high_addr = - (p_ASCIIToHex(argv[6]) << 8) | - p_ASCIIToHex(argv[5]); - SetMACAddress(low_addr, high_addr); + for (i = 0; i < 6; i++) + mac[i] = p_ASCIIToHex(argv[i + 1]); + SetMACAddress(mac); } break; } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#22 (text+ko) ==== @@ -29,8 +29,9 @@ /* ********************** PRIVATE FUNCTIONS/DATA ******************************/ -static unsigned localMACSet, serverMACSet, MAC_init; +static unsigned localMACSet, serverMACSet; static unsigned char localMACAddr[6], serverMACAddr[6]; +static unsigned localMAClow, localMAChigh; static unsigned localIPSet, serverIPSet; static unsigned char localIPAddr[4], serverIPAddr[4]; static unsigned short serverPort, localPort; @@ -458,20 +459,9 @@ // Set the WRAP bit at the end of the list descriptor p_rxBD[MAX_RX_PACKETS-1].address |= 0x02; - pEmac->EMAC_CTL = 0; - - pEmac->EMAC_CFG = (pEmac->EMAC_CFG & ~(AT91C_EMAC_CLK)) | -#ifdef BOOT_TSC - AT91C_EMAC_RMII | -#endif - AT91C_EMAC_CLK_HCLK_32 | AT91C_EMAC_CAF; if (!(pEmac->EMAC_SR & AT91C_EMAC_LINK)) MII_GetLinkSpeed(pEmac); - // the sequence write EMAC_SA1L and write EMAC_SA1H must be respected - pEmac->EMAC_SA1L = ((unsigned)localMACAddr[2] << 24) | ((unsigned)localMACAddr[3] << 16) | ((int)localMACAddr[4] << 8) | localMACAddr[5]; - pEmac->EMAC_SA1H = ((unsigned)localMACAddr[0] << 8) | localMACAddr[1]; - pEmac->EMAC_RBQP = (unsigned) p_rxBD; pEmac->EMAC_RSR |= (AT91C_EMAC_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA); pEmac->EMAC_CTL = AT91C_EMAC_TE | AT91C_EMAC_RE; @@ -491,58 +481,50 @@ * .KB_C_FN_DEFINITION_END */ void -SetMACAddress(unsigned low_address, unsigned high_address) +SetMACAddress(unsigned char mac[6]) { + AT91PS_PMC pPMC = AT91C_BASE_PMC; AT91PS_EMAC pEmac = AT91C_BASE_EMAC; - AT91PS_PMC pPMC = AT91C_BASE_PMC; /* enable the peripheral clock before using EMAC */ pPMC->PMC_PCER = ((unsigned) 1 << AT91C_ID_EMAC); - pEmac->EMAC_SA1L = low_address; - pEmac->EMAC_SA1H = (high_address & 0x0000ffff); - - localMACAddr[0] = (low_address >> 0) & 0xFF; - localMACAddr[1] = (low_address >> 8) & 0xFF; - localMACAddr[2] = (low_address >> 16) & 0xFF; - localMACAddr[3] = (low_address >> 24) & 0xFF; - localMACAddr[4] = (high_address >> 0) & 0xFF; - localMACAddr[5] = (high_address >> 8) & 0xFF; - + p_memcpy(localMACAddr, mac, 6); + localMAClow = (mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5]; + localMAChigh = (mac[0] << 8) | mac[1]; localMACSet = 1; - // low_address & 0x000000ff = first byte in address - // low_address & 0x0000ff00 = next - // low_address & 0x00ff0000 = next - // low_address & 0xff000000 = next - // high_address & 0x000000ff = next - // high_address & 0x0000ff00 = last byte in address - - if (!MAC_init) { - AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_EMAC; - AT91C_BASE_PIOA->PIO_ASR = - AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | - AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | - AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | - AT91C_PA7_ETXCK_EREFCK; - AT91C_BASE_PIOA->PIO_PDR = - AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | - AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | - AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | - AT91C_PA7_ETXCK_EREFCK; + AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_EMAC; + AT91C_BASE_PIOA->PIO_ASR = + AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | + AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | + AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | + AT91C_PA7_ETXCK_EREFCK; + AT91C_BASE_PIOA->PIO_PDR = + AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | + AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | + AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | + AT91C_PA7_ETXCK_EREFCK; #ifdef BOOT_KB9202 /* Really !RMII */ - AT91C_BASE_PIOB->PIO_BSR = - AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | - AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | - AT91C_PB18_ECOL | AT91C_PB19_ERXCK; - AT91C_BASE_PIOB->PIO_PDR = - AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | - AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | - AT91C_PB18_ECOL | AT91C_PB19_ERXCK; + AT91C_BASE_PIOB->PIO_BSR = + AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | + AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | + AT91C_PB18_ECOL | AT91C_PB19_ERXCK; + AT91C_BASE_PIOB->PIO_PDR = + AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | + AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | + AT91C_PB18_ECOL | AT91C_PB19_ERXCK; #endif - MAC_init = 1; - } + pEmac->EMAC_CTL = 0; + pEmac->EMAC_CFG = (pEmac->EMAC_CFG & ~(AT91C_EMAC_CLK)) | +#ifdef BOOT_TSC + AT91C_EMAC_RMII | +#endif + AT91C_EMAC_CLK_HCLK_32 | AT91C_EMAC_CAF; + // the sequence write EMAC_SA1L and write EMAC_SA1H must be respected + pEmac->EMAC_SA1L = localMAClow; + pEmac->EMAC_SA1H = localMAChigh; } @@ -607,7 +589,6 @@ return ; AT91F_EmacEntry(); - GetServerAddress(); dlAddress = (char*)address; lastSize = 0; @@ -659,5 +640,4 @@ serverIPSet = 0; localPort = SWAP16(0x8002); lastSize = 0; - MAC_init = 0; } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#6 (text+ko) ==== @@ -24,7 +24,7 @@ #ifndef _EMAC_H_ #define _EMAC_H_ -extern void SetMACAddress(unsigned low_address, unsigned high_address); +extern void SetMACAddress(unsigned char addr[6]); extern void SetServerIPAddress(unsigned address); extern void SetLocalIPAddress(unsigned address); extern void EMAC_Init(void); ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#15 (text) ==== From owner-p4-projects@FreeBSD.ORG Wed Aug 9 00:19:34 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 9698F16A4E1; Wed, 9 Aug 2006 00:19:34 +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 4E98D16A4DD for ; Wed, 9 Aug 2006 00:19:34 +0000 (UTC) (envelope-from howardsu@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5865143D69 for ; Wed, 9 Aug 2006 00:19:33 +0000 (GMT) (envelope-from howardsu@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 k790JXo7068378 for ; Wed, 9 Aug 2006 00:19:33 GMT (envelope-from howardsu@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k790JWNu068375 for perforce@freebsd.org; Wed, 9 Aug 2006 00:19:32 GMT (envelope-from howardsu@FreeBSD.org) Date: Wed, 9 Aug 2006 00:19:32 GMT Message-Id: <200608090019.k790JWNu068375@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to howardsu@FreeBSD.org using -f From: Howard Su To: Perforce Change Reviews Cc: Subject: PERFORCE change 103479 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: Wed, 09 Aug 2006 00:19:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=103479 Change 103479 by howardsu@su_vm on 2006/08/09 00:19:15 Respect the KDTRACE opt flag. Mark SDT_XXX as nop when no KDTRACE Affected files ... .. //depot/projects/dtrace/src/sys/sys/sdt.h#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/sys/sdt.h#6 (text+ko) ==== @@ -71,6 +71,7 @@ #else /* _KERNEL */ +#ifdef KDTRACE #define __SDT_LABEL(name) \ __asm__(".globl __dtrace_probe_" #name); \ __asm__("__dtrace_probe_"#name ":") @@ -108,7 +109,13 @@ (uintptr_t)(arg3), (uintptr_t)(arg4)); \ __SDT_LABEL(name); \ } - +#else +#define DTRACE_PROBE(name) +#define DTRACE_PROBE1(name, type1, arg1) +#define DTRACE_PROBE2(name, type1, arg1, type2, arg2) +#define DTRACE_PROBE3(name, type1, arg1, type2, arg2, type3, arg3) +#define DTRACE_PROBE4(name, type1, arg1, type2, arg2, type3, arg3, type4, arg4) +#endif /* KDTRACE */ #endif /* _KERNEL */ extern const char *sdt_prefix; From owner-p4-projects@FreeBSD.ORG Wed Aug 9 00:55:21 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 2B32516A4E2; Wed, 9 Aug 2006 00:55:21 +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 E17F916A4E0 for ; Wed, 9 Aug 2006 00:55:20 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4B7643D4C for ; Wed, 9 Aug 2006 00:55:20 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k790tKTu077824 for ; Wed, 9 Aug 2006 00:55:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k790tI8T077821 for perforce@freebsd.org; Wed, 9 Aug 2006 00:55:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 9 Aug 2006 00:55:18 GMT Message-Id: <200608090055.k790tI8T077821@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 103480 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: Wed, 09 Aug 2006 00:55:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=103480 Change 103480 by rwatson@rwatson_zoo on 2006/08/09 00:54:57 Prototype kqueue support for audit pipes. Untested. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_pipe.c#26 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_pipe.c#26 (text+ko) ==== @@ -172,6 +172,7 @@ static d_read_t audit_pipe_read; static d_ioctl_t audit_pipe_ioctl; static d_poll_t audit_pipe_poll; +static d_kqfilter_t audit_pipe_kqfilter; static struct cdevsw audit_pipe_cdevsw = { .d_version = D_VERSION, @@ -181,9 +182,20 @@ .d_read = audit_pipe_read, .d_ioctl = audit_pipe_ioctl, .d_poll = audit_pipe_poll, + .d_kqfilter = audit_pipe_kqfilter, .d_name = AUDIT_PIPE_NAME, }; +static int audit_pipe_kqread(struct knote *note, long hint); +static void audit_pipe_kqdetach(struct knote *note); + +static struct filterops audit_pipe_read_filterops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = audit_pipe_kqdetach, + .f_event = audit_pipe_kqread, +}; + /* * Some global statistics on audit pipes. */ @@ -425,6 +437,7 @@ ap->ap_inserts++; ap->ap_qlen++; selwakeuppri(&ap->ap_selinfo, PSOCK); + KNOTE_LOCKED(&ap->ap_selinfo.si_note, 0); if (ap->ap_flags & AUDIT_PIPE_ASYNC) pgsigio(&ap->ap_sigio, SIGIO, 0); } @@ -520,6 +533,8 @@ return (NULL); ap->ap_qlimit = AUDIT_PIPE_QLIMIT_DEFAULT; TAILQ_INIT(&ap->ap_queue); + knlist_init(&ap->ap_selinfo.si_note, &audit_pipe_mtx, NULL, NULL, + NULL); /* * Default flags, naflags, and auid-specific preselection settings to @@ -533,6 +548,9 @@ TAILQ_INIT(&ap->ap_preselect_list); ap->ap_preselect_mode = AUDITPIPE_PRESELECT_MODE_TRAIL; + /* + * Add to global list and update global statistics. + */ TAILQ_INSERT_HEAD(&audit_pipe_list, ap, ap_list); audit_pipe_count++; audit_pipe_ever++; @@ -572,6 +590,7 @@ audit_pipe_preselect_flush_locked(ap); audit_pipe_flush(ap); + knlist_destroy(&ap->ap_selinfo.si_note); TAILQ_REMOVE(&audit_pipe_list, ap, ap_list); free(ap, M_AUDIT_PIPE); audit_pipe_count--; @@ -946,6 +965,71 @@ } /* + * Audit pipe kqfilter. + */ +static int +audit_pipe_kqfilter(struct cdev *dev, struct knote *kn) +{ + struct audit_pipe *ap; + + ap = dev->si_drv1; + KASSERT(ap != NULL, ("audit_pipe_kqfilter: ap == NULL")); + + if (kn->kn_filter != EVFILT_READ) + return (EINVAL); + + kn->kn_fop = &audit_pipe_read_filterops; + kn->kn_hook = ap; + + mtx_lock(&audit_pipe_mtx); + knlist_add(&ap->ap_selinfo.si_note, kn, 1); + mtx_unlock(&audit_pipe_mtx); + return (0); +} + +/* + * Return true if there are records available for reading on the pipe. + */ +static int +audit_pipe_kqread(struct knote *kn, long hint) +{ + struct audit_pipe_entry *ape; + struct audit_pipe *ap; + + mtx_assert(&audit_pipe_mtx, MA_OWNED); + + ap = (struct audit_pipe *)kn->kn_hook; + KASSERT(ap != NULL, ("audit_pipe_kqread: ap == NULL")); + + if (ap->ap_qlen != 0) { + ape = TAILQ_FIRST(&ap->ap_queue); + KASSERT(ape != NULL, ("audit_pipe_kqread: ape == NULL")); + + kn->kn_data = ape->ape_record_len; + return (1); + } else { + kn->kn_data = 0; + return (0); + } +} + +/* + * Detach kqueue state from audit pipe. + */ +static void +audit_pipe_kqdetach(struct knote *kn) +{ + struct audit_pipe *ap; + + ap = (struct audit_pipe *)kn->kn_hook; + KASSERT(ap != NULL, ("audit_pipe_kqdetach: ap == NULL")); + + mtx_lock(&audit_pipe_mtx); + knlist_remove(&ap->ap_selinfo.si_note, kn, 1); + mtx_unlock(&audit_pipe_mtx); +} + +/* * Initialize the audit pipe system. */ static void From owner-p4-projects@FreeBSD.ORG Wed Aug 9 06:14:53 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 F2FA416A4E0; Wed, 9 Aug 2006 06:14:52 +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 BC18616A4DA; Wed, 9 Aug 2006 06:14:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13C8643D49; Wed, 9 Aug 2006 06:14:51 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k796CEq5021602; Wed, 9 Aug 2006 00:12:14 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 09 Aug 2006 00:12:19 -0600 (MDT) Message-Id: <20060809.001219.-1303465484.imp@bsdimp.com> To: hselasky@freebsd.org From: "M. Warner Losh" In-Reply-To: <200608061822.k76IMif7005363@repoman.freebsd.org> References: <200608061822.k76IMif7005363@repoman.freebsd.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 09 Aug 2006 00:12:14 -0600 (MDT) Cc: perforce@freebsd.org Subject: Re: PERFORCE change 103353 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: Wed, 09 Aug 2006 06:14:53 -0000 In message: <200608061822.k76IMif7005363@repoman.freebsd.org> Hans Petter Selasky writes: : + * Copyright (c) 2006 Hans Petter Selasky : + * All rights reserved. : + * Usually copyrights are added only in cases where a significant amount of work has happend. While what you've done is interesting here, it likely falls short of the legal test necessary. Warner From owner-p4-projects@FreeBSD.ORG Wed Aug 9 06:17:36 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 E202616A4E5; Wed, 9 Aug 2006 06:17:35 +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 9107F16A4DA; Wed, 9 Aug 2006 06:17:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2210243D45; Wed, 9 Aug 2006 06:17:35 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k796GXZK021628; Wed, 9 Aug 2006 00:16:33 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 09 Aug 2006 00:16:38 -0600 (MDT) Message-Id: <20060809.001638.353412754.imp@bsdimp.com> To: hselasky@freebsd.org From: "M. Warner Losh" In-Reply-To: <200608061116.k76BGtmo043289@repoman.freebsd.org> References: <200608061116.k76BGtmo043289@repoman.freebsd.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 09 Aug 2006 00:16:33 -0600 (MDT) Cc: perforce@freebsd.org Subject: Re: PERFORCE change 103330 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: Wed, 09 Aug 2006 06:17:36 -0000 In message: <200608061116.k76BGtmo043289@repoman.freebsd.org> Hans Petter Selasky writes: : http://perforce.freebsd.org/chv.cgi?CH=103330 : : Change 103330 by hselasky@hselasky_mini_itx on 2006/08/06 11:16:46 : : Try to get the mii-locking right. Until further lock the : driver's private lock, sc->sc_mtx, from all mii-callbacks, : hence during attach there are some problems, and it is not : possible to hold sc->sc_mtx when calling "mii_phy_probe()", : because this function calls memory allocation functions that : can sleep. Add some more debugging statements. Cleanup some : comments. Move an include file further up. And some other : small things. : + u_int8_t eaddr[min(ETHER_ADDR_LEN,6)]; That's a gratuitous gcc extention. Just use ETHER_ADDR_LEN. : /* reset the adapter */ : aue_cfg_reset(sc); : : + /* set default value */ : + bzero(eaddr, sizeof(eaddr)); : + : /* get station address from the EEPROM */ : aue_cfg_read_eeprom(sc, eaddr, 0, 3); : : @@ -900,17 +921,20 @@ : ifp->if_init = aue_init_cb; : ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; : : - /* XXX: we need Giant when we : - * clobber with the bus: : - * : - * FIXME: right here we are locking : - * in the wrong order: : + /* XXX need Giant when accessing : + * the device structures ! : */ : : mtx_unlock(&(sc->sc_mtx)); : : mtx_lock(&Giant); : : + error = mii_phy_probe(sc->sc_dev, &(sc->sc_miibus), : + &aue_ifmedia_upd_cb, : + &aue_ifmedia_sts_cb); : + : + mtx_unlock(&Giant); : + : mtx_lock(&(sc->sc_mtx)); This lock shouldn't be held during probe/attach anyway. It is a common wpaul driver error :-(. Warner From owner-p4-projects@FreeBSD.ORG Wed Aug 9 08:08:08 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 2E15B16A4E5; Wed, 9 Aug 2006 08:08:08 +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 083FE16A4DE for ; Wed, 9 Aug 2006 08:08:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 548A943D53 for ; Wed, 9 Aug 2006 08:08:06 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== X-Cloudmark-Score: 0.000000 [] Received: from [193.216.87.71] (HELO [10.0.0.249]) by mailfe02.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 253260712; Wed, 09 Aug 2006 10:08:04 +0200 From: Hans Petter Selasky To: "M. Warner Losh" Date: Wed, 9 Aug 2006 10:08:12 +0200 User-Agent: KMail/1.7 References: <200608061822.k76IMif7005363@repoman.freebsd.org> <20060809.001219.-1303465484.imp@bsdimp.com> In-Reply-To: <20060809.001219.-1303465484.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608091008.13203.hselasky@c2i.net> Cc: perforce@freebsd.org Subject: Re: PERFORCE change 103353 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: Wed, 09 Aug 2006 08:08:08 -0000 On Wednesday 09 August 2006 08:12, M. Warner Losh wrote: > In message: <200608061822.k76IMif7005363@repoman.freebsd.org> > > Hans Petter Selasky writes: > : + * Copyright (c) 2006 Hans Petter Selasky > : + * All rights reserved. > : + * > > Usually copyrights are added only in cases where a significant amount > of work has happend. While what you've done is interesting here, it > likely falls short of the legal test necessary. > Ok, so should I remove it? If you look at the diff between version 1 and the latest, you will see significant changes. --HPS From owner-p4-projects@FreeBSD.ORG Wed Aug 9 13:28:09 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 273C516A514; Wed, 9 Aug 2006 13:28:09 +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 DD75016A510 for ; Wed, 9 Aug 2006 13:28:08 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B958443D62 for ; Wed, 9 Aug 2006 13:28:05 +0000 (GMT) (envelope-from rdivacky@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 k79DS5NI056141 for ; Wed, 9 Aug 2006 13:28:05 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79DS5Uo056138 for perforce@freebsd.org; Wed, 9 Aug 2006 13:28:05 GMT (envelope-from rdivacky@FreeBSD.org) Date: Wed, 9 Aug 2006 13:28:05 GMT Message-Id: <200608091328.k79DS5Uo056138@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103506 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: Wed, 09 Aug 2006 13:28:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=103506 Change 103506 by rdivacky@rdivacky_witten on 2006/08/09 13:27:08 Fix KASSERT syntax. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#37 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#37 (text+ko) ==== @@ -426,7 +426,7 @@ error = linux_proc_init(td, p2->p_pid, args->flags); /* reference it - no need to check this */ em = em_find(p2->p_pid, EMUL_UNLOCKED); - KASSERT(em != NULL, "no emuldata after proc_init()!\n"); + KASSERT(em != NULL, ("no emuldata after proc_init()!\n")); /* and adjust it */ if (args->flags & CLONE_PARENT_SETTID) { if (args->parent_tidptr == NULL) { From owner-p4-projects@FreeBSD.ORG Wed Aug 9 16:10:29 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 A58B816A4E7; Wed, 9 Aug 2006 16:10:29 +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 4CDA416A4E6 for ; Wed, 9 Aug 2006 16:10:29 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0415743D6E for ; Wed, 9 Aug 2006 16:10:27 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.199] ([10.0.0.199]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k79GAFVK074798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Aug 2006 09:10:15 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <44DA08E7.1080008@errno.com> Date: Wed, 09 Aug 2006 09:10:15 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: Hans Petter Selasky References: <200608061822.k76IMif7005363@repoman.freebsd.org> <20060809.001219.-1303465484.imp@bsdimp.com> <200608091008.13203.hselasky@c2i.net> In-Reply-To: <200608091008.13203.hselasky@c2i.net> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: perforce@freebsd.org, "M. Warner Losh" Subject: Re: PERFORCE change 103353 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: Wed, 09 Aug 2006 16:10:29 -0000 Hans Petter Selasky wrote: > On Wednesday 09 August 2006 08:12, M. Warner Losh wrote: >> In message: <200608061822.k76IMif7005363@repoman.freebsd.org> >> >> Hans Petter Selasky writes: >> : + * Copyright (c) 2006 Hans Petter Selasky >> : + * All rights reserved. >> : + * >> >> Usually copyrights are added only in cases where a significant amount >> of work has happend. While what you've done is interesting here, it >> likely falls short of the legal test necessary. >> > > Ok, so should I remove it? If you look at the diff between version 1 and the > latest, you will see significant changes. This is a grey area. If you believe you made significant changes to the code then keep your copyright. Sam From owner-p4-projects@FreeBSD.ORG Wed Aug 9 16:34:05 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 0960316A4E7; Wed, 9 Aug 2006 16:34:05 +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 D8BDC16A4E0 for ; Wed, 9 Aug 2006 16:34:04 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8574143D49 for ; Wed, 9 Aug 2006 16:34:04 +0000 (GMT) (envelope-from bushman@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 k79GY4lF069470 for ; Wed, 9 Aug 2006 16:34:04 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79GY4Jv069467 for perforce@freebsd.org; Wed, 9 Aug 2006 16:34:04 GMT (envelope-from bushman@freebsd.org) Date: Wed, 9 Aug 2006 16:34:04 GMT Message-Id: <200608091634.k79GY4Jv069467@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 103514 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: Wed, 09 Aug 2006 16:34:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=103514 Change 103514 by bushman@bushman_nss_ldap_cached on 2006/08/09 16:33:48 Possible memory errors in usr.sbin/cached are now properly handled. No more asserts after mallocs, asprintfs, vasprintfs and strdups. Some minor memory error handling issues fixed. Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agent.c#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agent.h#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/group.c#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/hosts.c#3 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/net.c#3 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/passwd.c#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/proto.c#3 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/rpc.c#3 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/services.c#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachedcli.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachelib.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cacheplcs.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.h#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/hashtable.h#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/log.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/log.h#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_rs_query.c#3 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_ws_query.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/parser.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.c#3 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agent.c#4 (text) ==== @@ -109,14 +109,17 @@ TRACE_IN(init_agent_table); retval = (struct agent_table *)malloc(sizeof(struct agent_table)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_agent_table); + return (NULL); + } memset(retval, 0, sizeof(struct agent_table)); TRACE_OUT(init_agent_table); return (retval); } -void +int register_agent(struct agent_table *at, struct agent *a) { struct agent **new_agents; @@ -124,11 +127,20 @@ TRACE_IN(register_agent); assert(at != NULL); - assert(a != NULL); + + if (a == NULL) { + TRACE_OUT(register_agent); + return (-1); + } + new_agents_num = at->agents_num + 1; new_agents = (struct agent **)malloc(sizeof(struct agent *) * new_agents_num); - assert(new_agents != NULL); + if (new_agents == NULL) { + TRACE_OUT(register_agent); + return (-1); + } + memcpy(new_agents, at->agents, at->agents_num * sizeof(struct agent *)); new_agents[new_agents_num - 1] = a; qsort(new_agents, new_agents_num, sizeof(struct agent *), @@ -138,6 +150,8 @@ at->agents = new_agents; at->agents_num = new_agents_num; TRACE_OUT(register_agent); + + return (0); } struct agent * ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agent.h#4 (text) ==== @@ -158,7 +158,7 @@ extern int agent_marshal_results(char **, size_t *, agent_marshal_func, void *, void *, ...); extern struct agent_table *init_agent_table(); -extern void register_agent(struct agent_table *, struct agent *); +extern int register_agent(struct agent_table *, struct agent *); extern struct agent *find_agent(struct agent_table *, const char *, enum agent_type); extern void destroy_agent_table(struct agent_table *); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/group.c#4 (text) ==== @@ -188,7 +188,10 @@ case nss_lt_name: size = key_size - sizeof(enum nss_lookup_type) + 1; name = (char *)malloc(size); - assert(name != NULL); + if (name == NULL) { + TRACE_OUT(group_lookup_func); + return (NS_UNAVAIL); + } memset(name, 0, size); memcpy(name, key + sizeof(enum nss_lookup_type), size - 1); break; @@ -330,11 +333,18 @@ TRACE_IN(init_group_agent); retval = (struct common_agent *)malloc(sizeof(struct common_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_group_agent); + return (NULL); + } memset(retval, 0, sizeof(struct common_agent)); retval->parent.name = strdup("group"); - assert(retval->parent.name != NULL); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_group_agent); + return (NULL); + } retval->parent.type = COMMON_AGENT; retval->lookup_func = group_lookup_func; @@ -351,15 +361,22 @@ TRACE_IN(init_group_mp_agent); retval = (struct multipart_agent *)malloc( sizeof(struct multipart_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_group_mp_agent); + return (NULL); + } memset(retval, 0, sizeof(struct multipart_agent)); retval->parent.name = strdup("group"); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_group_mp_agent); + return (NULL); + } retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = group_mp_init_func; retval->mp_lookup_func = group_mp_lookup_func; - retval->mp_destroy_func = group_mp_destroy_func; - assert(retval->parent.name != NULL); + retval->mp_destroy_func = group_mp_destroy_func; TRACE_OUT(init_group_mp_agent); return ((struct agent *)retval); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/hosts.c#3 (text+ko) ==== @@ -302,7 +302,10 @@ size = key_size + 1; str = (char *)malloc(size); - assert(str != NULL); + if (str == NULL) { + TRACE_OUT(hosts_lookup_func); + return (NS_UNAVAIL); + } memset(str, 0, size); memcpy(str, key, key_size); @@ -336,7 +339,10 @@ case nss_lt_name: size = key_size + 1; str = (char *)malloc(size); - assert(str != NULL); + if (str == NULL) { + TRACE_OUT(hosts_lookup_func); + return (NS_UNAVAIL); + } memset(str, 0, size); memcpy(str, key, key_size); break; @@ -440,11 +446,18 @@ TRACE_IN(init_hosts_agent); retval = (struct common_agent *)malloc(sizeof(struct common_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_hosts_agent); + return (NULL); + } memset(retval, 0, sizeof(struct common_agent)); retval->parent.name = strdup("hosts"); - assert(retval->parent.name != NULL); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_hosts_agent); + return (NULL); + } retval->parent.type = COMMON_AGENT; retval->lookup_func = hosts_lookup_func; ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/net.c#3 (text+ko) ==== @@ -184,7 +184,10 @@ case nss_lt_name: size = key_size - sizeof(enum nss_lookup_type) + 1; name = (char *)malloc(size); - assert(name != NULL); + if (name == NULL) { + TRACE_OUT(networks_lookup_func); + return (NS_UNAVAIL); + } memset(name, 0, size); memcpy(name, key + sizeof(enum nss_lookup_type), size - 1); break; @@ -274,11 +277,18 @@ TRACE_IN(init_networks_agent); retval = (struct common_agent *)malloc(sizeof(struct common_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_networks_agent); + return (NULL); + } memset(retval, 0, sizeof(struct common_agent)); retval->parent.name = strdup("networks"); - assert(retval->parent.name != NULL); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_networks_agent); + return (NULL); + } retval->parent.type = COMMON_AGENT; retval->lookup_func = networks_lookup_func; ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/passwd.c#4 (text) ==== @@ -187,7 +187,10 @@ case nss_lt_name: size = key_size - sizeof(enum nss_lookup_type) + 1; login = (char *)malloc(size); - assert(login != NULL); + if (login == NULL) { + TRACE_OUT(passwd_lookup_func); + return (NS_UNAVAIL); + } memset(login, 0, size); memcpy(login, key + sizeof(enum nss_lookup_type), size - 1); break; @@ -329,11 +332,18 @@ TRACE_IN(init_passwd_agent); retval = (struct common_agent *)malloc(sizeof(struct common_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_passwd_agent); + return (NULL); + } memset(retval, 0, sizeof(struct common_agent)); retval->parent.name = strdup("passwd"); - assert(retval->parent.name != NULL); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_passwd_agent); + return (NULL); + } retval->parent.type = COMMON_AGENT; retval->lookup_func = passwd_lookup_func; @@ -350,15 +360,22 @@ TRACE_IN(init_passwd_mp_agent); retval = (struct multipart_agent *)malloc( sizeof(struct multipart_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_passwd_mp_agent); + return (NULL); + } memset(retval, 0, sizeof(struct multipart_agent)); retval->parent.name = strdup("passwd"); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_passwd_mp_agent); + return (NULL); + } retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = passwd_mp_init_func; retval->mp_lookup_func = passwd_mp_lookup_func; - retval->mp_destroy_func = passwd_mp_destroy_func; - assert(retval->parent.name != NULL); + retval->mp_destroy_func = passwd_mp_destroy_func; TRACE_OUT(init_passwd_mp_agent); return ((struct agent *)retval); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/proto.c#3 (text+ko) ==== @@ -180,7 +180,10 @@ case nss_lt_name: size = key_size - sizeof(enum nss_lookup_type) + 1; name = (char *)malloc(size); - assert(name != NULL); + if (name == NULL) { + TRACE_OUT(protocols_lookup_func); + return (NS_UNAVAIL); + } memset(name, 0, size); memcpy(name, key + sizeof(enum nss_lookup_type), size - 1); break; @@ -326,11 +329,18 @@ TRACE_IN(init_protocols_agent); retval = (struct common_agent *)malloc(sizeof(struct common_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_protocols_agent); + return (NULL); + } memset(retval, 0, sizeof(struct common_agent)); retval->parent.name = strdup("protocols"); - assert(retval->parent.name != NULL); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_protocols_agent); + return (NULL); + } retval->parent.type = COMMON_AGENT; retval->lookup_func = protocols_lookup_func; @@ -347,15 +357,22 @@ TRACE_IN(init_protocols_mp_agent); retval = (struct multipart_agent *)malloc( sizeof(struct multipart_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_protocols_mp_agent); + return (NULL); + } memset(retval, 0, sizeof(struct multipart_agent)); retval->parent.name = strdup("protocols"); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_protocols_mp_agent); + return (NULL); + } retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = protocols_mp_init_func; retval->mp_lookup_func = protocols_mp_lookup_func; - retval->mp_destroy_func = protocols_mp_destroy_func; - assert(retval->parent.name != NULL); + retval->mp_destroy_func = protocols_mp_destroy_func; TRACE_OUT(init_protocols_mp_agent); return ((struct agent *)retval); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/rpc.c#3 (text+ko) ==== @@ -176,7 +176,10 @@ case nss_lt_name: size = key_size - sizeof(enum nss_lookup_type) + 1; name = (char *)malloc(size); - assert(name != NULL); + if (name == NULL) { + TRACE_OUT(rpc_lookup_func); + return (NS_UNAVAIL); + } memset(name, 0, size); memcpy(name, key + sizeof(enum nss_lookup_type), size - 1); break; @@ -322,11 +325,18 @@ TRACE_IN(init_rpc_agent); retval = (struct common_agent *)malloc(sizeof(struct common_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_rpc_agent); + return (NULL); + } memset(retval, 0, sizeof(struct common_agent)); retval->parent.name = strdup("rpc"); - assert(retval->parent.name != NULL); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_rpc_agent); + return (NULL); + } retval->parent.type = COMMON_AGENT; retval->lookup_func = rpc_lookup_func; @@ -343,15 +353,22 @@ TRACE_IN(init_rpc_mp_agent); retval = (struct multipart_agent *)malloc( sizeof(struct multipart_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_rpc_mp_agent); + return (NULL); + } memset(retval, 0, sizeof(struct multipart_agent)); retval->parent.name = strdup("rpc"); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_rpc_mp_agent); + return (NULL); + } retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = rpc_mp_init_func; retval->mp_lookup_func = rpc_mp_lookup_func; - retval->mp_destroy_func = rpc_mp_destroy_func; - assert(retval->parent.name != NULL); + retval->mp_destroy_func = rpc_mp_destroy_func; TRACE_OUT(init_rpc_mp_agent); return ((struct agent *)retval); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/services.c#4 (text) ==== @@ -185,7 +185,10 @@ switch (lookup_type) { size = key_size - sizeof(enum nss_lookup_type); name = (char *)malloc(size + 1); - assert(name != NULL); + if (name == NULL) { + result = NS_UNAVAIL; + goto fin; + } memset(name, 0, size + 1); memcpy(name, key + sizeof(enum nss_lookup_type), size); @@ -209,7 +212,10 @@ size = key_size - sizeof(enum nss_lookup_type) - sizeof(int); if (size > 0) { proto = (char *)malloc(size + 1); - assert(proto != NULL); + if (proto == NULL) { + result = NS_UNAVAIL; + goto fin; + } memset(proto, size + 1, 0); memcpy(proto, key + sizeof(enum nss_lookup_type) + sizeof(int), size); @@ -347,11 +353,18 @@ TRACE_IN(init_services_agent); retval = (struct common_agent *)malloc(sizeof(struct common_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_services_agent); + return (NULL); + } memset(retval, 0, sizeof(struct common_agent)); retval->parent.name = strdup("services"); - assert(retval->parent.name != NULL); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_services_agent); + return (NULL); + } retval->parent.type = COMMON_AGENT; retval->lookup_func = services_lookup_func; @@ -368,15 +381,22 @@ TRACE_IN(init_services_mp_agent); retval = (struct multipart_agent *)malloc( sizeof(struct multipart_agent)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_services_mp_agent); + return (NULL); + } memset(retval, 0, sizeof(struct multipart_agent)); retval->parent.name = strdup("services"); + if (retval->parent.name == NULL) { + free(retval); + TRACE_OUT(init_services_mp_agent); + return (NULL); + } retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = services_mp_init_func; retval->mp_lookup_func = services_mp_lookup_func; retval->mp_destroy_func = services_mp_destroy_func; - assert(retval->parent.name != NULL); TRACE_OUT(init_services_mp_agent); return ((struct agent *)retval); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#4 (text) ==== @@ -135,6 +135,9 @@ */ res = register_cache_entry(retval, (struct cache_entry_params *) &config_entry->positive_cache_params); + if (res != 0) + break; + config_entry->positive_cache_entry = find_cache_entry(retval, config_entry->positive_cache_params.entry_name); assert(config_entry->positive_cache_entry != @@ -142,6 +145,9 @@ res = register_cache_entry(retval, (struct cache_entry_params *) &config_entry->negative_cache_params); + if (res != 0) + break; + config_entry->negative_cache_entry = find_cache_entry(retval, config_entry->negative_cache_params.entry_name); assert(config_entry->negative_cache_entry != @@ -178,7 +184,10 @@ TRACE_IN(init_runtime_env); retval = (struct runtime_env *)malloc(sizeof(struct runtime_env)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_runtime_env); + return (NULL); + } memset(retval, 0, sizeof(struct runtime_env)); retval->sockfd = socket(PF_LOCAL, SOCK_STREAM, 0); @@ -215,7 +224,12 @@ fcntl(retval->sockfd, F_SETFL, O_NONBLOCK); retval->queue = kqueue(); - assert(retval->queue != -1); + if (retval->queue == -1) { + close(retval->sockfd); + free(retval); + TRACE_OUT(init_runtime_env); + return (NULL); + } EV_SET(&eventlist, retval->sockfd, EVFILT_READ, EV_ADD | EV_ONESHOT, 0, 0, 0); @@ -424,7 +438,12 @@ qstate->io_buffer = (char *)malloc( qstate->kevent_watermark); - assert(qstate->io_buffer != NULL); + if (qstate->io_buffer == NULL) { + destroy_query_state(qstate); + close(event_data->ident); + TRACE_OUT(process_socket_event); + return; + } memset(qstate->io_buffer, 0, qstate->kevent_watermark); qstate->io_buffer_p = qstate->io_buffer; @@ -653,15 +672,25 @@ case 'i': clear_user_cache_entries = 1; if (optarg != NULL) - if (strcmp(optarg, "all") != 0) + if (strcmp(optarg, "all") != 0) { user_config_entry_name = strdup(optarg); + if (user_config_entry_name == NULL) { + LOG_ERR_1("main", + "not enough memory"); + return (-1); + } + } break; case 'I': clear_all_cache_entries = 1; if (optarg != NULL) - if (strcmp(optarg, "all") != 0) - global_config_entry_name = - strdup(optarg); + if (strcmp(optarg, "all") != 0) { + global_config_entry_name = strdup(optarg); + if (global_config_entry_name == NULL) { + LOG_ERR_1("main", "not enough memory"); + return (-1); + } + } break; case 'd': show_statistics = 1; @@ -780,31 +809,42 @@ pidfile_write(pidfile); s_agent_table = init_agent_table(); - register_agent(s_agent_table, init_passwd_agent()); - register_agent(s_agent_table, init_passwd_mp_agent()); - register_agent(s_agent_table, init_group_agent()); - register_agent(s_agent_table, init_group_mp_agent()); - register_agent(s_agent_table, init_hosts_agent()); - register_agent(s_agent_table, init_networks_agent()); - register_agent(s_agent_table, init_services_agent()); - register_agent(s_agent_table, init_services_mp_agent()); - register_agent(s_agent_table, init_protocols_agent()); - register_agent(s_agent_table, init_protocols_mp_agent()); - register_agent(s_agent_table, init_rpc_agent()); - register_agent(s_agent_table, init_rpc_mp_agent()); + if (s_agent_table == NULL) { + LOG_ERR_1("main", "not enough memory"); + return (-1); + } + + res = register_agent(s_agent_table, init_passwd_agent()); + res |= register_agent(s_agent_table, init_passwd_mp_agent()); + res |= register_agent(s_agent_table, init_group_agent()); + res |= register_agent(s_agent_table, init_group_mp_agent()); + res |= register_agent(s_agent_table, init_hosts_agent()); + res |= register_agent(s_agent_table, init_networks_agent()); + res |= register_agent(s_agent_table, init_services_agent()); + res |= register_agent(s_agent_table, init_services_mp_agent()); + res |= register_agent(s_agent_table, init_protocols_agent()); + res |= register_agent(s_agent_table, init_protocols_mp_agent()); + res |= register_agent(s_agent_table, init_rpc_agent()); + res |= register_agent(s_agent_table, init_rpc_mp_agent()); + if (res != 0) { + LOG_ERR_1("main", "request agetns registration failed: " + "not enough memory"); + return (-1); + } LOG_MSG_1("main", "request agents registered successfully"); - /* - * Hosts agent can't work properly until we have access to the - * appropriate dtab structures, which are used in nsdispatch - * calls - * - register_agent(s_agent_table, init_hosts_agent()); - */ - /* configuration initialization */ s_configuration = init_configuration(); - fill_configuration_defaults(s_configuration); + if (s_configuration == NULL) { + LOG_ERR_1("main", "not enough memory"); + return (-1); + } + res = fill_configuration_defaults(s_configuration); + if (res != 0) { + LOG_ERR_1("main", "can't allocate configuration defaults"); + destroy_configuration(s_configuration); + return (-1); + } error_str = NULL; error_line = 0; @@ -854,11 +894,22 @@ if (s_configuration->threads_num > 1) { threads = (pthread_t *)malloc(sizeof(pthread_t) * s_configuration->threads_num); + if (threads == NULL) { + LOG_ERR_1("main", "can't allocate memory for threads"); + destroy_configuration(s_configuration); + destroy_cache_(s_cache); + return (-1); + } memset(threads, 0, sizeof(pthread_t) * s_configuration->threads_num); for (i = 0; i < s_configuration->threads_num; ++i) { thread_args = (struct processing_thread_args *)malloc( sizeof(struct processing_thread_args)); + if (thread_args == NULL) { + LOG_ERR_1("main", "can't allocate memory for" + " thread args for thread #%d", i); + continue; + } thread_args->the_cache = s_cache; thread_args->the_runtime_env = s_runtime_env; thread_args->the_configuration = s_configuration; @@ -871,8 +922,10 @@ thread_args = NULL; } - for (i = 0; i < s_configuration->threads_num; ++i) - pthread_join(threads[i], NULL); + for (i = 0; i < s_configuration->threads_num; ++i) { + if (threads[i] != NULL) + pthread_join(threads[i], NULL); + } } else { LOG_MSG_1("main", "working in single-threaded mode"); processing_loop(s_cache, s_runtime_env, s_configuration); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachedcli.c#2 (text) ==== @@ -202,20 +202,34 @@ fcntl(client_socket, F_SETFL, O_NONBLOCK); retval = malloc(sizeof(struct cached_connection_)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(open_cached_connection); + return (NULL); + } memset(retval, 0, sizeof(struct cached_connection_)); retval->sockfd = client_socket; retval->write_queue = kqueue(); - assert(retval->write_queue != -1); + if (retval->write_queue == -1) { + close(retval->sockfd); + free(retval); + TRACE_OUT(open_cached_connection); + return (NULL); + } EV_SET(&eventlist, retval->sockfd, EVFILT_WRITE, EV_ADD, 0, 0, NULL); res = kevent(retval->write_queue, &eventlist, 1, NULL, 0, NULL); retval->read_queue = kqueue(); - assert(retval->read_queue != -1); + if (retval->read_queue != -1) { + close(retval->write_queue); + close(retval->sockfd); + free(retval); + TRACE_OUT(open_cached_connection); + return (NULL); + } EV_SET(&eventlist, retval->sockfd, EVFILT_READ, EV_ADD, 0, 0, NULL); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachelib.c#2 (text) ==== @@ -480,7 +480,10 @@ assert(params != NULL); retval = (struct cache_ *)malloc(sizeof(struct cache_)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(init_cache); + return (NULL); + } memset(retval, 0, sizeof(struct cache_)); assert(params != NULL); @@ -488,7 +491,11 @@ retval->entries = (struct cache_entry_ **)malloc( sizeof(struct cache_entry_ *) * INITIAL_ENTRIES_CAPACITY); - assert(retval->entries != NULL); + if (retval->entries == NULL) { + free(retval); + TRACE_OUT(init_cache); + return (NULL); + } memset(retval->entries, 0, sizeof(sizeof(struct cache_entry_ *) * INITIAL_ENTRIES_CAPACITY)); @@ -543,7 +550,10 @@ ENTRIES_CAPACITY_STEP; new_entries = (struct cache_entry_ **)malloc( sizeof(struct cache_entry_ *) * new_capacity); - assert(new_entries != NULL); + if (new_entries == NULL) { + TRACE_OUT(register_cache_entry); + return (-1); + } memset(new_entries, 0, sizeof(struct cache_entry_ *) * new_capacity); @@ -561,7 +571,10 @@ case CET_COMMON: new_common_entry = (struct cache_common_entry_ *)malloc( sizeof(struct cache_common_entry_)); - assert(new_common_entry != NULL); + if (new_common_entry == NULL) { + TRACE_OUT(register_cache_entry); + return (-1); + } memset(new_common_entry, 0, sizeof(struct cache_common_entry_)); memcpy(&new_common_entry->common_params, params, @@ -570,8 +583,12 @@ (struct cache_entry_params *)&new_common_entry->common_params; new_common_entry->common_params.entry_name = (char *)malloc( - entry_name_size+1); - assert(new_common_entry->common_params.entry_name != NULL); + entry_name_size + 1); + if (new_common_entry->common_params.entry_name == NULL) { + free(new_common_entry); + TRACE_OUT(register_cache_entry); + return (-1); + } memset(new_common_entry->common_params.entry_name, 0, entry_name_size + 1); strncpy(new_common_entry->common_params.entry_name, @@ -582,6 +599,13 @@ HASHTABLE_INIT(&(new_common_entry->items), struct cache_ht_item_data_, data, new_common_entry->common_params.cache_entries_size); + + if (!HASHTABLE_OK(&(new_common_entry->items))) { + free(new_common_entry->common_params.entry_name); + free(new_common_entry); + TRACE_OUT(register_cache_entry); + return (-1); + } if (new_common_entry->common_params.policy == CPT_FIFO) policies_size = 1; @@ -590,27 +614,52 @@ new_common_entry->policies = (struct cache_policy_ **)malloc( sizeof(struct cache_policy_ *) * policies_size); - assert(new_common_entry->policies != NULL); + if (new_common_entry->policies == NULL) { + HASHTABLE_DESTROY(&(new_common_entry->items), data); + free(new_common_entry->common_params.entry_name); + free(new_common_entry); + TRACE_OUT(register_cache_entry); + return (-1); + } memset(new_common_entry->policies, 0, sizeof(struct cache_policy_ *) * policies_size); new_common_entry->policies_size = policies_size; new_common_entry->policies[0] = init_cache_fifo_policy(); - if (policies_size > 1) { + if ((policies_size > 1) && + (new_common_entry->policies[0] != NULL)) { switch (new_common_entry->common_params.policy) { case CPT_LRU: new_common_entry->policies[1] = init_cache_lru_policy(); + if (new_common_entry->policies[1] == NULL) { + destroy_cache_fifo_policy( + new_common_entry->policies[0]); + new_common_entry->policies[0] = NULL; + } break; case CPT_LFU: new_common_entry->policies[1] = init_cache_lfu_policy(); + if (new_common_entry->policies[1] == NULL) { + destroy_cache_fifo_policy( + new_common_entry->policies[0]); + new_common_entry->policies[0] = NULL; + } break; default: break; } } + + if (new_common_entry->policies[0] == NULL) { + HASHTABLE_DESTROY(&(new_common_entry->items), data); + free(new_common_entry->common_params.entry_name); + free(new_common_entry); + TRACE_OUT(register_cache_entry); + return (-1); + } new_common_entry->get_time_func = the_cache->params.get_time_func; @@ -620,7 +669,10 @@ case CET_MULTIPART: new_mp_entry = (struct cache_mp_entry_ *)malloc( sizeof(struct cache_mp_entry_)); - assert(new_mp_entry != NULL); + if (new_mp_entry == NULL) { + TRACE_OUT(register_cache_entry); + return (-1); + } memset(new_mp_entry, 0, sizeof(struct cache_mp_entry_)); memcpy(&new_mp_entry->mp_params, params, @@ -629,8 +681,12 @@ (struct cache_entry_params *)&new_mp_entry->mp_params; new_mp_entry->mp_params.entry_name = (char *)malloc( - entry_name_size+1); - assert(new_mp_entry->mp_params.entry_name != NULL); + entry_name_size + 1); + if (new_mp_entry->mp_params.entry_name == NULL) { + free(new_mp_entry); + TRACE_OUT(register_cache_entry); + return (-1); + } memset(new_mp_entry->mp_params.entry_name, 0, entry_name_size + 1); strncpy(new_mp_entry->mp_params.entry_name, params->entry_name, @@ -844,15 +900,29 @@ } item_data.key = (char *)malloc(key_size); + if (item_data.key == NULL) { + TRACE_OUT(cache_write); + return (-1); + } memcpy(item_data.key, key, key_size); item_data.value = (char *)malloc(value_size); - assert(item_data.value != NULL); + if (item_data.value == NULL) { + free(item_data.key); + TRACE_OUT(cache_write); + return (-1); + } memcpy(item_data.value, value, value_size); item_data.value_size = value_size; policy_item = common_entry->policies[0]->create_item_func(); + if (policy_item == NULL) { + free(item_data.key); + free(item_data.value); + TRACE_OUT(cache_write); + return (-1); + } policy_item->key = item_data.key; policy_item->key_size = item_data.key_size; common_entry->get_time_func(&policy_item->creation_time); @@ -860,6 +930,14 @@ if (common_entry->policies_size > 1) { connected_policy_item = common_entry->policies[1]->create_item_func(); + if (connected_policy_item == NULL) { + common_entry->policies[0]->destroy_item_func( + policy_item); + free(item_data.key); + free(item_data.value); + TRACE_OUT(cache_write); + return (-1); + } memcpy(&connected_policy_item->creation_time, &policy_item->creation_time, sizeof(struct timeval)); @@ -927,7 +1005,10 @@ retval = (struct cache_mp_write_session_ *)malloc( sizeof(struct cache_mp_write_session_)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(open_cache_mp_write_session); + return (NULL); + } memset(retval, 0, sizeof(struct cache_mp_write_session_)); TAILQ_INIT(&retval->items); @@ -963,11 +1044,18 @@ new_item = (struct cache_mp_data_item_ *)malloc( sizeof(struct cache_mp_data_item_)); - assert(new_item != NULL); + if (new_item == NULL) { + TRACE_OUT(cache_mp_write); + return (-1); + } memset(new_item, 0, sizeof(struct cache_mp_data_item_)); new_item->value = (char *)malloc(data_size); - assert(new_item->value != NULL); + if (new_item->value == NULL) { + free(new_item); + TRACE_OUT(cache_mp_write); + return (-1); + } memcpy(new_item->value, data, data_size); new_item->value_size = data_size; @@ -1067,7 +1155,10 @@ retval = (struct cache_mp_read_session_ *)malloc( sizeof(struct cache_mp_read_session_)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(open_cache_mp_read_session); + return (NULL); + } memset(retval, 0, sizeof(struct cache_mp_read_session_)); retval->parent_entry = mp_entry; ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cacheplcs.c#2 (text) ==== @@ -84,7 +84,10 @@ TRACE_IN(cache_queue_policy_create_item); retval = (struct cache_queue_policy_item_ *)malloc( sizeof(struct cache_queue_policy_item_)); - assert(retval != NULL); + if (retval == NULL) { + TRACE_OUT(cache_queue_policy_create_item); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Aug 9 17:08:40 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 E807B16A4E5; Wed, 9 Aug 2006 17:08:39 +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 8133E16A4DF for ; Wed, 9 Aug 2006 17:08:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id DABDD43D4C for ; Wed, 9 Aug 2006 17:08:38 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k79H69sJ032738; Wed, 9 Aug 2006 11:06:09 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 09 Aug 2006 11:06:15 -0600 (MDT) Message-Id: <20060809.110615.-1540391747.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200608091008.13203.hselasky@c2i.net> References: <200608061822.k76IMif7005363@repoman.freebsd.org> <20060809.001219.-1303465484.imp@bsdimp.com> <200608091008.13203.hselasky@c2i.net> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 09 Aug 2006 11:06:10 -0600 (MDT) Cc: perforce@freebsd.org Subject: Re: PERFORCE change 103353 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: Wed, 09 Aug 2006 17:08:40 -0000 In message: <200608091008.13203.hselasky@c2i.net> Hans Petter Selasky writes: : On Wednesday 09 August 2006 08:12, M. Warner Losh wrote: : > In message: <200608061822.k76IMif7005363@repoman.freebsd.org> : > : > Hans Petter Selasky writes: : > : + * Copyright (c) 2006 Hans Petter Selasky : > : + * All rights reserved. : > : + * : > : > Usually copyrights are added only in cases where a significant amount : > of work has happend. While what you've done is interesting here, it : > likely falls short of the legal test necessary. : > : : Ok, so should I remove it? If you look at the diff between version 1 and the : latest, you will see significant changes. I'll let you be the judge, but usually 20% or more changes is the rule of thumb that we've generally used. Warner From owner-p4-projects@FreeBSD.ORG Wed Aug 9 17:17:00 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 1B95016A4E0; Wed, 9 Aug 2006 17:17:00 +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 D38DF16A4DD for ; Wed, 9 Aug 2006 17:16:59 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4626B43D5D for ; Wed, 9 Aug 2006 17:16:59 +0000 (GMT) (envelope-from bushman@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 k79HGwNo080599 for ; Wed, 9 Aug 2006 17:16:59 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79HGw9Y080596 for perforce@freebsd.org; Wed, 9 Aug 2006 17:16:58 GMT (envelope-from bushman@freebsd.org) Date: Wed, 9 Aug 2006 17:16:58 GMT Message-Id: <200608091716.k79HGw9Y080596@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 103515 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: Wed, 09 Aug 2006 17:17:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=103515 Change 103515 by bushman@bushman_nss_ldap_cached on 2006/08/09 17:16:25 Some memory errors handling issues fixed. Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nscache.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nscachedcli.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nsdispatch.c#6 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nscache.c#2 (text) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 Michael Bushkov + * Copyright (c) 2005 Michael Bushkov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -71,6 +71,10 @@ params.socket_path = CACHED_SOCKET_PATH; cache_data->key = (char *)malloc(NSS_CACHE_KEY_INITIAL_SIZE); + if (cache_data->key == NULL) { + cache_data->key_size = 0; + return (NS_UNAVAIL); + } memset(cache_data->key, 0, NSS_CACHE_KEY_INITIAL_SIZE); cache_data->key_size = NSS_CACHE_KEY_INITIAL_SIZE; va_copy(ap_new, ap); @@ -85,8 +89,12 @@ break; cache_data->key_size <<= 1; - cache_data->key = realloc(cache_data->key, + cache_data->key = reallocf(cache_data->key, cache_data->key_size); + if (cache_data->key == NULL) { + res = NS_UNAVAIL; + break; + } memset(cache_data->key, 0, cache_data->key_size); va_copy(ap_new, ap); } @@ -102,6 +110,8 @@ buffer_size = NSS_CACHE_BUFFER_INITIAL_SIZE; buffer = (char *)malloc(NSS_CACHE_BUFFER_INITIAL_SIZE); + if (buffer == NULL) + return (NS_UNAVAIL); memset(buffer, 0, NSS_CACHE_BUFFER_INITIAL_SIZE); do { @@ -115,7 +125,9 @@ &buffer_size); __close_cached_connection(connection); if (res == -2 && buffer_size < NSS_CACHE_BUFFER_SIZE_LIMIT) { - buffer = (char *)realloc(buffer, buffer_size); + buffer = (char *)reallocf(buffer, buffer_size); + if (buffer == NULL) + return (NS_UNAVAIL); memset(buffer, 0, buffer_size); } } while (res == -2); @@ -185,6 +197,11 @@ buffer_size = NSS_CACHE_BUFFER_INITIAL_SIZE; buffer = (char *)malloc(NSS_CACHE_BUFFER_INITIAL_SIZE); + if (buffer == NULL) { + __close_cached_connection(connection); + free(cache_data->key); + return (NS_UNAVAIL); + } memset(buffer, 0, NSS_CACHE_BUFFER_INITIAL_SIZE); do { @@ -201,7 +218,11 @@ break; buffer_size <<= 1; - buffer = (char *)realloc(buffer, buffer_size); + buffer = (char *)reallocf(buffer, buffer_size); + if (buffer == NULL) { + res = NS_UNAVAIL; + break; + } memset(buffer, 0, buffer_size); } } while (res == NS_RETURN); @@ -291,12 +312,22 @@ buffer_size = NSS_CACHE_BUFFER_INITIAL_SIZE; buffer = (char *)malloc(NSS_CACHE_BUFFER_INITIAL_SIZE); + if (buffer == NULL) { + __close_cached_mp_read_session(rs); + rs = INVALID_CACHED_MP_READ_SESSION; + cache_info->set_mp_rs_func(rs); + return (NS_UNAVAIL); + } memset(buffer, 0, NSS_CACHE_BUFFER_INITIAL_SIZE); do { res = __cached_mp_read(rs, buffer, &buffer_size); if (res == -2 && buffer_size < NSS_CACHE_BUFFER_SIZE_LIMIT) { - buffer = (char *)realloc(buffer, buffer_size); + buffer = (char *)reallocf(buffer, buffer_size); + if (buffer == NULL) { + res = -1; + break; + } memset(buffer, 0, buffer_size); } } while (res == -2); @@ -341,6 +372,12 @@ cache_data = (nss_cache_data *)mdata; cache_info = cache_data->info; + buffer_size = NSS_CACHE_BUFFER_INITIAL_SIZE; + buffer = (char *)malloc(NSS_CACHE_BUFFER_INITIAL_SIZE); + if (buffer == NULL) + return (NS_UNAVAIL); + memset(buffer, 0, NSS_CACHE_BUFFER_INITIAL_SIZE); + ws = cache_info->get_mp_ws_func(); if (ws == INVALID_CACHED_MP_WRITE_SESSION) { memset(¶ms, 0, sizeof(struct cached_connection_params)); @@ -354,10 +391,6 @@ cache_info->set_mp_ws_func(ws); } - buffer_size = NSS_CACHE_BUFFER_INITIAL_SIZE; - buffer = (char *)malloc(NSS_CACHE_BUFFER_INITIAL_SIZE); - memset(buffer, 0, NSS_CACHE_BUFFER_INITIAL_SIZE); - do { size_t size; @@ -372,7 +405,11 @@ break; buffer_size <<= 1; - buffer = (char *)realloc(buffer, buffer_size); + buffer = (char *)reallocf(buffer, buffer_size); + if (buffer == NULL) { + res = NS_UNAVAIL; + break; + } memset(buffer, 0, buffer_size); } } while (res == NS_RETURN); ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nscachedcli.c#2 (text) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 Michael Bushkov + * Copyright (c) 2005 Michael Bushkov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -215,19 +215,31 @@ _fcntl(client_socket, F_SETFL, O_NONBLOCK); retval = malloc(sizeof(struct cached_connection_)); - assert(retval != NULL); + if (retval == NULL) { + _close(client_socket); + return (NULL); + } memset(retval, 0, sizeof(struct cached_connection_)); retval->sockfd = client_socket; retval->write_queue = kqueue(); - assert(retval->write_queue != -1); + if (retval->write_queue == -1) { + _close(client_socket); + free(retval); + return (NULL); + } EV_SET(&eventlist, retval->sockfd, EVFILT_WRITE, EV_ADD, 0, 0, NULL); res = kevent(retval->write_queue, &eventlist, 1, NULL, 0, NULL); retval->read_queue = kqueue(); - assert(retval->read_queue != -1); + if (retval->read_queue == -1) { + _close(client_socket); + _close(retval->write_queue); + free(retval); + return (NULL); + } EV_SET(&eventlist, retval->sockfd, EVFILT_READ, EV_ADD, 0, 0, NULL); res = kevent(retval->read_queue, &eventlist, 1, NULL, 0, NULL); ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nsdispatch.c#6 (text+ko) ==== @@ -707,7 +707,8 @@ __nss_common_cache_write_negative(cache_data_p); } va_end(ap); - } + } else if (cache_data_p != NULL) + free(cache_data.key); #endif /* NS_CACHING */ if (isthreaded) From owner-p4-projects@FreeBSD.ORG Wed Aug 9 17:29:16 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 290C916A4E2; Wed, 9 Aug 2006 17:29:16 +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 01AD016A4DE for ; Wed, 9 Aug 2006 17:29:16 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 489B443D46 for ; Wed, 9 Aug 2006 17:29:15 +0000 (GMT) (envelope-from bushman@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 k79HTFK4081217 for ; Wed, 9 Aug 2006 17:29:15 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79HTETh081214 for perforce@freebsd.org; Wed, 9 Aug 2006 17:29:14 GMT (envelope-from bushman@freebsd.org) Date: Wed, 9 Aug 2006 17:29:14 GMT Message-Id: <200608091729.k79HTETh081214@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 103516 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: Wed, 09 Aug 2006 17:29:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=103516 Change 103516 by bushman@bushman_nss_ldap_cached on 2006/08/09 17:29:08 Byte order conversion should have been used here. Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#7 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#7 (text+ko) ==== @@ -181,6 +181,8 @@ rv = __nss_ldap_assign_attr_int(sctx, _AT(schema, ipServicePort), &serv->s_port); + if (rv == NSS_LDAP_SUCCESS) + serv->s_port = ntohs(serv->s_port); errfin: return (rv); From owner-p4-projects@FreeBSD.ORG Wed Aug 9 18:26:39 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 B483616A4E2; Wed, 9 Aug 2006 18:26:39 +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 7935C16A4DA for ; Wed, 9 Aug 2006 18:26:39 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1604E43D45 for ; Wed, 9 Aug 2006 18:26:39 +0000 (GMT) (envelope-from imp@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 k79IQccg091816 for ; Wed, 9 Aug 2006 18:26:38 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79IQYRs091777 for perforce@freebsd.org; Wed, 9 Aug 2006 18:26:34 GMT (envelope-from imp@freebsd.org) Date: Wed, 9 Aug 2006 18:26:34 GMT Message-Id: <200608091826.k79IQYRs091777@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103525 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: Wed, 09 Aug 2006 18:26:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=103525 Change 103525 by imp@imp_harmony on 2006/08/09 18:26:27 IFC @103520 Affected files ... .. //depot/projects/arm/src/Makefile.inc1#2 integrate .. //depot/projects/arm/src/ObsoleteFiles.inc#2 integrate .. //depot/projects/arm/src/bin/sh/histedit.c#2 integrate .. //depot/projects/arm/src/etc/defaults/rc.conf#2 integrate .. //depot/projects/arm/src/etc/mtree/BSD.local.dist#2 integrate .. //depot/projects/arm/src/etc/mtree/BSD.usr.dist#3 integrate .. //depot/projects/arm/src/etc/rc.d/Makefile#2 integrate .. //depot/projects/arm/src/games/fortune/datfiles/fortunes#2 integrate .. //depot/projects/arm/src/gnu/usr.bin/groff/tmac/mdoc.local#2 integrate .. //depot/projects/arm/src/lib/Makefile#2 integrate .. //depot/projects/arm/src/lib/libc/gen/syslog.c#2 integrate .. //depot/projects/arm/src/lib/libc/resolv/res_init.c#2 integrate .. //depot/projects/arm/src/lib/libc/resolv/res_send.c#2 integrate .. //depot/projects/arm/src/lib/libc/sys/kse.2#2 integrate .. //depot/projects/arm/src/lib/libc/uuid/uuid_compare.c#2 integrate .. //depot/projects/arm/src/lib/libthr/thread/thr_init.c#3 integrate .. //depot/projects/arm/src/lib/libthr/thread/thr_mutex.c#2 integrate .. //depot/projects/arm/src/lib/libthr/thread/thr_private.h#2 integrate .. //depot/projects/arm/src/lib/libthr/thread/thr_pspinlock.c#2 integrate .. //depot/projects/arm/src/lib/libthread_db/arch/powerpc/libc_r_md.c#1 branch .. //depot/projects/arm/src/lib/libthread_db/arch/powerpc/libpthread_md.c#1 branch .. //depot/projects/arm/src/libexec/rtld-elf/rtld.c#2 integrate .. //depot/projects/arm/src/libexec/tftpd/tftpd.8#2 integrate .. //depot/projects/arm/src/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.sgml#2 integrate .. //depot/projects/arm/src/sbin/dump/optr.c#2 integrate .. //depot/projects/arm/src/sbin/geom/class/eli/geom_eli.c#2 integrate .. //depot/projects/arm/src/sbin/ipfw/ipfw2.c#2 integrate .. //depot/projects/arm/src/sbin/reboot/reboot.c#2 integrate .. //depot/projects/arm/src/sbin/sysctl/sysctl.c#2 integrate .. //depot/projects/arm/src/share/doc/papers/timecounter/timecounter.ms#2 integrate .. //depot/projects/arm/src/share/examples/drivers/make_device_driver.sh#2 integrate .. //depot/projects/arm/src/share/man/man4/acpi.4#3 integrate .. //depot/projects/arm/src/share/man/man4/devctl.4#2 integrate .. //depot/projects/arm/src/share/man/man4/if_bridge.4#2 integrate .. //depot/projects/arm/src/share/man/man4/man4.powerpc/powermac_nvram.4#2 integrate .. //depot/projects/arm/src/share/man/man4/ng_ether.4#2 integrate .. //depot/projects/arm/src/share/man/man4/ng_pppoe.4#2 integrate .. //depot/projects/arm/src/share/man/man4/uscanner.4#2 integrate .. //depot/projects/arm/src/share/man/man7/hier.7#3 integrate .. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#22 integrate .. //depot/projects/arm/src/sys/amd64/amd64/trap.c#11 integrate .. //depot/projects/arm/src/sys/amd64/include/pmap.h#7 integrate .. //depot/projects/arm/src/sys/arm/arm/mem.c#3 integrate .. //depot/projects/arm/src/sys/arm/arm/pmap.c#24 integrate .. //depot/projects/arm/src/sys/arm/arm/vm_machdep.c#8 integrate .. //depot/projects/arm/src/sys/arm/at91/kb920x_machdep.c#34 integrate .. //depot/projects/arm/src/sys/arm/include/pmap.h#11 integrate .. //depot/projects/arm/src/sys/arm/include/sf_buf.h#2 integrate .. //depot/projects/arm/src/sys/arm/include/vmparam.h#3 integrate .. //depot/projects/arm/src/sys/arm/sa11x0/assabet_machdep.c#6 integrate .. //depot/projects/arm/src/sys/arm/xscale/i80321/iq31244_machdep.c#10 integrate .. //depot/projects/arm/src/sys/boot/i386/loader/main.c#5 integrate .. //depot/projects/arm/src/sys/boot/pc98/loader/main.c#4 integrate .. //depot/projects/arm/src/sys/compat/linprocfs/linprocfs.c#9 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_sockio.c#3 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_stream.c#7 integrate .. //depot/projects/arm/src/sys/conf/files#41 integrate .. //depot/projects/arm/src/sys/conf/options#28 integrate .. //depot/projects/arm/src/sys/conf/options.arm#15 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_dock.c#4 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_pci_link.c#7 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#21 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-pci.h#12 integrate .. //depot/projects/arm/src/sys/dev/ath/if_ath.c#16 integrate .. //depot/projects/arm/src/sys/dev/ath/if_athioctl.h#6 integrate .. //depot/projects/arm/src/sys/dev/bge/if_bge.c#18 integrate .. //depot/projects/arm/src/sys/dev/bge/if_bgereg.h#13 integrate .. //depot/projects/arm/src/sys/dev/bktr/CHANGELOG.TXT#3 integrate .. //depot/projects/arm/src/sys/dev/dc/dcphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/dc/pnphy.c#2 integrate .. //depot/projects/arm/src/sys/dev/dpt/dpt_scsi.c#4 integrate .. //depot/projects/arm/src/sys/dev/em/README#5 integrate .. //depot/projects/arm/src/sys/dev/em/if_em.c#21 integrate .. //depot/projects/arm/src/sys/dev/em/if_em.h#8 integrate .. //depot/projects/arm/src/sys/dev/em/if_em_hw.c#7 integrate .. //depot/projects/arm/src/sys/dev/em/if_em_hw.h#6 integrate .. //depot/projects/arm/src/sys/dev/em/if_em_osdep.h#5 integrate .. //depot/projects/arm/src/sys/dev/fe/if_fe.c#4 integrate .. //depot/projects/arm/src/sys/dev/isp/isp.c#9 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_freebsd.c#13 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_ioctl.h#6 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_library.c#5 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_target.c#7 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_target.h#5 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_tpublic.h#6 integrate .. //depot/projects/arm/src/sys/dev/ixgb/if_ixgb.c#5 integrate .. //depot/projects/arm/src/sys/dev/mxge/if_mxge.c#5 integrate .. //depot/projects/arm/src/sys/dev/patm/if_patm_intr.c#3 integrate .. //depot/projects/arm/src/sys/dev/pccard/pccard_cis.c#3 integrate .. //depot/projects/arm/src/sys/dev/pci/pcivar.h#5 integrate .. //depot/projects/arm/src/sys/dev/ral/rt2560.c#6 integrate .. //depot/projects/arm/src/sys/dev/re/if_re.c#15 integrate .. //depot/projects/arm/src/sys/dev/sk/if_sk.c#6 integrate .. //depot/projects/arm/src/sys/dev/sound/pci/emu10k1.c#7 integrate .. //depot/projects/arm/src/sys/dev/sound/pci/emu10kx-pcm.c#2 integrate .. //depot/projects/arm/src/sys/dev/sound/pci/emu10kx.c#2 integrate .. //depot/projects/arm/src/sys/dev/sound/pci/emu10kx.h#2 integrate .. //depot/projects/arm/src/sys/dev/sym/sym_fw1.h#2 integrate .. //depot/projects/arm/src/sys/dev/sym/sym_fw2.h#2 integrate .. //depot/projects/arm/src/sys/dev/ubsec/ubsec.c#7 integrate .. //depot/projects/arm/src/sys/dev/usb/if_ural.c#13 integrate .. //depot/projects/arm/src/sys/dev/usb/usbdevs#19 integrate .. //depot/projects/arm/src/sys/dev/usb/uscanner.c#6 integrate .. //depot/projects/arm/src/sys/dev/wi/if_wavelan_ieee.h#2 integrate .. //depot/projects/arm/src/sys/dev/wi/if_wi.c#7 integrate .. //depot/projects/arm/src/sys/dev/wi/if_wireg.h#2 integrate .. //depot/projects/arm/src/sys/fs/hpfs/hpfs.h#5 integrate .. //depot/projects/arm/src/sys/fs/msdosfs/msdosfs_vfsops.c#9 integrate .. //depot/projects/arm/src/sys/fs/nwfs/nwfs_io.c#5 integrate .. //depot/projects/arm/src/sys/fs/smbfs/smbfs_io.c#5 integrate .. //depot/projects/arm/src/sys/geom/bde/g_bde_work.c#4 integrate .. //depot/projects/arm/src/sys/geom/geom_gpt.c#7 integrate .. //depot/projects/arm/src/sys/geom/mirror/g_mirror.c#16 integrate .. //depot/projects/arm/src/sys/geom/raid3/g_raid3.c#19 integrate .. //depot/projects/arm/src/sys/i386/acpica/acpi_wakeup.c#7 integrate .. //depot/projects/arm/src/sys/i386/i386/identcpu.c#16 integrate .. //depot/projects/arm/src/sys/i386/i386/pmap.c#19 integrate .. //depot/projects/arm/src/sys/i386/i386/tsc.c#3 integrate .. //depot/projects/arm/src/sys/kern/Makefile#3 integrate .. //depot/projects/arm/src/sys/kern/init_sysent.c#13 integrate .. //depot/projects/arm/src/sys/kern/kern_resource.c#8 integrate .. //depot/projects/arm/src/sys/kern/kern_tc.c#7 integrate .. //depot/projects/arm/src/sys/kern/kern_time.c#7 integrate .. //depot/projects/arm/src/sys/kern/makesyscalls.sh#4 integrate .. //depot/projects/arm/src/sys/kern/subr_bus.c#16 integrate .. //depot/projects/arm/src/sys/kern/subr_rman.c#9 integrate .. //depot/projects/arm/src/sys/kern/syscalls.c#13 integrate .. //depot/projects/arm/src/sys/kern/systrace_args.c#1 branch .. //depot/projects/arm/src/sys/kern/uipc_proto.c#4 delete .. //depot/projects/arm/src/sys/kern/uipc_sockbuf.c#3 integrate .. //depot/projects/arm/src/sys/kern/uipc_socket.c#19 integrate .. //depot/projects/arm/src/sys/kern/uipc_socket2.c#14 integrate .. //depot/projects/arm/src/sys/kern/uipc_syscalls.c#15 integrate .. //depot/projects/arm/src/sys/kern/uipc_usrreq.c#17 integrate .. //depot/projects/arm/src/sys/kern/vfs_bio.c#11 integrate .. //depot/projects/arm/src/sys/kern/vfs_lookup.c#9 integrate .. //depot/projects/arm/src/sys/kern/vfs_subr.c#22 integrate .. //depot/projects/arm/src/sys/kern/vfs_syscalls.c#18 integrate .. //depot/projects/arm/src/sys/net/bpf.c#13 integrate .. //depot/projects/arm/src/sys/net/bridgestp.c#7 integrate .. //depot/projects/arm/src/sys/net/bridgestp.h#3 integrate .. //depot/projects/arm/src/sys/net/if_bridge.c#20 integrate .. //depot/projects/arm/src/sys/net/if_faith.c#6 integrate .. //depot/projects/arm/src/sys/net/if_gif.c#10 integrate .. //depot/projects/arm/src/sys/net/if_gre.c#8 integrate .. //depot/projects/arm/src/sys/net/if_stf.c#7 integrate .. //depot/projects/arm/src/sys/net/if_tun.c#5 integrate .. //depot/projects/arm/src/sys/net/if_var.h#6 integrate .. //depot/projects/arm/src/sys/net/if_vlan.c#14 integrate .. //depot/projects/arm/src/sys/net/net_osdep.h#3 delete .. //depot/projects/arm/src/sys/netatalk/ddp_pcb.c#3 integrate .. //depot/projects/arm/src/sys/netatalk/ddp_usrreq.c#5 integrate .. //depot/projects/arm/src/sys/netgraph/ng_ether.c#6 integrate .. //depot/projects/arm/src/sys/netgraph/ng_pppoe.c#5 integrate .. //depot/projects/arm/src/sys/netgraph/ng_pppoe.h#4 integrate .. //depot/projects/arm/src/sys/netinet/in_gif.c#5 integrate .. //depot/projects/arm/src/sys/netinet/ip_encap.c#3 integrate .. //depot/projects/arm/src/sys/netinet/ip_fw2.c#16 integrate .. //depot/projects/arm/src/sys/netinet/tcp_subr.c#8 integrate .. //depot/projects/arm/src/sys/netinet6/ah_aesxcbcmac.c#3 integrate .. //depot/projects/arm/src/sys/netinet6/ah_core.c#3 integrate .. //depot/projects/arm/src/sys/netinet6/ah_input.c#2 integrate .. //depot/projects/arm/src/sys/netinet6/ah_output.c#2 integrate .. //depot/projects/arm/src/sys/netinet6/esp_aesctr.c#3 integrate .. //depot/projects/arm/src/sys/netinet6/esp_core.c#3 integrate .. //depot/projects/arm/src/sys/netinet6/esp_input.c#2 integrate .. //depot/projects/arm/src/sys/netinet6/esp_output.c#2 integrate .. //depot/projects/arm/src/sys/netinet6/esp_rijndael.c#2 integrate .. //depot/projects/arm/src/sys/netinet6/frag6.c#4 integrate .. //depot/projects/arm/src/sys/netinet6/icmp6.c#6 integrate .. //depot/projects/arm/src/sys/netinet6/in6.c#7 integrate .. //depot/projects/arm/src/sys/netinet6/in6_cksum.c#5 integrate .. //depot/projects/arm/src/sys/netinet6/in6_gif.c#6 integrate .. //depot/projects/arm/src/sys/netinet6/in6_ifattach.c#5 integrate .. //depot/projects/arm/src/sys/netinet6/in6_proto.c#4 integrate .. //depot/projects/arm/src/sys/netinet6/in6_src.c#5 integrate .. //depot/projects/arm/src/sys/netinet6/ip6_forward.c#5 integrate .. //depot/projects/arm/src/sys/netinet6/ip6_input.c#7 integrate .. //depot/projects/arm/src/sys/netinet6/ip6_mroute.c#6 integrate .. //depot/projects/arm/src/sys/netinet6/ip6_output.c#7 integrate .. //depot/projects/arm/src/sys/netinet6/ipcomp_core.c#2 integrate .. //depot/projects/arm/src/sys/netinet6/ipcomp_input.c#3 integrate .. //depot/projects/arm/src/sys/netinet6/ipcomp_output.c#2 integrate .. //depot/projects/arm/src/sys/netinet6/ipsec.c#7 integrate .. //depot/projects/arm/src/sys/netinet6/mld6.c#4 integrate .. //depot/projects/arm/src/sys/netinet6/nd6.c#7 integrate .. //depot/projects/arm/src/sys/netinet6/nd6_nbr.c#5 integrate .. //depot/projects/arm/src/sys/netinet6/nd6_rtr.c#4 integrate .. //depot/projects/arm/src/sys/netinet6/udp6_output.c#4 integrate .. //depot/projects/arm/src/sys/netkey/key.c#3 integrate .. //depot/projects/arm/src/sys/netkey/keydb.c#3 integrate .. //depot/projects/arm/src/sys/netncp/ncp_sock.c#3 integrate .. //depot/projects/arm/src/sys/netsmb/smb_trantcp.c#3 integrate .. //depot/projects/arm/src/sys/nfsclient/nfs_bio.c#8 integrate .. //depot/projects/arm/src/sys/nfsclient/nfs_vfsops.c#8 integrate .. //depot/projects/arm/src/sys/pci/ncr.c#4 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/machdep.c#8 integrate .. //depot/projects/arm/src/sys/security/mac_biba/mac_biba.c#5 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/pmap.c#11 integrate .. //depot/projects/arm/src/sys/sys/domain.h#2 integrate .. //depot/projects/arm/src/sys/sys/mac_policy.h#5 integrate .. //depot/projects/arm/src/sys/sys/param.h#15 integrate .. //depot/projects/arm/src/sys/sys/stat.h#3 integrate .. //depot/projects/arm/src/sys/sys/syscall.h#13 integrate .. //depot/projects/arm/src/sys/sys/syscall.mk#13 integrate .. //depot/projects/arm/src/sys/sys/sysent.h#5 integrate .. //depot/projects/arm/src/sys/sys/sysproto.h#14 integrate .. //depot/projects/arm/src/sys/sys/systm.h#12 integrate .. //depot/projects/arm/src/sys/sys/time.h#5 integrate .. //depot/projects/arm/src/sys/sys/types.h#4 integrate .. //depot/projects/arm/src/sys/vm/swap_pager.c#7 integrate .. //depot/projects/arm/src/sys/vm/vm_fault.c#12 integrate .. //depot/projects/arm/src/sys/vm/vm_object.c#12 integrate .. //depot/projects/arm/src/sys/vm/vm_page.c#15 integrate .. //depot/projects/arm/src/sys/vm/vm_page.h#5 integrate .. //depot/projects/arm/src/sys/vm/vnode_pager.c#8 integrate .. //depot/projects/arm/src/tools/kerneldoc/subsys/Makefile#2 integrate .. //depot/projects/arm/src/tools/regression/fsx/fsx.c#2 integrate .. //depot/projects/arm/src/tools/tools/ath/athstats/athstats.c#2 integrate .. //depot/projects/arm/src/tools/tools/net80211/Makefile#2 integrate .. //depot/projects/arm/src/tools/tools/net80211/README#1 branch .. //depot/projects/arm/src/tools/tools/net80211/stumbler/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/stumbler/stumbler.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/Makefile.inc#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/README#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/ap/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/ap/ap.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/assoc/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/assoc/assoc.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/expand/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/expand/expand.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/libw00t/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/libw00t/w00t.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/libw00t/w00t.h#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/prga/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/prga/prga.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/redir/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/redir/buddy.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/w00t/redir/redir.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wesside/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wesside/README#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wesside/dics/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wesside/dics/dics.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wesside/udps/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wesside/udps/udps.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wesside/wesside/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wesside/wesside/wesside.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wlaninject/Makefile#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wlaninject/README#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wlaninject/wlaninject.c#1 branch .. //depot/projects/arm/src/usr.bin/logger/logger.1#2 integrate .. //depot/projects/arm/src/usr.bin/logger/logger.c#2 integrate .. //depot/projects/arm/src/usr.bin/split/split.1#2 integrate .. //depot/projects/arm/src/usr.bin/split/split.c#2 integrate .. //depot/projects/arm/src/usr.sbin/Makefile#4 integrate .. //depot/projects/arm/src/usr.sbin/elf2exe/Makefile#2 delete .. //depot/projects/arm/src/usr.sbin/elf2exe/elf2exe.8#2 delete .. //depot/projects/arm/src/usr.sbin/elf2exe/elf2exe.c#2 delete .. //depot/projects/arm/src/usr.sbin/kldxref/Makefile#4 integrate .. //depot/projects/arm/src/usr.sbin/kldxref/kldxref.c#3 integrate .. //depot/projects/arm/src/usr.sbin/mailwrapper/mailwrapper.8#2 integrate .. //depot/projects/arm/src/usr.sbin/mailwrapper/mailwrapper.c#2 integrate .. //depot/projects/arm/src/usr.sbin/ngctl/Makefile#2 integrate .. //depot/projects/arm/src/usr.sbin/ngctl/main.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/Makefile#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/command.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/config.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/devices.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/disks.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/dispatch.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/dmenu.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/globals.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/install.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/keymap.c#2 delete .. //depot/projects/arm/src/usr.sbin/sade/label.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/list.h#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/main.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/menus.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/misc.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/msg.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/rtermcap.c#2 delete .. //depot/projects/arm/src/usr.sbin/sade/sade.8#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/sade.h#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/system.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/termcap.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/usb.c#2 delete .. //depot/projects/arm/src/usr.sbin/sade/variable.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sade/wizard.c#2 integrate Differences ... ==== //depot/projects/arm/src/Makefile.inc1#2 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.549 2006/06/06 18:07:58 imp Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.552 2006/08/09 11:03:06 netchild Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -731,7 +731,7 @@ echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi - cd ${.CURDIR}/sys/doc/subsys && ${MAKE} obj all + cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all # # update ==== //depot/projects/arm/src/ObsoleteFiles.inc#2 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.41 2006/07/08 03:22:44 avatar Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.42 2006/08/04 21:29:22 brooks Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20060704: KAME compat file net_osdep.h removed +OLD_FILES+=usr/include/net/net_osdep.h # 20060517: pcvt removed OLD_FILES+=usr/share/pcvt/README.FIRST OLD_FILES+=usr/share/pcvt/Etc/xmodmap-german ==== //depot/projects/arm/src/bin/sh/histedit.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/bin/sh/histedit.c,v 1.28 2005/10/19 15:37:42 stefanf Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/histedit.c,v 1.29 2006/08/04 07:56:31 yar Exp $"); #include #include @@ -370,7 +370,7 @@ fputs(s, efp); } /* - * At end? (if we were to loose last, we'd sure be + * At end? (if we were to lose last, we'd sure be * messed up). */ if (he.num == last) ==== //depot/projects/arm/src/etc/defaults/rc.conf#2 (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/arm/src/etc/mtree/BSD.local.dist#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.118 2006/01/08 10:15:30 dougb Exp $ +# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.119 2006/08/02 17:22:30 marcel Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -111,8 +111,6 @@ cat3 .. cat4 - alpha - .. i386 .. .. @@ -123,8 +121,6 @@ cat7 .. cat8 - alpha - .. i386 .. .. ==== //depot/projects/arm/src/etc/mtree/BSD.usr.dist#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.315 2006/07/29 19:47:09 simon Exp $ +# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.319 2006/08/03 05:44:51 jb Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -18,6 +18,8 @@ aout .. .. + dtrace + .. engines .. .. @@ -655,8 +657,6 @@ cat3 .. cat4 - alpha - .. amd64 .. i386 @@ -671,8 +671,6 @@ cat7 .. cat8 - alpha - .. amd64 .. i386 @@ -692,8 +690,6 @@ cat3 .. cat4 - alpha - .. amd64 .. i386 @@ -708,8 +704,6 @@ cat7 .. cat8 - alpha - .. amd64 .. i386 @@ -768,8 +762,6 @@ man3 .. man4 - alpha - .. amd64 .. i386 @@ -784,8 +776,6 @@ man7 .. man8 - alpha - .. amd64 .. i386 ==== //depot/projects/arm/src/etc/rc.d/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.73 2006/06/01 11:01:54 thompsa Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.74 2006/08/04 18:37:03 des Exp $ .include @@ -21,7 +21,7 @@ jail \ kadmind kerberos kernel keyserv kldxref kpasswdd \ ldconfig local localpkg lpd \ - mixer motd mountcritlocal mountcritremote \ + mixer motd mountcritlocal mountcritremote mountlate \ mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \ named natd netif netoptions \ network_ipv6 newsyslog nfsclient nfsd \ ==== //depot/projects/arm/src/games/fortune/datfiles/fortunes#2 (text+ko) ==== @@ -1,5 +1,5 @@ This fortune brought to you by: -$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.223 2006/07/10 16:53:32 phk Exp $ +$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.224 2006/08/04 07:56:31 yar Exp $ % ======================================================================= @@ -5459,7 +5459,7 @@ Most of us just sit back and marvel at such a story; how could that terminal know whether the poor guy was sitting or standing? Good debuggers, though, know that there has to be a reason. Electrical theories are the easiest to -hypothesize: was there a loose with under the carpet, or problems with static +hypothesize: was there a loose wire under the carpet, or problems with static electricity? But electrical problems are rarely consistently reproducible. An alert IBMer finally noticed that the problem was in the terminal's keyboard: the tops of two keys were switched. When the programmer was seated he was a ==== //depot/projects/arm/src/gnu/usr.bin/groff/tmac/mdoc.local#2 (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.54 2006/08/08 19:47:10 ru 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) @@ -62,6 +63,7 @@ . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-5.5 5.5 +.ds doc-operating-system-FreeBSD-6.2 6.2 .ds doc-operating-system-FreeBSD-7.0 7.0 . .ec ==== //depot/projects/arm/src/lib/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/Makefile,v 1.214 2006/03/20 14:24:57 ru Exp $ +# $FreeBSD: src/lib/Makefile,v 1.215 2006/08/04 17:56:31 marcel Exp $ .include @@ -111,7 +111,7 @@ _libthr= libthr .endif -.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_ARCH} != "arm" _libthread_db= libthread_db .endif ==== //depot/projects/arm/src/lib/libc/gen/syslog.c#2 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/29/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.37 2006/05/11 09:10:33 davidxu Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.38 2006/08/07 20:12:18 phk Exp $"); #include "namespace.h" #include @@ -116,7 +116,7 @@ h->base += len; h->left -= len; } - return 0; + return len; } /* ==== //depot/projects/arm/src/lib/libc/resolv/res_init.c#2 (text) ==== @@ -73,10 +73,12 @@ static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.5 2005/11/03 00:00:52 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/resolv/res_init.c,v 1.2 2006/03/21 15:37:16 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/resolv/res_init.c,v 1.3 2006/08/04 10:21:11 ume Exp $"); #include "port_before.h" +#include "namespace.h" + #include #include #include @@ -93,6 +95,8 @@ #include #include +#include "un-namespace.h" + #include "port_after.h" /* ensure that sockaddr_in6 and IN6ADDR_ANY_INIT are declared / defined */ @@ -735,13 +739,13 @@ int ns; if (statp->_vcsock >= 0) { - (void) close(statp->_vcsock); + (void) _close(statp->_vcsock); statp->_vcsock = -1; statp->_flags &= ~(RES_F_VC | RES_F_CONN); } for (ns = 0; ns < statp->_u._ext.nscount; ns++) { if (statp->_u._ext.nssocks[ns] != -1) { - (void) close(statp->_u._ext.nssocks[ns]); + (void) _close(statp->_u._ext.nssocks[ns]); statp->_u._ext.nssocks[ns] = -1; } } ==== //depot/projects/arm/src/lib/libc/resolv/res_send.c#2 (text) ==== @@ -73,7 +73,7 @@ static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.7 2005/08/15 02:04:41 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/resolv/res_send.c,v 1.2 2006/03/21 15:37:16 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/resolv/res_send.c,v 1.3 2006/08/04 12:26:07 ume Exp $"); /* * Send query to name server and wait for reply. @@ -970,6 +970,10 @@ res_nclose(statp); return (0); } +#ifdef USE_KQUEUE + if (kv.ident != s) + goto wait; +#endif errno = 0; fromlen = sizeof(from); resplen = _recvfrom(s, (char*)ans, anssiz,0, ==== //depot/projects/arm/src/lib/libc/sys/kse.2#2 (text+ko) ==== @@ -33,7 +33,7 @@ .\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/kse.2,v 1.17 2005/11/24 07:33:35 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/kse.2,v 1.18 2006/08/04 07:56:31 yar Exp $ .\" .Dd July 12, 2004 .Dt KSE 2 @@ -267,7 +267,7 @@ .Pp As a special case, if the last remaining KSE in the last remaining KSE group invokes this system call, then the KSE is not destroyed; -instead, the KSE just looses the association with its mailbox and +instead, the KSE just loses the association with its mailbox and .Fn kse_exit returns normally. This returns the process to its original, unthreaded state. ==== //depot/projects/arm/src/lib/libc/uuid/uuid_compare.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/uuid/uuid_compare.c,v 1.4 2005/01/03 02:56:15 marcel Exp $ + * $FreeBSD: src/lib/libc/uuid/uuid_compare.c,v 1.5 2006/08/03 03:34:36 delphij Exp $ */ #include @@ -41,7 +41,8 @@ int32_t uuid_compare(const uuid_t *a, const uuid_t *b, uint32_t *status) { - int res; + int res; + int64_t res64; if (status != NULL) *status = uuid_s_ok; @@ -54,10 +55,19 @@ if (b == NULL) return ((uuid_is_nil(a, NULL)) ? 0 : 1); - /* We have to compare the hard way. */ - res = (int)((int64_t)a->time_low - (int64_t)b->time_low); - if (res) - return ((res < 0) ? -1 : 1); + /* + * We have to compare the hard way. + * + * Note that time_low is defined as unsigned 32-bit + * integer, therefore, with a significantly large + * a->time_low and a small b->time_low, we will end + * up with a value which is larger than 0x7fffffff + * which is negative if casted to signed 32-bit + * integer. + */ + res64 = (int64_t)a->time_low - (int64_t)b->time_low; + if (res64) + return ((res64 < 0) ? -1 : 1); res = (int)a->time_mid - (int)b->time_mid; if (res) return ((res < 0) ? -1 : 1); ==== //depot/projects/arm/src/lib/libthr/thread/thr_init.c#3 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_init.c,v 1.37 2006/07/25 12:50:05 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_init.c,v 1.38 2006/08/08 04:42:41 davidxu Exp $ */ #include "namespace.h" @@ -99,6 +99,7 @@ }; pid_t _thr_pid; +int _thr_smp_cpus = 1; size_t _thr_guard_default; size_t _thr_stack_default = THR_STACK_DEFAULT; size_t _thr_stack_initial = THR_STACK_INITIAL; @@ -443,6 +444,8 @@ len = sizeof (_usrstack); if (sysctl(mib, 2, &_usrstack, &len, NULL, 0) == -1) PANIC("Cannot get kern.usrstack from sysctl"); + len = sizeof(_thr_smp_cpus); + sysctlbyname("kern.smp.cpus", &_thr_smp_cpus, &len, NULL, 0); _thr_page_size = getpagesize(); _thr_guard_default = _thr_page_size; _pthread_attr_default.guardsize_attr = _thr_guard_default; ==== //depot/projects/arm/src/lib/libthr/thread/thr_mutex.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.44 2006/07/17 09:23:44 delphij Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.45 2006/08/08 05:04:43 davidxu Exp $ */ #include "namespace.h" @@ -128,7 +128,6 @@ pmutex->m_prio = attr->m_ceiling; else pmutex->m_prio = -1; - pmutex->m_saved_prio = 0; MUTEX_INIT_LINK(pmutex); *mutex = pmutex; return (0); @@ -191,7 +190,6 @@ (*mutex)->m_count = 0; (*mutex)->m_refcount = 0; (*mutex)->m_prio = 0; - (*mutex)->m_saved_prio = 0; return (0); } ==== //depot/projects/arm/src/lib/libthr/thread/thr_private.h#2 (text+ko) ==== @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_private.h,v 1.66 2006/07/12 06:13:18 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_private.h,v 1.68 2006/08/08 05:04:43 davidxu Exp $ */ #ifndef _THR_PRIVATE_H @@ -121,18 +121,10 @@ int m_refcount; /* - * Used for priority inheritence and protection. - * - * m_prio - For priority inheritence, the highest active - * priority (threads locking the mutex inherit - * this priority). For priority protection, the - * ceiling priority of this mutex. - * m_saved_prio - mutex owners inherited priority before - * taking the mutex, restored when the owner - * unlocks the mutex. + * Used for priority protection, the ceiling priority of + * this mutex. */ int m_prio; - int m_saved_prio; /* * Link for list of all mutexes a thread currently owns. @@ -588,6 +580,8 @@ extern struct pthread_prio _thr_priorities[] __hidden; extern pid_t _thr_pid __hidden; +extern int _thr_smp_cpus __hidden; + extern size_t _thr_guard_default __hidden; extern size_t _thr_stack_default __hidden; extern size_t _thr_stack_initial __hidden; ==== //depot/projects/arm/src/lib/libthr/thread/thr_pspinlock.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/lib/libthr/thread/thr_pspinlock.c,v 1.2 2006/04/04 02:57:49 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_pspinlock.c,v 1.3 2006/08/08 04:42:41 davidxu Exp $ */ #include "namespace.h" @@ -104,13 +104,17 @@ count = SPIN_COUNT; while ((ret = THR_UMTX_TRYLOCK(curthread, &lck->s_lock)) != 0) { while (lck->s_lock) { -#ifdef __i386__ - /* tell cpu we are spinning */ - __asm __volatile("pause"); + if (_thr_smp_cpus <= 1) { + _pthread_yield(); + } else { +#if defined(__i386__) || defined(__x86_64__) + /* tell cpu we are spinning */ + __asm __volatile("pause"); #endif - if (--count <= 0) { - count = SPIN_COUNT; - _pthread_yield(); + if (--count <= 0) { + count = SPIN_COUNT; + _pthread_yield(); + } } } } ==== //depot/projects/arm/src/libexec/rtld-elf/rtld.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.114 2006/03/28 06:14:22 davidxu Exp $ + * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.115 2006/08/04 13:37:54 delphij Exp $ */ /* @@ -2451,8 +2451,8 @@ } else { if (obj->versyms == NULL) { if (object_match_name(obj, ventry->name)) { - _rtld_error("%s: object %s should provide version %s for ", - "symbol %s", obj->path, ventry->name, + _rtld_error("%s: object %s should provide version %s for " + "symbol %s", obj_rtld.path, obj->path, ventry->name, obj->strtab + symnum); continue; } ==== //depot/projects/arm/src/libexec/tftpd/tftpd.8#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/libexec/tftpd/tftpd.8,v 1.18 2004/07/07 19:57:14 ru Exp $ +.\" $FreeBSD: src/libexec/tftpd/tftpd.8,v 1.19 2006/08/07 16:05:55 yar Exp $ .\" .Dd September 14, 2000 .Dt TFTPD 8 @@ -39,7 +39,7 @@ .Nm tftpd .Nd Internet Trivial File Transfer Protocol server .Sh SYNOPSIS -.Nm /usr/libexec/tftpd +.Nm tftpd .Op Fl cClnw .Op Fl s Ar directory .Op Fl u Ar user @@ -70,8 +70,11 @@ .Nm will allow only publicly readable files to be accessed. -Files containing the string ``/\|\fB.\|.\fP\|/'' or starting with -``\|\fB.\|.\fP\|/'' are not allowed. +Files containing the string +.Dq Li "/../" +or starting with +.Dq Li "../" +are not allowed. Files may be written only if they already exist and are publicly writable. Note that this extends the concept of .Dq public @@ -85,7 +88,7 @@ .Nm with a list of directories by including up to 20 pathnames as server program arguments in -.Pa /etc/inetd.conf . +.Xr inetd.conf 5 . In this case access is restricted to files whose names are prefixed by the one of the given directories. The given directories are also treated as a search path for @@ -94,21 +97,24 @@ The .Fl s option provides additional security by changing -.Nm Ns No 's -root directory, thereby prohibiting accesses outside of the specified +the root directory of +.Nm , +thereby prohibiting accesses to outside of the specified .Ar directory . Because .Xr chroot 2 requires super-user privileges, .Nm -must be run as root. +must be run as +.Li root . However, after performing the -.Fn chroot , +.Xr chroot 2 +call, .Nm -will set its user id to that of the specified +will set its user ID to that of the specified .Ar user , or -.Dq nobody +.Dq Li nobody if no .Fl u option is specified. @@ -116,8 +122,9 @@ The options are: .Bl -tag -width Ds .It Fl c -Changes the default root directory of a connecting host via chroot based on the -connecting IP address. +Changes the default root directory of a connecting host via +.Xr chroot 2 +based on the connecting IP address. This prevents multiple clients from writing to the same file at the same time. If the directory does not exist, the client connection is refused. The @@ -131,15 +138,17 @@ Operates the same as .Fl c except it falls back to -.Fl s Ns No 's .Ar directory +specified via +.Fl s if a directory does not exist for the client's IP. .It Fl l Log all requests using .Xr syslog 3 with the facility of .Dv LOG_FTP . -Note: Logging of +.Sy Note : +Logging of .Dv LOG_FTP messages must also be enabled in the syslog configuration file, @@ -151,15 +160,15 @@ Cause .Nm to change its root directory to -.Pa directory . -After changing roots but before accepting commands, +.Ar directory . +After doing that but before accepting commands, .Nm will switch credentials to an unprivileged user. .It Fl u Ar user Switch credentials to .Ar user (default -.Dq nobody ) +.Dq Li nobody ) when the >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Aug 9 18:45:03 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 B7CF516A4DE; Wed, 9 Aug 2006 18:45:03 +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 671C516A4E5 for ; Wed, 9 Aug 2006 18:45:03 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0766C43D49 for ; Wed, 9 Aug 2006 18:45:03 +0000 (GMT) (envelope-from bushman@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 k79Ij2FE092933 for ; Wed, 9 Aug 2006 18:45:02 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79Ij2m8092930 for perforce@freebsd.org; Wed, 9 Aug 2006 18:45:02 GMT (envelope-from bushman@freebsd.org) Date: Wed, 9 Aug 2006 18:45:02 GMT Message-Id: <200608091845.k79Ij2m8092930@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 103527 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: Wed, 09 Aug 2006 18:45:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=103527 Change 103527 by bushman@bushman_nss_ldap_cached on 2006/08/09 18:44:06 Strings unescaping routine added, a bug in groups and in services fixed. Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.c#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.c#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.c#11 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.h#11 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.c#11 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_group.c#10 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldap_serv.c#8 (text+ko) ==== @@ -248,10 +248,10 @@ if (proto != NULL) __nss_ldap_format_filter(fmt, NSS_LDAP_FILTER_ARGS_INT_STR, filter, - sizeof(filter), port, proto); + sizeof(filter), htons(port), proto); else __nss_ldap_format_filter(fmt, NSS_LDAP_FILTER_ARGS_INT_ANY, filter, - sizeof(filter), port); + sizeof(filter), htons(port)); memset(&mdata, 0, sizeof(struct services_mdata)); mdata.serv = serv; @@ -262,6 +262,7 @@ (void *)&mdata, buffer, bufsize, nss_ldap_parse_servent); + printf("== %d\n", rv); if (rv == NS_SUCCESS) *result = serv; @@ -288,7 +289,7 @@ rv = __nss_ldap_getent(NSS_LDAP_MAP_SERVICES, filter, (void *)&mdata, buffer, bufsize, nss_ldap_parse_servent, nss_ldap_destroy_servent); - + if (rv == NS_SUCCESS) *result = serv; ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldapsearch.c#10 (text+ko) ==== @@ -324,8 +324,8 @@ memcpy(buf, cstr, size + 1); *str = buf; *len = size + 1; - - return (NSS_LDAP_SUCCESS); + + return (__nss_ldap_unescape_string(buf, buf, size + 1)); } int ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.c#11 (text+ko) ==== @@ -91,6 +91,69 @@ } int +__nss_ldap_unescape_string(char const *str, char *buffer, size_t bufsize) +{ + char cmp_buf[3]; + char const *sp; + char *bp; + int prev_slash, slash_mod; + + cmp_buf[2] = '\0'; + prev_slash = 0; + slash_mod = 0; + sp = str; + bp = buffer; + do { + if (*sp == '\\') { + if (prev_slash == 0) { + prev_slash = 1; + slash_mod = 1; + } else { + if (slash_mod == 1) { + *bp = '\\'; + ++bp; + slash_mod = 0; + } else + slash_mod = 1; + } + } else if ((prev_slash == 1) && (*sp != '\0')) { + if (slash_mod == 1 ) { + cmp_buf[0] = *sp; + cmp_buf[1] = *(sp + 1); + if (strncasecmp(cmp_buf, "2a", 2) == 0) { + *bp = '*'; + } else if (strncasecmp(cmp_buf, "2b", 2) == 0) { + *bp = '+'; + } else if (strncasecmp(cmp_buf, "28", 2) == 0) { + *bp = '('; + } else if (strncasecmp(cmp_buf, "29", 2) == 0) { + *bp = ')'; + } else if (strncasecmp(cmp_buf, "5c", 2) == 0) { + *bp = '\\'; + } else + return (NSS_LDAP_PARSE_ERROR); + + ++bp; + + if (cmp_buf[1] != '\0') + ++sp; + else + *bp = '\0'; + } + + prev_slash = 0; + slash_mod = 0; + } else { + *bp = *sp; + ++bp; + } + + } while (*(sp++) != '\0'); + + return (NSS_LDAP_SUCCESS); +} + +int __nss_ldap_format_filter(char const *fmt, int type, char *buffer, size_t bufsize, ...) { ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/ldaputil.h#11 (text+ko) ==== @@ -39,6 +39,7 @@ #define NSS_LDAP_FILTER_ARGS_INT_ANY 7 extern int __nss_ldap_escape_string(char const *, char *, size_t); +extern int __nss_ldap_unescape_string(char const *, char *, size_t); extern int __nss_ldap_format_filter(char const *, int, char *, size_t, ...); #endif /* _LDAPUTILS_H_ */ ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.c#11 (text+ko) ==== @@ -70,13 +70,13 @@ {NSDB_PASSWD_COMPAT, "setpwent", __ldap_setpwent, (void *)nss_set_ent}, {NSDB_GROUP, "getgrnam_r", __ldap_group, (void *)nss_lt_name}, - {NSDB_GROUP, "getgruid_r", __ldap_group, (void *)nss_lt_id}, + {NSDB_GROUP, "getgrgid_r", __ldap_group, (void *)nss_lt_id}, {NSDB_GROUP, "getgrent_r", __ldap_group, (void *)nss_lt_all}, {NSDB_GROUP, "endgrent", __ldap_setgrent, (void *)nss_end_ent}, {NSDB_GROUP, "setgrent", __ldap_setgrent, (void *)nss_set_ent}, {NSDB_GROUP_COMPAT, "getgrnam_r", __ldap_group, (void *)nss_lt_name}, - {NSDB_GROUP_COMPAT, "getgruid_r", __ldap_group, (void *)nss_lt_id}, + {NSDB_GROUP_COMPAT, "getgrgid_r", __ldap_group, (void *)nss_lt_id}, {NSDB_GROUP_COMPAT, "getgrent_r", __ldap_group, (void *)nss_lt_all}, {NSDB_GROUP_COMPAT, "endgrent", __ldap_setgrent, (void *)nss_end_ent}, {NSDB_GROUP_COMPAT, "setgrent", __ldap_setgrent, (void *)nss_set_ent}, From owner-p4-projects@FreeBSD.ORG Wed Aug 9 19:54:34 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 372B116A4E1; Wed, 9 Aug 2006 19:54:34 +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 C919416A4DA for ; Wed, 9 Aug 2006 19:54:33 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6511B43D49 for ; Wed, 9 Aug 2006 19:54:33 +0000 (GMT) (envelope-from marcel@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 k79JsXfg097311 for ; Wed, 9 Aug 2006 19:54:33 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79JsUO3097308 for perforce@freebsd.org; Wed, 9 Aug 2006 19:54:30 GMT (envelope-from marcel@freebsd.org) Date: Wed, 9 Aug 2006 19:54:30 GMT Message-Id: <200608091954.k79JsUO3097308@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103528 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: Wed, 09 Aug 2006 19:54:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=103528 Change 103528 by marcel@marcel_nfs on 2006/08/09 19:53:45 IFC @103526 Affected files ... .. //depot/projects/gdb/Makefile.inc1#16 integrate .. //depot/projects/gdb/ObsoleteFiles.inc#2 integrate .. //depot/projects/gdb/etc/defaults/rc.conf#16 integrate .. //depot/projects/gdb/gnu/usr.bin/groff/tmac/mdoc.local#7 integrate .. //depot/projects/gdb/lib/libc/gen/msgctl.3#2 integrate .. //depot/projects/gdb/lib/libc/gen/syslog.c#4 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_init.c#9 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_mutex.c#11 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_private.h#14 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_pspinlock.c#2 integrate .. //depot/projects/gdb/libexec/tftpd/tftpd.8#4 integrate .. //depot/projects/gdb/sbin/dump/optr.c#6 integrate .. //depot/projects/gdb/sbin/geom/class/eli/geli.8#2 integrate .. //depot/projects/gdb/sbin/geom/class/eli/geom_eli.c#2 integrate .. //depot/projects/gdb/sbin/ipfw/ipfw2.c#11 integrate .. //depot/projects/gdb/share/examples/drivers/make_device_driver.sh#2 integrate .. //depot/projects/gdb/share/man/man4/acpi.4#12 integrate .. //depot/projects/gdb/share/man/man4/ng_pppoe.4#5 integrate .. //depot/projects/gdb/share/man/man4/uscanner.4#6 integrate .. //depot/projects/gdb/sys/amd64/amd64/pmap.c#25 integrate .. //depot/projects/gdb/sys/amd64/amd64/trap.c#14 integrate .. //depot/projects/gdb/sys/arm/arm/mem.c#2 integrate .. //depot/projects/gdb/sys/arm/arm/pmap.c#11 integrate .. //depot/projects/gdb/sys/arm/arm/vm_machdep.c#5 integrate .. //depot/projects/gdb/sys/arm/at91/kb920x_machdep.c#2 integrate .. //depot/projects/gdb/sys/arm/include/pmap.h#5 integrate .. //depot/projects/gdb/sys/arm/include/sf_buf.h#2 integrate .. //depot/projects/gdb/sys/arm/include/vmparam.h#4 integrate .. //depot/projects/gdb/sys/arm/sa11x0/assabet_machdep.c#4 integrate .. //depot/projects/gdb/sys/arm/xscale/i80321/iq31244_machdep.c#2 integrate .. //depot/projects/gdb/sys/compat/linprocfs/linprocfs.c#6 integrate .. //depot/projects/gdb/sys/compat/svr4/svr4_sockio.c#3 integrate .. //depot/projects/gdb/sys/compat/svr4/svr4_stream.c#6 integrate .. //depot/projects/gdb/sys/conf/files#45 integrate .. //depot/projects/gdb/sys/conf/options.arm#3 integrate .. //depot/projects/gdb/sys/dev/acpica/acpi_dock.c#2 integrate .. //depot/projects/gdb/sys/dev/acpica/acpi_pci_link.c#8 integrate .. //depot/projects/gdb/sys/dev/ata/ata-chipset.c#15 integrate .. //depot/projects/gdb/sys/dev/ata/ata-disk.c#9 integrate .. //depot/projects/gdb/sys/dev/ata/ata-pci.h#10 integrate .. //depot/projects/gdb/sys/dev/ath/if_ath.c#9 integrate .. //depot/projects/gdb/sys/dev/ath/if_athioctl.h#4 integrate .. //depot/projects/gdb/sys/dev/bge/if_bge.c#9 integrate .. //depot/projects/gdb/sys/dev/bge/if_bgereg.h#5 integrate .. //depot/projects/gdb/sys/dev/isp/isp.c#5 integrate .. //depot/projects/gdb/sys/dev/isp/isp_freebsd.c#7 integrate .. //depot/projects/gdb/sys/dev/isp/isp_ioctl.h#4 integrate .. //depot/projects/gdb/sys/dev/isp/isp_library.c#2 integrate .. //depot/projects/gdb/sys/dev/isp/isp_target.c#5 integrate .. //depot/projects/gdb/sys/dev/isp/isp_target.h#3 integrate .. //depot/projects/gdb/sys/dev/isp/isp_tpublic.h#3 integrate .. //depot/projects/gdb/sys/dev/pccard/pccard_cis.c#4 integrate .. //depot/projects/gdb/sys/dev/sound/pci/emu10k1.c#10 integrate .. //depot/projects/gdb/sys/dev/sound/pci/emu10kx-pcm.c#2 integrate .. //depot/projects/gdb/sys/dev/sound/pci/emu10kx.c#2 integrate .. //depot/projects/gdb/sys/dev/sound/pci/emu10kx.h#2 integrate .. //depot/projects/gdb/sys/dev/usb/usbdevs#22 integrate .. //depot/projects/gdb/sys/dev/usb/uscanner.c#9 integrate .. //depot/projects/gdb/sys/dev/wi/if_wavelan_ieee.h#3 integrate .. //depot/projects/gdb/sys/dev/wi/if_wi.c#8 integrate .. //depot/projects/gdb/sys/dev/wi/if_wireg.h#3 integrate .. //depot/projects/gdb/sys/fs/nwfs/nwfs_io.c#5 integrate .. //depot/projects/gdb/sys/fs/smbfs/smbfs_io.c#5 integrate .. //depot/projects/gdb/sys/geom/eli/g_eli.c#2 integrate .. //depot/projects/gdb/sys/geom/eli/g_eli.h#2 integrate .. //depot/projects/gdb/sys/geom/eli/g_eli_ctl.c#2 integrate .. //depot/projects/gdb/sys/geom/geom_gpt.c#6 integrate .. //depot/projects/gdb/sys/geom/mirror/g_mirror.c#4 integrate .. //depot/projects/gdb/sys/geom/raid3/g_raid3.c#4 integrate .. //depot/projects/gdb/sys/i386/acpica/acpi_wakeup.c#8 integrate .. //depot/projects/gdb/sys/i386/i386/pmap.c#23 integrate .. //depot/projects/gdb/sys/kern/Makefile#3 integrate .. //depot/projects/gdb/sys/kern/uipc_proto.c#4 delete .. //depot/projects/gdb/sys/kern/uipc_syscalls.c#24 integrate .. //depot/projects/gdb/sys/kern/uipc_usrreq.c#17 integrate .. //depot/projects/gdb/sys/kern/vfs_bio.c#15 integrate .. //depot/projects/gdb/sys/kern/vfs_lookup.c#6 integrate .. //depot/projects/gdb/sys/kern/vfs_subr.c#22 integrate .. //depot/projects/gdb/sys/net/bpf.c#12 integrate .. //depot/projects/gdb/sys/net/if_faith.c#10 integrate .. //depot/projects/gdb/sys/net/if_gif.c#10 integrate .. //depot/projects/gdb/sys/net/if_gre.c#11 integrate .. //depot/projects/gdb/sys/net/if_stf.c#10 integrate .. //depot/projects/gdb/sys/net/if_tun.c#11 integrate .. //depot/projects/gdb/sys/net/if_var.h#18 integrate .. //depot/projects/gdb/sys/net/net_osdep.h#3 delete .. //depot/projects/gdb/sys/netatalk/ddp_usrreq.c#8 integrate .. //depot/projects/gdb/sys/netgraph/ng_pppoe.c#8 integrate .. //depot/projects/gdb/sys/netgraph/ng_pppoe.h#6 integrate .. //depot/projects/gdb/sys/netinet/in_gif.c#5 integrate .. //depot/projects/gdb/sys/netinet/ip_encap.c#4 integrate .. //depot/projects/gdb/sys/netinet6/ah_aesxcbcmac.c#3 integrate .. //depot/projects/gdb/sys/netinet6/ah_core.c#4 integrate .. //depot/projects/gdb/sys/netinet6/ah_input.c#3 integrate .. //depot/projects/gdb/sys/netinet6/ah_output.c#3 integrate .. //depot/projects/gdb/sys/netinet6/esp_aesctr.c#3 integrate .. //depot/projects/gdb/sys/netinet6/esp_core.c#3 integrate .. //depot/projects/gdb/sys/netinet6/esp_input.c#3 integrate .. //depot/projects/gdb/sys/netinet6/esp_output.c#3 integrate .. //depot/projects/gdb/sys/netinet6/esp_rijndael.c#3 integrate .. //depot/projects/gdb/sys/netinet6/frag6.c#4 integrate .. //depot/projects/gdb/sys/netinet6/icmp6.c#6 integrate .. //depot/projects/gdb/sys/netinet6/in6.c#5 integrate .. //depot/projects/gdb/sys/netinet6/in6_cksum.c#4 integrate .. //depot/projects/gdb/sys/netinet6/in6_gif.c#3 integrate .. //depot/projects/gdb/sys/netinet6/in6_ifattach.c#4 integrate .. //depot/projects/gdb/sys/netinet6/in6_proto.c#5 integrate .. //depot/projects/gdb/sys/netinet6/in6_src.c#6 integrate .. //depot/projects/gdb/sys/netinet6/ip6_forward.c#4 integrate .. //depot/projects/gdb/sys/netinet6/ip6_input.c#9 integrate .. //depot/projects/gdb/sys/netinet6/ip6_mroute.c#4 integrate .. //depot/projects/gdb/sys/netinet6/ip6_output.c#8 integrate .. //depot/projects/gdb/sys/netinet6/ipcomp_core.c#3 integrate .. //depot/projects/gdb/sys/netinet6/ipcomp_input.c#3 integrate .. //depot/projects/gdb/sys/netinet6/ipcomp_output.c#3 integrate .. //depot/projects/gdb/sys/netinet6/ipsec.c#5 integrate .. //depot/projects/gdb/sys/netinet6/mld6.c#5 integrate .. //depot/projects/gdb/sys/netinet6/nd6.c#6 integrate .. //depot/projects/gdb/sys/netinet6/nd6_nbr.c#5 integrate .. //depot/projects/gdb/sys/netinet6/nd6_rtr.c#4 integrate .. //depot/projects/gdb/sys/netinet6/udp6_output.c#6 integrate .. //depot/projects/gdb/sys/netkey/key.c#4 integrate .. //depot/projects/gdb/sys/netkey/keydb.c#3 integrate .. //depot/projects/gdb/sys/nfsclient/nfs_bio.c#10 integrate .. //depot/projects/gdb/sys/nfsclient/nfs_vfsops.c#11 integrate .. //depot/projects/gdb/sys/pc98/include/md_var.h#2 integrate .. //depot/projects/gdb/sys/pc98/pc98/pc98_machdep.c#3 integrate .. //depot/projects/gdb/sys/security/mac_biba/mac_biba.c#9 integrate .. //depot/projects/gdb/sys/sparc64/sparc64/pmap.c#13 integrate .. //depot/projects/gdb/sys/sys/domain.h#4 integrate .. //depot/projects/gdb/sys/sys/mac_policy.h#8 integrate .. //depot/projects/gdb/sys/sys/param.h#24 integrate .. //depot/projects/gdb/sys/sys/stat.h#6 integrate .. //depot/projects/gdb/sys/sys/systm.h#13 integrate .. //depot/projects/gdb/sys/sys/time.h#5 integrate .. //depot/projects/gdb/sys/sys/types.h#11 integrate .. //depot/projects/gdb/sys/vm/swap_pager.c#13 integrate .. //depot/projects/gdb/sys/vm/vm_fault.c#8 integrate .. //depot/projects/gdb/sys/vm/vm_object.c#12 integrate .. //depot/projects/gdb/sys/vm/vm_page.c#18 integrate .. //depot/projects/gdb/sys/vm/vm_page.h#10 integrate .. //depot/projects/gdb/sys/vm/vnode_pager.c#7 integrate .. //depot/projects/gdb/tools/regression/fsx/fsx.c#3 integrate .. //depot/projects/gdb/tools/tools/ath/athstats/athstats.c#2 integrate .. //depot/projects/gdb/tools/tools/net80211/Makefile#2 integrate .. //depot/projects/gdb/tools/tools/net80211/README#1 branch .. //depot/projects/gdb/tools/tools/net80211/stumbler/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/stumbler/stumbler.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/Makefile.inc#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/README#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/ap/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/ap/ap.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/assoc/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/assoc/assoc.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/expand/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/expand/expand.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/libw00t/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/libw00t/w00t.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/libw00t/w00t.h#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/prga/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/prga/prga.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/redir/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/redir/buddy.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/w00t/redir/redir.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/wesside/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/wesside/README#1 branch .. //depot/projects/gdb/tools/tools/net80211/wesside/dics/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/wesside/dics/dics.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/wesside/udps/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/wesside/udps/udps.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/wesside/wesside/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/wesside/wesside/wesside.c#1 branch .. //depot/projects/gdb/tools/tools/net80211/wlaninject/Makefile#1 branch .. //depot/projects/gdb/tools/tools/net80211/wlaninject/README#1 branch .. //depot/projects/gdb/tools/tools/net80211/wlaninject/wlaninject.c#1 branch .. //depot/projects/gdb/usr.bin/split/split.1#4 integrate .. //depot/projects/gdb/usr.bin/split/split.c#4 integrate .. //depot/projects/gdb/usr.sbin/Makefile#14 integrate .. //depot/projects/gdb/usr.sbin/kldxref/Makefile#3 integrate .. //depot/projects/gdb/usr.sbin/kldxref/kldxref.c#6 integrate .. //depot/projects/gdb/usr.sbin/mailwrapper/mailwrapper.8#3 integrate .. //depot/projects/gdb/usr.sbin/mailwrapper/mailwrapper.c#3 integrate .. //depot/projects/gdb/usr.sbin/ngctl/Makefile#3 integrate .. //depot/projects/gdb/usr.sbin/ngctl/main.c#4 integrate .. //depot/projects/gdb/usr.sbin/sade/Makefile#2 integrate .. //depot/projects/gdb/usr.sbin/sade/command.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/config.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/devices.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/disks.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/dispatch.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/dmenu.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/globals.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/install.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/keymap.c#2 delete .. //depot/projects/gdb/usr.sbin/sade/label.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/list.h#2 integrate .. //depot/projects/gdb/usr.sbin/sade/main.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/menus.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/misc.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/msg.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/rtermcap.c#2 delete .. //depot/projects/gdb/usr.sbin/sade/sade.8#2 integrate .. //depot/projects/gdb/usr.sbin/sade/sade.h#2 integrate .. //depot/projects/gdb/usr.sbin/sade/system.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/termcap.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/usb.c#2 delete .. //depot/projects/gdb/usr.sbin/sade/variable.c#2 integrate .. //depot/projects/gdb/usr.sbin/sade/wizard.c#2 integrate Differences ... ==== //depot/projects/gdb/Makefile.inc1#16 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.550 2006/08/02 15:26:15 netchild Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.552 2006/08/09 11:03:06 netchild Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir ==== //depot/projects/gdb/ObsoleteFiles.inc#2 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.41 2006/07/08 03:22:44 avatar Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.42 2006/08/04 21:29:22 brooks Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20060704: KAME compat file net_osdep.h removed +OLD_FILES+=usr/include/net/net_osdep.h # 20060517: pcvt removed OLD_FILES+=usr/share/pcvt/README.FIRST OLD_FILES+=usr/share/pcvt/Etc/xmodmap-german ==== //depot/projects/gdb/etc/defaults/rc.conf#16 (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/gdb/gnu/usr.bin/groff/tmac/mdoc.local#7 (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.54 2006/08/08 19:47:10 ru 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) @@ -62,6 +63,7 @@ . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-5.5 5.5 +.ds doc-operating-system-FreeBSD-6.2 6.2 .ds doc-operating-system-FreeBSD-7.0 7.0 . .ec ==== //depot/projects/gdb/lib/libc/gen/msgctl.3#2 (text+ko) ==== @@ -29,7 +29,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/gen/msgctl.3,v 1.19 2003/09/08 19:57:14 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/msgctl.3,v 1.20 2006/08/09 18:05:44 maxim Exp $ .\"/ .Dd November 24, 1997 .Dt MSGCTL 3 @@ -83,7 +83,7 @@ The .Vt ipc_perm structure used inside the -.Vt shmid_ds +.Vt msqid_ds structure is defined in .In sys/ipc.h and looks like this: ==== //depot/projects/gdb/lib/libc/gen/syslog.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/29/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.37 2006/05/11 09:10:33 davidxu Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.38 2006/08/07 20:12:18 phk Exp $"); #include "namespace.h" #include @@ -116,7 +116,7 @@ h->base += len; h->left -= len; } - return 0; + return len; } /* ==== //depot/projects/gdb/lib/libthr/thread/thr_init.c#9 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_init.c,v 1.37 2006/07/25 12:50:05 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_init.c,v 1.38 2006/08/08 04:42:41 davidxu Exp $ */ #include "namespace.h" @@ -99,6 +99,7 @@ }; pid_t _thr_pid; +int _thr_smp_cpus = 1; size_t _thr_guard_default; size_t _thr_stack_default = THR_STACK_DEFAULT; size_t _thr_stack_initial = THR_STACK_INITIAL; @@ -443,6 +444,8 @@ len = sizeof (_usrstack); if (sysctl(mib, 2, &_usrstack, &len, NULL, 0) == -1) PANIC("Cannot get kern.usrstack from sysctl"); + len = sizeof(_thr_smp_cpus); + sysctlbyname("kern.smp.cpus", &_thr_smp_cpus, &len, NULL, 0); _thr_page_size = getpagesize(); _thr_guard_default = _thr_page_size; _pthread_attr_default.guardsize_attr = _thr_guard_default; ==== //depot/projects/gdb/lib/libthr/thread/thr_mutex.c#11 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.44 2006/07/17 09:23:44 delphij Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.45 2006/08/08 05:04:43 davidxu Exp $ */ #include "namespace.h" @@ -128,7 +128,6 @@ pmutex->m_prio = attr->m_ceiling; else pmutex->m_prio = -1; - pmutex->m_saved_prio = 0; MUTEX_INIT_LINK(pmutex); *mutex = pmutex; return (0); @@ -191,7 +190,6 @@ (*mutex)->m_count = 0; (*mutex)->m_refcount = 0; (*mutex)->m_prio = 0; - (*mutex)->m_saved_prio = 0; return (0); } ==== //depot/projects/gdb/lib/libthr/thread/thr_private.h#14 (text+ko) ==== @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_private.h,v 1.66 2006/07/12 06:13:18 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_private.h,v 1.68 2006/08/08 05:04:43 davidxu Exp $ */ #ifndef _THR_PRIVATE_H @@ -121,18 +121,10 @@ int m_refcount; /* - * Used for priority inheritence and protection. - * - * m_prio - For priority inheritence, the highest active - * priority (threads locking the mutex inherit - * this priority). For priority protection, the - * ceiling priority of this mutex. - * m_saved_prio - mutex owners inherited priority before - * taking the mutex, restored when the owner - * unlocks the mutex. + * Used for priority protection, the ceiling priority of + * this mutex. */ int m_prio; - int m_saved_prio; /* * Link for list of all mutexes a thread currently owns. @@ -588,6 +580,8 @@ extern struct pthread_prio _thr_priorities[] __hidden; extern pid_t _thr_pid __hidden; +extern int _thr_smp_cpus __hidden; + extern size_t _thr_guard_default __hidden; extern size_t _thr_stack_default __hidden; extern size_t _thr_stack_initial __hidden; ==== //depot/projects/gdb/lib/libthr/thread/thr_pspinlock.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/lib/libthr/thread/thr_pspinlock.c,v 1.2 2006/04/04 02:57:49 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_pspinlock.c,v 1.3 2006/08/08 04:42:41 davidxu Exp $ */ #include "namespace.h" @@ -104,13 +104,17 @@ count = SPIN_COUNT; while ((ret = THR_UMTX_TRYLOCK(curthread, &lck->s_lock)) != 0) { while (lck->s_lock) { -#ifdef __i386__ - /* tell cpu we are spinning */ - __asm __volatile("pause"); + if (_thr_smp_cpus <= 1) { + _pthread_yield(); + } else { +#if defined(__i386__) || defined(__x86_64__) + /* tell cpu we are spinning */ + __asm __volatile("pause"); #endif - if (--count <= 0) { - count = SPIN_COUNT; - _pthread_yield(); + if (--count <= 0) { + count = SPIN_COUNT; + _pthread_yield(); + } } } } ==== //depot/projects/gdb/libexec/tftpd/tftpd.8#4 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/libexec/tftpd/tftpd.8,v 1.18 2004/07/07 19:57:14 ru Exp $ +.\" $FreeBSD: src/libexec/tftpd/tftpd.8,v 1.19 2006/08/07 16:05:55 yar Exp $ .\" .Dd September 14, 2000 .Dt TFTPD 8 @@ -39,7 +39,7 @@ .Nm tftpd .Nd Internet Trivial File Transfer Protocol server .Sh SYNOPSIS -.Nm /usr/libexec/tftpd +.Nm tftpd .Op Fl cClnw .Op Fl s Ar directory .Op Fl u Ar user @@ -70,8 +70,11 @@ .Nm will allow only publicly readable files to be accessed. -Files containing the string ``/\|\fB.\|.\fP\|/'' or starting with -``\|\fB.\|.\fP\|/'' are not allowed. +Files containing the string +.Dq Li "/../" +or starting with +.Dq Li "../" +are not allowed. Files may be written only if they already exist and are publicly writable. Note that this extends the concept of .Dq public @@ -85,7 +88,7 @@ .Nm with a list of directories by including up to 20 pathnames as server program arguments in -.Pa /etc/inetd.conf . +.Xr inetd.conf 5 . In this case access is restricted to files whose names are prefixed by the one of the given directories. The given directories are also treated as a search path for @@ -94,21 +97,24 @@ The .Fl s option provides additional security by changing -.Nm Ns No 's -root directory, thereby prohibiting accesses outside of the specified +the root directory of +.Nm , +thereby prohibiting accesses to outside of the specified .Ar directory . Because .Xr chroot 2 requires super-user privileges, .Nm -must be run as root. +must be run as +.Li root . However, after performing the -.Fn chroot , +.Xr chroot 2 +call, .Nm -will set its user id to that of the specified +will set its user ID to that of the specified .Ar user , or -.Dq nobody +.Dq Li nobody if no .Fl u option is specified. @@ -116,8 +122,9 @@ The options are: .Bl -tag -width Ds .It Fl c -Changes the default root directory of a connecting host via chroot based on the -connecting IP address. +Changes the default root directory of a connecting host via +.Xr chroot 2 +based on the connecting IP address. This prevents multiple clients from writing to the same file at the same time. If the directory does not exist, the client connection is refused. The @@ -131,15 +138,17 @@ Operates the same as .Fl c except it falls back to -.Fl s Ns No 's .Ar directory +specified via +.Fl s if a directory does not exist for the client's IP. .It Fl l Log all requests using .Xr syslog 3 with the facility of .Dv LOG_FTP . -Note: Logging of +.Sy Note : +Logging of .Dv LOG_FTP messages must also be enabled in the syslog configuration file, @@ -151,15 +160,15 @@ Cause .Nm to change its root directory to -.Pa directory . -After changing roots but before accepting commands, +.Ar directory . +After doing that but before accepting commands, .Nm will switch credentials to an unprivileged user. .It Fl u Ar user Switch credentials to .Ar user (default -.Dq nobody ) +.Dq Li nobody ) when the .Fl s option is used. @@ -169,7 +178,7 @@ .Ar umask for newly created files. The default is 022 -.Pq Dv S_IWGRP | S_IWOTH . +.Pq Dv S_IWGRP No | Dv S_IWOTH . .It Fl w Allow writes requests to create new files. By default @@ -179,8 +188,11 @@ .Sh SEE ALSO .Xr tftp 1 , .Xr chroot 2 , -.Xr inetd 8 , -.Xr syslogd 8 +.Xr syslog 3 , +.Xr inetd.conf 5 , +.Xr services 5 , +.Xr syslog.conf 5 , +.Xr inetd 8 .Rs .%A K. R. Sollins .%T The TFTP Protocol (Revision 2) ==== //depot/projects/gdb/sbin/dump/optr.c#6 (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 @@ -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/gdb/sbin/geom/class/eli/geli.8#2 (text+ko) ==== @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.13 2006/06/06 19:03:51 brueffer Exp $ +.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.15 2006/08/09 18:35:31 maxim Exp $ .\" -.Dd June 5, 2006 +.Dd August 9, 2006 .Dt GELI 8 .Os .Sh NAME @@ -64,7 +64,7 @@ .Cm init .Nm .Cm attach -.Op Fl dpv +.Op Fl dprv .Op Fl k Ar keyfile .Ar prov .Nm @@ -288,6 +288,9 @@ option for the .Cm detach subcommand. +.It Fl r +Attach read-only provider. +It will not be opened for writting. .It Fl k Ar keyfile Specifies a file which contains part of the key. For more information see the description of the ==== //depot/projects/gdb/sbin/geom/class/eli/geom_eli.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004 Pawel Jakub Dawidek + * Copyright (c) 2004-2006 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/class/eli/geom_eli.c,v 1.12 2006/06/06 22:06:24 pjd Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/class/eli/geom_eli.c,v 1.14 2006/08/09 18:11:13 pjd Exp $"); #include #include @@ -78,7 +78,7 @@ * * init [-bhPv] [-a aalgo] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] prov * label - alias for 'init' - * attach [-dpv] [-k keyfile] prov + * attach [-dprv] [-k keyfile] prov * detach [-fl] prov ... * stop - alias for 'detach' * onetime [-d] [-a aalgo] [-e ealgo] [-l keylen] prov ... @@ -124,9 +124,10 @@ { 'd', "detach", NULL, G_TYPE_NONE }, { 'k', "keyfile", keyfile, G_TYPE_STRING }, { 'p', "nopassphrase", NULL, G_TYPE_NONE }, + { 'r', "readonly", NULL, G_TYPE_NONE }, G_OPT_SENTINEL }, - "[-dpv] [-k keyfile] prov" + "[-dprv] [-k keyfile] prov" }, { "detach", 0, NULL, { @@ -393,7 +394,7 @@ } } /* - * If md_iterations is equal to 0, user don't want PKCS5v2. + * If md_iterations is equal to 0, user don't want PKCS#5v2. */ if (md->md_iterations == 0) { g_eli_crypto_hmac_update(&ctx, md->md_salt, ==== //depot/projects/gdb/sbin/ipfw/ipfw2.c#11 (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 @@ -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/gdb/share/examples/drivers/make_device_driver.sh#2 (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.24 2006/08/09 10:53:26 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} <${TOP}/conf/files.${UPPER} <${TOP}/i386/conf/${UPPER} <>${TOP}/i386/conf/${UPPER} - cat >>${TOP}/i386/conf/${UPPER} < #include -#include -#include #include #include @@ -198,7 +205,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 +226,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 +236,6 @@ .d_poll = ${1}poll, .d_mmap = ${1}mmap, .d_name = "${1}", - .d_maj = CDEV_MAJOR, }; static devclass_t ${1}_devclass; @@ -818,7 +824,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 +846,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 +858,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 +870,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 +885,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 +900,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 +919,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 +973,40 @@ .include 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 -n "Do you want to build the '${UPPER}' kernel? [Y]" +read VAL +if [ "-z" "$VAL" ]; then + VAL=YES +fi +case ${VAL} in >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Aug 9 22:14:39 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 84A0A16A4E8; Wed, 9 Aug 2006 22:14:39 +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 5C89216A4DA for ; Wed, 9 Aug 2006 22:14:39 +0000 (UTC) (envelope-from adamartin@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0E4243D5F for ; Wed, 9 Aug 2006 22:14:32 +0000 (GMT) (envelope-from adamartin@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 k79MEWjT015805 for ; Wed, 9 Aug 2006 22:14:32 GMT (envelope-from adamartin@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79MEW2o015802 for perforce@freebsd.org; Wed, 9 Aug 2006 22:14:32 GMT (envelope-from adamartin@FreeBSD.org) Date: Wed, 9 Aug 2006 22:14:32 GMT Message-Id: <200608092214.k79MEW2o015802@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to adamartin@FreeBSD.org using -f From: Adam Martin To: Perforce Change Reviews Cc: Subject: PERFORCE change 103535 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: Wed, 09 Aug 2006 22:14:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=103535 Change 103535 by adamartin@adamartin_hobbes on 2006/08/09 22:14:10 Implemented most of vfsops. Need to implement vfs_root, so that we do not get panics on "lost mount". Also need to implement a few vnops, and import my other work on the protocol handler. Affected files ... .. //depot/projects/soc2006/adamartin_autofs/autofs/Makefile#2 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/README#2 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs.c#2 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs.h#2 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_vfsops.c#2 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_vnops.c#2 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/cleanup.h#2 edit .. //depot/projects/soc2006/adamartin_autofs/mount_autofs/mount_autofs.c#2 edit Differences ... ==== //depot/projects/soc2006/adamartin_autofs/autofs/Makefile#2 (text+ko) ==== @@ -30,6 +30,16 @@ AUTOFS_FS_SOURCE=autofs_vnops.c autofs_vfsops.c vnode_if.h AUTOFS_CORE_SOURCE=autofs.c protocol.c SRCS=$(AUTOFS_CORE_SOURCE) $(AUTOFS_FS_SOURCE) $(AUTOFS_DEV_SOURCE) +HEADERS=autofs.h cleanup.h protocol.h KMOD=autofs +autofs.c: $(HEADERS) + +autofs_vfsops.c: $(HEADERS) + +autofs_vnops.c: $(HEADERS) + +autofs_ctl.c: $(HEADERS) + + .include ==== //depot/projects/soc2006/adamartin_autofs/autofs/README#2 (text+ko) ==== @@ -1,0 +1,2 @@ +FreeBSD Autofs is written by ADAM David Alan Martin, for Google +Summer of Code, 2006. ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs.c#2 (text+ko) ==== @@ -44,7 +44,10 @@ #include #include "cleanup.h" +#include +#include + #define AUTOFS_CTL_DEV_NAME "autofs_ctl" @@ -108,4 +111,29 @@ return( err ); } + +int +vn_iscdev(struct vnode *vp, int *errp) +{ + int error = 0; + + dev_lock(); + + if (vp->v_type != VCHR) + error = ENODEV; + + #ifdef USE_EXTENDED_DEV_CHECK + else if (vp->v_rdev == NULL) + error = ENXIO; + else if (vp->v_rdev->si_devsw == NULL) + error = ENXIO; + #endif + dev_unlock(); + + + if (errp != NULL) + *errp = error; + return (error == 0); +} + DEV_MODULE( AutoFS, autofs_handle_loader, NULL ); ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs.h#2 (text+ko) ==== @@ -31,25 +31,42 @@ #define __AUTOFS_MAIN_HEADER__ -#define USE_SETJMP_CLEANUP -#define NO_USE_SETJMP_INCLUDE -#define NO_CLEANUP_WARNING +//#define USE_SETJMP_CLEANUP +//#define NO_USE_SETJMP_INCLUDE +//#define NO_CLEANUP_WARNING #define KPRINTF( a, ... ) \ - printf( a, ## __VA_ARGS__ );\ - uprintf( a, ## __VA_ARGS__ ); + do {\ + printf( a, ## __VA_ARGS__ );\ + uprintf( a, ## __VA_ARGS__ );\ + } while( 0 ) + + + +#ifndef DEBUG_LEVEL +#define DEBUG_LEVEL 8 +#endif /** DEBUG_LEVEL **/ + +#define DEBUG_L( level ) if( DEBUG_LEVEL >= level ) +#define DEBUG DEBUG8 -#define DEBUGGING_ON 1 +#define DEBUG1 DEBUG_L( 1 ) +#define DEBUG2 DEBUG_L( 2 ) +#define DEBUG3 DEBUG_L( 3 ) +#define DEBUG4 DEBUG_L( 4 ) +#define DEBUG5 DEBUG_L( 5 ) +#define DEBUG6 DEBUG_L( 6 ) +#define DEBUG7 DEBUG_L( 7 ) +#define DEBUG8 DEBUG_L( 8 ) -#define DEBUG if( DEBUGGING_ON ) #define STOR_NAME_MAX 64 -#define MNT_TARGET ( "target" ) +#define MNT_TARGET ( "fspath" ) #define MNT_DEVICE ( "from" ) @@ -68,10 +85,15 @@ struct cdev *ctrl_dev; }; +#define entity( member, value )\ + .member = value + #define VFSTOAUTOFS(mp) ((struct autofs_mount *)((mp)->mnt_data)) +int vn_iscdev( struct vnode *vp, int *errp ); + //extern struct vop_vector autofs_vnodeops; ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_vfsops.c#2 (text+ko) ==== @@ -55,55 +55,106 @@ -MALLOC_DEFINE( M_AUTOFS_MOUNTBUF, "AutoFS mntbuf", "AutoFS mountpoint data, to simulate filesystem contents." ); + + +MALLOC_DEFINE(M_AUTOFS_MOUNTBUF, "AutoFS mntbuf", "AutoFS mountpoint data, to simulate filesystem contents."); static int -autofs_mount( struct mount *mp, struct thread *td ) +autofs_mount(struct mount *mp, struct thread *td) { - $cleanup_init; + $cleanup_init_size(8); int error = 0; struct vnode *devvp; - //struct autofs_mount *a_mnt; + struct autofs_mount *a_mnt; struct nameidata ndp; /* Mount point path and length */ char *m_dev; + devvp= NULL; + DEBUG KPRINTF("Now mounting autofs...\n"); /* Update and rootfs are not allowed. */ - if ((mp->mnt_flag & (MNT_ROOTFS | MNT_UPDATE)) != 0) + if ((mp->mnt_flag & (MNT_UPDATE)) != 0) { + DEBUG KPRINTF("Failed update\n"); + $return (EOPNOTSUPP); + } + if ((mp->mnt_flag & (MNT_ROOTFS)) != 0) { + DEBUG KPRINTF("Failed autofs\n"); $return (EOPNOTSUPP); + } + /* Get the mount device (which is the autofs ctl point) */ m_dev = vfs_getopts(mp->mnt_optnew, MNT_DEVICE, &error); - if (error != 0) + if (error != 0) { + DEBUG KPRINTF("Failed in mount options\n"); $return (error); + } /* check that the device is a real device, and an autofs ctl point */ + DEBUG KPRINTF("Now going to lookup devvp...\n"); NDINIT(&ndp, LOOKUP, FOLLOW, UIO_SYSSPACE, m_dev, td); - if ((error = namei(&ndp)) != 0) + DEBUG KPRINTF("NDINIT done...\n"); + if ((error = namei(&ndp)) != 0) { + DEBUG KPRINTF("namei failed\n"); $return (error); + } + + DEBUG KPRINTF("device mounting from %s\n", ndp.ni_dirp); + NDFREE(&ndp, NDF_ONLY_PNBUF); + DEBUG KPRINTF("NDFREE done...\n" ); + devvp = ndp.ni_vp; + DEBUG KPRINTF("Devvp path is looked up...\n"); - $cleanup( vrele(devvp); ); - + $cleanup( + DEBUG KPRINTF("running vrele...\n"); + vrele(devvp); + DEBUG KPRINTF("vrele done...\n"); + ); - if (vn_isdisk(devvp, &error)){ + DEBUG KPRINTF("Done looking up devvp...\n"); + + if (!vn_iscdev(devvp, &error)){ + DEBUG KPRINTF("Device type check failed...\n" + "error: %d\n", error ); $return (error); } + + DEBUG KPRINTF("Making autofs mount structure..."); + a_mnt = (struct autofs_mount *) malloc(sizeof(struct autofs_mount), + M_AUTOFS_MOUNTBUF, M_WAITOK); + DEBUG KPRINTF("Done\n"); + + DEBUG KPRINTF("Getting newfsid..."); + vfs_getnewfsid(mp); + DEBUG KPRINTF("Done\n"); + + DEBUG KPRINTF("Setting vfs_mountedfrom..."); + vfs_mountedfrom(mp, "autofs"); + DEBUG KPRINTF("Done\n"); + + + //DEBUG $return (EOPNOTSUPP); + + $cleanup( + DEBUG KPRINTF("Mount done -- error = %d...\n", error); + ); + DEBUG KPRINTF("Leaving mount, invoking cleanups -- error = %d...\n", + error); $return (error); - } static int autofs_unmount(struct mount *mp, int mntflags, struct thread *td) { $cleanup_init; - void *mntdata; + //void *mntdata; int error = 0; int flags = 0; @@ -114,10 +165,14 @@ if((error = vflush(mp, 0, flags, td))) $return (error); - vinvalbuf( mp->mnt_data-> + //vinvalbuf( mp->mnt_data-> + + $return (error); +} static struct vfsops autofs_vfsops = { - .vfs_mount = autofs_mount, + entity(vfs_mount, autofs_mount), + entity(vfs_unmount, autofs_unmount), }; VFS_SET(autofs_vfsops, autofs, 0); ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_vnops.c#2 (text+ko) ==== @@ -26,3 +26,32 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "autofs.h" +#include "cleanup.h" +//#include "protocol.h" + + + +struct vop_vector autofs_vnodeops ={ + +}; ==== //depot/projects/soc2006/adamartin_autofs/autofs/cleanup.h#2 (text+ko) ==== @@ -70,7 +70,7 @@ #if defined( __GNUC__ ) && !defined( USE_SETJMP_CLEANUP ) -typedef void (*__cleanup_ptr)(); +typedef void (*__cleanup_ptr)( void ); typedef void *___generic___; @@ -85,7 +85,7 @@ #define REGISTER_ACTION( actions ) _REGISTER_ACTION( LN, actions ) #define _REGISTER_ACTION( name, actions ) \ - void ___cleanup_action_( name ) ()\ + static void ___cleanup_action_( name ) ( void )\ {\ actions\ }\ @@ -172,6 +172,13 @@ [ __CLEANUP_STACK_MAX__ ];\ __VOLATILE_IMPLEMENTATION__ int __CLEANUP_STACK_POINTER__= 0 + +#define CLEANUP_STACK_SIZE( size )\ + ___CLEANUP_STACK_EXTRAS___\ + __VOLATILE_IMPLEMENTATION__ __cleanup_ptr ___CLEANUP_STACK \ + [ size ];\ + __VOLATILE_IMPLEMENTATION__ int __CLEANUP_STACK_POINTER__= 0 + /** Use REGISTER_CLEANUP_LOCAL *** XXX BEFORE XXX *** you register an action to use that local with. It's just a void *. You must re-cast it to what is useful to you. **/ @@ -188,6 +195,7 @@ #define $cleanup_init CLEANUP_STACK +#define $cleanup_init_size( a ) CLEANUP_STACK_SIZE( a ) #define $cleanup( a ) REGISTER_ACTION( a ) #define $return leave ==== //depot/projects/soc2006/adamartin_autofs/mount_autofs/mount_autofs.c#2 (text+ko) ==== @@ -60,7 +60,7 @@ #define FSTYPE "autofs" #define FSTYPE_HANDLE "fstype" -#define SOURCE "source" +#define SOURCE "fspath" #define TARGET "from" @@ -82,40 +82,33 @@ char source[MAXPATHLEN]; char target[MAXPATHLEN]; - mntflags = 0; - while ((ch = getopt(argc, argv, "o:")) != -1) - switch(ch) { - case 'o': - getmntopts(optarg, mopts, &mntflags, 0); - break; - case '?': - default: - usage(); - } - argc -= optind; - argv += optind; - if (argc != 2) + if (argc != 3) usage(); /* resolve target and source with realpath(3) */ - (void)checkpath(argv[0], target); - (void)checkpath(argv[1], source); + //(void)checkpath(argv[0], target); + fprintf(stderr, "argv[ 1 ]= %s, argv[ 2 ]= %s\n", + argv[ 1 ], argv[ 2 ] ); + strcpy(target, argv[1]); + (void)checkpath(argv[2], source); iov[0].iov_base = FSTYPE_HANDLE; - iov[0].iov_len = sizeof(FSTYPE_HANDLE); + iov[0].iov_len = strlen(FSTYPE_HANDLE) + 1; iov[1].iov_base = FSTYPE; iov[1].iov_len = strlen(iov[1].iov_base) + 1; + iov[2].iov_base = SOURCE; - iov[2].iov_len = sizeof(SOURCE); + iov[2].iov_len = strlen(SOURCE) + 1; iov[3].iov_base = source; iov[3].iov_len = strlen(source) + 1; + iov[4].iov_base = TARGET; - iov[4].iov_len = sizeof(TARGET); + iov[4].iov_len = strlen(TARGET) + 1; iov[5].iov_base = target; iov[5].iov_len = strlen(target) + 1; - if (nmount(iov, 6, mntflags)) + if (nmount(iov, 6, MNT_RDONLY)) err(1, NULL); exit(0); } From owner-p4-projects@FreeBSD.ORG Wed Aug 9 23:39:21 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 1F74416A4E0; Wed, 9 Aug 2006 23:39:21 +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 D7BB216A4DE for ; Wed, 9 Aug 2006 23:39:20 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A413543D49 for ; Wed, 9 Aug 2006 23:39:20 +0000 (GMT) (envelope-from gabor@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 k79NdKHY020730 for ; Wed, 9 Aug 2006 23:39:20 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79NdKti020727 for perforce@freebsd.org; Wed, 9 Aug 2006 23:39:20 GMT (envelope-from gabor@FreeBSD.org) Date: Wed, 9 Aug 2006 23:39:20 GMT Message-Id: <200608092339.k79NdKti020727@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103537 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: Wed, 09 Aug 2006 23:39:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=103537 Change 103537 by gabor@gabor_server on 2006/08/09 23:39:14 Set PKGINSTALLVER sorrectly. PKG_INFO is already chrooted if DESTDIR is set. Submitted by: John E. Hein Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#76 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#76 (text+ko) ==== @@ -2342,7 +2342,7 @@ # Does the pkg_create tool support conflict checking? # XXX Slow? .if !defined(PKGINSTALLVER) -PKGINSTALLVER!= ${CHROOT} ${DESTDIR} ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //' +PKGINSTALLVER!= ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //' .endif .if ${PKGINSTALLVER} < 20030417 DISABLE_CONFLICTS= YES From owner-p4-projects@FreeBSD.ORG Thu Aug 10 01:35:56 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 DF73D16A4E1; Thu, 10 Aug 2006 01:35:55 +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 93EE316A4E0 for ; Thu, 10 Aug 2006 01:35:55 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5224A43D46 for ; Thu, 10 Aug 2006 01:35:55 +0000 (GMT) (envelope-from marcel@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 k7A1Ztj2037439 for ; Thu, 10 Aug 2006 01:35:55 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7A1ZtSc037436 for perforce@freebsd.org; Thu, 10 Aug 2006 01:35:55 GMT (envelope-from marcel@freebsd.org) Date: Thu, 10 Aug 2006 01:35:55 GMT Message-Id: <200608100135.k7A1ZtSc037436@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103544 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: Thu, 10 Aug 2006 01:35:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=103544 Change 103544 by marcel@marcel_nfs on 2006/08/10 01:35:24 Use defaults when sv_reg, sv_fpreg and/or sv_dbreg are NULL pointers. This allows most struct sysentvec definitions to leave these undefined. Affected files ... .. //depot/projects/gdb/sys/kern/sys_process.c#12 edit Differences ... ==== //depot/projects/gdb/sys/kern/sys_process.c#12 (text+ko) ==== @@ -61,10 +61,6 @@ #include #ifdef COMPAT_IA32 -#include -#include -#include - extern struct sysentvec ia32_freebsd_sysvec; struct ptrace_io_desc32 { @@ -300,15 +296,18 @@ switch (uap->req) { case PT_GETREGS: case PT_SETREGS: - bufsz = sv->sv_reg->rs_size; + bufsz = (sv->sv_reg != NULL) ? sv->sv_reg->rs_size : + sizeof(struct reg); break; case PT_GETFPREGS: case PT_SETFPREGS: - bufsz = sv->sv_fpreg->rs_size; + bufsz = (sv->sv_fpreg != NULL) ? sv->sv_fpreg->rs_size : + sizeof(struct fpreg); break; case PT_GETDBREGS: case PT_SETDBREGS: - bufsz = sv->sv_dbreg->rs_size; + bufsz = (sv->sv_dbreg != NULL) ? sv->sv_dbreg->rs_size : + sizeof(struct dbreg); break; case PT_GETXREGSIZE: bufsz = sizeof(size_t); @@ -396,6 +395,8 @@ struct thread *td2 = NULL; struct ptrace_io_desc *piod = NULL; struct ptrace_lwpinfo *pl; + ptregset_readf fread; + ptregset_writef fwrite; int error, write, tmp, num; int proctree_locked = 0; lwpid_t *buf; @@ -790,33 +791,45 @@ goto sendsig; /* in PT_CONTINUE above */ case PT_SETREGS: - error = ptrace_write_regf(td2, addr, sv->sv_reg->rs_write); + fwrite = (sv->sv_reg != NULL) ? sv->sv_reg->rs_write : + (ptregset_writef)set_regs; + error = ptrace_write_regf(td2, addr, fwrite); break; case PT_GETREGS: - error = ptrace_read_regf(td2, addr, sv->sv_reg->rs_read); + fread = (sv->sv_reg != NULL) ? sv->sv_reg->rs_read : + (ptregset_readf)fill_regs; + error = ptrace_read_regf(td2, addr, fread); break; case PT_SETFPREGS: - error = ptrace_write_regf(td2, addr, sv->sv_fpreg->rs_write); + fwrite = (sv->sv_fpreg != NULL) ? sv->sv_fpreg->rs_write : + (ptregset_writef)set_fpregs; + error = ptrace_write_regf(td2, addr, fwrite); break; case PT_GETFPREGS: - error = ptrace_read_regf(td2, addr, sv->sv_fpreg->rs_read); + fread = (sv->sv_fpreg != NULL) ? sv->sv_fpreg->rs_read : + (ptregset_readf)fill_fpregs; + error = ptrace_read_regf(td2, addr, fread); break; case PT_SETDBREGS: - error = ptrace_write_regf(td2, addr, sv->sv_dbreg->rs_write); + fwrite = (sv->sv_dbreg != NULL) ? sv->sv_dbreg->rs_write : + (ptregset_writef)set_dbregs; + error = ptrace_write_regf(td2, addr, fwrite); break; case PT_GETDBREGS: - error = ptrace_read_regf(td2, addr, sv->sv_dbreg->rs_read); + fread = (sv->sv_dbreg != NULL) ? sv->sv_dbreg->rs_read : + (ptregset_readf)fill_dbregs; + error = ptrace_read_regf(td2, addr, fread); break; case PT_SETXREGS: if (data >= 0 && data < sv->sv_nxregs) { - error = ptrace_write_regf(td2, addr, - sv->sv_xregs[data].rs_write); + fwrite = sv->sv_xregs[data].rs_write; + error = ptrace_write_regf(td2, addr, fwrite); } else error = EINVAL; break; @@ -832,8 +845,8 @@ case PT_GETXREGS: if (data >= 0 && data < sv->sv_nxregs) { - error = ptrace_read_regf(td2, addr, - sv->sv_xregs[data].rs_read); + fread = sv->sv_xregs[data].rs_read; + error = ptrace_read_regf(td2, addr, fread); } else error = EINVAL; break; From owner-p4-projects@FreeBSD.ORG Thu Aug 10 01:56:22 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 6A73D16A4DD; Thu, 10 Aug 2006 01:56:22 +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 3DE7E16A4E2 for ; Thu, 10 Aug 2006 01:56:22 +0000 (UTC) (envelope-from swhitman@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAD1A43D46 for ; Thu, 10 Aug 2006 01:56:21 +0000 (GMT) (envelope-from swhitman@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 k7A1uLQ0038548 for ; Thu, 10 Aug 2006 01:56:21 GMT (envelope-from swhitman@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7A1uLQj038545 for perforce@freebsd.org; Thu, 10 Aug 2006 01:56:21 GMT (envelope-from swhitman@FreeBSD.org) Date: Thu, 10 Aug 2006 01:56:21 GMT Message-Id: <200608100156.k7A1uLQj038545@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swhitman@FreeBSD.org using -f From: Spencer Whitman To: Perforce Change Reviews Cc: Subject: PERFORCE change 103545 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: Thu, 10 Aug 2006 01:56:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=103545 Change 103545 by swhitman@swhitman_joethecat on 2006/08/10 01:56:20 Implemented #undef. Fixed some bugs with #define. Affected files ... .. //depot/projects/soc2006/swhitman-K_Kernel_Meta-Language/k/cpp.c#16 edit Differences ... ==== //depot/projects/soc2006/swhitman-K_Kernel_Meta-Language/k/cpp.c#16 (text+ko) ==== @@ -48,7 +48,7 @@ /* XXX This should be optimized, but works for now */ struct macro_arg { const char *name; /* Argument name */ - int length /* Length of the arg name */ + int length; /* Length of the arg name */ int *offsets; /* Offset list */ TAILQ_ENTRY(macro_arg) list; /* Entry into the argument list */ }; @@ -65,13 +65,26 @@ TAILQ_ENTRY(define) list; /* Link to list of macros */ }; -#define FREE_LIST(HEAD,TYPE,LIST) do { \ - (TYPE) * tmpvar; \ - TAILQ_FOREACH(tmpvar, (HEAD), LIST) { \ - TAILQ_REMOVE(tmpvar, (HEAD), LIST); \ - free(tmpvar); \ - } \ -}while(0) +/* XXX Free const char * name value? */ +#define FREE_ARG_LIST(DEF) \ + do { \ + struct macro_arg * tmpvar = NULL; \ + for(; !TAILQ_EMPTY(&(DEF)->args); tmpvar = TAILQ_FIRST(&(DEF)->args)) { \ + TAILQ_REMOVE(&(DEF)->args, tmpvar, list); \ + free(tmpvar->offsets); \ + free(tmpvar); \ + } \ + } while(0) + +/* XXX Free const char * name value? */ +/* XXX Free const char * value value? */ +#define FREE_DEF(DEF) \ + do { \ + TAILQ_REMOVE(&define,(DEF),list); \ + FREE_ARG_LIST((DEF)); \ + free((DEF)); \ + }while(0) + static TAILQ_HEAD(,iarg) iarg = TAILQ_HEAD_INITIALIZER(iarg); static TAILQ_HEAD(,define) define = TAILQ_HEAD_INITIALIZER(define); @@ -180,6 +193,15 @@ expand_macro(struct define * mac, struct arg_ind * head) { } + + +static const char * +expand_string(char * word) { + /* Search the macro list to match word. If word matches a macro, return a + * pointer to the expanded macro, otherwise return word + */ + +} #endif /* -------------------------------------------------------------------*/ @@ -193,8 +215,13 @@ if (s == e) return; - /* Expand any macro expansions before passing this to the lexer */ + /* Expand any macros before passing String(s,e) to the lexer */ + /* Search through and grab each word to test if it is a macro */ + for(;;) { + break; + } + D(0x10, "expand <%V>\n", String(s, e)); Lexer(cfs->h->tokens, s, e); } @@ -270,11 +297,12 @@ cppfile(cfs->h, r); } + static void -calculate_offsets(struct macro_arg *arg __unused, struct define * mac __unused) +calculate_offsets(struct define * mac) { - - /* XXX Use strstr to find substrings of arg in mac */ + assert(mac->value != NULL); + assert(mac->length > 0); } @@ -287,6 +315,7 @@ new_arg = calloc(sizeof(*new_arg),1); assert(new_arg != NULL); + /* XXX Make sure the name conforms to ISO C std macro names (start with alpha char?) */ new_arg->name = String(b,e); printf("adding macro arg: %V\n",new_arg->name); @@ -304,8 +333,6 @@ } new_arg->length = strlen(new_arg->name); - - calculate_offsets(new_arg,mac); printf("added argument named: <%V> to macro named <%V>\n",new_arg->name, mac->name); @@ -372,6 +399,7 @@ case OBJ_MAC_TYPE: mac->value = String(name_e,e); + mac->length = strlen(mac->value); break; case FUNC_MAC_TYPE: @@ -394,30 +422,35 @@ } } - /* Macro was ill-formed. Free everything and exit with error */ + /* Macro was ill-formed. */ if(*p != ')') { - FREE_LIST(&mac->args, struct macro_args, list); - free(mac); + FREE_DEF(mac); errx(1, "Function macro has no ending \')\'"); } mac->value = String(p,e); + mac->length = strlen(mac->value); + calculate_offsets(mac); } break; default: break; } - mac->length = strlen(mac->value); - /* Add this macro to the defined list */ TAILQ_FOREACH(tmp, &define, list) { if(tmp == NULL) { - TAILQ_INSERT_TAIL(&define, mac, list); break; } /* Warn if redefining a previous definition */ - if(tmp->name == mac->name) + if(tmp->name == mac->name) { cpp_warning(cfs,NULL,b,e); + break; + } + } + + if(tmp == NULL) { + printf("adding macro named %s to the list\n",mac->name); + TAILQ_INSERT_TAIL(&define, mac, list); } } @@ -426,7 +459,17 @@ static void cpp_remove_define(const char *name) { - printf("Removing macro %s\n",name); + struct define * tmp; + + TAILQ_FOREACH(tmp, &define, list) { + if(tmp->name == name) { + printf("Removing macro %s\n",name); + FREE_DEF(tmp); + + /* XXX Could there still be more #defines with the same name in the list? */ + break; + } + } } /* @@ -443,9 +486,6 @@ static void cpp_define(CPP_ARGS) { - /* struct cppfilestate *cfs __unused, const char *h __unused, - const char *b __unused, const char *e __unused */ - struct ref *r; r = NewRef(cfs->h); @@ -453,7 +493,7 @@ r->ref.b = h; r->ref.e = e; r->ref.r = cfs->r; - + /* XXX Finish the ref cell stuff */ printf("#define of %V\n",String(b,e)); /* The first token is the macro name */ @@ -464,11 +504,9 @@ static void cpp_undef(CPP_ARGS) { - /* struct cppfilestate *cfs __unused, const char *h __unused, - const char *b __unused, const char *e __unused */ printf("#undef of %V\n",String(b,e)); - cpp_remove_define(String(b,e)); + cpp_remove_define(String(skipspace(cfs,b,e),e)); } static void From owner-p4-projects@FreeBSD.ORG Thu Aug 10 01:58:25 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 B686816A4E5; Thu, 10 Aug 2006 01:58:25 +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 7CA0F16A4DF for ; Thu, 10 Aug 2006 01:58:25 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEB6443D4C for ; Thu, 10 Aug 2006 01:58:24 +0000 (GMT) (envelope-from marcel@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 k7A1wOSW038642 for ; Thu, 10 Aug 2006 01:58:24 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7A1wOJB038639 for perforce@freebsd.org; Thu, 10 Aug 2006 01:58:24 GMT (envelope-from marcel@freebsd.org) Date: Thu, 10 Aug 2006 01:58:24 GMT Message-Id: <200608100158.k7A1wOJB038639@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103546 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: Thu, 10 Aug 2006 01:58:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=103546 Change 103546 by marcel@marcel_nfs on 2006/08/10 01:58:22 Define sv_reg, sv_fpreg and sv_dbreg for IA-32 emulation. Affected files ... .. //depot/projects/gdb/sys/compat/ia32/ia32_sysvec.c#7 edit Differences ... ==== //depot/projects/gdb/sys/compat/ia32/ia32_sysvec.c#7 (text+ko) ==== @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -67,6 +68,7 @@ #include #include #include +#include #include #ifdef __amd64__ #include @@ -99,6 +101,24 @@ SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode"); +static struct ptregset ia32_regs = { + .rs_size = sizeof(struct reg32), + .rs_read = (ptregset_readf)fill_regs32, + .rs_write = (ptregset_writef)set_regs32 +}; + +static struct ptregset ia32_fpregs = { + .rs_size = sizeof(struct fpreg32), + .rs_read = (ptregset_readf)fill_fpregs32, + .rs_write = (ptregset_writef)set_fpregs32 +}; + +static struct ptregset ia32_dbregs = { + .rs_size = sizeof(struct dbreg32), + .rs_read = (ptregset_readf)fill_dbregs32, + .rs_write = (ptregset_writef)set_dbregs32 +}; + struct sysentvec ia32_freebsd_sysvec = { FREEBSD32_SYS_MAXSYSCALL, freebsd32_sysent, @@ -125,7 +145,10 @@ VM_PROT_ALL, ia32_copyout_strings, ia32_setregs, - ia32_fixlimits + ia32_fixlimits, + &ia32_regs, + &ia32_fpregs, + &ia32_dbregs }; From owner-p4-projects@FreeBSD.ORG Thu Aug 10 15:09:22 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 8F22616A4EB; Thu, 10 Aug 2006 15:09:22 +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 6920816A4E1 for ; Thu, 10 Aug 2006 15:09:22 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC3C543D64 for ; Thu, 10 Aug 2006 15:09:16 +0000 (GMT) (envelope-from bushman@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 k7AF9G5Y022174 for ; Thu, 10 Aug 2006 15:09:16 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AF9FPd022171 for perforce@freebsd.org; Thu, 10 Aug 2006 15:09:15 GMT (envelope-from bushman@freebsd.org) Date: Thu, 10 Aug 2006 15:09:15 GMT Message-Id: <200608101509.k7AF9FPd022171@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 103575 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: Thu, 10 Aug 2006 15:09:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=103575 Change 103575 by bushman@bushman_nss_ldap_cached on 2006/08/10 15:08:13 IFC. _icmp_ nsswitch source functionality will be moved to the separate nss_icmp module library. Currently it is omitted in the branch. Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/etc/defaults/rc.conf#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/mtree/BSD.include.dist#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/mtree/BSD.local.dist#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/mtree/BSD.usr.dist#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/Makefile#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/archdep#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/dhclient#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/ipfw#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/kernel#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/mdconfig#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/mdconfig2#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/mountcritlocal#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/mountlate#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/natd#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/ntpdate#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.subr#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/include/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/Makefile#6 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/getgrent.c#4 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/msgctl.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/syslog.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/tls.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/Makefile.inc#6 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/getaddrinfo.c#4 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/name6.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/resolver.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/posix1e/Makefile.inc#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/posix1e/mac_is_present.3#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/posix1e/mac_is_present_np.3#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/posix1e/mac_prepare.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/posix1e/mac_set.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/posix1e/mac_text.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/resolv/res_init.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/resolv/res_send.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/stdlib/malloc.c#4 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/Symbol.map#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/kse.2#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/uuid/uuid_compare.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_group.c#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_group.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_fs_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_network_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swinstalled_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/config/config.y#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/config/mkmakefile.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cron/cron/cron.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/elf2exe/Makefile#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/elf2exe/elf2exe.8#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/elf2exe/elf2exe.c#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/fdread/fdread.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/i4b/isdnd/controller.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/i4b/isdnd/main.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/i4b/isdndebug/main.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/i4b/isdnmonitor/main.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/i4b/isdnphone/main.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/i4b/isdntelctl/main.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/i4b/isdntest/main.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/inetd/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/kldxref/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/kldxref/kldxref.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/lpr/Makefile.inc#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/lpr/lpd/printjob.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mailwrapper/mailwrapper.8#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mailwrapper/mailwrapper.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mld6query/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mountd/mountd.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/moused/moused.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mtree/misc.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mtree/mtree.8#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mtree/mtree.h#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mtree/spec.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mtree/test/test05.sh#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mtree/verify.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/ndp/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/newsyslog/newsyslog.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/newsyslog/newsyslog.conf.5#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/ngctl/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/ngctl/config.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/ngctl/debug.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/ngctl/main.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/ngctl/mkpeer.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/ngctl/name.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/ngctl/status.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/ngctl/types.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/nvram/Makefile#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/nvram/nvram.8#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/nvram/nvram.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pkg_install/lib/url.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rip6query/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/route6d/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rrenumd/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rtadvd/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rtsold/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/Makefile#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/command.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/config.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/devices.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/disks.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/dispatch.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/dmenu.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/globals.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/help/partition.hlp#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/help/slice.hlp#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/install.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/label.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/list.h#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/main.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/menus.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/misc.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/msg.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/sade.8#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/sade.h#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/system.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/termcap.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/variable.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sade/wizard.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sysinstall/devices.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sysinstall/install.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sysinstall/main.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sysinstall/misc.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sysinstall/sysinstall.h#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/syslogd/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/traceroute6/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/trpt/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/trpt/trpt.c#2 integrate Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/defaults/rc.conf#3 (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.288 2006/06/07 17:14:27 brueffer Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.291 2006/08/05 20:28:50 njl Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -261,6 +261,8 @@ ntpdate_enable="NO" # Run ntpdate to sync time on boot (or NO). ntpdate_program="/usr/sbin/ntpdate" # path to ntpdate, if you want a different one. ntpdate_flags="-b" # Flags to ntpdate (if enabled). +ntpdate_config="/etc/ntp.conf" # ntpdate(8) configuration file +ntpdate_hosts="" # Whitespace-separated list of ntpdate(8) servers. ntpd_enable="NO" # Run ntpd Network Time Protocol (or NO). ntpd_program="/usr/sbin/ntpd" # path to ntpd, if you want a different one. ntpd_config="/etc/ntp.conf" # ntpd(8) configuration file @@ -480,7 +482,6 @@ linux_enable="NO" # Linux binary compatibility loaded at startup (or NO). svr4_enable="NO" # SysVR4 emulation loaded at startup (or NO). -osf1_enable="NO" # Alpha OSF/1 emulation loaded at startup (or NO). clear_tmp_enable="NO" # Clear /tmp at startup. clear_tmp_X="YES" # Clear and recreate X11-related directories in /tmp ldconfig_insecure="NO" # Set to YES to disable ldconfig security checks @@ -500,7 +501,6 @@ # in the system booting with securelevel set to 1, as # init(8) will raise the level when rc(8) completes. update_motd="YES" # update version info in /etc/motd (or NO) -unaligned_print="YES" # print unaligned access warnings on the alpha (or NO). entropy_file="/entropy" # Set to NO to disable caching entropy through reboots. # /var/db/entropy-file is preferred if / is not avail. entropy_dir="/var/db/entropy" # Set to NO to disable caching entropy via cron. @@ -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/soc2006/nss_ldap_cached/src/etc/mtree/BSD.include.dist#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.106 2006/03/19 15:44:53 rwatson Exp $ +# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.107 2006/08/01 22:19:00 sobomax Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -56,6 +56,8 @@ .. ppbus .. + powermac_nvram + .. smbus .. speaker ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/mtree/BSD.local.dist#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.118 2006/01/08 10:15:30 dougb Exp $ +# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.119 2006/08/02 17:22:30 marcel Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -111,8 +111,6 @@ cat3 .. cat4 - alpha - .. i386 .. .. @@ -123,8 +121,6 @@ cat7 .. cat8 - alpha - .. i386 .. .. ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/mtree/BSD.usr.dist#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.314 2006/05/17 09:33:05 phk Exp $ +# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.319 2006/08/03 05:44:51 jb Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -18,6 +18,10 @@ aout .. .. + dtrace + .. + engines + .. .. libdata gcc @@ -653,8 +657,6 @@ cat3 .. cat4 - alpha - .. amd64 .. i386 @@ -669,8 +671,6 @@ cat7 .. cat8 - alpha - .. amd64 .. i386 @@ -690,8 +690,6 @@ cat3 .. cat4 - alpha - .. amd64 .. i386 @@ -706,8 +704,6 @@ cat7 .. cat8 - alpha - .. amd64 .. i386 @@ -766,8 +762,6 @@ man3 .. man4 - alpha - .. amd64 .. i386 @@ -782,8 +776,6 @@ man7 .. man8 - alpha - .. amd64 .. i386 ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.73 2006/06/01 11:01:54 thompsa Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.74 2006/08/04 18:37:03 des Exp $ .include @@ -21,7 +21,7 @@ jail \ kadmind kerberos kernel keyserv kldxref kpasswdd \ ldconfig local localpkg lpd \ - mixer motd mountcritlocal mountcritremote \ + mixer motd mountcritlocal mountcritremote mountlate \ mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \ named natd netif netoptions \ network_ipv6 newsyslog nfsclient nfsd \ ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/archdep#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/archdep,v 1.11 2006/02/19 08:18:48 dougb Exp $ +# $FreeBSD: src/etc/rc.d/archdep,v 1.12 2006/07/21 15:55:18 yar Exp $ # # PROVIDE: archdep @@ -13,27 +13,6 @@ start_cmd="archdep_start" stop_cmd=":" -# should we print out unaligned access warnings? -# -unaligned_warnings() -{ - if ! checkyesno unaligned_print; then - sysctl machdep.unaligned_print=0 - fi -} - -# Alpha OSF/1 binary emulation -# -osf1_compat() -{ - if checkyesno osf1_enable; then - echo -n ' OSF/1' - if ! kldstat -v | grep osf1_ecoff > /dev/null; then - kldload osf1 > /dev/null 2>&1 - fi - fi -} - # SCO binary emulation # ibcs2_compat() @@ -61,10 +40,6 @@ i386) ibcs2_compat ;; - alpha) - osf1_compat - unaligned_warnings - ;; esac echo '.' } ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/dhclient#2 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh # # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/dhclient,v 1.21 2005/07/26 00:37:19 brooks Exp $ +# $FreeBSD: src/etc/rc.d/dhclient,v 1.22 2006/07/09 06:54:24 stefanf Exp $ # # PROVIDE: dhclient @@ -18,7 +18,7 @@ dhclient_start() { - # prevent unnecessicary restarts + # prevent unnecessary restarts # XXX: should use a pidfile if [ -x /usr/bin/pgrep ]; then pids=`/usr/bin/pgrep -f "dhclient: $ifn(\$| .*)"` ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/ipfw#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ipfw,v 1.12 2006/02/26 16:45:29 wkoszek Exp $ +# $FreeBSD: src/etc/rc.d/ipfw,v 1.13 2006/07/25 17:28:18 yar Exp $ # # PROVIDE: ipfw @@ -35,23 +35,21 @@ [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall if [ -r "${firewall_script}" ]; then - echo -n 'Starting divert daemons:' if [ -f /etc/rc.d/natd ] ; then /etc/rc.d/natd start fi . "${firewall_script}" - echo -n 'Firewall rules loaded' + echo 'Firewall rules loaded.' elif [ "`ipfw list 65535`" = "65535 deny ip from any to any" ]; then echo 'Warning: kernel has firewall functionality, but' \ ' firewall rules are not enabled.' echo ' All ip services are disabled.' fi - echo '.' # Firewall logging # if checkyesno firewall_logging; then - echo 'Firewall logging enabled' + echo 'Firewall logging enabled.' sysctl net.inet.ip.fw.verbose=1 >/dev/null fi ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/kernel#2 (text) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/kernel,v 1.1 2006/03/17 16:28:12 des Exp $ +# $FreeBSD: src/etc/rc.d/kernel,v 1.2 2006/07/30 12:54:37 mckay Exp $ # # PROVIDE: kernel @@ -16,8 +16,10 @@ kernel_start() { bootdir=$(dirname $(sysctl -n kern.bootfile)) - if [ ! -e /boot/kernel -o -h /boot/kernel ] ; then - ln -hfs ${bootdir} /boot/kernel + if [ "$bootdir" != /boot/kernel ] ; then + if [ ! -e /boot/kernel -o -h /boot/kernel ] ; then + ln -hfs ${bootdir} /boot/kernel + fi fi } ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/mdconfig#2 (text) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/mdconfig,v 1.2 2006/05/18 16:04:56 flz Exp $ +# $FreeBSD: src/etc/rc.d/mdconfig,v 1.3 2006/07/25 17:19:00 pjd Exp $ # # PROVIDE: mdconfig @@ -103,6 +103,11 @@ { local _md _mp _config _type _dev _file _fs _newfs _fsck_cmd + # If there are no devices return before loading geom_md.ko. + if [ -z "${_mdconfig_list}" ]; then + return + fi + kldstat -q -m g_md || kldload geom_md || err 1 "geom_md failed to load." for _md in ${_mdconfig_list}; do ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/mdconfig2#2 (text) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/mdconfig2,v 1.2 2006/05/18 16:04:56 flz Exp $ +# $FreeBSD: src/etc/rc.d/mdconfig2,v 1.3 2006/07/25 17:19:00 pjd Exp $ # # PROVIDE: mdconfig2 @@ -111,6 +111,11 @@ { local _md _fs _mp _mounted _dev _config _type _file _owner _perms _files _populate _fsck_cmd _i + # If there are no devices return before loading geom_md.ko. + if [ -z "${_mdconfig2_list}" ]; then + return + fi + kldstat -q -m g_md || kldload geom_md || err 1 "geom_md failed to load." for _md in ${_mdconfig2_list}; do ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/mountcritlocal#2 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh # # $NetBSD: mountcritlocal,v 1.7 2002/04/29 12:29:53 lukem Exp $ -# $FreeBSD: src/etc/rc.d/mountcritlocal,v 1.12 2004/10/07 13:55:26 mtm Exp $ +# $FreeBSD: src/etc/rc.d/mountcritlocal,v 1.13 2006/07/12 16:05:51 des Exp $ # # PROVIDE: mountcritlocal @@ -27,6 +27,7 @@ esac # Mount everything except nfs filesystems. + echo -n 'Mounting local file systems:' mount_excludes='no' for i in ${netfs_types}; do fstype=${i%:*} @@ -34,6 +35,7 @@ done mount_excludes=${mount_excludes%,} mount -a -t ${mount_excludes} + echo '.' case $? in 0) ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/natd#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/natd,v 1.3 2004/10/22 19:36:03 andre Exp $ +# $FreeBSD: src/etc/rc.d/natd,v 1.4 2006/07/25 17:25:44 yar Exp $ # # PROVIDE: natd @@ -12,8 +12,8 @@ name="natd" rcvar=`set_rcvar` command="/sbin/${name}" +pidfile="/var/run/${name}.pid" start_precmd="natd_precmd" -start_cmd="natd_start" natd_precmd() { @@ -24,31 +24,25 @@ fi fi - return 0 -} + if [ -n "${natd_interface}" ]; then + dhcp_list="`list_net_interfaces dhcp`" + for ifn in ${dhcp_list}; do + case "${natd_interface}" in + ${ifn}) + rc_flags="$rc_flags -dynamic" + ;; + esac + done -natd_start() -{ - dhcp_list="`list_net_interfaces dhcp`" - for ifn in ${dhcp_list}; do - case ${natd_interface} in - ${ifn}) - natd_flags="$natd_flags -dynamic" - ;; - *) - ;; - esac - done - if [ -n "${natd_interface}" ]; then - if echo ${natd_interface} | \ - grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then - natd_flags="$natd_flags -a ${natd_interface}" + if echo "${natd_interface}" | \ + grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then + rc_flags="$rc_flags -a ${natd_interface}" else - natd_flags="$natd_flags -n ${natd_interface}" + rc_flags="$rc_flags -n ${natd_interface}" fi fi - echo -n ' natd' - ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + + return 0 } load_rc_config $name ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/ntpdate#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ntpdate,v 1.15 2006/01/16 06:03:42 dougb Exp $ +# $FreeBSD: src/etc/rc.d/ntpdate,v 1.16 2006/07/20 10:07:34 flz Exp $ # # PROVIDE: ntpdate @@ -16,11 +16,11 @@ ntpdate_start() { - if [ -z "$ntpdate_hosts" -a -f /etc/ntp.conf ]; then + if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then ntpdate_hosts=`awk ' /^server[ \t]*127.127/ {next} /^(server|peer)/ {print $2} - ' @@ -115,7 +115,7 @@ _libthr= libthr .endif -.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_ARCH} != "arm" _libthread_db= libthread_db .endif ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/getgrent.c#4 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/msgctl.3#2 (text+ko) ==== @@ -29,7 +29,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/gen/msgctl.3,v 1.19 2003/09/08 19:57:14 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/msgctl.3,v 1.20 2006/08/09 18:05:44 maxim Exp $ .\"/ .Dd November 24, 1997 .Dt MSGCTL 3 @@ -83,7 +83,7 @@ The .Vt ipc_perm structure used inside the -.Vt shmid_ds +.Vt msqid_ds structure is defined in .In sys/ipc.h and looks like this: ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/syslog.c#2 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/29/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.37 2006/05/11 09:10:33 davidxu Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.38 2006/08/07 20:12:18 phk Exp $"); #include "namespace.h" #include @@ -116,7 +116,7 @@ h->base += len; h->left -= len; } - return 0; + return len; } /* ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/tls.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/lib/libc/gen/tls.c,v 1.9 2006/03/28 06:06:38 davidxu Exp $ + * $FreeBSD: src/lib/libc/gen/tls.c,v 1.10 2006/07/26 16:56:56 imp Exp $ */ /* @@ -40,8 +40,6 @@ #include "libc_private.h" -/* XXX not sure what variants to use for arm. */ - __weak_reference(__libc_allocate_tls, _rtld_allocate_tls); __weak_reference(__libc_free_tls, _rtld_free_tls); ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/Makefile.inc#6 (text+ko) ==== @@ -1,5 +1,5 @@ # from @(#)Makefile.inc 8.2 (Berkeley) 9/5/93 -# $FreeBSD: src/lib/libc/net/Makefile.inc,v 1.60 2006/05/21 11:19:36 ume Exp $ +# $FreeBSD: src/lib/libc/net/Makefile.inc,v 1.61 2006/07/26 08:36:46 yar Exp $ # machine-independent net sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/net ${.CURDIR}/net @@ -19,7 +19,11 @@ SYM_MAPS+=${.CURDIR}/net/Symbol.map -CFLAGS+=-DINET6 -I${.OBJDIR} -I${.CURDIR}/net +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+=-DINET6 +.endif + +CFLAGS+=-I${.OBJDIR} # name6.c refers res_private.h CFLAGS+=-I${.CURDIR}/resolv ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/getaddrinfo.c#4 (text+ko) ==== @@ -33,7 +33,6 @@ * "#ifdef FAITH" part is local hack for supporting IPv4-v6 translator. * * Issues to be discussed: - * - Thread safe-ness must be checked. * - Return values. There are nonstandard return values defined and used * in the source code. This is because RFC2553 is silent about which error * code must be returned for which situation. @@ -50,20 +49,12 @@ * against NULL hostname (3) what is AI_ADDRCONFIG itself. AF not ready? * non-loopback address configured? global address configured? * - * OS specific notes for netbsd/openbsd/freebsd4/bsdi4: - * - To avoid search order issue, we have a big amount of code duplicate - * from gethnamaddr.c and some other places. The issues that there's no - * lower layer function to lookup "IPv4 or IPv6" record. Calling - * gethostbyname2 from getaddrinfo will end up in wrong search order, as - * presented above. - * * OS specific notes for freebsd4: * - FreeBSD supported $GAI. The code does not. - * - FreeBSD allowed classful IPv4 numeric (127.1), the code does not. */ #include -__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.80 2006/04/28 12:03:35 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.85 2006/07/23 15:31:03 ume Exp $"); #include "namespace.h" #include @@ -213,7 +204,7 @@ { 0 } }; -static int str2number(const char *); +static int str2number(const char *, int *); static int explore_null(const struct addrinfo *, const char *, struct addrinfo **); static int explore_numeric(const struct addrinfo *, const char *, @@ -328,7 +319,7 @@ } static int -str2number(const char *p) +str2number(const char *p, int *portp) { char *ep; unsigned long v; @@ -338,9 +329,10 @@ ep = NULL; errno = 0; v = strtoul(p, &ep, 10); - if (errno == 0 && ep && *ep == '\0' && v <= UINT_MAX) - return v; - else + if (errno == 0 && ep && *ep == '\0' && v <= UINT_MAX) { + *portp = v; + return 0; + } else return -1; } @@ -1040,13 +1032,11 @@ { int s; const struct afd *afd; - struct addrinfo *cur; - struct addrinfo sentinel; + struct addrinfo *ai; int error; *res = NULL; - sentinel.ai_next = NULL; - cur = &sentinel; + ai = NULL; /* * filter out AFs that are not supported by the kernel @@ -1070,26 +1060,19 @@ return 0; if (pai->ai_flags & AI_PASSIVE) { - GET_AI(cur->ai_next, afd, afd->a_addrany); - /* xxx meaningless? - * GET_CANONNAME(cur->ai_next, "anyaddr"); - */ - GET_PORT(cur->ai_next, servname); + GET_AI(ai, afd, afd->a_addrany); + GET_PORT(ai, servname); } else { - GET_AI(cur->ai_next, afd, afd->a_loopback); - /* xxx meaningless? - * GET_CANONNAME(cur->ai_next, "localhost"); - */ - GET_PORT(cur->ai_next, servname); + GET_AI(ai, afd, afd->a_loopback); + GET_PORT(ai, servname); } - cur = cur->ai_next; - *res = sentinel.ai_next; + *res = ai; return 0; free: - if (sentinel.ai_next) - freeaddrinfo(sentinel.ai_next); + if (ai != NULL) + freeaddrinfo(ai); return error; } @@ -1101,14 +1084,12 @@ const char *servname, struct addrinfo **res, const char *canonname) { const struct afd *afd; - struct addrinfo *cur; - struct addrinfo sentinel; + struct addrinfo *ai; int error; char pton[PTON_MAX]; *res = NULL; - sentinel.ai_next = NULL; - cur = &sentinel; + ai = NULL; /* * if the servname does not match socktype/protocol, ignore it. @@ -1121,57 +1102,48 @@ return 0; switch (afd->a_af) { -#if 1 /*X/Open spec*/ case AF_INET: - if (inet_aton(hostname, (struct in_addr *)pton) == 1) { - if (pai->ai_family == afd->a_af || - pai->ai_family == PF_UNSPEC /*?*/) { - GET_AI(cur->ai_next, afd, pton); - GET_PORT(cur->ai_next, servname); - if ((pai->ai_flags & AI_CANONNAME)) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Aug 10 15:50:18 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 7FBD016A4DD; Thu, 10 Aug 2006 15:50:17 +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 1526816A4E0 for ; Thu, 10 Aug 2006 15:50:17 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFD3843D4C for ; Thu, 10 Aug 2006 15:50:08 +0000 (GMT) (envelope-from marcel@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 k7AFo8c7024213 for ; Thu, 10 Aug 2006 15:50:08 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AFo81O024210 for perforce@freebsd.org; Thu, 10 Aug 2006 15:50:08 GMT (envelope-from marcel@freebsd.org) Date: Thu, 10 Aug 2006 15:50:08 GMT Message-Id: <200608101550.k7AFo81O024210@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103577 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: Thu, 10 Aug 2006 15:50:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=103577 Change 103577 by marcel@marcel_nfs on 2006/08/10 15:50:00 Guard... Affected files ... .. //depot/projects/gdb/sys/kern/sys_process.c#13 edit Differences ... ==== //depot/projects/gdb/sys/kern/sys_process.c#13 (text+ko) ==== @@ -324,9 +324,11 @@ bufsz = sizeof(struct ptrace_lwpinfo); break; case PT_IO: +#ifdef COMPAT_IA32 if (sv == &ia32_freebsd_sysvec) bufsz = sizeof(struct ptrace_io_desc32); else +#endif bufsz = sizeof(struct ptrace_io_desc); break; default: From owner-p4-projects@FreeBSD.ORG Thu Aug 10 15:53:15 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 40FAD16A633; Thu, 10 Aug 2006 15:53:15 +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 06FED16A5FB for ; Thu, 10 Aug 2006 15:53:15 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B19F43D46 for ; Thu, 10 Aug 2006 15:53:14 +0000 (GMT) (envelope-from marcel@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 k7AFrEYh024642 for ; Thu, 10 Aug 2006 15:53:14 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AFrCea024639 for perforce@freebsd.org; Thu, 10 Aug 2006 15:53:12 GMT (envelope-from marcel@freebsd.org) Date: Thu, 10 Aug 2006 15:53:12 GMT Message-Id: <200608101553.k7AFrCea024639@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103578 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: Thu, 10 Aug 2006 15:53:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=103578 Change 103578 by marcel@marcel_nfs on 2006/08/10 15:52:18 IFC @103573 Affected files ... .. //depot/projects/gdb/lib/libc/stdlib/malloc.c#7 integrate .. //depot/projects/gdb/lib/libdisk/write_ia64_disk.c#3 integrate .. //depot/projects/gdb/sbin/geom/class/eli/geli.8#3 integrate .. //depot/projects/gdb/sbin/ifconfig/ifieee80211.c#5 integrate .. //depot/projects/gdb/share/examples/drivers/make_pseudo_driver.sh#3 integrate .. //depot/projects/gdb/share/man/man4/acpi.4#13 integrate .. //depot/projects/gdb/share/man/man4/ng_pppoe.4#6 integrate .. //depot/projects/gdb/sys/Makefile#6 integrate .. //depot/projects/gdb/sys/arm/at91/at91_st.c#2 integrate .. //depot/projects/gdb/sys/boot/Makefile#6 integrate .. //depot/projects/gdb/sys/boot/arm/Makefile#1 branch .. //depot/projects/gdb/sys/dev/acpica/acpi_video.c#8 integrate .. //depot/projects/gdb/sys/dev/em/if_em.c#11 integrate .. //depot/projects/gdb/sys/geom/geom_gpt.c#7 integrate .. //depot/projects/gdb/sys/i386/conf/XBOX#2 integrate .. //depot/projects/gdb/sys/i386/i386/machdep.c#19 integrate .. //depot/projects/gdb/sys/i386/isa/clock.c#15 integrate .. //depot/projects/gdb/sys/kern/vfs_subr.c#23 integrate .. //depot/projects/gdb/sys/net80211/ieee80211_input.c#6 integrate .. //depot/projects/gdb/sys/net80211/ieee80211_ioctl.c#5 integrate .. //depot/projects/gdb/sys/net80211/ieee80211_ioctl.h#4 integrate .. //depot/projects/gdb/sys/net80211/ieee80211_output.c#5 integrate .. //depot/projects/gdb/sys/netgraph/ng_pppoe.c#9 integrate .. //depot/projects/gdb/sys/vm/vm_page.c#19 integrate .. //depot/projects/gdb/usr.bin/hexdump/parse.c#3 integrate .. //depot/projects/gdb/usr.bin/split/split.1#5 integrate .. //depot/projects/gdb/usr.bin/split/split.c#5 integrate Differences ... ==== //depot/projects/gdb/lib/libc/stdlib/malloc.c#7 (text+ko) ==== @@ -185,7 +185,7 @@ #endif #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.132 2006/07/27 19:09:32 jasone Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.133 2006/08/09 19:01:27 marcel Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -279,6 +279,7 @@ # define QUANTUM_2POW_MIN 4 # define SIZEOF_PTR 4 # define USE_BRK +# define NO_TLS #endif /* sizeof(int) == (1 << SIZEOF_INT_2POW). */ ==== //depot/projects/gdb/lib/libdisk/write_ia64_disk.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libdisk/write_ia64_disk.c,v 1.15 2004/01/30 20:52:54 marcel Exp $"); +__FBSDID("$FreeBSD: src/lib/libdisk/write_ia64_disk.c,v 1.16 2006/08/09 20:19:15 marcel Exp $"); #include #include @@ -123,6 +123,8 @@ error = 0; nsects = disk->media_size / disk->sector_size; + nsects--; /* The GPT starts at LBA 1 */ + buffer = calloc(disk->sector_size, 1); if (buffer == NULL) return (ENOMEM); ==== //depot/projects/gdb/sbin/geom/class/eli/geli.8#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.15 2006/08/09 18:35:31 maxim Exp $ +.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.17 2006/08/10 01:13:38 maxim Exp $ .\" .Dd August 9, 2006 .Dt GELI 8 @@ -163,7 +163,7 @@ passphrase before the root file system is mounted. .It The passphrase of the user is strengthened with: -.Rs +.Rs .%A B. Kaliski .%T "PKCS #5: Password-Based Cryptography Specification, Version 2.0." .%R RFC @@ -175,7 +175,7 @@ and .Qq "company key" ) . .It -It is fast - +It is fast - .Nm performs simple sector-to-sector encryption. .It @@ -290,7 +290,7 @@ subcommand. .It Fl r Attach read-only provider. -It will not be opened for writting. +It will not be opened for writing. .It Fl k Ar keyfile Specifies a file which contains part of the key. For more information see the description of the ==== //depot/projects/gdb/sbin/ifconfig/ifieee80211.c#5 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.39 2006/07/26 03:08:45 sam Exp $ + * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.40 2006/08/10 06:06:13 sam Exp $ */ /*- @@ -974,19 +974,36 @@ list_scan(s); } +static enum ieee80211_opmode get80211opmode(int s); + static void list_stations(int s) { - uint8_t buf[24*1024]; + union { + struct ieee80211req_sta_req req; + uint8_t buf[24*1024]; + } u; + enum ieee80211_opmode opmode = get80211opmode(s); struct ieee80211req ireq; uint8_t *cp; int len; (void) memset(&ireq, 0, sizeof(ireq)); (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); + /* broadcast address =>'s get all stations */ + (void) memset(u.req.is_u.macaddr, 0xff, IEEE80211_ADDR_LEN); + if (opmode == IEEE80211_M_STA) { + /* + * Get information about the associated AP. + */ + ireq.i_type = IEEE80211_IOC_BSSID; + ireq.i_data = u.req.is_u.macaddr; + ireq.i_len = IEEE80211_ADDR_LEN; + (void) ioctl(s, SIOCG80211, &ireq); + } ireq.i_type = IEEE80211_IOC_STA_INFO; - ireq.i_data = buf; - ireq.i_len = sizeof(buf); + ireq.i_data = &u; + ireq.i_len = sizeof(u); if (ioctl(s, SIOCG80211, &ireq) < 0) errx(1, "unable to get station information"); len = ireq.i_len; @@ -1005,12 +1022,14 @@ , "CAPS" , "FLAG" ); - cp = buf; + cp = (uint8_t *) u.req.info; do { struct ieee80211req_sta_info *si; uint8_t *vp; si = (struct ieee80211req_sta_info *) cp; + if (si->isi_len < sizeof(*si)) + break; vp = (u_int8_t *)(si+1); printf("%s %4u %4d %3dM %4d %4d %6d %6d %-4.4s %-4.4s" , ether_ntoa((const struct ether_addr*) si->isi_macaddr) ==== //depot/projects/gdb/share/examples/drivers/make_pseudo_driver.sh#3 (text+ko) ==== @@ -1,42 +1,123 @@ #!/bin/sh # This writes a skeleton driver and puts it into the kernel tree for you -#arg1 is lowercase "foo" +# +# arg1 is lowercase "foo" +# arg2 path to the kernel sources, "/sys" if omitted # # Trust me, RUN THIS SCRIPT :) # -# $FreeBSD: src/share/examples/drivers/make_pseudo_driver.sh,v 1.10 2005/03/09 12:29:07 stefanf Exp $ +# $FreeBSD: src/share/examples/drivers/make_pseudo_driver.sh,v 1.12 2006/08/09 21:23:42 rik Exp $ # #-------cut here------------------ -cd /sys/i386/conf if [ "${1}X" = "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 + +for i in "" "conf" "i386" "i386/conf" "dev" "sys" "modules" +do + if [ -d ${TOP}/${i} ] + then + continue + fi + echo "${TOP}/${i}: no such directory." + echo "Please, correct the error and try again." + exit 1 +done UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"` -cat >files.${UPPER} <${TOP}/conf/files.${UPPER} <${UPPER} <${TOP}/i386/conf/${UPPER} <>${UPPER} +ident ${UPPER} -cat >>${UPPER} <../../dev/${1}.c <${TOP}/dev/${1}/${1}.c < #include #include /* SYSINIT stuff */ +#include /* SYSINIT stuff */ #include /* cdevsw stuff */ -#include /* DEVFS definitions */ #include /* malloc region definitions */ #include #include /* ${1} IOCTL definitions */ #include /* DELAY() */ -#include "${1}.h" /* generated file.. defines N${UPPER} */ +#define N${UPPER} 3 /* defines number of instances */ + +/* XXX These should be defined in terms of bus-space ops. */ +#define ${UPPER}_INB(port) inb(port) +#define ${UPPER}_OUTB(port, val) (port, (val)) /* Function prototypes (these should all be static) */ static d_open_t ${1}open; @@ -68,20 +153,15 @@ #define CDEV_MAJOR 20 static struct cdevsw ${1}_cdevsw = { - ${1}open, - ${1}close, - ${1}read, - ${1}write, - ${1}ioctl, - nullstop, - nullreset, - nodevtotty, - ${1}poll, - ${1}mmap, - NULL, - "${1}", - NULL, - -1 + .d_version = D_VERSION, + .d_open = ${1}open, + .d_close = ${1}close, + .d_read = ${1}read, + .d_write = ${1}write, + .d_ioctl = ${1}ioctl, + .d_poll = ${1}poll, + .d_mmap = ${1}mmap, + .d_name = "${1}", }; /* @@ -94,9 +174,9 @@ * One of these per allocated device */ struct ${1}_softc { - struct isa_device *dev; + u_long iobase; char buffer[BUFFERSIZE]; - static void *devfs_token; + struct cdev *dev; }; typedef struct ${1}_softc *sc_p; @@ -129,7 +209,7 @@ #endif /* DIAGNOSTIC */ static int -${1}ioctl (dev_t dev, int 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) { int unit = UNIT(dev); sc_p scp = sca[unit]; @@ -139,7 +219,10 @@ switch (cmd) { case DHIOCRESET: /* whatever resets it */ - outb(scp->dev->id_iobase, 0xff); + (void)scp; /* Delete this line after using scp. */ +#if 0 + ${UPPER}_OUTB(scp->iobase, 0xff); +#endif break; default: return ENXIO; @@ -152,13 +235,14 @@ * 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) { int unit = UNIT(dev); sc_p scp = sca[unit]; CHECKUNIT(ENXIO); + (void)scp; /* Delete this line after using scp. */ /* * Do processing */ @@ -166,13 +250,14 @@ } 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) { int unit = UNIT(dev); sc_p scp = sca[unit]; CHECKUNIT_DIAG(ENXIO); + (void)scp; /* Delete this line after using scp. */ /* * Do processing */ @@ -180,7 +265,7 @@ } static int -${1}read(dev_t dev, struct uio *uio, int ioflag) +${1}read(struct cdev *dev, struct uio *uio, int ioflag) { int unit = UNIT(dev); sc_p scp = sca[unit]; @@ -198,7 +283,7 @@ } static int -${1}write(dev_t dev, struct uio *uio, int ioflag) +${1}write(struct cdev *dev, struct uio *uio, int ioflag) { int unit = UNIT(dev); sc_p scp = sca[unit]; @@ -215,13 +300,14 @@ } static int -${1}mmap(dev_t dev, int offset, int nprot) +${1}mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { int unit = UNIT(dev); sc_p scp = sca[unit]; CHECKUNIT_DIAG(-1); + (void)scp; /* Delete this line after using scp. */ /* * Do processing */ @@ -236,13 +322,14 @@ } static int -${1}poll(dev_t dev, int which, struct thread *td) +${1}poll(struct cdev *dev, int which, struct thread *td) { int unit = UNIT(dev); sc_p scp = sca[unit]; CHECKUNIT_DIAG(ENXIO); + (void)scp; /* Delete this line after using scp. */ /* * Do processing */ @@ -256,12 +343,9 @@ static void ${1}_drvinit(void *unused) { - dev_t dev; int unit; sc_p scp = sca[unit]; - dev = makedev(CDEV_MAJOR, 0); - cdevsw_add(&dev, &${1}_cdevsw, NULL); for (unit = 0; unit < N${UPPER}; unit++) { /* * Allocate storage for this instance . @@ -272,8 +356,8 @@ return; } sca[unit] = scp; - scp->devfs_token = devfs_add_devswf(&${1}_cdevsw, unit, DV_CHR, - UID_ROOT, GID_KMEM, 0640, "${1}%d", unit); + scp->dev = make_dev(&${1}_cdevsw, unit, + UID_ROOT, GID_KMEM, 0640, "${1}%d", unit); } } @@ -281,7 +365,7 @@ ${1}_drvinit, NULL) DONE -cat >../../sys/${1}io.h <${TOP}/sys/${1}io.h <${TOP}/modules/${1}/Makefile < +DONE + +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 + +echo "" +echo -n "Do you want to build the '${UPPER}' kernel? [Y]" +read VAL +if [ "-z" "$VAL" ]; then + VAL=YES +fi +case ${VAL} in +[yY]*) + ( + cd ${TOP}/i386/conf; \ + config ${UPPER}; \ + cd ${TOP}/i386/compile/${UPPER}; \ + make depend; \ + make; \ + ) + ;; +*) +# exit + ;; +esac #--------------end of script--------------- # -#you also need to add an entry into the cdevsw[] -#array in conf.c, but it's too hard to do in a script.. -# #edit to your taste.. # # ==== //depot/projects/gdb/share/man/man4/acpi.4#13 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.59 2006/08/07 07:28:47 yar Exp $ +.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.60 2006/08/10 06:32:16 njl Exp $ .\" .Dd July 29, 2006 .Dt ACPI 4 @@ -582,11 +582,6 @@ This manual page was written by .An Michael Smith Aq msmith@FreeBSD.org . .Sh BUGS -If the -.Nm -driver is loaded as a module when it is already linked as part of the -kernel, odd things may happen. -.Pp Many BIOS versions have serious bugs that may cause system instability, break suspend/resume, or prevent devices from operating properly due to IRQ routing problems. ==== //depot/projects/gdb/share/man/man4/ng_pppoe.4#6 (text+ko) ==== @@ -32,7 +32,7 @@ .\" .\" Author: Archie Cobbs .\" -.\" $FreeBSD: src/share/man/man4/ng_pppoe.4,v 1.35 2006/08/09 09:56:57 glebius Exp $ +.\" $FreeBSD: src/share/man/man4/ng_pppoe.4,v 1.36 2006/08/10 11:07:11 glebius Exp $ .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $ .\" .Dd August 9, 2006 @@ -236,8 +236,8 @@ .Ed .It Dv NGM_PPPOE_SETENADDR Set the node Ethernet address for outgoing datagrams. -This message is important when node failed to obtain Ethernet address -from peer on +This message is important when a node has failed to obtain an Ethernet +address from its peer on the .Dv ethernet hook, or when user wants to override this address with another one. .Tn ASCII ==== //depot/projects/gdb/sys/Makefile#6 (text+ko) ==== @@ -1,13 +1,11 @@ -# $FreeBSD: src/sys/Makefile,v 1.37 2006/07/04 14:14:16 maxim Exp $ +# $FreeBSD: src/sys/Makefile,v 1.38 2006/08/10 06:29:43 imp Exp $ .include # The boot loader .if ${MK_BOOT} != "no" -.if ${MACHINE_ARCH} != "arm" SUBDIR= boot .endif -.endif # Directories to include in cscope name file and TAGS. CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \ ==== //depot/projects/gdb/sys/arm/at91/at91_st.c#2 (text) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.4 2006/07/14 22:31:12 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.5 2006/08/09 20:58:55 imp Exp $"); #include #include @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -48,7 +49,8 @@ static struct at91st_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - device_t dev; + device_t sc_dev; + eventhandler_tag sc_wet; /* watchdog event handler tag */ } *timer_softc; #define RD4(off) \ @@ -56,6 +58,8 @@ #define WR4(off, val) \ bus_space_write_4(timer_softc->sc_st, timer_softc->sc_sh, (off), (val)) +static void at91st_watchdog(void *, u_int, int *); + static inline int st_crtr(void) { @@ -97,7 +101,7 @@ timer_softc = device_get_softc(dev); timer_softc->sc_st = sc->sc_st; - timer_softc->dev = dev; + timer_softc->sc_dev = dev; if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_ST_BASE, AT91RM92_ST_SIZE, &timer_softc->sc_sh) != 0) panic("couldn't subregion timer registers"); @@ -108,6 +112,13 @@ WR4(ST_RTMR, 1); /* Disable all interrupts */ WR4(ST_IDR, 0xffffffff); + /* disable watchdog timer */ + WR4(ST_WDMR, 0); + + timer_softc->sc_wet = EVENTHANDLER_REGISTER(watchdog_list, + at91st_watchdog, dev, 0); + device_printf(dev, + "watchdog registered, timeout intervall max. 64 sec\n"); return (0); } @@ -140,7 +151,34 @@ #endif } +/* + * t below is in a weird unit. The watchdog is set to 2^t + * nanoseconds. Since our watchdog timer can't really do that too + * well, we approximate it by assuming that the timeout interval for + * the lsb is 2^22 ns, which is 4.194ms. This is an overestimation of + * the actual time (3.906ms), but close enough for watchdogging. + * These approximations, though a violation of the spec, improve the + * performance of the application which typically specifies things as + * WD_TO_32SEC. In that last case, we'd wait 32s before the wdog + * reset. The spec says we should wait closer to 34s, but given how + * it is likely to be used, and the extremely coarse nature time + * interval, I think this is the best solution. + */ static void +at91st_watchdog(void *argp, u_int cmd, int *error) +{ + uint32_t wdog; + int t; + + wdog = 0; + t = cmd & WD_INTERVAL; + if (cmd != 0 && t >= 22 && t <= 37) + wdog = (1 << (t - 22)) | ST_WDMR_RSTEN; + WR4(ST_WDMR, wdog); + WR4(ST_CR, ST_CR_WDRST); +} + +static void clock_intr(void *arg) { struct trapframe *fp = arg; @@ -161,7 +199,7 @@ struct resource *irq; int rid = 0; void *ih; - device_t dev = timer_softc->dev; + device_t dev = timer_softc->sc_dev; if (32768 % hz) { printf("Cannot get %d Hz clock; using 128Hz\n", hz); @@ -229,4 +267,3 @@ cpu_stopprofclock(void) { } - ==== //depot/projects/gdb/sys/boot/Makefile#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/Makefile,v 1.29 2006/06/18 17:44:40 imp Exp $ +# $FreeBSD: src/sys/boot/Makefile,v 1.30 2006/08/10 06:29:43 imp Exp $ .include @@ -17,9 +17,7 @@ SUBDIR+= ofw .endif -.if ${MACHINE_ARCH} != "arm" # Pick the machine-dependent subdir based on the target architecture. SUBDIR+= ${MACHINE:S/amd64/i386/} -.endif .include ==== //depot/projects/gdb/sys/dev/acpica/acpi_video.c#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_video.c,v 1.12 2005/12/20 22:42:16 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_video.c,v 1.13 2006/08/10 13:18:02 bruno Exp $"); #include #include @@ -109,16 +109,22 @@ #define DOS_BRIGHTNESS_BY_BIOS (1 << 2) /* _DOD and subdev's _ADR */ -#define DOD_DEVID_MASK 0xffff +#define DOD_DEVID_MASK 0x0f00 +#define DOD_DEVID_MASK_FULL 0xffff +#define DOD_DEVID_MASK_DISPIDX 0x000f +#define DOD_DEVID_MASK_DISPPORT 0x00f0 #define DOD_DEVID_MONITOR 0x0100 -#define DOD_DEVID_PANEL 0x0110 +#define DOD_DEVID_LCD 0x0110 #define DOD_DEVID_TV 0x0200 +#define DOD_DEVID_EXT 0x0300 +#define DOD_DEVID_INTDFP 0x0400 #define DOD_BIOS (1 << 16) #define DOD_NONVGA (1 << 17) #define DOD_HEAD_ID_SHIFT 18 #define DOD_HEAD_ID_BITS 3 #define DOD_HEAD_ID_MASK \ (((1 << DOD_HEAD_ID_BITS) - 1) << DOD_HEAD_ID_SHIFT) +#define DOD_DEVID_SCHEME_STD (1 << 31) /* _BCL related constants */ #define BCL_FULLPOWER 0 @@ -160,8 +166,8 @@ static struct sysctl_ctx_list acpi_video_sysctl_ctx; static struct sysctl_oid *acpi_video_sysctl_tree; -static struct acpi_video_output_queue lcd_units, crt_units, tv_units, - other_units; +static struct acpi_video_output_queue crt_units, tv_units, + ext_units, lcd_units, other_units; ACPI_SERIAL_DECL(video, "ACPI video"); MALLOC_DEFINE(M_ACPIVIDEO, "acpivideo", "ACPI video extension"); @@ -175,9 +181,10 @@ switch (evt) { case MOD_LOAD: sysctl_ctx_init(&acpi_video_sysctl_ctx); - STAILQ_INIT(&lcd_units); STAILQ_INIT(&crt_units); STAILQ_INIT(&tv_units); + STAILQ_INIT(&ext_units); + STAILQ_INIT(&lcd_units); STAILQ_INIT(&other_units); break; case MOD_UNLOAD: @@ -404,27 +411,44 @@ { struct acpi_video_output *vn, *vo, *vp; int n, x; + int display_index; + int display_port; char name[8], env[32]; const char *type, *desc; struct acpi_video_output_queue *voqh; ACPI_SERIAL_ASSERT(video); + display_index = adr & DOD_DEVID_MASK_DISPIDX; + display_port = (adr & DOD_DEVID_MASK_DISPPORT) >> 4; + switch (adr & DOD_DEVID_MASK) { case DOD_DEVID_MONITOR: - desc = "CRT monitor"; - type = "crt"; - voqh = &crt_units; + if ((adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) { + /* DOD_DEVID_LCD is a common, backward compatible ID */ + desc = "Internal/Integrated Digital Flat Panel"; + type = "lcd"; + voqh = &lcd_units; + } else { + desc = "VGA CRT or VESA Compatible Analog Monitor"; + type = "crt"; + voqh = &crt_units; + } break; - case DOD_DEVID_PANEL: - desc = "LCD panel"; - type = "lcd"; - voqh = &lcd_units; - break; case DOD_DEVID_TV: - desc = "TV"; + desc = "TV/HDTV or Analog-Video Monitor"; type = "tv"; voqh = &tv_units; break; + case DOD_DEVID_EXT: + desc = "External Digital Monitor"; + type = "ext"; + voqh = &ext_units; + break; + case DOD_DEVID_INTDFP: + desc = "Internal/Integrated Digital Flat Panel"; + type = "lcd"; + voqh = &lcd_units; + break; default: desc = "unknown output"; type = "out"; @@ -508,13 +532,16 @@ printf("%s: softc allocation failed\n", type); if (bootverbose) { - printf("found %s(%x)", desc, adr & DOD_DEVID_MASK); + printf("found %s(%x)", desc, adr & DOD_DEVID_MASK_FULL); + printf(", idx#%x", adr & DOD_DEVID_MASK_DISPIDX); + printf(", port#%x", (adr & DOD_DEVID_MASK_DISPPORT) >> 4); if (adr & DOD_BIOS) printf(", detectable by BIOS"); if (adr & DOD_NONVGA) - printf(" (not a VGA output)"); + printf(" (Non-VGA output device whose power " + "is related to the VGA device)"); printf(", head #%d\n", - (adr & DOD_HEAD_ID_MASK) >> DOD_HEAD_ID_SHIFT); + (adr & DOD_HEAD_ID_MASK) >> DOD_HEAD_ID_SHIFT); } return (vo); } @@ -557,12 +584,15 @@ case DOD_DEVID_MONITOR: voqh = &crt_units; break; - case DOD_DEVID_PANEL: - voqh = &lcd_units; - break; case DOD_DEVID_TV: voqh = &tv_units; break; + case DOD_DEVID_EXT: + voqh = &ext_units; + break; + case DOD_DEVID_INTDFP: + voqh = &lcd_units; + break; default: voqh = &other_units; } @@ -751,7 +781,7 @@ for (i = 0; i < argset->dod_pkg->Package.Count; i++) { if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && - (val & DOD_DEVID_MASK) == adr) { + (val & DOD_DEVID_MASK_FULL) == adr) { argset->callback(handle, val, argset->context); argset->count++; } ==== //depot/projects/gdb/sys/dev/em/if_em.c#11 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.125 2006/08/04 07:56:33 yar Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.126 2006/08/09 20:10:35 pdeuskar Exp $*/ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -2255,9 +2255,12 @@ 0, NULL); ifmedia_add(&adapter->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL); - ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_T | IFM_FDX, - 0, NULL); - ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_T, 0, NULL); + if (adapter->hw.phy_type != em_phy_ife) { + ifmedia_add(&adapter->media, + IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); + ifmedia_add(&adapter->media, + IFM_ETHER | IFM_1000_T, 0, NULL); + } } ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO); ==== //depot/projects/gdb/sys/geom/geom_gpt.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/geom_gpt.c,v 1.40 2006/08/08 21:33:26 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/geom_gpt.c,v 1.41 2006/08/09 20:53:01 marcel Exp $"); #include #include @@ -360,16 +360,17 @@ { char *buf; uint8_t *typ; - int i, pmbr, vmbr; + uint64_t mediasize; + int i, pmbr, parts; + uint32_t dp_start, dp_size; uint16_t magic; - uint32_t dp_start, dp_size; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Aug 10 16:19:48 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 A846C16A4E6; Thu, 10 Aug 2006 16:19:48 +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 8367616A4E1 for ; Thu, 10 Aug 2006 16:19:48 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CEF943D5A for ; Thu, 10 Aug 2006 16:19:48 +0000 (GMT) (envelope-from millert@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 k7AGJmTx027091 for ; Thu, 10 Aug 2006 16:19:48 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AGJlCS027088 for perforce@freebsd.org; Thu, 10 Aug 2006 16:19:47 GMT (envelope-from millert@freebsd.org) Date: Thu, 10 Aug 2006 16:19:47 GMT Message-Id: <200608101619.k7AGJlCS027088@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 103579 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: Thu, 10 Aug 2006 16:19:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=103579 Change 103579 by millert@millert_macbook on 2006/08/10 16:19:40 Remove flask_types.h; it has not been used in a long time. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/flask_types.h#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Aug 10 17:01:42 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 D91F816A4E8; Thu, 10 Aug 2006 17:01:41 +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 AB07C16A4E6 for ; Thu, 10 Aug 2006 17:01:41 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D7D043D49 for ; Thu, 10 Aug 2006 17:01:41 +0000 (GMT) (envelope-from gabor@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 k7AH1f0e037323 for ; Thu, 10 Aug 2006 17:01:41 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AH1fCm037320 for perforce@freebsd.org; Thu, 10 Aug 2006 17:01:41 GMT (envelope-from gabor@FreeBSD.org) Date: Thu, 10 Aug 2006 17:01:41 GMT Message-Id: <200608101701.k7AH1fCm037320@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103581 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: Thu, 10 Aug 2006 17:01:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=103581 Change 103581 by gabor@gabor_spitfire on 2006/08/10 17:00:44 Add CHROOTDESTDIR macro to avoid code duplication and make the chrooting processes simpler. This is set to ${CHROOT} ${DESTDIR} if DESTDIR is set, anyway it is epmty. Idea by: John E. Hein Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#77 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#77 (text+ko) ==== @@ -1171,6 +1171,10 @@ IS_JAILED!= if [ `${SYSCTL} -n security.jail.jailed` = "1" ] ; then ${ECHO_CMD} YES; fi; .endif +.if defined(DESTDIR) +CHROOTDESTDIR= ${CHROOT} ${DESTDIR} +.endif + # Get the object format. .if !defined(PORTOBJFORMAT) PORTOBJFORMAT!= ${TEST} -x /usr/bin/objformat && /usr/bin/objformat || ${ECHO_CMD} aout @@ -1390,23 +1394,12 @@ .endif .if defined(USE_LINUX_PREFIX) -.if !defined(DESTDIR) -LDCONFIG_CMD?= ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} -LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD} -LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG_CMD} -.else -LDCONFIG_CMD?= ${CHROOT} ${DESTDIR} ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} +LDCONFIG_CMD?= ${CHROOTDESTDIR} ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD} LDCONFIG_PLIST_UNEXEC_CMD?= ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} -.endif .else -.if !defined(DESTDIR) -LDCONFIG_CMD?= ${LDCONFIG} -m ${LDCONFIG_RUNLIST} -LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG} -m ${LDCONFIG_PLIST} -.else -LDCONFIG_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_RUNLIST} -LDCONFIG_PLIST_EXEC_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_PLIST} -.endif +LDCONFIG_CMD?= ${CHROOTDESTDIR} ${LDCONFIG} -m ${LDCONFIG_RUNLIST} +LDCONFIG_PLIST_EXEC_CMD?= ${CHROOTDESTDIR} ${LDCONFIG} -m ${LDCONFIG_PLIST} LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG} -R .endif @@ -2311,33 +2304,18 @@ .if ${OSVERSION} < 491101 && ${PKGORIGIN} != "sysutils/pkg_install" EXTRACT_DEPENDS+= ${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install .endif -.if !defined(DESTDIR) PKG_CMD?= ${LOCALBASE_REL}/sbin/pkg_create -PKG_ADD?= ${LOCALBASE_REL}/sbin/pkg_add -PKG_DELETE?= ${LOCALBASE_REL}/sbin/pkg_delete -PKG_INFO?= ${LOCALBASE_REL}/sbin/pkg_info -PKG_VERSION?= ${LOCALBASE_REL}/sbin/pkg_version -.else -PKG_CMD?= ${LOCALBASE_REL}/sbin/pkg_create -PKG_ADD?= ${CHROOT} ${DESTDIR} ${LOCALBASE_REL}/sbin/pkg_add -PKG_DELETE?= ${CHROOT} ${DESTDIR} ${LOCALBASE_REL}/sbin/pkg_delete -PKG_INFO?= ${CHROOT} ${DESTDIR} ${LOCALBASE_REL}/sbin/pkg_info -.endif +PKG_ADD?= ${CHROOTDESTDIR} ${LOCALBASE_REL}/sbin/pkg_add +PKG_DELETE?= ${CHROOTDESTDIR} ${LOCALBASE_REL}/sbin/pkg_delete +PKG_INFO?= ${CHROOTDESTDIR} ${LOCALBASE_REL}/sbin/pkg_info +PKG_VERSION?= ${CHROOTDESTDIR} ${LOCALBASE_REL}/sbin/pkg_version .else -.if !defined(DESTDIR) PKG_CMD?= /usr/sbin/pkg_create -PKG_ADD?= /usr/sbin/pkg_add -PKG_DELETE?= /usr/sbin/pkg_delete -PKG_INFO?= /usr/sbin/pkg_info -PKG_VERSION?= /usr/sbin/pkg_version -.else -PKG_CMD?= /usr/sbin/pkg_create -PKG_ADD?= ${CHROOT} ${DESTDIR} /usr/sbin/pkg_add -PKG_DELETE?= ${CHROOT} ${DESTDIR} /usr/sbin/pkg_delete -PKG_INFO?= ${CHROOT} ${DESTDIR} /usr/sbin/pkg_info -PKG_VERSION?= ${CHROOT} ${DESTDIR} /usr/sbin/pkg_version +PKG_ADD?= ${CHROOTDESTDIR} /usr/sbin/pkg_add +PKG_DELETE?= ${CHROOTDESTDIR} /usr/sbin/pkg_delete +PKG_INFO?= ${CHROOTDESTDIR} /usr/sbin/pkg_info +PKG_VERSION?= ${CHROOTDESTDIR} /usr/sbin/pkg_version .endif -.endif # Does the pkg_create tool support conflict checking? # XXX Slow? @@ -3419,7 +3397,7 @@ ${LDCONFIG} -m ${USE_LDCONFIG} .else @${ECHO_MSG} "===> Running ldconfig in ${DESTDIR}" - ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${USE_LDCONFIG} + ${CHROOTDESTDIR}} ${LDCONFIG} -m ${USE_LDCONFIG} .endif .else .if !defined(DESTDIR) @@ -3427,7 +3405,7 @@ -${LDCONFIG} -m ${USE_LDCONFIG} .else @${ECHO_MSG} "===> Running ldconfig in ${DESTDIR} (errors are ignored)" - ${CHROOT} ${DESTDIR} -${LDCONFIG} -m ${USE_LDCONFIG} + ${CHROOTDESTDIR} -${LDCONFIG} -m ${USE_LDCONFIG} .endif .endif .if ${USE_LDCONFIG:L} != "${PREFIX}/lib" @@ -3450,7 +3428,7 @@ ${LDCONFIG} -32 -m ${USE_LDCONFIG32} .else @${ECHO_MSG} "===> Running ldconfig in ${DESTDIR}" - ${CHROOT} ${DESTDIR} ${LDCONFIG} -32 -m ${USE_LDCONFIG32} + ${CHROOTDESTDIR} ${LDCONFIG} -32 -m ${USE_LDCONFIG32} .endif .else .if !defined(DESTDIR) @@ -3458,7 +3436,7 @@ -${LDCONFIG} -32 -m ${USE_LDCONFIG32} .else @${ECHO_MSG} "===> Running ldconfig in ${DESTDIR} (errors are ignored)" - ${CHROOT} ${DESTDIR} -${LDCONFIG} -32 -m ${USE_LDCONFIG32} + ${CHROOTDESTDIR} -${LDCONFIG} -32 -m ${USE_LDCONFIG32} .endif .endif @${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" @@ -4488,7 +4466,7 @@ fi; \ else \ ${ECHO_MSG} -n "===> ${PKGNAME} depends on shared library in ${DESTDIR}: $$lib"; \ - if ${CHROOT} ${DESTDIR} ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \ + if ${CHROOTDESTDIR} ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \ ${ECHO_MSG} " - found"; \ if [ ${_DEPEND_ALWAYS} = 1 ]; then \ ${ECHO_MSG} " (but building it anyway)"; \ From owner-p4-projects@FreeBSD.ORG Thu Aug 10 17:09:52 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 38AF416A4E2; Thu, 10 Aug 2006 17:09:52 +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 149F716A4E0 for ; Thu, 10 Aug 2006 17:09:52 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B51C843D45 for ; Thu, 10 Aug 2006 17:09:51 +0000 (GMT) (envelope-from gabor@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 k7AH9plo039167 for ; Thu, 10 Aug 2006 17:09:51 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AH9p2w039164 for perforce@freebsd.org; Thu, 10 Aug 2006 17:09:51 GMT (envelope-from gabor@FreeBSD.org) Date: Thu, 10 Aug 2006 17:09:51 GMT Message-Id: <200608101709.k7AH9p2w039164@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103582 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: Thu, 10 Aug 2006 17:09:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=103582 Change 103582 by gabor@gabor_spitfire on 2006/08/10 17:09:00 Introduce PERL_REL for a relative Perl path to hook up for PLIST_SUB as PERL. This is needed for some ports to respect DESTDIR, but the ports should be fixed as well. Suggested by: John E. Hein Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#78 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#78 (text+ko) ==== @@ -1457,9 +1457,11 @@ .if ${PERL_LEVEL} < 500600 PERL5= ${DESTDIR}/usr/bin/perl${PERL_VERSION} PERL= ${DESTDIR}/usr/bin/perl +PERL_REL= /usr/bin/perl .else PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION} PERL= ${LOCALBASE}/bin/perl +PERL_REL= ${LOCALBASE_REL}/bin/perl .endif .if defined(USE_LOCAL_MK) @@ -1936,7 +1938,8 @@ BUILD_DEPENDS+= bison:${PORTSDIR}/devel/bison .endif -PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ +PLIST_SUB+= PERL=${PERL_REL} \ + PERL_VERSION=${PERL_VERSION} \ PERL_VER=${PERL_VER} \ PERL_ARCH=${PERL_ARCH} \ SITE_PERL=${SITE_PERL_REL} From owner-p4-projects@FreeBSD.ORG Thu Aug 10 17:41:55 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 5DC5A16A4E6; Thu, 10 Aug 2006 17:41:55 +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 245EC16A4DE for ; Thu, 10 Aug 2006 17:41:55 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E50443D49 for ; Thu, 10 Aug 2006 17:41:32 +0000 (GMT) (envelope-from imp@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 k7AHfWng041143 for ; Thu, 10 Aug 2006 17:41:32 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AHfV0i041140 for perforce@freebsd.org; Thu, 10 Aug 2006 17:41:31 GMT (envelope-from imp@freebsd.org) Date: Thu, 10 Aug 2006 17:41:31 GMT Message-Id: <200608101741.k7AHfV0i041140@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103584 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: Thu, 10 Aug 2006 17:41:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=103584 Change 103584 by imp@imp_lighthouse on 2006/08/10 17:40:54 OBE Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#15 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Aug 10 17:43:35 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 AB32816A4E7; Thu, 10 Aug 2006 17:43:35 +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 68EEB16A4E5 for ; Thu, 10 Aug 2006 17:43:35 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36BA343D55 for ; Thu, 10 Aug 2006 17:43:35 +0000 (GMT) (envelope-from gabor@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 k7AHhZ5v041228 for ; Thu, 10 Aug 2006 17:43:35 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AHhZpk041225 for perforce@freebsd.org; Thu, 10 Aug 2006 17:43:35 GMT (envelope-from gabor@FreeBSD.org) Date: Thu, 10 Aug 2006 17:43:35 GMT Message-Id: <200608101743.k7AHhZpk041225@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103585 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: Thu, 10 Aug 2006 17:43:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=103585 Change 103585 by gabor@gabor_spitfire on 2006/08/10 17:42:50 Fix MLINKS for DESTDIR. Submitted by: John E. Hein Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#79 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#79 (text+ko) ==== @@ -2592,7 +2592,7 @@ .endfor .endif _COUNT=0 -.for ___tpmlinks in ${_MLINKS} +.for ___tpmlinks in ${_MLINKS:S%^${DESTDIR}%%} .if ${_COUNT} == "1" _TMLINKS+= ${___tpmlinks} _COUNT=0 @@ -5114,7 +5114,7 @@ @set ${_MLINKS}; \ while :; do \ [ $$# -eq 0 ] && break || ${TRUE}; \ - ${RM} -f $${2%.gz}; ${RM} -f $$2.gz; \ + ${RM} -f $${2%.gz}; ${RM} -f $${2%.gz}.gz; \ ${LN} -fs `${ECHO_CMD} $$1 $$2 | ${AWK} '{ \ z=split($$1, a, /\//); x=split($$2, b, /\//); \ while (a[i] == b[i]) i++; \ From owner-p4-projects@FreeBSD.ORG Thu Aug 10 17:50:45 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 4197516A4DE; Thu, 10 Aug 2006 17:50:45 +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 032DC16A4DA for ; Thu, 10 Aug 2006 17:50:45 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C23CC43D46 for ; Thu, 10 Aug 2006 17:50:44 +0000 (GMT) (envelope-from gabor@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 k7AHoilI041579 for ; Thu, 10 Aug 2006 17:50:44 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AHoi76041575 for perforce@freebsd.org; Thu, 10 Aug 2006 17:50:44 GMT (envelope-from gabor@FreeBSD.org) Date: Thu, 10 Aug 2006 17:50:44 GMT Message-Id: <200608101750.k7AHoi76041575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103586 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: Thu, 10 Aug 2006 17:50:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=103586 Change 103586 by gabor@gabor_spitfire on 2006/08/10 17:50:23 Hook up CHROOTDESTDIR to SUB_LIST, PLIST_SUB and SCRIPTS_ENV that I forgot last time. Submitted by: John E. Hein Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#80 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#80 (text+ko) ==== @@ -1605,9 +1605,10 @@ INSTALL_WRKSRC?=${WRKSRC} PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} \ - DESTDIR=${DESTDIR} TARGETDIR=${TARGETDIR} -SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} \ - DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} + DESTDIR=${DESTDIR} TARGETDIR=${TARGETDIR} CHROOTDESTDIR=${CHROOTDESTDIR} +SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} \ + DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} \ + CHROOTDESTDIR=${CHROOTDESTDIR} PLIST_REINPLACE+= dirrmtry PLIST_REINPLACE_DIRRMTRY=s!^@dirrmtry \(.*\)!@unexec rmdir %D/\1 2>/dev/null || true! @@ -2536,7 +2537,8 @@ SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ PORTSDIR=${PORTSDIR} DEPENDS="${DEPENDS}" \ PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \ - DESTDIR=${DESTDIR} TARGETDIR=${DESTDIR} + DESTDIR=${DESTDIR} TARGETDIR=${DESTDIR} \ + CHROOTDESTDIR=${CHROOTDESTDIR} .if defined(BATCH) SCRIPTS_ENV+= BATCH=yes From owner-p4-projects@FreeBSD.ORG Thu Aug 10 18:14:18 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 A42BE16A4E2; Thu, 10 Aug 2006 18:14:18 +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 66EF916A4DF for ; Thu, 10 Aug 2006 18:14:18 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B5D843D4C for ; Thu, 10 Aug 2006 18:14:18 +0000 (GMT) (envelope-from imp@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 k7AIEInt044311 for ; Thu, 10 Aug 2006 18:14:18 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AIEHvP044308 for perforce@freebsd.org; Thu, 10 Aug 2006 18:14:17 GMT (envelope-from imp@freebsd.org) Date: Thu, 10 Aug 2006 18:14:17 GMT Message-Id: <200608101814.k7AIEHvP044308@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103592 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: Thu, 10 Aug 2006 18:14:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=103592 Change 103592 by imp@imp_lighthouse on 2006/08/10 18:13:27 $FreeBSD$ Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#14 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.h#6 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#14 (text+ko) ==== @@ -18,6 +18,8 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK + * + * $FreeBSD$ *****************************************************************************/ #include "at91rm9200.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.h#6 (text+ko) ==== @@ -16,6 +16,8 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK + * + * $FreeBSD$ ******************************************************************************/ #ifndef _SPI_FLASH_H_ From owner-p4-projects@FreeBSD.ORG Thu Aug 10 21:27:25 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 448DB16A4E0; Thu, 10 Aug 2006 21:27:25 +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 E108916A4DA for ; Thu, 10 Aug 2006 21:27:24 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83F4F43D49 for ; Thu, 10 Aug 2006 21:27:24 +0000 (GMT) (envelope-from gonzo@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 k7ALROGp069979 for ; Thu, 10 Aug 2006 21:27:24 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7ALROFt069976 for perforce@freebsd.org; Thu, 10 Aug 2006 21:27:24 GMT (envelope-from gonzo@FreeBSD.org) Date: Thu, 10 Aug 2006 21:27:24 GMT Message-Id: <200608102127.k7ALROFt069976@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 103601 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: Thu, 10 Aug 2006 21:27:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=103601 Change 103601 by gonzo@gonzo_hq on 2006/08/10 21:26:50 o Add stubs of break istruction and panic. To track down unimplemented functions. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/mem.c#4 edit .. //depot/projects/mips2/src/sys/mips/mips/support.S#7 edit .. //depot/projects/mips2/src/sys/mips/mips/uio_machdep.c#3 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/mem.c#4 (text+ko) ==== @@ -60,6 +60,7 @@ int memrw(struct cdev *dev, struct uio *uio, int flags) { + __asm __volatile ("break"); return (0); } @@ -67,6 +68,7 @@ memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot __unused) { + __asm __volatile ("break"); return (0); } @@ -74,6 +76,7 @@ memioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, int flags, struct thread *td) { + __asm __volatile ("break"); return (0); } ==== //depot/projects/mips2/src/sys/mips/mips/support.S#7 (text+ko) ==== @@ -64,17 +64,17 @@ */ ENTRY(bcmp) beqz a2, 2f - li v0, 0 + nop 1: subu a2, 1 - lbu t0, 0(a0) - lbu t1, 0(a1) - bne t0, t1, 2f - nop + lb t0, 0(a0) + lb t1, 0(a1) + bne t0, t1, 3f + li v0, 1 addu a0, 1 addu a1, 1 bnezl a2, 1b nop -2: li v0, 1 +2: li v0, 0 3: jr ra nop END(bcmp) @@ -128,6 +128,7 @@ * int subyte(void *addr, int byte) */ ENTRY(subyte) + break li v0, -1 jr ra nop @@ -138,6 +139,7 @@ * int susword(void *addr, int shortword) */ ENTRY(susword) + break li v0, -1 jr ra nop @@ -148,6 +150,7 @@ * int suswintr(void *addr, int shortword) */ ENTRY(suswintr) + break li v0, -1 jr ra nop @@ -158,6 +161,7 @@ * int suword(void *addr, long word) */ ENTRY(suword) + break li v0, -1 jr ra nop @@ -168,6 +172,7 @@ * int suword32(void *addr, int word) */ ENTRY(suword32) + break li v0, -1 jr ra nop @@ -178,6 +183,7 @@ * int suword64(void *addr, long word) */ ENTRY(suword64) + break li v0, -1 jr ra nop @@ -204,6 +210,7 @@ * int fubyte(const void *addr) */ ENTRY(fubyte) + break li v0, -1 jr ra nop @@ -214,6 +221,7 @@ * int fusword(const void *addr) */ ENTRY(fusword) + break li v0, -1 jr ra nop @@ -224,6 +232,7 @@ * int fuswintr(const void *addr) */ ENTRY(fuswintr) + break li v0, -1 jr ra nop @@ -234,6 +243,7 @@ * long fuword(const void *addr) */ ENTRY(fuword) + break li v0, -1 jr ra nop @@ -244,6 +254,7 @@ * int fuword32(const void *addr) */ ENTRY(fuword32) + break li v0, -1 jr ra nop @@ -263,6 +274,7 @@ * int copyin(const void *useraddr, void *kernaddr, size_t len) */ ENTRY(copyin) + break jr ra nop END(copyin) @@ -272,6 +284,7 @@ * int copyout(const void *kernaddr, void *useraddr, size_t len) */ ENTRY(copyout) + break jr ra nop END(copyout) ==== //depot/projects/mips2/src/sys/mips/mips/uio_machdep.c#3 (text+ko) ==== @@ -49,5 +49,6 @@ int uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) { + panic("unimplemented"); return (0); } From owner-p4-projects@FreeBSD.ORG Thu Aug 10 21:32:31 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 9706916A4DF; Thu, 10 Aug 2006 21:32:31 +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 5B2A816A4DE for ; Thu, 10 Aug 2006 21:32:31 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F91943D45 for ; Thu, 10 Aug 2006 21:32:31 +0000 (GMT) (envelope-from gonzo@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 k7ALWUof070229 for ; Thu, 10 Aug 2006 21:32:30 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7ALWU4W070226 for perforce@freebsd.org; Thu, 10 Aug 2006 21:32:30 GMT (envelope-from gonzo@FreeBSD.org) Date: Thu, 10 Aug 2006 21:32:30 GMT Message-Id: <200608102132.k7ALWU4W070226@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 103602 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: Thu, 10 Aug 2006 21:32:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=103602 Change 103602 by gonzo@gonzo_hq on 2006/08/10 21:32:26 o Add "dirty" flag for pages mapped with pmap_kenter. It will prevent TLB modified exception from being raised while accessing thread stack. Discussed with: cognet Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/pmap.c#7 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/pmap.c#7 (text+ko) ==== @@ -643,7 +643,7 @@ pmap_kenter(vm_offset_t va, vm_offset_t pa) { - tlb_enter(kernel_pmap, va, pa, PG_V | PG_W); + tlb_enter(kernel_pmap, va, pa, PG_V | PG_W | PG_D); } /* From owner-p4-projects@FreeBSD.ORG Thu Aug 10 21:33:33 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 2DFBD16A4E2; Thu, 10 Aug 2006 21:33:33 +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 0CB4816A4E0 for ; Thu, 10 Aug 2006 21:33:33 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA5C943D45 for ; Thu, 10 Aug 2006 21:33:32 +0000 (GMT) (envelope-from gonzo@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 k7ALXWCi070309 for ; Thu, 10 Aug 2006 21:33:32 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7ALXWnS070306 for perforce@freebsd.org; Thu, 10 Aug 2006 21:33:32 GMT (envelope-from gonzo@FreeBSD.org) Date: Thu, 10 Aug 2006 21:33:32 GMT Message-Id: <200608102133.k7ALXWnS070306@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 103603 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: Thu, 10 Aug 2006 21:33:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=103603 Change 103603 by gonzo@gonzo_hq on 2006/08/10 21:33:16 o Add UFS to malta kernel configuration. Affected files ... .. //depot/projects/mips2/src/sys/mips/conf/MALTA#9 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/conf/MALTA#9 (text+ko) ==== @@ -44,6 +44,12 @@ options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories + + # Debugging for use in -current #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS From owner-p4-projects@FreeBSD.ORG Thu Aug 10 22:12:24 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 6574316A4DD; Thu, 10 Aug 2006 22:12:24 +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 2C28516A4E6 for ; Thu, 10 Aug 2006 22:12:24 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA4EE43D46 for ; Thu, 10 Aug 2006 22:12:23 +0000 (GMT) (envelope-from gonzo@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 k7AMCNcS074877 for ; Thu, 10 Aug 2006 22:12:23 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AMCNKA074874 for perforce@freebsd.org; Thu, 10 Aug 2006 22:12:23 GMT (envelope-from gonzo@FreeBSD.org) Date: Thu, 10 Aug 2006 22:12:23 GMT Message-Id: <200608102212.k7AMCNKA074874@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 103609 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: Thu, 10 Aug 2006 22:12:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=103609 Change 103609 by gonzo@gonzo_hideout on 2006/08/10 22:12:22 o Clean out a couple of XXXMIPS. There is no need in them any more. Affected files ... .. //depot/projects/mips2/src/sys/kern/vfs_bio.c#5 edit Differences ... ==== //depot/projects/mips2/src/sys/kern/vfs_bio.c#5 (text+ko) ==== @@ -3143,11 +3143,6 @@ void bufdone_finish(struct buf *bp) { - bp = NULL; -/* - * XXXMIPS: This was the easiest way to move on. - * Leave it for later, since kernel at this stage won't probably boot. - */ KASSERT(BUF_REFCNT(bp) > 0, ("biodone: bp %p not busy %d", bp, BUF_REFCNT(bp))); @@ -3594,13 +3589,6 @@ static void vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to) { - bp = NULL; - from = (vm_offset_t) 0; - to = (vm_offset_t) 0; - /* - * XXXMIPS: Hack this part to make it working on MIPS. - * Leave it for later. - */ vm_offset_t pg; vm_page_t p; int index; From owner-p4-projects@FreeBSD.ORG Thu Aug 10 23:03:30 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 1D01316A4EA; Thu, 10 Aug 2006 23:03:30 +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 E14DE16A4E6 for ; Thu, 10 Aug 2006 23:03:29 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB8E343D68 for ; Thu, 10 Aug 2006 23:03:28 +0000 (GMT) (envelope-from imp@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 k7AN3Siw078559 for ; Thu, 10 Aug 2006 23:03:28 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AN3SB3078556 for perforce@freebsd.org; Thu, 10 Aug 2006 23:03:28 GMT (envelope-from imp@freebsd.org) Date: Thu, 10 Aug 2006 23:03:28 GMT Message-Id: <200608102303.k7AN3SB3078556@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103614 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: Thu, 10 Aug 2006 23:03:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=103614 Change 103614 by imp@imp_lighthouse on 2006/08/10 23:03:22 Kill include. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/sd-card.c#6 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/sd-card.c#6 (text+ko) ==== @@ -16,7 +16,6 @@ #include "lib_AT91RM9200.h" #include "mci_device.h" #include "lib.h" -#include "ints.h" #include "sd-card.h" #define AT91C_MCI_TIMEOUT 1000000 /* For AT91F_MCIDeviceWaitReady */ From owner-p4-projects@FreeBSD.ORG Thu Aug 10 23:03:30 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 C236516A55D; Thu, 10 Aug 2006 23:03:30 +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 6FEAE16A55B for ; Thu, 10 Aug 2006 23:03:30 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78A7143D64 for ; Thu, 10 Aug 2006 23:03:28 +0000 (GMT) (envelope-from imp@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 k7AN3SuN078553 for ; Thu, 10 Aug 2006 23:03:28 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AN3SAf078550 for perforce@freebsd.org; Thu, 10 Aug 2006 23:03:28 GMT (envelope-from imp@freebsd.org) Date: Thu, 10 Aug 2006 23:03:28 GMT Message-Id: <200608102303.k7AN3SAf078550@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103613 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: Thu, 10 Aug 2006 23:03:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=103613 Change 103613 by imp@imp_lighthouse on 2006/08/10 23:02:49 Kill some code Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootsd/Makefile#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootsd/main.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/ints.c#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/ints.h#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/sd-card.c#5 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootsd/Makefile#3 (text+ko) ==== @@ -5,7 +5,7 @@ P=bootsd FILES=${P} SRCS=arm_init.S main.c -SRCS+=ints.c mci_device.c sd-card.c stormy16-lib2.c +SRCS+=mci_device.c sd-card.c stormy16-lib2.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/bootsd/main.c#5 (text+ko) ==== @@ -80,7 +80,6 @@ int main(void) { - unsigned low_addr, high_addr; #ifdef REAL int i; #endif @@ -98,9 +97,7 @@ #endif EMAC_Init(); sdcard_init(); - low_addr = (mac[3] << 24) | (mac[2] << 16) | (mac[1] << 8) | mac[0]; - high_addr = (mac[5] << 8) | mac[4]; - SetMACAddress(low_addr, high_addr); + SetMACAddress(mac); printf("Reading from card..."); #ifdef REAL for (i = 0x80; i < 10 * 2048; i++) { ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/sd-card.c#5 (text+ko) ==== @@ -229,62 +229,6 @@ } -#if 0 -//*---------------------------------------------------------------------------- -//* \fn AT91F_Test -//* \brief Test Functions -//*---------------------------------------------------------------------------- -static int AT91F_Test(void) -{ - int i; - unsigned int Max_Read_DataBlock_Length; - int status; - - Max_Read_DataBlock_Length = MCI_Device.pMCI_DeviceFeatures->Max_Read_DataBlock_Length; - - //* ReadBlock & WriteBlock Test -> Entire Block - - //* Wait MCI Device Ready - AT91F_MCIDeviceWaitReady(AT91C_MCI_TIMEOUT); - - //* Read Block 1 - for(i=0;i X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D051016A4E7; Thu, 10 Aug 2006 23:05:32 +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 7610916A4E0 for ; Thu, 10 Aug 2006 23:05:32 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBFCD43D53 for ; Thu, 10 Aug 2006 23:05:31 +0000 (GMT) (envelope-from imp@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 k7AN5VnO078673 for ; Thu, 10 Aug 2006 23:05:31 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7AN5VlG078670 for perforce@freebsd.org; Thu, 10 Aug 2006 23:05:31 GMT (envelope-from imp@freebsd.org) Date: Thu, 10 Aug 2006 23:05:31 GMT Message-Id: <200608102305.k7AN5VlG078670@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103615 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: Thu, 10 Aug 2006 23:05:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=103615 Change 103615 by imp@imp_lighthouse on 2006/08/10 23:05:13 More dead code elimination. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/sd-card.c#7 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/sd-card.c#7 (text+ko) ==== @@ -21,8 +21,6 @@ #define AT91C_MCI_TIMEOUT 1000000 /* For AT91F_MCIDeviceWaitReady */ #define BUFFER_SIZE_MCI_DEVICE 512 #define MASTER_CLOCK 60000000 -#define FALSE -1 -#define TRUE 1 //Private functions //static void initInts(void); @@ -252,77 +250,6 @@ } -#if 0 -//*---------------------------------------------------------------------------- -//* \fn AT91F_Test_SDCard -//* \brief Configure MCI for SDCard and complete SDCard init, then jump to Test Functions -//*---------------------------------------------------------------------------- -static int AT91F_Test_SDCard(void) -{ - ////////////////////////////////////////////////////////// - //* For SDCard Init - ////////////////////////////////////////////////////////// - - AT91F_MCI_Configure(AT91C_BASE_MCI, - AT91C_MCI_DTOR_1MEGA_CYCLES, - AT91C_MCI_MR_PDCMODE, // 15MHz for MCK = 60MHz (CLKDIV = 1) - AT91C_MCI_SDCARD_4BITS_SLOTA); - - if(AT91F_MCI_SDCard_Init(&MCI_Device) != AT91C_INIT_OK) - return FALSE; - - printf("\r\n Memory_Capacity : %x", - MCI_Device.pMCI_DeviceFeatures->Memory_Capacity); - - printf("\r\n Sector_Size : %x", - MCI_Device.pMCI_DeviceFeatures->Sector_Size); - - printf("\r\n Max_Read_DataBlock_Length : %x", - MCI_Device.pMCI_DeviceFeatures->Max_Read_DataBlock_Length); - - printf("\r\n Max_Write_DataBlock_Length : %x", - MCI_Device.pMCI_DeviceFeatures->Max_Write_DataBlock_Length); - - printf("\r\n Read_Partial : %x", - MCI_Device.pMCI_DeviceFeatures->Read_Partial); - - printf("\r\n Write_Partial : %x", - MCI_Device.pMCI_DeviceFeatures->Write_Partial); - - printf("\r\nSDCard Initialisation Successful: Enter Test\r\n"); - - // Enter Main Tests - return(AT91F_Test()); -} - -static void initInts() -{ - // Init Interrupt Controller - AT91F_AIC_Open( - AT91C_BASE_AIC, // pointer to the AIC registers - AT91C_AIC_BRANCH_OPCODE, // IRQ exception vector - AT91F_UndefHandler, // FIQ exception vector - AT91F_UndefHandler, // AIC default handler - AT91F_SpuriousHandler, // AIC spurious handler - 0); // Protect mode - - // Perform 8 End Of Interrupt Command to make sure AIC will not Lock out nIRQ - AT91F_AIC_AcknowledgeIt(AT91C_BASE_AIC); - AT91F_AIC_AcknowledgeIt(AT91C_BASE_AIC); - AT91F_AIC_AcknowledgeIt(AT91C_BASE_AIC); - AT91F_AIC_AcknowledgeIt(AT91C_BASE_AIC); - AT91F_AIC_AcknowledgeIt(AT91C_BASE_AIC); - AT91F_AIC_AcknowledgeIt(AT91C_BASE_AIC); - AT91F_AIC_AcknowledgeIt(AT91C_BASE_AIC); - AT91F_AIC_AcknowledgeIt(AT91C_BASE_AIC); - - AT91F_AIC_SetExceptionVector((unsigned int *)0x0C, AT91F_FetchAbort); - AT91F_AIC_SetExceptionVector((unsigned int *)0x10, AT91F_DataAbort); - AT91F_AIC_SetExceptionVector((unsigned int *)0x4, AT91F_Undef); - -} -#endif - static void AT91F_MCI_Handler(void) { int status; @@ -376,6 +303,6 @@ AT91C_MCI_SDCARD_4BITS_SLOTA); if(AT91F_MCI_SDCard_Init(&MCI_Device) != AT91C_INIT_OK) - return FALSE; - return TRUE; + return 0; + return 1; } From owner-p4-projects@FreeBSD.ORG Thu Aug 10 23:16:47 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 E007416A4E0; Thu, 10 Aug 2006 23:16:46 +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 B9FB416A4DA for ; Thu, 10 Aug 2006 23:16:46 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FDD443D49 for ; Thu, 10 Aug 2006 23:16:46 +0000 (GMT) (envelope-from imp@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 k7ANGkCl079120 for ; Thu, 10 Aug 2006 23:16:46 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7ANGkZd079117 for perforce@freebsd.org; Thu, 10 Aug 2006 23:16:46 GMT (envelope-from imp@freebsd.org) Date: Thu, 10 Aug 2006 23:16:46 GMT Message-Id: <200608102316.k7ANGkZd079117@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103616 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: Thu, 10 Aug 2006 23:16:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=103616 Change 103616 by imp@imp_lighthouse on 2006/08/10 23:16:28 add bootsd Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile#9 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile#9 (text+ko) ==== @@ -1,5 +1,5 @@ # $FreeBSD: src/sys/boot/arm/at91/Makefile,v 1.2 2006/04/21 06:43:32 imp Exp $ -SUBDIR= libat91 boot0 boot0iic boot0spi boot2 bootiic bootspi +SUBDIR= libat91 boot0 boot0iic boot0spi boot2 bootiic bootspi bootsd .include From owner-p4-projects@FreeBSD.ORG Thu Aug 10 23:17:48 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 C43AD16A4DF; Thu, 10 Aug 2006 23:17:48 +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 9F83416A4DE for ; Thu, 10 Aug 2006 23:17:48 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E7D643D4C for ; Thu, 10 Aug 2006 23:17:48 +0000 (GMT) (envelope-from imp@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 k7ANHmBZ079172 for ; Thu, 10 Aug 2006 23:17:48 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7ANHmNm079169 for perforce@freebsd.org; Thu, 10 Aug 2006 23:17:48 GMT (envelope-from imp@freebsd.org) Date: Thu, 10 Aug 2006 23:17:48 GMT Message-Id: <200608102317.k7ANHmNm079169@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103617 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: Thu, 10 Aug 2006 23:17:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=103617 Change 103617 by imp@imp_lighthouse on 2006/08/10 23:17:05 rename SetMACAddress to EMAC_SetMACAddress Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#13 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootsd/main.c#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/loader_prompt.c#17 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#23 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#7 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#13 (text+ko) ==== @@ -266,7 +266,7 @@ if (argc > 6) { for (i = 0; i < 6; i++) mac[i] = p_ASCIIToHex(argv[i + 1]); - SetMACAddress(mac); + EMAC_SetMACAddress(mac); } break; } ==== //depot/projects/arm/src/sys/boot/arm/at91/bootsd/main.c#6 (text+ko) ==== @@ -97,7 +97,7 @@ #endif EMAC_Init(); sdcard_init(); - SetMACAddress(mac); + EMAC_SetMACAddress(mac); printf("Reading from card..."); #ifdef REAL for (i = 0x80; i < 10 * 2048; i++) { ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/loader_prompt.c#17 (text+ko) ==== @@ -283,7 +283,7 @@ if (argc > 6) { for (i = 0; i < 6; i++) mac[i] = p_ASCIIToHex(argv[i + 1]); - SetMACAddress(mac); + EMAC_SetMACAddress(mac); } break; } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#23 (text+ko) ==== @@ -475,13 +475,13 @@ /* * .KB_C_FN_DEFINITION_START - * void SetMACAddress(unsigned low_address, unsigned high_address) + * void EMAC_SetMACAddress(unsigned low_address, unsigned high_address) * This global function sets the MAC address. low_address is the first * four bytes while high_address is the last 2 bytes of the 48-bit value. * .KB_C_FN_DEFINITION_END */ void -SetMACAddress(unsigned char mac[6]) +EMAC_SetMACAddress(unsigned char mac[6]) { AT91PS_PMC pPMC = AT91C_BASE_PMC; AT91PS_EMAC pEmac = AT91C_BASE_EMAC; ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#7 (text+ko) ==== @@ -24,7 +24,7 @@ #ifndef _EMAC_H_ #define _EMAC_H_ -extern void SetMACAddress(unsigned char addr[6]); +extern void EMAC_SetMACAddress(unsigned char addr[6]); extern void SetServerIPAddress(unsigned address); extern void SetLocalIPAddress(unsigned address); extern void EMAC_Init(void); From owner-p4-projects@FreeBSD.ORG Thu Aug 10 23:25:59 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 95C2D16A4E5; Thu, 10 Aug 2006 23:25:59 +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 5932416A4DE for ; Thu, 10 Aug 2006 23:25:59 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3BA143D6A for ; Thu, 10 Aug 2006 23:25:58 +0000 (GMT) (envelope-from imp@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 k7ANPwQj079609 for ; Thu, 10 Aug 2006 23:25:58 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7ANPwP4079606 for perforce@freebsd.org; Thu, 10 Aug 2006 23:25:58 GMT (envelope-from imp@freebsd.org) Date: Thu, 10 Aug 2006 23:25:58 GMT Message-Id: <200608102325.k7ANPwP4079606@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103618 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: Thu, 10 Aug 2006 23:25:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=103618 Change 103618 by imp@imp_lighthouse on 2006/08/10 23:25:53 Save 3108 bytes in bootsd by separating out the init part of emac and the tftp part of emac. Considering that we're talking 316 bytes now and 3428 before, that's a 90% savings for the emac contribution to size. alas, anything that implements tftp will still pay this price. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#15 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#24 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#8 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac_init.c#1 add Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#15 (text+ko) ==== @@ -4,7 +4,7 @@ LIB= at91 INTERNALLIB= -SRCS=at91rm9200_lowlevel.c delay.c eeprom.c emac.c fpga.c getc.c \ +SRCS=at91rm9200_lowlevel.c delay.c eeprom.c emac.c emac_init.c fpga.c getc.c \ p_string.c putchar.c printf.c reset.c spi_flash.c xmodem.c NO_MAN= ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#24 (text+ko) ==== @@ -29,22 +29,14 @@ /* ********************** PRIVATE FUNCTIONS/DATA ******************************/ -static unsigned localMACSet, serverMACSet; -static unsigned char localMACAddr[6], serverMACAddr[6]; -static unsigned localMAClow, localMAChigh; -static unsigned localIPSet, serverIPSet; +static char serverMACAddr[6]; static unsigned char localIPAddr[4], serverIPAddr[4]; -static unsigned short serverPort, localPort; static int ackBlock; -static unsigned lastSize; static char *dlAddress; static unsigned transmitBuffer[1024 / sizeof(unsigned)]; static unsigned tftpSendPacket[256 / sizeof(unsigned)]; -receive_descriptor_t *p_rxBD; - - /* * .KB_C_FN_DEFINITION_START * unsigned short IP_checksum(unsigned short *p, int len) @@ -472,64 +464,8 @@ /* ************************** GLOBAL FUNCTIONS ********************************/ - /* * .KB_C_FN_DEFINITION_START - * void EMAC_SetMACAddress(unsigned low_address, unsigned high_address) - * This global function sets the MAC address. low_address is the first - * four bytes while high_address is the last 2 bytes of the 48-bit value. - * .KB_C_FN_DEFINITION_END - */ -void -EMAC_SetMACAddress(unsigned char mac[6]) -{ - AT91PS_PMC pPMC = AT91C_BASE_PMC; - AT91PS_EMAC pEmac = AT91C_BASE_EMAC; - - /* enable the peripheral clock before using EMAC */ - pPMC->PMC_PCER = ((unsigned) 1 << AT91C_ID_EMAC); - - p_memcpy(localMACAddr, mac, 6); - localMAClow = (mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5]; - localMAChigh = (mac[0] << 8) | mac[1]; - localMACSet = 1; - - AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_EMAC; - AT91C_BASE_PIOA->PIO_ASR = - AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | - AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | - AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | - AT91C_PA7_ETXCK_EREFCK; - AT91C_BASE_PIOA->PIO_PDR = - AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | - AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | - AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | - AT91C_PA7_ETXCK_EREFCK; -#ifdef BOOT_KB9202 /* Really !RMII */ - AT91C_BASE_PIOB->PIO_BSR = - AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | - AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | - AT91C_PB18_ECOL | AT91C_PB19_ERXCK; - AT91C_BASE_PIOB->PIO_PDR = - AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | - AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | - AT91C_PB18_ECOL | AT91C_PB19_ERXCK; -#endif - pEmac->EMAC_CTL = 0; - - pEmac->EMAC_CFG = (pEmac->EMAC_CFG & ~(AT91C_EMAC_CLK)) | -#ifdef BOOT_TSC - AT91C_EMAC_RMII | -#endif - AT91C_EMAC_CLK_HCLK_32 | AT91C_EMAC_CAF; - // the sequence write EMAC_SA1L and write EMAC_SA1H must be respected - pEmac->EMAC_SA1L = localMAClow; - pEmac->EMAC_SA1H = localMAChigh; -} - - -/* - * .KB_C_FN_DEFINITION_START * void SetServerIPAddress(unsigned address) * This global function sets the IP of the TFTP download server. * .KB_C_FN_DEFINITION_END @@ -622,22 +558,3 @@ if (timeout == 0) printf("TFTP TIMEOUT!\r\n"); } - - -/* - * .KB_C_FN_DEFINITION_START - * void EMAC_Init(void) - * This global function initializes variables used in tftp transfers. - * .KB_C_FN_DEFINITION_END - */ -void -EMAC_Init(void) -{ - p_rxBD = (receive_descriptor_t*)RX_BUFFER_START; - localMACSet = 0; - serverMACSet = 0; - localIPSet = 0; - serverIPSet = 0; - localPort = SWAP16(0x8002); - lastSize = 0; -} ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#8 (text+ko) ==== @@ -127,4 +127,12 @@ #define MII_SSTS_10HDX 0x1000 #endif +extern unsigned char localMACAddr[6]; +extern unsigned localMAClow, localMAChigh; +extern unsigned localMACSet, serverMACSet; +extern receive_descriptor_t *p_rxBD; +extern unsigned lastSize; +extern unsigned localIPSet, serverIPSet; +extern unsigned short serverPort, localPort; + #endif /* _EMAC_H_ */ From owner-p4-projects@FreeBSD.ORG Thu Aug 10 23:55:36 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 6BEFF16A4E5; Thu, 10 Aug 2006 23: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 2FF8E16A4DF for ; Thu, 10 Aug 2006 23:55:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D105C43D45 for ; Thu, 10 Aug 2006 23:55:35 +0000 (GMT) (envelope-from imp@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 k7ANtZXU081073 for ; Thu, 10 Aug 2006 23:55:35 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7ANtZho081070 for perforce@freebsd.org; Thu, 10 Aug 2006 23:55:35 GMT (envelope-from imp@freebsd.org) Date: Thu, 10 Aug 2006 23:55:35 GMT Message-Id: <200608102355.k7ANtZho081070@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103619 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: Thu, 10 Aug 2006 23:55:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=103619 Change 103619 by imp@imp_lighthouse on 2006/08/10 23:54:35 Move sd support into libat91 At the same time, use a couple of strategic shifts to avoid the need for stormy16-lib2.c entirely. This save > 1000 bytes! Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootsd/Makefile#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/lib_AT91RM9200.h#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/mci_device.c#4 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/mci_device.h#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/sd-card.c#8 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/sd-card.h#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/stormy16-lib2.c#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#16 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib_AT91RM9200.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.c#1 add .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.h#1 add .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/sd-card.c#1 add .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/sd-card.h#1 branch Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootsd/Makefile#4 (text+ko) ==== @@ -1,11 +1,11 @@ # $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.1 2006/04/19 17:16:48 imp Exp $ -.PATH: ${.CURDIR}/../bootspi +.PATH: ${.CURDIR}/../bootspi P=bootsd FILES=${P} SRCS=arm_init.S main.c -SRCS+=mci_device.c sd-card.c stormy16-lib2.c +#SRCS+=stormy16-lib2.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#16 (text+ko) ==== @@ -5,7 +5,8 @@ LIB= at91 INTERNALLIB= SRCS=at91rm9200_lowlevel.c delay.c eeprom.c emac.c emac_init.c fpga.c getc.c \ - p_string.c putchar.c printf.c reset.c spi_flash.c xmodem.c + p_string.c putchar.c printf.c reset.c spi_flash.c xmodem.c \ + sd-card.c mci_device.c NO_MAN= .if ${MK_TAG_LIST} != "no" From owner-p4-projects@FreeBSD.ORG Fri Aug 11 00:08:58 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 DE40516A4E0; Fri, 11 Aug 2006 00:08:57 +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 BAC2216A4DE for ; Fri, 11 Aug 2006 00:08:57 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FA2543D49 for ; Fri, 11 Aug 2006 00:08:52 +0000 (GMT) (envelope-from imp@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 k7B08qaD082835 for ; Fri, 11 Aug 2006 00:08:52 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7B08q9U082832 for perforce@freebsd.org; Fri, 11 Aug 2006 00:08:52 GMT (envelope-from imp@freebsd.org) Date: Fri, 11 Aug 2006 00:08:52 GMT Message-Id: <200608110008.k7B08q9U082832@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103620 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, 11 Aug 2006 00:08:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=103620 Change 103620 by imp@imp_lighthouse on 2006/08/11 00:08:24 Save about 100 bytes by using a temporary pointer Also reformat a bit to reduce number of lines > 160. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.c#2 (text+ko) ==== @@ -391,6 +391,7 @@ unsigned int tab_response[4]; unsigned int mult,blocknr; unsigned int i,Nb_Cards_Found=0; + AT91PS_MciDeviceFeatures f; //* Resets all MMC Cards in Idle state AT91F_MCI_SendCommand(pMCI_Device, AT91C_MMC_GO_IDLE_STATE_CMD, AT91C_NO_ARGUMENT); @@ -405,24 +406,25 @@ //* Set the Mode Register AT91C_BASE_MCI->MCI_MR = AT91C_MCI_MR_PDCMODE; for(i = 0; i < Nb_Cards_Found; i++) { + f = pMCI_Device->pMCI_DeviceFeatures + i; if (AT91F_MCI_GetCSD(pMCI_Device, - pMCI_Device->pMCI_DeviceFeatures[i].Relative_Card_Address, + f->Relative_Card_Address, tab_response) != AT91C_CMD_SEND_OK) { - pMCI_Device->pMCI_DeviceFeatures[i].Relative_Card_Address = 0; + f->Relative_Card_Address = 0; continue; } - pMCI_Device->pMCI_DeviceFeatures[i].READ_BL_LEN = ((tab_response[1] >> AT91C_CSD_RD_B_LEN_S) & AT91C_CSD_RD_B_LEN_M); - pMCI_Device->pMCI_DeviceFeatures[i].WRITE_BL_LEN = ((tab_response[3] >> AT91C_CSD_WBLEN_S) & AT91C_CSD_WBLEN_M ); - pMCI_Device->pMCI_DeviceFeatures[i].Max_Read_DataBlock_Length = 1 << pMCI_Device->pMCI_DeviceFeatures[i].READ_BL_LEN; - pMCI_Device->pMCI_DeviceFeatures[i].Max_Write_DataBlock_Length = 1 << pMCI_Device->pMCI_DeviceFeatures[i].WRITE_BL_LEN; - pMCI_Device->pMCI_DeviceFeatures[i].Sector_Size = 1 + ((tab_response[2] >> AT91C_CSD_v22_SECT_SIZE_S) & AT91C_CSD_v22_SECT_SIZE_M ); - pMCI_Device->pMCI_DeviceFeatures[i].Read_Partial = (tab_response[1] >> AT91C_CSD_RD_B_PAR_S) & AT91C_CSD_RD_B_PAR_M; - pMCI_Device->pMCI_DeviceFeatures[i].Write_Partial = (tab_response[3] >> AT91C_CSD_WBLOCK_P_S) & AT91C_CSD_WBLOCK_P_M; + f->READ_BL_LEN = ((tab_response[1] >> AT91C_CSD_RD_B_LEN_S) & AT91C_CSD_RD_B_LEN_M); + f->WRITE_BL_LEN = ((tab_response[3] >> AT91C_CSD_WBLEN_S) & AT91C_CSD_WBLEN_M ); + f->Max_Read_DataBlock_Length = 1 << f->READ_BL_LEN; + f->Max_Write_DataBlock_Length = 1 << f->WRITE_BL_LEN; + f->Sector_Size = 1 + ((tab_response[2] >> AT91C_CSD_v22_SECT_SIZE_S) & AT91C_CSD_v22_SECT_SIZE_M ); + f->Read_Partial = (tab_response[1] >> AT91C_CSD_RD_B_PAR_S) & AT91C_CSD_RD_B_PAR_M; + f->Write_Partial = (tab_response[3] >> AT91C_CSD_WBLOCK_P_S) & AT91C_CSD_WBLOCK_P_M; // None in MMC specification version 2.2 - pMCI_Device->pMCI_DeviceFeatures[i].Erase_Block_Enable = 0; - pMCI_Device->pMCI_DeviceFeatures[i].Read_Block_Misalignment = (tab_response[1] >> AT91C_CSD_RD_B_MIS_S) & AT91C_CSD_RD_B_MIS_M; - pMCI_Device->pMCI_DeviceFeatures[i].Write_Block_Misalignment = (tab_response[1] >> AT91C_CSD_WR_B_MIS_S) & AT91C_CSD_WR_B_MIS_M; + f->Erase_Block_Enable = 0; + f->Read_Block_Misalignment = (tab_response[1] >> AT91C_CSD_RD_B_MIS_S) & AT91C_CSD_RD_B_MIS_M; + f->Write_Block_Misalignment = (tab_response[1] >> AT91C_CSD_WR_B_MIS_S) & AT91C_CSD_WR_B_MIS_M; //// Compute Memory Capacity // compute MULT @@ -431,7 +433,7 @@ blocknr = ((tab_response[1] >> AT91C_CSD_CSIZE_H_S) & AT91C_CSD_CSIZE_H_M) << 2; // compute MULT * (LSB of C-SIZE + MSB already computed + 1) = BLOCKNR blocknr = mult * ( ( blocknr + ( (tab_response[2] >> AT91C_CSD_CSIZE_L_S) & AT91C_CSD_CSIZE_L_M) ) + 1 ); - pMCI_Device->pMCI_DeviceFeatures[i].Memory_Capacity = pMCI_Device->pMCI_DeviceFeatures[i].Max_Read_DataBlock_Length * blocknr; + f->Memory_Capacity = f->Max_Read_DataBlock_Length * blocknr; //// End of Compute Memory Capacity } // XXX warner hacked this @@ -522,43 +524,59 @@ { unsigned int tab_response[4]; unsigned int mult,blocknr; + AT91PS_MciDeviceFeatures f; AT91F_MCI_SendCommand(pMCI_Device, AT91C_GO_IDLE_STATE_CMD, AT91C_NO_ARGUMENT); if (AT91F_MCI_SDCard_GetOCR(pMCI_Device) == AT91C_INIT_ERROR) return AT91C_INIT_ERROR; - if (AT91F_MCI_SDCard_GetCID(pMCI_Device,tab_response) == AT91C_CMD_SEND_OK) { - pMCI_Device->pMCI_DeviceFeatures->Card_Inserted = AT91C_SD_CARD_INSERTED; - if (AT91F_MCI_SendCommand(pMCI_Device, AT91C_SET_RELATIVE_ADDR_CMD, 0) == AT91C_CMD_SEND_OK) { - pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address = (AT91C_BASE_MCI->MCI_RSPR[0] >> 16); - if (AT91F_MCI_GetCSD(pMCI_Device,pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address,tab_response) == AT91C_CMD_SEND_OK) { - pMCI_Device->pMCI_DeviceFeatures->Max_Read_DataBlock_Length = 1 << ((tab_response[1] >> AT91C_CSD_RD_B_LEN_S) & AT91C_CSD_RD_B_LEN_M ); - pMCI_Device->pMCI_DeviceFeatures->Max_Write_DataBlock_Length = 1 << ((tab_response[3] >> AT91C_CSD_WBLEN_S) & AT91C_CSD_WBLEN_M ); - pMCI_Device->pMCI_DeviceFeatures->Sector_Size = 1 + ((tab_response[2] >> AT91C_CSD_v21_SECT_SIZE_S) & AT91C_CSD_v21_SECT_SIZE_M ); - pMCI_Device->pMCI_DeviceFeatures->Read_Partial = (tab_response[1] >> AT91C_CSD_RD_B_PAR_S) & AT91C_CSD_RD_B_PAR_M; - pMCI_Device->pMCI_DeviceFeatures->Write_Partial = (tab_response[3] >> AT91C_CSD_WBLOCK_P_S) & AT91C_CSD_WBLOCK_P_M; - pMCI_Device->pMCI_DeviceFeatures->Erase_Block_Enable = (tab_response[3] >> AT91C_CSD_v21_ER_BLEN_EN_S) & AT91C_CSD_v21_ER_BLEN_EN_M; - pMCI_Device->pMCI_DeviceFeatures->Read_Block_Misalignment = (tab_response[1] >> AT91C_CSD_RD_B_MIS_S) & AT91C_CSD_RD_B_MIS_M; - pMCI_Device->pMCI_DeviceFeatures->Write_Block_Misalignment = (tab_response[1] >> AT91C_CSD_WR_B_MIS_S) & AT91C_CSD_WR_B_MIS_M; - - //// Compute Memory Capacity - // compute MULT - mult = 1 << ( ((tab_response[2] >> AT91C_CSD_C_SIZE_M_S) & AT91C_CSD_C_SIZE_M_M) + 2 ); - // compute MSB of C_SIZE - blocknr = ((tab_response[1] >> AT91C_CSD_CSIZE_H_S) & AT91C_CSD_CSIZE_H_M) << 2; - // compute MULT * (LSB of C-SIZE + MSB already computed + 1) = BLOCKNR - blocknr = mult * ( ( blocknr + ( (tab_response[2] >> AT91C_CSD_CSIZE_L_S) & AT91C_CSD_CSIZE_L_M) ) + 1 ); - - pMCI_Device->pMCI_DeviceFeatures->Memory_Capacity = pMCI_Device->pMCI_DeviceFeatures->Max_Read_DataBlock_Length * blocknr; - //// End of Compute Memory Capacity - - if (AT91F_MCI_SDCard_SetBusWidth(pMCI_Device) == AT91C_CMD_SEND_OK) { - if (AT91F_MCI_SetBlocklength(pMCI_Device,pMCI_Device->pMCI_DeviceFeatures->Max_Read_DataBlock_Length) == AT91C_CMD_SEND_OK) - return AT91C_INIT_OK; - } - } - } - } - return AT91C_INIT_ERROR; + f = pMCI_Device->pMCI_DeviceFeatures; + if (AT91F_MCI_SDCard_GetCID(pMCI_Device,tab_response) != + AT91C_CMD_SEND_OK) + return AT91C_INIT_ERROR; + f->Card_Inserted = AT91C_SD_CARD_INSERTED; + if (AT91F_MCI_SendCommand(pMCI_Device, AT91C_SET_RELATIVE_ADDR_CMD, 0) + != AT91C_CMD_SEND_OK) + return AT91C_INIT_ERROR; + f->Relative_Card_Address = (AT91C_BASE_MCI->MCI_RSPR[0] >> 16); + if (AT91F_MCI_GetCSD(pMCI_Device,f->Relative_Card_Address,tab_response) + != AT91C_CMD_SEND_OK) + return AT91C_INIT_ERROR; + f->READ_BL_LEN = 1 << ((tab_response[1] >> AT91C_CSD_RD_B_LEN_S) & + AT91C_CSD_RD_B_LEN_M); + f->WRITE_BL_LEN = 1 << ((tab_response[3] >> AT91C_CSD_WBLEN_S) & + AT91C_CSD_WBLEN_M); + f->Max_Read_DataBlock_Length = 1 << f->READ_BL_LEN; + f->Max_Write_DataBlock_Length = 1 << f->WRITE_BL_LEN; + f->Sector_Size = 1 + ((tab_response[2] >> AT91C_CSD_v21_SECT_SIZE_S) & + AT91C_CSD_v21_SECT_SIZE_M); + f->Read_Partial = (tab_response[1] >> AT91C_CSD_RD_B_PAR_S) & + AT91C_CSD_RD_B_PAR_M; + f->Write_Partial = (tab_response[3] >> AT91C_CSD_WBLOCK_P_S) & + AT91C_CSD_WBLOCK_P_M; + f->Erase_Block_Enable = (tab_response[3] >> AT91C_CSD_v21_ER_BLEN_EN_S) & + AT91C_CSD_v21_ER_BLEN_EN_M; + f->Read_Block_Misalignment = (tab_response[1] >> AT91C_CSD_RD_B_MIS_S) & + AT91C_CSD_RD_B_MIS_M; + f->Write_Block_Misalignment = (tab_response[1] >> AT91C_CSD_WR_B_MIS_S) & + AT91C_CSD_WR_B_MIS_M; + //// Compute Memory Capacity + // compute MULT + mult = 1 << ( ((tab_response[2] >> AT91C_CSD_C_SIZE_M_S) & + AT91C_CSD_C_SIZE_M_M) + 2 ); + // compute MSB of C_SIZE + blocknr = ((tab_response[1] >> AT91C_CSD_CSIZE_H_S) & + AT91C_CSD_CSIZE_H_M) << 2; + // compute MULT * (LSB of C-SIZE + MSB already computed + 1) = BLOCKNR + blocknr = mult * ((blocknr + ((tab_response[2] >> AT91C_CSD_CSIZE_L_S) & + AT91C_CSD_CSIZE_L_M)) + 1); + f->Memory_Capacity = f->Max_Read_DataBlock_Length * blocknr; + //// End of Compute Memory Capacity + if (AT91F_MCI_SDCard_SetBusWidth(pMCI_Device) != AT91C_CMD_SEND_OK) + return AT91C_INIT_ERROR; + if (AT91F_MCI_SetBlocklength(pMCI_Device,f->Max_Read_DataBlock_Length) + != AT91C_CMD_SEND_OK) + return AT91C_INIT_ERROR; + return AT91C_INIT_OK; } From owner-p4-projects@FreeBSD.ORG Fri Aug 11 00:16:02 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 60F9716A4E0; Fri, 11 Aug 2006 00:16:02 +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 18B3F16A4DE for ; Fri, 11 Aug 2006 00:16:02 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7C4943D45 for ; Fri, 11 Aug 2006 00:16:01 +0000 (GMT) (envelope-from imp@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 k7B0G1eC084431 for ; Fri, 11 Aug 2006 00:16:01 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7B0G10F084428 for perforce@freebsd.org; Fri, 11 Aug 2006 00:16:01 GMT (envelope-from imp@freebsd.org) Date: Fri, 11 Aug 2006 00:16:01 GMT Message-Id: <200608110016.k7B0G10F084428@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103621 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, 11 Aug 2006 00:16:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=103621 Change 103621 by imp@imp_lighthouse on 2006/08/11 00:15:24 Kill dead code, minor formatting nits Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/sd-card.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/sd-card.c#2 (text+ko) ==== @@ -269,9 +269,9 @@ int sdcard_init(void) { -/////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// // MCI Init : common to MMC and SDCard -/////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// //initInts(); @@ -283,28 +283,12 @@ // Init MCI Device Structures AT91F_CfgDevice(); - /* - // Disable all the interrupts - AT91C_BASE_MCI->MCI_IDR = 0xFFFFFFFF; - - - // Configure MCI interrupt - AT91F_AIC_ConfigureIt(AT91C_BASE_AIC, - AT91C_ID_MCI, - AT91C_AIC_PRIOR_HIGHEST, - AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE, - AT91F_MCI_Handler); - - // Enable MCI interrupt - AT91F_AIC_EnableIt(AT91C_BASE_AIC,AT91C_ID_MCI); - */ - AT91F_MCI_Configure(AT91C_BASE_MCI, - AT91C_MCI_DTOR_1MEGA_CYCLES, - AT91C_MCI_MR_PDCMODE, // 15MHz for MCK = 60MHz (CLKDIV = 1) - AT91C_MCI_SDCARD_4BITS_SLOTA); + AT91C_MCI_DTOR_1MEGA_CYCLES, + AT91C_MCI_MR_PDCMODE, // 15MHz for MCK = 60MHz (CLKDIV = 1) + AT91C_MCI_SDCARD_4BITS_SLOTA); - if(AT91F_MCI_SDCard_Init(&MCI_Device) != AT91C_INIT_OK) + if (AT91F_MCI_SDCard_Init(&MCI_Device) != AT91C_INIT_OK) return 0; return 1; } From owner-p4-projects@FreeBSD.ORG Fri Aug 11 00:20:08 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 0C78616A4E1; Fri, 11 Aug 2006 00:20:08 +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 DC46A16A4DA for ; Fri, 11 Aug 2006 00:20:07 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DFE943D49 for ; Fri, 11 Aug 2006 00:20:07 +0000 (GMT) (envelope-from imp@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 k7B0K7fo084559 for ; Fri, 11 Aug 2006 00:20:07 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7B0K7N1084556 for perforce@freebsd.org; Fri, 11 Aug 2006 00:20:07 GMT (envelope-from imp@freebsd.org) Date: Fri, 11 Aug 2006 00:20:07 GMT Message-Id: <200608110020.k7B0K7N1084556@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103622 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, 11 Aug 2006 00:20:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=103622 Change 103622 by imp@imp_lighthouse on 2006/08/11 00:19:38 don't compile in so many debug writes. Saves another 400 bytes, more or less. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/sd-card.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.c#3 (text+ko) ==== @@ -134,9 +134,11 @@ unsigned int *dataBuffer, int sizeToRead) { - //////////////////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////// if (pMCI_Device->pMCI_DeviceDesc->state != AT91C_MCI_IDLE) { +#if IMP_DEBUG printf("1 state is 0x%x\r\n", pMCI_Device->pMCI_DeviceDesc->state); +#endif return AT91C_READ_ERROR; } @@ -144,18 +146,24 @@ if ((AT91F_MCI_GetStatus(pMCI_Device, pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address) & AT91C_SR_READY_FOR_DATA) != AT91C_SR_READY_FOR_DATA) { +#if IMP_DEBUG printf("2\r\n"); +#endif return AT91C_READ_ERROR; } if ( (src + sizeToRead) > pMCI_Device->pMCI_DeviceFeatures->Memory_Capacity ) { +#if IMP_DEBUG printf("3\r\n"); +#endif return AT91C_READ_ERROR; } // If source does not fit a begin of a block if ((src & ((1 << pMCI_Device->pMCI_DeviceFeatures->READ_BL_LEN) - 1)) != 0) { +#if IMP_DEBUG printf("4\r\n"); +#endif return AT91C_READ_ERROR; } @@ -163,15 +171,19 @@ // ALWAYS SUPPORTED IN SD Memory Card if( (sizeToRead < pMCI_Device->pMCI_DeviceFeatures->Max_Read_DataBlock_Length) && (pMCI_Device->pMCI_DeviceFeatures->Read_Partial == 0x00) ) { +#if IMP_DEBUG printf("5\r\n"); +#endif return AT91C_READ_ERROR; } if( sizeToRead > pMCI_Device->pMCI_DeviceFeatures->Max_Read_DataBlock_Length) { +#if IMP_DEBUG printf("6\r\n"); +#endif return AT91C_READ_ERROR; } - //////////////////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////// // Init Mode Register AT91C_BASE_MCI->MCI_MR |= ((pMCI_Device->pMCI_DeviceFeatures->Max_Read_DataBlock_Length << 16) | AT91C_MCI_PDCMODE); @@ -211,14 +223,14 @@ unsigned int *dataBuffer, int sizeToWrite ) { - //////////////////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////// if( pMCI_Device->pMCI_DeviceDesc->state != AT91C_MCI_IDLE) - return AT91C_WRITE_ERROR; + return AT91C_WRITE_ERROR; - if( (AT91F_MCI_GetStatus(pMCI_Device,pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address) & AT91C_SR_READY_FOR_DATA) != AT91C_SR_READY_FOR_DATA) - return AT91C_WRITE_ERROR; + if( (AT91F_MCI_GetStatus(pMCI_Device,pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address) & AT91C_SR_READY_FOR_DATA) != AT91C_SR_READY_FOR_DATA) + return AT91C_WRITE_ERROR; - if ( (dest + sizeToWrite) > pMCI_Device->pMCI_DeviceFeatures->Memory_Capacity ) + if ((dest + sizeToWrite) > pMCI_Device->pMCI_DeviceFeatures->Memory_Capacity) return AT91C_WRITE_ERROR; // If source does not fit a begin of a block @@ -226,15 +238,15 @@ return AT91C_WRITE_ERROR; // Test if the MMC supports Partial Write Block - if( (sizeToWrite < pMCI_Device->pMCI_DeviceFeatures->Max_Write_DataBlock_Length) - && (pMCI_Device->pMCI_DeviceFeatures->Write_Partial == 0x00) ) + if( (sizeToWrite < pMCI_Device->pMCI_DeviceFeatures->Max_Write_DataBlock_Length) + && (pMCI_Device->pMCI_DeviceFeatures->Write_Partial == 0x00) ) return AT91C_WRITE_ERROR; if( sizeToWrite > pMCI_Device->pMCI_DeviceFeatures->Max_Write_DataBlock_Length ) return AT91C_WRITE_ERROR; - //////////////////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////// - // Init Mode Register + // Init Mode Register AT91C_BASE_MCI->MCI_MR |= ((pMCI_Device->pMCI_DeviceFeatures->Max_Write_DataBlock_Length << 16) | AT91C_MCI_PDCMODE); if (sizeToWrite %4) @@ -243,30 +255,30 @@ sizeToWrite = sizeToWrite/4; // Init PDC for write sequence - AT91C_BASE_PDC_MCI->PDC_PTCR = (AT91C_PDC_TXTDIS | AT91C_PDC_RXTDIS); - AT91C_BASE_PDC_MCI->PDC_TPR = (unsigned int) dataBuffer; - AT91C_BASE_PDC_MCI->PDC_TCR = sizeToWrite; + AT91C_BASE_PDC_MCI->PDC_PTCR = (AT91C_PDC_TXTDIS | AT91C_PDC_RXTDIS); + AT91C_BASE_PDC_MCI->PDC_TPR = (unsigned int) dataBuffer; + AT91C_BASE_PDC_MCI->PDC_TCR = sizeToWrite; // Send the write single block command - if ( AT91F_MCI_SendCommand(pMCI_Device, AT91C_WRITE_BLOCK_CMD, dest) != AT91C_CMD_SEND_OK) - return AT91C_WRITE_ERROR; + if ( AT91F_MCI_SendCommand(pMCI_Device, AT91C_WRITE_BLOCK_CMD, dest) != AT91C_CMD_SEND_OK) + return AT91C_WRITE_ERROR; pMCI_Device->pMCI_DeviceDesc->state = AT91C_MCI_TX_SINGLE_BLOCK; // Enable AT91C_MCI_TXBUFE Interrupt - AT91C_BASE_MCI->MCI_IER = AT91C_MCI_TXBUFE; + AT91C_BASE_MCI->MCI_IER = AT91C_MCI_TXBUFE; // Enables TX for PDC transfert requests - AT91C_BASE_PDC_MCI->PDC_PTCR = AT91C_PDC_TXTEN; + AT91C_BASE_PDC_MCI->PDC_PTCR = AT91C_PDC_TXTEN; return AT91C_WRITE_OK; } #endif -//*------------------------------------------------------------------------------------------------------------ +//*---------------------------------------------------------------------------- //* \fn AT91F_MCI_MMC_SelectCard //* \brief Toggles a card between the Stand_by and Transfer states or between Programming and Disconnect states -//*------------------------------------------------------------------------------------------------------------ +//*---------------------------------------------------------------------------- AT91S_MCIDeviceStatus AT91F_MCI_MMC_SelectCard(AT91PS_MciDevice pMCI_Device, unsigned int relative_card_address) { ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/sd-card.c#3 (text+ko) ==== @@ -54,8 +54,10 @@ } while( !(status & AT91C_MCI_NOTBUSY) && (timeout>0) ); +#if IMP_DEBUG if (timeout == 0) printf("Timeout, status is 0x%x\r\n", status); +#endif //TODO: Make interrupts work! AT91F_MCI_Handler(); @@ -70,7 +72,9 @@ AT91S_MCIDeviceStatus status; int sizeToWrite; +#if IMP_DEBUG printf("\r\n"); +#endif //See if we are requested to write partial sectors, and have the capability to do so if ((length % sectorLength) && !(MCI_Device_Features.Write_Partial)) @@ -145,8 +149,10 @@ int sizeToRead; unsigned int *walker; +#if IMP_DEBUG printf("Reading 0x%x bytes into ARM Addr 0x%x from card offset 0x%x\r\n", length, dest, source); +#endif //See if we are requested to read partial sectors, and have the capability to do so @@ -171,7 +177,9 @@ status = AT91F_MCI_ReadBlock(&MCI_Device, source, (unsigned int*)dest, sizeToRead); //TODO:Status checking if (status != AT91C_READ_OK) { +#if IMP_DEBUG printf("STATUS is 0x%x\r\n", status); +#endif return -1; } @@ -201,12 +209,16 @@ AT91F_MCIDeviceWaitReady(AT91C_MCI_TIMEOUT); //Do the writing status = AT91F_MCI_ReadBlock(&MCI_Device, source, (unsigned int*)dest, sizeToRead); +#if IMP_DEBUG printf("Reading 0x%x Addr 0x%x card 0x%x\r\n", sizeToRead, dest, source); +#endif //TODO:Status checking if (status != AT91C_READ_OK) { +#if IMP_DEBUG printf("STATUS is 0x%x\r\n", status); +#endif return -1; } From owner-p4-projects@FreeBSD.ORG Fri Aug 11 00:31:22 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 870E116A4E8; Fri, 11 Aug 2006 00:31:22 +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 60BF816A4E5 for ; Fri, 11 Aug 2006 00:31:22 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F1AE43D45 for ; Fri, 11 Aug 2006 00:31:22 +0000 (GMT) (envelope-from imp@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 k7B0VLpV085175 for ; Fri, 11 Aug 2006 00:31:21 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7B0VL5c085162 for perforce@freebsd.org; Fri, 11 Aug 2006 00:31:21 GMT (envelope-from imp@freebsd.org) Date: Fri, 11 Aug 2006 00:31:21 GMT Message-Id: <200608110031.k7B0VL5c085162@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103623 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, 11 Aug 2006 00:31:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=103623 Change 103623 by imp@imp_lighthouse on 2006/08/11 00:31:09 Don't pass parameters that aren't used. Saves 58 bytes! Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.h#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.c#4 (text+ko) ==== @@ -25,7 +25,6 @@ //*---------------------------------------------------------------------------- static AT91S_MCIDeviceStatus AT91F_MCI_SendCommand( - AT91PS_MciDevice pMCI_Device, unsigned int Cmd, unsigned int Arg) { @@ -83,7 +82,7 @@ if ( (Cmd_App && AT91C_SDCARD_APP_ALL_CMD) == 0) return AT91C_CMD_SEND_ERROR; - return(AT91F_MCI_SendCommand(pMCI_Device,Cmd_App,Arg)); + return(AT91F_MCI_SendCommand(Cmd_App,Arg)); } //*---------------------------------------------------------------------------- @@ -91,9 +90,9 @@ //* \brief Addressed card sends its status register //*---------------------------------------------------------------------------- static AT91S_MCIDeviceStatus -AT91F_MCI_GetStatus(AT91PS_MciDevice pMCI_Device,unsigned int relative_card_address) +AT91F_MCI_GetStatus(unsigned int relative_card_address) { - if (AT91F_MCI_SendCommand(pMCI_Device, AT91C_SEND_STATUS_CMD, + if (AT91F_MCI_SendCommand(AT91C_SEND_STATUS_CMD, relative_card_address <<16) == AT91C_CMD_SEND_OK) return (AT91C_BASE_MCI->MCI_RSPR[0]); return AT91C_CMD_SEND_ERROR; @@ -143,7 +142,7 @@ } - if ((AT91F_MCI_GetStatus(pMCI_Device, + if ((AT91F_MCI_GetStatus( pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address) & AT91C_SR_READY_FOR_DATA) != AT91C_SR_READY_FOR_DATA) { #if IMP_DEBUG @@ -198,7 +197,7 @@ AT91C_BASE_PDC_MCI->PDC_RCR = sizeToRead; // Send the Read single block command - if (AT91F_MCI_SendCommand(pMCI_Device, AT91C_READ_SINGLE_BLOCK_CMD, src) != AT91C_CMD_SEND_OK) + if (AT91F_MCI_SendCommand(AT91C_READ_SINGLE_BLOCK_CMD, src) != AT91C_CMD_SEND_OK) return AT91C_READ_ERROR; pMCI_Device->pMCI_DeviceDesc->state = AT91C_MCI_RX_SINGLE_BLOCK; @@ -227,7 +226,7 @@ if( pMCI_Device->pMCI_DeviceDesc->state != AT91C_MCI_IDLE) return AT91C_WRITE_ERROR; - if( (AT91F_MCI_GetStatus(pMCI_Device,pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address) & AT91C_SR_READY_FOR_DATA) != AT91C_SR_READY_FOR_DATA) + if( (AT91F_MCI_GetStatus(pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address) & AT91C_SR_READY_FOR_DATA) != AT91C_SR_READY_FOR_DATA) return AT91C_WRITE_ERROR; if ((dest + sizeToWrite) > pMCI_Device->pMCI_DeviceFeatures->Memory_Capacity) @@ -260,7 +259,7 @@ AT91C_BASE_PDC_MCI->PDC_TCR = sizeToWrite; // Send the write single block command - if ( AT91F_MCI_SendCommand(pMCI_Device, AT91C_WRITE_BLOCK_CMD, dest) != AT91C_CMD_SEND_OK) + if ( AT91F_MCI_SendCommand(AT91C_WRITE_BLOCK_CMD, dest) != AT91C_CMD_SEND_OK) return AT91C_WRITE_ERROR; pMCI_Device->pMCI_DeviceDesc->state = AT91C_MCI_TX_SINGLE_BLOCK; @@ -285,7 +284,7 @@ int status; //* Check if the MMC card chosen is already the selected one - status = AT91F_MCI_GetStatus(pMCI_Device,relative_card_address); + status = AT91F_MCI_GetStatus(relative_card_address); if (status < 0) return AT91C_CARD_SELECTED_ERROR; @@ -302,9 +301,8 @@ if (status > AT91C_MAX_MCI_CARDS) return AT91C_CARD_SELECTED_ERROR; - if (AT91F_MCI_SendCommand( pMCI_Device, - AT91C_SEL_DESEL_CARD_CMD, - pMCI_Device->pMCI_DeviceFeatures[status].Relative_Card_Address << 16) == AT91C_CMD_SEND_OK) + if (AT91F_MCI_SendCommand(AT91C_SEL_DESEL_CARD_CMD, + pMCI_Device->pMCI_DeviceFeatures[status].Relative_Card_Address << 16) == AT91C_CMD_SEND_OK) return AT91C_CARD_SELECTED_OK; return AT91C_CARD_SELECTED_ERROR; } @@ -314,11 +312,10 @@ //* \brief Asks to the specified card to send its CSD //*---------------------------------------------------------------------------- static AT91S_MCIDeviceStatus -AT91F_MCI_GetCSD(AT91PS_MciDevice pMCI_Device, unsigned int relative_card_address , unsigned int * response) +AT91F_MCI_GetCSD(unsigned int relative_card_address , unsigned int * response) { - if(AT91F_MCI_SendCommand(pMCI_Device, - AT91C_SEND_CSD_CMD, + if(AT91F_MCI_SendCommand(AT91C_SEND_CSD_CMD, (relative_card_address << 16)) != AT91C_CMD_SEND_OK) return AT91C_CMD_SEND_ERROR; @@ -335,9 +332,9 @@ //* \brief Select a block length for all following block commands (R/W) //*---------------------------------------------------------------------------- AT91S_MCIDeviceStatus -AT91F_MCI_SetBlocklength(AT91PS_MciDevice pMCI_Device,unsigned int length) +AT91F_MCI_SetBlocklength(unsigned int length) { - return( AT91F_MCI_SendCommand(pMCI_Device, AT91C_SET_BLOCKLEN_CMD, length) ); + return( AT91F_MCI_SendCommand(AT91C_SET_BLOCKLEN_CMD, length) ); } //*---------------------------------------------------------------------------- @@ -345,13 +342,12 @@ //* \brief Asks to all cards to send their operations conditions //*---------------------------------------------------------------------------- static AT91S_MCIDeviceStatus -AT91F_MCI_MMC_GetAllOCR (AT91PS_MciDevice pMCI_Device) +AT91F_MCI_MMC_GetAllOCR() { unsigned int response =0x0; while(1) { - response = AT91F_MCI_SendCommand(pMCI_Device, - AT91C_MMC_SEND_OP_COND_CMD, + response = AT91F_MCI_SendCommand(AT91C_MMC_SEND_OP_COND_CMD, AT91C_MMC_HOST_VOLTAGE_RANGE); if (response != AT91C_CMD_SEND_OK) return AT91C_INIT_ERROR; @@ -371,8 +367,7 @@ int Nb_Cards_Found=-1; while (1) { - if(AT91F_MCI_SendCommand(pMCI_Device, - AT91C_MMC_ALL_SEND_CID_CMD, + if(AT91F_MCI_SendCommand(AT91C_MMC_ALL_SEND_CID_CMD, AT91C_NO_ARGUMENT) != AT91C_CMD_SEND_OK) return Nb_Cards_Found; else { @@ -382,7 +377,7 @@ //* Set the insert flag pMCI_Device->pMCI_DeviceFeatures[Nb_Cards_Found].Card_Inserted = AT91C_MMC_CARD_INSERTED; - if (AT91F_MCI_SendCommand(pMCI_Device, + if (AT91F_MCI_SendCommand( AT91C_MMC_SET_RELATIVE_ADDR_CMD, (Nb_Cards_Found + AT91C_FIRST_RCA) << 16) != AT91C_CMD_SEND_OK) return AT91C_CMD_SEND_ERROR; @@ -406,7 +401,7 @@ AT91PS_MciDeviceFeatures f; //* Resets all MMC Cards in Idle state - AT91F_MCI_SendCommand(pMCI_Device, AT91C_MMC_GO_IDLE_STATE_CMD, AT91C_NO_ARGUMENT); + AT91F_MCI_SendCommand(AT91C_MMC_GO_IDLE_STATE_CMD, AT91C_NO_ARGUMENT); if (AT91F_MCI_MMC_GetAllOCR(pMCI_Device) == AT91C_INIT_ERROR) return AT91C_INIT_ERROR; @@ -419,9 +414,8 @@ AT91C_BASE_MCI->MCI_MR = AT91C_MCI_MR_PDCMODE; for(i = 0; i < Nb_Cards_Found; i++) { f = pMCI_Device->pMCI_DeviceFeatures + i; - if (AT91F_MCI_GetCSD(pMCI_Device, - f->Relative_Card_Address, - tab_response) != AT91C_CMD_SEND_OK) { + if (AT91F_MCI_GetCSD(f->Relative_Card_Address, tab_response) != + AT91C_CMD_SEND_OK) { f->Relative_Card_Address = 0; continue; } @@ -481,10 +475,9 @@ //* \brief Asks to the SDCard on the chosen slot to send its CID //*---------------------------------------------------------------------------- static AT91S_MCIDeviceStatus -AT91F_MCI_SDCard_GetCID(AT91PS_MciDevice pMCI_Device, unsigned int *response) +AT91F_MCI_SDCard_GetCID(unsigned int *response) { - if (AT91F_MCI_SendCommand(pMCI_Device, - AT91C_ALL_SEND_CID_CMD, + if (AT91F_MCI_SendCommand(AT91C_ALL_SEND_CID_CMD, AT91C_NO_ARGUMENT) != AT91C_CMD_SEND_OK) return AT91C_CMD_SEND_ERROR; @@ -507,13 +500,12 @@ char bus_width; do { - ret_value =AT91F_MCI_GetStatus(pMCI_Device,pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address); + ret_value =AT91F_MCI_GetStatus(pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address); } while((ret_value > 0) && ((ret_value & AT91C_SR_READY_FOR_DATA) == 0)); // Select Card - AT91F_MCI_SendCommand(pMCI_Device, - AT91C_SEL_DESEL_CARD_CMD, + AT91F_MCI_SendCommand(AT91C_SEL_DESEL_CARD_CMD, (pMCI_Device->pMCI_DeviceFeatures->Relative_Card_Address)<<16); // Set bus width for Sdcard @@ -538,21 +530,20 @@ unsigned int mult,blocknr; AT91PS_MciDeviceFeatures f; - AT91F_MCI_SendCommand(pMCI_Device, AT91C_GO_IDLE_STATE_CMD, AT91C_NO_ARGUMENT); + AT91F_MCI_SendCommand(AT91C_GO_IDLE_STATE_CMD, AT91C_NO_ARGUMENT); if (AT91F_MCI_SDCard_GetOCR(pMCI_Device) == AT91C_INIT_ERROR) return AT91C_INIT_ERROR; f = pMCI_Device->pMCI_DeviceFeatures; - if (AT91F_MCI_SDCard_GetCID(pMCI_Device,tab_response) != - AT91C_CMD_SEND_OK) + if (AT91F_MCI_SDCard_GetCID(tab_response) != AT91C_CMD_SEND_OK) return AT91C_INIT_ERROR; f->Card_Inserted = AT91C_SD_CARD_INSERTED; - if (AT91F_MCI_SendCommand(pMCI_Device, AT91C_SET_RELATIVE_ADDR_CMD, 0) - != AT91C_CMD_SEND_OK) + if (AT91F_MCI_SendCommand(AT91C_SET_RELATIVE_ADDR_CMD, 0) != + AT91C_CMD_SEND_OK) return AT91C_INIT_ERROR; f->Relative_Card_Address = (AT91C_BASE_MCI->MCI_RSPR[0] >> 16); - if (AT91F_MCI_GetCSD(pMCI_Device,f->Relative_Card_Address,tab_response) + if (AT91F_MCI_GetCSD(f->Relative_Card_Address,tab_response) != AT91C_CMD_SEND_OK) return AT91C_INIT_ERROR; f->READ_BL_LEN = 1 << ((tab_response[1] >> AT91C_CSD_RD_B_LEN_S) & @@ -587,8 +578,8 @@ //// End of Compute Memory Capacity if (AT91F_MCI_SDCard_SetBusWidth(pMCI_Device) != AT91C_CMD_SEND_OK) return AT91C_INIT_ERROR; - if (AT91F_MCI_SetBlocklength(pMCI_Device,f->Max_Read_DataBlock_Length) - != AT91C_CMD_SEND_OK) + if (AT91F_MCI_SetBlocklength(f->Max_Read_DataBlock_Length) != + AT91C_CMD_SEND_OK) return AT91C_INIT_ERROR; return AT91C_INIT_OK; } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.h#2 (text+ko) ==== @@ -377,7 +377,7 @@ void AT91F_MCI_Device_Handler(AT91PS_MciDevice,unsigned int); AT91S_MCIDeviceStatus AT91F_MCI_SDCard_Init (AT91PS_MciDevice); -AT91S_MCIDeviceStatus AT91F_MCI_SetBlocklength(AT91PS_MciDevice,unsigned int); +AT91S_MCIDeviceStatus AT91F_MCI_SetBlocklength(unsigned int); AT91S_MCIDeviceStatus AT91F_MCI_ReadBlock(AT91PS_MciDevice,int,unsigned int *,int); AT91S_MCIDeviceStatus AT91F_MCI_WriteBlock(AT91PS_MciDevice,int,unsigned int *,int); AT91S_MCIDeviceStatus AT91F_MCI_MMC_Init (AT91PS_MciDevice pMCI_Device); From owner-p4-projects@FreeBSD.ORG Fri Aug 11 00:37:30 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 AA00816A4EA; Fri, 11 Aug 2006 00:37:30 +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 8402C16A4DA for ; Fri, 11 Aug 2006 00:37:30 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16E1643D69 for ; Fri, 11 Aug 2006 00:37:30 +0000 (GMT) (envelope-from imp@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 k7B0bUXO085415 for ; Fri, 11 Aug 2006 00:37:30 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7B0bThK085412 for perforce@freebsd.org; Fri, 11 Aug 2006 00:37:29 GMT (envelope-from imp@freebsd.org) Date: Fri, 11 Aug 2006 00:37:29 GMT Message-Id: <200608110037.k7B0bThK085412@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103624 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, 11 Aug 2006 00:37:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=103624 Change 103624 by imp@imp_lighthouse on 2006/08/11 00:36:47 We don't need to support MMC card booting, so eliminate that from the code (ifdef'd) Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.h#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.c#5 (text+ko) ==== @@ -272,7 +272,6 @@ return AT91C_WRITE_OK; } -#endif //*---------------------------------------------------------------------------- //* \fn AT91F_MCI_MMC_SelectCard @@ -306,6 +305,7 @@ return AT91C_CARD_SELECTED_OK; return AT91C_CARD_SELECTED_ERROR; } +#endif //*---------------------------------------------------------------------------- //* \fn AT91F_MCI_GetCSD @@ -337,6 +337,7 @@ return( AT91F_MCI_SendCommand(AT91C_SET_BLOCKLEN_CMD, length) ); } +#if 0 //*---------------------------------------------------------------------------- //* \fn AT91F_MCI_MMC_GetAllOCR //* \brief Asks to all cards to send their operations conditions @@ -445,6 +446,7 @@ // XXX warner hacked this return AT91C_INIT_OK; } +#endif //*---------------------------------------------------------------------------- //* \fn AT91F_MCI_SDCard_GetOCR ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.h#3 (text+ko) ==== @@ -380,7 +380,9 @@ AT91S_MCIDeviceStatus AT91F_MCI_SetBlocklength(unsigned int); AT91S_MCIDeviceStatus AT91F_MCI_ReadBlock(AT91PS_MciDevice,int,unsigned int *,int); AT91S_MCIDeviceStatus AT91F_MCI_WriteBlock(AT91PS_MciDevice,int,unsigned int *,int); +#if 0 AT91S_MCIDeviceStatus AT91F_MCI_MMC_Init (AT91PS_MciDevice pMCI_Device); AT91S_MCIDeviceStatus AT91F_MCI_MMC_SelectCard(AT91PS_MciDevice pMCI_Device, unsigned int relative_card_address); +#endif #endif From owner-p4-projects@FreeBSD.ORG Fri Aug 11 03:56:40 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 34E7716A4DD; Fri, 11 Aug 2006 03:56:40 +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 0BB3916A4DE for ; Fri, 11 Aug 2006 03:56:40 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD1BB43D4C for ; Fri, 11 Aug 2006 03:56:39 +0000 (GMT) (envelope-from marcel@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 k7B3ud4a006774 for ; Fri, 11 Aug 2006 03:56:39 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7B3udkp006771 for perforce@freebsd.org; Fri, 11 Aug 2006 03:56:39 GMT (envelope-from marcel@freebsd.org) Date: Fri, 11 Aug 2006 03:56:39 GMT Message-Id: <200608110356.k7B3udkp006771@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103625 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, 11 Aug 2006 03:56:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=103625 Change 103625 by marcel@marcel_nfs on 2006/08/11 03:56:05 Provide backward compatible defaults. Affected files ... .. //depot/projects/gdb/sys/fs/procfs/procfs_dbregs.c#5 edit .. //depot/projects/gdb/sys/fs/procfs/procfs_fpregs.c#5 edit .. //depot/projects/gdb/sys/fs/procfs/procfs_regs.c#5 edit Differences ... ==== //depot/projects/gdb/sys/fs/procfs/procfs_dbregs.c#5 (text+ko) ==== @@ -55,6 +55,8 @@ #include #include +#include + #include #include @@ -62,9 +64,16 @@ extern struct sysentvec ia32_freebsd_sysvec; #endif +static struct ptregset default_dbreg = { + .rs_size = sizeof(struct dbreg), + .rs_read = (ptregset_readf)fill_dbregs, + .rs_write = (ptregset_writef)set_dbregs +}; + int procfs_doprocdbregs(PFS_FILL_ARGS) { + struct ptregset *rs; struct sysentvec *sv; struct thread *td2; void *buf; @@ -77,41 +86,35 @@ return (EPERM); } - /* XXXKSE: */ - td2 = FIRST_THREAD_IN_PROC(p); - sv = td2->td_proc->p_sysent; + sv = p->p_sysent; + rs = (sv->sv_dbreg != NULL) ? sv->sv_dbreg : &default_dbreg; + PROC_UNLOCK(p); - if (sv->sv_dbreg == NULL) { - PROC_UNLOCK(p); - return (ENXIO); - } #ifdef COMPAT_IA32 if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - sv != &ia32_freebsd_sysvec) { - PROC_UNLOCK(p); + sv != &ia32_freebsd_sysvec) return (EINVAL); - } #endif - PROC_UNLOCK(p); - buf = malloc(sv->sv_dbreg->rs_size, M_TEMP, M_WAITOK); + buf = malloc(rs->rs_size, M_TEMP, M_WAITOK); if (buf == NULL) return (ENOMEM); PROC_LOCK(p); - error = ptrace_read_regf(td2, buf, sv->sv_dbreg->rs_read); + /* XXXKSE: */ + td2 = FIRST_THREAD_IN_PROC(p); + error = ptrace_read_regf(td2, buf, rs->rs_read); if (error == 0) { PROC_UNLOCK(p); - error = uiomove_frombuf(buf, sv->sv_dbreg->rs_size, uio); + error = uiomove_frombuf(buf, rs->rs_size, uio); PROC_LOCK(p); } if (error == 0 && uio->uio_rw == UIO_WRITE) { - if (!P_SHOULDSTOP(p)) /* XXXKSE should be P_TRACED? */ + if (!P_SHOULDSTOP(p)) error = EBUSY; else /* XXXKSE: */ - error = ptrace_write_regf(td2, buf, - sv->sv_dbreg->rs_write); + error = ptrace_write_regf(td2, buf, rs->rs_write); } PROC_UNLOCK(p); ==== //depot/projects/gdb/sys/fs/procfs/procfs_fpregs.c#5 (text+ko) ==== @@ -49,6 +49,8 @@ #include #include +#include + #include #include @@ -56,9 +58,16 @@ extern struct sysentvec ia32_freebsd_sysvec; #endif +static struct ptregset default_fpreg = { + .rs_size = sizeof(struct fpreg), + .rs_read = (ptregset_readf)fill_fpregs, + .rs_write = (ptregset_writef)set_fpregs +}; + int procfs_doprocfpregs(PFS_FILL_ARGS) { + struct ptregset *rs; struct sysentvec *sv; struct thread *td2; void *buf; @@ -71,33 +80,27 @@ return (EPERM); } - /* XXXKSE: */ - td2 = FIRST_THREAD_IN_PROC(p); - sv = td2->td_proc->p_sysent; - - if (sv->sv_fpreg == NULL) { - PROC_UNLOCK(p); - return (ENXIO); - } + sv = p->p_sysent; + rs = (sv->sv_fpreg != NULL) ? sv->sv_fpreg : &default_fpreg; + PROC_UNLOCK(p); #ifdef COMPAT_IA32 if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - sv != &ia32_freebsd_sysvec) { - PROC_UNLOCK(p); + sv != &ia32_freebsd_sysvec) return (EINVAL); - } #endif - PROC_UNLOCK(p); - buf = malloc(sv->sv_fpreg->rs_size, M_TEMP, M_WAITOK); + buf = malloc(rs->rs_size, M_TEMP, M_WAITOK); if (buf == NULL) return (ENOMEM); PROC_LOCK(p); - error = ptrace_read_regf(td2, buf, sv->sv_fpreg->rs_read); + /* XXXKSE: */ + td2 = FIRST_THREAD_IN_PROC(p); + error = ptrace_read_regf(td2, buf, rs->rs_read); if (error == 0) { PROC_UNLOCK(p); - error = uiomove_frombuf(buf, sv->sv_fpreg->rs_size, uio); + error = uiomove_frombuf(buf, rs->rs_size, uio); PROC_LOCK(p); } if (error == 0 && uio->uio_rw == UIO_WRITE) { @@ -105,8 +108,7 @@ error = EBUSY; else /* XXXKSE: */ - error = ptrace_write_regf(td2, buf, - sv->sv_fpreg->rs_write); + error = ptrace_write_regf(td2, buf, rs->rs_write); } PROC_UNLOCK(p); ==== //depot/projects/gdb/sys/fs/procfs/procfs_regs.c#5 (text+ko) ==== @@ -49,6 +49,8 @@ #include #include +#include + #include #include @@ -56,9 +58,16 @@ extern struct sysentvec ia32_freebsd_sysvec; #endif +static struct ptregset default_reg = { + .rs_size = sizeof(struct reg), + .rs_read = (ptregset_readf)fill_regs, + .rs_write = (ptregset_writef)set_regs +}; + int procfs_doprocregs(PFS_FILL_ARGS) { + struct ptregset *rs; struct sysentvec *sv; struct thread *td2; void *buf; @@ -71,33 +80,27 @@ return (EPERM); } - /* XXXKSE: */ - td2 = FIRST_THREAD_IN_PROC(p); - sv = td2->td_proc->p_sysent; - - if (sv->sv_reg == NULL) { - PROC_UNLOCK(p); - return (ENXIO); - } + sv = p->p_sysent; + rs = (sv->sv_reg != NULL) ? sv->sv_reg : &default_reg; + PROC_UNLOCK(p); #ifdef COMPAT_IA32 if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - sv != &ia32_freebsd_sysvec) { - PROC_UNLOCK(p); + sv != &ia32_freebsd_sysvec) return (EINVAL); - } #endif - PROC_UNLOCK(p); - buf = malloc(sv->sv_reg->rs_size, M_TEMP, M_WAITOK); + buf = malloc(rs->rs_size, M_TEMP, M_WAITOK); if (buf == NULL) return (ENOMEM); PROC_LOCK(p); - error = ptrace_read_regf(td2, buf, sv->sv_reg->rs_read); + /* XXXKSE: */ + td2 = FIRST_THREAD_IN_PROC(p); + error = ptrace_read_regf(td2, buf, rs->rs_read); if (error == 0) { PROC_UNLOCK(p); - error = uiomove_frombuf(buf, sv->sv_reg->rs_size, uio); + error = uiomove_frombuf(buf, rs->rs_size, uio); PROC_LOCK(p); } if (error == 0 && uio->uio_rw == UIO_WRITE) { @@ -105,8 +108,7 @@ error = EBUSY; else /* XXXKSE: */ - error = ptrace_write_regf(td2, buf, - sv->sv_reg->rs_write); + error = ptrace_write_regf(td2, buf, rs->rs_write); } PROC_UNLOCK(p); From owner-p4-projects@FreeBSD.ORG Fri Aug 11 10:33:13 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 01FF416A4DF; Fri, 11 Aug 2006 10:33:13 +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 B70BC16A4E1 for ; Fri, 11 Aug 2006 10:33:12 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E7A843D55 for ; Fri, 11 Aug 2006 10:33:12 +0000 (GMT) (envelope-from rdivacky@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 k7BAXCEE055975 for ; Fri, 11 Aug 2006 10:33:12 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BAXBDf055963 for perforce@freebsd.org; Fri, 11 Aug 2006 10:33:11 GMT (envelope-from rdivacky@FreeBSD.org) Date: Fri, 11 Aug 2006 10:33:11 GMT Message-Id: <200608111033.k7BAXBDf055963@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103631 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, 11 Aug 2006 10:33:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=103631 Change 103631 by rdivacky@rdivacky_witten on 2006/08/11 10:33:01 A bunch of bugs fixed from run with INVARIANTS/WITNESS o in linux_proc_init shuffle the code to never malloc with locks held o in linux_proc_exit unlock before doing futex stuff o in linux_proc_exit move free-ing of shared after removing thread from list there o the same in linux_proc_exec + addition of thread removal from list o in linux_schedtail unlock before copyout o in linux_set_tid_address change the exit_group -> set_tid_address in debug o in linux_exit_group remove the debuging code whicih let only 10 threads to be killed also change that to use psignal() instead of kill() Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#38 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#38 (text+ko) ==== @@ -1167,6 +1167,18 @@ /* non-exec call */ MALLOC(em, struct linux_emuldata *, sizeof *em, M_LINUX, M_WAITOK | M_ZERO); em->pid = child; + if (flags & CLONE_VM) { + /* handled later */ + } else { + struct linux_emuldata_shared *s; + + MALLOC(s, struct linux_emuldata_shared *, sizeof *s, M_LINUX, M_WAITOK | M_ZERO); + em->shared = s; + s->refs = 1; + s->group_pid = child; + + LIST_INIT(&s->threads); + } EMUL_WLOCK(&emul_lock); SLIST_INSERT_HEAD(&emuldata_head, em, emuldatas); } else { @@ -1190,7 +1202,6 @@ * the newly created proc */ if (child != 0) { - em->shared = NULL; if (flags & CLONE_VM) { /* lookup the parent */ p_em = em_find(td->td_proc->p_pid, EMUL_LOCKED); @@ -1204,14 +1215,7 @@ em->shared->refs++; } } else { - struct linux_emuldata_shared *s; - - MALLOC(s, struct linux_emuldata_shared *, sizeof *s, M_LINUX, M_WAITOK | M_ZERO); - em->shared = s; - s->refs = 1; - s->group_pid = child; - - LIST_INIT(&s->threads); + /* handled earlier to avoid malloc(M_WAITOK) with rwlock held */ } } @@ -1236,6 +1240,7 @@ struct linux_emuldata *em; int error; struct thread *td = FIRST_THREAD_IN_PROC(p); + int *child_clear_tid; if (p->p_sysent != &elf_linux_sysvec) return; @@ -1249,18 +1254,36 @@ #endif return; } - if (em->child_clear_tid != NULL) { + + child_clear_tid = em->child_clear_tid; + + EMUL_RUNLOCK(&emul_lock); + /* XXX: there is a race but I think we can ommit that + * because its not very possible that the same process + * will exit on different cpus etc. + */ + EMUL_WLOCK(&emul_lock); + LIST_REMOVE(em, threads); + SLIST_REMOVE(&emuldata_head, em, linux_emuldata, emuldatas); + + em->shared->refs--; + if (em->shared->refs == 0) + FREE(em->shared, M_LINUX); + EMUL_WUNLOCK(&emul_lock); + + if (child_clear_tid != NULL) { struct linux_sys_futex_args cup; int null = 0; - error = copyout(&null, em->child_clear_tid, sizeof(null)); + /* XXX: doesnt futex use the addr? */ + error = copyout(&null, child_clear_tid, sizeof(null)); if (error) { EMUL_RUNLOCK(&emul_lock); return; } /* futexes stuff */ - cup.uaddr = em->child_clear_tid; + cup.uaddr = child_clear_tid; cup.op = LINUX_FUTEX_WAKE; cup.val = 0x7fffffff; /* Awake everyone */ cup.timeout = NULL; @@ -1271,20 +1294,6 @@ printf(LMSG("futex stuff in proc_exit failed.\n")); } - em->shared->refs--; - if (em->shared->refs == 0) - FREE(em->shared, M_LINUX); - - EMUL_RUNLOCK(&emul_lock); - /* XXX: there is a race but I think we can ommit that - * because its not very possible that the same process - * will exit on different cpus etc. - */ - EMUL_WLOCK(&emul_lock); - LIST_REMOVE(em, threads); - SLIST_REMOVE(&emuldata_head, em, linux_emuldata, emuldatas); - EMUL_WUNLOCK(&emul_lock); - /* clean the stuff up */ FREE(em, M_LINUX); } @@ -1311,10 +1320,6 @@ #endif return; } - - em->shared->refs--; - if (em->shared->refs == 0) - FREE(em->shared, M_LINUX); EMUL_RUNLOCK(&emul_lock); /* XXX: there is a race but I think we can ommit that @@ -1322,7 +1327,12 @@ * will exit on different cpus etc. */ EMUL_WLOCK(&emul_lock); + LIST_REMOVE(em, threads); SLIST_REMOVE(&emuldata_head, em, linux_emuldata, emuldatas); + + em->shared->refs--; + if (em->shared->refs == 0) + FREE(em->shared, M_LINUX); EMUL_WUNLOCK(&emul_lock); FREE(em, M_LINUX); @@ -1339,6 +1349,7 @@ #ifdef DEBUG struct thread *td = FIRST_THREAD_IN_PROC(p); #endif + int *child_set_tid; if (p->p_sysent != &elf_linux_sysvec) return; @@ -1360,11 +1371,12 @@ #endif return; } + child_set_tid = em->child_set_tid; + EMUL_RUNLOCK(&emul_lock); - if (em->child_set_tid != NULL) - error = copyout(&p->p_pid, em->child_set_tid, sizeof(p->p_pid)); + if (child_set_tid != NULL) + error = copyout(&p->p_pid, (int *) child_set_tid, sizeof(p->p_pid)); - EMUL_RUNLOCK(&emul_lock); return; } @@ -1374,7 +1386,7 @@ struct linux_emuldata *em; #ifdef DEBUG - if (ldebug(exit_group)) + if (ldebug(set_tid_address)) printf(ARGS(set_tid_address, "%p"), args->tidptr); #endif @@ -1398,10 +1410,8 @@ int linux_exit_group(struct thread *td, struct linux_exit_group_args *args) { - struct linux_emuldata *em, *td_em; + struct linux_emuldata *em, *td_em, *tmp_em; struct proc *sp; - struct kill_args ka; - int i = 0; #ifdef DEBUG if (ldebug(exit_group)) @@ -1417,23 +1427,16 @@ return (0); } - LIST_FOREACH(em, &td_em->shared->threads, threads) { - if (i++ > 10) - break; - + LIST_FOREACH_SAFE(em, &td_em->shared->threads, threads, tmp_em) { if (em->pid == td_em->pid) continue; sp = pfind(em->pid); + psignal(sp, SIGKILL); PROC_UNLOCK(sp); #ifdef DEBUG printf(LMSG("linux_sys_exit_group: kill PID %d\n"), em->pid); #endif - ka.pid = em->pid; - ka.signum = SIGKILL; - /* XXX: ehm? */ - kill(FIRST_THREAD_IN_PROC(sp), &ka); - } EMUL_RUNLOCK(&emul_lock); From owner-p4-projects@FreeBSD.ORG Fri Aug 11 11:11:01 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 E3F5116A4E5; Fri, 11 Aug 2006 11:11:00 +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 A310816A4E1 for ; Fri, 11 Aug 2006 11:11:00 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AE2343D58 for ; Fri, 11 Aug 2006 11:11:00 +0000 (GMT) (envelope-from rdivacky@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 k7BBB08m059343 for ; Fri, 11 Aug 2006 11:11:00 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BBAxIO059339 for perforce@freebsd.org; Fri, 11 Aug 2006 11:10:59 GMT (envelope-from rdivacky@FreeBSD.org) Date: Fri, 11 Aug 2006 11:10:59 GMT Message-Id: <200608111110.k7BBAxIO059339@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103633 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, 11 Aug 2006 11:11:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=103633 Change 103633 by rdivacky@rdivacky_witten on 2006/08/11 11:10:09 Giantify futex code - this is necessary because the futex code is expected to be atomic. I need to assure the atomicity. I am using Giant because its sleepable mutex. I hope someone will point me to some other better solution. This helps my pthread testing program reliably with with upto 37 threads (later it coredumps but I think this is userspace issue - its running out of memory for threads and starts doing wild things). Also - update comment in linux_machdep to satisfy netchild. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.c#19 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#39 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.c#19 (text+ko) ==== @@ -68,7 +68,7 @@ }; LIST_HEAD(futex_list, futex) futex_list; -struct mtx futex_mtx; +struct mtx futex_mtx; /* this protects the LIST of futexes */ #define FUTEX_LOCK mtx_lock(&futex_mtx) #define FUTEX_UNLOCK mtx_unlock(&futex_mtx) @@ -76,6 +76,9 @@ #define FUTEX_LOCKED 1 #define FUTEX_UNLOCKED 0 +#define FUTEX_SYSTEM_LOCK mtx_lock(&Giant) +#define FUTEX_SYSTEM_UNLOCK mtx_unlock(&Giant) + static struct futex *futex_get(void *, int); static void futex_put(struct futex *); static int futex_sleep(struct futex *, struct thread *, unsigned long); @@ -109,17 +112,25 @@ switch (args->op) { case LINUX_FUTEX_WAIT: + FUTEX_SYSTEM_LOCK; + if ((error = copyin(args->uaddr, - &val, sizeof(val))) != 0) + &val, sizeof(val))) != 0) { + FUTEX_SYSTEM_UNLOCK; return error; + } - if (val != args->val) + if (val != args->val) { + FUTEX_SYSTEM_UNLOCK; return EWOULDBLOCK; + } if (args->timeout != NULL) { if ((error = copyin(args->timeout, - &timeout, sizeof(timeout))) != 0) + &timeout, sizeof(timeout))) != 0) { + FUTEX_SYSTEM_UNLOCK; return error; + } } #ifdef DEBUG @@ -157,6 +168,7 @@ "ret = %d\n", td->td_proc->p_pid, args->uaddr, ret); #endif + FUTEX_SYSTEM_UNLOCK; switch (ret) { case EWOULDBLOCK: /* timeout */ return ETIMEDOUT; @@ -184,6 +196,8 @@ break; case LINUX_FUTEX_WAKE: + FUTEX_SYSTEM_LOCK; + /* * XXX: Linux is able cope with different addresses * corresponding to the same mapped memory in the sleeping @@ -197,24 +211,43 @@ f = futex_get(args->uaddr, FUTEX_UNLOCKED); td->td_retval[0] = futex_wake(f, args->val, NULL); futex_put(f); + + FUTEX_SYSTEM_UNLOCK; break; case LINUX_FUTEX_CMP_REQUEUE: + FUTEX_SYSTEM_LOCK; + if ((error = copyin(args->uaddr, - &val, sizeof(val))) != 0) + &val, sizeof(val))) != 0) { + FUTEX_SYSTEM_UNLOCK; return error; + } - if (val != args->val3) + if (val != args->val3) { + FUTEX_SYSTEM_UNLOCK; return EAGAIN; - /* FALLTHROUGH */ + } + + f = futex_get(args->uaddr, FUTEX_UNLOCKED); + newf = futex_get(args->uaddr2, FUTEX_UNLOCKED); + td->td_retval[0] = futex_wake(f, args->val, newf); + futex_put(f); + futex_put(newf); + + FUTEX_SYSTEM_UNLOCK; + break; case LINUX_FUTEX_REQUEUE: + FUTEX_SYSTEM_LOCK; + f = futex_get(args->uaddr, FUTEX_UNLOCKED); newf = futex_get(args->uaddr2, FUTEX_UNLOCKED); td->td_retval[0] = futex_wake(f, args->val, newf); futex_put(f); futex_put(newf); + FUTEX_SYSTEM_UNLOCK; break; case LINUX_FUTEX_FD: @@ -223,6 +256,7 @@ break; case LINUX_FUTEX_WAKE_OP: + FUTEX_SYSTEM_LOCK; #ifdef DEBUG if (ldebug(sys_futex)) printf("FUTEX_WAKE_OP: %d: uaddr = %p, op = %d, val = %d, uaddr2 = %p, val3 = %d\n", @@ -238,12 +272,14 @@ if (op_ret != -EFAULT) { futex_put(f); futex_put(f2); + FUTEX_SYSTEM_UNLOCK; return (-op_ret); } futex_put(f); futex_put(f2); + FUTEX_SYSTEM_UNLOCK; return (EFAULT); } @@ -259,6 +295,8 @@ } futex_put(f2); td->td_retval[0] = ret; + + FUTEX_SYSTEM_UNLOCK; break; default: ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#39 (text+ko) ==== @@ -1168,7 +1168,7 @@ MALLOC(em, struct linux_emuldata *, sizeof *em, M_LINUX, M_WAITOK | M_ZERO); em->pid = child; if (flags & CLONE_VM) { - /* handled later */ + /* handled later in the code */ } else { struct linux_emuldata_shared *s; From owner-p4-projects@FreeBSD.ORG Fri Aug 11 11:28:25 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 1D18C16A504; Fri, 11 Aug 2006 11:28:25 +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 D1D1B16A501 for ; Fri, 11 Aug 2006 11:28:24 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BB8443D55 for ; Fri, 11 Aug 2006 11:28:24 +0000 (GMT) (envelope-from rdivacky@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 k7BBSOK1060234 for ; Fri, 11 Aug 2006 11:28:24 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BBSM1r060231 for perforce@freebsd.org; Fri, 11 Aug 2006 11:28:22 GMT (envelope-from rdivacky@FreeBSD.org) Date: Fri, 11 Aug 2006 11:28:22 GMT Message-Id: <200608111128.k7BBSM1r060231@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103634 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, 11 Aug 2006 11:28:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=103634 Change 103634 by rdivacky@rdivacky_witten on 2006/08/11 11:27:21 IFC Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/Makefile#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/trap.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/amd64/linux32/linux32_sysvec.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/arm/mem.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/arm/pmap.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/arm/vm_machdep.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/at91/at91_st.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/at91/kb920x_machdep.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/include/pmap.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/include/sf_buf.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/include/vmparam.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/sa11x0/assabet_machdep.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/arm/xscale/i80321/iq31244_machdep.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/Makefile#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/Makefile#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/Makefile.inc#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/bootiic/Makefile#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/bootiic/arm_init.S#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/bootiic/env_vars.c#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/bootiic/env_vars.h#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/bootiic/loader_prompt.c#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/bootiic/loader_prompt.h#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/bootiic/main.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/Makefile#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/at91rm9200.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/at91rm9200_lowlevel.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/eeprom.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/eeprom.h#2 delete .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/emac.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/emac.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/env_vars.c#2 delete .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/env_vars.h#2 delete .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/lib.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/loader_prompt.c#2 delete .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/loader_prompt.h#2 delete .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/p_string.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/p_string.h#2 delete .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/spi_flash.c#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/spi_flash.h#1 branch .. //depot/projects/soc2006/rdivacky_linuxolator/boot/arm/at91/libat91/xmodem.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linprocfs/linprocfs.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/conf/files#7 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/conf/options.arm#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/acpica/acpi_dock.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/acpica/acpi_pci_link.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/acpica/acpi_video.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ata/ata-disk.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ath/if_ath.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/ath/if_athioctl.h#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/bge/if_bge.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/bge/if_bgereg.h#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em_hw.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em_hw.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/pccard/pccard_cis.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/sound/pci/emu10k1.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/sound/pci/emu10kx-pcm.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/sound/pci/emu10kx.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/sound/pci/emu10kx.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/usb/usbdevs#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/dev/usb/uscanner.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/fs/nwfs/nwfs_io.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/fs/smbfs/smbfs_io.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/geom/eli/g_eli.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/geom/eli/g_eli.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/geom/eli/g_eli_ctl.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/geom/geom_gpt.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/geom/mirror/g_mirror.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/geom/raid3/g_raid3.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/i386/acpica/acpi_wakeup.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/i386/conf/XBOX#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/i386/i386/machdep.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/i386/isa/clock.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_sysvec.c#13 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_proto.c#2 delete .. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_syscalls.c#7 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_usrreq.c#7 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/vfs_bio.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/kern/vfs_subr.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/bpf.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net/if_tun.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net80211/ieee80211_input.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net80211/ieee80211_ioctl.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net80211/ieee80211_ioctl.h#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/net80211/ieee80211_output.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netgraph/ng_pppoe.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/netgraph/ng_pppoe.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/nfsclient/nfs_bio.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/nfsclient/nfs_vfsops.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/pc98/include/md_var.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/pc98/pc98/pc98_machdep.c#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/security/mac_biba/mac_biba.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sparc64/sparc64/pmap.c#4 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/domain.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/mac_policy.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/sys/param.h#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/swap_pager.c#3 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/vm_object.c#5 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/vm_page.c#6 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/vm_page.h#2 integrate .. //depot/projects/soc2006/rdivacky_linuxolator/vm/vnode_pager.c#2 integrate Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/Makefile#4 (text+ko) ==== @@ -1,13 +1,11 @@ -# $FreeBSD: src/sys/Makefile,v 1.37 2006/07/04 14:14:16 maxim Exp $ +# $FreeBSD: src/sys/Makefile,v 1.38 2006/08/10 06:29:43 imp Exp $ .include # The boot loader .if ${MK_BOOT} != "no" -.if ${MACHINE_ARCH} != "arm" SUBDIR= boot .endif -.endif # Directories to include in cscope name file and TAGS. CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \ ==== //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/trap.c#4 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.307 2006/07/28 20:22:57 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.308 2006/08/08 04:01:29 alc Exp $"); /* * AMD64 Trap and System call handling @@ -566,8 +566,14 @@ map = &vm->vm_map; } + /* + * PGEX_I is defined only if the execute disable bit capability is + * supported and enabled; otherwise, that bit is reserved, i.e., zero. + */ if (frame->tf_err & PGEX_W) ftype = VM_PROT_WRITE; + else if (frame->tf_err & PGEX_I) + ftype = VM_PROT_EXECUTE; else ftype = VM_PROT_READ; ==== //depot/projects/soc2006/rdivacky_linuxolator/amd64/linux32/linux32_sysvec.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.18 2006/05/06 17:26:45 ambrisko Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.19 2006/08/10 22:05:25 netchild Exp $"); #include "opt_compat.h" #ifndef COMPAT_IA32 @@ -123,6 +123,10 @@ /* * Linux syscalls return negative errno's, we do positive and map them + * Reference: + * FreeBSD: src/sys/sys/errno.h + * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h + * linux-2.6.17.8/include/asm-generic/errno.h */ static int bsd_to_linux_errno[ELAST + 1] = { -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, @@ -133,7 +137,8 @@ -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75, -6, -84 + -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, + -72, -67, -71 }; int bsd_to_linux_signal[LINUX_SIGTBLSZ] = { ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/arm/mem.c#2 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.2 2005/10/03 14:18:21 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.3 2006/08/08 20:59:38 cognet Exp $"); /* * Memory special file @@ -66,11 +66,6 @@ #include "opt_global.h" -#ifdef ARM_USE_SMALL_ALLOC -extern vm_offset_t alloc_curaddr; -extern vm_offset_t alloc_firstaddr; -#endif - /* * Used in /dev/mem drivers and elsewhere */ @@ -127,8 +122,8 @@ uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE)) #ifdef ARM_USE_SMALL_ALLOC - if (addr < alloc_firstaddr || addr > - alloc_curaddr) + if (addr <= VM_MAXUSER_ADDRESS || + addr >= KERNBASE) #endif return (EFAULT); error = uiomove((caddr_t)(int)uio->uio_offset, (int)c, uio); ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/arm/pmap.c#6 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.67 2006/08/01 19:06:04 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.68 2006/08/08 20:59:38 cognet Exp $"); #include #include #include @@ -1129,7 +1129,7 @@ l2b = pmap_get_l2_bucket(pmap_kernel(), va); ptep = &l2b->l2b_kva[l2pte_index(va)]; pte = *ptep; - + if ((pte & L2_S_CACHE_MASK) != pte_l2_s_cache_mode_pt) { /* * Page tables must have the cache-mode set to @@ -1140,7 +1140,6 @@ cpu_tlb_flushD_SE(va); cpu_cpwait(); } - #ifdef ARM_USE_SMALL_ALLOC } #endif @@ -2384,8 +2383,6 @@ #define PMAP_STATIC_L2_SIZE 16 #ifdef ARM_USE_SMALL_ALLOC extern struct mtx smallalloc_mtx; -extern vm_offset_t alloc_curaddr; -extern vm_offset_t alloc_firstaddr; #endif void @@ -2544,9 +2541,9 @@ #ifdef ARM_USE_SMALL_ALLOC mtx_init(&smallalloc_mtx, "Small alloc page list", NULL, MTX_DEF); - alloc_firstaddr = alloc_curaddr = arm_nocache_startaddr + - ARM_NOCACHE_KVA_SIZE; + arm_init_smallalloc(); #endif + pmap_set_pcb_pagedir(kernel_pmap, thread0.td_pcb); } /*************************************************** @@ -2933,6 +2930,9 @@ vm_offset_t pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) { +#ifdef ARM_USE_SMALL_ALLOC + return (arm_ptovirt(start)); +#else vm_offset_t sva = *virt; vm_offset_t va = sva; @@ -2947,6 +2947,7 @@ } *virt = va; return (sva); +#endif } static void @@ -3488,7 +3489,7 @@ * is current */ PTE_SYNC(ptep); - if (L1_IDX(va) != L1_IDX(vector_page) && + if (L1_IDX(va) != L1_IDX(vector_page) && l2pte_valid(npte)) { /* * This mapping is likely to be accessed as @@ -3999,6 +4000,10 @@ void pmap_zero_page_generic(vm_paddr_t phys, int off, int size) { +#ifdef ARM_USE_SMALL_ALLOC + char *dstpg; +#endif + #ifdef DEBUG struct vm_page *pg = PHYS_TO_VM_PAGE(phys); @@ -4010,6 +4015,16 @@ _arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0) return; +#ifdef ARM_USE_SMALL_ALLOC + dstpg = (char *)arm_ptovirt(phys); + if (off || size != PAGE_SIZE) { + bzero(dstpg + off, size); + cpu_dcache_wbinv_range((vm_offset_t)(dstpg + off), size); + } else { + bzero_page((vm_offset_t)dstpg); + cpu_dcache_wbinv_range((vm_offset_t)dstpg, PAGE_SIZE); + } +#else mtx_lock(&cmtx); /* @@ -4021,12 +4036,15 @@ PTE_SYNC(cdst_pte); cpu_tlb_flushD_SE(cdstp); cpu_cpwait(); - if (off || size != PAGE_SIZE) + if (off || size != PAGE_SIZE) { bzero((void *)(cdstp + off), size); - else + cpu_dcache_wbinv_range(cdstp + off, size); + } else { bzero_page(cdstp); + cpu_dcache_wbinv_range(cdstp, PAGE_SIZE); + } mtx_unlock(&cmtx); - cpu_dcache_wbinv_range(cdstp, PAGE_SIZE); +#endif } #endif /* (ARM_MMU_GENERIC + ARM_MMU_SA1) != 0 */ @@ -4034,7 +4052,6 @@ void pmap_zero_page_xscale(vm_paddr_t phys, int off, int size) { - if (_arm_bzero && _arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0) return; @@ -4344,12 +4361,23 @@ void pmap_copy_page(vm_page_t src, vm_page_t dst) { +#ifdef ARM_USE_SMALL_ALLOC + vm_offset_t srcpg, dstpg; +#endif + cpu_dcache_wbinv_all(); if (_arm_memcpy && _arm_memcpy((void *)VM_PAGE_TO_PHYS(dst), (void *)VM_PAGE_TO_PHYS(src), PAGE_SIZE, IS_PHYSICAL) == 0) return; +#ifdef ARM_USE_SMALL_ALLOC + srcpg = arm_ptovirt(VM_PAGE_TO_PHYS(src)); + dstpg = arm_ptovirt(VM_PAGE_TO_PHYS(dst)); + bcopy_page(srcpg, dstpg); + cpu_dcache_wbinv_range(dstpg, PAGE_SIZE); +#else pmap_copy_page_func(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst)); +#endif } ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/arm/vm_machdep.c#4 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.26 2006/07/15 23:15:31 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.27 2006/08/08 20:59:38 cognet Exp $"); #include #include @@ -66,6 +66,7 @@ #include #include #include +#include #include #include @@ -73,6 +74,7 @@ #define NSFBUFS (512 + maxusers * 16) #endif +#ifndef ARM_USE_SMALL_ALLOC static void sf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL) @@ -94,6 +96,7 @@ * A lock used to synchronize access to the hash table and free list */ static struct mtx sf_buf_lock; +#endif /* * Finish a fork operation, with process p2 nearly set up. @@ -161,6 +164,7 @@ void sf_buf_free(struct sf_buf *sf) { +#ifndef ARM_USE_SMALL_ALLOC mtx_lock(&sf_buf_lock); sf->ref_count--; if (sf->ref_count == 0) { @@ -170,11 +174,13 @@ wakeup_one(&sf_buf_freelist); } mtx_unlock(&sf_buf_lock); +#endif } +#ifndef ARM_USE_SMALL_ALLOC /* - * * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) - * */ + * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) + */ static void sf_buf_init(void *arg) { @@ -197,6 +203,7 @@ sf_buf_alloc_want = 0; mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); } +#endif /* * Get an sf_buf from the freelist. Will block if none are available. @@ -204,6 +211,9 @@ struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags) { +#ifdef ARM_USE_SMALL_ALLOC + return ((struct sf_buf *)m); +#else struct sf_head *hash_list; struct sf_buf *sf; int error; @@ -249,7 +259,7 @@ done: mtx_unlock(&sf_buf_lock); return (sf); - +#endif } /* @@ -446,10 +456,55 @@ MALLOC_DEFINE(M_VMSMALLALLOC, "vm_small_alloc", "VM Small alloc data"); -vm_offset_t alloc_curaddr; -vm_offset_t alloc_firstaddr; +static vm_offset_t alloc_firstaddr; + +vm_offset_t +arm_ptovirt(vm_paddr_t pa) +{ + int i; + vm_offset_t addr = alloc_firstaddr; + + KASSERT(alloc_firstaddr != 0, ("arm_ptovirt called to early ?")); + for (i = 0; dump_avail[i]; i += 2) { + if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) + break; + addr += (dump_avail[i + 1] & L1_S_FRAME) + L1_S_SIZE - + (dump_avail[i] & L1_S_FRAME); + } + KASSERT(dump_avail[i] != 0, ("Trying to access invalid physical address")); + return (addr + (pa - (dump_avail[i] & L1_S_FRAME))); +} -extern int doverbose; +void +arm_init_smallalloc(void) +{ + vm_offset_t to_map = 0, mapaddr; + int i; + + /* + * We need to use dump_avail and not phys_avail, since we want to + * map the whole memory and not just the memory available to the VM + * to be able to do a pa => va association for any address. + */ + + for (i = 0; dump_avail[i]; i+= 2) { + to_map += (dump_avail[i + 1] & L1_S_FRAME) + L1_S_SIZE - + (dump_avail[i] & L1_S_FRAME); + } + alloc_firstaddr = mapaddr = KERNBASE - to_map; + for (i = 0; dump_avail[i]; i+= 2) { + vm_offset_t size = (dump_avail[i + 1] & L1_S_FRAME) + + L1_S_SIZE - (dump_avail[i] & L1_S_FRAME); + vm_offset_t did = 0; + while (size > 0 ) { + pmap_kenter_section(mapaddr, + (dump_avail[i] & L1_S_FRAME) + did, SECTION_CACHE); + mapaddr += L1_S_SIZE; + did += L1_S_SIZE; + size -= L1_S_SIZE; + } + } +} void arm_add_smallalloc_pages(void *list, void *mem, int bytes, int pagetable) @@ -470,52 +525,15 @@ } } -static void * -arm_uma_do_alloc(struct arm_small_page **pglist, int bytes, int pagetable) -{ - void *ret; - vm_page_t page_array = NULL; - - *pglist = (void *)kmem_malloc(kmem_map, (0x100000 / PAGE_SIZE) * - sizeof(struct arm_small_page), M_WAITOK); - if (*pglist && alloc_curaddr < 0xf0000000) {/* XXX */ - mtx_lock(&Giant); - page_array = vm_page_alloc_contig(0x100000 / PAGE_SIZE, - 0, 0xffffffff, 0x100000, 0); - mtx_unlock(&Giant); - } - if (page_array) { - vm_paddr_t pa = VM_PAGE_TO_PHYS(page_array); - mtx_lock(&smallalloc_mtx); - ret = (void*)alloc_curaddr; - alloc_curaddr += 0x100000; - /* XXX: ARM_TP_ADDRESS should probably be move elsewhere. */ - if (alloc_curaddr == ARM_TP_ADDRESS) - alloc_curaddr += 0x100000; - mtx_unlock(&smallalloc_mtx); - pmap_kenter_section((vm_offset_t)ret, pa - , pagetable); - } else { - if (*pglist) - kmem_free(kmem_map, (vm_offset_t)*pglist, - (0x100000 / PAGE_SIZE) * - sizeof(struct arm_small_page)); - *pglist = NULL; - ret = (void *)kmem_malloc(kmem_map, bytes, M_WAITOK); - } - return (ret); -} - void * uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) { void *ret; - struct arm_small_page *sp, *tmp; + struct arm_small_page *sp; TAILQ_HEAD(,arm_small_page) *head; - static struct thread *in_alloc; - static int in_sleep; - int should_wakeup = 0; - + static vm_pindex_t color; + vm_page_t m; + *flags = UMA_SLAB_PRIV; /* * For CPUs where we setup page tables as write back, there's no @@ -527,55 +545,42 @@ head = (void *)&pages_normal; mtx_lock(&smallalloc_mtx); -retry: sp = TAILQ_FIRST(head); if (!sp) { - /* No more free pages, need to alloc more. */ - if (!(wait & M_WAITOK) || - in_alloc == curthread) { - mtx_unlock(&smallalloc_mtx); + int pflags; + + mtx_unlock(&smallalloc_mtx); + if (zone == l2zone && + pte_l1_s_cache_mode != pte_l1_s_cache_mode_pt) { *flags = UMA_SLAB_KMEM; - return ((void *)kmem_malloc(kmem_map, bytes, M_NOWAIT)); + ret = ((void *)kmem_malloc(kmem_map, bytes, M_NOWAIT)); + return (ret); } - if (in_alloc != NULL) { - /* Somebody else is already doing the allocation. */ - in_sleep++; - msleep(&in_alloc, &smallalloc_mtx, PWAIT, - "smallalloc", 0); - in_sleep--; - goto retry; + if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) + pflags = VM_ALLOC_INTERRUPT; + else + pflags = VM_ALLOC_SYSTEM; + if (wait & M_ZERO) + pflags |= VM_ALLOC_ZERO; + for (;;) { + m = vm_page_alloc(NULL, color++, + pflags | VM_ALLOC_NOOBJ); + if (m == NULL) { + if (wait & M_NOWAIT) + return (NULL); + VM_WAIT; + } else + break; } - in_alloc = curthread; - mtx_unlock(&smallalloc_mtx); - /* Try to alloc 1MB of contiguous memory. */ - ret = arm_uma_do_alloc(&sp, bytes, zone == l2zone ? - SECTION_PT : SECTION_CACHE); - mtx_lock(&smallalloc_mtx); - in_alloc = NULL; - if (in_sleep > 0) - should_wakeup = 1; - if (sp) { - for (int i = 0; i < (0x100000 / PAGE_SIZE) - 1; - i++) { - tmp = &sp[i]; - tmp->addr = (char *)ret + i * PAGE_SIZE; - TAILQ_INSERT_HEAD(head, tmp, pg_list); - } - ret = (char *)ret + 0x100000 - PAGE_SIZE; - TAILQ_INSERT_HEAD(&free_pgdesc, &sp[(0x100000 / ( - PAGE_SIZE)) - 1], pg_list); - } else - *flags = UMA_SLAB_KMEM; - - } else { - sp = TAILQ_FIRST(head); - TAILQ_REMOVE(head, sp, pg_list); - TAILQ_INSERT_HEAD(&free_pgdesc, sp, pg_list); - ret = sp->addr; - } - if (should_wakeup) - wakeup(&in_alloc); + ret = (void *)arm_ptovirt(VM_PAGE_TO_PHYS(m)); + if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) + bzero(ret, PAGE_SIZE); + return (ret); + } + TAILQ_REMOVE(head, sp, pg_list); + TAILQ_INSERT_HEAD(&free_pgdesc, sp, pg_list); + ret = sp->addr; mtx_unlock(&smallalloc_mtx); if ((wait & M_ZERO)) bzero(ret, bytes); @@ -593,18 +598,30 @@ else { struct arm_small_page *sp; - mtx_lock(&smallalloc_mtx); - sp = TAILQ_FIRST(&free_pgdesc); - KASSERT(sp != NULL, ("No more free page descriptor ?")); - TAILQ_REMOVE(&free_pgdesc, sp, pg_list); - sp->addr = mem; - pmap_get_pde_pte(kernel_pmap, (vm_offset_t)mem, &pd, &pt); - if ((*pd & pte_l1_s_cache_mask) == pte_l1_s_cache_mode_pt && - pte_l1_s_cache_mode_pt != pte_l1_s_cache_mode) - TAILQ_INSERT_HEAD(&pages_wt, sp, pg_list); - else - TAILQ_INSERT_HEAD(&pages_normal, sp, pg_list); - mtx_unlock(&smallalloc_mtx); + if ((vm_offset_t)mem >= KERNBASE) { + mtx_lock(&smallalloc_mtx); + sp = TAILQ_FIRST(&free_pgdesc); + KASSERT(sp != NULL, ("No more free page descriptor ?")); + TAILQ_REMOVE(&free_pgdesc, sp, pg_list); + sp->addr = mem; + pmap_get_pde_pte(kernel_pmap, (vm_offset_t)mem, &pd, + &pt); + if ((*pd & pte_l1_s_cache_mask) == + pte_l1_s_cache_mode_pt && + pte_l1_s_cache_mode_pt != pte_l1_s_cache_mode) + TAILQ_INSERT_HEAD(&pages_wt, sp, pg_list); + else + TAILQ_INSERT_HEAD(&pages_normal, sp, pg_list); + mtx_unlock(&smallalloc_mtx); + } else { + vm_page_t m; + vm_paddr_t pa = vtophys((vm_offset_t)mem); + + m = PHYS_TO_VM_PAGE(pa); + vm_page_lock_queues(); + vm_page_free(m); + vm_page_unlock_queues(); + } } } ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/at91/at91_st.c#3 (text) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.4 2006/07/14 22:31:12 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.5 2006/08/09 20:58:55 imp Exp $"); #include #include @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -48,7 +49,8 @@ static struct at91st_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - device_t dev; + device_t sc_dev; + eventhandler_tag sc_wet; /* watchdog event handler tag */ } *timer_softc; #define RD4(off) \ @@ -56,6 +58,8 @@ #define WR4(off, val) \ bus_space_write_4(timer_softc->sc_st, timer_softc->sc_sh, (off), (val)) +static void at91st_watchdog(void *, u_int, int *); + static inline int st_crtr(void) { @@ -97,7 +101,7 @@ timer_softc = device_get_softc(dev); timer_softc->sc_st = sc->sc_st; - timer_softc->dev = dev; + timer_softc->sc_dev = dev; if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_ST_BASE, AT91RM92_ST_SIZE, &timer_softc->sc_sh) != 0) panic("couldn't subregion timer registers"); @@ -108,6 +112,13 @@ WR4(ST_RTMR, 1); /* Disable all interrupts */ WR4(ST_IDR, 0xffffffff); + /* disable watchdog timer */ + WR4(ST_WDMR, 0); + + timer_softc->sc_wet = EVENTHANDLER_REGISTER(watchdog_list, + at91st_watchdog, dev, 0); + device_printf(dev, + "watchdog registered, timeout intervall max. 64 sec\n"); return (0); } @@ -140,7 +151,34 @@ #endif } +/* + * t below is in a weird unit. The watchdog is set to 2^t + * nanoseconds. Since our watchdog timer can't really do that too + * well, we approximate it by assuming that the timeout interval for + * the lsb is 2^22 ns, which is 4.194ms. This is an overestimation of + * the actual time (3.906ms), but close enough for watchdogging. + * These approximations, though a violation of the spec, improve the + * performance of the application which typically specifies things as + * WD_TO_32SEC. In that last case, we'd wait 32s before the wdog + * reset. The spec says we should wait closer to 34s, but given how + * it is likely to be used, and the extremely coarse nature time + * interval, I think this is the best solution. + */ static void +at91st_watchdog(void *argp, u_int cmd, int *error) +{ + uint32_t wdog; + int t; + + wdog = 0; + t = cmd & WD_INTERVAL; + if (cmd != 0 && t >= 22 && t <= 37) + wdog = (1 << (t - 22)) | ST_WDMR_RSTEN; + WR4(ST_WDMR, wdog); + WR4(ST_CR, ST_CR_WDRST); +} + +static void clock_intr(void *arg) { struct trapframe *fp = arg; @@ -161,7 +199,7 @@ struct resource *irq; int rid = 0; void *ih; - device_t dev = timer_softc->dev; + device_t dev = timer_softc->sc_dev; if (32768 % hz) { printf("Cannot get %d Hz clock; using 128Hz\n", hz); @@ -229,4 +267,3 @@ cpu_stopprofclock(void) { } - ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/at91/kb920x_machdep.c#5 (text) ==== @@ -48,7 +48,7 @@ #include "opt_at91.h" #include -__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.13 2006/07/25 23:07:35 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.15 2006/08/08 20:59:38 cognet Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -262,7 +262,7 @@ u_int l1pagetable; vm_offset_t freemempos; vm_offset_t afterkern; - int i = 0; + int i; uint32_t fake_preload[35]; uint32_t memsize; vm_offset_t lastaddr; @@ -465,6 +465,15 @@ arm_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + 0x100000 * (KERNEL_PT_KERN_NUM - 1); + /* + * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before + * calling pmap_bootstrap. + */ + dump_avail[0] = KERNPHYSADDR; + dump_avail[1] = KERNPHYSADDR + memsize; + dump_avail[2] = 0; + dump_avail[3] = 0; + pmap_bootstrap(freemempos, KERNVIRTADDR + 3 * memsize, &kernel_l1pt); @@ -473,10 +482,6 @@ mutex_init(); i = 0; - dump_avail[0] = KERNPHYSADDR; - dump_avail[1] = KERNPHYSADDR + memsize; - dump_avail[2] = 0; - dump_avail[3] = 0; phys_avail[0] = virtual_avail - KERNVIRTADDR + KERNPHYSADDR; phys_avail[1] = KERNPHYSADDR + memsize; ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/include/pmap.h#3 (text+ko) ==== @@ -44,7 +44,7 @@ * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30 * - * $FreeBSD: src/sys/arm/include/pmap.h,v 1.19 2006/06/06 04:32:20 alc Exp $ + * $FreeBSD: src/sys/arm/include/pmap.h,v 1.20 2006/08/08 20:59:38 cognet Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -531,7 +531,8 @@ #ifdef ARM_USE_SMALL_ALLOC void arm_add_smallalloc_pages(void *, void *, int, int); -void arm_busy_pages(void); +vm_offset_t arm_ptovirt(vm_paddr_t); +void arm_init_smallalloc(void); struct arm_small_page { void *addr; TAILQ_ENTRY(arm_small_page) pg_list; ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/include/sf_buf.h#2 (text+ko) ==== @@ -23,16 +23,40 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/include/sf_buf.h,v 1.1 2004/05/14 11:46:44 cognet Exp $ + * $FreeBSD: src/sys/arm/include/sf_buf.h,v 1.2 2006/08/08 20:59:38 cognet Exp $ */ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ -#include struct vm_page; +#ifdef ARM_USE_SMALL_ALLOC + +#include +#include +#include + +struct sf_buf; + + +static __inline vm_offset_t +sf_buf_kva(struct sf_buf *sf) +{ + return arm_ptovirt(VM_PAGE_TO_PHYS((vm_page_t)sf)); +} + +static __inline vm_page_t +sf_buf_page(struct sf_buf *sf) +{ + return ((vm_page_t)sf); +} + +#else + +#include + struct sf_buf { LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ @@ -55,4 +79,5 @@ return (sf->m); } +#endif #endif /* !_MACHINE_SF_BUF_H_ */ ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/include/vmparam.h#2 (text+ko) ==== @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/include/vmparam.h,v 1.5 2005/06/07 23:04:24 cognet Exp $ + * $FreeBSD: src/sys/arm/include/vmparam.h,v 1.6 2006/08/08 20:59:38 cognet Exp $ */ #ifndef _MACHINE_VMPARAM_H_ @@ -96,7 +96,14 @@ #define UPT_MIN_ADDRESS VADDR(UPTPTDI, 0) #define VM_MIN_ADDRESS (0x00001000) +#ifdef ARM_USE_SMALL_ALLOC +#ifndef ARM_KERN_DIRECTMAP +#define ARM_KERN_DIRECTMAP 512 * 1024 * 1024 /* 512 MB */ +#endif +#define VM_MAXUSER_ADDRESS KERNBASE - ARM_KERN_DIRECTMAP +#else /* ARM_USE_SMALL_ALLOC */ #define VM_MAXUSER_ADDRESS KERNBASE +#endif /* ARM_USE_SMALL_ALLOC */ #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS #define USRSTACK VM_MAXUSER_ADDRESS ==== //depot/projects/soc2006/rdivacky_linuxolator/arm/sa11x0/assabet_machdep.c#3 (text+ko) ==== @@ -47,7 +47,7 @@ #include -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.17 2006/06/07 11:28:17 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.18 2006/08/08 20:59:38 cognet Exp $"); #include "opt_md.h" @@ -438,18 +438,15 @@ pmap_curmaxkvaddr = freemempos + KERNEL_PT_VMDATA_NUM * 0x400000; - pmap_bootstrap(freemempos, - 0xd0000000, &kernel_l1pt); - - - mutex_init(); - - dump_avail[0] = phys_avail[0] = round_page(virtual_avail); dump_avail[1] = phys_avail[1] = 0xc0000000 + 0x02000000 - 1; dump_avail[2] = phys_avail[2] = 0; dump_avail[3] = phys_avail[3] = 0; - + + mutex_init(); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Aug 11 11:42:53 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 AAF5E16A4FC; Fri, 11 Aug 2006 11:42:53 +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 8318B16A4F1; Fri, 11 Aug 2006 11:42:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE99943D6A; Fri, 11 Aug 2006 11:42:51 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id C6B8A46D15; Fri, 11 Aug 2006 07:42:50 -0400 (EDT) Date: Fri, 11 Aug 2006 12:42:50 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Roman Divacky In-Reply-To: <200608111110.k7BBAxIO059339@repoman.freebsd.org> Message-ID: <20060811124027.K45647@fledge.watson.org> References: <200608111110.k7BBAxIO059339@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Perforce Change Reviews Subject: Re: PERFORCE change 103633 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, 11 Aug 2006 11:42:54 -0000 On Fri, 11 Aug 2006, Roman Divacky wrote: > http://perforce.freebsd.org/chv.cgi?CH=103633 > > Change 103633 by rdivacky@rdivacky_witten on 2006/08/11 11:10:09 > > Giantify futex code - this is necessary because the futex code is expected to be atomic. > I need to assure the atomicity. I am using Giant because its sleepable mutex. I hope > someone will point me to some other better solution. Giant is not "sleepable" in the same sense that sx locks, lockmgr locks, etc, are. Normally "sleepable" means that the lock can be held across a sleep of potentially unbounded length, such as msleep(), tsleep(), cv_wait(), etc. Giant is automatically dropped by the kernel on sleep, and re-acquired one wakeup. This means that Giant does not provide mutual exclusion across a sleep -- if this is a property you are relying on, then Giant is not what you want. If you most sleep while holding a lock, I would recommend an sx lock. However, a preferred solution is not to sleep holding a lock. Robert N M Watson Computer Laboratory University of Cambridge From owner-p4-projects@FreeBSD.ORG Fri Aug 11 12:13:22 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 BCE9016A4E5; Fri, 11 Aug 2006 12:13:22 +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 8CCF016A4DA; Fri, 11 Aug 2006 12:13:22 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEFB143D49; Fri, 11 Aug 2006 12:13:21 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7BCDEcI085369 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 11 Aug 2006 14:13:15 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7BCDEZ8085368; Fri, 11 Aug 2006 14:13:14 +0200 (CEST) Date: Fri, 11 Aug 2006 14:13:14 +0200 From: Divacky Roman To: Robert Watson Message-ID: <20060811121314.GA85207@stud.fit.vutbr.cz> References: <200608111110.k7BBAxIO059339@repoman.freebsd.org> <20060811124027.K45647@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060811124027.K45647@fledge.watson.org> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: Roman Divacky , Perforce Change Reviews Subject: Re: PERFORCE change 103633 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, 11 Aug 2006 12:13:23 -0000 On Fri, Aug 11, 2006 at 12:42:50PM +0100, Robert Watson wrote: > On Fri, 11 Aug 2006, Roman Divacky wrote: > > >http://perforce.freebsd.org/chv.cgi?CH=103633 > > > >Change 103633 by rdivacky@rdivacky_witten on 2006/08/11 11:10:09 > > > > Giantify futex code - this is necessary because the futex code is > > expected to be atomic. > > I need to assure the atomicity. I am using Giant because its > > sleepable mutex. I hope > > someone will point me to some other better solution. > > Giant is not "sleepable" in the same sense that sx locks, lockmgr locks, > etc, are. Normally "sleepable" means that the lock can be held across a > sleep of potentially unbounded length, such as msleep(), tsleep(), > cv_wait(), etc. Giant is automatically dropped by the kernel on sleep, and > re-acquired one wakeup. This means that Giant does not provide mutual > exclusion across a sleep -- if this is a property you are relying on, then > Giant is not what you want. If you most sleep while holding a lock, I > would recommend an sx lock. However, a preferred solution is not to sleep > holding a lock. yes... sleepable as in "can be held while sleeping no matter how this is acomplished" I think the main problem (which is now fixed) was with this: copyin(addr, val1); if (val1 == val2) .... being non-atomic. On the other hand I tried to use other locks other then Giant and it didnt work. I hope to investigate that later. Now I have this working and my focus is elsewhere. From owner-p4-projects@FreeBSD.ORG Fri Aug 11 16:56:28 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 C262316A4E6; Fri, 11 Aug 2006 16:56:28 +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 9D20216A4DD; Fri, 11 Aug 2006 16:56:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12B8C43D70; Fri, 11 Aug 2006 16:56:23 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7BGuIbr082536; Fri, 11 Aug 2006 12:56:23 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Divacky Roman Date: Fri, 11 Aug 2006 12:49:44 -0400 User-Agent: KMail/1.9.1 References: <200608111110.k7BBAxIO059339@repoman.freebsd.org> <20060811124027.K45647@fledge.watson.org> <20060811121314.GA85207@stud.fit.vutbr.cz> In-Reply-To: <20060811121314.GA85207@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608111249.44686.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 11 Aug 2006 12:56:23 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1646/Fri Aug 11 05:51:17 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Roman Divacky , Perforce Change Reviews , Robert Watson Subject: Re: PERFORCE change 103633 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, 11 Aug 2006 16:56:29 -0000 On Friday 11 August 2006 08:13, Divacky Roman wrote: > On Fri, Aug 11, 2006 at 12:42:50PM +0100, Robert Watson wrote: > > On Fri, 11 Aug 2006, Roman Divacky wrote: > > > > >http://perforce.freebsd.org/chv.cgi?CH=103633 > > > > > >Change 103633 by rdivacky@rdivacky_witten on 2006/08/11 11:10:09 > > > > > > Giantify futex code - this is necessary because the futex code is > > > expected to be atomic. > > > I need to assure the atomicity. I am using Giant because its > > > sleepable mutex. I hope > > > someone will point me to some other better solution. > > > > Giant is not "sleepable" in the same sense that sx locks, lockmgr locks, > > etc, are. Normally "sleepable" means that the lock can be held across a > > sleep of potentially unbounded length, such as msleep(), tsleep(), > > cv_wait(), etc. Giant is automatically dropped by the kernel on sleep, and > > re-acquired one wakeup. This means that Giant does not provide mutual > > exclusion across a sleep -- if this is a property you are relying on, then > > Giant is not what you want. If you most sleep while holding a lock, I > > would recommend an sx lock. However, a preferred solution is not to sleep > > holding a lock. > > yes... sleepable as in "can be held while sleeping no matter how this is acomplished" > > I think the main problem (which is now fixed) was with this: > > copyin(addr, val1); > if (val1 == val2) > .... > > being non-atomic. On the other hand I tried to use other locks other then Giant and it > didnt work. I hope to investigate that later. Now I have this working and my focus is elsewhere. No, what you have done is wrong. The idea of doing copyin() and then compare is just plain not going to work. :) You will need to use casuptr() or the like similar to the umtx code. This is assuming that a futex can be manipulated from userland w/o entering the kernel. -- John Baldwin From owner-p4-projects@FreeBSD.ORG Fri Aug 11 17:20:47 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 2D0E616A4E7; Fri, 11 Aug 2006 17:20:47 +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 F09F816A4E0; Fri, 11 Aug 2006 17:20:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B55443D78; Fri, 11 Aug 2006 17:20:42 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id C71CF46D3C; Fri, 11 Aug 2006 13:20:41 -0400 (EDT) Date: Fri, 11 Aug 2006 18:20:41 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200608111249.44686.jhb@freebsd.org> Message-ID: <20060811181817.C8215@fledge.watson.org> References: <200608111110.k7BBAxIO059339@repoman.freebsd.org> <20060811124027.K45647@fledge.watson.org> <20060811121314.GA85207@stud.fit.vutbr.cz> <200608111249.44686.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Divacky Roman , Perforce Change Reviews , Roman Divacky Subject: Re: PERFORCE change 103633 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, 11 Aug 2006 17:20:47 -0000 On Fri, 11 Aug 2006, John Baldwin wrote: >> I think the main problem (which is now fixed) was with this: >> >> copyin(addr, val1); >> if (val1 == val2) >> .... >> >> being non-atomic. On the other hand I tried to use other locks other then >> Giant and it didnt work. I hope to investigate that later. Now I have this >> working and my focus is elsewhere. > > No, what you have done is wrong. The idea of doing copyin() and then > compare is just plain not going to work. :) You will need to use casuptr() > or the like similar to the umtx code. This is assuming that a futex can be > manipulated from userland w/o entering the kernel. I assume that we can basically just do whatever Linux does here for synchronization... Robert N M Watson Computer Laboratory University of Cambridge From owner-p4-projects@FreeBSD.ORG Fri Aug 11 17:50:04 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 4136916A4E5; Fri, 11 Aug 2006 17:50:04 +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 E64E016A4DE; Fri, 11 Aug 2006 17:50:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AA9B43D46; Fri, 11 Aug 2006 17:50:03 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7BHo0Hh082864; Fri, 11 Aug 2006 13:50:01 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Robert Watson Date: Fri, 11 Aug 2006 13:29:52 -0400 User-Agent: KMail/1.9.1 References: <200608111110.k7BBAxIO059339@repoman.freebsd.org> <200608111249.44686.jhb@freebsd.org> <20060811181817.C8215@fledge.watson.org> In-Reply-To: <20060811181817.C8215@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608111329.52886.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 11 Aug 2006 13:50:02 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1646/Fri Aug 11 05:51:17 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Divacky Roman , Perforce Change Reviews , Roman Divacky Subject: Re: PERFORCE change 103633 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, 11 Aug 2006 17:50:04 -0000 On Friday 11 August 2006 13:20, Robert Watson wrote: > On Fri, 11 Aug 2006, John Baldwin wrote: > > >> I think the main problem (which is now fixed) was with this: > >> > >> copyin(addr, val1); > >> if (val1 == val2) > >> .... > >> > >> being non-atomic. On the other hand I tried to use other locks other then > >> Giant and it didnt work. I hope to investigate that later. Now I have this > >> working and my focus is elsewhere. > > > > No, what you have done is wrong. The idea of doing copyin() and then > > compare is just plain not going to work. :) You will need to use > > casuptr() or the like similar to the umtx code. This is assuming that a > > futex can be manipulated from userland w/o entering the kernel. > > I assume that we can basically just do whatever Linux does here for > synchronization... Yes, but my assumption is that it lets the easy cases just run in userland and only goes into the kernel for a hard case, so you need to use atomic ops such as casuptr(). -- John Baldwin From owner-p4-projects@FreeBSD.ORG Fri Aug 11 17:50:26 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 E404916A4E9; Fri, 11 Aug 2006 17:50:25 +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 C286E16A4E7 for ; Fri, 11 Aug 2006 17:50:25 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31F2343D4C for ; Fri, 11 Aug 2006 17:50:25 +0000 (GMT) (envelope-from gabor@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 k7BHoOlr001309 for ; Fri, 11 Aug 2006 17:50:24 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BHoOk3001306 for perforce@freebsd.org; Fri, 11 Aug 2006 17:50:24 GMT (envelope-from gabor@FreeBSD.org) Date: Fri, 11 Aug 2006 17:50:24 GMT Message-Id: <200608111750.k7BHoOk3001306@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103643 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, 11 Aug 2006 17:50:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=103643 Change 103643 by gabor@gabor_spitfire on 2006/08/11 17:49:47 Document CHROOTDESTDIR in the file header. Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#81 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#81 (text+ko) ==== @@ -889,6 +889,11 @@ # SUB_LIST - List of "variable=value" pair for substitution in ${SUB_FILES} # Some pairs are added by default: eg. PREFIX=${PREFIX} # +# CHROOTDESTDIR - This variable is set to ${CHROOT} ${DESTDIR} is DESTDIR +# is set, otherwise it is empty. You can use it to chroot +# some command invocations without checking if we are +# installing to DESTDIR. +# # INSTALLS_SHLIB # - If set, bsd.port.mk will automatically run ldconfig commands # from post-install and also add appropriate @exec/@unexec From owner-p4-projects@FreeBSD.ORG Fri Aug 11 17:53:31 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 04F6516A4E2; Fri, 11 Aug 2006 17:53:31 +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 AB3D416A4DE for ; Fri, 11 Aug 2006 17:53:30 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6574D43D46 for ; Fri, 11 Aug 2006 17:53:30 +0000 (GMT) (envelope-from gabor@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 k7BHrUXa001480 for ; Fri, 11 Aug 2006 17:53:30 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BHrT7D001477 for perforce@freebsd.org; Fri, 11 Aug 2006 17:53:29 GMT (envelope-from gabor@FreeBSD.org) Date: Fri, 11 Aug 2006 17:53:29 GMT Message-Id: <200608111753.k7BHrT7D001477@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103644 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, 11 Aug 2006 17:53:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=103644 Change 103644 by gabor@gabor_spitfire on 2006/08/11 17:52:43 Fix OPENSSLRPATH. It is used at runtime, not install-time. Submitted by: John E. Hein Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.openssl.mk#5 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.openssl.mk#5 (text+ko) ==== @@ -98,7 +98,7 @@ .endif MAKE_ARGS+= OPENSSL_CFLAGS="${OPENSSL_CFLAGS}" .endif -OPENSSLRPATH= ${DESTDIR}/usr/lib:${LOCALBASE}/lib +OPENSSLRPATH= /usr/lib:${LOCALBASE_REL}/lib .else From owner-p4-projects@FreeBSD.ORG Fri Aug 11 18:16:43 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 F385B16A4E5; Fri, 11 Aug 2006 18:16:42 +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 C0AEF16A4DD; Fri, 11 Aug 2006 18:16:42 +0000 (UTC) (envelope-from kmacy@fsmware.com) Received: from demos.bsdclusters.com (demos.bsdclusters.com [69.55.225.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78C0543D49; Fri, 11 Aug 2006 18:16:42 +0000 (GMT) (envelope-from kmacy@fsmware.com) Received: from demos.bsdclusters.com (demos [69.55.225.36]) by demos.bsdclusters.com (8.12.8p1/8.12.8) with ESMTP id k7BIGglZ042649; Fri, 11 Aug 2006 11:16:42 -0700 (PDT) (envelope-from kmacy@fsmware.com) Received: from localhost (kmacy@localhost) by demos.bsdclusters.com (8.12.8p1/8.12.8/Submit) with ESMTP id k7BIGg0p042646; Fri, 11 Aug 2006 11:16:42 -0700 (PDT) X-Authentication-Warning: demos.bsdclusters.com: kmacy owned process doing -bs Date: Fri, 11 Aug 2006 11:16:41 -0700 (PDT) From: Kip Macy X-X-Sender: kmacy@demos.bsdclusters.com To: John Baldwin In-Reply-To: <200608111329.52886.jhb@freebsd.org> Message-ID: <20060811111553.X27159@demos.bsdclusters.com> References: <200608111110.k7BBAxIO059339@repoman.freebsd.org> <200608111249.44686.jhb@freebsd.org> <20060811181817.C8215@fledge.watson.org> <200608111329.52886.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Divacky Roman , Perforce Change Reviews , Robert Watson , Roman Divacky Subject: Re: PERFORCE change 103633 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, 11 Aug 2006 18:16:43 -0000 > Yes, but my assumption is that it lets the easy cases just run in userland and > only goes into the kernel for a hard case, so you need to use atomic ops such > as casuptr(). Correct, umtx post-dates and is meant to compete with futex. -Kip From owner-p4-projects@FreeBSD.ORG Fri Aug 11 18:24:57 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 CD9AD16A64E; Fri, 11 Aug 2006 18:24:56 +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 8B7C916A5D2 for ; Fri, 11 Aug 2006 18:24:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5CCE43EB2 for ; Fri, 11 Aug 2006 18:24:26 +0000 (GMT) (envelope-from jhb@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 k7BIODeR004353 for ; Fri, 11 Aug 2006 18:24:13 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BIOCPk004348 for perforce@freebsd.org; Fri, 11 Aug 2006 18:24:12 GMT (envelope-from jhb@freebsd.org) Date: Fri, 11 Aug 2006 18:24:12 GMT Message-Id: <200608111824.k7BIOCPk004348@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 103646 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, 11 Aug 2006 18:24:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=103646 Change 103646 by jhb@jhb_mutex on 2006/08/11 18:23:19 - Pass the thread index to the event handlers so they can key their behavior off the thread index. - Output start messages as well as finish ones per-thread. - Just drop the event_mtx around the event handler. Previously, if crash_thread got a bogus event it would cv_wait on an unlocked mutex. - Add events to create intentional sx, lockmgr, and sx+lockmgr cycles to test 'show sleepchain'. Affected files ... .. //depot/projects/smpng/sys/modules/crash2/crash2.c#10 edit Differences ... ==== //depot/projects/smpng/sys/modules/crash2/crash2.c#10 (text+ko) ==== @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -61,7 +62,7 @@ #define NTHREADS 4 -typedef void (*event_handler)(void); +typedef void (*event_handler)(int); struct crash2_event { const char *ev_name; @@ -87,6 +88,8 @@ static int event[NTHREADS]; static struct rwlock foo; static struct mtx bar; +static struct sx one, two, three, four; +static struct lock fee, fi, fo, fum; static int mod_event(struct module *module, int cmd, void *arg); static int load(void *arg); @@ -96,8 +99,49 @@ /* Events. */ +static struct lock *locks[] = { &fee, &fi, &fo, &fum }; +static struct sx *sxs[] = { &one, &two, &three, &four }; + +static void +sleep_deadlock(int thread) +{ + + if (thread % 2) + sx_xlock(sxs[thread % 4]); + else + lockmgr(locks[thread % 4], LK_EXCLUSIVE, NULL, curthread); + tsleep(sxs, 0, "slp_dead", hz/10); + if (thread % 2) + lockmgr(locks[(thread + 1) % 4], LK_EXCLUSIVE, NULL, curthread); + else + sx_xlock(sxs[(thread + 1) % 4]); +} +CRASH2_EVENT("sx and lockmgr cycle", sleep_deadlock, sleep_deadlock, + sleep_deadlock, sleep_deadlock); + static void -foo_grades(void) +lockmgr_deadlock(int thread) +{ + + lockmgr(locks[thread % 4], LK_EXCLUSIVE, NULL, curthread); + tsleep(sxs, 0, "lk_dead", hz/10); + lockmgr(locks[(thread + 1) % 4], LK_EXCLUSIVE, NULL, curthread); +} +CRASH2_EVENT("lockmgr cycle", lockmgr_deadlock, lockmgr_deadlock, + lockmgr_deadlock, lockmgr_deadlock); + +static void +sx_deadlock(int thread) +{ + + sx_xlock(sxs[thread % 4]); + tsleep(sxs, 0, "sx_dead", hz/10); + sx_xlock(sxs[(thread + 1) % 4]); +} +CRASH2_EVENT("sx cycle", sx_deadlock, sx_deadlock, sx_deadlock, sx_deadlock); + +static void +foo_grades(int dummy) { switch (arc4random() % 10) { @@ -136,12 +180,12 @@ } static void -foo_grades_lots(void) +foo_grades_lots(int dummy) { int i; for (i = 0; i < 50000; i++) - foo_grades(); + foo_grades(dummy); } CRASH2_EVENT("lots of foo up/downgrades", foo_grades_lots, foo_grades_lots, @@ -150,7 +194,7 @@ foo_grades); static void -bar_sleep(void) +bar_sleep(int dummy) { mtx_lock(&bar); @@ -160,7 +204,7 @@ CRASH2_EVENT("sleep holding bar", bar_sleep, bar_sleep, bar_sleep, bar_sleep); static void -whack_foo(void) +whack_foo(int dummy) { switch (arc4random() % 10) { case 0: @@ -178,16 +222,16 @@ } static void -whack_foo_lots(void) +whack_foo_lots(int dummy) { int i; for (i = 0; i < 50000; i++) - whack_foo(); + whack_foo(dummy); } static void -wlock_foo(void) +wlock_foo(int dummy) { rw_wlock(&foo); @@ -196,7 +240,7 @@ } static void -rlock_foo(void) +rlock_foo(int dummy) { rw_rlock(&foo); @@ -214,7 +258,7 @@ /* Help event should be last so that it is always event 1. */ static void -help(void) +help(int dummy) { struct crash2_event **ev; @@ -230,7 +274,7 @@ /* Null event 0. */ static void -nop(void) +nop(int dummy) { } CRASH2_EVENT(NULL, nop); @@ -277,15 +321,15 @@ i = (intptr_t)arg; if (i == 0) - help(); + help(0); mtx_lock(&event_mtx); while (1) { while ((ev = event[i]) == 0) cv_wait(&event_cv, &event_mtx); event[i] = 0; - mtx_unlock(&event_mtx); if (ev == -1) { printf("crash2[%d]: exiting\n", i); + mtx_unlock(&event_mtx); kthread_exit(0); break; } @@ -294,10 +338,13 @@ continue; } evp = event_start[ev]; - if (evp->ev_handler[i]) - evp->ev_handler[i](); - mtx_lock(&event_mtx); - printf("crash2[%d]: %s\n", i, evp->ev_name); + if (evp->ev_handler[i]) { + printf("crash2[%d]: started %s\n", i, evp->ev_name); + mtx_unlock(&event_mtx); + evp->ev_handler[i](i); + mtx_lock(&event_mtx); + printf("crash2[%d]: finished %s\n", i, evp->ev_name); + } } } @@ -320,6 +367,14 @@ rw_init(&foo, "foo"); mtx_init(&bar, "bar", NULL, MTX_DEF); + sx_init(&one, "one"); + sx_init(&two, "two"); + sx_init(&three, "three"); + sx_init(&four, "four"); + lockinit(&fee, PWAIT, "fee", 0, 0); + lockinit(&fi, PWAIT, "fi", 0, 0); + lockinit(&fo, PWAIT, "fo", 0, 0); + lockinit(&fum, PWAIT, "fum", 0, 0); mtx_init(&event_mtx, "crash2 event", NULL, MTX_DEF); cv_init(&event_cv, "crash2"); for (i = 0; i < NTHREADS; i++) { @@ -351,6 +406,14 @@ } mtx_destroy(&event_mtx); cv_destroy(&event_cv); + lockdestroy(&fum); + lockdestroy(&fo); + lockdestroy(&fi); + lockdestroy(&fee); + sx_destroy(&four); + sx_destroy(&three); + sx_destroy(&two); + sx_destroy(&one); mtx_destroy(&bar); rw_destroy(&foo); return (0); From owner-p4-projects@FreeBSD.ORG Fri Aug 11 19:10:45 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 B5E6516A4E0; Fri, 11 Aug 2006 19:10:45 +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 7311016A4DD; Fri, 11 Aug 2006 19:10:45 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAE1E43D58; Fri, 11 Aug 2006 19:10:42 +0000 (GMT) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net ([12.207.12.9]) by sccmmhc91.asp.att.net (sccmmhc91) with ESMTP id <20060811191041m9100873c4e>; Fri, 11 Aug 2006 19:10:41 +0000 Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.6/8.13.6) with ESMTP id k7BJAdRF034593; Fri, 11 Aug 2006 14:10:39 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.6/8.13.6/Submit) id k7BJAdW0034592; Fri, 11 Aug 2006 14:10:39 -0500 (CDT) (envelope-from brooks) Date: Fri, 11 Aug 2006 14:10:35 -0500 From: Brooks Davis To: Gabor Kovesdan Message-ID: <20060811191035.GA34528@lor.one-eyed-alien.net> References: <200608111750.k7BHoOk3001306@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <200608111750.k7BHoOk3001306@repoman.freebsd.org> User-Agent: Mutt/1.5.11 Cc: Perforce Change Reviews Subject: Re: PERFORCE change 103643 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, 11 Aug 2006 19:10:46 -0000 --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 11, 2006 at 05:50:24PM +0000, Gabor Kovesdan wrote: > +# CHROOTDESTDIR - This variable is set to ${CHROOT} ${DESTDIR} is DEST= DIR Shouldn't that be "if DESTDIR" at the end? > +# is set, otherwise it is empty. You can use it to chroot > +# some command invocations without checking if we are > +# installing to DESTDIR. > +# > # INSTALLS_SHLIB > # - If set, bsd.port.mk will automatically run ldconfig commands > # from post-install and also add appropriate @exec/@unexec >=20 -- Brooks --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFE3NYrXY6L6fI4GtQRAlI/AJ9jFgqhFUITCtDWgldFu8f2aZ+dLwCbBVVo bLeorCZra6FK4PxmDNdxXwE= =y45a -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY-- From owner-p4-projects@FreeBSD.ORG Fri Aug 11 20:00:27 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 A4F3616A51C; Fri, 11 Aug 2006 20:00:22 +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 6B7F916A51A for ; Fri, 11 Aug 2006 20:00:22 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0149743D46 for ; Fri, 11 Aug 2006 20:00:22 +0000 (GMT) (envelope-from gabor@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 k7BK0Lr6010960 for ; Fri, 11 Aug 2006 20:00:21 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BK0Lr0010956 for perforce@freebsd.org; Fri, 11 Aug 2006 20:00:21 GMT (envelope-from gabor@FreeBSD.org) Date: Fri, 11 Aug 2006 20:00:21 GMT Message-Id: <200608112000.k7BK0Lr0010956@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 103659 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, 11 Aug 2006 20:00:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=103659 Change 103659 by gabor@gabor_spitfire on 2006/08/11 20:00:13 Fix some regexp in sed substitutions. Affected files ... .. //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#19 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#19 (text+ko) ==== @@ -3,7 +3,7 @@ for _S in ${MASTER_SITES}; do __TMP= `${ECHO_CMD} ${_S} | ${SED} 's@/:[^/:]+$@/@'` - _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s|^${__TMP}||" -e '/^://'` + _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s|^${__TMP}||" -e 's/^://'` if [ -n "${_S_TEMP}" ] ; then for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} 's/,/ /g'`; do _G_TEMP= ${_group} @@ -12,11 +12,11 @@ ${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITES." exit 1 fi - __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's/@^(.*/):[^/:]+$@\1@'` + __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's/@^\(.*/\):[^/:]+$@\1@'` _MASTER_SITES_${_group}= $${_MASTER_SITES_${_group}} ${__SUFFIX_TMP} done else - __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*/):[^/:]+$@\1@'` + __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^\(.*/\):[^/:]+$@\1@'` _MASTER_SITES_DEFAULT= ${_MASTER_SITES_DEFAULT} ${__SUFFIX_TMP} fi done @@ -32,13 +32,13 @@ exit 1 fi if [ -n "$${_MASTER_SITES_${_group}}" ] ; then - __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*)/:[^/:]+$@\1@'` + __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^\(.*\)/:[^/:]+$@\1@'` _MASTER_SITE_SUBDIR_${_group}= $${_MASTER_SITE_SUBDIR_${_group}} ${__SUFFIX_TMP} fi done else if [ -n "${_MASTER_SITES_DEFAULT}" ] ; then - __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} '@^(.*)/:[^/:]+$@\1@'` + __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} '@^\(.*\)/:[^/:]+$@\1@'` _MASTER_SITE_SUBDIR_DEFAULT= ${_MASTER_SITE_SUBDIR_DEFAULT} ${__SUFFIX_TMP} fi fi @@ -267,11 +267,11 @@ ${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES" exit 1 fi - __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*/):[^/:]+$@\1@'` + __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^\(.*/\):[^/:]+$@\1@'` _PATCH_SITES_${_group}= $${_PATCH_SITES_${_group}} ${__SUFFIX_TMP} done else - __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*/):[^/:]+$@\1@'` + __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^\(.*/\):[^/:]+$@\1@'` _PATCH_SITES_DEFAULT= ${_PATCH_SITES_DEFAULT} ${__SUFFIX_TMP} fi done @@ -287,13 +287,13 @@ exit 1 fi if [ -n "${_PATCH_SITES_${_group}}" ] ; then - __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*)/:[^/:]+$@\1@'` + __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^\(.*\)/:[^/:]+$@\1@'` _PATCH_SITE_SUBDIR_${_group}= $${_PATCH_SITE_SUBDIR_${_group}} ${__SUFFIX_TMP} fi done else if [ -n "${_PATCH_SITES_DEFAULT}" ] ; then - __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*)/:[^/:]+$@\1@'` + __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^\(.*\)/:[^/:]+$@\1@'` _PATCH_SITE_SUBDIR_DEFAULT= ${_PATCH_SITE_SUBDIR_DEFAULT} ${__SUFFIX_TMP} fi fi From owner-p4-projects@FreeBSD.ORG Fri Aug 11 20:38:09 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 93D4E16A4DF; Fri, 11 Aug 2006 20:38:09 +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 6F13316A4DD for ; Fri, 11 Aug 2006 20:38:09 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26A4E43D46 for ; Fri, 11 Aug 2006 20:38:09 +0000 (GMT) (envelope-from marcel@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 k7BKc9Rn013990 for ; Fri, 11 Aug 2006 20:38:09 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BKc8Po013987 for perforce@freebsd.org; Fri, 11 Aug 2006 20:38:08 GMT (envelope-from marcel@freebsd.org) Date: Fri, 11 Aug 2006 20:38:08 GMT Message-Id: <200608112038.k7BKc8Po013987@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 103660 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, 11 Aug 2006 20:38:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=103660 Change 103660 by marcel@marcel_nfs on 2006/08/11 20:38:04 Make sure struct fpacc87 is defined. Affected files ... .. //depot/projects/gdb/sys/compat/ia32/ia32_sysvec.c#8 edit Differences ... ==== //depot/projects/gdb/sys/compat/ia32/ia32_sysvec.c#8 (text+ko) ==== @@ -65,6 +65,10 @@ #include #include +#ifdef __amd64__ +#include +#endif + #include #include #include From owner-p4-projects@FreeBSD.ORG Fri Aug 11 20:47:34 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 B27B416A4F1; Fri, 11 Aug 2006 20:47:34 +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 8B68A16A4EF for ; Fri, 11 Aug 2006 20:47:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 155CC43D45 for ; Fri, 11 Aug 2006 20:47:34 +0000 (GMT) (envelope-from jhb@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 k7BKlX6Z022235 for ; Fri, 11 Aug 2006 20:47:34 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BKlNol022232 for perforce@freebsd.org; Fri, 11 Aug 2006 20:47:23 GMT (envelope-from jhb@freebsd.org) Date: Fri, 11 Aug 2006 20:47:23 GMT Message-Id: <200608112047.k7BKlNol022232@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 103661 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, 11 Aug 2006 20:47:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=103661 Change 103661 by jhb@jhb_mutex on 2006/08/11 20:47:19 IFC @103654. Affected files ... .. //depot/projects/smpng/sys/Makefile#13 integrate .. //depot/projects/smpng/sys/amd64/acpica/madt.c#11 integrate .. //depot/projects/smpng/sys/amd64/amd64/pmap.c#66 integrate .. //depot/projects/smpng/sys/amd64/amd64/trap.c#53 integrate .. //depot/projects/smpng/sys/amd64/include/pmap.h#24 integrate .. //depot/projects/smpng/sys/amd64/linux32/linux32_sysvec.c#17 integrate .. //depot/projects/smpng/sys/arm/arm/mem.c#3 integrate .. //depot/projects/smpng/sys/arm/arm/pmap.c#33 integrate .. //depot/projects/smpng/sys/arm/arm/vm_machdep.c#22 integrate .. //depot/projects/smpng/sys/arm/at91/at91_st.c#5 integrate .. //depot/projects/smpng/sys/arm/at91/kb920x_machdep.c#9 integrate .. //depot/projects/smpng/sys/arm/include/pmap.h#18 integrate .. //depot/projects/smpng/sys/arm/include/sf_buf.h#2 integrate .. //depot/projects/smpng/sys/arm/include/vmparam.h#6 integrate .. //depot/projects/smpng/sys/arm/sa11x0/assabet_machdep.c#11 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/iq31244_machdep.c#19 integrate .. //depot/projects/smpng/sys/boot/Makefile#22 integrate .. //depot/projects/smpng/sys/boot/arm/Makefile#1 branch .. //depot/projects/smpng/sys/boot/arm/at91/Makefile.inc#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/Makefile#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/arm_init.S#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/env_vars.c#1 branch .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/env_vars.h#1 branch .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/loader_prompt.c#1 branch .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/loader_prompt.h#1 branch .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/main.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/Makefile#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/at91rm9200.h#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/eeprom.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/eeprom.h#2 delete .. //depot/projects/smpng/sys/boot/arm/at91/libat91/emac.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/emac.h#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/env_vars.c#2 delete .. //depot/projects/smpng/sys/boot/arm/at91/libat91/env_vars.h#2 delete .. //depot/projects/smpng/sys/boot/arm/at91/libat91/lib.h#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/loader_prompt.c#2 delete .. //depot/projects/smpng/sys/boot/arm/at91/libat91/loader_prompt.h#2 delete .. //depot/projects/smpng/sys/boot/arm/at91/libat91/p_string.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/p_string.h#2 delete .. //depot/projects/smpng/sys/boot/arm/at91/libat91/spi_flash.c#1 branch .. //depot/projects/smpng/sys/boot/arm/at91/libat91/spi_flash.h#1 branch .. //depot/projects/smpng/sys/boot/arm/at91/libat91/xmodem.c#2 integrate .. //depot/projects/smpng/sys/boot/i386/loader/main.c#13 integrate .. //depot/projects/smpng/sys/boot/pc98/loader/main.c#11 integrate .. //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#49 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_sockio.c#10 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_stream.c#42 integrate .. //depot/projects/smpng/sys/conf/files#185 integrate .. //depot/projects/smpng/sys/conf/options#125 integrate .. //depot/projects/smpng/sys/conf/options.arm#10 integrate .. //depot/projects/smpng/sys/dev/acpica/Osd/OsdMemory.c#10 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_dock.c#3 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_hpet.c#4 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#35 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_video.c#11 integrate .. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#71 integrate .. //depot/projects/smpng/sys/dev/ata/ata-disk.c#59 integrate .. //depot/projects/smpng/sys/dev/ata/ata-pci.h#45 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath.c#43 integrate .. //depot/projects/smpng/sys/dev/ath/if_athioctl.h#14 integrate .. //depot/projects/smpng/sys/dev/bge/if_bge.c#78 integrate .. //depot/projects/smpng/sys/dev/bge/if_bgereg.h#44 integrate .. //depot/projects/smpng/sys/dev/bktr/CHANGELOG.TXT#5 integrate .. //depot/projects/smpng/sys/dev/dpt/dpt_scsi.c#15 integrate .. //depot/projects/smpng/sys/dev/em/README#13 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#71 integrate .. //depot/projects/smpng/sys/dev/em/if_em.h#33 integrate .. //depot/projects/smpng/sys/dev/em/if_em_hw.c#19 integrate .. //depot/projects/smpng/sys/dev/em/if_em_hw.h#19 integrate .. //depot/projects/smpng/sys/dev/em/if_em_osdep.h#18 integrate .. //depot/projects/smpng/sys/dev/fe/if_fe.c#24 integrate .. //depot/projects/smpng/sys/dev/isp/isp.c#42 integrate .. //depot/projects/smpng/sys/dev/isp/isp_freebsd.c#44 integrate .. //depot/projects/smpng/sys/dev/isp/isp_ioctl.h#16 integrate .. //depot/projects/smpng/sys/dev/isp/isp_library.c#4 integrate .. //depot/projects/smpng/sys/dev/isp/isp_target.c#20 integrate .. //depot/projects/smpng/sys/dev/isp/isp_target.h#13 integrate .. //depot/projects/smpng/sys/dev/isp/isp_tpublic.h#10 integrate .. //depot/projects/smpng/sys/dev/ixgb/if_ixgb.c#16 integrate .. //depot/projects/smpng/sys/dev/mxge/if_mxge.c#5 integrate .. //depot/projects/smpng/sys/dev/patm/if_patm_intr.c#7 integrate .. //depot/projects/smpng/sys/dev/pccard/pccard_cis.c#24 integrate .. //depot/projects/smpng/sys/dev/pci/pcivar.h#18 integrate .. //depot/projects/smpng/sys/dev/re/if_re.c#44 integrate .. //depot/projects/smpng/sys/dev/sound/pci/emu10k1.c#29 integrate .. //depot/projects/smpng/sys/dev/sound/pci/emu10kx-pcm.c#2 integrate .. //depot/projects/smpng/sys/dev/sound/pci/emu10kx.c#2 integrate .. //depot/projects/smpng/sys/dev/sound/pci/emu10kx.h#2 integrate .. //depot/projects/smpng/sys/dev/sym/sym_fw1.h#5 integrate .. //depot/projects/smpng/sys/dev/sym/sym_fw2.h#5 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#93 integrate .. //depot/projects/smpng/sys/dev/usb/uscanner.c#34 integrate .. //depot/projects/smpng/sys/dev/wi/if_wavelan_ieee.h#14 integrate .. //depot/projects/smpng/sys/dev/wi/if_wi.c#81 integrate .. //depot/projects/smpng/sys/dev/wi/if_wireg.h#22 integrate .. //depot/projects/smpng/sys/fs/hpfs/hpfs.h#11 integrate .. //depot/projects/smpng/sys/fs/msdosfs/msdosfs_vfsops.c#47 integrate .. //depot/projects/smpng/sys/fs/nwfs/nwfs_io.c#21 integrate .. //depot/projects/smpng/sys/fs/smbfs/smbfs_io.c#24 integrate .. //depot/projects/smpng/sys/geom/bde/g_bde_work.c#16 integrate .. //depot/projects/smpng/sys/geom/eli/g_eli.c#14 integrate .. //depot/projects/smpng/sys/geom/eli/g_eli.h#7 integrate .. //depot/projects/smpng/sys/geom/eli/g_eli_ctl.c#6 integrate .. //depot/projects/smpng/sys/geom/geom_gpt.c#26 integrate .. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#33 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#34 integrate .. //depot/projects/smpng/sys/i386/acpica/acpi_machdep.c#24 integrate .. //depot/projects/smpng/sys/i386/acpica/acpi_wakeup.c#35 integrate .. //depot/projects/smpng/sys/i386/acpica/madt.c#17 integrate .. //depot/projects/smpng/sys/i386/conf/XBOX#7 integrate .. //depot/projects/smpng/sys/i386/i386/identcpu.c#48 integrate .. //depot/projects/smpng/sys/i386/i386/machdep.c#115 integrate .. //depot/projects/smpng/sys/i386/i386/pmap.c#106 integrate .. //depot/projects/smpng/sys/i386/i386/tsc.c#10 integrate .. //depot/projects/smpng/sys/i386/include/pmap.h#31 integrate .. //depot/projects/smpng/sys/i386/isa/clock.c#48 integrate .. //depot/projects/smpng/sys/i386/linux/linux_sysvec.c#52 integrate .. //depot/projects/smpng/sys/ia64/include/pmap.h#24 integrate .. //depot/projects/smpng/sys/kern/Makefile#5 integrate .. //depot/projects/smpng/sys/kern/init_sysent.c#74 integrate .. //depot/projects/smpng/sys/kern/kern_resource.c#62 integrate .. //depot/projects/smpng/sys/kern/kern_tc.c#42 integrate .. //depot/projects/smpng/sys/kern/makesyscalls.sh#21 integrate .. //depot/projects/smpng/sys/kern/subr_bus.c#62 integrate .. //depot/projects/smpng/sys/kern/subr_rman.c#29 integrate .. //depot/projects/smpng/sys/kern/syscalls.c#74 integrate .. //depot/projects/smpng/sys/kern/systrace_args.c#1 branch .. //depot/projects/smpng/sys/kern/uipc_proto.c#7 delete .. //depot/projects/smpng/sys/kern/uipc_socket.c#91 integrate .. //depot/projects/smpng/sys/kern/uipc_syscalls.c#93 integrate .. //depot/projects/smpng/sys/kern/uipc_usrreq.c#66 integrate .. //depot/projects/smpng/sys/kern/vfs_bio.c#94 integrate .. //depot/projects/smpng/sys/kern/vfs_lookup.c#37 integrate .. //depot/projects/smpng/sys/kern/vfs_subr.c#132 integrate .. //depot/projects/smpng/sys/net/bpf.c#63 integrate .. //depot/projects/smpng/sys/net/if_faith.c#33 integrate .. //depot/projects/smpng/sys/net/if_gif.c#38 integrate .. //depot/projects/smpng/sys/net/if_gre.c#32 integrate .. //depot/projects/smpng/sys/net/if_stf.c#38 integrate .. //depot/projects/smpng/sys/net/if_tun.c#47 integrate .. //depot/projects/smpng/sys/net/if_var.h#45 integrate .. //depot/projects/smpng/sys/net/if_vlan.c#52 integrate .. //depot/projects/smpng/sys/net/net_osdep.h#14 delete .. //depot/projects/smpng/sys/net80211/ieee80211_input.c#31 integrate .. //depot/projects/smpng/sys/net80211/ieee80211_ioctl.c#28 integrate .. //depot/projects/smpng/sys/net80211/ieee80211_ioctl.h#13 integrate .. //depot/projects/smpng/sys/net80211/ieee80211_output.c#26 integrate .. //depot/projects/smpng/sys/netatalk/ddp_usrreq.c#27 integrate .. //depot/projects/smpng/sys/netgraph/ng_ether.c#33 integrate .. //depot/projects/smpng/sys/netgraph/ng_pppoe.c#30 integrate .. //depot/projects/smpng/sys/netgraph/ng_pppoe.h#13 integrate .. //depot/projects/smpng/sys/netinet/in_gif.c#19 integrate .. //depot/projects/smpng/sys/netinet/ip_encap.c#15 integrate .. //depot/projects/smpng/sys/netinet/ip_fw2.c#76 integrate .. //depot/projects/smpng/sys/netinet6/ah_aesxcbcmac.c#4 integrate .. //depot/projects/smpng/sys/netinet6/ah_core.c#11 integrate .. //depot/projects/smpng/sys/netinet6/ah_input.c#14 integrate .. //depot/projects/smpng/sys/netinet6/ah_output.c#7 integrate .. //depot/projects/smpng/sys/netinet6/esp_aesctr.c#4 integrate .. //depot/projects/smpng/sys/netinet6/esp_core.c#12 integrate .. //depot/projects/smpng/sys/netinet6/esp_input.c#19 integrate .. //depot/projects/smpng/sys/netinet6/esp_output.c#8 integrate .. //depot/projects/smpng/sys/netinet6/esp_rijndael.c#6 integrate .. //depot/projects/smpng/sys/netinet6/frag6.c#12 integrate .. //depot/projects/smpng/sys/netinet6/icmp6.c#34 integrate .. //depot/projects/smpng/sys/netinet6/in6.c#34 integrate .. //depot/projects/smpng/sys/netinet6/in6_cksum.c#11 integrate .. //depot/projects/smpng/sys/netinet6/in6_gif.c#14 integrate .. //depot/projects/smpng/sys/netinet6/in6_ifattach.c#18 integrate .. //depot/projects/smpng/sys/netinet6/in6_proto.c#15 integrate .. //depot/projects/smpng/sys/netinet6/in6_src.c#26 integrate .. //depot/projects/smpng/sys/netinet6/ip6_forward.c#18 integrate .. //depot/projects/smpng/sys/netinet6/ip6_input.c#45 integrate .. //depot/projects/smpng/sys/netinet6/ip6_mroute.c#26 integrate .. //depot/projects/smpng/sys/netinet6/ip6_output.c#47 integrate .. //depot/projects/smpng/sys/netinet6/ipcomp_core.c#8 integrate .. //depot/projects/smpng/sys/netinet6/ipcomp_input.c#8 integrate .. //depot/projects/smpng/sys/netinet6/ipcomp_output.c#7 integrate .. //depot/projects/smpng/sys/netinet6/ipsec.c#25 integrate .. //depot/projects/smpng/sys/netinet6/mld6.c#18 integrate .. //depot/projects/smpng/sys/netinet6/nd6.c#34 integrate .. //depot/projects/smpng/sys/netinet6/nd6_nbr.c#22 integrate .. //depot/projects/smpng/sys/netinet6/nd6_rtr.c#17 integrate .. //depot/projects/smpng/sys/netinet6/udp6_output.c#20 integrate .. //depot/projects/smpng/sys/netkey/key.c#33 integrate .. //depot/projects/smpng/sys/netkey/keydb.c#7 integrate .. //depot/projects/smpng/sys/netncp/ncp_sock.c#9 integrate .. //depot/projects/smpng/sys/netsmb/smb_trantcp.c#20 integrate .. //depot/projects/smpng/sys/nfsclient/nfs_bio.c#47 integrate .. //depot/projects/smpng/sys/nfsclient/nfs_vfsops.c#55 integrate .. //depot/projects/smpng/sys/pc98/include/md_var.h#2 integrate .. //depot/projects/smpng/sys/pc98/pc98/pc98_machdep.c#7 integrate .. //depot/projects/smpng/sys/pci/agp.c#27 integrate .. //depot/projects/smpng/sys/pci/ncr.c#21 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/machdep.c#69 integrate .. //depot/projects/smpng/sys/security/mac_biba/mac_biba.c#40 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/pmap.c#67 integrate .. //depot/projects/smpng/sys/sys/domain.h#9 integrate .. //depot/projects/smpng/sys/sys/mac_policy.h#37 integrate .. //depot/projects/smpng/sys/sys/param.h#103 integrate .. //depot/projects/smpng/sys/sys/stat.h#18 integrate .. //depot/projects/smpng/sys/sys/syscall.h#73 integrate .. //depot/projects/smpng/sys/sys/syscall.mk#73 integrate .. //depot/projects/smpng/sys/sys/sysent.h#21 integrate .. //depot/projects/smpng/sys/sys/sysproto.h#77 integrate .. //depot/projects/smpng/sys/sys/systm.h#72 integrate .. //depot/projects/smpng/sys/sys/time.h#21 integrate .. //depot/projects/smpng/sys/sys/types.h#32 integrate .. //depot/projects/smpng/sys/vm/device_pager.c#21 integrate .. //depot/projects/smpng/sys/vm/swap_pager.c#64 integrate .. //depot/projects/smpng/sys/vm/vm_fault.c#60 integrate .. //depot/projects/smpng/sys/vm/vm_object.c#84 integrate .. //depot/projects/smpng/sys/vm/vm_page.c#81 integrate .. //depot/projects/smpng/sys/vm/vm_page.h#33 integrate .. //depot/projects/smpng/sys/vm/vnode_pager.c#59 integrate Differences ... ==== //depot/projects/smpng/sys/Makefile#13 (text+ko) ==== @@ -1,13 +1,11 @@ -# $FreeBSD: src/sys/Makefile,v 1.37 2006/07/04 14:14:16 maxim Exp $ +# $FreeBSD: src/sys/Makefile,v 1.38 2006/08/10 06:29:43 imp Exp $ .include # The boot loader .if ${MK_BOOT} != "no" -.if ${MACHINE_ARCH} != "arm" SUBDIR= boot .endif -.endif # Directories to include in cscope name file and TAGS. CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \ ==== //depot/projects/smpng/sys/amd64/acpica/madt.c#11 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.20 2006/03/27 15:59:48 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.21 2006/08/11 19:22:55 jhb Exp $"); #include #include @@ -203,15 +203,15 @@ /* * Map in the RSDP. Since ACPI uses AcpiOsMapMemory() which in turn - * calls pmap_mapdev() to find the RSDP, we assume that we can use - * pmap_mapdev() to map the RSDP. + * calls pmap_mapbios() to find the RSDP, we assume that we can use + * pmap_mapbios() to map the RSDP. */ if (AcpiOsGetRootPointer(ACPI_LOGICAL_ADDRESSING, &rsdp_ptr) != AE_OK) return (ENXIO); #ifdef __i386__ KASSERT(rsdp_ptr.Pointer.Physical < KERNLOAD, ("RSDP too high")); #endif - rsdp = pmap_mapdev(rsdp_ptr.Pointer.Physical, sizeof(RSDP_DESCRIPTOR)); + rsdp = pmap_mapbios(rsdp_ptr.Pointer.Physical, sizeof(RSDP_DESCRIPTOR)); if (rsdp == NULL) { if (bootverbose) printf("MADT: Failed to map RSDP\n"); @@ -261,7 +261,7 @@ break; madt_unmap_table(rsdt); } - pmap_unmapdev((vm_offset_t)rsdp, sizeof(RSDP_DESCRIPTOR)); + pmap_unmapbios((vm_offset_t)rsdp, sizeof(RSDP_DESCRIPTOR)); if (madt_physaddr == 0) { if (bootverbose) printf("MADT: No MADT table found\n"); @@ -335,7 +335,7 @@ madt_setup_local(void) { - madt = pmap_mapdev(madt_physaddr, madt_length); + madt = pmap_mapbios(madt_physaddr, madt_length); lapic_init((uintptr_t)madt->LocalApicAddress); printf("ACPI APIC Table: <%.*s %.*s>\n", (int)sizeof(madt->OemId), madt->OemId, ==== //depot/projects/smpng/sys/amd64/amd64/pmap.c#66 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__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.570 2006/08/11 19:22:55 jhb Exp $"); /* * Manages physical address maps. @@ -665,6 +665,84 @@ * Low level helper routines..... ***************************************************/ +/* + * Determine the appropriate bits to set in a PTE or PDE for a specified + * caching mode. + */ +static int +pmap_cache_bits(int mode, boolean_t is_pde) +{ + int pat_flag, pat_index, cache_bits; + + /* The PAT bit is different for PTE's and PDE's. */ + pat_flag = is_pde ? PG_PDE_PAT : PG_PTE_PAT; + + /* If we don't support PAT, map extended modes to older ones. */ + if (!(cpu_feature & CPUID_PAT)) { + switch (mode) { + case PAT_UNCACHEABLE: + case PAT_WRITE_THROUGH: + case PAT_WRITE_BACK: + break; + case PAT_UNCACHED: + case PAT_WRITE_COMBINING: + case PAT_WRITE_PROTECTED: + mode = PAT_UNCACHEABLE; + break; + } + } + + /* Map the caching mode to a PAT index. */ + switch (mode) { +#ifdef PAT_WORKS + case PAT_UNCACHEABLE: + pat_index = 3; + break; + case PAT_WRITE_THROUGH: + pat_index = 1; + break; + case PAT_WRITE_BACK: + pat_index = 0; + break; + case PAT_UNCACHED: + pat_index = 2; + break; + case PAT_WRITE_COMBINING: + pat_index = 5; + break; + case PAT_WRITE_PROTECTED: + pat_index = 4; + break; +#else + case PAT_UNCACHED: + case PAT_UNCACHEABLE: + case PAT_WRITE_PROTECTED: + pat_index = 3; + break; + case PAT_WRITE_THROUGH: + pat_index = 1; + break; + case PAT_WRITE_BACK: + pat_index = 0; + break; + case PAT_WRITE_COMBINING: + pat_index = 2; + break; +#endif + default: + panic("Unknown caching mode %d\n", mode); + } + + /* Map the 3-bit index value into the PAT, PCD, and PWT bits. */ + cache_bits = 0; + if (pat_index & 0x4) + cache_bits |= pat_flag; + if (pat_index & 0x2) + cache_bits |= PG_NC_PCD; + if (pat_index & 0x1) + cache_bits |= PG_NC_PWT; + return (cache_bits); +} #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -962,6 +1040,15 @@ pte_store(pte, pa | PG_RW | PG_V | PG_G); } +PMAP_INLINE void +pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode) +{ + pt_entry_t *pte; + + pte = vtopte(va); + pte_store(pte, pa | PG_RW | PG_V | PG_G | pmap_cache_bits(mode, 0)); +} + /* * Remove a page from the kernel pagetables. * Note: not SMP coherent. @@ -2281,6 +2368,10 @@ if (pmap == kernel_pmap) newpte |= PG_G; + /* Preserve any caching attributes. */ + /* XXX: Should this be conditional on something? */ + newpte |= (origpte & (PG_PTE_PAT | PG_NC_PCD | PG_NC_PWT)); + /* * if the mapping or permission bits are different, we need * to update the pte. @@ -2506,7 +2597,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 +2615,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)) @@ -3102,6 +3192,46 @@ * Miscellaneous support routines follow */ +/* Adjust the cache mode for a 4KB page mapped via a PTE. */ +static __inline void +pmap_pte_attr(vm_offset_t va, int mode) +{ + pt_entry_t *pte; + u_int opte, npte; + + pte = vtopte(va); + + /* + * The cache mode bits are all in the low 32-bits of the + * PTE, so we can just spin on updating the low 32-bits. + */ + do { + opte = *(u_int *)pte; + npte = opte & ~(PG_PTE_PAT | PG_NC_PCD | PG_NC_PWT); + npte |= pmap_cache_bits(mode, 0); + } while (npte != opte && !atomic_cmpset_int((u_int *)pte, opte, npte)); +} + +/* Adjust the cache mode for a 2MB page mapped via a PDE. */ +static __inline void +pmap_pde_attr(vm_offset_t va, int mode) +{ + pd_entry_t *pde; + u_int opde, npde; + + pde = pmap_pde(kernel_pmap, va); + + /* + * The cache mode bits are all in the low 32-bits of the + * PDE, so we can just spin on updating the low 32-bits. + */ + do { + opde = *(u_int *)pde; + npde = opde & ~(PG_PDE_PAT | PG_NC_PCD | PG_NC_PWT); + npde |= pmap_cache_bits(mode, 1); + } while (npde != opde && !atomic_cmpset_int((u_int *)pde, opde, npde)); +} + /* * Map a set of physical memory pages into the kernel virtual * address space. Return a pointer to where it is mapped. This @@ -3109,12 +3239,15 @@ * NOT real memory. */ void * -pmap_mapdev(vm_paddr_t pa, vm_size_t size) +pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mode) { vm_offset_t va, tmpva, offset; - /* If this fits within the direct map window, use it */ - if (pa < dmaplimit && (pa + size) < dmaplimit) + /* + * If this fits within the direct map window and use WB caching + * mode, use the direct map. + */ + if (pa < dmaplimit && (pa + size) < dmaplimit && mode == PAT_WRITE_BACK) return ((void *)PHYS_TO_DMAP(pa)); offset = pa & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); @@ -3123,15 +3256,30 @@ panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); pa = trunc_page(pa); for (tmpva = va; size > 0; ) { - pmap_kenter(tmpva, pa); + pmap_kenter_attr(tmpva, pa, mode); size -= PAGE_SIZE; tmpva += PAGE_SIZE; pa += PAGE_SIZE; } pmap_invalidate_range(kernel_pmap, va, tmpva); + pmap_invalidate_cache(); return ((void *)(va + offset)); } +void * +pmap_mapdev(vm_paddr_t pa, vm_size_t size) +{ + + return (pmap_mapdev_attr(pa, size, PAT_UNCACHEABLE)); +} + +void * +pmap_mapbios(vm_paddr_t pa, vm_size_t size) +{ + + return (pmap_mapdev_attr(pa, size, PAT_WRITE_BACK)); +} + void pmap_unmapdev(vm_offset_t va, vm_size_t size) { @@ -3149,6 +3297,73 @@ kmem_free(kernel_map, base, size); } +int +pmap_change_attr(va, size, mode) + vm_offset_t va; + vm_size_t size; + int mode; +{ + vm_offset_t base, offset, tmpva; + pd_entry_t *pde; + pt_entry_t *pte; + + base = va & PG_FRAME; + offset = va & PAGE_MASK; + size = roundup(offset + size, PAGE_SIZE); + + /* Only supported on kernel virtual addresses. */ + if (base <= VM_MAXUSER_ADDRESS) + return (EINVAL); + + /* + * XXX: We have to support tearing 2MB pages down into 4k pages if + * needed here. + */ + /* Pages that aren't mapped aren't supported. */ + for (tmpva = base; tmpva < (base + size); ) { + pde = pmap_pde(kernel_pmap, tmpva); + if (*pde == 0) + return (EINVAL); + if (*pde & PG_PS) { + /* Handle 2MB pages that are completely contained. */ + if (size >= NBPDR) { + tmpva += NBPDR; + continue; + } + return (EINVAL); + } + pte = vtopte(va); + if (*pte == 0) + return (EINVAL); + tmpva += PAGE_SIZE; + } + + /* + * Ok, all the pages exist, so run through them updating their + * cache mode. + */ + for (tmpva = base; size > 0; ) { + pde = pmap_pde(kernel_pmap, tmpva); + if (*pde & PG_PS) { + pmap_pde_attr(tmpva, mode); + tmpva += NBPDR; + size -= NBPDR; + } else { + pmap_pte_attr(tmpva, mode); + tmpva += PAGE_SIZE; + size -= PAGE_SIZE; + } + } + + /* + * Flush CPU caches to make sure any data isn't cached that shouldn't + * be, etc. + */ + pmap_invalidate_range(kernel_pmap, base, tmpva); + pmap_invalidate_cache(); + return (0); +} + /* * perform the pmap work for mincore */ ==== //depot/projects/smpng/sys/amd64/amd64/trap.c#53 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.307 2006/07/28 20:22:57 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.308 2006/08/08 04:01:29 alc Exp $"); /* * AMD64 Trap and System call handling @@ -566,8 +566,14 @@ map = &vm->vm_map; } + /* + * PGEX_I is defined only if the execute disable bit capability is + * supported and enabled; otherwise, that bit is reserved, i.e., zero. + */ if (frame->tf_err & PGEX_W) ftype = VM_PROT_WRITE; + else if (frame->tf_err & PGEX_I) + ftype = VM_PROT_EXECUTE; else ftype = VM_PROT_READ; ==== //depot/projects/smpng/sys/amd64/include/pmap.h#24 (text+ko) ==== @@ -39,7 +39,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.133 2006/08/02 16:24:23 alc Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.134 2006/08/11 19:22:56 jhb Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -302,14 +302,19 @@ extern vm_offset_t virtual_end; #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) void pmap_bootstrap(vm_paddr_t *); +int pmap_change_attr(vm_offset_t, vm_size_t, int); void pmap_init_pat(void); void pmap_kenter(vm_offset_t va, vm_paddr_t pa); +void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); void *pmap_kenter_temporary(vm_paddr_t pa, int i); vm_paddr_t pmap_kextract(vm_offset_t); void pmap_kremove(vm_offset_t); +void *pmap_mapbios(vm_paddr_t, vm_size_t); void *pmap_mapdev(vm_paddr_t, vm_size_t); +void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, int); void pmap_unmapdev(vm_offset_t, vm_size_t); void pmap_invalidate_page(pmap_t, vm_offset_t); void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); ==== //depot/projects/smpng/sys/amd64/linux32/linux32_sysvec.c#17 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.18 2006/05/06 17:26:45 ambrisko Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.19 2006/08/10 22:05:25 netchild Exp $"); #include "opt_compat.h" #ifndef COMPAT_IA32 @@ -121,6 +121,10 @@ /* * Linux syscalls return negative errno's, we do positive and map them + * Reference: + * FreeBSD: src/sys/sys/errno.h + * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h + * linux-2.6.17.8/include/asm-generic/errno.h */ static int bsd_to_linux_errno[ELAST + 1] = { -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, @@ -131,7 +135,8 @@ -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75, -6, -84 + -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, + -72, -67, -71 }; int bsd_to_linux_signal[LINUX_SIGTBLSZ] = { ==== //depot/projects/smpng/sys/arm/arm/mem.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.2 2005/10/03 14:18:21 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.3 2006/08/08 20:59:38 cognet Exp $"); /* * Memory special file @@ -66,11 +66,6 @@ #include "opt_global.h" -#ifdef ARM_USE_SMALL_ALLOC -extern vm_offset_t alloc_curaddr; -extern vm_offset_t alloc_firstaddr; -#endif - /* * Used in /dev/mem drivers and elsewhere */ @@ -127,8 +122,8 @@ uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE)) #ifdef ARM_USE_SMALL_ALLOC - if (addr < alloc_firstaddr || addr > - alloc_curaddr) + if (addr <= VM_MAXUSER_ADDRESS || + addr >= KERNBASE) #endif return (EFAULT); error = uiomove((caddr_t)(int)uio->uio_offset, (int)c, uio); ==== //depot/projects/smpng/sys/arm/arm/pmap.c#33 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.67 2006/08/01 19:06:04 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.68 2006/08/08 20:59:38 cognet Exp $"); #include #include #include @@ -1129,7 +1129,7 @@ l2b = pmap_get_l2_bucket(pmap_kernel(), va); ptep = &l2b->l2b_kva[l2pte_index(va)]; pte = *ptep; - + if ((pte & L2_S_CACHE_MASK) != pte_l2_s_cache_mode_pt) { /* * Page tables must have the cache-mode set to @@ -1140,7 +1140,6 @@ cpu_tlb_flushD_SE(va); cpu_cpwait(); } - #ifdef ARM_USE_SMALL_ALLOC } #endif @@ -2384,8 +2383,6 @@ #define PMAP_STATIC_L2_SIZE 16 #ifdef ARM_USE_SMALL_ALLOC extern struct mtx smallalloc_mtx; -extern vm_offset_t alloc_curaddr; -extern vm_offset_t alloc_firstaddr; #endif void @@ -2544,9 +2541,9 @@ #ifdef ARM_USE_SMALL_ALLOC mtx_init(&smallalloc_mtx, "Small alloc page list", NULL, MTX_DEF); - alloc_firstaddr = alloc_curaddr = arm_nocache_startaddr + - ARM_NOCACHE_KVA_SIZE; + arm_init_smallalloc(); #endif + pmap_set_pcb_pagedir(kernel_pmap, thread0.td_pcb); } /*************************************************** @@ -2933,6 +2930,9 @@ vm_offset_t pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) { +#ifdef ARM_USE_SMALL_ALLOC + return (arm_ptovirt(start)); +#else vm_offset_t sva = *virt; vm_offset_t va = sva; @@ -2947,6 +2947,7 @@ } *virt = va; return (sva); +#endif } static void @@ -3488,7 +3489,7 @@ * is current */ PTE_SYNC(ptep); - if (L1_IDX(va) != L1_IDX(vector_page) && + if (L1_IDX(va) != L1_IDX(vector_page) && l2pte_valid(npte)) { /* * This mapping is likely to be accessed as @@ -3999,6 +4000,10 @@ void pmap_zero_page_generic(vm_paddr_t phys, int off, int size) { +#ifdef ARM_USE_SMALL_ALLOC + char *dstpg; +#endif + #ifdef DEBUG struct vm_page *pg = PHYS_TO_VM_PAGE(phys); @@ -4010,6 +4015,16 @@ _arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0) return; +#ifdef ARM_USE_SMALL_ALLOC + dstpg = (char *)arm_ptovirt(phys); + if (off || size != PAGE_SIZE) { + bzero(dstpg + off, size); + cpu_dcache_wbinv_range((vm_offset_t)(dstpg + off), size); + } else { + bzero_page((vm_offset_t)dstpg); + cpu_dcache_wbinv_range((vm_offset_t)dstpg, PAGE_SIZE); + } +#else mtx_lock(&cmtx); /* @@ -4021,12 +4036,15 @@ PTE_SYNC(cdst_pte); cpu_tlb_flushD_SE(cdstp); cpu_cpwait(); - if (off || size != PAGE_SIZE) + if (off || size != PAGE_SIZE) { bzero((void *)(cdstp + off), size); - else + cpu_dcache_wbinv_range(cdstp + off, size); + } else { bzero_page(cdstp); + cpu_dcache_wbinv_range(cdstp, PAGE_SIZE); + } mtx_unlock(&cmtx); - cpu_dcache_wbinv_range(cdstp, PAGE_SIZE); +#endif } #endif /* (ARM_MMU_GENERIC + ARM_MMU_SA1) != 0 */ @@ -4034,7 +4052,6 @@ void pmap_zero_page_xscale(vm_paddr_t phys, int off, int size) { - if (_arm_bzero && _arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0) return; @@ -4344,12 +4361,23 @@ void pmap_copy_page(vm_page_t src, vm_page_t dst) { +#ifdef ARM_USE_SMALL_ALLOC + vm_offset_t srcpg, dstpg; +#endif + cpu_dcache_wbinv_all(); if (_arm_memcpy && _arm_memcpy((void *)VM_PAGE_TO_PHYS(dst), (void *)VM_PAGE_TO_PHYS(src), PAGE_SIZE, IS_PHYSICAL) == 0) return; +#ifdef ARM_USE_SMALL_ALLOC + srcpg = arm_ptovirt(VM_PAGE_TO_PHYS(src)); + dstpg = arm_ptovirt(VM_PAGE_TO_PHYS(dst)); + bcopy_page(srcpg, dstpg); + cpu_dcache_wbinv_range(dstpg, PAGE_SIZE); +#else pmap_copy_page_func(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst)); +#endif } ==== //depot/projects/smpng/sys/arm/arm/vm_machdep.c#22 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.26 2006/07/15 23:15:31 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.27 2006/08/08 20:59:38 cognet Exp $"); #include #include @@ -66,6 +66,7 @@ #include #include #include +#include #include #include @@ -73,6 +74,7 @@ #define NSFBUFS (512 + maxusers * 16) #endif +#ifndef ARM_USE_SMALL_ALLOC static void sf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL) @@ -94,6 +96,7 @@ * A lock used to synchronize access to the hash table and free list */ static struct mtx sf_buf_lock; +#endif /* * Finish a fork operation, with process p2 nearly set up. @@ -161,6 +164,7 @@ void sf_buf_free(struct sf_buf *sf) { +#ifndef ARM_USE_SMALL_ALLOC mtx_lock(&sf_buf_lock); sf->ref_count--; if (sf->ref_count == 0) { @@ -170,11 +174,13 @@ wakeup_one(&sf_buf_freelist); } mtx_unlock(&sf_buf_lock); +#endif } +#ifndef ARM_USE_SMALL_ALLOC /* - * * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) - * */ + * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) + */ static void sf_buf_init(void *arg) { @@ -197,6 +203,7 @@ sf_buf_alloc_want = 0; mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); } +#endif /* * Get an sf_buf from the freelist. Will block if none are available. @@ -204,6 +211,9 @@ struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags) { +#ifdef ARM_USE_SMALL_ALLOC + return ((struct sf_buf *)m); +#else struct sf_head *hash_list; struct sf_buf *sf; int error; @@ -249,7 +259,7 @@ done: mtx_unlock(&sf_buf_lock); return (sf); - +#endif } /* @@ -446,10 +456,55 @@ MALLOC_DEFINE(M_VMSMALLALLOC, "vm_small_alloc", "VM Small alloc data"); -vm_offset_t alloc_curaddr; -vm_offset_t alloc_firstaddr; +static vm_offset_t alloc_firstaddr; + +vm_offset_t +arm_ptovirt(vm_paddr_t pa) +{ + int i; + vm_offset_t addr = alloc_firstaddr; + + KASSERT(alloc_firstaddr != 0, ("arm_ptovirt called to early ?")); + for (i = 0; dump_avail[i]; i += 2) { + if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) + break; + addr += (dump_avail[i + 1] & L1_S_FRAME) + L1_S_SIZE - + (dump_avail[i] & L1_S_FRAME); + } + KASSERT(dump_avail[i] != 0, ("Trying to access invalid physical address")); + return (addr + (pa - (dump_avail[i] & L1_S_FRAME))); +} >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Aug 11 21:12:15 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 F050616A4E1; Fri, 11 Aug 2006 21:12:14 +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 AA34E16A4DA for ; Fri, 11 Aug 2006 21:12:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35B8C43D45 for ; Fri, 11 Aug 2006 21:12:14 +0000 (GMT) (envelope-from jhb@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 k7BLCEtB024760 for ; Fri, 11 Aug 2006 21:12:14 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BLCE3B024757 for perforce@freebsd.org; Fri, 11 Aug 2006 21:12:14 GMT (envelope-from jhb@freebsd.org) Date: Fri, 11 Aug 2006 21:12:14 GMT Message-Id: <200608112112.k7BLCE3B024757@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 103665 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, 11 Aug 2006 21:12:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=103665 Change 103665 by jhb@jhb_mutex on 2006/08/11 21:11:46 Update. Affected files ... .. //depot/projects/smpng/sys/notes#93 edit .. //depot/user/jhb/acpipci/notes#183 edit Differences ... ==== //depot/projects/smpng/sys/notes#93 (text+ko) ==== @@ -74,9 +74,7 @@ version of the current WITNESS check that doesn't bog the system down quite as bad. - syscall fixes - - make nfssvc less hackish - + done - - untested + + make nfssvc less hackish - fix audit events for syscalls in modules + done - untested ==== //depot/user/jhb/acpipci/notes#183 (text+ko) ==== @@ -1,49 +1,11 @@ Todo: -- Ethernet locking notes: - - Use callout_*() rather than timeout() so you can use CALLOUT_MPSAFE. May - have to change the timeout routine (foo_tick) to return immediately if - IFF_RUNNING is clear. Actually, if you use callout_init_mtx() then - you don't have to add the IFF_RUNNING check. You do still need to add a - call to callout_drain() however to make sure that the driver lock is - not contested on in softclock() when you destroy it. - - Do not hold lock across ether_ioctl(), ifmedia_ioctl(), or ifp->if_input(). - - Ok to hold lock across BPF_MTAP(), ifmedia_add(), ifmedia_set(), and - m_freem(). - - Need to lock in ifp functions: start, init, watchdog; ifmedia functions: - status, change; miibus functions: readreg, writereg. Also need lock in - event handlers: foo_intr, foo_tick, and foo_poll. Most other functions - should just assert lock. - - Not 100% sure about the miibus_read/writereg stuff, need to figure out - when that is called and then determine the proper locking interactions - with miibus. - - Try just asserting locks in miibus methods and requiring the upper - levels to get it right instead. - - Added locking around mii_phy_probe(), this needs to be reverted and - the assertions need to be conditional so that they don't fire before - ether_ifattach() somehow. - - Rule is to assert locks in miibus routines once ether_ifattach() has - been called (if_input != NULL). - - if_capenable? - - if_timer? - - if_hwassist? - - if_mtu? -- Fixup locking in various network device drivers: - - nve - - lge - - PR 78072 -- Lock de(4) - - Try to handle the busted multiport card by using a custom pci-pci - bridge driver instead of the current hack inside of if_de. - - Need to handle slave list and root_unit stuff still. - - need to figure out locking for slave list for multiport cards - - locking for tulips[] array? +- lge PR 78072 - Stick NUM_ISA_IRQS in isavar.h? bde says icu.h (rename to atpic.h?) - fixup mptable.c - fixup pci_pir.c - fixup acpi_pci_link.c? - fixup atpic.c - fixup elcr.c -- Export PA's of APICs for vmware - Possibly add a pcibios_call() to i386/i386/bios.c that looks like: int pcibios_call(int function, struct bios_regs *args) and sets eax to function, and returns a success/failure @@ -51,8 +13,6 @@ - Possibly trim icu.h further. + Move stuff only used in atpic.c to atpic.c - ICU_IMR, should these move to dev/ic/i8259.h? -- Start a sys/x86 tree for shared code between i386 and amd64 - - atpic driver, maybe apic driver and intr_machdep.c code - Have suspend/resume operate on pics, not individual sources - Kill isa_irq_pending() (maybe, is this an MI function?) - Some machines support ACPI but have an MP Table w/o an MADT. If we use From owner-p4-projects@FreeBSD.ORG Fri Aug 11 22:47:25 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 3A12616A4E2; Fri, 11 Aug 2006 22:47:25 +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 EFE6216A4E0 for ; Fri, 11 Aug 2006 22:47:24 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CF0743D69 for ; Fri, 11 Aug 2006 22:47:15 +0000 (GMT) (envelope-from imp@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 k7BMlFHq041236 for ; Fri, 11 Aug 2006 22:47:15 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7BMlEHm041233 for perforce@freebsd.org; Fri, 11 Aug 2006 22:47:14 GMT (envelope-from imp@freebsd.org) Date: Fri, 11 Aug 2006 22:47:14 GMT Message-Id: <200608112247.k7BMlEHm041233@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103669 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, 11 Aug 2006 22:47:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=103669 Change 103669 by imp@imp_lighthouse on 2006/08/11 22:47:10 Apply the gnu-arm.diff patch to the arm-devel tree, so that it works out of the box! Affected files ... .. //depot/projects/arm/src/gnu/lib/libgcc/Makefile#2 edit .. //depot/projects/arm/src/gnu/lib/libstdc++/Makefile#2 edit .. //depot/projects/arm/src/gnu/usr.bin/Makefile#2 edit .. //depot/projects/arm/src/gnu/usr.bin/binutils/as/Makefile#2 edit .. //depot/projects/arm/src/gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h#1 add .. //depot/projects/arm/src/gnu/usr.bin/binutils/ld/Makefile.arm#2 edit .. //depot/projects/arm/src/gnu/usr.bin/binutils/ld/armelf_fbsd.sh#1 add .. //depot/projects/arm/src/gnu/usr.bin/binutils/ld/armelfb_fbsd.sh#1 add .. //depot/projects/arm/src/gnu/usr.bin/binutils/ld/genscripts.sh#2 edit .. //depot/projects/arm/src/gnu/usr.bin/binutils/libbfd/Makefile.arm#2 edit .. //depot/projects/arm/src/gnu/usr.bin/binutils/libiberty/Makefile#2 edit .. //depot/projects/arm/src/gnu/usr.bin/binutils/libiberty/config.h#2 edit .. //depot/projects/arm/src/gnu/usr.bin/cc/Makefile.inc#2 edit .. //depot/projects/arm/src/gnu/usr.bin/cc/arm.md.diff#1 add .. //depot/projects/arm/src/gnu/usr.bin/cc/cc_int/Makefile#2 edit .. //depot/projects/arm/src/gnu/usr.bin/cc/cc_tools/Makefile#2 edit .. //depot/projects/arm/src/gnu/usr.bin/cc/cc_tools/arm-freebsd.h.diff#1 add .. //depot/projects/arm/src/gnu/usr.bin/gdb/arch/arm/Makefile#1 add .. //depot/projects/arm/src/gnu/usr.bin/gdb/arch/arm/armfbsd-nat.c#1 add .. //depot/projects/arm/src/gnu/usr.bin/gdb/arch/arm/armfbsd-tdep.c#1 add .. //depot/projects/arm/src/gnu/usr.bin/gdb/arch/arm/config.h#1 add .. //depot/projects/arm/src/gnu/usr.bin/gdb/arch/arm/init.c#1 add .. //depot/projects/arm/src/gnu/usr.bin/gdb/arch/arm/nm-fbsd.h#1 add .. //depot/projects/arm/src/gnu/usr.bin/gdb/arch/arm/tm-fbsd.h#1 add .. //depot/projects/arm/src/gnu/usr.bin/gdb/arch/arm/xm-fbsd.h#1 add .. //depot/projects/arm/src/gnu/usr.bin/gdb/kgdb/trgt_arm.c#2 edit Differences ... ==== //depot/projects/arm/src/gnu/lib/libgcc/Makefile#2 (text+ko) ==== @@ -98,8 +98,11 @@ # from config/arm/t-strongarm-elf CFLAGS+= -Dinhibit_libc -fno-inline LIB1ASMSRC = lib1funcs.asm -LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func -OBJS+= dp-bit.o fp-bit.o +#LIB1ASMFUNCS = _dvmd_tls _bb_init_func _fixunsdfsi _addsubsf3 _addsubdf3 \ +# _truncdfsf2 _fixdfsi _extendsfdf2 _fixsfsi _cmpdf2 _cmpsf2 \ +# _muldivdf3 _muldivsf3 +#XXX +LIB1ASMFUNCS = _dvmd_tls _bb_init_func # We want fine grained libraries, so use the new code to build the # floating point emulation libraries. XXX fix this: NEED_FP_EMULATION set to "yes" with different rules per platform @@ -169,7 +172,7 @@ SYMS= ${LIB2FUNCS} \ ${LIB2_DIVMOD_FUNCS} -.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" +.if ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" SYMS+= ${FPBIT_FUNCS} ${DPBIT_FUNCS} .endif SYMS_ST= ${LIB2FUNCS_ST} \ ==== //depot/projects/arm/src/gnu/lib/libstdc++/Makefile#2 (text+ko) ==== @@ -174,6 +174,10 @@ TARGETHDRSNAME_new_allocator_base.h= c++allocator.h TARGETHDRSDIR= ${CXXINCLUDEDIR}/bits +.if ${MACHINE_ARCH} == "arm" +CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 +.endif + MARCHHDRS= atomic_word.h .for h in ${MARCHHDRS} .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h}) ==== //depot/projects/arm/src/gnu/usr.bin/Makefile#2 (text+ko) ==== @@ -24,7 +24,7 @@ sort \ ${_texinfo} -.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" MK_GDB= no # not yet .endif ==== //depot/projects/arm/src/gnu/usr.bin/binutils/as/Makefile#2 (text+ko) ==== @@ -35,6 +35,11 @@ .else CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\" .endif + +.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) +CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1 +.endif + CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\" CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\" CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\" ==== //depot/projects/arm/src/gnu/usr.bin/binutils/ld/Makefile.arm#2 (text+ko) ==== @@ -1,12 +1,17 @@ # $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.arm,v 1.1 2006/07/22 14:36:15 obrien Exp $ -NATIVE_EMULATION= armelf_fbsd +.if defined(ARM_BIG_ENDIAN) +NATIVE_EMULATION= armelfb_fbsd +.else +NATIVE_EMULATION= armelf_fbsd +.endif SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c -e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ +e${NATIVE_EMULATION}.c: ${.CURDIR}/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ - ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} + ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} \ + ${.CURDIR}/${NATIVE_EMULATION}.sh ==== //depot/projects/arm/src/gnu/usr.bin/binutils/ld/genscripts.sh#2 (text+ko) ==== @@ -37,7 +37,12 @@ # FSF BU ver 2.15 which allows for a more generic emulparams processing. # To reduce the diff, I also include the ${EMULATION_NAME} parameter in uses # of 'CUSTOMIZER_SCRIPT'. + +# XXX: arm hack : until those file are merged back into the FSF repo, just +# use the version in this directory. +if !(test -f ${CUSTOMIZER_SCRIPT}"";) then CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${EMULATION_NAME}.sh" +fi # Include the emulation-specific parameters: . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME} ==== //depot/projects/arm/src/gnu/usr.bin/binutils/libbfd/Makefile.arm#2 (text+ko) ==== @@ -1,14 +1,52 @@ # $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile.arm,v 1.2 2006/07/22 14:55:55 obrien Exp $ +.if defined(ARM_BIG_ENDIAN) +DEFAULT_VECTOR= bfd_elf32_bigarm_vec +ADDITIONAL_VECTOR= bfd_elf32_littlearm_vec +.else DEFAULT_VECTOR= bfd_elf32_littlearm_vec +ADDITIONAL_VECTOR= bfd_elf32_bigarm_vec +.endif -SRCS+= cpu-arm.c \ - elf32.c \ +SRCS+= \ + cpu-arm.c \ + elf32.c \ elf32-arm-fbsd.c \ - elf32-gen.c \ - elf32-target.h - elfarm-nabi.c \ - elflink.c + elf32-gen.c \ + elf32-target.h \ + elflink.c +VECS+= ${DEFAULT_VECTOR} \ + ${ADDITIONAL_VECTOR} + +.if ${TARGET_ARCH} == "arm" +CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} +.endif + +CLEANFILES+= elf32-arm-fbsd.c + +# +# XXX: We should really add the FreeBSD case in elf32_arm_nabi_grok_prstatus +# instead of defining our own elf32_fbsd_arm_grok_prstatus. +# +elf32-arm-fbsd.c: elfarm-nabi.c + cat ${.ALLSRC} | sed -e s/ELFOSABI_ARM/ELFOSABI_FREEBSD/g \ + -e "s/\(.*#define.*\)elf32_arm_nabi_grok_prstatus/\1elf32_fbsd_arm_grok_prstatus/" -e s/"#include.*elf32-arm.h.*//" >${.TARGET}; \ + echo '\ + static bfd_boolean elf32_fbsd_arm_grok_prstatus(bfd *abfd, Elf_Internal_Note *note) \ + { \ + size_t raw_size; \ + int offset; \ + if (note->descsz != 96) \ + return (FALSE); \ + offset = 28; \ + raw_size = 68; \ + if (elf_tdata(abfd)->core_signal == 0) \ + elf_tdata (abfd)->core_signal = ((int *)(note->descdata))[5]; \ + elf_tdata (abfd)->core_pid = ((int *)(note->descdata))[6]; \ + /* Make a ".reg/999" section. */ \ + return _bfd_elfcore_make_pseudosection (abfd, ".reg", \ + raw_size, note->descpos + offset); \ +}' >> ${.TARGET}; \ + echo '#include "elf32-arm.h"' >> ${.TARGET} -VECS= ${DEFAULT_VECTOR} \ - bfd_elf32_bigarm_vec + ==== //depot/projects/arm/src/gnu/usr.bin/binutils/libiberty/Makefile#2 (text+ko) ==== @@ -18,4 +18,8 @@ CFLAGS+= -DHAVE_CONFIG_H INTERNALLIB= +.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) +CFLAGS+= -DARM_BIG_ENDIAN +.endif + .include ==== //depot/projects/arm/src/gnu/usr.bin/binutils/libiberty/config.h#2 (text+ko) ==== @@ -7,7 +7,7 @@ /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ -#ifdef __sparc64__ +#if defined(__sparc64__) || defined(__ARMEB__) #define BYTEORDER 4321 #else #define BYTEORDER 1234 @@ -325,7 +325,7 @@ /* Define if the host machine stores words of multi-word integers in big-endian order. */ -#ifdef __sparc64__ +#if defined(__sparc64__) || defined(__ARMEB__) #define HOST_WORDS_BIG_ENDIAN 1 #endif ==== //depot/projects/arm/src/gnu/usr.bin/cc/Makefile.inc#2 (text+ko) ==== @@ -11,7 +11,11 @@ .include "Makefile.tgt" # Machine description. +.if ${TARGET_ARCH} == "arm" +MD_FILE= ${.OBJDIR}/arm-diked.md +.else MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md +.endif target= ${TARGET_ARCH}-undermydesk-freebsd CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H @@ -47,3 +51,17 @@ .endif .endif # !__CC_MAKEFILE_INC__ +.if ${TARGET_ARCH} == "arm" +CLEANFILES+= arm-diked.md ${GCC_CPU}.md.orig fpa.md cirrus.md iwmmxt.md +.endif + +.if ${TARGET_ARCH} == "arm" +${.OBJDIR}/arm-diked.md: + cp ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md . +#XXX: Those are not patched but are included by arm.md + cp ${GCCDIR}/config/${GCC_CPU}/fpa.md . + cp ${GCCDIR}/config/${GCC_CPU}/cirrus.md . + cp ${GCCDIR}/config/${GCC_CPU}/iwmmxt.md . + patch ${GCC_CPU}.md ${.CURDIR}/../arm.md.diff + mv ${GCC_CPU}.md ${.TARGET} +.endif ==== //depot/projects/arm/src/gnu/usr.bin/cc/cc_int/Makefile#2 (text+ko) ==== @@ -80,6 +80,10 @@ CFLAGS+= -DHAVE_CONFIG_H CFLAGS+= -DTARGET_NAME=\"${target}\" -DIN_GCC +.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) +CFLAGS += -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END +.endif + # c-pch.o needs extra defines. Replicate the rule here rather than # pollute compiler command line for all other files. c-pch.o: c-pch.c ==== //depot/projects/arm/src/gnu/usr.bin/cc/cc_tools/Makefile#2 (text+ko) ==== @@ -216,7 +216,9 @@ .if ${TARGET_ARCH} == "amd64" TARGET_INC= i386/biarch64.h .endif +.if ${TARGET_ARCH} != "arm" TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h +.endif .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/unix.h TARGET_INC+= ${GCC_CPU}/att.h @@ -236,7 +238,19 @@ TARGET_INC+= ${GCC_CPU}/sysv4.h .endif .endif +.if ${TARGET_ARCH} == "arm" +TARGET_INC+= ${GCC_CPU}/elf.h +TARGET_INC+= ${GCC_CPU}/aout.h +TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h +. if defined(ARM_BIG_ENDIAN) +CFLAGS+= -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END +. endif +.endif +.if ${TARGET_ARCH} == "arm" +TARGET_INC+= freebsd-diked.h +.else TARGET_INC+= ${GCC_CPU}/freebsd.h +.endif .if ${TARGET_ARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/x86-64.h TARGET_INC+= ${GCC_CPU}/freebsd64.h @@ -334,6 +348,10 @@ gtyp-gen.h GENSRCS+= ${COMMONHDRS} +.if ${TARGET_ARCH} == "arm" +GENSRCS+= freebsd-diked.h +.endif + MFILE?= ${.CURDIR}/Makefile ${COMMONHDRS}: ${MFILE} @@ -389,7 +407,11 @@ config.h: bconfig.h echo '#include ' > ${.TARGET} +.if ${TARGET_ARCH} == "arm" +tm.h: freebsd-diked.h +.else tm.h: +.endif echo '#ifndef GCC_TM_H' > ${.TARGET} echo '#define GCC_TM_H' >> ${.TARGET} .if defined(TARGET_CPU_DEFAULT) @@ -458,12 +480,23 @@ gcov-iov.h: echo "#define GCOV_VERSION ((gcov_unsigned_t)0x33303470)" >> ${.TARGET} +.if ${TARGET_ARCH} == "arm" +freebsd-diked.h: + cp ${GCCDIR}/config/arm/freebsd.h freebsd.h + patch freebsd.h ${GCCDIR}/../../gnu/usr.bin/cc/cc_tools/arm-freebsd.h.diff + mv freebsd.h ${.TARGET} +.endif + #----------------------------------------------------------------------- # General things. SRCS+= ${GENSRCS} CLEANFILES+= ${GENSRCS} +.if ${TARGET_ARCH} == "arm" +CLEANFILES+= freebsd.h.orig +.endif + all: ${SRCS} .include ==== //depot/projects/arm/src/gnu/usr.bin/gdb/kgdb/trgt_arm.c#2 (text+ko) ==== @@ -28,8 +28,11 @@ __FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_arm.c,v 1.1 2006/07/22 15:27:18 obrien Exp $"); #include +#ifndef CROSS_DEBUGGER #include #include +#include +#endif #include #include #include @@ -47,6 +50,7 @@ void kgdb_trgt_fetch_registers(int regno __unused) { +#ifndef CROSS_DEBUGGER struct kthr *kt; struct pcb pcb; int i, reg; @@ -76,6 +80,7 @@ else supply_register(ARM_PC_REGNUM, (char *)®); } +#endif } void @@ -84,6 +89,7 @@ fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__); } +#ifndef CROSS_DEBUGGER struct kgdb_frame_cache { CORE_ADDR fp; CORE_ADDR sp; @@ -130,6 +136,8 @@ return (cache); } +static int is_undef; + static void kgdb_trgt_trapframe_this_id(struct frame_info *next_frame, void **this_cache, struct frame_id *this_id) @@ -148,6 +156,7 @@ char dummy_valuep[MAX_REGISTER_SIZE]; struct kgdb_frame_cache *cache; int ofs, regsz; + int is_undefined = 0; regsz = register_size(current_gdbarch, regnum); @@ -165,9 +174,24 @@ return; cache = kgdb_trgt_frame_cache(next_frame, this_cache); + + if (is_undef && (regnum == ARM_SP_REGNUM || regnum == ARM_PC_REGNUM)) { + *addrp = cache->sp + offsetof(struct trapframe, tf_spsr); + target_read_memory(*addrp, valuep, regsz); + is_undefined = 1; + ofs = kgdb_trgt_frame_offset[ARM_SP_REGNUM]; + + } *addrp = cache->sp + ofs; *lvalp = lval_memory; target_read_memory(*addrp, valuep, regsz); + + if (is_undefined) { + *addrp = *(unsigned int *)valuep + (regnum == ARM_SP_REGNUM ? + 0 : 8); + target_read_memory(*addrp, valuep, regsz); + + } } static const struct frame_unwind kgdb_trgt_trapframe_unwind = { @@ -175,22 +199,34 @@ &kgdb_trgt_trapframe_this_id, &kgdb_trgt_trapframe_prev_register }; +#endif const struct frame_unwind * kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame) { +#ifndef CROSS_DEBUGGER char *pname; CORE_ADDR pc; pc = frame_pc_unwind(next_frame); pname = NULL; find_pc_partial_function(pc, &pname, NULL, NULL); - if (pname == NULL) + if (pname == NULL) { + is_undef = 0; return (NULL); + } + if (!strcmp(pname, "undefinedinstruction")) + is_undef = 1; if (strcmp(pname, "Laddress_exception_entry") == 0 || strcmp(pname, "undefined_entry") == 0 || strcmp(pname, "exception_exit") == 0 || + strcmp(pname, "Laddress_exception_msg") == 0 || strcmp(pname, "irq_entry") == 0) return (&kgdb_trgt_trapframe_unwind); + if (!strcmp(pname, "undefinedinstruction")) + is_undef = 1; + else + is_undef = 0; +#endif return (NULL); } From owner-p4-projects@FreeBSD.ORG Sat Aug 12 09:51:36 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 6EF5D16A4E0; Sat, 12 Aug 2006 09:51: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 2F2B116A4DA for ; Sat, 12 Aug 2006 09:51:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC78543D46 for ; Sat, 12 Aug 2006 09:51:35 +0000 (GMT) (envelope-from imp@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 k7C9pZN1010617 for ; Sat, 12 Aug 2006 09:51:35 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7C9pXfE010614 for perforce@freebsd.org; Sat, 12 Aug 2006 09:51:33 GMT (envelope-from imp@freebsd.org) Date: Sat, 12 Aug 2006 09:51:33 GMT Message-Id: <200608120951.k7C9pXfE010614@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103695 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: Sat, 12 Aug 2006 09:51:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=103695 Change 103695 by imp@imp_paco-paco on 2006/08/12 09:51:02 IFC @103694 Affected files ... .. //depot/projects/arm/src/ObsoleteFiles.inc#3 integrate .. //depot/projects/arm/src/contrib/smbfs/smbutil/print.c#2 integrate .. //depot/projects/arm/src/contrib/smbfs/smbutil/view.c#2 integrate .. //depot/projects/arm/src/gnu/usr.bin/binutils/libbfd/Makefile.arm#3 integrate .. //depot/projects/arm/src/lib/libc/gen/msgctl.3#2 integrate .. //depot/projects/arm/src/lib/libc/stdlib/malloc.c#4 integrate .. //depot/projects/arm/src/lib/libdisk/write_ia64_disk.c#2 integrate .. //depot/projects/arm/src/lib/libpam/modules/pam_lastlog/pam_lastlog.c#2 integrate .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#4 integrate .. //depot/projects/arm/src/sbin/geom/class/eli/geli.8#2 integrate .. //depot/projects/arm/src/sbin/geom/class/eli/geom_eli.c#3 integrate .. //depot/projects/arm/src/sbin/ifconfig/ifieee80211.c#3 integrate .. //depot/projects/arm/src/share/examples/drivers/make_pseudo_driver.sh#2 integrate .. //depot/projects/arm/src/share/man/man4/acpi.4#4 integrate .. //depot/projects/arm/src/share/man/man4/ng_pppoe.4#3 integrate .. //depot/projects/arm/src/share/man/man4/vlan.4#2 integrate .. //depot/projects/arm/src/share/mk/bsd.sys.mk#2 integrate .. //depot/projects/arm/src/sys/Makefile#8 integrate .. //depot/projects/arm/src/sys/amd64/acpica/madt.c#5 integrate .. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#23 integrate .. //depot/projects/arm/src/sys/amd64/include/pmap.h#8 integrate .. //depot/projects/arm/src/sys/amd64/linux32/linux32_sysvec.c#7 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_st.c#14 integrate .. //depot/projects/arm/src/sys/boot/Makefile#5 integrate .. //depot/projects/arm/src/sys/boot/arm/Makefile#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#19 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#17 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.S#6 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#13 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#17 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200.h#5 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#7 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.c#7 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#25 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#9 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#16 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#7 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#6 integrate .. //depot/projects/arm/src/sys/dev/acpica/Osd/OsdMemory.c#3 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_hpet.c#3 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_video.c#5 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#22 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-disk.c#8 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-pci.h#13 integrate .. //depot/projects/arm/src/sys/dev/ath/if_ath.c#17 integrate .. //depot/projects/arm/src/sys/dev/ath/if_athioctl.h#7 integrate .. //depot/projects/arm/src/sys/dev/em/if_em.c#22 integrate .. //depot/projects/arm/src/sys/dev/em/if_em_hw.c#8 integrate .. //depot/projects/arm/src/sys/dev/em/if_em_hw.h#7 integrate .. //depot/projects/arm/src/sys/dev/exca/excareg.h#2 integrate .. //depot/projects/arm/src/sys/dev/hme/if_hme.c#6 integrate .. //depot/projects/arm/src/sys/dev/mii/rgephy.c#6 integrate .. //depot/projects/arm/src/sys/dev/pccbb/pccbb.c#14 integrate .. //depot/projects/arm/src/sys/dev/pccbb/pccbb_pci.c#8 integrate .. //depot/projects/arm/src/sys/dev/pccbb/pccbbreg.h#5 integrate .. //depot/projects/arm/src/sys/dev/sk/if_sk.c#7 integrate .. //depot/projects/arm/src/sys/dev/stge/if_stge.c#2 integrate .. //depot/projects/arm/src/sys/dev/ti/if_ti.c#5 integrate .. //depot/projects/arm/src/sys/geom/eli/g_eli.c#12 integrate .. //depot/projects/arm/src/sys/geom/eli/g_eli.h#5 integrate .. //depot/projects/arm/src/sys/geom/eli/g_eli_ctl.c#5 integrate .. //depot/projects/arm/src/sys/geom/geom_gpt.c#8 integrate .. //depot/projects/arm/src/sys/i386/acpica/acpi_machdep.c#5 integrate .. //depot/projects/arm/src/sys/i386/acpica/madt.c#5 integrate .. //depot/projects/arm/src/sys/i386/conf/XBOX#7 integrate .. //depot/projects/arm/src/sys/i386/i386/machdep.c#16 integrate .. //depot/projects/arm/src/sys/i386/i386/pmap.c#20 integrate .. //depot/projects/arm/src/sys/i386/include/pmap.h#5 integrate .. //depot/projects/arm/src/sys/i386/isa/clock.c#6 integrate .. //depot/projects/arm/src/sys/i386/linux/linux_sysvec.c#7 integrate .. //depot/projects/arm/src/sys/ia64/include/pmap.h#4 integrate .. //depot/projects/arm/src/sys/kern/uipc_socket.c#20 integrate .. //depot/projects/arm/src/sys/kern/vfs_subr.c#23 integrate .. //depot/projects/arm/src/sys/net/if_vlan.c#15 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_input.c#10 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_ioctl.c#11 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_ioctl.h#7 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_output.c#9 integrate .. //depot/projects/arm/src/sys/netgraph/ng_pppoe.c#6 integrate .. //depot/projects/arm/src/sys/netinet/tcp_input.c#15 integrate .. //depot/projects/arm/src/sys/netinet/tcp_subr.c#9 integrate .. //depot/projects/arm/src/sys/netinet/tcp_timer.c#7 integrate .. //depot/projects/arm/src/sys/netinet/tcp_timer.h#3 integrate .. //depot/projects/arm/src/sys/pc98/include/md_var.h#2 integrate .. //depot/projects/arm/src/sys/pc98/pc98/pc98_machdep.c#4 integrate .. //depot/projects/arm/src/sys/pci/agp.c#5 integrate .. //depot/projects/arm/src/sys/pci/if_xl.c#6 integrate .. //depot/projects/arm/src/sys/vm/device_pager.c#3 integrate .. //depot/projects/arm/src/sys/vm/vm_page.c#16 integrate .. //depot/projects/arm/src/tools/tools/ath/athstats/Makefile#2 integrate .. //depot/projects/arm/src/tools/tools/ath/athstats/athstats.c#3 integrate .. //depot/projects/arm/src/tools/tools/ath/athstats/athstats.h#1 branch .. //depot/projects/arm/src/tools/tools/ath/athstats/main.c#1 branch .. //depot/projects/arm/src/tools/tools/ath/athstats/statfoo.c#1 branch .. //depot/projects/arm/src/tools/tools/ath/athstats/statfoo.h#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wlanstats/Makefile#2 integrate .. //depot/projects/arm/src/tools/tools/net80211/wlanstats/main.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wlanstats/statfoo.c#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wlanstats/statfoo.h#1 branch .. //depot/projects/arm/src/tools/tools/net80211/wlanstats/wlanstats.c#2 integrate .. //depot/projects/arm/src/tools/tools/net80211/wlanstats/wlanstats.h#1 branch .. //depot/projects/arm/src/usr.bin/hexdump/parse.c#2 integrate .. //depot/projects/arm/src/usr.bin/split/split.1#3 integrate .. //depot/projects/arm/src/usr.bin/split/split.c#3 integrate .. //depot/projects/arm/src/usr.sbin/pkg_install/lib/url.c#2 integrate .. //depot/projects/arm/src/usr.sbin/rpc.lockd/lockd_lock.c#2 integrate .. //depot/projects/arm/src/usr.sbin/rpc.statd/procs.c#2 integrate Differences ... ==== //depot/projects/arm/src/ObsoleteFiles.inc#3 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.42 2006/08/04 21:29:22 brooks Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.46 2006/08/11 22:02:16 ru Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -745,6 +745,7 @@ OLD_FILES+=usr/bin/perlcc OLD_FILES+=usr/bin/perldoc OLD_FILES+=usr/bin/suidperl +OLD_FILES+=usr/lib/pam_ftp.so OLD_FILES+=usr/libdata/perl/5.00503/CGI/Apache.pm OLD_FILES+=usr/libdata/perl/5.00503/CGI/Carp.pm OLD_FILES+=usr/libdata/perl/5.00503/CGI/Cookie.pm @@ -2726,7 +2727,201 @@ OLD_FILES+=usr/games/worm OLD_FILES+=usr/games/worms OLD_FILES+=usr/games/wump +OLD_FILES+=sbin/mount_reiserfs +OLD_FILES+=usr/bin/hesinfo +OLD_FILES+=usr/share/examples/etc/usbd.conf +OLD_FILES+=usr/share/examples/meteor/README +OLD_FILES+=usr/share/examples/meteor/rgb16.c +OLD_FILES+=usr/share/examples/meteor/rgb24.c +OLD_FILES+=usr/share/examples/meteor/test-n.c +OLD_FILES+=usr/share/examples/meteor/yuvpk.c +OLD_FILES+=usr/share/examples/meteor/yuvpl.c +OLD_FILES+=usr/share/examples/worm/README +OLD_FILES+=usr/share/examples/worm/makecdfs.sh +OLD_FILES+=usr/share/groff_font/devlj4/Makefile +OLD_FILES+=usr/share/groff_font/devlj4/text.map +OLD_FILES+=usr/share/groff_font/devlj4/special.map +OLD_FILES+=usr/share/misc/nslookup.help +OLD_FILES+=usr/share/sendmail/cf/feature/nodns.m4 +OLD_FILES+=usr/share/syscons/keymaps/lat-amer.kbd +OLD_FILES+=usr/share/vi/catalog/ru_SU.KOI8-R +OLD_FILES+=usr/share/zoneinfo/Africa/Timbuktu +OLD_FILES+=usr/share/zoneinfo/America/Buenos_Aires +OLD_FILES+=usr/share/zoneinfo/America/Cordoba +OLD_FILES+=usr/share/zoneinfo/America/Jujuy +OLD_FILES+=usr/share/zoneinfo/America/Catamarca +OLD_FILES+=usr/share/zoneinfo/America/Mendoza +OLD_FILES+=usr/share/zoneinfo/America/Indianapolis +OLD_FILES+=usr/share/zoneinfo/America/Louisville +OLD_FILES+=usr/share/zoneinfo/America/Argentina/ComodRivadavia +OLD_FILES+=usr/share/zoneinfo/Europe/Belfast +OLD_FILES+=usr/share/zoneinfo/Pacific/Yap +OLD_FILES+=usr/share/zoneinfo/SystemV/YST9 +OLD_FILES+=usr/share/zoneinfo/SystemV/PST8 +OLD_FILES+=usr/share/zoneinfo/SystemV/EST5EDT +OLD_FILES+=usr/share/zoneinfo/SystemV/CST6CDT +OLD_FILES+=usr/share/zoneinfo/SystemV/MST7MDT +OLD_FILES+=usr/share/zoneinfo/SystemV/PST8PDT +OLD_FILES+=usr/share/zoneinfo/SystemV/YST9YDT +OLD_FILES+=usr/share/zoneinfo/SystemV/HST10 +OLD_FILES+=usr/share/zoneinfo/SystemV/MST7 +OLD_FILES+=usr/share/zoneinfo/SystemV/EST5 +OLD_FILES+=usr/share/zoneinfo/SystemV/AST4ADT +OLD_FILES+=usr/share/zoneinfo/SystemV/CST6 +OLD_FILES+=usr/share/zoneinfo/SystemV/AST4 +OLD_FILES+=usr/share/doc/ntp/accopt.htm +OLD_FILES+=usr/share/doc/ntp/assoc.htm +OLD_FILES+=usr/share/doc/ntp/audio.htm +OLD_FILES+=usr/share/doc/ntp/authopt.htm +OLD_FILES+=usr/share/doc/ntp/biblio.htm +OLD_FILES+=usr/share/doc/ntp/build.htm +OLD_FILES+=usr/share/doc/ntp/clockopt.htm +OLD_FILES+=usr/share/doc/ntp/config.htm +OLD_FILES+=usr/share/doc/ntp/confopt.htm +OLD_FILES+=usr/share/doc/ntp/copyright.htm +OLD_FILES+=usr/share/doc/ntp/debug.htm +OLD_FILES+=usr/share/doc/ntp/driver1.htm +OLD_FILES+=usr/share/doc/ntp/driver10.htm +OLD_FILES+=usr/share/doc/ntp/driver11.htm +OLD_FILES+=usr/share/doc/ntp/driver12.htm +OLD_FILES+=usr/share/doc/ntp/driver16.htm +OLD_FILES+=usr/share/doc/ntp/driver18.htm +OLD_FILES+=usr/share/doc/ntp/driver19.htm +OLD_FILES+=usr/share/doc/ntp/driver2.htm +OLD_FILES+=usr/share/doc/ntp/driver20.htm +OLD_FILES+=usr/share/doc/ntp/driver22.htm +OLD_FILES+=usr/share/doc/ntp/driver23.htm +OLD_FILES+=usr/share/doc/ntp/driver24.htm +OLD_FILES+=usr/share/doc/ntp/driver26.htm +OLD_FILES+=usr/share/doc/ntp/driver27.htm +OLD_FILES+=usr/share/doc/ntp/driver28.htm +OLD_FILES+=usr/share/doc/ntp/driver29.htm +OLD_FILES+=usr/share/doc/ntp/driver3.htm +OLD_FILES+=usr/share/doc/ntp/driver30.htm +OLD_FILES+=usr/share/doc/ntp/driver32.htm +OLD_FILES+=usr/share/doc/ntp/driver33.htm +OLD_FILES+=usr/share/doc/ntp/driver34.htm +OLD_FILES+=usr/share/doc/ntp/driver35.htm +OLD_FILES+=usr/share/doc/ntp/driver36.htm +OLD_FILES+=usr/share/doc/ntp/driver37.htm +OLD_FILES+=usr/share/doc/ntp/driver4.htm +OLD_FILES+=usr/share/doc/ntp/driver5.htm +OLD_FILES+=usr/share/doc/ntp/driver6.htm +OLD_FILES+=usr/share/doc/ntp/driver7.htm +OLD_FILES+=usr/share/doc/ntp/driver8.htm +OLD_FILES+=usr/share/doc/ntp/driver9.htm +OLD_FILES+=usr/share/doc/ntp/exec.htm +OLD_FILES+=usr/share/doc/ntp/extern.htm +OLD_FILES+=usr/share/doc/ntp/gadget.htm +OLD_FILES+=usr/share/doc/ntp/hints.htm +OLD_FILES+=usr/share/doc/ntp/howto.htm +OLD_FILES+=usr/share/doc/ntp/htmlprimer.htm +OLD_FILES+=usr/share/doc/ntp/index.htm +OLD_FILES+=usr/share/doc/ntp/kern.htm +OLD_FILES+=usr/share/doc/ntp/kernpps.htm +OLD_FILES+=usr/share/doc/ntp/ldisc.htm +OLD_FILES+=usr/share/doc/ntp/measure.htm +OLD_FILES+=usr/share/doc/ntp/miscopt.htm +OLD_FILES+=usr/share/doc/ntp/monopt.htm +OLD_FILES+=usr/share/doc/ntp/mx4200data.htm +OLD_FILES+=usr/share/doc/ntp/notes.htm +OLD_FILES+=usr/share/doc/ntp/ntpd.htm +OLD_FILES+=usr/share/doc/ntp/ntpdate.htm +OLD_FILES+=usr/share/doc/ntp/ntpdc.htm +OLD_FILES+=usr/share/doc/ntp/ntpq.htm +OLD_FILES+=usr/share/doc/ntp/ntptime.htm +OLD_FILES+=usr/share/doc/ntp/ntptrace.htm +OLD_FILES+=usr/share/doc/ntp/parsedata.htm +OLD_FILES+=usr/share/doc/ntp/parsenew.htm +OLD_FILES+=usr/share/doc/ntp/patches.htm +OLD_FILES+=usr/share/doc/ntp/porting.htm +OLD_FILES+=usr/share/doc/ntp/pps.htm +OLD_FILES+=usr/share/doc/ntp/prefer.htm +OLD_FILES+=usr/share/doc/ntp/qth.htm +OLD_FILES+=usr/share/doc/ntp/quick.htm +OLD_FILES+=usr/share/doc/ntp/rdebug.htm +OLD_FILES+=usr/share/doc/ntp/refclock.htm +OLD_FILES+=usr/share/doc/ntp/release.htm +OLD_FILES+=usr/share/doc/ntp/tickadj.htm +OLD_FILES+=usr/share/doc/papers/nqnfs.ascii.gz +OLD_FILES+=usr/share/doc/papers/px.ascii.gz +OLD_FILES+=usr/share/man/man1/hesinfo.1.gz +OLD_FILES+=usr/share/man/man3/mbrune.3.gz +OLD_FILES+=usr/share/man/man3/rune.3.gz +OLD_FILES+=usr/share/man/man3/hesiod.3.gz +OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz +OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz +OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz +OLD_FILES+=usr/share/man/man3/gss_krb5_compat_des3_mic.3.gz +OLD_FILES+=usr/share/man/man3/exp10f.3.gz +OLD_FILES+=usr/share/man/man3/exp10.3.gz +OLD_FILES+=usr/share/man/man3/mbrrune.3.gz +OLD_FILES+=usr/share/man/man3/mbmb.3.gz +OLD_FILES+=usr/share/man/man3/sputrune.3.gz +OLD_FILES+=usr/share/man/man3/sgetrune.3.gz +OLD_FILES+=usr/share/man/man3/setrunelocale.3.gz +OLD_FILES+=usr/share/man/man3/setinvalidrune.3.gz +OLD_FILES+=usr/share/man/man3/mbrune.3.gz +OLD_FILES+=usr/share/man/man3/rune.3.gz +OLD_FILES+=usr/share/man/man3/hesiod.3.gz +OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz +OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz +OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz +OLD_FILES+=usr/share/man/man3/gss_krb5_compat_des3_mic.3.gz +OLD_FILES+=usr/share/man/man3/exp10f.3.gz +OLD_FILES+=usr/share/man/man3/exp10.3.gz +OLD_FILES+=usr/share/man/man3/mbrrune.3.gz +OLD_FILES+=usr/share/man/man3/mbmb.3.gz +OLD_FILES+=usr/share/man/man3/sputrune.3.gz +OLD_FILES+=usr/share/man/man3/sgetrune.3.gz +OLD_FILES+=usr/share/man/man3/setrunelocale.3.gz +OLD_FILES+=usr/share/man/man3/setinvalidrune.3.gz +OLD_FILES+=usr/share/man/man3/fungetrune.3.gz +OLD_FILES+=usr/share/man/man3/fputrune.3.gz +OLD_FILES+=usr/share/man/man3/fgetrune.3.gz +OLD_FILES+=usr/share/man/man5/hesiod.conf.5.gz +OLD_FILES+=usr/share/man/man5/usbd.conf.5.gz +.if ${TARGET_ARCH} != "i386" +OLD_FILES+=usr/share/man/man8/boot_i386.8.gz +.endif +OLD_FILES+=usr/share/man/man8/ofwdump.8.gz +OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz +OLD_FILES+=usr/share/man/man9/VFS_START.9.gz +OLD_FILES+=usr/share/man/man9/cpu_critical_exit.9.gz +OLD_FILES+=usr/share/man/man9/cpu_critical_enter.9.gz +OLD_FILES+=usr/share/info/annotate.info.gz +OLD_FILES+=usr/share/info/tar.info.gz +OLD_FILES+=usr/share/bsnmp/defs/tree.def +OLD_FILES+=usr/share/bsnmp/defs/mibII_tree.def +OLD_FILES+=usr/share/bsnmp/defs/netgraph_tree.def +OLD_FILES+=usr/share/bsnmp/mibs/FOKUS-MIB.txt +OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-MIB.txt +OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-SNMPD.txt +OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-NETGRAPH.txt +OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.x +OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xbn +OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xn +OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xr +OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xs +OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xu +OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xc +OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xsc +OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.x +OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xbn +OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xn +OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xr +OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xs +OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xu +OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xc +OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xsc +OLD_FILES+=usr/libdata/msdosfs/iso22dos +OLD_FILES+=usr/libdata/msdosfs/iso72dos +OLD_FILES+=usr/libdata/msdosfs/koi2dos +OLD_FILES+=usr/libdata/msdosfs/koi8u2dos +# 20060729: OpenSSL 0.9.7e -> 0.9.8b upgrade +OLD_LIBS+=lib/libcrypto.so.4 +OLD_LIBS+=usr/lib/libssl.so.4 # 20060521: gethostbyaddr(3) ABI change OLD_LIBS+=usr/lib/libroken.so.8 OLD_LIBS+=lib/libatm.so.3 @@ -2950,7 +3145,14 @@ # 199909XX OLD_LIBS+=usr/lib/libc_r.so.3 # ??? +OLD_LIBS+=usr/lib/libarchive.so.2 +OLD_LIBS+=usr/lib/libbsnmp.so.1 +OLD_LIBS+=usr/lib/libc_r.so.6 +OLD_LIBS+=usr/lib/libcipher.so.2 OLD_LIBS+=usr/lib/libgssapi.so.6 +OLD_LIBS+=usr/lib/libkse.so.1 +OLD_LIBS+=usr/lib/liblwres.so.3 +OLD_LIBS+=usr/lib/pam_ftp.so.2 # 20040925: bind9 import OLD_DIRS+=usr/share/doc/bind/html ==== //depot/projects/arm/src/contrib/smbfs/smbutil/print.c#2 (text+ko) ==== @@ -31,6 +31,10 @@ * * $Id: print.c,v 1.4 2001/01/28 07:35:01 bp Exp $ */ + +#include +__FBSDID("$FreeBSD: src/contrib/smbfs/smbutil/print.c,v 1.2 2006/08/11 12:35:22 keramida Exp $"); + #include #include #include @@ -145,7 +149,7 @@ print_usage(void) { printf( - "usage: smbutil print [connection optinons] //user@server/share\n" + "usage: smbutil print [connection options] //user@server/share\n" ); exit(1); } ==== //depot/projects/arm/src/contrib/smbfs/smbutil/view.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/contrib/smbfs/smbutil/view.c,v 1.2 2005/09/19 08:07:18 imura Exp $"); +__FBSDID("$FreeBSD: src/contrib/smbfs/smbutil/view.c,v 1.3 2006/08/11 12:35:22 keramida Exp $"); #include #include @@ -133,7 +133,7 @@ view_usage(void) { printf( - "usage: smbutil view [connection optinons] //[user@]server\n" + "usage: smbutil view [connection options] //[user@]server\n" ); exit(1); } ==== //depot/projects/arm/src/gnu/usr.bin/binutils/libbfd/Makefile.arm#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile.arm,v 1.2 2006/07/22 14:55:55 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile.arm,v 1.3 2006/08/10 16:39:55 obrien Exp $ .if defined(ARM_BIG_ENDIAN) DEFAULT_VECTOR= bfd_elf32_bigarm_vec ==== //depot/projects/arm/src/lib/libc/gen/msgctl.3#2 (text+ko) ==== @@ -29,7 +29,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/gen/msgctl.3,v 1.19 2003/09/08 19:57:14 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/msgctl.3,v 1.20 2006/08/09 18:05:44 maxim Exp $ .\"/ .Dd November 24, 1997 .Dt MSGCTL 3 @@ -83,7 +83,7 @@ The .Vt ipc_perm structure used inside the -.Vt shmid_ds +.Vt msqid_ds structure is defined in .In sys/ipc.h and looks like this: ==== //depot/projects/arm/src/lib/libc/stdlib/malloc.c#4 (text+ko) ==== @@ -185,7 +185,7 @@ #endif #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.132 2006/07/27 19:09:32 jasone Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.133 2006/08/09 19:01:27 marcel Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -279,6 +279,7 @@ # define QUANTUM_2POW_MIN 4 # define SIZEOF_PTR 4 # define USE_BRK +# define NO_TLS #endif /* sizeof(int) == (1 << SIZEOF_INT_2POW). */ ==== //depot/projects/arm/src/lib/libdisk/write_ia64_disk.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libdisk/write_ia64_disk.c,v 1.15 2004/01/30 20:52:54 marcel Exp $"); +__FBSDID("$FreeBSD: src/lib/libdisk/write_ia64_disk.c,v 1.16 2006/08/09 20:19:15 marcel Exp $"); #include #include @@ -123,6 +123,8 @@ error = 0; nsects = disk->media_size / disk->sector_size; + nsects--; /* The GPT starts at LBA 1 */ + buffer = calloc(disk->sector_size, 1); if (buffer == NULL) return (ENOMEM); ==== //depot/projects/arm/src/lib/libpam/modules/pam_lastlog/pam_lastlog.c#2 (text+ko) ==== @@ -42,7 +42,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_lastlog/pam_lastlog.c,v 1.20 2004/01/26 19:28:37 des Exp $"); +__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_lastlog/pam_lastlog.c,v 1.21 2006/08/11 17:03:33 des Exp $"); #define _BSD_SOURCE @@ -87,12 +87,17 @@ PAM_LOG("Got user: %s", user); pam_err = pam_get_item(pamh, PAM_RHOST, &rhost); - if (pam_err != PAM_SUCCESS) + if (pam_err != PAM_SUCCESS) { + PAM_LOG("No PAM_RHOST"); goto err; + } pam_err = pam_get_item(pamh, PAM_TTY, &tty); - if (pam_err != PAM_SUCCESS) + if (pam_err != PAM_SUCCESS) { + PAM_LOG("No PAM_TTY"); goto err; + } if (tty == NULL) { + PAM_LOG("No PAM_TTY"); pam_err = PAM_SERVICE_ERR; goto err; } @@ -102,8 +107,10 @@ return (PAM_SERVICE_ERR); fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0644); - if (fd == -1) + if (fd == -1) { + PAM_LOG("Failed to open %s", _PATH_LASTLOG); goto file_err; + } /* * Record session in lastlog(5). ==== //depot/projects/arm/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#4 (text+ko) ==== @@ -3,7 +3,7 @@ The &os; Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.959 2006/07/31 16:49:25 brueffer Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.960 2006/08/11 12:32:43 brueffer Exp $ 2000 @@ -579,8 +579,9 @@ architectures such as sparc64. &merged; The &man.em.4; driver has been updated to - version 5.1.5 from Intel. Among other changes, it now supports - 82571 and 82572 based adapters. + version 6.1.4 from Intel. Among other changes, it now supports + 80003, 82571, 82571EB and 82572 based adapters, as well as + onboard-NICs on ICH8-based motherboards. The &man.em.4; driver now includes initial support for suspend and resume features. @@ -645,7 +646,7 @@ The &man.stge.4; driver has been added. It supports the Sundance/Tamarack TC9021 Gigabit Ethernet controller and was - ported from NetBSD. + ported from NetBSD. &merged; The &man.ti.4; driver now supports big-endian architectures such as sparc64. ==== //depot/projects/arm/src/sbin/geom/class/eli/geli.8#2 (text+ko) ==== @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.13 2006/06/06 19:03:51 brueffer Exp $ +.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.17 2006/08/10 01:13:38 maxim Exp $ .\" -.Dd June 5, 2006 +.Dd August 9, 2006 .Dt GELI 8 .Os .Sh NAME @@ -64,7 +64,7 @@ .Cm init .Nm .Cm attach -.Op Fl dpv +.Op Fl dprv .Op Fl k Ar keyfile .Ar prov .Nm @@ -163,7 +163,7 @@ passphrase before the root file system is mounted. .It The passphrase of the user is strengthened with: -.Rs +.Rs .%A B. Kaliski .%T "PKCS #5: Password-Based Cryptography Specification, Version 2.0." .%R RFC @@ -175,7 +175,7 @@ and .Qq "company key" ) . .It -It is fast - +It is fast - .Nm performs simple sector-to-sector encryption. .It @@ -288,6 +288,9 @@ option for the .Cm detach subcommand. +.It Fl r +Attach read-only provider. +It will not be opened for writing. .It Fl k Ar keyfile Specifies a file which contains part of the key. For more information see the description of the ==== //depot/projects/arm/src/sbin/geom/class/eli/geom_eli.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004 Pawel Jakub Dawidek + * Copyright (c) 2004-2006 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/class/eli/geom_eli.c,v 1.13 2006/08/07 20:09:09 pjd Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/class/eli/geom_eli.c,v 1.14 2006/08/09 18:11:13 pjd Exp $"); #include #include @@ -78,7 +78,7 @@ * * init [-bhPv] [-a aalgo] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] prov * label - alias for 'init' - * attach [-dpv] [-k keyfile] prov + * attach [-dprv] [-k keyfile] prov * detach [-fl] prov ... * stop - alias for 'detach' * onetime [-d] [-a aalgo] [-e ealgo] [-l keylen] prov ... @@ -124,9 +124,10 @@ { 'd', "detach", NULL, G_TYPE_NONE }, { 'k', "keyfile", keyfile, G_TYPE_STRING }, { 'p', "nopassphrase", NULL, G_TYPE_NONE }, + { 'r', "readonly", NULL, G_TYPE_NONE }, G_OPT_SENTINEL }, - "[-dpv] [-k keyfile] prov" + "[-dprv] [-k keyfile] prov" }, { "detach", 0, NULL, { ==== //depot/projects/arm/src/sbin/ifconfig/ifieee80211.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.39 2006/07/26 03:08:45 sam Exp $ + * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.40 2006/08/10 06:06:13 sam Exp $ */ /*- @@ -974,19 +974,36 @@ list_scan(s); } +static enum ieee80211_opmode get80211opmode(int s); + static void list_stations(int s) { - uint8_t buf[24*1024]; + union { + struct ieee80211req_sta_req req; + uint8_t buf[24*1024]; + } u; + enum ieee80211_opmode opmode = get80211opmode(s); struct ieee80211req ireq; uint8_t *cp; int len; (void) memset(&ireq, 0, sizeof(ireq)); (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); + /* broadcast address =>'s get all stations */ + (void) memset(u.req.is_u.macaddr, 0xff, IEEE80211_ADDR_LEN); + if (opmode == IEEE80211_M_STA) { + /* + * Get information about the associated AP. + */ + ireq.i_type = IEEE80211_IOC_BSSID; + ireq.i_data = u.req.is_u.macaddr; + ireq.i_len = IEEE80211_ADDR_LEN; + (void) ioctl(s, SIOCG80211, &ireq); + } ireq.i_type = IEEE80211_IOC_STA_INFO; - ireq.i_data = buf; - ireq.i_len = sizeof(buf); + ireq.i_data = &u; + ireq.i_len = sizeof(u); if (ioctl(s, SIOCG80211, &ireq) < 0) errx(1, "unable to get station information"); len = ireq.i_len; @@ -1005,12 +1022,14 @@ , "CAPS" , "FLAG" ); - cp = buf; + cp = (uint8_t *) u.req.info; do { struct ieee80211req_sta_info *si; uint8_t *vp; si = (struct ieee80211req_sta_info *) cp; + if (si->isi_len < sizeof(*si)) + break; vp = (u_int8_t *)(si+1); printf("%s %4u %4d %3dM %4d %4d %6d %6d %-4.4s %-4.4s" , ether_ntoa((const struct ether_addr*) si->isi_macaddr) ==== //depot/projects/arm/src/share/examples/drivers/make_pseudo_driver.sh#2 (text+ko) ==== @@ -1,42 +1,123 @@ #!/bin/sh # This writes a skeleton driver and puts it into the kernel tree for you -#arg1 is lowercase "foo" +# +# arg1 is lowercase "foo" +# arg2 path to the kernel sources, "/sys" if omitted # # Trust me, RUN THIS SCRIPT :) # -# $FreeBSD: src/share/examples/drivers/make_pseudo_driver.sh,v 1.10 2005/03/09 12:29:07 stefanf Exp $ +# $FreeBSD: src/share/examples/drivers/make_pseudo_driver.sh,v 1.12 2006/08/09 21:23:42 rik Exp $ # #-------cut here------------------ -cd /sys/i386/conf if [ "${1}X" = "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 + +for i in "" "conf" "i386" "i386/conf" "dev" "sys" "modules" +do + if [ -d ${TOP}/${i} ] + then + continue + fi + echo "${TOP}/${i}: no such directory." + echo "Please, correct the error and try again." + exit 1 +done UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"` -cat >files.${UPPER} <${TOP}/conf/files.${UPPER} <${UPPER} <${TOP}/i386/conf/${UPPER} <>${UPPER} +ident ${UPPER} -cat >>${UPPER} <../../dev/${1}.c <${TOP}/dev/${1}/${1}.c < #include #include /* SYSINIT stuff */ +#include /* SYSINIT stuff */ #include /* cdevsw stuff */ -#include /* DEVFS definitions */ #include /* malloc region definitions */ #include #include /* ${1} IOCTL definitions */ #include /* DELAY() */ -#include "${1}.h" /* generated file.. defines N${UPPER} */ +#define N${UPPER} 3 /* defines number of instances */ + +/* XXX These should be defined in terms of bus-space ops. */ +#define ${UPPER}_INB(port) inb(port) +#define ${UPPER}_OUTB(port, val) (port, (val)) /* Function prototypes (these should all be static) */ static d_open_t ${1}open; @@ -68,20 +153,15 @@ #define CDEV_MAJOR 20 static struct cdevsw ${1}_cdevsw = { - ${1}open, - ${1}close, - ${1}read, - ${1}write, - ${1}ioctl, - nullstop, - nullreset, - nodevtotty, - ${1}poll, - ${1}mmap, - NULL, - "${1}", - NULL, - -1 + .d_version = D_VERSION, + .d_open = ${1}open, + .d_close = ${1}close, + .d_read = ${1}read, + .d_write = ${1}write, + .d_ioctl = ${1}ioctl, + .d_poll = ${1}poll, + .d_mmap = ${1}mmap, + .d_name = "${1}", }; /* @@ -94,9 +174,9 @@ * One of these per allocated device */ struct ${1}_softc { - struct isa_device *dev; + u_long iobase; char buffer[BUFFERSIZE]; - static void *devfs_token; + struct cdev *dev; }; typedef struct ${1}_softc *sc_p; @@ -129,7 +209,7 @@ #endif /* DIAGNOSTIC */ static int -${1}ioctl (dev_t dev, int 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) { int unit = UNIT(dev); sc_p scp = sca[unit]; @@ -139,7 +219,10 @@ switch (cmd) { case DHIOCRESET: /* whatever resets it */ - outb(scp->dev->id_iobase, 0xff); + (void)scp; /* Delete this line after using scp. */ +#if 0 + ${UPPER}_OUTB(scp->iobase, 0xff); +#endif break; default: return ENXIO; @@ -152,13 +235,14 @@ * 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) { int unit = UNIT(dev); sc_p scp = sca[unit]; CHECKUNIT(ENXIO); + (void)scp; /* Delete this line after using scp. */ /* * Do processing */ @@ -166,13 +250,14 @@ } 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) { int unit = UNIT(dev); sc_p scp = sca[unit]; CHECKUNIT_DIAG(ENXIO); + (void)scp; /* Delete this line after using scp. */ /* * Do processing */ @@ -180,7 +265,7 @@ } static int -${1}read(dev_t dev, struct uio *uio, int ioflag) +${1}read(struct cdev *dev, struct uio *uio, int ioflag) { int unit = UNIT(dev); sc_p scp = sca[unit]; @@ -198,7 +283,7 @@ } static int -${1}write(dev_t dev, struct uio *uio, int ioflag) +${1}write(struct cdev *dev, struct uio *uio, int ioflag) { int unit = UNIT(dev); sc_p scp = sca[unit]; @@ -215,13 +300,14 @@ } static int -${1}mmap(dev_t dev, int offset, int nprot) +${1}mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { int unit = UNIT(dev); sc_p scp = sca[unit]; CHECKUNIT_DIAG(-1); + (void)scp; /* Delete this line after using scp. */ /* * Do processing */ @@ -236,13 +322,14 @@ } static int -${1}poll(dev_t dev, int which, struct thread *td) +${1}poll(struct cdev *dev, int which, struct thread *td) >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Aug 12 10:31:28 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 D5CF016A4E0; Sat, 12 Aug 2006 10:31:27 +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 956D116A4DD for ; Sat, 12 Aug 2006 10:31:27 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BBD743D46 for ; Sat, 12 Aug 2006 10:31:27 +0000 (GMT) (envelope-from rdivacky@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 k7CAVRa0013673 for ; Sat, 12 Aug 2006 10:31:27 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CAVQvH013670 for perforce@freebsd.org; Sat, 12 Aug 2006 10:31:26 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sat, 12 Aug 2006 10:31:26 GMT Message-Id: <200608121031.k7CAVQvH013670@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103698 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: Sat, 12 Aug 2006 10:31:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=103698 Change 103698 by rdivacky@rdivacky_witten on 2006/08/12 10:31:23 o remove SLIST of linux processes emuldata and use proc->p_emuldata instead o change locking to use sx (because its sleepable) so we are LOR-less o split locking of shared->threads and p->p_emuldata o change em_find() prototype to take proc instead of pid Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#9 edit .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_signal.c#4 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux.h#15 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#40 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_sysvec.c#14 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#9 (text+ko) ==== @@ -93,8 +93,8 @@ #define BSD_TO_LINUX_SIGNAL(sig) \ (((sig) <= LINUX_SIGTBLSZ) ? bsd_to_linux_signal[_SIG_IDX(sig)] : sig) -struct linux_emuldata *em_find(pid_t pid, int locked); -extern struct rwlock emul_lock; +extern struct sx emul_shared_lock; +extern struct sx emul_lock; static unsigned int linux_to_bsd_resource[LINUX_RLIM_NLIMITS] = { RLIMIT_CPU, RLIMIT_FSIZE, RLIMIT_DATA, RLIMIT_STACK, @@ -1335,7 +1335,7 @@ { struct linux_emuldata *em; - em = em_find(td->td_proc->p_pid, EMUL_UNLOCKED); + em = em_find(td->td_proc, EMUL_UNLOCKED); if (em == NULL) { #ifdef DEBUG @@ -1345,7 +1345,7 @@ } td->td_retval[0] = em->shared->group_pid; - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); return (0); } @@ -1355,7 +1355,7 @@ struct linux_emuldata *em; struct proc *p, *pp; - em = em_find(td->td_proc->p_pid, EMUL_UNLOCKED); + em = em_find(td->td_proc, EMUL_UNLOCKED); if (em == NULL) { #ifdef DEBUG @@ -1380,7 +1380,7 @@ /* if its also linux process */ if (pp->p_sysent == &elf_linux_sysvec) { - em = em_find(pp->p_pid, EMUL_LOCKED); + em = em_find(pp, EMUL_LOCKED); if (em == NULL) { #ifdef DEBUG printf(LMSG("emuldata for parent process not found in getppid.\n")); @@ -1392,7 +1392,7 @@ } else td->td_retval[0] = pp->p_pid; - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); PROC_UNLOCK(pp); return (0); ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_signal.c#4 (text+ko) ==== @@ -50,8 +50,8 @@ #include #include -struct linux_emuldata *em_find(pid_t pid, int locked); -extern struct rwlock emul_lock; +extern struct sx emul_shared_lock; +extern struct sx emul_lock; void linux_to_bsd_sigset(l_sigset_t *lss, sigset_t *bss) @@ -477,7 +477,7 @@ PROC_UNLOCK(p); - em = em_find(args->pid, EMUL_UNLOCKED); + em = em_find(p, EMUL_UNLOCKED); if (em == NULL) { #ifdef DEBUG @@ -489,7 +489,7 @@ if (em->shared->group_pid != args->tgid) return ESRCH; - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); return linux_kill(td, &ka); } ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux.h#15 (text+ko) ==== @@ -34,7 +34,8 @@ #include /* for sigval union */ #include #include -#include +#include +#include #include @@ -798,15 +799,18 @@ struct linux_emuldata_shared *shared; - SLIST_ENTRY(linux_emuldata) emuldatas; - LIST_ENTRY(linux_emuldata) threads; /* list of linux threads */ }; -#define EMUL_RLOCK(l) rw_rlock(l) -#define EMUL_RUNLOCK(l) rw_runlock(l) -#define EMUL_WLOCK(l) rw_wlock(l) -#define EMUL_WUNLOCK(l) rw_wunlock(l) +struct linux_emuldata *em_find(struct proc *, int locked); + +#define EMUL_LOCK(l) sx_xlock(l) +#define EMUL_UNLOCK(l) sx_xunlock(l) + +#define EMUL_SHARED_RLOCK(l) sx_slock(l) +#define EMUL_SHARED_RUNLOCK(l) sx_sunlock(l) +#define EMUL_SHARED_WLOCK(l) sx_xlock(l) +#define EMUL_SHARED_WUNLOCK(l) sx_xunlock(l) /* for em_find use */ #define EMUL_LOCKED 1 ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#40 (text+ko) ==== @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -64,16 +65,13 @@ #include /* needed for pcb definition in linux_set_thread_area */ -SLIST_HEAD(emuldata_head, linux_emuldata) emuldata_head = - SLIST_HEAD_INITIALIZER(emuldata_head); -struct linux_emuldata *emuldata_headp; /* where we store the emulation data */ -struct rwlock emul_lock; - static int linux_proc_init(struct thread *, pid_t, int); void linux_proc_exit(void *, struct proc *); void linux_schedtail(void *, struct proc *); void linux_proc_exec(void *, struct proc *, struct image_params *); -struct linux_emuldata *em_find(pid_t pid, int locked); + +struct sx emul_shared_lock; +struct sx emul_lock; extern struct sysentvec elf32_freebsd_sysvec; /* defined in i386/i386/elf_machdep.c */ @@ -294,19 +292,17 @@ /* this returns locked reference to the emuldata entry (if found) */ struct linux_emuldata * -em_find(pid_t pid, int locked) +em_find(struct proc *p, int locked) { struct linux_emuldata *em; if (locked == EMUL_UNLOCKED) - EMUL_RLOCK(&emul_lock); + EMUL_LOCK(&emul_lock); - SLIST_FOREACH(em, &emuldata_head, emuldatas) - if (em->pid == pid) - break; + em = p->p_emuldata; if (em == NULL && locked == EMUL_UNLOCKED) - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); return (em); } @@ -425,17 +421,17 @@ /* create the emuldata */ error = linux_proc_init(td, p2->p_pid, args->flags); /* reference it - no need to check this */ - em = em_find(p2->p_pid, EMUL_UNLOCKED); + em = em_find(p2, EMUL_UNLOCKED); KASSERT(em != NULL, ("no emuldata after proc_init()!\n")); /* and adjust it */ if (args->flags & CLONE_PARENT_SETTID) { if (args->parent_tidptr == NULL) { - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); return (EINVAL); } error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid)); if (error) { - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); return (error); } } @@ -459,7 +455,7 @@ em->child_clear_tid = args->child_tidptr; else em->child_clear_tid = NULL; - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); PROC_LOCK(p2); p2->p_sigparent = exit_signal; @@ -1179,11 +1175,14 @@ LIST_INIT(&s->threads); } - EMUL_WLOCK(&emul_lock); - SLIST_INSERT_HEAD(&emuldata_head, em, emuldatas); + p = pfind(child); + if (p == NULL) + panic("process not found in proc_init\n"); + p->p_emuldata = em; + PROC_UNLOCK(p); } else { /* lookup the old one */ - em = em_find(td->td_proc->p_pid, EMUL_UNLOCKED); + em = em_find(td->td_proc, EMUL_UNLOCKED); /* XXX: this might be turned into KASSERT once its tested enough */ if (em == NULL) { /* this should not happen */ @@ -1204,7 +1203,7 @@ if (child != 0) { if (flags & CLONE_VM) { /* lookup the parent */ - p_em = em_find(td->td_proc->p_pid, EMUL_LOCKED); + p_em = em_find(td->td_proc, EMUL_LOCKED); if (p_em == NULL) { #ifdef DEBUG #endif @@ -1221,15 +1220,16 @@ if (child != 0) { + EMUL_SHARED_WLOCK(&emul_shared_lock); LIST_INSERT_HEAD(&em->shared->threads, em, threads); - EMUL_WUNLOCK(&emul_lock); + EMUL_SHARED_WUNLOCK(&emul_shared_lock); p = pfind(child); PROC_UNLOCK(p); /* we might have a sleeping linux_schedtail */ wakeup(&p->p_emuldata); } else - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); return (0); } @@ -1246,7 +1246,7 @@ return; /* find the emuldata */ - em = em_find(p->p_pid, EMUL_UNLOCKED); + em = em_find(p, EMUL_UNLOCKED); if (em == NULL) { #ifdef DEBUG @@ -1257,19 +1257,19 @@ child_clear_tid = em->child_clear_tid; - EMUL_RUNLOCK(&emul_lock); - /* XXX: there is a race but I think we can ommit that - * because its not very possible that the same process - * will exit on different cpus etc. - */ - EMUL_WLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); + + EMUL_SHARED_WLOCK(&emul_shared_lock); LIST_REMOVE(em, threads); - SLIST_REMOVE(&emuldata_head, em, linux_emuldata, emuldatas); + + PROC_LOCK(p); + p->p_emuldata = NULL; + PROC_UNLOCK(p); em->shared->refs--; if (em->shared->refs == 0) FREE(em->shared, M_LINUX); - EMUL_WUNLOCK(&emul_lock); + EMUL_SHARED_WUNLOCK(&emul_shared_lock); if (child_clear_tid != NULL) { struct linux_sys_futex_args cup; @@ -1277,10 +1277,8 @@ /* XXX: doesnt futex use the addr? */ error = copyout(&null, child_clear_tid, sizeof(null)); - if (error) { - EMUL_RUNLOCK(&emul_lock); + if (error) return; - } /* futexes stuff */ cup.uaddr = child_clear_tid; @@ -1311,7 +1309,7 @@ && p->p_sysent == &elf_linux_sysvec)) { struct linux_emuldata *em; - em = em_find(p->p_pid, EMUL_UNLOCKED); + em = em_find(p, EMUL_UNLOCKED); if (em == NULL) { #ifdef DEBUG @@ -1321,19 +1319,19 @@ return; } - EMUL_RUNLOCK(&emul_lock); - /* XXX: there is a race but I think we can ommit that - * because its not very possible that the same process - * will exit on different cpus etc. - */ - EMUL_WLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); + + EMUL_SHARED_WLOCK(&emul_shared_lock); LIST_REMOVE(em, threads); - SLIST_REMOVE(&emuldata_head, em, linux_emuldata, emuldatas); + + PROC_LOCK(p); + p->p_emuldata = NULL; + PROC_UNLOCK(p); em->shared->refs--; if (em->shared->refs == 0) FREE(em->shared, M_LINUX); - EMUL_WUNLOCK(&emul_lock); + EMUL_SHARED_WUNLOCK(&emul_shared_lock); FREE(em, M_LINUX); } @@ -1356,7 +1354,7 @@ retry: /* find the emuldata */ - em = em_find(p->p_pid, EMUL_UNLOCKED); + em = em_find(p, EMUL_UNLOCKED); if (em == NULL) { /* We might have been called before proc_init for this process so @@ -1372,7 +1370,7 @@ return; } child_set_tid = em->child_set_tid; - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); if (child_set_tid != NULL) error = copyout(&p->p_pid, (int *) child_set_tid, sizeof(p->p_pid)); @@ -1391,7 +1389,7 @@ #endif /* find the emuldata */ - em = em_find(td->td_proc->p_pid, EMUL_UNLOCKED); + em = em_find(td->td_proc, EMUL_UNLOCKED); if (em == NULL) { #ifdef DEBUG @@ -1403,7 +1401,7 @@ em->child_clear_tid = args->tidptr; td->td_retval[0] = td->td_proc->p_pid; - EMUL_RUNLOCK(&emul_lock); + EMUL_UNLOCK(&emul_lock); return 0; } @@ -1418,7 +1416,7 @@ printf(ARGS(exit_group, "%i"), args->error_code); #endif - td_em = em_find(td->td_proc->p_pid, EMUL_UNLOCKED); + td_em = em_find(td->td_proc, EMUL_UNLOCKED); if (td_em == NULL) { #ifdef DEBUG @@ -1427,6 +1425,7 @@ return (0); } + EMUL_SHARED_RLOCK(&emul_shared_lock); LIST_FOREACH_SAFE(em, &td_em->shared->threads, threads, tmp_em) { if (em->pid == td_em->pid) continue; @@ -1439,7 +1438,8 @@ #endif } - EMUL_RUNLOCK(&emul_lock); + EMUL_SHARED_RUNLOCK(&emul_shared_lock); + EMUL_UNLOCK(&emul_lock); exit1(td, W_EXITCODE(args->error_code,0)); ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_sysvec.c#14 (text+ko) ==== @@ -92,7 +92,6 @@ extern int linux_szsigcode; extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL]; -extern SLIST_HEAD(emuldata_head, linux_emuldata) emuldata_head; SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler); SET_DECLARE(linux_device_handler_set, struct linux_device_handler); @@ -110,8 +109,9 @@ extern void linux_proc_exit(void *, struct proc *, struct image_params *); extern void linux_proc_exec(void *, struct proc *, struct image_params *); extern void linux_schedtail(void *, struct proc *); -extern struct rwlock emul_lock; extern LIST_HEAD(futex_list, futex) futex_list; +extern struct sx emul_shared_lock; +extern struct sx emul_lock; extern struct mtx futex_mtx; static eventhandler_tag linux_exit_tag; @@ -921,8 +921,8 @@ linux_ioctl_register_handler(*lihp); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_register_handler(*ldhp); - SLIST_INIT(&emuldata_head); - rw_init(&emul_lock, "emuldata lock"); + sx_init(&emul_lock, "emuldata lock"); + sx_init(&emul_shared_lock, "emuldata->shared lock"); LIST_INIT(&futex_list); mtx_init(&futex_mtx, "futex protection lock", NULL, MTX_DEF); linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit, @@ -952,13 +952,12 @@ linux_ioctl_unregister_handler(*lihp); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_unregister_handler(*ldhp); - rw_destroy(&emul_lock); + sx_destroy(&emul_lock); + sx_destroy(&emul_shared_lock); mtx_destroy(&futex_mtx); EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); EVENTHANDLER_DEREGISTER(schedtail, linux_schedtail_tag); EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag); - printf("Emuldata slist empty: %i\n", SLIST_EMPTY(&emuldata_head)); - printf("Futex slist empty: %i\n", LIST_EMPTY(&futex_list)); if (bootverbose) printf("Linux ELF exec handler removed\n"); } else From owner-p4-projects@FreeBSD.ORG Sat Aug 12 10:47:49 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 59A5F16A4E0; Sat, 12 Aug 2006 10:47:49 +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 2EEA116A4DE for ; Sat, 12 Aug 2006 10:47:49 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA41F43D46 for ; Sat, 12 Aug 2006 10:47:48 +0000 (GMT) (envelope-from rdivacky@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 k7CAlmKB014367 for ; Sat, 12 Aug 2006 10:47:48 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CAlmur014364 for perforce@freebsd.org; Sat, 12 Aug 2006 10:47:48 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sat, 12 Aug 2006 10:47:48 GMT Message-Id: <200608121047.k7CAlmur014364@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103699 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: Sat, 12 Aug 2006 10:47:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=103699 Change 103699 by rdivacky@rdivacky_witten on 2006/08/12 10:47:33 Change various if (em == NULL) to KASSERTs. The code is tested enough. Btw: this and last change caused that the code now feels much faster. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#10 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#41 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#10 (text+ko) ==== @@ -1337,12 +1337,7 @@ em = em_find(td->td_proc, EMUL_UNLOCKED); - if (em == NULL) { -#ifdef DEBUG - printf(LMSG("emuldata not found in getpid.\n")); -#endif - return (0); - } + KASSERT(em != NULL, ("getpid: emuldata not found.\n")); td->td_retval[0] = em->shared->group_pid; EMUL_UNLOCK(&emul_lock); @@ -1357,12 +1352,7 @@ em = em_find(td->td_proc, EMUL_UNLOCKED); - if (em == NULL) { -#ifdef DEBUG - printf(LMSG("emuldata for current process not found in getppid.\n")); -#endif - return (0); - } + KASSERT(em != NULL, ("getppid: process emuldata not found.\n")); /* find the group leader */ p = pfind(em->shared->group_pid); @@ -1381,13 +1371,8 @@ /* if its also linux process */ if (pp->p_sysent == &elf_linux_sysvec) { em = em_find(pp, EMUL_LOCKED); - if (em == NULL) { -#ifdef DEBUG - printf(LMSG("emuldata for parent process not found in getppid.\n")); -#endif - PROC_UNLOCK(pp); - return (0); - } + KASSERT(em != NULL, ("getppid: parent emuldata not found.\n")); + td->td_retval[0] = em->shared->group_pid; } else td->td_retval[0] = pp->p_pid; ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#41 (text+ko) ==== @@ -422,7 +422,7 @@ error = linux_proc_init(td, p2->p_pid, args->flags); /* reference it - no need to check this */ em = em_find(p2, EMUL_UNLOCKED); - KASSERT(em != NULL, ("no emuldata after proc_init()!\n")); + KASSERT(em != NULL, ("clone: emuldata not found.\n")); /* and adjust it */ if (args->flags & CLONE_PARENT_SETTID) { if (args->parent_tidptr == NULL) { @@ -1183,14 +1183,7 @@ } else { /* lookup the old one */ em = em_find(td->td_proc, EMUL_UNLOCKED); - /* XXX: this might be turned into KASSERT once its tested enough */ - if (em == NULL) { - /* this should not happen */ -#ifdef DEBUG - printf(LMSG("emuldata not found in exec case.\n")); -#endif - return (0); - } + KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); } em->child_clear_tid = NULL; @@ -1204,15 +1197,9 @@ if (flags & CLONE_VM) { /* lookup the parent */ p_em = em_find(td->td_proc, EMUL_LOCKED); - if (p_em == NULL) { -#ifdef DEBUG -#endif - printf(LMSG("parent emuldata not found for CLONE_VM.\n")); - panic("impossible to continue\n"); - } else { - em->shared = p_em->shared; - em->shared->refs++; - } + KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_VM\n")); + em->shared = p_em->shared; + em->shared->refs++; } else { /* handled earlier to avoid malloc(M_WAITOK) with rwlock held */ } @@ -1248,12 +1235,7 @@ /* find the emuldata */ em = em_find(p, EMUL_UNLOCKED); - if (em == NULL) { -#ifdef DEBUG - printf(LMSG("we didnt find emuldata for the exiting process.\n")); -#endif - return; - } + KASSERT(em != NULL, ("proc_exit: emuldata not found.\n")); child_clear_tid = em->child_clear_tid; @@ -1311,13 +1293,7 @@ em = em_find(p, EMUL_UNLOCKED); - if (em == NULL) { -#ifdef DEBUG - struct thread *td = FIRST_THREAD_IN_PROC(p); - printf(LMSG("we didnt find emuldata for the execing process.\n")); -#endif - return; - } + KASSERT(em != NULL, ("proc_exec: emuldata not found.\n")); EMUL_UNLOCK(&emul_lock); @@ -1364,10 +1340,7 @@ error = tsleep(&p->p_emuldata, PLOCK, "linux_schedtail", hz); if (error == 0) goto retry; -#ifdef DEBUG - printf(LMSG("we didnt find emuldata for the userreting process.\n")); -#endif - return; + panic("no emuldata found for userreting process.\n"); } child_set_tid = em->child_set_tid; EMUL_UNLOCK(&emul_lock); @@ -1391,12 +1364,7 @@ /* find the emuldata */ em = em_find(td->td_proc, EMUL_UNLOCKED); - if (em == NULL) { -#ifdef DEBUG - printf(LMSG("we didnt find emuldata for the userreting process.\n")); -#endif - return (0); - } + KASSERT(em != NULL, ("set_tid_address: emuldata not found.\n")); em->child_clear_tid = args->tidptr; td->td_retval[0] = td->td_proc->p_pid; @@ -1418,12 +1386,7 @@ td_em = em_find(td->td_proc, EMUL_UNLOCKED); - if (td_em == NULL) { -#ifdef DEBUG - printf(LMSG("we didnt find emuldata in exit_group.")); -#endif - return (0); - } + KASSERT(td_em != NULL, ("exit_group: emuldata not found.\n")); EMUL_SHARED_RLOCK(&emul_shared_lock); LIST_FOREACH_SAFE(em, &td_em->shared->threads, threads, tmp_em) { From owner-p4-projects@FreeBSD.ORG Sat Aug 12 11:17:27 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 0213316A4E0; Sat, 12 Aug 2006 11:17:27 +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 B959616A4DA for ; Sat, 12 Aug 2006 11:17:26 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E49A43D53 for ; Sat, 12 Aug 2006 11:17:26 +0000 (GMT) (envelope-from rdivacky@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 k7CBHQTx018566 for ; Sat, 12 Aug 2006 11:17:26 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CBHQOQ018563 for perforce@freebsd.org; Sat, 12 Aug 2006 11:17:26 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sat, 12 Aug 2006 11:17:26 GMT Message-Id: <200608121117.k7CBHQOQ018563@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103700 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: Sat, 12 Aug 2006 11:17:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=103700 Change 103700 by rdivacky@rdivacky_witten on 2006/08/12 11:16:56 Remove function prototypes I dont use. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_mib.h#3 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_mib.h#3 (text+ko) ==== @@ -40,7 +40,4 @@ int linux_get_oss_version(struct thread *td); int linux_set_oss_version(struct thread *td, int oss_version); -void linux_get_emul_path(struct thread *td, char *dst); -int linux_set_emul_path(struct thread *td, char *emul_path); - #endif /* _LINUX_MIB_H_ */ From owner-p4-projects@FreeBSD.ORG Sat Aug 12 12:43:15 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 C958716A4EC; Sat, 12 Aug 2006 12:43:15 +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 6E06916A4EA for ; Sat, 12 Aug 2006 12:43:15 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FF8543D5E for ; Sat, 12 Aug 2006 12:43:14 +0000 (GMT) (envelope-from rdivacky@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 k7CChEjN023852 for ; Sat, 12 Aug 2006 12:43:14 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CChEue023849 for perforce@freebsd.org; Sat, 12 Aug 2006 12:43:14 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sat, 12 Aug 2006 12:43:14 GMT Message-Id: <200608121243.k7CChEue023849@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103704 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: Sat, 12 Aug 2006 12:43:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=103704 Change 103704 by rdivacky@rdivacky_witten on 2006/08/12 12:42:19 Dont call linux_proc_init() in execve() in a case when the newly execed process is fbsd (or generally non-linux) one. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#42 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#42 (text+ko) ==== @@ -139,7 +139,13 @@ if (error == 0) error = kern_execve(td, &eargs, NULL); if (error == 0) - error = linux_proc_init(td, 0, 0); + /* linux process can exec fbsd one, dont attempt + * to create emuldata for such process using + * linux_proc_init, this leads to a panic on KASSERT + * because such process has p->p_emuldata == NULL + */ + if (td->td_proc->p_sysent == &elf_linux_sysvec) + error = linux_proc_init(td, 0, 0); return (error); } From owner-p4-projects@FreeBSD.ORG Sat Aug 12 12:46:19 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 7BEEB16A4DE; Sat, 12 Aug 2006 12:46:19 +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 5511216A4DA for ; Sat, 12 Aug 2006 12:46:19 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF92B43D53 for ; Sat, 12 Aug 2006 12:46:18 +0000 (GMT) (envelope-from rdivacky@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 k7CCkIOE024017 for ; Sat, 12 Aug 2006 12:46:18 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CCkIR9024014 for perforce@freebsd.org; Sat, 12 Aug 2006 12:46:18 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sat, 12 Aug 2006 12:46:18 GMT Message-Id: <200608121246.k7CCkIR9024014@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103705 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: Sat, 12 Aug 2006 12:46:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=103705 Change 103705 by rdivacky@rdivacky_witten on 2006/08/12 12:45:48 Introduce LINUX_NPTL options to kernel config. This enables/disables pid mangling for 2.6 emulation. This also switches osreleasename between 2.4.2 and 2.6.16. All my other changes are in place because I want to test them and the plan is to have 2.6.16 emulation only and not paralell emulation of 2.4.2 and 2.6.16. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_mib.c#6 edit .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#11 edit .. //depot/projects/soc2006/rdivacky_linuxolator/conf/options.amd64#3 edit .. //depot/projects/soc2006/rdivacky_linuxolator/conf/options.i386#3 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_mib.c#6 (text+ko) ==== @@ -81,7 +81,11 @@ 0, 0, linux_sysctl_osname, "A", "Linux kernel OS name"); +#ifdef LINUX_NPTL static char linux_osrelease[LINUX_MAX_UTSNAME] = "2.6.16"; +#else +static char linux_osrelease[LINUX_MAX_UTSNAME] = "2.4.2"; +#endif static int linux_sysctl_osrelease(SYSCTL_HANDLER_ARGS) ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#11 (text+ko) ==== @@ -1333,6 +1333,7 @@ int linux_getpid(struct thread *td, struct linux_getpid_args *args) { +#ifdef LINUX_NTPL struct linux_emuldata *em; em = em_find(td->td_proc, EMUL_UNLOCKED); @@ -1341,12 +1342,16 @@ td->td_retval[0] = em->shared->group_pid; EMUL_UNLOCK(&emul_lock); +#else + td->td_retval[0] = td->td_proc->p_pid; +#endif return (0); } int linux_getppid(struct thread *td, struct linux_getppid_args *args) { +#ifdef LINUX_NTPL struct linux_emuldata *em; struct proc *p, *pp; @@ -1381,6 +1386,9 @@ PROC_UNLOCK(pp); return (0); +#else + return getppid(td, (struct getppid_args *) args); +#endif } int ==== //depot/projects/soc2006/rdivacky_linuxolator/conf/options.amd64#3 (text+ko) ==== @@ -20,6 +20,7 @@ LINPROCFS opt_dontuse.h LINSYSFS opt_dontuse.h NDISAPI opt_dontuse.h +LINUX_NPTL opt_compat.h CLK_CALIBRATION_LOOP opt_clock.h CLK_USE_I8254_CALIBRATION opt_clock.h ==== //depot/projects/soc2006/rdivacky_linuxolator/conf/options.i386#3 (text+ko) ==== @@ -29,6 +29,7 @@ NDISAPI opt_dontuse.h PECOFF_DEBUG opt_pecoff.h PECOFF_SUPPORT opt_dontuse.h +LINUX_NPTL opt_compat.h # Change KVM size. Changes things all over the kernel. KVA_PAGES opt_global.h From owner-p4-projects@FreeBSD.ORG Sat Aug 12 12:53:31 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 DE94316A4FD; Sat, 12 Aug 2006 12:53:30 +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 5143216A4DF for ; Sat, 12 Aug 2006 12:53:30 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1613C43D5D for ; Sat, 12 Aug 2006 12:53:30 +0000 (GMT) (envelope-from rdivacky@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 k7CCrTod032152 for ; Sat, 12 Aug 2006 12:53:29 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CCrTLV032149 for perforce@freebsd.org; Sat, 12 Aug 2006 12:53:29 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sat, 12 Aug 2006 12:53:29 GMT Message-Id: <200608121253.k7CCrTLV032149@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103708 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: Sat, 12 Aug 2006 12:53:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=103708 Change 103708 by rdivacky@rdivacky_witten on 2006/08/12 12:53:19 Be more general and dont check for fbsd proc but for any non-linux proc. Also use __predict_true() to minimalize impact of linux_proc_exit() hook in the most probable case that non-linux proc is exiting. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#43 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#43 (text+ko) ==== @@ -1235,7 +1235,7 @@ struct thread *td = FIRST_THREAD_IN_PROC(p); int *child_clear_tid; - if (p->p_sysent != &elf_linux_sysvec) + if (__predict_true(p->p_sysent != &elf_linux_sysvec)) return; /* find the emuldata */ @@ -1291,9 +1291,9 @@ void linux_proc_exec(void *arg __unused, struct proc *p, struct image_params *imgp) { if (__predict_false(imgp->sysent == &elf_linux_sysvec - && p->p_sysent == &elf32_freebsd_sysvec)) + && p->p_sysent != &elf_linux_sysvec)) linux_proc_init(FIRST_THREAD_IN_PROC(p), p->p_pid, 0); - if (__predict_false(imgp->sysent == &elf32_freebsd_sysvec + if (__predict_false(imgp->sysent != &elf_linux_sysvec && p->p_sysent == &elf_linux_sysvec)) { struct linux_emuldata *em; From owner-p4-projects@FreeBSD.ORG Sat Aug 12 17:17:36 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 1952216A4DF; Sat, 12 Aug 2006 17:17: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 D20B816A4DA for ; Sat, 12 Aug 2006 17:17:35 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B4F943D46 for ; Sat, 12 Aug 2006 17:17:35 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7CHHZd1065718 for ; Sat, 12 Aug 2006 17:17:35 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CHHZpH065715 for perforce@freebsd.org; Sat, 12 Aug 2006 17:17:35 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 12 Aug 2006 17:17:35 GMT Message-Id: <200608121717.k7CHHZpH065715@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 103721 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: Sat, 12 Aug 2006 17:17:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=103721 Change 103721 by rwatson@rwatson_peppercorn on 2006/08/12 17:17:17 Rename autool to audump in makefiles, to match file rename. Affected files ... .. //depot/projects/trustedbsd/openbsm/tools/Makefile.am#2 edit .. //depot/projects/trustedbsd/openbsm/tools/Makefile.in#4 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/tools/Makefile.am#2 (text+ko) ==== @@ -1,9 +1,9 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/tools/Makefile.am#1 $ +# $P4: //depot/projects/trustedbsd/openbsm/tools/Makefile.am#2 $ # INCLUDES = -I$(top_srcdir) -bin_PROGRAMS = autool -autool_SOURCES = autool.c -autool_LDADD = $(top_builddir)/libbsm/libbsm.la +bin_PROGRAMS = audump +audump_SOURCES = audump.c +audump_LDADD = $(top_builddir)/libbsm/libbsm.la ==== //depot/projects/trustedbsd/openbsm/tools/Makefile.in#4 (text+ko) ==== @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/tools/Makefile.in#3 $ +# $P4: //depot/projects/trustedbsd/openbsm/tools/Makefile.in#4 $ # srcdir = @srcdir@ @@ -40,7 +40,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = autool$(EXEEXT) +bin_PROGRAMS = audump$(EXEEXT) subdir = tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -53,9 +53,9 @@ am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_autool_OBJECTS = autool.$(OBJEXT) -autool_OBJECTS = $(am_autool_OBJECTS) -autool_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la +am_audump_OBJECTS = audump.$(OBJEXT) +audump_OBJECTS = $(am_audump_OBJECTS) +audump_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles @@ -67,8 +67,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(autool_SOURCES) -DIST_SOURCES = $(autool_SOURCES) +SOURCES = $(audump_SOURCES) +DIST_SOURCES = $(audump_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -174,8 +174,8 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = -I$(top_srcdir) -autool_SOURCES = autool.c -autool_LDADD = $(top_builddir)/libbsm/libbsm.la +audump_SOURCES = audump.c +audump_LDADD = $(top_builddir)/libbsm/libbsm.la all: all-am .SUFFIXES: @@ -237,9 +237,9 @@ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done -autool$(EXEEXT): $(autool_OBJECTS) $(autool_DEPENDENCIES) - @rm -f autool$(EXEEXT) - $(LINK) $(autool_LDFLAGS) $(autool_OBJECTS) $(autool_LDADD) $(LIBS) +audump$(EXEEXT): $(audump_OBJECTS) $(audump_DEPENDENCIES) + @rm -f audump$(EXEEXT) + $(LINK) $(audump_LDFLAGS) $(audump_OBJECTS) $(audump_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -247,7 +247,7 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/autool.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audump.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ From owner-p4-projects@FreeBSD.ORG Sat Aug 12 17:18:38 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 DCA1C16A4E5; Sat, 12 Aug 2006 17:18:37 +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 BA1E416A4E1 for ; Sat, 12 Aug 2006 17:18:37 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A7B143D49 for ; Sat, 12 Aug 2006 17:18:37 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7CHIbwU065765 for ; Sat, 12 Aug 2006 17:18:37 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CHIbBU065762 for perforce@freebsd.org; Sat, 12 Aug 2006 17:18:37 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 12 Aug 2006 17:18:37 GMT Message-Id: <200608121718.k7CHIbBU065762@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 103722 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: Sat, 12 Aug 2006 17:18:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=103722 Change 103722 by rwatson@rwatson_peppercorn on 2006/08/12 17:17:56 Update for OpenBSM 1.0a8. Affected files ... .. //depot/projects/trustedbsd/openbsm/configure.ac#26 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/configure.ac#26 (text+ko) ==== @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_INIT([OpenBSM], [1.0a8], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) -AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#25 $]) +AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#26 $]) AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config/config.h]) From owner-p4-projects@FreeBSD.ORG Sat Aug 12 19:07:56 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 402A116A4E1; Sat, 12 Aug 2006 19:07:56 +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 1B76F16A4DA for ; Sat, 12 Aug 2006 19:07:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B553943D49 for ; Sat, 12 Aug 2006 19:07:55 +0000 (GMT) (envelope-from jb@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 k7CJ7tHf074255 for ; Sat, 12 Aug 2006 19:07:55 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CJ7tmP074252 for perforce@freebsd.org; Sat, 12 Aug 2006 19:07:55 GMT (envelope-from jb@freebsd.org) Date: Sat, 12 Aug 2006 19:07:55 GMT Message-Id: <200608121907.k7CJ7tmP074252@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103728 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: Sat, 12 Aug 2006 19:07:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=103728 Change 103728 by jb@jb_freebsd2 on 2006/08/12 19:07:02 IFlibbsdelf Affected files ... .. //depot/projects/dtrace/src/lib/libelf/Makefile#2 integrate .. //depot/projects/dtrace/src/lib/libelf/elf_cntl.3#1 branch .. //depot/projects/dtrace/src/lib/libelf/elf_cntl.c#1 branch .. //depot/projects/dtrace/src/lib/libelf/elf_errmsg.c#2 integrate .. //depot/projects/dtrace/src/lib/libelf/elf_flagdata.3#1 branch .. //depot/projects/dtrace/src/lib/libelf/elf_getident.3#2 integrate .. //depot/projects/dtrace/src/lib/libelf/elf_getident.c#2 integrate .. //depot/projects/dtrace/src/lib/libelf/libelf.h#2 integrate .. //depot/projects/dtrace/src/lib/libelf/libelf_convert.m4#2 integrate Differences ... ==== //depot/projects/dtrace/src/lib/libelf/Makefile#2 (text+ko) ==== @@ -4,6 +4,7 @@ SRCS= elf_allocate.c \ elf_begin.c \ + elf_cntl.c \ elf_end.c elf_errmsg.c elf_errno.c \ elf_fill.c \ elf_getbase.c \ @@ -28,12 +29,14 @@ OBJS+= libelf_convert.o -WARNS?= 6 +WARNS?= 9 MAN= elf.3 \ elf_begin.3 \ + elf_cntl.3 \ elf_end.3 elf_errmsg.3 \ elf_fill.3 \ + elf_flagdata.3 \ elf_getbase.3 \ elf_getident.3 \ elf_kind.3 \ @@ -73,13 +76,11 @@ gelf_fsize.3 elf64_fsize.3 MLINKS+= \ - elf.3 elf_cntl.3 \ - elf.3 elf_flagdata.3 \ - elf.3 elf_flagehdr.3 \ - elf.3 elf_flagelf.3 \ - elf.3 elf_flagphdr.3 \ - elf.3 elf_flagscn.3 \ - elf.3 elf_flagshdr.3 \ + elf_flagdata.3 elf_flagehdr.3 \ + elf_flagdata.3 elf_flagelf.3 \ + elf_flagdata.3 elf_flagphdr.3 \ + elf_flagdata.3 elf_flagscn.3 \ + elf_flagdata.3 elf_flagshdr.3 \ elf.3 elf_getarhdr.3 \ elf.3 elf_getarsym.3 \ elf.3 elf_getdata.3 \ ==== //depot/projects/dtrace/src/lib/libelf/elf_errmsg.c#2 (text+ko) ==== @@ -43,6 +43,7 @@ DEFINE_ERROR(ARGUMENT, "Invalid argument"), DEFINE_ERROR(HEADER, "Missing ELF header"), DEFINE_ERROR(MMAP, "File mapping failed"), + DEFINE_ERROR(MODE, "Incorrect ELF descriptor mode"), DEFINE_ERROR(RESOURCE, "Resource exhaustion"), DEFINE_ERROR(SEQUENCE, "API calls out of sequence"), DEFINE_ERROR(STAT, "Cannot determine file parameters"), ==== //depot/projects/dtrace/src/lib/libelf/elf_getident.3#2 (text+ko) ==== @@ -60,6 +60,13 @@ .It Bq Er ELF_E_ARGUMENT A NULL value was passed in for argument .Ar elf . +.It Bq Er ELF_E_SEQUENCE +ELF descriptor +.Ar elf +was opened for writing and function +.Fn elf_getident +was called before a call to +.Xr elf_update 3 . .El .Sh SEE ALSO .Xr elf 3 , @@ -67,9 +74,8 @@ .Xr elf_getbase 3 , .Xr elf_getflags 3 , .Xr elf_kind 3 , -.Xr elf_getshnum 3 , -.Xr elf_getshstrndx 3 , .Xr elf_rawfile 3 , +.Xr elf_update 3 , .Xr elf32_getehdr , .Xr elf64_getehdr , .Xr gelf 3 , ==== //depot/projects/dtrace/src/lib/libelf/elf_getident.c#2 (text+ko) ==== @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include @@ -37,13 +38,19 @@ char * elf_getident(Elf *e, size_t *sz) { + if (e == NULL) { LIBELF_SET_ERROR(ARGUMENT, 0); - if (sz) - *sz = 0; - return (NULL); + goto error; + } + + if (e->e_cmd == ELF_C_WRITE && e->e_rawfile == NULL) { + LIBELF_SET_ERROR(SEQUENCE, 0); + goto error; } + assert(e->e_kind != ELF_K_AR || e->e_cmd == ELF_C_READ); + if (sz) { if (e->e_kind == ELF_K_AR) *sz = SARMAG; @@ -53,8 +60,10 @@ *sz = e->e_rawsize; } - /* - * XXX: what do we do for ELF files opened for write? - */ return (e->e_rawfile); + + error: + if (sz) + *sz = 0; + return (NULL); } ==== //depot/projects/dtrace/src/lib/libelf/libelf.h#2 (text+ko) ==== @@ -142,6 +142,7 @@ ELF_E_ARGUMENT, /* Invalid argument */ ELF_E_HEADER, /* Missing ELF header */ ELF_E_MMAP, /* File mapping failed */ + ELF_E_MODE, /* Wrong mode for ELF descriptor */ ELF_E_RESOURCE, /* Resource exhaustion */ ELF_E_SEQUENCE, /* API calls out of sequence */ ELF_E_STAT, /* Cannot determine file parameters */ @@ -177,7 +178,7 @@ Elf_Data *elf_getdata(Elf_Scn *, Elf_Data *); char *elf_getident(Elf *_elf, size_t *_ptr); int elf_getphnum(Elf *_elf, size_t *_dst); -Elf_Scn elf_getscn(Elf *_elf, size_t _index); +Elf_Scn *elf_getscn(Elf *_elf, size_t _index); int elf_getshnum(Elf *_elf, size_t *_dst); int elf_getshstrndx(Elf *_elf, size_t *_dst); unsigned long elf_hash(const char *_name); ==== //depot/projects/dtrace/src/lib/libelf/libelf_convert.m4#2 (text+ko) ==== @@ -387,8 +387,8 @@ size_t fsz; fsz = elf$3_fsize(ELF_T_$1, 1, EV_CURRENT); - d = ((Elf$3_$2 *) dst) + (count - 1); - s = (unsigned char *) src + (count - 1) * fsz; + d = ((Elf$3_$2 *) dst) + (count - 1); + s0 = (unsigned char *) src + (count - 1) * fsz; while (count--) { s = s0; From owner-p4-projects@FreeBSD.ORG Sat Aug 12 23:39:42 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 5A5E016A4DF; Sat, 12 Aug 2006 23:39:42 +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 05C0916A4DA for ; Sat, 12 Aug 2006 23:39:39 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D78D43D45 for ; Sat, 12 Aug 2006 23:39:38 +0000 (GMT) (envelope-from kmacy@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 k7CNdcMe000472 for ; Sat, 12 Aug 2006 23:39:38 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CNdc5h000468 for perforce@freebsd.org; Sat, 12 Aug 2006 23:39:38 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 12 Aug 2006 23:39:38 GMT Message-Id: <200608122339.k7CNdc5h000468@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 103738 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: Sat, 12 Aug 2006 23:39:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=103738 Change 103738 by kmacy@kmacy_storage:sun4v_work_stable on 2006/08/12 23:39:16 probe the channel devices node which serves as a nexus for the virtual disk and virtual network Affected files ... .. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/vnex.c#2 edit Differences ... ==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/vnex.c#2 (text+ko) ==== @@ -53,6 +53,7 @@ #define SUN4V_REG_SPEC2CFG_HDL(x) ((x >> 32) & ~(0xfull << 28)) static device_probe_t vnex_probe; +static device_probe_t channex_probe; static device_attach_t vnex_attach; static bus_print_child_t vnex_print_child; static bus_add_child_t vnex_add_child; @@ -80,6 +81,62 @@ struct rman sc_mem_rman; }; +static device_method_t channex_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, channex_probe), + DEVMETHOD(device_attach, vnex_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface */ + DEVMETHOD(bus_print_child, vnex_print_child), + DEVMETHOD(bus_probe_nomatch, vnex_probe_nomatch), + DEVMETHOD(bus_read_ivar, bus_generic_read_ivar), + DEVMETHOD(bus_write_ivar, bus_generic_write_ivar), + DEVMETHOD(bus_add_child, vnex_add_child), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_setup_intr, vnex_setup_intr), + DEVMETHOD(bus_teardown_intr, vnex_teardown_intr), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_get_resource_list, vnex_get_resource_list), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, vnex_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + + { 0, 0 } +}; + +static driver_t channex_driver = { + "channex", + channex_methods, + sizeof(struct vnex_softc), +}; + + +static devclass_t channex_devclass; +DRIVER_MODULE(channex, vnex, channex_driver, channex_devclass, 0, 0); + + +static int +channex_probe(device_t dev) +{ + if (strcmp(ofw_bus_get_name(dev), "channel-devices")) + return (ENXIO); + + device_set_desc(dev, "virtual channel devices"); + return (0); +} + static device_method_t vnex_methods[] = { /* Device interface */ DEVMETHOD(device_probe, vnex_probe), @@ -115,6 +172,7 @@ { 0, 0 } }; + static driver_t vnex_driver = { "vnex", vnex_methods, @@ -132,10 +190,11 @@ if (strcmp(ofw_bus_get_name(dev), "virtual-devices")) return (ENXIO); - device_set_desc(dev, "Open Firmware Virtual Nexus device"); + device_set_desc(dev, "virtual nexus device"); return (0); } + static int vnex_attach(device_t dev) {