From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 00:28:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 652E0106566B; Sun, 19 Feb 2012 00:28:49 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 509B58FC12; Sun, 19 Feb 2012 00:28:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1J0SnhY055191; Sun, 19 Feb 2012 00:28:49 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1J0Sn6Y055189; Sun, 19 Feb 2012 00:28:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201202190028.q1J0Sn6Y055189@svn.freebsd.org> From: Alan Cox Date: Sun, 19 Feb 2012 00:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231904 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 00:28:49 -0000 Author: alc Date: Sun Feb 19 00:28:49 2012 New Revision: 231904 URL: http://svn.freebsd.org/changeset/base/231904 Log: Close a race due to dropping of the map lock between creating a map entry for a shared mapping and marking the entry for inheritance. Reviewed by: kib X-MFC after: r231526 Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Sun Feb 19 00:21:10 2012 (r231903) +++ head/sys/kern/sysv_shm.c Sun Feb 19 00:28:49 2012 (r231904) @@ -413,14 +413,12 @@ kern_shmat(td, shmid, shmaddr, shmflg) vm_object_reference(shmseg->object); rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object, 0, &attach_va, size, (flags & MAP_FIXED) ? VMFS_NO_SPACE : - VMFS_ANY_SPACE, prot, prot, 0); + VMFS_ANY_SPACE, prot, prot, MAP_INHERIT_SHARE); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg->object); error = ENOMEM; goto done2; } - vm_map_inherit(&p->p_vmspace->vm_map, - attach_va, attach_va + size, VM_INHERIT_SHARE); shmmap_s->va = attach_va; shmmap_s->shmid = shmid; From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 07:44:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3071A106566C; Sun, 19 Feb 2012 07:44:39 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CD6A8FC0C; Sun, 19 Feb 2012 07:44:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1J7idsf070200; Sun, 19 Feb 2012 07:44:39 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1J7icCo070188; Sun, 19 Feb 2012 07:44:38 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201202190744.q1J7icCo070188@svn.freebsd.org> From: Robert Millan Date: Sun, 19 Feb 2012 07:44:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231905 - in stable/9: share/mk sys/conf sys/modules sys/modules/drm sys/modules/sound/driver sys/modules/usb tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 07:44:39 -0000 Author: rmh Date: Sun Feb 19 07:44:38 2012 New Revision: 231905 URL: http://svn.freebsd.org/changeset/base/231905 Log: MFC r230972,r230980,r231559,r231565: Add MK_SOURCELESS build option, and associated fixes. Approved by: kib (mentor) Added: stable/9/sys/conf/WITHOUT_SOURCELESS - copied unchanged from r231559, head/sys/conf/WITHOUT_SOURCELESS stable/9/sys/conf/WITHOUT_SOURCELESS_HOST - copied, changed from r231559, head/sys/conf/WITHOUT_SOURCELESS_HOST stable/9/sys/conf/WITHOUT_SOURCELESS_UCODE - copied unchanged from r231559, head/sys/conf/WITHOUT_SOURCELESS_UCODE stable/9/tools/build/options/WITHOUT_SOURCELESS - copied unchanged from r230972, head/tools/build/options/WITHOUT_SOURCELESS stable/9/tools/build/options/WITHOUT_SOURCELESS_HOST - copied unchanged from r230972, head/tools/build/options/WITHOUT_SOURCELESS_HOST stable/9/tools/build/options/WITHOUT_SOURCELESS_UCODE - copied unchanged from r230972, head/tools/build/options/WITHOUT_SOURCELESS_UCODE Modified: stable/9/share/mk/bsd.own.mk stable/9/sys/modules/Makefile stable/9/sys/modules/drm/Makefile stable/9/sys/modules/sound/driver/Makefile stable/9/sys/modules/usb/Makefile Directory Properties: stable/9/share/mk/ (props changed) stable/9/share/mk/bsd.arch.inc.mk (props changed) stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/tools/build/options/ (props changed) Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Sun Feb 19 00:28:49 2012 (r231904) +++ stable/9/share/mk/bsd.own.mk Sun Feb 19 07:44:38 2012 (r231905) @@ -316,6 +316,9 @@ __DEFAULT_YES_OPTIONS = \ BOOT \ BSD_CPIO \ BSNMP \ + SOURCELESS \ + SOURCELESS_HOST \ + SOURCELESS_UCODE \ BZIP2 \ CALENDAR \ CDDL \ @@ -504,6 +507,11 @@ MK_BIND_UTILS:= no MK_BIND_ETC:= no .endif +.if ${MK_SOURCELESS} == "no" +MK_SOURCELESS_HOST:= no +MK_SOURCELESS_UCODE:= no +.endif + .if ${MK_CDDL} == "no" MK_ZFS:= no .endif Copied: stable/9/sys/conf/WITHOUT_SOURCELESS (from r231559, head/sys/conf/WITHOUT_SOURCELESS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/conf/WITHOUT_SOURCELESS Sun Feb 19 07:44:38 2012 (r231905, copy of r231559, head/sys/conf/WITHOUT_SOURCELESS) @@ -0,0 +1,7 @@ +# +# WITHOUT_SOURCELESS -- Disable drivers that include sourceless code. +# +# $FreeBSD$ + +include WITHOUT_SOURCELESS_HOST +include WITHOUT_SOURCELESS_UCODE Copied and modified: stable/9/sys/conf/WITHOUT_SOURCELESS_HOST (from r231559, head/sys/conf/WITHOUT_SOURCELESS_HOST) ============================================================================== --- head/sys/conf/WITHOUT_SOURCELESS_HOST Sun Feb 12 14:55:27 2012 (r231559, copy source) +++ stable/9/sys/conf/WITHOUT_SOURCELESS_HOST Sun Feb 19 07:44:38 2012 (r231905) @@ -1,5 +1,5 @@ # -# WITHOUT_SOURCELESS_UCODE -- Disable drivers that include sourceless +# WITHOUT_SOURCELESS_HOST -- Disable drivers that include sourceless # native code for host CPU. # # $FreeBSD$ Copied: stable/9/sys/conf/WITHOUT_SOURCELESS_UCODE (from r231559, head/sys/conf/WITHOUT_SOURCELESS_UCODE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/conf/WITHOUT_SOURCELESS_UCODE Sun Feb 19 07:44:38 2012 (r231905, copy of r231559, head/sys/conf/WITHOUT_SOURCELESS_UCODE) @@ -0,0 +1,41 @@ +# +# WITHOUT_SOURCELESS_UCODE -- Disable drivers that include sourceless +# microcode. +# +# $FreeBSD$ + +nodevice adw +nodevice bce +nodevice fatm +nodevice fxp +nodevice ispfw +nodevice mwlfw +nodevice ralfw +nodevice runfw +nodevice sf +nodevice sn +nodevice ti +nodevice txp +nodevice ce +nodevice cp +nodevice ctau +nodevice ipwfw +nodevice iwifw +nodevice iwnfw +nodevice wpifw + +# drm +nodevice mga +nodevice r128 +nodevice radeon + +# sound +nodevice csa +nodevice ds1 +nodevice maestro3 + +# usb +nodevice rum +nodevice uath +nodevice zyd +nodevice kue Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Sun Feb 19 00:28:49 2012 (r231904) +++ stable/9/sys/modules/Makefile Sun Feb 19 07:44:38 2012 (r231905) @@ -2,6 +2,9 @@ .include +# Modules that include binary-only blobs of microcode should be selectable by +# MK_SOURCELESS_UCODE option (see below). + SUBDIR= ${_3dfx} \ ${_3dfx_linux} \ ${_aac} \ @@ -37,7 +40,7 @@ SUBDIR= ${_3dfx} \ ath \ ath_pci \ ${_auxio} \ - bce \ + ${_bce} \ bfe \ bge \ ${_bxe} \ @@ -94,13 +97,13 @@ SUBDIR= ${_3dfx} \ ${_ex} \ ${_exca} \ ${_ext2fs} \ - fatm \ + ${_fatm} \ fdc \ fdescfs \ ${_fe} \ firewire \ firmware \ - fxp \ + ${_fxp} \ gem \ geom \ ${_glxiic} \ @@ -148,7 +151,7 @@ SUBDIR= ${_3dfx} \ ${_isci} \ iscsi \ isp \ - ispfw \ + ${_ispfw} \ ${_iwi} \ ${_iwifw} \ ${_iwn} \ @@ -209,7 +212,7 @@ SUBDIR= ${_3dfx} \ ${_mthca} \ mvs \ mwl \ - mwlfw \ + ${_mwlfw} \ mxge \ my \ ${_ncp} \ @@ -260,14 +263,14 @@ SUBDIR= ${_3dfx} \ puc \ ${_qlxgb} \ ral \ - ralfw \ + ${_ralfw} \ ${_random} \ rc4 \ ${_rdma} \ re \ reiserfs \ rl \ - runfw \ + ${_runfw} \ ${_s3} \ ${_safe} \ ${_sbni} \ @@ -277,7 +280,7 @@ SUBDIR= ${_3dfx} \ sdhci \ sem \ send \ - sf \ + ${_sf} \ ${_sfxge} \ sge \ siba_bwn \ @@ -286,7 +289,7 @@ SUBDIR= ${_3dfx} \ sis \ sk \ ${_smbfs} \ - sn \ + ${_sn} \ ${_snc} \ snp \ ${_sound} \ @@ -301,7 +304,7 @@ SUBDIR= ${_3dfx} \ ${_sym} \ ${_syscons} \ sysvipc \ - ti \ + ${_ti} \ tl \ tmpfs \ ${_tpm} \ @@ -310,7 +313,7 @@ SUBDIR= ${_3dfx} \ twe \ tws \ tx \ - txp \ + ${_txp} \ uart \ ubsec \ udf \ @@ -358,8 +361,10 @@ _vpo= vpo # No barrier instruction support (specific to this driver) _sym= sym # intr_disable() is a macro, causes problems +.if ${MK_SOURCELESS_UCODE} != "no" _cxgb= cxgb .endif +.endif .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) @@ -401,6 +406,20 @@ _pfsync= pfsync .endif .endif +.if ${MK_SOURCELESS_UCODE} != "no" +_bce= bce +_fatm= fatm +_fxp= fxp +_ispfw= ispfw +_mwlfw= mwlfw +_ralfw= ralfw +_runfw= runfw +_sf= sf +_sn= sn +_ti= ti +_txp= txp +.endif + .if ${MACHINE_CPUARCH} == "i386" # XXX some of these can move to the general case when de-i386'ed # XXX some of these can move now, but are untested on other architectures. @@ -417,9 +436,13 @@ _bktr= bktr _bxe= bxe _cardbus= cardbus _cbb= cbb +.if ${MK_SOURCELESS_UCODE} != "no" _ce= ce +.endif _coff= coff +.if ${MK_SOURCELESS_UCODE} != "no" _cp= cp +.endif _cpuctl= cpuctl _cpufreq= cpufreq _cs= cs @@ -508,36 +531,52 @@ _ciss= ciss _cm= cm _cmx= cmx _coretemp= coretemp +.if ${MK_SOURCELESS_UCODE} != "no" _ctau= ctau +.endif _dpt= dpt _ex= ex +.if ${MK_SOURCELESS_HOST} != "no" _hpt27xx= hpt27xx +.endif _hptiop= hptiop +.if ${MK_SOURCELESS_HOST} != "no" _hptmv= hptmv _hptrr= hptrr +.endif _ichwd= ichwd _ida= ida _iir= iir _ipmi= ipmi _ips= ips _ipw= ipw +.if ${MK_SOURCELESS_UCODE} != "no" _ipwfw= ipwfw +.endif _isci= isci _iwi= iwi +.if ${MK_SOURCELESS_UCODE} != "no" _iwifw= iwifw +.endif _iwn= iwn +.if ${MK_SOURCELESS_UCODE} != "no" _iwnfw= iwnfw +.endif _ixgb= ixgb _ixgbe= ixgbe _mly= mly _nfe= nfe +.if ${MK_SOURCELESS_HOST} != "no" _nve= nve +.endif _nvram= nvram _nxge= nxge _tpm= tpm _viawd= viawd _wpi= wpi +.if ${MK_SOURCELESS_UCODE} != "no" _wpifw= wpifw +.endif .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) _padlock= padlock .endif @@ -587,10 +626,14 @@ _et= et _em= em _exca= exca _ext2fs= ext2fs +.if ${MK_SOURCELESS_HOST} != "no" _hpt27xx= hpt27xx +.endif _hptiop= hptiop +.if ${MK_SOURCELESS_HOST} != "no" _hptmv= hptmv _hptrr= hptrr +.endif _i2c= i2c _ichwd= ichwd _ida= ida @@ -601,12 +644,18 @@ _io= io _ipmi= ipmi _ips= ips _ipw= ipw +.if ${MK_SOURCELESS_UCODE} != "no" _ipwfw= ipwfw +.endif _isci= isci _iwi= iwi +.if ${MK_SOURCELESS_UCODE} != "no" _iwifw= iwifw +.endif _iwn= iwn +.if ${MK_SOURCELESS_UCODE} != "no" _iwnfw= iwnfw +.endif _ixgb= ixgb _ixgbe= ixgbe _lindev= lindev @@ -622,7 +671,9 @@ _mthca= mthca .endif _ndis= ndis _nfe= nfe +.if ${MK_SOURCELESS_HOST} != "no" _nve= nve +.endif _nvram= nvram _nxge= nxge .if ${MK_CDDL} != "no" || defined(ALL_MODULES) @@ -651,7 +702,9 @@ _vxge= vxge _x86bios= x86bios _wi= wi _wpi= wpi +.if ${MK_SOURCELESS_UCODE} != "no" _wpifw= wpifw +.endif .if ${MK_ZFS} != "no" || defined(ALL_MODULES) _zfs= zfs .endif Modified: stable/9/sys/modules/drm/Makefile ============================================================================== --- stable/9/sys/modules/drm/Makefile Sun Feb 19 00:28:49 2012 (r231904) +++ stable/9/sys/modules/drm/Makefile Sun Feb 19 07:44:38 2012 (r231905) @@ -1,15 +1,26 @@ # $FreeBSD$ +.include + +# Modules that include binary-only blobs of microcode should be selectable by +# MK_SOURCELESS_UCODE option (see below). + SUBDIR = \ drm \ i915 \ mach64 \ - mga \ - r128 \ - radeon \ + ${_mga} \ + ${_r128} \ + ${_radeon} \ savage \ sis \ tdfx \ via +.if ${MK_SOURCELESS_UCODE} != "no" +_mga= mga +_r128= r128 +_radeon= radeon +.endif + .include Modified: stable/9/sys/modules/sound/driver/Makefile ============================================================================== --- stable/9/sys/modules/sound/driver/Makefile Sun Feb 19 00:28:49 2012 (r231904) +++ stable/9/sys/modules/sound/driver/Makefile Sun Feb 19 07:44:38 2012 (r231905) @@ -1,10 +1,21 @@ # $FreeBSD$ -SUBDIR= ad1816 als4000 atiixp cs4281 csa ds1 emu10k1 emu10kx -SUBDIR+= envy24 envy24ht es137x ess fm801 hda ich maestro maestro3 +.include + +# Modules that include binary-only blobs of microcode should be selectable by +# MK_SOURCELESS_UCODE option (see below). + +SUBDIR= ad1816 als4000 atiixp cs4281 ${_csa} ${_ds1} emu10k1 emu10kx +SUBDIR+= envy24 envy24ht es137x ess fm801 hda ich maestro ${_maestro3} SUBDIR+= neomagic sb16 sb8 sbc solo spicds t4dwave via8233 SUBDIR+= via82c686 vibes driver uaudio +.if ${MK_SOURCELESS_UCODE} != "no" +_csa= csa +_ds1= ds1 +_maestro3= maestro3 +.endif + .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" SUBDIR+= cmi mss .endif Modified: stable/9/sys/modules/usb/Makefile ============================================================================== --- stable/9/sys/modules/usb/Makefile Sun Feb 19 00:28:49 2012 (r231904) +++ stable/9/sys/modules/usb/Makefile Sun Feb 19 07:44:38 2012 (r231905) @@ -25,16 +25,28 @@ # SUCH DAMAGE. # +.include + +# Modules that include binary-only blobs of microcode should be selectable by +# MK_SOURCELESS_UCODE option (see below). + SUBDIR = usb SUBDIR += ehci musb ohci uhci xhci uss820dci ${_at91dci} ${_atmegadci} ${_avr32dci} -SUBDIR += rum run uath upgt usie ural zyd ${_urtw} +SUBDIR += ${_rum} run ${_uath} upgt usie ural ${_zyd} ${_urtw} SUBDIR += atp uhid ukbd ums udbp ufm uep SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ umct umcs umodem umoscom uplcom uslcom uvisor uvscom -SUBDIR += uether aue axe cdce cue kue mos rue udav uhso ipheth +SUBDIR += uether aue axe cdce cue ${_kue} mos rue udav uhso ipheth SUBDIR += usfs umass urio SUBDIR += quirk template +.if ${MK_SOURCELESS_UCODE} != "no" +_rum= rum +_uath= uath +_zyd= zyd +_kue= kue +.endif + .if ${MACHINE_CPUARCH} == "amd64" _urtw= urtw .endif Copied: stable/9/tools/build/options/WITHOUT_SOURCELESS (from r230972, head/tools/build/options/WITHOUT_SOURCELESS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_SOURCELESS Sun Feb 19 07:44:38 2012 (r231905, copy of r230972, head/tools/build/options/WITHOUT_SOURCELESS) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build kernel modules that include sourceless code (either microcode or native code for host CPU). Copied: stable/9/tools/build/options/WITHOUT_SOURCELESS_HOST (from r230972, head/tools/build/options/WITHOUT_SOURCELESS_HOST) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_SOURCELESS_HOST Sun Feb 19 07:44:38 2012 (r231905, copy of r230972, head/tools/build/options/WITHOUT_SOURCELESS_HOST) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build kernel modules that include sourceless native code for host CPU. Copied: stable/9/tools/build/options/WITHOUT_SOURCELESS_UCODE (from r230972, head/tools/build/options/WITHOUT_SOURCELESS_UCODE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_SOURCELESS_UCODE Sun Feb 19 07:44:38 2012 (r231905, copy of r230972, head/tools/build/options/WITHOUT_SOURCELESS_UCODE) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build kernel modules that include sourceless microcode. From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 08:17:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31AC2106564A; Sun, 19 Feb 2012 08:17:15 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 211868FC1A; Sun, 19 Feb 2012 08:17:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1J8HES4071392; Sun, 19 Feb 2012 08:17:14 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1J8HEm1071390; Sun, 19 Feb 2012 08:17:14 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201202190817.q1J8HEm1071390@svn.freebsd.org> From: David Xu Date: Sun, 19 Feb 2012 08:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231906 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 08:17:15 -0000 Author: davidxu Date: Sun Feb 19 08:17:14 2012 New Revision: 231906 URL: http://svn.freebsd.org/changeset/base/231906 Log: Check both seconds and nanoseconds are zero, only checking nanoseconds is zero may trigger timeout too early. It seems a copy&paste bug. Modified: head/lib/libthr/thread/thr_umtx.c Modified: head/lib/libthr/thread/thr_umtx.c ============================================================================== --- head/lib/libthr/thread/thr_umtx.c Sun Feb 19 07:44:38 2012 (r231905) +++ head/lib/libthr/thread/thr_umtx.c Sun Feb 19 08:17:14 2012 (r231906) @@ -205,7 +205,7 @@ _thr_umtx_timedwait_uint(volatile u_int if (abstime != NULL) { clock_gettime(clockid, &ts); TIMESPEC_SUB(&ts2, abstime, &ts); - if (ts2.tv_sec < 0 || ts2.tv_nsec <= 0) + if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) return (ETIMEDOUT); tsp = &ts2; } else { From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 08:58:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B1FD106566B; Sun, 19 Feb 2012 08:58:32 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3703C8FC15; Sun, 19 Feb 2012 08:58:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1J8wWj8072805; Sun, 19 Feb 2012 08:58:32 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1J8wVue072794; Sun, 19 Feb 2012 08:58:31 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201202190858.q1J8wVue072794@svn.freebsd.org> From: Andreas Tobler Date: Sun, 19 Feb 2012 08:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231907 - in stable/9: lib/libc/powerpc64/sys sys/conf sys/powerpc/aim sys/powerpc/include sys/powerpc/ofw sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 08:58:32 -0000 Author: andreast Date: Sun Feb 19 08:58:31 2012 New Revision: 231907 URL: http://svn.freebsd.org/changeset/base/231907 Log: MFC r230391, r230400, 231019: This commit adds profiling support for powerpc64. Now we can do application profiling and kernel profiling. To enable kernel profiling one has to build kgmon(8). I will enable the build once I managed to build and test powerpc (32-bit) kernels with profiling support. - add a powerpc64 PROF_PROLOGUE for _mcount. - add macros to avoid adding the PROF_PROLOGUE in certain assembly entries. - apply these macros where needed. - add size information to the MCOUNT function. Modified: stable/9/lib/libc/powerpc64/sys/cerror.S stable/9/sys/conf/ldscript.powerpc64 stable/9/sys/powerpc/aim/locore64.S stable/9/sys/powerpc/aim/swtch64.S stable/9/sys/powerpc/aim/trap_subr64.S stable/9/sys/powerpc/include/asm.h stable/9/sys/powerpc/include/profile.h stable/9/sys/powerpc/ofw/ofwcall64.S stable/9/sys/powerpc/powerpc/atomic.S stable/9/sys/powerpc/powerpc/setjmp.S Modified: stable/9/lib/libc/powerpc64/sys/cerror.S ============================================================================== --- stable/9/lib/libc/powerpc64/sys/cerror.S Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/lib/libc/powerpc64/sys/cerror.S Sun Feb 19 08:58:31 2012 (r231907) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); * programs and the initial threaded in threaded programs, * it returns a pointer to the global errno variable. */ -ENTRY(HIDENAME(cerror)) +ENTRY_NOPROF(HIDENAME(cerror)) mflr %r0 std %r0,16(%r1) /* save lr */ stdu %r1,-64(%r1) /* allocate new stack frame */ Modified: stable/9/sys/conf/ldscript.powerpc64 ============================================================================== --- stable/9/sys/conf/ldscript.powerpc64 Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/sys/conf/ldscript.powerpc64 Sun Feb 19 08:58:31 2012 (r231907) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc") -OUTPUT_ARCH(powerpc) +OUTPUT_ARCH(powerpc:common64) ENTRY(__start) SEARCH_DIR(/usr/lib); PROVIDE (__stack = 0); @@ -56,15 +56,19 @@ SECTIONS .sdata2 : { *(.sdata2) } .sbss2 : { *(.sbss2) } /* Adjust the address for the data segment to the next page up. */ - . = ((. + 0x1000) & ~(0x1000 - 1)); + . = ALIGN(4096); .data : { *(.data) *(.gnu.linkonce.d*) CONSTRUCTORS } - .data1 : { *(.data1) } - .got1 : { *(.got1) } + .data1 : { *(.data1) } + .toc1 : ALIGN(8) { *(.toc1) } + .opd : ALIGN(8) { KEEP (*(.opd)) } + .branch_lt : ALIGN(8) { *(.branch_lt) } + .got : ALIGN(8) { *(.got .toc) } + .dynamic : { *(.dynamic) } /* Put .ctors and .dtors next to the .got2 section, so that the pointers get relocated with -mrelocatable. Also put in the .fixup pointers. @@ -81,10 +85,6 @@ SECTIONS .fixup : { *(.fixup) } PROVIDE (_FIXUP_END_ = .); PROVIDE (_GOT2_END_ = .); - PROVIDE (_GOT_START_ = .); - .got : { *(.got) } - .got.plt : { *(.got.plt) } - PROVIDE (_GOT_END_ = .); /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ Modified: stable/9/sys/powerpc/aim/locore64.S ============================================================================== --- stable/9/sys/powerpc/aim/locore64.S Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/sys/powerpc/aim/locore64.S Sun Feb 19 08:58:31 2012 (r231907) @@ -115,7 +115,7 @@ kernel_text: * segment! */ .text -ASENTRY(__start) +ASENTRY_NOPROF(__start) li 8,0 li 9,0x100 mtctr 9 @@ -202,7 +202,7 @@ tocbase: * or the (currently used) C code optimized, so it doesn't use any non-volatile * registers. */ -ASENTRY(setfault) +ASENTRY_NOPROF(setfault) mflr 0 mfcr 12 mfsprg 4,0 Modified: stable/9/sys/powerpc/aim/swtch64.S ============================================================================== --- stable/9/sys/powerpc/aim/swtch64.S Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/sys/powerpc/aim/swtch64.S Sun Feb 19 08:58:31 2012 (r231907) @@ -268,7 +268,8 @@ ENTRY(savectx) * fork_trampoline() * Set up the return from cpu_fork() */ -ENTRY(fork_trampoline) + +ENTRY_NOPROF(fork_trampoline) ld %r3,CF_FUNC(%r1) ld %r4,CF_ARG0(%r1) ld %r5,CF_ARG1(%r1) Modified: stable/9/sys/powerpc/aim/trap_subr64.S ============================================================================== --- stable/9/sys/powerpc/aim/trap_subr64.S Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/sys/powerpc/aim/trap_subr64.S Sun Feb 19 08:58:31 2012 (r231907) @@ -555,7 +555,7 @@ CNAME(asttrapexit): /* * Deliberate entry to dbtrap */ -ASENTRY(breakpoint) +ASENTRY_NOPROF(breakpoint) mtsprg1 %r1 mfmsr %r3 mtsrr1 %r3 Modified: stable/9/sys/powerpc/include/asm.h ============================================================================== --- stable/9/sys/powerpc/include/asm.h Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/sys/powerpc/include/asm.h Sun Feb 19 08:58:31 2012 (r231907) @@ -76,15 +76,35 @@ #endif #if defined(PROF) || (defined(_KERNEL) && defined(GPROF)) -# define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount +# ifdef __powerpc64__ +# define _PROF_PROLOGUE mflr 0; \ + std 3,48(1); \ + std 4,56(1); \ + std 5,64(1); \ + std 0,16(1); \ + stdu 1,-112(1); \ + bl _mcount; \ + nop; \ + ld 0,112+16(1); \ + ld 3,112+48(1); \ + ld 4,112+56(1); \ + ld 5,112+64(1); \ + mtlr 0; \ + addi 1,1,112 +# else +# define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount +# endif #else # define _PROF_PROLOGUE #endif -#define ENTRY(y) _ENTRY(CNAME(y)); _PROF_PROLOGUE #define ASENTRY(y) _ENTRY(ASMNAME(y)); _PROF_PROLOGUE +#define ENTRY(y) _ENTRY(CNAME(y)); _PROF_PROLOGUE #define GLOBAL(y) _GLOBAL(CNAME(y)) +#define ASENTRY_NOPROF(y) _ENTRY(ASMNAME(y)) +#define ENTRY_NOPROF(y) _ENTRY(CNAME(y)) + #define ASMSTR .asciz #define RCSID(x) .text; .asciz x Modified: stable/9/sys/powerpc/include/profile.h ============================================================================== --- stable/9/sys/powerpc/include/profile.h Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/sys/powerpc/include/profile.h Sun Feb 19 08:58:31 2012 (r231907) @@ -85,6 +85,7 @@ __asm( " .text \n" \ "_mcount: \n" \ " .quad .L._mcount,.TOC.@tocbase,0\n" \ " .previous \n" \ + " .size main,24 \n" \ " .type _mcount,@function \n" \ " .align 4 \n" \ ".L._mcount: \n" \ Modified: stable/9/sys/powerpc/ofw/ofwcall64.S ============================================================================== --- stable/9/sys/powerpc/ofw/ofwcall64.S Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/sys/powerpc/ofw/ofwcall64.S Sun Feb 19 08:58:31 2012 (r231907) @@ -56,7 +56,7 @@ GLOBAL(rtas_entry) * Open Firmware Real-mode Entry Point. This is a huge pain. */ -ASENTRY(ofwcall) +ASENTRY_NOPROF(ofwcall) mflr %r0 std %r0,16(%r1) stdu %r1,-208(%r1) @@ -175,7 +175,7 @@ ASENTRY(ofwcall) * C prototype: int rtascall(void *callbuffer, void *rtas_privdat); */ -ASENTRY(rtascall) +ASENTRY_NOPROF(rtascall) mflr %r0 std %r0,16(%r1) stdu %r1,-208(%r1) Modified: stable/9/sys/powerpc/powerpc/atomic.S ============================================================================== --- stable/9/sys/powerpc/powerpc/atomic.S Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/sys/powerpc/powerpc/atomic.S Sun Feb 19 08:58:31 2012 (r231907) @@ -30,7 +30,7 @@ .text -ASENTRY(atomic_set_8) +ASENTRY_NOPROF(atomic_set_8) 0: lwarx 0, 0, 3 /* load old value */ slwi 4, 4, 24 /* shift the byte so it's in the right place */ or 0, 0, 4 /* generate new value */ @@ -40,7 +40,7 @@ ASENTRY(atomic_set_8) sync blr /* return */ -ASENTRY(atomic_clear_8) +ASENTRY_NOPROF(atomic_clear_8) 0: lwarx 0, 0, 3 /* load old value */ slwi 4, 4, 24 /* shift the byte so it's in the right place */ andc 0, 0, 4 /* generate new value */ @@ -50,7 +50,7 @@ ASENTRY(atomic_clear_8) sync blr /* return */ -ASENTRY(atomic_add_8) +ASENTRY_NOPROF(atomic_add_8) 0: lwarx 9, 0, 3 /* load old value */ srwi 0, 9, 24 /* byte alignment */ add 0, 4, 0 /* calculate new value */ @@ -63,7 +63,7 @@ ASENTRY(atomic_add_8) sync blr /* return */ -ASENTRY(atomic_subtract_8) +ASENTRY_NOPROF(atomic_subtract_8) 0: lwarx 9, 0, 3 /* load old value */ srwi 0, 9, 24 /* byte alignment */ subf 0, 4, 0 /* calculate new value */ @@ -76,7 +76,7 @@ ASENTRY(atomic_subtract_8) sync blr /* return */ -ASENTRY(atomic_set_16) +ASENTRY_NOPROF(atomic_set_16) li 11, 3 /* mask to test for alignment */ andc. 11, 3, 11 /* force address to be word-aligned */ 0: lwarx 12, 0, 11 /* load old value */ @@ -89,7 +89,7 @@ ASENTRY(atomic_set_16) sync blr /* return */ -ASENTRY(atomic_clear_16) +ASENTRY_NOPROF(atomic_clear_16) li 11, 3 /* mask to test for alignment */ andc. 11, 3, 11 /* force address to be word-aligned */ 0: lwarx 12, 0, 11 /* load old value */ @@ -102,7 +102,7 @@ ASENTRY(atomic_clear_16) sync blr /* return */ -ASENTRY(atomic_add_16) +ASENTRY_NOPROF(atomic_add_16) li 11, 3 /* mask to test for alignment */ andc. 11, 3, 11 /* force address to be word-aligned */ 0: lwarx 12, 0, 11 /* load old value */ @@ -119,7 +119,7 @@ ASENTRY(atomic_add_16) sync blr /* return */ -ASENTRY(atomic_subtract_16) +ASENTRY_NOPROF(atomic_subtract_16) li 11, 3 /* mask to test for alignment */ andc. 11, 3, 11 /* force address to be word-aligned */ 0: lwarx 12, 0, 11 /* load old value */ Modified: stable/9/sys/powerpc/powerpc/setjmp.S ============================================================================== --- stable/9/sys/powerpc/powerpc/setjmp.S Sun Feb 19 08:17:14 2012 (r231906) +++ stable/9/sys/powerpc/powerpc/setjmp.S Sun Feb 19 08:58:31 2012 (r231907) @@ -42,7 +42,7 @@ #define JMP_xer 24*REGWIDTH #define JMP_sig 25*REGWIDTH -ASENTRY(setjmp) +ASENTRY_NOPROF(setjmp) ST_REG 31, JMP_r31(3) /* r1, r2, r14-r30 */ ST_REG 1, JMP_r1 (3) @@ -79,7 +79,7 @@ ASENTRY(setjmp) .extern sigsetmask -ASENTRY(longjmp) +ASENTRY_NOPROF(longjmp) LD_REG 31, JMP_r31(3) /* r1, r2, r14-r30 */ LD_REG 1, JMP_r1 (3) From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 10:10:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37F1E106564A; Sun, 19 Feb 2012 10:10:13 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 272DB8FC13; Sun, 19 Feb 2012 10:10:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JAADqB075295; Sun, 19 Feb 2012 10:10:13 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JAACeC075293; Sun, 19 Feb 2012 10:10:12 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201202191010.q1JAACeC075293@svn.freebsd.org> From: Andreas Tobler Date: Sun, 19 Feb 2012 10:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231908 - head/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 10:10:13 -0000 Author: andreast Date: Sun Feb 19 10:10:12 2012 New Revision: 231908 URL: http://svn.freebsd.org/changeset/base/231908 Log: Enable the new PCI-PCI bridge driver by default. Tested on 32- and 64-bit PowerMac. Modified: head/sys/powerpc/conf/DEFAULTS Modified: head/sys/powerpc/conf/DEFAULTS ============================================================================== --- head/sys/powerpc/conf/DEFAULTS Sun Feb 19 08:58:31 2012 (r231907) +++ head/sys/powerpc/conf/DEFAULTS Sun Feb 19 10:10:12 2012 (r231908) @@ -13,5 +13,7 @@ device uart_z8530 options GEOM_PART_APM options GEOM_PART_MBR +options NEW_PCIB + # Allow mounting non-MPSAFE filesystems options VFS_ALLOW_NONMPSAFE From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 10:20:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90ECB106566B; Sun, 19 Feb 2012 10:20:38 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FA298FC0A; Sun, 19 Feb 2012 10:20:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JAKcXu075683; Sun, 19 Feb 2012 10:20:38 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JAKcdI075680; Sun, 19 Feb 2012 10:20:38 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202191020.q1JAKcdI075680@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 19 Feb 2012 10:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231909 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 10:20:38 -0000 Author: trociny Date: Sun Feb 19 10:20:37 2012 New Revision: 231909 URL: http://svn.freebsd.org/changeset/base/231909 Log: The pidfile_open(3) is going to be fixed to set close-on-exec in order not to leak the descriptor after exec(3). This raises the issue for daemon(3) of the pidfile lock to be lost when the child process executes. To solve this and also to have the pidfile cleaned up when the program exits, if a pidfile is specified, spawn a child to exec the command and wait in the parent keeping the pidfile locked until the child process exits and remove the file. Reported by: Andrey Zonov Suggested by: pjd Reviewed by: pjd MFC after: 2 weeks Modified: head/usr.sbin/daemon/daemon.8 head/usr.sbin/daemon/daemon.c Modified: head/usr.sbin/daemon/daemon.8 ============================================================================== --- head/usr.sbin/daemon/daemon.8 Sun Feb 19 10:10:12 2012 (r231908) +++ head/usr.sbin/daemon/daemon.8 Sun Feb 19 10:20:37 2012 (r231909) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 19, 2007 +.Dd February 19, 2012 .Dt DAEMON 8 .Os .Sh NAME @@ -59,14 +59,18 @@ Write the ID of the created process into using the .Xr pidfile 3 functionality. -If the +The program is executed in a spawned child process while the +.Nm +waits until it terminates to keep the +.Ar file +locked and removes it after the process exits. +The +.Ar file +owner is the user who runs the +.Nm +regardless of whether the .Fl u -option is used, either the pidfile needs to have been pre-created -with appropriate ownership and permissions, or the directory to contain -the pidfile must be writable by the specified user. -Note, that the file will be created shortly before the process is -actually executed, and will remain after the process exits (although -it will be removed if the execution fails). +option is used or not. .It Fl u Ar user Login name of the user to execute the program under. Requires adequate superuser privileges. Modified: head/usr.sbin/daemon/daemon.c ============================================================================== --- head/usr.sbin/daemon/daemon.c Sun Feb 19 10:10:12 2012 (r231908) +++ head/usr.sbin/daemon/daemon.c Sun Feb 19 10:20:37 2012 (r231909) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -43,15 +44,16 @@ __FBSDID("$FreeBSD$"); #include static void restrict_process(const char *); +static void wait_child(pid_t pid); static void usage(void); int main(int argc, char *argv[]) { struct pidfh *pfh = NULL; - int ch, nochdir, noclose, errcode; + int ch, nochdir, noclose; const char *pidfile, *user; - pid_t otherpid; + pid_t otherpid, pid; nochdir = noclose = 1; pidfile = user = NULL; @@ -79,14 +81,12 @@ main(int argc, char *argv[]) if (argc == 0) usage(); - if (user != NULL) - restrict_process(user); - + pfh = NULL; /* * Try to open the pidfile before calling daemon(3), * to be able to report the error intelligently */ - if (pidfile) { + if (pidfile != NULL) { pfh = pidfile_open(pidfile, 0600, &otherpid); if (pfh == NULL) { if (errno == EEXIST) { @@ -100,22 +100,37 @@ main(int argc, char *argv[]) if (daemon(nochdir, noclose) == -1) err(1, NULL); - /* Now that we are the child, write out the pid */ - if (pidfile) + pid = 0; + if (pidfile != NULL) { + /* + * Spawn a child to exec the command, so in the parent + * we could wait for it to exit and remove pidfile. + */ + pid = fork(); + if (pid == -1) { + pidfile_remove(pfh); + err(1, "fork"); + } + } + if (pid == 0) { + /* Now that we are the child, write out the pid. */ pidfile_write(pfh); - execvp(argv[0], argv); + if (user != NULL) + restrict_process(user); - /* - * execvp() failed -- unlink pidfile if any, and - * report the error - */ - errcode = errno; /* Preserve errcode -- unlink may reset it */ - if (pidfile) - pidfile_remove(pfh); + execvp(argv[0], argv); - /* The child is now running, so the exit status doesn't matter. */ - errc(1, errcode, "%s", argv[0]); + /* + * execvp() failed -- report the error. The child is + * now running, so the exit status doesn't matter. + */ + err(1, "%s", argv[0]); + } + setproctitle("%s[%d]", argv[0], pid); + wait_child(pid); + pidfile_remove(pfh); + exit(0); /* Exit status does not matter. */ } static void @@ -132,6 +147,19 @@ restrict_process(const char *user) } static void +wait_child(pid_t pid) +{ + int status; + + while (waitpid(pid, &status, 0) == -1) { + if (errno != EINTR) { + warn("waitpid"); + break; + } + } +} + +static void usage(void) { (void)fprintf(stderr, From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 10:23:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7187106564A; Sun, 19 Feb 2012 10:23:51 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2518FC18; Sun, 19 Feb 2012 10:23:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JANp0M075837; Sun, 19 Feb 2012 10:23:51 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JANpi2075834; Sun, 19 Feb 2012 10:23:51 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202191023.q1JANpi2075834@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 19 Feb 2012 10:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231910 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 10:23:51 -0000 Author: trociny Date: Sun Feb 19 10:23:51 2012 New Revision: 231910 URL: http://svn.freebsd.org/changeset/base/231910 Log: If the supervising process receives SIGTERM, forward it to the spawned process. Normally it will cause the child to exit followed by the termination of the supervisor after removing the pidfile. This looks like desirable behavior, because termination of a supervisor usually supposes termination of its charge. Also it will fix the issue with stale pid files after reboot due to init kills a supervisor before its child exits. MFC after: 2 weeks Modified: head/usr.sbin/daemon/daemon.8 head/usr.sbin/daemon/daemon.c Modified: head/usr.sbin/daemon/daemon.8 ============================================================================== --- head/usr.sbin/daemon/daemon.8 Sun Feb 19 10:20:37 2012 (r231909) +++ head/usr.sbin/daemon/daemon.8 Sun Feb 19 10:23:51 2012 (r231910) @@ -71,6 +71,12 @@ owner is the user who runs the regardless of whether the .Fl u option is used or not. +If the monitoring +.Nm +receives software termination signal (SIGTERM) it forwards it to the +spawned process. +Normally it will cause the child to exit followed by the termination +of the supervising process after removing the pidfile. .It Fl u Ar user Login name of the user to execute the program under. Requires adequate superuser privileges. Modified: head/usr.sbin/daemon/daemon.c ============================================================================== --- head/usr.sbin/daemon/daemon.c Sun Feb 19 10:20:37 2012 (r231909) +++ head/usr.sbin/daemon/daemon.c Sun Feb 19 10:23:51 2012 (r231910) @@ -36,21 +36,24 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include +#include +#include #include #include #include +static void dummy_sighandler(int); static void restrict_process(const char *); -static void wait_child(pid_t pid); +static void wait_child(pid_t pid, sigset_t *mask); static void usage(void); int main(int argc, char *argv[]) { struct pidfh *pfh = NULL; + sigset_t mask, oldmask; int ch, nochdir, noclose; const char *pidfile, *user; pid_t otherpid, pid; @@ -100,9 +103,37 @@ main(int argc, char *argv[]) if (daemon(nochdir, noclose) == -1) err(1, NULL); - pid = 0; + /* + * If the pidfile option is specified the daemon executes the + * command in a forked process and wait on child exit to + * remove the pidfile. Normally we don't want the monitoring + * daemon to be terminated leaving the running process and the + * stale pidfile, so we catch SIGTERM and pass it to the + * children expecting to get SIGCHLD eventually. + */ + pid = -1; if (pidfile != NULL) { /* + * Restore default action for SIGTERM in case the + * parent process decided to ignore it. + */ + if (signal(SIGTERM, SIG_DFL) == SIG_ERR) + err(1, "signal"); + /* + * Because SIGCHLD is ignored by default, setup dummy handler + * for it, so we can mask it. + */ + if (signal(SIGCHLD, dummy_sighandler) == SIG_ERR) + err(1, "signal"); + /* + * Block interesting signals. + */ + sigemptyset(&mask); + sigaddset(&mask, SIGTERM); + sigaddset(&mask, SIGCHLD); + if (sigprocmask(SIG_SETMASK, &mask, &oldmask) == -1) + err(1, "sigprocmask"); + /* * Spawn a child to exec the command, so in the parent * we could wait for it to exit and remove pidfile. */ @@ -112,7 +143,12 @@ main(int argc, char *argv[]) err(1, "fork"); } } - if (pid == 0) { + if (pid <= 0) { + if (pid == 0) { + /* Restore old sigmask in the child. */ + if (sigprocmask(SIG_SETMASK, &oldmask, NULL) == -1) + err(1, "sigprocmask"); + } /* Now that we are the child, write out the pid. */ pidfile_write(pfh); @@ -128,12 +164,18 @@ main(int argc, char *argv[]) err(1, "%s", argv[0]); } setproctitle("%s[%d]", argv[0], pid); - wait_child(pid); + wait_child(pid, &mask); pidfile_remove(pfh); exit(0); /* Exit status does not matter. */ } static void +dummy_sighandler(int sig __unused) +{ + /* Nothing to do. */ +} + +static void restrict_process(const char *user) { struct passwd *pw = NULL; @@ -147,14 +189,27 @@ restrict_process(const char *user) } static void -wait_child(pid_t pid) +wait_child(pid_t pid, sigset_t *mask) { - int status; + int signo; - while (waitpid(pid, &status, 0) == -1) { - if (errno != EINTR) { - warn("waitpid"); - break; + for (;;) { + if (sigwait(mask, &signo) == -1) { + warn("sigwaitinfo"); + return; + } + switch (signo) { + case SIGCHLD: + return; + case SIGTERM: + if (kill(pid, signo) == -1) { + warn("kill"); + return; + } + continue; + default: + warnx("sigwaitinfo: invalid signal: %d", signo); + return; } } } From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 10:36:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60E9F106566C; Sun, 19 Feb 2012 10:36:30 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 458878FC08; Sun, 19 Feb 2012 10:36:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JAaUJb076332; Sun, 19 Feb 2012 10:36:30 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JAaUKY076329; Sun, 19 Feb 2012 10:36:30 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202191036.q1JAaUKY076329@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 19 Feb 2012 10:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231911 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 10:36:30 -0000 Author: trociny Date: Sun Feb 19 10:36:29 2012 New Revision: 231911 URL: http://svn.freebsd.org/changeset/base/231911 Log: Add -r option to restart the program if it has been terminated. Suggested by: Andrey Zonov MFC after: 2 weeks Modified: head/usr.sbin/daemon/daemon.8 head/usr.sbin/daemon/daemon.c Modified: head/usr.sbin/daemon/daemon.8 ============================================================================== --- head/usr.sbin/daemon/daemon.8 Sun Feb 19 10:23:51 2012 (r231910) +++ head/usr.sbin/daemon/daemon.8 Sun Feb 19 10:36:29 2012 (r231911) @@ -71,16 +71,28 @@ owner is the user who runs the regardless of whether the .Fl u option is used or not. -If the monitoring +.It Fl r +Supervise and restart the program if it has been terminated. +.It Fl u Ar user +Login name of the user to execute the program under. +Requires adequate superuser privileges. +.El +.Pp +If the +.Fl p +or +.Fl r +option is specified the program is executed in a spawned child process. +The +.Nm +waits until it terminates to keep the pid file locked and removes it +after the process exits or restarts the program. +In this case if the monitoring .Nm receives software termination signal (SIGTERM) it forwards it to the spawned process. Normally it will cause the child to exit followed by the termination of the supervising process after removing the pidfile. -.It Fl u Ar user -Login name of the user to execute the program under. -Requires adequate superuser privileges. -.El .Sh EXIT STATUS The .Nm Modified: head/usr.sbin/daemon/daemon.c ============================================================================== --- head/usr.sbin/daemon/daemon.c Sun Feb 19 10:23:51 2012 (r231910) +++ head/usr.sbin/daemon/daemon.c Sun Feb 19 10:36:29 2012 (r231911) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); static void dummy_sighandler(int); static void restrict_process(const char *); -static void wait_child(pid_t pid, sigset_t *mask); +static int wait_child(pid_t pid, sigset_t *mask); static void usage(void); int @@ -54,13 +54,14 @@ main(int argc, char *argv[]) { struct pidfh *pfh = NULL; sigset_t mask, oldmask; - int ch, nochdir, noclose; + int ch, nochdir, noclose, restart; const char *pidfile, *user; pid_t otherpid, pid; nochdir = noclose = 1; + restart = 0; pidfile = user = NULL; - while ((ch = getopt(argc, argv, "-cfp:u:")) != -1) { + while ((ch = getopt(argc, argv, "-cfp:ru:")) != -1) { switch (ch) { case 'c': nochdir = 0; @@ -71,6 +72,9 @@ main(int argc, char *argv[]) case 'p': pidfile = optarg; break; + case 'r': + restart = 1; + break; case 'u': user = optarg; break; @@ -104,15 +108,16 @@ main(int argc, char *argv[]) err(1, NULL); /* - * If the pidfile option is specified the daemon executes the - * command in a forked process and wait on child exit to - * remove the pidfile. Normally we don't want the monitoring - * daemon to be terminated leaving the running process and the - * stale pidfile, so we catch SIGTERM and pass it to the - * children expecting to get SIGCHLD eventually. + * If the pidfile or restart option is specified the daemon + * executes the command in a forked process and wait on child + * exit to remove the pidfile or restart the command. Normally + * we don't want the monitoring daemon to be terminated + * leaving the running process and the stale pidfile, so we + * catch SIGTERM and forward it to the children expecting to + * get SIGCHLD eventually. */ pid = -1; - if (pidfile != NULL) { + if (pidfile != NULL || restart) { /* * Restore default action for SIGTERM in case the * parent process decided to ignore it. @@ -133,6 +138,7 @@ main(int argc, char *argv[]) sigaddset(&mask, SIGCHLD); if (sigprocmask(SIG_SETMASK, &mask, &oldmask) == -1) err(1, "sigprocmask"); +restart: /* * Spawn a child to exec the command, so in the parent * we could wait for it to exit and remove pidfile. @@ -164,7 +170,10 @@ main(int argc, char *argv[]) err(1, "%s", argv[0]); } setproctitle("%s[%d]", argv[0], pid); - wait_child(pid, &mask); + if (wait_child(pid, &mask) == 0 && restart) { + sleep(1); + goto restart; + } pidfile_remove(pfh); exit(0); /* Exit status does not matter. */ } @@ -188,28 +197,30 @@ restrict_process(const char *user) errx(1, "failed to set user environment"); } -static void +static int wait_child(pid_t pid, sigset_t *mask) { - int signo; + int terminate, signo; + terminate = 0; for (;;) { if (sigwait(mask, &signo) == -1) { warn("sigwaitinfo"); - return; + return (-1); } switch (signo) { case SIGCHLD: - return; + return (terminate); case SIGTERM: + terminate = 1; if (kill(pid, signo) == -1) { warn("kill"); - return; + return (-1); } continue; default: warnx("sigwaitinfo: invalid signal: %d", signo); - return; + return (-1); } } } From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 10:38:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5127C106566B; Sun, 19 Feb 2012 10:38:56 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 406458FC0A; Sun, 19 Feb 2012 10:38:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JAcuQa076446; Sun, 19 Feb 2012 10:38:56 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JAcuHd076444; Sun, 19 Feb 2012 10:38:56 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202191038.q1JAcuHd076444@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 19 Feb 2012 10:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231912 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 10:38:56 -0000 Author: trociny Date: Sun Feb 19 10:38:55 2012 New Revision: 231912 URL: http://svn.freebsd.org/changeset/base/231912 Log: If permitted protect the supervisor against pageout kill. Suggested by: Andrey Zonov MFC after: 2 weeks Modified: head/usr.sbin/daemon/daemon.c Modified: head/usr.sbin/daemon/daemon.c ============================================================================== --- head/usr.sbin/daemon/daemon.c Sun Feb 19 10:36:29 2012 (r231911) +++ head/usr.sbin/daemon/daemon.c Sun Feb 19 10:38:55 2012 (r231912) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -138,6 +139,12 @@ main(int argc, char *argv[]) sigaddset(&mask, SIGCHLD); if (sigprocmask(SIG_SETMASK, &mask, &oldmask) == -1) err(1, "sigprocmask"); + /* + * Try to protect against pageout kill. Ignore the + * error, madvise(2) will fail only if a process does + * not have superuser privileges. + */ + (void)madvise(NULL, 0, MADV_PROTECT); restart: /* * Spawn a child to exec the command, so in the parent From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 10:38:57 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6283D1065670; Sun, 19 Feb 2012 10:38:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail14.syd.optusnet.com.au (mail14.syd.optusnet.com.au [211.29.132.195]) by mx1.freebsd.org (Postfix) with ESMTP id C1A5F8FC13; Sun, 19 Feb 2012 10:38:53 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1JAcnA0008762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 19 Feb 2012 21:38:51 +1100 Date: Sun, 19 Feb 2012 21:38:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Robert Millan In-Reply-To: <201202190744.q1J7icCo070188@svn.freebsd.org> Message-ID: <20120219210834.K1461@besplex.bde.org> References: <201202190744.q1J7icCo070188@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org Subject: Re: svn commit: r231905 - in stable/9: share/mk sys/conf sys/modules sys/modules/drm sys/modules/sound/driver sys/modules/usb tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 10:38:57 -0000 On Sun, 19 Feb 2012, Robert Millan wrote: > Log: > MFC r230972,r230980,r231559,r231565: Add MK_SOURCELESS build option, and > associated fixes. > > Approved by: kib (mentor) Do the file names have to be as ugly as the macros? scottl liked moving them to the MI conf directory, but the make a bigger mess there since there are more files there. For ls -C in -current now: WITH_LOUD_VERBOSE_NAMES: % CVS/ kmod.mk % Makefile.amd64 kmod_syms.awk % Makefile.arm ldscript.amd64 % Makefile.i386 ldscript.arm % Makefile.ia64 ldscript.i386 % Makefile.mips ldscript.ia64 % Makefile.pc98 ldscript.mips % Makefile.powerpc ldscript.mips.cfe % Makefile.sparc64 ldscript.mips.mips64 % NOTES ldscript.mips.octeon1 % WITHOUT_SOURCELESS ldscript.powerpc % WITHOUT_SOURCELESS_HOST ldscript.powerpc64 % WITHOUT_SOURCELESS_UCODE ldscript.sparc64 % defines makeLINT.mk % files makeLINT.sed % files.amd64 newvers.sh % files.arm options % files.i386 options.amd64 % files.ia64 options.arm % files.mips options.i386 % files.pc98 options.ia64 % files.powerpc options.mips % files.sparc64 options.pc98 % kern.mk options.powerpc % kern.post.mk options.sparc64 % kern.pre.mk systags.sh Spot the unix-style names among these. without_so_much_loudness_or_verboseness: % CVS/ files.pc98 ldscript.powerpc64 % Makefile.amd64 files.powerpc ldscript.sparc64 % Makefile.arm files.sparc64 makeLINT.mk % Makefile.i386 kern.mk makeLINT.sed % Makefile.ia64 kern.post.mk newvers.sh % Makefile.mips kern.pre.mk options % Makefile.pc98 kmod.mk options.amd64 % Makefile.powerpc kmod_syms.awk options.arm % Makefile.sparc64 ldscript.amd64 options.i386 % NOTES ldscript.arm options.ia64 % defines ldscript.i386 options.mips % files ldscript.ia64 options.pc98 % files.amd64 ldscript.mips options.powerpc % files.arm ldscript.mips.cfe options.sparc64 % files.i386 ldscript.mips.mips64 systags.sh % files.ia64 ldscript.mips.octeon1 % files.mips ldscript.powerpc Some names are already too long, but most didn't shout. FreeBSD ls is relatively stupid about tabular formatting. It produces fixed-width columns aligned to tab boundaries. Thus a single name of length 16 or more reduces to 3 columns of names in 80 columns of characters (3 * 24 < 80 < 4 * 24), and a single name of length 24 or more reduces to 2 columns of names in 80 columns of characters (2 * 32 < 80 < 3 * 32). I couldn't find any option to control this. gnu ls is smarter and produces 4 columns in both cases: WITH: % CVS/ defines kmod.mk makeLINT.mk % Makefile.amd64 files kmod_syms.awk makeLINT.sed % Makefile.arm files.amd64 ldscript.amd64 newvers.sh % Makefile.i386 files.arm ldscript.arm options % Makefile.ia64 files.i386 ldscript.i386 options.amd64 % Makefile.mips files.ia64 ldscript.ia64 options.arm % Makefile.pc98 files.mips ldscript.mips options.i386 % Makefile.powerpc files.pc98 ldscript.mips.cfe options.ia64 % Makefile.sparc64 files.powerpc ldscript.mips.mips64 options.mips % NOTES files.sparc64 ldscript.mips.octeon1 options.pc98 % WITHOUT_SOURCELESS kern.mk ldscript.powerpc options.powerpc % WITHOUT_SOURCELESS_HOST kern.post.mk ldscript.powerpc64 options.sparc64 % WITHOUT_SOURCELESS_UCODE kern.pre.mk ldscript.sparc64 systags.sh without: % CVS/ files.arm ldscript.arm options % Makefile.amd64 files.i386 ldscript.i386 options.amd64 % Makefile.arm files.ia64 ldscript.ia64 options.arm % Makefile.i386 files.mips ldscript.mips options.i386 % Makefile.ia64 files.pc98 ldscript.mips.cfe options.ia64 % Makefile.mips files.powerpc ldscript.mips.mips64 options.mips % Makefile.pc98 files.sparc64 ldscript.mips.octeon1 options.pc98 % Makefile.powerpc kern.mk ldscript.powerpc options.powerpc % Makefile.sparc64 kern.post.mk ldscript.powerpc64 options.sparc64 % NOTES kern.pre.mk ldscript.sparc64 systags.sh % defines kmod.mk makeLINT.mk % files kmod_syms.awk makeLINT.sed % files.amd64 ldscript.amd64 newvers.sh It apparently uses non-fixed-width columns with a minimum width of 2 between columns (this is 1 more than aligning to tab boundaries is sure to give). Both formats use rather too hard tabs, which make a mess when quoted and don't even save much space when combined with spaces. Quite often, a prefix collects all names with similar verboseness together when they are sorted, so ls could be even smarter and try to keep verbose names in wide columns, and start new columns as necessary for this, giving ragged column depths. Next, it could sort all the verbose names into a verbose column, or better yet, filter them out :-). Bruce From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 10:52:24 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00373106566C; Sun, 19 Feb 2012 10:52:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 4CB668FC15; Sun, 19 Feb 2012 10:52:22 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1JAqJQl024658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 19 Feb 2012 21:52:20 +1100 Date: Sun, 19 Feb 2012 21:52:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Xu In-Reply-To: <201202190817.q1J8HEm1071390@svn.freebsd.org> Message-ID: <20120219214118.G1461@besplex.bde.org> References: <201202190817.q1J8HEm1071390@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r231906 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 10:52:24 -0000 On Sun, 19 Feb 2012, David Xu wrote: > Log: > Check both seconds and nanoseconds are zero, only checking nanoseconds > is zero may trigger timeout too early. It seems a copy&paste bug. > > Modified: > head/lib/libthr/thread/thr_umtx.c > > Modified: head/lib/libthr/thread/thr_umtx.c > ============================================================================== > --- head/lib/libthr/thread/thr_umtx.c Sun Feb 19 07:44:38 2012 (r231905) > +++ head/lib/libthr/thread/thr_umtx.c Sun Feb 19 08:17:14 2012 (r231906) > @@ -205,7 +205,7 @@ _thr_umtx_timedwait_uint(volatile u_int > if (abstime != NULL) { > clock_gettime(clockid, &ts); > TIMESPEC_SUB(&ts2, abstime, &ts); > - if (ts2.tv_sec < 0 || ts2.tv_nsec <= 0) > + if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) > return (ETIMEDOUT); > tsp = &ts2; > } else { > Use timespeccmp()? It is even likely to be faster, since it can do the comparison in parallel, while the above has to wait for TIMESPEC_SUB() before doing the comparison, unless the compiler is very smart. However, I seem to have done too good a job of keeping kernel time* APIs out of userland, so timespeccmp() is only available in the kernel, and there are uglier but more correct unsafe macros like TIMESPEC_SUB() macros in userland, and various kernel APIs escaped anyway, starting with the NetBSD timeval ones, which escaped 10-15 years after timevals should have gone away because they were superseded by timespecs. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 11:00:24 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8087C106566B; Sun, 19 Feb 2012 11:00:24 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6C6A38FC08; Sun, 19 Feb 2012 11:00:24 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1JB0LB5079751; Sun, 19 Feb 2012 11:00:22 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4F40D644.6030500@gmail.com> Date: Sun, 19 Feb 2012 19:00:20 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Bruce Evans References: <201202190817.q1J8HEm1071390@svn.freebsd.org> <20120219214118.G1461@besplex.bde.org> In-Reply-To: <20120219214118.G1461@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, David Xu Subject: Re: svn commit: r231906 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 11:00:24 -0000 On 2012/2/19 18:52, Bruce Evans wrote: > On Sun, 19 Feb 2012, David Xu wrote: > >> Log: >> Check both seconds and nanoseconds are zero, only checking nanoseconds >> is zero may trigger timeout too early. It seems a copy&paste bug. >> >> Modified: >> head/lib/libthr/thread/thr_umtx.c >> >> Modified: head/lib/libthr/thread/thr_umtx.c >> ============================================================================== >> >> --- head/lib/libthr/thread/thr_umtx.c Sun Feb 19 07:44:38 2012 >> (r231905) >> +++ head/lib/libthr/thread/thr_umtx.c Sun Feb 19 08:17:14 2012 >> (r231906) >> @@ -205,7 +205,7 @@ _thr_umtx_timedwait_uint(volatile u_int >> if (abstime != NULL) { >> clock_gettime(clockid, &ts); >> TIMESPEC_SUB(&ts2, abstime, &ts); >> - if (ts2.tv_sec < 0 || ts2.tv_nsec <= 0) >> + if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) >> return (ETIMEDOUT); >> tsp = &ts2; >> } else { >> > > Use timespeccmp()? It is even likely to be faster, since it can do the > comparison in parallel, while the above has to wait for TIMESPEC_SUB() > before doing the comparison, unless the compiler is very smart. > Yes > However, I seem to have done too good a job of keeping kernel time* APIs > out of userland, so timespeccmp() is only available in the kernel, and > there are uglier but more correct unsafe macros like TIMESPEC_SUB() > macros in userland, and various kernel APIs escaped anyway, starting > with the NetBSD timeval ones, which escaped 10-15 years after timevals > should have gone away because they were superseded by timespecs. > > Bruce > Yes, we noticed that all timespec macros are not available for userland, even TIMESPEC_SUB was copied from kernel. From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 12:09:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65A20106564A; Sun, 19 Feb 2012 12:09:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B8B38FC0A; Sun, 19 Feb 2012 12:09:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JC9ICi096521; Sun, 19 Feb 2012 12:09:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JC9Io7096518; Sun, 19 Feb 2012 12:09:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202191209.q1JC9Io7096518@svn.freebsd.org> From: Marius Strobl Date: Sun, 19 Feb 2012 12:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231913 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 12:09:18 -0000 Author: marius Date: Sun Feb 19 12:09:17 2012 New Revision: 231913 URL: http://svn.freebsd.org/changeset/base/231913 Log: - Probe BCM57780. - In case the parent is bge(4), don't set the Jumbo frame settings unless the MAC actually is Jumbo capable as otherwise the PHY might not have the corresponding registers implemented. This is also in line with what the Linux tg3 driver does. PR: 165032 Submitted by: Alexander Milanov Obtained from: OpenBSD MFC after: 3 days Modified: head/sys/dev/mii/brgphy.c head/sys/dev/mii/miidevs Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Sun Feb 19 10:38:55 2012 (r231912) +++ head/sys/dev/mii/brgphy.c Sun Feb 19 12:09:17 2012 (r231913) @@ -146,6 +146,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(BROADCOM3, BCM5719C), MII_PHY_DESC(BROADCOM3, BCM5720C), MII_PHY_DESC(BROADCOM3, BCM57765), + MII_PHY_DESC(BROADCOM3, BCM57780), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5906), MII_PHY_END }; @@ -225,7 +226,8 @@ brgphy_attach(device_t dev) sc->mii_flags |= MIIF_HAVEFIBER; } break; - } break; + } + break; case MII_OUI_BROADCOM2: switch (sc->mii_mpd_model) { case MII_MODEL_BROADCOM2_BCM5708S: @@ -942,7 +944,8 @@ brgphy_reset(struct mii_softc *sc) if (bge_sc->bge_phy_flags & BGE_PHY_JITTER_BUG) brgphy_fixup_jitter_bug(sc); - brgphy_jumbo_settings(sc, ifp->if_mtu); + if (bge_sc->bge_flags & BGE_FLAG_JUMBO) + brgphy_jumbo_settings(sc, ifp->if_mtu); if ((bge_sc->bge_phy_flags & BGE_PHY_NO_WIRESPEED) == 0) brgphy_ethernet_wirespeed(sc); Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Sun Feb 19 10:38:55 2012 (r231912) +++ head/sys/dev/mii/miidevs Sun Feb 19 12:09:17 2012 (r231913) @@ -179,6 +179,7 @@ model BROADCOM2 BCM5784 0x003a BCM5784 model BROADCOM2 BCM5709C 0x003c BCM5709 10/100/1000baseT PHY model BROADCOM2 BCM5761 0x003d BCM5761 10/100/1000baseT PHY model BROADCOM2 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY +model BROADCOM3 BCM57780 0x0019 BCM57780 1000BASE-T media interface model BROADCOM3 BCM5717C 0x0020 BCM5717C 1000BASE-T media interface model BROADCOM3 BCM5719C 0x0022 BCM5719C 1000BASE-T media interface model BROADCOM3 BCM57765 0x0024 BCM57765 1000BASE-T media interface From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 12:25:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E2B21065675; Sun, 19 Feb 2012 12:25:59 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E820F8FC08; Sun, 19 Feb 2012 12:25:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JCPwDs097132; Sun, 19 Feb 2012 12:25:58 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JCPwK3097128; Sun, 19 Feb 2012 12:25:58 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202191225.q1JCPwK3097128@svn.freebsd.org> From: Marius Strobl Date: Sun, 19 Feb 2012 12:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231914 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 12:25:59 -0000 Author: marius Date: Sun Feb 19 12:25:58 2012 New Revision: 231914 URL: http://svn.freebsd.org/changeset/base/231914 Log: Probe the National DP83849, which is a dual-port version of the PHYTER. Obtained from: NetBSD Modified: head/sys/dev/mii/miidevs head/sys/dev/mii/nsphyter.c Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Sun Feb 19 12:09:17 2012 (r231913) +++ head/sys/dev/mii/miidevs Sun Feb 19 12:25:58 2012 (r231914) @@ -1,5 +1,5 @@ $FreeBSD$ -/*$NetBSD: miidevs,v 1.104 2011/11/12 11:10:49 sekiya Exp $*/ +/*$NetBSD: miidevs,v 1.105 2011/11/25 23:28:14 jakllsch Exp $*/ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -280,6 +280,7 @@ model xxNATSEMI DP83847 0x0003 DP83847 model xxNATSEMI DP83891 0x0005 DP83891 1000BASE-T media interface model xxNATSEMI DP83861 0x0006 DP83861 1000BASE-T media interface model xxNATSEMI DP83865 0x0007 DP83865 1000BASE-T media interface +model xxNATSEMI DP83849 0x000a DP83849 10/100 media interface /* PMC Sierra PHYs */ model xxPMCSIERRA PM8351 0x0000 PM8351 OctalPHY Gigabit interface Modified: head/sys/dev/mii/nsphyter.c ============================================================================== --- head/sys/dev/mii/nsphyter.c Sun Feb 19 12:09:17 2012 (r231913) +++ head/sys/dev/mii/nsphyter.c Sun Feb 19 12:25:58 2012 (r231914) @@ -58,8 +58,9 @@ __FBSDID("$FreeBSD$"); /* - * driver for National Semiconductor's DP83843 `PHYTER' ethernet 10/100 PHY - * Data Sheet available from www.national.com + * Driver for the National Semiconductor's DP83843, DP83847 and DP83849 + * `PHYTER' Ethernet 10/100 PHYs + * Data Sheets are available from http://www.national.com * * We also support the DP83815 `MacPHYTER' internal PHY since, for our * purposes, they are compatible. @@ -114,6 +115,7 @@ static const struct mii_phydesc nsphyter MII_PHY_DESC(xxNATSEMI, DP83815), MII_PHY_DESC(xxNATSEMI, DP83843), MII_PHY_DESC(xxNATSEMI, DP83847), + MII_PHY_DESC(xxNATSEMI, DP83849), MII_PHY_END }; From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 16:12:18 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56562106566C; Sun, 19 Feb 2012 16:12:18 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 229148FC08; Sun, 19 Feb 2012 16:12:17 +0000 (UTC) Received: from [127.0.0.1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.5/8.14.5) with ESMTP id q1JGCFnQ021873; Sun, 19 Feb 2012 09:12:15 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <20120219210834.K1461@besplex.bde.org> Date: Sun, 19 Feb 2012 09:12:14 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <620BB0E6-6290-4B91-B668-0F67A38E153B@samsco.org> References: <201202190744.q1J7icCo070188@svn.freebsd.org> <20120219210834.K1461@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1257) X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org, Robert Millan Subject: Re: svn commit: r231905 - in stable/9: share/mk sys/conf sys/modules sys/modules/drm sys/modules/sound/driver sys/modules/usb tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 16:12:18 -0000 On Feb 19, 2012, at 3:38 AM, Bruce Evans wrote: > On Sun, 19 Feb 2012, Robert Millan wrote: >=20 >> Log: >> MFC r230972,r230980,r231559,r231565: Add MK_SOURCELESS build option, = and >> associated fixes. >>=20 >> Approved by: kib (mentor) >=20 > Do the file names have to be as ugly as the macros? scottl liked = moving > them to the MI conf directory, but the make a bigger mess there since > there are more files there. For ls -C in -current now: For the record, I like these files no where, but they are less intrusive = in /sys/conf. Even less intrusive would be in simply documenting the = options in a man page and leaving it at that. I also think that the = options have the potential to politicize code, which I really, really, = really, REALLY, don't like. Scott From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 18:16:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A98801065673; Sun, 19 Feb 2012 18:16:42 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF808FC12; Sun, 19 Feb 2012 18:16:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JIGgKQ009105; Sun, 19 Feb 2012 18:16:42 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JIGgo1009103; Sun, 19 Feb 2012 18:16:42 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201202191816.q1JIGgo1009103@svn.freebsd.org> From: Sergey Kandaurov Date: Sun, 19 Feb 2012 18:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231915 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 18:16:42 -0000 Author: pluknet Date: Sun Feb 19 18:16:42 2012 New Revision: 231915 URL: http://svn.freebsd.org/changeset/base/231915 Log: - Trim empty lines resulting in bad rendering, EOL whitespaces - Convert to our standard SYNOPSIS language - Consistently use "The .Nm driver" - Rewrite .nf .fi block with mdoc - Add pci dependency to SYNOPSIS - Start .Bl list with new paragraph Approved by: luigi Modified: head/share/man/man4/oce.4 Modified: head/share/man/man4/oce.4 ============================================================================== --- head/share/man/man4/oce.4 Sun Feb 19 12:25:58 2012 (r231914) +++ head/share/man/man4/oce.4 Sun Feb 19 18:16:42 2012 (r231915) @@ -36,9 +36,7 @@ .\" .\" $FreeBSD$ .\" - - -.Dd February 14, 2012 +.Dd February 19, 2012 .Dt OCE 4 .Os .Sh NAME @@ -49,10 +47,11 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device pci" .Cd "device oce" .Ed .Pp -To load the driver as a +Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent @@ -61,17 +60,21 @@ if_oce_load="YES" .Sh DESCRIPTION Emulex one connect adapters come in various skews and with different combinations of NIC, FCoE and iSCSI functions. -oce claims the NIC functions in all these adapters. +The +.Nm +driver claims the NIC functions in all these adapters. .Pp The .Nm driver supports VLAN Hardware offload, TCP checksum offload, TCP segmentation offload (TSO), Large receive offload (LRO), Bonding, Jumbo frames (from 1500 - 9000), Multiple TX queues, -Receive-Side Scaling(RSS) and MSI-X interrupts. +Receive-Side Scaling(RSS) and MSI-X interrupts. .Sh HARDWARE +The .Nm driver supports the following Emulex network adapters: +.Pp .Bl -bullet -compact .It BladeEngine 2 @@ -82,9 +85,9 @@ Lancer .El .Sh UPDATING FIRMWARE Adapter firmware updates are persistent. - +.Pp Firmware can be updated by following the steps below: -.nf +.Bd -literal -compact 1) Copy the below code to a Makefile ".KMOD=elxflash FIRMWS=imagename.ufi:elxflash @@ -94,18 +97,18 @@ Firmware can be updated by following the 4) Execute make & copy generated elxflash.ko to /lib/modules 5) sysctl dev.oce..fw_upgrade=elxflash 6) Reboot the machine. - +.Pp In case of issues with supplied UFI, flashing fails with one of the below errors. 1) "Invalid BE3 firmware image" 2) "Invalid Cookie. Firmware image corrupted ?" 3) "cmd to write to flash rom failed." -.fi +.Ed .Sh SUPPORT For general information and support, go to the Emulex website at: .Fa http://www.Emulex.com/ -or E-Mail at +or E-Mail at .Fa freebsd-drivers@emulex.com. .Sh SEE ALSO .Xr ifconfig 8 From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 18:18:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F2991065672; Sun, 19 Feb 2012 18:18:12 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 87F9F8FC0C; Sun, 19 Feb 2012 18:18:11 +0000 (UTC) Received: by lagz14 with SMTP id z14so8133739lag.13 for ; Sun, 19 Feb 2012 10:18:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=sXghk2H0i6+dAF/lA7+RxG18glNi0WNs8YzZsfVwKbE=; b=nTaiyxPqMbhBLpTPaZC77ALB8XZTTvyG3K9BZMxDaFHDwtk6TWlax0BUd2fK2zFuhr J1SSfx460cuTR5wPjPmM6l3pQFHX/nbT7aIKGAcZj9MM64pMBbV8kKVj4V0LSyzaKXtV 83bfJRFsxQsfAbXcA6eXhEmuRtfdnjuce3Bxs= MIME-Version: 1.0 Received: by 10.152.145.137 with SMTP id su9mr10830625lab.23.1329675490314; Sun, 19 Feb 2012 10:18:10 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.152.18.4 with HTTP; Sun, 19 Feb 2012 10:18:10 -0800 (PST) In-Reply-To: <201202191816.q1JIGgo1009103@svn.freebsd.org> References: <201202191816.q1JIGgo1009103@svn.freebsd.org> Date: Sun, 19 Feb 2012 21:18:10 +0300 X-Google-Sender-Auth: Qpw428DU0OAFILZjwEjPZUGAAOg Message-ID: From: Sergey Kandaurov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r231915 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 18:18:12 -0000 On 19 February 2012 22:16, Sergey Kandaurov wrote: > Author: pluknet > Date: Sun Feb 19 18:16:42 2012 > New Revision: 231915 > URL: http://svn.freebsd.org/changeset/base/231915 > > Log: > =A0- Trim empty lines resulting in bad rendering, EOL whitespaces > =A0- Convert to our standard SYNOPSIS language > =A0- Consistently use "The .Nm driver" > =A0- Rewrite .nf .fi block with mdoc > =A0- Add pci dependency to SYNOPSIS > =A0- Start .Bl list with new paragraph > > =A0Approved by: =A0luigi Should be read as: Approved by: luigi (previous version) --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 18:52:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 391E1106566B; Sun, 19 Feb 2012 18:52:52 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id ABF0A8FC0A; Sun, 19 Feb 2012 18:52:51 +0000 (UTC) Received: by yhfs35 with SMTP id s35so2723259yhf.13 for ; Sun, 19 Feb 2012 10:52:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IaQDIlwdrNUu4FZBTKcOJwHzyY7UkeXQ45+8KJPNMS4=; b=M4s90GmUsurD8iZcuJ1nFLVBy7ZBIfWAV2Rxs5A6OdCUmQC+HphnWIFikO7pL7Jw4N bgcKCSsi9WUI/GCc4/941Jqw94ygSbsKwmDcJ0qIeaC9g8HwdyFvGDwo9K1g1l1ubODN tQltBIospZcSaBink+BIaEhrMXTj4RkpXyIqM= MIME-Version: 1.0 Received: by 10.101.149.16 with SMTP id b16mr5796002ano.41.1329675950870; Sun, 19 Feb 2012 10:25:50 -0800 (PST) Received: by 10.236.22.138 with HTTP; Sun, 19 Feb 2012 10:25:50 -0800 (PST) In-Reply-To: <201202190744.q1J7icCo070188@svn.freebsd.org> References: <201202190744.q1J7icCo070188@svn.freebsd.org> Date: Sun, 19 Feb 2012 19:25:50 +0100 Message-ID: From: Oliver Pinter To: Robert Millan Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r231905 - in stable/9: share/mk sys/conf sys/modules sys/modules/drm sys/modules/sound/driver sys/modules/usb tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 18:52:52 -0000 why?! FreeBSD is not DEBIAN! don't to that... On 2/19/12, Robert Millan wrote: > Author: rmh > Date: Sun Feb 19 07:44:38 2012 > New Revision: 231905 > URL: http://svn.freebsd.org/changeset/base/231905 > > Log: > MFC r230972,r230980,r231559,r231565: Add MK_SOURCELESS build option, and > associated fixes. > > Approved by: kib (mentor) > > Added: > stable/9/sys/conf/WITHOUT_SOURCELESS > - copied unchanged from r231559, head/sys/conf/WITHOUT_SOURCELESS > stable/9/sys/conf/WITHOUT_SOURCELESS_HOST > - copied, changed from r231559, head/sys/conf/WITHOUT_SOURCELESS_HOST > stable/9/sys/conf/WITHOUT_SOURCELESS_UCODE > - copied unchanged from r231559, head/sys/conf/WITHOUT_SOURCELESS_UCODE > stable/9/tools/build/options/WITHOUT_SOURCELESS > - copied unchanged from r230972, > head/tools/build/options/WITHOUT_SOURCELESS > stable/9/tools/build/options/WITHOUT_SOURCELESS_HOST > - copied unchanged from r230972, > head/tools/build/options/WITHOUT_SOURCELESS_HOST > stable/9/tools/build/options/WITHOUT_SOURCELESS_UCODE > - copied unchanged from r230972, > head/tools/build/options/WITHOUT_SOURCELESS_UCODE > Modified: > stable/9/share/mk/bsd.own.mk > stable/9/sys/modules/Makefile > stable/9/sys/modules/drm/Makefile > stable/9/sys/modules/sound/driver/Makefile > stable/9/sys/modules/usb/Makefile > Directory Properties: > stable/9/share/mk/ (props changed) > stable/9/share/mk/bsd.arch.inc.mk (props changed) > stable/9/sys/ (props changed) > stable/9/sys/amd64/include/xen/ (props changed) > stable/9/sys/boot/ (props changed) > stable/9/sys/boot/i386/efi/ (props changed) > stable/9/sys/boot/ia64/efi/ (props changed) > stable/9/sys/boot/ia64/ski/ (props changed) > stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) > stable/9/sys/boot/powerpc/ofw/ (props changed) > stable/9/sys/cddl/contrib/opensolaris/ (props changed) > stable/9/sys/conf/ (props changed) > stable/9/sys/contrib/dev/acpica/ (props changed) > stable/9/sys/contrib/octeon-sdk/ (props changed) > stable/9/sys/contrib/pf/ (props changed) > stable/9/sys/contrib/x86emu/ (props changed) > stable/9/tools/build/options/ (props changed) > > Modified: stable/9/share/mk/bsd.own.mk > ============================================================================== > --- stable/9/share/mk/bsd.own.mk Sun Feb 19 00:28:49 2012 (r231904) > +++ stable/9/share/mk/bsd.own.mk Sun Feb 19 07:44:38 2012 (r231905) > @@ -316,6 +316,9 @@ __DEFAULT_YES_OPTIONS = \ > BOOT \ > BSD_CPIO \ > BSNMP \ > + SOURCELESS \ > + SOURCELESS_HOST \ > + SOURCELESS_UCODE \ > BZIP2 \ > CALENDAR \ please keep this list sorted! ... > CDDL \ > @@ -504,6 +507,11 @@ MK_BIND_UTILS:= no > MK_BIND_ETC:= no > .endif > > +.if ${MK_SOURCELESS} == "no" > +MK_SOURCELESS_HOST:= no > +MK_SOURCELESS_UCODE:= no > +.endif > + > .if ${MK_CDDL} == "no" > MK_ZFS:= no > .endif > > Copied: stable/9/sys/conf/WITHOUT_SOURCELESS (from r231559, > head/sys/conf/WITHOUT_SOURCELESS) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/9/sys/conf/WITHOUT_SOURCELESS Sun Feb 19 07:44:38 2012 (r231905, > copy of r231559, head/sys/conf/WITHOUT_SOURCELESS) > @@ -0,0 +1,7 @@ > +# > +# WITHOUT_SOURCELESS -- Disable drivers that include sourceless code. > +# > +# $FreeBSD$ > + > +include WITHOUT_SOURCELESS_HOST > +include WITHOUT_SOURCELESS_UCODE > > Copied and modified: stable/9/sys/conf/WITHOUT_SOURCELESS_HOST (from > r231559, head/sys/conf/WITHOUT_SOURCELESS_HOST) > ============================================================================== > --- head/sys/conf/WITHOUT_SOURCELESS_HOST Sun Feb 12 14:55:27 2012 (r231559, > copy source) > +++ stable/9/sys/conf/WITHOUT_SOURCELESS_HOST Sun Feb 19 07:44:38 > 2012 (r231905) > @@ -1,5 +1,5 @@ > # > -# WITHOUT_SOURCELESS_UCODE -- Disable drivers that include sourceless > +# WITHOUT_SOURCELESS_HOST -- Disable drivers that include sourceless > # native code for host CPU. > # > # $FreeBSD$ > > Copied: stable/9/sys/conf/WITHOUT_SOURCELESS_UCODE (from r231559, > head/sys/conf/WITHOUT_SOURCELESS_UCODE) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/9/sys/conf/WITHOUT_SOURCELESS_UCODE Sun Feb 19 07:44:38 > 2012 (r231905, copy of r231559, head/sys/conf/WITHOUT_SOURCELESS_UCODE) > @@ -0,0 +1,41 @@ > +# > +# WITHOUT_SOURCELESS_UCODE -- Disable drivers that include sourceless > +# microcode. > +# > +# $FreeBSD$ > + > +nodevice adw > +nodevice bce > +nodevice fatm > +nodevice fxp > +nodevice ispfw > +nodevice mwlfw > +nodevice ralfw > +nodevice runfw > +nodevice sf > +nodevice sn > +nodevice ti > +nodevice txp > +nodevice ce > +nodevice cp > +nodevice ctau > +nodevice ipwfw > +nodevice iwifw > +nodevice iwnfw > +nodevice wpifw > + > +# drm > +nodevice mga > +nodevice r128 > +nodevice radeon > + > +# sound > +nodevice csa > +nodevice ds1 > +nodevice maestro3 > + > +# usb > +nodevice rum > +nodevice uath > +nodevice zyd > +nodevice kue > > Modified: stable/9/sys/modules/Makefile > ============================================================================== > --- stable/9/sys/modules/Makefile Sun Feb 19 00:28:49 2012 (r231904) > +++ stable/9/sys/modules/Makefile Sun Feb 19 07:44:38 2012 (r231905) > @@ -2,6 +2,9 @@ > > .include > > +# Modules that include binary-only blobs of microcode should be selectable > by > +# MK_SOURCELESS_UCODE option (see below). > + > SUBDIR= ${_3dfx} \ > ${_3dfx_linux} \ > ${_aac} \ > @@ -37,7 +40,7 @@ SUBDIR= ${_3dfx} \ > ath \ > ath_pci \ > ${_auxio} \ > - bce \ > + ${_bce} \ > bfe \ > bge \ > ${_bxe} \ > @@ -94,13 +97,13 @@ SUBDIR= ${_3dfx} \ > ${_ex} \ > ${_exca} \ > ${_ext2fs} \ > - fatm \ > + ${_fatm} \ > fdc \ > fdescfs \ > ${_fe} \ > firewire \ > firmware \ > - fxp \ > + ${_fxp} \ > gem \ > geom \ > ${_glxiic} \ > @@ -148,7 +151,7 @@ SUBDIR= ${_3dfx} \ > ${_isci} \ > iscsi \ > isp \ > - ispfw \ > + ${_ispfw} \ > ${_iwi} \ > ${_iwifw} \ > ${_iwn} \ > @@ -209,7 +212,7 @@ SUBDIR= ${_3dfx} \ > ${_mthca} \ > mvs \ > mwl \ > - mwlfw \ > + ${_mwlfw} \ > mxge \ > my \ > ${_ncp} \ > @@ -260,14 +263,14 @@ SUBDIR= ${_3dfx} \ > puc \ > ${_qlxgb} \ > ral \ > - ralfw \ > + ${_ralfw} \ > ${_random} \ > rc4 \ > ${_rdma} \ > re \ > reiserfs \ > rl \ > - runfw \ > + ${_runfw} \ > ${_s3} \ > ${_safe} \ > ${_sbni} \ > @@ -277,7 +280,7 @@ SUBDIR= ${_3dfx} \ > sdhci \ > sem \ > send \ > - sf \ > + ${_sf} \ > ${_sfxge} \ > sge \ > siba_bwn \ > @@ -286,7 +289,7 @@ SUBDIR= ${_3dfx} \ > sis \ > sk \ > ${_smbfs} \ > - sn \ > + ${_sn} \ > ${_snc} \ > snp \ > ${_sound} \ > @@ -301,7 +304,7 @@ SUBDIR= ${_3dfx} \ > ${_sym} \ > ${_syscons} \ > sysvipc \ > - ti \ > + ${_ti} \ > tl \ > tmpfs \ > ${_tpm} \ > @@ -310,7 +313,7 @@ SUBDIR= ${_3dfx} \ > twe \ > tws \ > tx \ > - txp \ > + ${_txp} \ > uart \ > ubsec \ > udf \ > @@ -358,8 +361,10 @@ _vpo= vpo > # No barrier instruction support (specific to this driver) > _sym= sym > # intr_disable() is a macro, causes problems > +.if ${MK_SOURCELESS_UCODE} != "no" > _cxgb= cxgb > .endif > +.endif > > .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) > .if exists(${.CURDIR}/../opencrypto) > @@ -401,6 +406,20 @@ _pfsync= pfsync > .endif > .endif > > +.if ${MK_SOURCELESS_UCODE} != "no" > +_bce= bce > +_fatm= fatm > +_fxp= fxp > +_ispfw= ispfw > +_mwlfw= mwlfw > +_ralfw= ralfw > +_runfw= runfw > +_sf= sf > +_sn= sn > +_ti= ti > +_txp= txp > +.endif > + > .if ${MACHINE_CPUARCH} == "i386" > # XXX some of these can move to the general case when de-i386'ed > # XXX some of these can move now, but are untested on other architectures. > @@ -417,9 +436,13 @@ _bktr= bktr > _bxe= bxe > _cardbus= cardbus > _cbb= cbb > +.if ${MK_SOURCELESS_UCODE} != "no" > _ce= ce > +.endif > _coff= coff > +.if ${MK_SOURCELESS_UCODE} != "no" > _cp= cp > +.endif > _cpuctl= cpuctl > _cpufreq= cpufreq > _cs= cs > @@ -508,36 +531,52 @@ _ciss= ciss > _cm= cm > _cmx= cmx > _coretemp= coretemp > +.if ${MK_SOURCELESS_UCODE} != "no" > _ctau= ctau > +.endif > _dpt= dpt > _ex= ex > +.if ${MK_SOURCELESS_HOST} != "no" > _hpt27xx= hpt27xx > +.endif > _hptiop= hptiop > +.if ${MK_SOURCELESS_HOST} != "no" > _hptmv= hptmv > _hptrr= hptrr > +.endif > _ichwd= ichwd > _ida= ida > _iir= iir > _ipmi= ipmi > _ips= ips > _ipw= ipw > +.if ${MK_SOURCELESS_UCODE} != "no" > _ipwfw= ipwfw > +.endif > _isci= isci > _iwi= iwi > +.if ${MK_SOURCELESS_UCODE} != "no" > _iwifw= iwifw > +.endif > _iwn= iwn > +.if ${MK_SOURCELESS_UCODE} != "no" > _iwnfw= iwnfw > +.endif > _ixgb= ixgb > _ixgbe= ixgbe > _mly= mly > _nfe= nfe > +.if ${MK_SOURCELESS_HOST} != "no" > _nve= nve > +.endif > _nvram= nvram > _nxge= nxge > _tpm= tpm > _viawd= viawd > _wpi= wpi > +.if ${MK_SOURCELESS_UCODE} != "no" > _wpifw= wpifw > +.endif > .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) > _padlock= padlock > .endif > @@ -587,10 +626,14 @@ _et= et > _em= em > _exca= exca > _ext2fs= ext2fs > +.if ${MK_SOURCELESS_HOST} != "no" > _hpt27xx= hpt27xx > +.endif > _hptiop= hptiop > +.if ${MK_SOURCELESS_HOST} != "no" > _hptmv= hptmv > _hptrr= hptrr > +.endif > _i2c= i2c > _ichwd= ichwd > _ida= ida > @@ -601,12 +644,18 @@ _io= io > _ipmi= ipmi > _ips= ips > _ipw= ipw > +.if ${MK_SOURCELESS_UCODE} != "no" > _ipwfw= ipwfw > +.endif > _isci= isci > _iwi= iwi > +.if ${MK_SOURCELESS_UCODE} != "no" > _iwifw= iwifw > +.endif > _iwn= iwn > +.if ${MK_SOURCELESS_UCODE} != "no" > _iwnfw= iwnfw > +.endif > _ixgb= ixgb > _ixgbe= ixgbe > _lindev= lindev > @@ -622,7 +671,9 @@ _mthca= mthca > .endif > _ndis= ndis > _nfe= nfe > +.if ${MK_SOURCELESS_HOST} != "no" > _nve= nve > +.endif > _nvram= nvram > _nxge= nxge > .if ${MK_CDDL} != "no" || defined(ALL_MODULES) > @@ -651,7 +702,9 @@ _vxge= vxge > _x86bios= x86bios > _wi= wi > _wpi= wpi > +.if ${MK_SOURCELESS_UCODE} != "no" > _wpifw= wpifw > +.endif > .if ${MK_ZFS} != "no" || defined(ALL_MODULES) > _zfs= zfs > .endif > > Modified: stable/9/sys/modules/drm/Makefile > ============================================================================== > --- stable/9/sys/modules/drm/Makefile Sun Feb 19 00:28:49 2012 (r231904) > +++ stable/9/sys/modules/drm/Makefile Sun Feb 19 07:44:38 2012 (r231905) > @@ -1,15 +1,26 @@ > # $FreeBSD$ > > +.include > + > +# Modules that include binary-only blobs of microcode should be selectable > by > +# MK_SOURCELESS_UCODE option (see below). > + > SUBDIR = \ > drm \ > i915 \ > mach64 \ > - mga \ > - r128 \ > - radeon \ > + ${_mga} \ > + ${_r128} \ > + ${_radeon} \ > savage \ > sis \ > tdfx \ > via > > +.if ${MK_SOURCELESS_UCODE} != "no" > +_mga= mga > +_r128= r128 > +_radeon= radeon > +.endif > + > .include > > Modified: stable/9/sys/modules/sound/driver/Makefile > ============================================================================== > --- stable/9/sys/modules/sound/driver/Makefile Sun Feb 19 00:28:49 > 2012 (r231904) > +++ stable/9/sys/modules/sound/driver/Makefile Sun Feb 19 07:44:38 > 2012 (r231905) > @@ -1,10 +1,21 @@ > # $FreeBSD$ > > -SUBDIR= ad1816 als4000 atiixp cs4281 csa ds1 emu10k1 emu10kx > -SUBDIR+= envy24 envy24ht es137x ess fm801 hda ich maestro maestro3 > +.include > + > +# Modules that include binary-only blobs of microcode should be selectable > by > +# MK_SOURCELESS_UCODE option (see below). > + > +SUBDIR= ad1816 als4000 atiixp cs4281 ${_csa} ${_ds1} emu10k1 emu10kx > +SUBDIR+= envy24 envy24ht es137x ess fm801 hda ich maestro ${_maestro3} > SUBDIR+= neomagic sb16 sb8 sbc solo spicds t4dwave via8233 > SUBDIR+= via82c686 vibes driver uaudio > > +.if ${MK_SOURCELESS_UCODE} != "no" > +_csa= csa > +_ds1= ds1 > +_maestro3= maestro3 > +.endif > + > .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" > SUBDIR+= cmi mss > .endif > > Modified: stable/9/sys/modules/usb/Makefile > ============================================================================== > --- stable/9/sys/modules/usb/Makefile Sun Feb 19 00:28:49 2012 (r231904) > +++ stable/9/sys/modules/usb/Makefile Sun Feb 19 07:44:38 2012 (r231905) > @@ -25,16 +25,28 @@ > # SUCH DAMAGE. > # > > +.include > + > +# Modules that include binary-only blobs of microcode should be selectable > by > +# MK_SOURCELESS_UCODE option (see below). > + > SUBDIR = usb > SUBDIR += ehci musb ohci uhci xhci uss820dci ${_at91dci} ${_atmegadci} > ${_avr32dci} > -SUBDIR += rum run uath upgt usie ural zyd ${_urtw} > +SUBDIR += ${_rum} run ${_uath} upgt usie ural ${_zyd} ${_urtw} > SUBDIR += atp uhid ukbd ums udbp ufm uep > SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq > ulpt \ > umct umcs umodem umoscom uplcom uslcom uvisor uvscom > -SUBDIR += uether aue axe cdce cue kue mos rue udav uhso ipheth > +SUBDIR += uether aue axe cdce cue ${_kue} mos rue udav uhso ipheth > SUBDIR += usfs umass urio > SUBDIR += quirk template > > +.if ${MK_SOURCELESS_UCODE} != "no" > +_rum= rum > +_uath= uath > +_zyd= zyd > +_kue= kue > +.endif > + > .if ${MACHINE_CPUARCH} == "amd64" > _urtw= urtw > .endif > > Copied: stable/9/tools/build/options/WITHOUT_SOURCELESS (from r230972, > head/tools/build/options/WITHOUT_SOURCELESS) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/9/tools/build/options/WITHOUT_SOURCELESS Sun Feb 19 07:44:38 > 2012 (r231905, copy of r230972, head/tools/build/options/WITHOUT_SOURCELESS) > @@ -0,0 +1,2 @@ > +.\" $FreeBSD$ > +Set to not build kernel modules that include sourceless code (either > microcode or native code for host CPU). > > Copied: stable/9/tools/build/options/WITHOUT_SOURCELESS_HOST (from r230972, > head/tools/build/options/WITHOUT_SOURCELESS_HOST) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/9/tools/build/options/WITHOUT_SOURCELESS_HOST Sun Feb 19 07:44:38 > 2012 (r231905, copy of r230972, > head/tools/build/options/WITHOUT_SOURCELESS_HOST) > @@ -0,0 +1,2 @@ > +.\" $FreeBSD$ > +Set to not build kernel modules that include sourceless native code for > host CPU. > > Copied: stable/9/tools/build/options/WITHOUT_SOURCELESS_UCODE (from r230972, > head/tools/build/options/WITHOUT_SOURCELESS_UCODE) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/9/tools/build/options/WITHOUT_SOURCELESS_UCODE Sun Feb 19 > 07:44:38 2012 (r231905, copy of r230972, > head/tools/build/options/WITHOUT_SOURCELESS_UCODE) > @@ -0,0 +1,2 @@ > +.\" $FreeBSD$ > +Set to not build kernel modules that include sourceless microcode. > _______________________________________________ > svn-src-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable > To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org" > From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 20:15:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5C8E106564A; Sun, 19 Feb 2012 20:15:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C75418FC12; Sun, 19 Feb 2012 20:15:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JKFD7c013235; Sun, 19 Feb 2012 20:15:13 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JKFDJu013233; Sun, 19 Feb 2012 20:15:13 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201202192015.q1JKFDJu013233@svn.freebsd.org> From: Michael Tuexen Date: Sun, 19 Feb 2012 20:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231916 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 20:15:14 -0000 Author: tuexen Date: Sun Feb 19 20:15:13 2012 New Revision: 231916 URL: http://svn.freebsd.org/changeset/base/231916 Log: MFC 231672: Fix a bug where the wrong protocol overhead was used. This can lead to a deadlock of an association when an IPv6 socket was used to communicate with IPv4 and an ICMPv4 fragmentation needed message was received. While there, simplify the code a bit. Approved by: re@ Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sun Feb 19 18:16:42 2012 (r231915) +++ stable/8/sys/netinet/sctp_output.c Sun Feb 19 20:15:13 2012 (r231916) @@ -7612,16 +7612,22 @@ sctp_fill_outqueue(struct sctp_tcb *stcb SCTP_TCB_LOCK_ASSERT(stcb); asoc = &stcb->asoc; + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: + goal_mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; + break; +#endif #ifdef INET6 - if (net->ro._l_addr.sin6.sin6_family == AF_INET6) { + case AF_INET6: goal_mtu = net->mtu - SCTP_MIN_OVERHEAD; - } else { - /* ?? not sure what else to do */ - goal_mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; - } -#else - goal_mtu = net->mtu - SCTP_MIN_OVERHEAD; + break; #endif + default: + /* TSNH */ + goal_mtu = net->mtu; + break; + } /* Need an allowance for the data chunk header too */ goal_mtu -= sizeof(struct sctp_data_chunk); @@ -8180,10 +8186,21 @@ again_one_more_time: if (!no_out_cnt) *num_out += ctl_cnt; /* recalc a clean slate and setup */ - if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { - mtu = (net->mtu - SCTP_MIN_OVERHEAD); - } else { - mtu = (net->mtu - SCTP_MIN_V4_OVERHEAD); + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: + mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; + break; +#endif +#ifdef INET6 + case AF_INET6: + mtu = net->mtu - SCTP_MIN_OVERHEAD; + break; +#endif + default: + /* TSNH */ + mtu = net->mtu; + break; } to_out = 0; no_fragmentflg = 1; @@ -8446,10 +8463,21 @@ again_one_more_time: if (!no_out_cnt) *num_out += ctl_cnt; /* recalc a clean slate and setup */ - if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { - mtu = (net->mtu - SCTP_MIN_OVERHEAD); - } else { - mtu = (net->mtu - SCTP_MIN_V4_OVERHEAD); + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: + mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; + break; +#endif +#ifdef INET6 + case AF_INET6: + mtu = net->mtu - SCTP_MIN_OVERHEAD; + break; +#endif + default: + /* TSNH */ + mtu = net->mtu; + break; } to_out = 0; no_fragmentflg = 1; @@ -9492,10 +9520,21 @@ sctp_chunk_retransmission(struct sctp_in } /* pick up the net */ net = chk->whoTo; - if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { - mtu = (net->mtu - SCTP_MIN_OVERHEAD); - } else { + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; + break; +#endif +#ifdef INET6 + case AF_INET6: + mtu = net->mtu - SCTP_MIN_OVERHEAD; + break; +#endif + default: + /* TSNH */ + mtu = net->mtu; + break; } if ((asoc->peers_rwnd < mtu) && (asoc->total_flight > 0)) { @@ -9816,12 +9855,10 @@ one_chunk_around: return (0); } - -static int +static void sctp_timer_validation(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct sctp_association *asoc, - int ret) + struct sctp_association *asoc) { struct sctp_nets *net; @@ -9829,7 +9866,7 @@ sctp_timer_validation(struct sctp_inpcb TAILQ_FOREACH(net, &asoc->nets, sctp_next) { if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { /* Here is a timer */ - return (ret); + return; } } SCTP_TCB_LOCK_ASSERT(stcb); @@ -9840,7 +9877,7 @@ sctp_timer_validation(struct sctp_inpcb } else { sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, asoc->primary_destination); } - return (ret); + return; } void @@ -9950,7 +9987,7 @@ sctp_chunk_output(struct sctp_inpcb *inp #ifdef SCTP_AUDITING_ENABLED sctp_auditing(8, inp, stcb, NULL); #endif - (void)sctp_timer_validation(inp, stcb, asoc, ret); + sctp_timer_validation(inp, stcb, asoc); return; } if (ret < 0) { From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 22:24:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1930A1065701; Sun, 19 Feb 2012 22:24:02 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02FD18FC12; Sun, 19 Feb 2012 22:24:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JMO1k6017866; Sun, 19 Feb 2012 22:24:01 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JMO1K0017864; Sun, 19 Feb 2012 22:24:01 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201202192224.q1JMO1K0017864@svn.freebsd.org> From: Doug Barton Date: Sun, 19 Feb 2012 22:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231917 - stable/8/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 22:24:02 -0000 Author: dougb Date: Sun Feb 19 22:24:01 2012 New Revision: 231917 URL: http://svn.freebsd.org/changeset/base/231917 Log: Remove the last wrapper around force_depend ... missed in the r231667 MFC This is a direct commit to stable/8 because the file differs from that in HEAD Approved by: re (kib) Modified: stable/8/etc/rc.d/nfsd Modified: stable/8/etc/rc.d/nfsd ============================================================================== --- stable/8/etc/rc.d/nfsd Sun Feb 19 20:15:13 2012 (r231916) +++ stable/8/etc/rc.d/nfsd Sun Feb 19 22:24:01 2012 (r231917) @@ -25,11 +25,7 @@ nfsd_precmd() # rc_flags="-e ${nfs_server_flags}" - if ! checkyesno nfsuserd_enable && \ - ! /etc/rc.d/nfsuserd forcestatus 1>/dev/null 2>&1 - then - force_depend nfsuserd || return 1 - fi + force_depend nfsuserd || return 1 else rc_flags="${nfs_server_flags}" From owner-svn-src-all@FreeBSD.ORG Sun Feb 19 23:35:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD7491065672; Sun, 19 Feb 2012 23:35:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 935028FC0C; Sun, 19 Feb 2012 23:35:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1JNZusV020607; Sun, 19 Feb 2012 23:35:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1JNZunA020592; Sun, 19 Feb 2012 23:35:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201202192335.q1JNZunA020592@svn.freebsd.org> From: Dimitry Andric Date: Sun, 19 Feb 2012 23:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231919 - in stable/9: contrib/llvm/tools/bugpoint contrib/llvm/tools/llc contrib/llvm/tools/lli contrib/llvm/tools/llvm-ar contrib/llvm/tools/llvm-as contrib/llvm/tools/llvm-bcanalyzer... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 23:35:56 -0000 Author: dim Date: Sun Feb 19 23:35:56 2012 New Revision: 231919 URL: http://svn.freebsd.org/changeset/base/231919 Log: MFC r231057: Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default, that builds the following additional llvm/clang tools: - bugpoint - llc - lli - llvm-ar - llvm-as - llvm-bcanalyzer - llvm-diff - llvm-dis - llvm-extract - llvm-ld - llvm-link - llvm-mc - llvm-nm - llvm-objdump - llvm-prof - llvm-ranlib - llvm-rtdyld - llvm-stub - macho-dump - opt These tools are mainly useful for people that want to manipulate llvm bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker with llvm and clang themselves. Added: stable/9/contrib/llvm/tools/bugpoint/ - copied from r231057, head/contrib/llvm/tools/bugpoint/ stable/9/contrib/llvm/tools/llc/ - copied from r231057, head/contrib/llvm/tools/llc/ stable/9/contrib/llvm/tools/lli/ - copied from r231057, head/contrib/llvm/tools/lli/ stable/9/contrib/llvm/tools/llvm-ar/ - copied from r231057, head/contrib/llvm/tools/llvm-ar/ stable/9/contrib/llvm/tools/llvm-as/ - copied from r231057, head/contrib/llvm/tools/llvm-as/ stable/9/contrib/llvm/tools/llvm-bcanalyzer/ - copied from r231057, head/contrib/llvm/tools/llvm-bcanalyzer/ stable/9/contrib/llvm/tools/llvm-diff/ - copied from r231057, head/contrib/llvm/tools/llvm-diff/ stable/9/contrib/llvm/tools/llvm-dis/ - copied from r231057, head/contrib/llvm/tools/llvm-dis/ stable/9/contrib/llvm/tools/llvm-extract/ - copied from r231057, head/contrib/llvm/tools/llvm-extract/ stable/9/contrib/llvm/tools/llvm-ld/ - copied from r231057, head/contrib/llvm/tools/llvm-ld/ stable/9/contrib/llvm/tools/llvm-link/ - copied from r231057, head/contrib/llvm/tools/llvm-link/ stable/9/contrib/llvm/tools/llvm-mc/ - copied from r231057, head/contrib/llvm/tools/llvm-mc/ stable/9/contrib/llvm/tools/llvm-nm/ - copied from r231057, head/contrib/llvm/tools/llvm-nm/ stable/9/contrib/llvm/tools/llvm-objdump/ - copied from r231057, head/contrib/llvm/tools/llvm-objdump/ stable/9/contrib/llvm/tools/llvm-prof/ - copied from r231057, head/contrib/llvm/tools/llvm-prof/ stable/9/contrib/llvm/tools/llvm-ranlib/ - copied from r231057, head/contrib/llvm/tools/llvm-ranlib/ stable/9/contrib/llvm/tools/llvm-rtdyld/ - copied from r231057, head/contrib/llvm/tools/llvm-rtdyld/ stable/9/contrib/llvm/tools/llvm-stub/ - copied from r231057, head/contrib/llvm/tools/llvm-stub/ stable/9/contrib/llvm/tools/macho-dump/ - copied from r231057, head/contrib/llvm/tools/macho-dump/ stable/9/contrib/llvm/tools/opt/ - copied from r231057, head/contrib/llvm/tools/opt/ stable/9/lib/clang/libllvmarchive/ - copied from r231057, head/lib/clang/libllvmarchive/ stable/9/lib/clang/libllvmdebuginfo/ - copied from r231057, head/lib/clang/libllvmdebuginfo/ stable/9/lib/clang/libllvmexecutionengine/ - copied from r231057, head/lib/clang/libllvmexecutionengine/ stable/9/lib/clang/libllvminterpreter/ - copied from r231057, head/lib/clang/libllvminterpreter/ stable/9/lib/clang/libllvmjit/ - copied from r231057, head/lib/clang/libllvmjit/ stable/9/lib/clang/libllvmlinker/ - copied from r231057, head/lib/clang/libllvmlinker/ stable/9/lib/clang/libllvmmcdisassembler/ - copied from r231057, head/lib/clang/libllvmmcdisassembler/ stable/9/lib/clang/libllvmmcjit/ - copied from r231057, head/lib/clang/libllvmmcjit/ stable/9/lib/clang/libllvmobject/ - copied from r231057, head/lib/clang/libllvmobject/ stable/9/lib/clang/libllvmruntimedyld/ - copied from r231057, head/lib/clang/libllvmruntimedyld/ stable/9/tools/build/options/WITH_CLANG_EXTRAS - copied unchanged from r231057, head/tools/build/options/WITH_CLANG_EXTRAS stable/9/usr.bin/clang/bugpoint/ - copied from r231057, head/usr.bin/clang/bugpoint/ stable/9/usr.bin/clang/llc/ - copied from r231057, head/usr.bin/clang/llc/ stable/9/usr.bin/clang/lli/ - copied from r231057, head/usr.bin/clang/lli/ stable/9/usr.bin/clang/llvm-ar/ - copied from r231057, head/usr.bin/clang/llvm-ar/ stable/9/usr.bin/clang/llvm-as/ - copied from r231057, head/usr.bin/clang/llvm-as/ stable/9/usr.bin/clang/llvm-bcanalyzer/ - copied from r231057, head/usr.bin/clang/llvm-bcanalyzer/ stable/9/usr.bin/clang/llvm-diff/ - copied from r231057, head/usr.bin/clang/llvm-diff/ stable/9/usr.bin/clang/llvm-dis/ - copied from r231057, head/usr.bin/clang/llvm-dis/ stable/9/usr.bin/clang/llvm-extract/ - copied from r231057, head/usr.bin/clang/llvm-extract/ stable/9/usr.bin/clang/llvm-ld/ - copied from r231057, head/usr.bin/clang/llvm-ld/ stable/9/usr.bin/clang/llvm-link/ - copied from r231057, head/usr.bin/clang/llvm-link/ stable/9/usr.bin/clang/llvm-mc/ - copied from r231057, head/usr.bin/clang/llvm-mc/ stable/9/usr.bin/clang/llvm-nm/ - copied from r231057, head/usr.bin/clang/llvm-nm/ stable/9/usr.bin/clang/llvm-objdump/ - copied from r231057, head/usr.bin/clang/llvm-objdump/ stable/9/usr.bin/clang/llvm-prof/ - copied from r231057, head/usr.bin/clang/llvm-prof/ stable/9/usr.bin/clang/llvm-ranlib/ - copied from r231057, head/usr.bin/clang/llvm-ranlib/ stable/9/usr.bin/clang/llvm-rtdyld/ - copied from r231057, head/usr.bin/clang/llvm-rtdyld/ stable/9/usr.bin/clang/llvm-stub/ - copied from r231057, head/usr.bin/clang/llvm-stub/ stable/9/usr.bin/clang/macho-dump/ - copied from r231057, head/usr.bin/clang/macho-dump/ stable/9/usr.bin/clang/opt/ - copied from r231057, head/usr.bin/clang/opt/ Modified: stable/9/lib/clang/Makefile stable/9/lib/clang/libllvmanalysis/Makefile stable/9/lib/clang/libllvmipa/Makefile stable/9/lib/clang/libllvmipo/Makefile stable/9/lib/clang/libllvmmc/Makefile stable/9/lib/clang/libllvmscalaropts/Makefile stable/9/lib/clang/libllvmsupport/Makefile stable/9/lib/clang/libllvmtransformutils/Makefile stable/9/lib/clang/libllvmx86disassembler/Makefile stable/9/share/man/man5/src.conf.5 stable/9/share/mk/bsd.own.mk stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.bin/clang/Makefile Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/lib/clang/ (props changed) stable/9/share/man/man5/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.bin/clang/ (props changed) Modified: stable/9/lib/clang/Makefile ============================================================================== --- stable/9/lib/clang/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/lib/clang/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .if !make(install) SUBDIR= libclanganalysis \ libclangarcmigrate \ @@ -60,6 +62,19 @@ SUBDIR= libclanganalysis \ libllvmx86info \ libllvmx86instprinter \ libllvmx86utils + +.if ${MK_CLANG_EXTRAS} != "no" +SUBDIR+=libllvmarchive \ + libllvmdebuginfo \ + libllvmexecutionengine \ + libllvminterpreter \ + libllvmjit \ + libllvmlinker \ + libllvmmcdisassembler \ + libllvmmcjit \ + libllvmobject \ + libllvmruntimedyld +.endif .endif SUBDIR+= include Modified: stable/9/lib/clang/libllvmanalysis/Makefile ============================================================================== --- stable/9/lib/clang/libllvmanalysis/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/lib/clang/libllvmanalysis/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmanalysis SRCDIR= lib/Analysis @@ -55,6 +57,14 @@ SRCS= AliasAnalysis.cpp \ TypeBasedAliasAnalysis.cpp \ ValueTracking.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= BlockFrequencyInfo.cpp \ + LibCallSemantics.cpp \ + PathNumbering.cpp \ + PathProfileInfo.cpp \ + PathProfileVerifier.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: stable/9/lib/clang/libllvmipa/Makefile ============================================================================== --- stable/9/lib/clang/libllvmipa/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/lib/clang/libllvmipa/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmipa SRCDIR= lib/Analysis/IPA @@ -8,6 +10,10 @@ SRCS= CallGraph.cpp \ FindUsedTypes.cpp \ GlobalsModRef.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= IPA.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: stable/9/lib/clang/libllvmipo/Makefile ============================================================================== --- stable/9/lib/clang/libllvmipo/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/lib/clang/libllvmipo/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmipo SRCDIR= lib/Transforms/IPO @@ -23,6 +25,10 @@ SRCS= ArgumentPromotion.cpp \ StripDeadPrototypes.cpp \ StripSymbols.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= IPO.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: stable/9/lib/clang/libllvmmc/Makefile ============================================================================== --- stable/9/lib/clang/libllvmmc/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/lib/clang/libllvmmc/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmmc SRCDIR= lib/MC @@ -43,4 +45,8 @@ SRCS= ELFObjectWriter.cpp \ WinCOFFObjectWriter.cpp \ WinCOFFStreamer.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= MCDisassembler.cpp +.endif + .include "../clang.lib.mk" Modified: stable/9/lib/clang/libllvmscalaropts/Makefile ============================================================================== --- stable/9/lib/clang/libllvmscalaropts/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/lib/clang/libllvmscalaropts/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmscalaropts SRCDIR= lib/Transforms/Scalar @@ -31,6 +33,13 @@ SRCS= ADCE.cpp \ Sink.cpp \ TailRecursionElimination.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= LoopInstSimplify.cpp \ + LowerAtomic.cpp \ + Reg2Mem.cpp \ + Scalar.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: stable/9/lib/clang/libllvmsupport/Makefile ============================================================================== --- stable/9/lib/clang/libllvmsupport/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/lib/clang/libllvmsupport/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmsupport SRCDIR= lib/Support @@ -67,4 +69,14 @@ SRCS= APFloat.cpp \ system_error.cpp LLVM_REQUIRES_RTTI= +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= BlockFrequency.cpp \ + BranchProbability.cpp \ + DataExtractor.cpp \ + Disassembler.cpp \ + FileUtilities.cpp \ + MemoryObject.cpp \ + SystemUtils.cpp +.endif + .include "../clang.lib.mk" Modified: stable/9/lib/clang/libllvmtransformutils/Makefile ============================================================================== --- stable/9/lib/clang/libllvmtransformutils/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/lib/clang/libllvmtransformutils/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmtransformutils SRCDIR= lib/Transforms/Utils @@ -29,6 +31,11 @@ SRCS= AddrModeMatcher.cpp \ UnifyFunctionExitNodes.cpp \ ValueMapper.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= SimplifyInstructions.cpp \ + Utils.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: stable/9/lib/clang/libllvmx86disassembler/Makefile ============================================================================== --- stable/9/lib/clang/libllvmx86disassembler/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/lib/clang/libllvmx86disassembler/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,11 +1,17 @@ # $FreeBSD$ +.include + LIB= llvmx86disassembler SRCDIR= lib/Target/X86/Disassembler INCDIR= lib/Target/X86 SRCS= X86Disassembler.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= X86DisassemblerDecoder.c +.endif + TGHDRS= X86GenDisassemblerTables \ X86GenEDInfo \ X86GenInstrInfo \ Modified: stable/9/share/man/man5/src.conf.5 ============================================================================== --- stable/9/share/man/man5/src.conf.5 Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/share/man/man5/src.conf.5 Sun Feb 19 23:35:56 2012 (r231919) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd June 17, 2011 +.Dd February 6, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -266,12 +266,21 @@ Set to not build the Clang C/C++ compile .Pp It is a default setting on arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, powerpc/powerpc64 and sparc64/sparc64. +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_CLANG_EXTRAS +.El .It Va WITH_CLANG .\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru Set to build the Clang C/C++ compiler. .Pp It is a default setting on amd64/amd64, i386/i386, pc98/i386 and powerpc/powerpc. +.It Va WITH_CLANG_EXTRAS +.\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim +Set to build additional clang and llvm tools, such as bugpoint. .It Va WITHOUT_CPP .\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/share/mk/bsd.own.mk Sun Feb 19 23:35:56 2012 (r231919) @@ -413,6 +413,7 @@ __DEFAULT_NO_OPTIONS = \ BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ + CLANG_EXTRAS \ HESIOD \ ICONV \ IDEA \ @@ -516,6 +517,10 @@ MK_SOURCELESS_UCODE:= no MK_ZFS:= no .endif +.if ${MK_CLANG} == "no" +MK_CLANG_EXTRAS:= no +.endif + .if ${MK_CRYPT} == "no" MK_OPENSSL:= no MK_OPENSSH:= no Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 19 23:35:56 2012 (r231919) @@ -671,6 +671,44 @@ OLD_FILES+=usr/share/man/man1/clang-cpp. OLD_FILES+=usr/share/man/man1/tblgen.1.gz .endif +.if ${MK_CLANG_EXTRAS} == no +OLD_FILES+=usr/bin/bugpoint +OLD_FILES+=usr/bin/llc +OLD_FILES+=usr/bin/lli +OLD_FILES+=usr/bin/llvm-ar +OLD_FILES+=usr/bin/llvm-as +OLD_FILES+=usr/bin/llvm-bcanalyzer +OLD_FILES+=usr/bin/llvm-diff +OLD_FILES+=usr/bin/llvm-dis +OLD_FILES+=usr/bin/llvm-extract +OLD_FILES+=usr/bin/llvm-ld +OLD_FILES+=usr/bin/llvm-link +OLD_FILES+=usr/bin/llvm-mc +OLD_FILES+=usr/bin/llvm-nm +OLD_FILES+=usr/bin/llvm-objdump +OLD_FILES+=usr/bin/llvm-prof +OLD_FILES+=usr/bin/llvm-ranlib +OLD_FILES+=usr/bin/llvm-rtdyld +OLD_FILES+=usr/bin/llvm-stub +OLD_FILES+=usr/bin/macho-dump +OLD_FILES+=usr/bin/opt +OLD_FILES+=usr/share/man/man1/bugpoint.1.gz +OLD_FILES+=usr/share/man/man1/llc.1.gz +OLD_FILES+=usr/share/man/man1/lli.1.gz +OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz +OLD_FILES+=usr/share/man/man1/llvm-as.1.gz +OLD_FILES+=usr/share/man/man1/llvm-bcanalyzer.1.gz +OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz +OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz +OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz +OLD_FILES+=usr/share/man/man1/llvm-ld.1.gz +OLD_FILES+=usr/share/man/man1/llvm-link.1.gz +OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz +OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz +OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz +OLD_FILES+=usr/share/man/man1/opt.1.gz +.endif + .if ${MK_CPP} == no OLD_FILES+=usr/bin/cpp OLD_FILES+=usr/share/man/man1/cpp.1.gz Copied: stable/9/tools/build/options/WITH_CLANG_EXTRAS (from r231057, head/tools/build/options/WITH_CLANG_EXTRAS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITH_CLANG_EXTRAS Sun Feb 19 23:35:56 2012 (r231919, copy of r231057, head/tools/build/options/WITH_CLANG_EXTRAS) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build additional clang and llvm tools, such as bugpoint. Modified: stable/9/usr.bin/clang/Makefile ============================================================================== --- stable/9/usr.bin/clang/Makefile Sun Feb 19 22:44:14 2012 (r231918) +++ stable/9/usr.bin/clang/Makefile Sun Feb 19 23:35:56 2012 (r231919) @@ -1,5 +1,30 @@ # $FreeBSD$ +.include + SUBDIR= clang clang-tblgen tblgen +.if ${MK_CLANG_EXTRAS} != "no" +SUBDIR+=bugpoint \ + llc \ + lli \ + llvm-ar \ + llvm-as \ + llvm-bcanalyzer \ + llvm-diff \ + llvm-dis \ + llvm-extract \ + llvm-ld \ + llvm-link \ + llvm-mc \ + llvm-nm \ + llvm-objdump \ + llvm-prof \ + llvm-ranlib \ + llvm-rtdyld \ + llvm-stub \ + macho-dump \ + opt +.endif + .include From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 00:54:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9698D106564A; Mon, 20 Feb 2012 00:54:01 +0000 (UTC) (envelope-from mp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0928FC0A; Mon, 20 Feb 2012 00:54:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1K0s1DX023470; Mon, 20 Feb 2012 00:54:01 GMT (envelope-from mp@svn.freebsd.org) Received: (from mp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1K0s1Od023464; Mon, 20 Feb 2012 00:54:01 GMT (envelope-from mp@svn.freebsd.org) Message-Id: <201202200054.q1K0s1Od023464@svn.freebsd.org> From: Mark Peek Date: Mon, 20 Feb 2012 00:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231921 - in vendor/tcsh/dist: . config cygwin nls nls/C nls/et nls/finnish nls/french nls/german nls/greek nls/italian nls/ja nls/pl nls/russian nls/spanish nls/ukrainian tests win32 w... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 00:54:01 -0000 Author: mp Date: Mon Feb 20 00:53:59 2012 New Revision: 231921 URL: http://svn.freebsd.org/changeset/base/231921 Log: Import of tcsh-6.18.01 Added: vendor/tcsh/dist/BUGS vendor/tcsh/dist/config/aix vendor/tcsh/dist/config/alliant vendor/tcsh/dist/config/amdahl vendor/tcsh/dist/config/amiga vendor/tcsh/dist/config/android vendor/tcsh/dist/config/apollo vendor/tcsh/dist/config/bs2000 vendor/tcsh/dist/config/bsd vendor/tcsh/dist/config/bsdreno vendor/tcsh/dist/config/clipper vendor/tcsh/dist/config/coh3 vendor/tcsh/dist/config/convex vendor/tcsh/dist/config/cray vendor/tcsh/dist/config/csos vendor/tcsh/dist/config/cygwin vendor/tcsh/dist/config/decosf1 vendor/tcsh/dist/config/dgux vendor/tcsh/dist/config/dgux5.4 vendor/tcsh/dist/config/dnix5.3 vendor/tcsh/dist/config/emx vendor/tcsh/dist/config/eta10 vendor/tcsh/dist/config/ews vendor/tcsh/dist/config/fortune vendor/tcsh/dist/config/fps500 vendor/tcsh/dist/config/hcx vendor/tcsh/dist/config/hk68 vendor/tcsh/dist/config/hp-3.2 vendor/tcsh/dist/config/hp-5.2 vendor/tcsh/dist/config/hpbsd2 vendor/tcsh/dist/config/hposf1 vendor/tcsh/dist/config/hpux11 vendor/tcsh/dist/config/hpux7 vendor/tcsh/dist/config/hpux8 vendor/tcsh/dist/config/iconuxv vendor/tcsh/dist/config/intel vendor/tcsh/dist/config/irix vendor/tcsh/dist/config/irix62 vendor/tcsh/dist/config/isc202 vendor/tcsh/dist/config/isc3.0 vendor/tcsh/dist/config/isc4.0 vendor/tcsh/dist/config/linux vendor/tcsh/dist/config/lynx2.1 vendor/tcsh/dist/config/mac2 vendor/tcsh/dist/config/mach vendor/tcsh/dist/config/machten vendor/tcsh/dist/config/masscomp vendor/tcsh/dist/config/minix vendor/tcsh/dist/config/mips vendor/tcsh/dist/config/mtXinu vendor/tcsh/dist/config/opus vendor/tcsh/dist/config/os390 vendor/tcsh/dist/config/osf1 vendor/tcsh/dist/config/parosf1 vendor/tcsh/dist/config/powermaxos vendor/tcsh/dist/config/pyr vendor/tcsh/dist/config/pyratt vendor/tcsh/dist/config/qnx6 vendor/tcsh/dist/config/sco+odt vendor/tcsh/dist/config/sco32v2 vendor/tcsh/dist/config/sco32v4 vendor/tcsh/dist/config/sco32v5 vendor/tcsh/dist/config/sequent vendor/tcsh/dist/config/sinix vendor/tcsh/dist/config/sol2 vendor/tcsh/dist/config/sol22 vendor/tcsh/dist/config/sol23 vendor/tcsh/dist/config/sol24 vendor/tcsh/dist/config/sol26 vendor/tcsh/dist/config/sol29 vendor/tcsh/dist/config/stellar vendor/tcsh/dist/config/sunos35 vendor/tcsh/dist/config/sunos40 vendor/tcsh/dist/config/sunos41 vendor/tcsh/dist/config/sunos413 vendor/tcsh/dist/config/supermax vendor/tcsh/dist/config/superux8 vendor/tcsh/dist/config/sxa vendor/tcsh/dist/config/sysV68 vendor/tcsh/dist/config/sysV88 vendor/tcsh/dist/config/sysv vendor/tcsh/dist/config/sysv2 vendor/tcsh/dist/config/sysv3 vendor/tcsh/dist/config/sysv4 vendor/tcsh/dist/config/tc2000 vendor/tcsh/dist/config/tekXD88 vendor/tcsh/dist/config/ultrix vendor/tcsh/dist/config/unixpc vendor/tcsh/dist/config/uwin vendor/tcsh/dist/config/vms vendor/tcsh/dist/config/win32 vendor/tcsh/dist/config/xenix vendor/tcsh/dist/cygwin/ vendor/tcsh/dist/cygwin/bindkey.tcsh vendor/tcsh/dist/cygwin/csh.cshrc vendor/tcsh/dist/cygwin/csh.login vendor/tcsh/dist/cygwin/postinstall.sh (contents, props changed) vendor/tcsh/dist/cygwin/preremove.sh (contents, props changed) vendor/tcsh/dist/nls/Makefile.in vendor/tcsh/dist/nls/catgen (contents, props changed) vendor/tcsh/dist/svn vendor/tcsh/dist/tcsh.vcproj (contents, props changed) vendor/tcsh/dist/tests/ vendor/tcsh/dist/tests/aliases.at vendor/tcsh/dist/tests/arguments.at vendor/tcsh/dist/tests/commands.at vendor/tcsh/dist/tests/expr.at vendor/tcsh/dist/tests/history.at vendor/tcsh/dist/tests/lexical.at vendor/tcsh/dist/tests/mb-eucjp.at (contents, props changed) vendor/tcsh/dist/tests/mb-utf8.at (contents, props changed) vendor/tcsh/dist/tests/noexec.at vendor/tcsh/dist/tests/sh.dol.at vendor/tcsh/dist/tests/subst.at vendor/tcsh/dist/tests/syntax.at vendor/tcsh/dist/tests/testsuite.at vendor/tcsh/dist/tests/variables.at vendor/tcsh/dist/win32/ vendor/tcsh/dist/win32/BSDLOGO.BMP (contents, props changed) vendor/tcsh/dist/win32/BSDLOGO.ICO (contents, props changed) vendor/tcsh/dist/win32/BSDLOGO.RC vendor/tcsh/dist/win32/CODING vendor/tcsh/dist/win32/ChangeLog vendor/tcsh/dist/win32/Contributors vendor/tcsh/dist/win32/Makefile.win32 vendor/tcsh/dist/win32/README.NT vendor/tcsh/dist/win32/WindowsReadme.1st vendor/tcsh/dist/win32/bogus.c vendor/tcsh/dist/win32/clip.c vendor/tcsh/dist/win32/console.c vendor/tcsh/dist/win32/customstep.cmd vendor/tcsh/dist/win32/dirent.c vendor/tcsh/dist/win32/dirent.h vendor/tcsh/dist/win32/example.tcshrc vendor/tcsh/dist/win32/fork.c vendor/tcsh/dist/win32/forkdata.h vendor/tcsh/dist/win32/globals.c vendor/tcsh/dist/win32/io.c vendor/tcsh/dist/win32/msg/ vendor/tcsh/dist/win32/msg/Makefile vendor/tcsh/dist/win32/msg/makerc.pl vendor/tcsh/dist/win32/msg/makercjp.pl vendor/tcsh/dist/win32/msg/makercrc.pl vendor/tcsh/dist/win32/msg/stubdll.c vendor/tcsh/dist/win32/msg/test.c vendor/tcsh/dist/win32/nt.bind.c vendor/tcsh/dist/win32/nt.char.c vendor/tcsh/dist/win32/nt.const.c vendor/tcsh/dist/win32/nt.screen.c vendor/tcsh/dist/win32/nt.who.c vendor/tcsh/dist/win32/ntb1.c vendor/tcsh/dist/win32/ntb2.c vendor/tcsh/dist/win32/ntfunc.c vendor/tcsh/dist/win32/ntport.h vendor/tcsh/dist/win32/ps.c vendor/tcsh/dist/win32/signal.c vendor/tcsh/dist/win32/signal.h vendor/tcsh/dist/win32/stdio.c vendor/tcsh/dist/win32/support.c vendor/tcsh/dist/win32/tcshrc.rc vendor/tcsh/dist/win32/version.h Deleted: vendor/tcsh/dist/nls/Makefile Modified: vendor/tcsh/dist/Fixes vendor/tcsh/dist/Imakefile vendor/tcsh/dist/Makefile.in vendor/tcsh/dist/Ported vendor/tcsh/dist/README vendor/tcsh/dist/WishList vendor/tcsh/dist/complete.tcsh vendor/tcsh/dist/config.guess vendor/tcsh/dist/config.h.in vendor/tcsh/dist/config.sub vendor/tcsh/dist/config/bsd4.4 vendor/tcsh/dist/config_f.h vendor/tcsh/dist/configure vendor/tcsh/dist/configure.in vendor/tcsh/dist/ed.chared.c vendor/tcsh/dist/ed.inputl.c vendor/tcsh/dist/ed.refresh.c vendor/tcsh/dist/ed.screen.c vendor/tcsh/dist/ed.term.c vendor/tcsh/dist/gethost.c vendor/tcsh/dist/glob.c vendor/tcsh/dist/glob.h vendor/tcsh/dist/host.defs vendor/tcsh/dist/install-sh vendor/tcsh/dist/nls/C/charset vendor/tcsh/dist/nls/C/set19 vendor/tcsh/dist/nls/et/charset vendor/tcsh/dist/nls/et/set1 vendor/tcsh/dist/nls/et/set10 vendor/tcsh/dist/nls/et/set11 vendor/tcsh/dist/nls/et/set13 vendor/tcsh/dist/nls/et/set14 vendor/tcsh/dist/nls/et/set15 vendor/tcsh/dist/nls/et/set16 vendor/tcsh/dist/nls/et/set17 vendor/tcsh/dist/nls/et/set18 vendor/tcsh/dist/nls/et/set19 vendor/tcsh/dist/nls/et/set2 vendor/tcsh/dist/nls/et/set20 vendor/tcsh/dist/nls/et/set21 vendor/tcsh/dist/nls/et/set22 vendor/tcsh/dist/nls/et/set23 vendor/tcsh/dist/nls/et/set24 vendor/tcsh/dist/nls/et/set25 vendor/tcsh/dist/nls/et/set26 vendor/tcsh/dist/nls/et/set27 vendor/tcsh/dist/nls/et/set3 vendor/tcsh/dist/nls/et/set30 vendor/tcsh/dist/nls/et/set4 vendor/tcsh/dist/nls/et/set5 vendor/tcsh/dist/nls/et/set6 vendor/tcsh/dist/nls/et/set7 vendor/tcsh/dist/nls/et/set8 vendor/tcsh/dist/nls/et/set9 vendor/tcsh/dist/nls/finnish/charset vendor/tcsh/dist/nls/finnish/set1 vendor/tcsh/dist/nls/finnish/set10 vendor/tcsh/dist/nls/finnish/set11 vendor/tcsh/dist/nls/finnish/set12 vendor/tcsh/dist/nls/finnish/set13 vendor/tcsh/dist/nls/finnish/set14 vendor/tcsh/dist/nls/finnish/set16 vendor/tcsh/dist/nls/finnish/set17 vendor/tcsh/dist/nls/finnish/set18 vendor/tcsh/dist/nls/finnish/set19 vendor/tcsh/dist/nls/finnish/set2 vendor/tcsh/dist/nls/finnish/set20 vendor/tcsh/dist/nls/finnish/set22 vendor/tcsh/dist/nls/finnish/set23 vendor/tcsh/dist/nls/finnish/set25 vendor/tcsh/dist/nls/finnish/set26 vendor/tcsh/dist/nls/finnish/set27 vendor/tcsh/dist/nls/finnish/set29 vendor/tcsh/dist/nls/finnish/set3 vendor/tcsh/dist/nls/finnish/set6 vendor/tcsh/dist/nls/finnish/set7 vendor/tcsh/dist/nls/finnish/set9 vendor/tcsh/dist/nls/french/charset vendor/tcsh/dist/nls/french/set1 vendor/tcsh/dist/nls/french/set10 vendor/tcsh/dist/nls/french/set11 vendor/tcsh/dist/nls/french/set12 vendor/tcsh/dist/nls/french/set13 vendor/tcsh/dist/nls/french/set15 vendor/tcsh/dist/nls/french/set16 vendor/tcsh/dist/nls/french/set17 vendor/tcsh/dist/nls/french/set18 vendor/tcsh/dist/nls/french/set19 vendor/tcsh/dist/nls/french/set2 vendor/tcsh/dist/nls/french/set20 vendor/tcsh/dist/nls/french/set21 vendor/tcsh/dist/nls/french/set22 vendor/tcsh/dist/nls/french/set23 vendor/tcsh/dist/nls/french/set25 vendor/tcsh/dist/nls/french/set26 vendor/tcsh/dist/nls/french/set27 vendor/tcsh/dist/nls/french/set3 vendor/tcsh/dist/nls/french/set30 vendor/tcsh/dist/nls/french/set31 vendor/tcsh/dist/nls/french/set4 vendor/tcsh/dist/nls/french/set6 vendor/tcsh/dist/nls/french/set7 vendor/tcsh/dist/nls/french/set8 vendor/tcsh/dist/nls/french/set9 vendor/tcsh/dist/nls/german/charset vendor/tcsh/dist/nls/german/set1 vendor/tcsh/dist/nls/german/set10 vendor/tcsh/dist/nls/german/set13 vendor/tcsh/dist/nls/german/set15 vendor/tcsh/dist/nls/german/set16 vendor/tcsh/dist/nls/german/set17 vendor/tcsh/dist/nls/german/set18 vendor/tcsh/dist/nls/german/set19 vendor/tcsh/dist/nls/german/set2 vendor/tcsh/dist/nls/german/set20 vendor/tcsh/dist/nls/german/set22 vendor/tcsh/dist/nls/german/set23 vendor/tcsh/dist/nls/german/set25 vendor/tcsh/dist/nls/german/set26 vendor/tcsh/dist/nls/german/set27 vendor/tcsh/dist/nls/german/set29 vendor/tcsh/dist/nls/german/set3 vendor/tcsh/dist/nls/german/set30 vendor/tcsh/dist/nls/german/set31 vendor/tcsh/dist/nls/german/set4 vendor/tcsh/dist/nls/german/set5 vendor/tcsh/dist/nls/german/set6 vendor/tcsh/dist/nls/german/set7 vendor/tcsh/dist/nls/german/set8 vendor/tcsh/dist/nls/german/set9 vendor/tcsh/dist/nls/greek/charset vendor/tcsh/dist/nls/greek/set1 (contents, props changed) vendor/tcsh/dist/nls/greek/set10 (contents, props changed) vendor/tcsh/dist/nls/greek/set11 (contents, props changed) vendor/tcsh/dist/nls/greek/set12 (contents, props changed) vendor/tcsh/dist/nls/greek/set13 (contents, props changed) vendor/tcsh/dist/nls/greek/set14 (contents, props changed) vendor/tcsh/dist/nls/greek/set15 (contents, props changed) vendor/tcsh/dist/nls/greek/set16 (contents, props changed) vendor/tcsh/dist/nls/greek/set17 (contents, props changed) vendor/tcsh/dist/nls/greek/set18 (contents, props changed) vendor/tcsh/dist/nls/greek/set19 (contents, props changed) vendor/tcsh/dist/nls/greek/set2 (contents, props changed) vendor/tcsh/dist/nls/greek/set20 (contents, props changed) vendor/tcsh/dist/nls/greek/set21 (contents, props changed) vendor/tcsh/dist/nls/greek/set22 (contents, props changed) vendor/tcsh/dist/nls/greek/set23 (contents, props changed) vendor/tcsh/dist/nls/greek/set25 (contents, props changed) vendor/tcsh/dist/nls/greek/set26 (contents, props changed) vendor/tcsh/dist/nls/greek/set27 (contents, props changed) vendor/tcsh/dist/nls/greek/set29 (contents, props changed) vendor/tcsh/dist/nls/greek/set3 (contents, props changed) vendor/tcsh/dist/nls/greek/set30 (contents, props changed) vendor/tcsh/dist/nls/greek/set31 (contents, props changed) vendor/tcsh/dist/nls/greek/set4 (contents, props changed) vendor/tcsh/dist/nls/greek/set5 (contents, props changed) vendor/tcsh/dist/nls/greek/set6 (contents, props changed) vendor/tcsh/dist/nls/greek/set7 (contents, props changed) vendor/tcsh/dist/nls/greek/set8 (contents, props changed) vendor/tcsh/dist/nls/greek/set9 (contents, props changed) vendor/tcsh/dist/nls/italian/charset vendor/tcsh/dist/nls/italian/set1 vendor/tcsh/dist/nls/italian/set11 vendor/tcsh/dist/nls/italian/set13 vendor/tcsh/dist/nls/italian/set15 vendor/tcsh/dist/nls/italian/set17 vendor/tcsh/dist/nls/italian/set19 vendor/tcsh/dist/nls/italian/set2 vendor/tcsh/dist/nls/italian/set20 vendor/tcsh/dist/nls/italian/set22 vendor/tcsh/dist/nls/italian/set23 vendor/tcsh/dist/nls/italian/set26 vendor/tcsh/dist/nls/italian/set3 vendor/tcsh/dist/nls/italian/set30 vendor/tcsh/dist/nls/italian/set4 vendor/tcsh/dist/nls/italian/set6 vendor/tcsh/dist/nls/italian/set7 vendor/tcsh/dist/nls/ja/charset vendor/tcsh/dist/nls/ja/set1 (contents, props changed) vendor/tcsh/dist/nls/ja/set10 (contents, props changed) vendor/tcsh/dist/nls/ja/set11 (contents, props changed) vendor/tcsh/dist/nls/ja/set12 (contents, props changed) vendor/tcsh/dist/nls/ja/set13 (contents, props changed) vendor/tcsh/dist/nls/ja/set15 (contents, props changed) vendor/tcsh/dist/nls/ja/set16 (contents, props changed) vendor/tcsh/dist/nls/ja/set17 (contents, props changed) vendor/tcsh/dist/nls/ja/set18 (contents, props changed) vendor/tcsh/dist/nls/ja/set2 (contents, props changed) vendor/tcsh/dist/nls/ja/set21 (contents, props changed) vendor/tcsh/dist/nls/ja/set29 (contents, props changed) vendor/tcsh/dist/nls/ja/set3 (contents, props changed) vendor/tcsh/dist/nls/ja/set30 (contents, props changed) vendor/tcsh/dist/nls/ja/set4 (contents, props changed) vendor/tcsh/dist/nls/ja/set5 (contents, props changed) vendor/tcsh/dist/nls/ja/set6 (contents, props changed) vendor/tcsh/dist/nls/ja/set7 (contents, props changed) vendor/tcsh/dist/nls/ja/set8 (contents, props changed) vendor/tcsh/dist/nls/pl/charset vendor/tcsh/dist/nls/pl/set1 vendor/tcsh/dist/nls/pl/set10 vendor/tcsh/dist/nls/pl/set11 vendor/tcsh/dist/nls/pl/set12 vendor/tcsh/dist/nls/pl/set13 vendor/tcsh/dist/nls/pl/set14 vendor/tcsh/dist/nls/pl/set15 vendor/tcsh/dist/nls/pl/set16 vendor/tcsh/dist/nls/pl/set17 vendor/tcsh/dist/nls/pl/set18 vendor/tcsh/dist/nls/pl/set19 vendor/tcsh/dist/nls/pl/set2 vendor/tcsh/dist/nls/pl/set23 vendor/tcsh/dist/nls/pl/set27 vendor/tcsh/dist/nls/pl/set3 vendor/tcsh/dist/nls/pl/set30 vendor/tcsh/dist/nls/pl/set31 vendor/tcsh/dist/nls/pl/set5 vendor/tcsh/dist/nls/pl/set6 vendor/tcsh/dist/nls/pl/set8 vendor/tcsh/dist/nls/russian/charset vendor/tcsh/dist/nls/russian/set1 (contents, props changed) vendor/tcsh/dist/nls/russian/set10 (contents, props changed) vendor/tcsh/dist/nls/russian/set11 (contents, props changed) vendor/tcsh/dist/nls/russian/set12 (contents, props changed) vendor/tcsh/dist/nls/russian/set13 (contents, props changed) vendor/tcsh/dist/nls/russian/set14 (contents, props changed) vendor/tcsh/dist/nls/russian/set15 (contents, props changed) vendor/tcsh/dist/nls/russian/set16 (contents, props changed) vendor/tcsh/dist/nls/russian/set17 (contents, props changed) vendor/tcsh/dist/nls/russian/set18 (contents, props changed) vendor/tcsh/dist/nls/russian/set19 (contents, props changed) vendor/tcsh/dist/nls/russian/set2 (contents, props changed) vendor/tcsh/dist/nls/russian/set20 (contents, props changed) vendor/tcsh/dist/nls/russian/set22 (contents, props changed) vendor/tcsh/dist/nls/russian/set23 (contents, props changed) vendor/tcsh/dist/nls/russian/set25 (contents, props changed) vendor/tcsh/dist/nls/russian/set26 (contents, props changed) vendor/tcsh/dist/nls/russian/set27 (contents, props changed) vendor/tcsh/dist/nls/russian/set29 (contents, props changed) vendor/tcsh/dist/nls/russian/set30 (contents, props changed) vendor/tcsh/dist/nls/russian/set31 (contents, props changed) vendor/tcsh/dist/nls/russian/set4 (contents, props changed) vendor/tcsh/dist/nls/russian/set5 (contents, props changed) vendor/tcsh/dist/nls/russian/set6 (contents, props changed) vendor/tcsh/dist/nls/russian/set7 (contents, props changed) vendor/tcsh/dist/nls/russian/set8 (contents, props changed) vendor/tcsh/dist/nls/russian/set9 (contents, props changed) vendor/tcsh/dist/nls/spanish/charset vendor/tcsh/dist/nls/spanish/set1 vendor/tcsh/dist/nls/spanish/set10 vendor/tcsh/dist/nls/spanish/set13 vendor/tcsh/dist/nls/spanish/set14 vendor/tcsh/dist/nls/spanish/set15 vendor/tcsh/dist/nls/spanish/set16 vendor/tcsh/dist/nls/spanish/set17 vendor/tcsh/dist/nls/spanish/set18 vendor/tcsh/dist/nls/spanish/set19 vendor/tcsh/dist/nls/spanish/set2 vendor/tcsh/dist/nls/spanish/set20 vendor/tcsh/dist/nls/spanish/set22 vendor/tcsh/dist/nls/spanish/set23 vendor/tcsh/dist/nls/spanish/set25 vendor/tcsh/dist/nls/spanish/set26 vendor/tcsh/dist/nls/spanish/set27 vendor/tcsh/dist/nls/spanish/set3 vendor/tcsh/dist/nls/spanish/set30 vendor/tcsh/dist/nls/spanish/set4 vendor/tcsh/dist/nls/spanish/set5 vendor/tcsh/dist/nls/spanish/set6 vendor/tcsh/dist/nls/spanish/set7 vendor/tcsh/dist/nls/spanish/set8 vendor/tcsh/dist/nls/spanish/set9 vendor/tcsh/dist/nls/ukrainian/charset vendor/tcsh/dist/nls/ukrainian/set1 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set10 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set11 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set12 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set13 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set14 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set15 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set16 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set17 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set18 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set19 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set2 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set20 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set22 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set23 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set25 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set26 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set27 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set29 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set30 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set31 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set5 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set6 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set7 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set8 (contents, props changed) vendor/tcsh/dist/nls/ukrainian/set9 (contents, props changed) vendor/tcsh/dist/patchlevel.h vendor/tcsh/dist/pathnames.h vendor/tcsh/dist/sh.c vendor/tcsh/dist/sh.char.c vendor/tcsh/dist/sh.char.h vendor/tcsh/dist/sh.decls.h vendor/tcsh/dist/sh.dir.c vendor/tcsh/dist/sh.dol.c vendor/tcsh/dist/sh.err.c vendor/tcsh/dist/sh.exec.c vendor/tcsh/dist/sh.exp.c vendor/tcsh/dist/sh.file.c vendor/tcsh/dist/sh.func.c vendor/tcsh/dist/sh.glob.c vendor/tcsh/dist/sh.h vendor/tcsh/dist/sh.hist.c vendor/tcsh/dist/sh.lex.c vendor/tcsh/dist/sh.misc.c vendor/tcsh/dist/sh.parse.c vendor/tcsh/dist/sh.print.c vendor/tcsh/dist/sh.proc.c vendor/tcsh/dist/sh.proc.h vendor/tcsh/dist/sh.sem.c vendor/tcsh/dist/sh.set.c vendor/tcsh/dist/sh.time.c vendor/tcsh/dist/tc.alloc.c vendor/tcsh/dist/tc.const.c vendor/tcsh/dist/tc.decls.h vendor/tcsh/dist/tc.disc.c vendor/tcsh/dist/tc.func.c vendor/tcsh/dist/tc.nls.c vendor/tcsh/dist/tc.nls.h vendor/tcsh/dist/tc.os.c vendor/tcsh/dist/tc.os.h vendor/tcsh/dist/tc.prompt.c vendor/tcsh/dist/tc.sig.c vendor/tcsh/dist/tc.sig.h vendor/tcsh/dist/tc.str.c vendor/tcsh/dist/tc.wait.h vendor/tcsh/dist/tc.who.c vendor/tcsh/dist/tcsh.man vendor/tcsh/dist/tcsh.man2html vendor/tcsh/dist/tw.color.c vendor/tcsh/dist/tw.init.c vendor/tcsh/dist/tw.parse.c vendor/tcsh/dist/vms.termcap.c Directory Properties: vendor/tcsh/dist/nls/greek/set24 (props changed) vendor/tcsh/dist/nls/ja/set24 (props changed) vendor/tcsh/dist/nls/russian/set21 (props changed) vendor/tcsh/dist/nls/russian/set24 (props changed) vendor/tcsh/dist/nls/russian/set3 (props changed) vendor/tcsh/dist/nls/ukrainian/set21 (props changed) vendor/tcsh/dist/nls/ukrainian/set24 (props changed) vendor/tcsh/dist/nls/ukrainian/set3 (props changed) vendor/tcsh/dist/nls/ukrainian/set4 (props changed) Added: vendor/tcsh/dist/BUGS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tcsh/dist/BUGS Mon Feb 20 00:53:59 2012 (r231921) @@ -0,0 +1,602 @@ +# $tcsh: BUGS,v 3.5 2006/03/02 18:46:44 christos Exp $ +============ +Bugs in TCSH +============ +-IAN! idallen@ncf.ca +April 2002 + +-------------------------------------------------------------------------------- +| *FIXED* +| From: idallen +| Subject: Can't redirect output of "source" +| % echo "date" >file +| % source file >output +| Thu Sep 3 17:47:19 EDT 1987 +-------------------------------------------------------------------------------- + +From: idallen +Subject: nice is not cumulative + % nice date + % nice nice date + + Both have a nice of 4; nice does not accumulate. + +From: idallen +Subject: no warning on integer overflow + % @ x=99999999999999999999999 + % echo $x + -159383553 + +From: idallen +Subject: goto seeks backwards in terminal input + % goto x + goto? ignored + goto? ignored + goto? ignored + goto? x: + % goto x + + The terminal is now hung - you have to break out. + +From: idallen +Subject: nice applied to too many commands + % nice +20 simple `long` + + The CSH shell applies the nice to both commands "simple" and "long". + +From: idallen +Subject: redirection always happens in single-line "if" + if ( 0 ) echo hi > date + + The file date is created empty. + +From: idallen +Subject: Expanding variable with newline generates syntax error + % set x="abc\ + def" + % echo "$x" + Unmatched ". + +From: idallen +Subject: Expanding variable with newline generates extra word + % set x="abc\ + def" + % echo $x + abc def + % set y=( $x ) ; echo $#y + 3 + +From: idallen +Subject: Modifier ":e" doesn't work on history + CSH is missing an entry in a case statement for it. + +From: idallen +Subject: Shell messages appear on stdout; get redirected + If a program in a shell script exits with a signal that the shell + reports (e.g. Terminated), the report appears on standard output + and if the output of the shell script is redirected the report + gets sent there and you never find out. + +From: Steve Hayman +Subject: No error message given for failure to NICE + % nice -10 date + Fri May 30 12:11:12 EDT 1986 + CSH never checks the error returns from nice(). + +From: Ray Butterworth +Subject: CSH history reading takes '#' as a comment + % echo a b # c d + a b # c d + % exit + % login + % history + ... + 99 echo a b + + '#' indicates a comment when reading from a shell script file, + and of course CSH thinks it is reading from a file when it reads + the history back in. + +From: idallen +Subject: csh: No current job, even if only one job + % somecommand ^Z + Suspended + % bg + [1] somecommand & + % fg + fg: No current job. + + The C shell always turns off the current job indicator for a job + that is put in the background with "bg" -- even if it is the only job. + +From: idallen (Ian! D. Allen) +Subject: Redirection ignored inside if ( { cmd >xxx } ) .... + % if ( { date >out } ) echo hi + Sun Apr 14 13:24:31 EDT 2002 + hi + + The shell does not set up its file descriptors for the forked + command. The redirection is completely ignored. + +>From idallen +Subject: Error in CSH script causes script exit + If a script has an error in a built-in command (e.g. redirection file not + found), the script exits instead of continuing. + +From: idallen (Ian! D. Allen) +Subject: Variables $$, $# don't accept :-modifiers + echo $$:q $#:q + 12345:q 0:q + +From: idallen (Ian! D. Allen) +Subject: Variable $* (a synonym for argv) doesn't accept subscripts. + % set argv=( a b c d ) + % echo $argv[2] + b + % echo $*[2] + echo: No match. + +>From idallen +Subject: Using WHICH from CSH + The WHICH command tells the wrong thing if you've created + a new file and haven't done a REHASH. WHICH thinks you + get the new file, but the CSH will give you the old one. + +From: idallen (Ian! D. Allen) +Subject: Redirected input to built-in functions misbehaves badly + % date | echo hi + hi + % % jobs + [1] + Running date | + + Note the duplicate prompt and spurious job entry. + + % % date | echo hi + hi + % % date | echo hi + hi + % % jobs + [1] + Running date | + [2] - Running date | + [3] Running date | + % fg + date | + % fg + date | + fg: No such job (badjob). + % fg + [tcsh shell hangs here in an infinite loop] + + Just a general mess of mishandled processes. + +From: idallen (Ian! D. Allen) +Subject: stopped pipes generate spurious job ID + % date | sleep 99 + ^Z + Suspended + [1] 123 456 + +>From idallen(idallen ) +Subject: NICE and NOHUP have no effect as last component of sub-shells. + % nice +10 ps -laxtd0 + UID PID PPID CP PRI NI RSS WCHAN STAT TT TIME COMMAND + 47 3559 1 0 15 0 33 ff000 S d0 0:16 -csh (csh) + 47 7606 3559125 76 10 23 R N d0 0:01 ps -laxtd0 + % (nice +10 ps -laxtd0) + UID PID PPID CP PRI NI RSS WCHAN STAT TT TIME COMMAND + 47 3559 1 3 15 0 33 ff000 S d0 0:16 -csh (csh) + 47 7605 3559 92 48 0 23 R d0 0:01 ps -laxtd0 + + % (nice ps lx) + ... Shows no nice. + % (nice ps lx;date) + ... Works. + % (nohup sleep 999)& + ... Doesn't ignore SIGHUP. + % (nohup sleep 999;date)& + ... Works. + % echo `nice ps lx >/dev/tty` + ... Shows no nice. + % echo `nice ps lx >/dev/tty;date` + ... Works. + % echo `nohup sleep 999` + ... Doesn't ignore SIGHUP. + % echo `nohup sleep 999;date` + ... Works. + +>From idallen +Subject: you can't nest back-quotes + % echo ` echo \`pwd\` ` + Unmatched `. + +From: idallen (Ian! D. Allen) +Subject: GLOB not applied to names in setenv or unsetenv + % setenv `echo abc` def + + It doesn't set abc, it sets the nasty variable: `echo abc` + + % unsetenv `echo abc def ghi` + + Doesn't unset abc or def or ghi + +>From idallen Thu Mar 15 09:48:35 1984 +Subject: Stopping jobs in list of command names throws away the rest. + % a ; b ; c + CSH documents that if you stop B, C will immediately start. + It doesn't. The rest of the list gets thrown away. + +From: idallen (Ian! D. Allen) +Subject: Stopping jobs in source'd file aborts the rest of the file. + With the file TEST containing: + + mail + echo Hi There you never see this + + and typing + + % source TEST + + and then using ^Z to stop MAIL, the rest of the TEST file is abandoned. + This is especially annoying in one's .login or .cshrc. + +>From idallen +Subject: CSH doesn't handle EXIT when it sees it. + % date; exit 99 ; date ; date + Wed Mar 14 19:21:51 EST 1984 + Wed Mar 14 19:21:52 EST 1984 + Wed Mar 14 19:21:53 EST 1984 + + The shell doesn't flush pending input when the EXIT is seen. + The shell then exits with status 0 instead of status 99. + +>From idallen +Subject: CSH mishandles suspend in subshells. + % ( date; suspend; date ) + Sun Mar 4 01:28:28 EST 1984 + + Suspended + % fg + ( date; suspend; date ) + + Suspended (tty input) + ...and you can never get it started again. + +>From idallenSun Mar 18 01:28:16 +Subject: ECHO mis-handles interrupts and errors in back-quotes + % echo `sleep 999` + + [1] 24244 + % jobs + [1] Interrupt ` ... ` + + Note the inability of CSH to tell you the command name used inside + the back-quotes. + +>From idallen +Subject: CSH botches $#X where X is environment var + % echo $#path + 4 + % echo $#PATH + /usr/ucb:/bin:/usr/bin:/usr/public + +>From idallen Wed Apr 18, 1984 +Subject: Inconsistent handling of variables + The manual says that "set x=word" assigns a single word to x. + To assign multiple words, one is supposed to use "set x=(words)". + But, CSH allows "set x=`date`", which sets x to the many words + resulting from `date`, and $x[1] prints "Mon". + + One observes that if x and y are single-word variables, the statements: + % set x=word2 + % set y[1]=word2 + are identical; both replace the contents of the variable with word2. + + But, you can't assign a word to y[1] if y doesn't exist, even though + you can (of course) assign a word to plain "y" if y doesn't exist. + +>From idallen(Ian! D. Allen) +Subject: extra next level when nested single-line IF line ends in THEN + Any IF line that ends in THEN is taken as another nesting level, and + requires a corresponding ENDIF: + + if ( 0 ) then + if ( 0 ) echo This line ends with then + endif + echo You do not see this. + endif # This shouldn't be needed; but it is. + echo Now you do. + +>From idallen +Subject: EXEC doesn't close the file descriptors + + /* This program will demonstrate that CSH leaves internal + * file descriptors open across an EXEC built-in command. + * + * % exec ./a.out + */ + main() + { + int i; + + for( i=0; i < 20; i++ ){ + printf("%d = %d\n", i, isatty(i) ); + } + } + + The output shows: + > exec ./a.out + 0 = 1 + 1 = 1 + 2 = 1 + 3 = 1 + 4 = 1 + 5 = 1 + 6 = 0 + 7 = 0 + 8 = 0 + 9 = 0 + ... + +From: idallen +Subject: can't test success of CD, CHDIR, etc. + cd nosuchdir || echo CD failed + cd nosuchdir && echo CD failed + cd nosuchdir ; echo CD failed + + None of the above work in CSH. + +>From idallen Mon Dec 16 21:40:32 1985 +Subject: GLOB loses memory on directories + echo /*/*/* + + If you interrupt the above GLOB, CSH loses memory. + +From: idallen +Subject: C Shells don't parse when looking for labels. + The shells just look at the first word on each line. You can + cause the shell to branch in to the middle of a HERE document: + + #!/bin/csh -f + onintr quit + sleep 999 + cat << EOF + quit: + echo Amazing how this prints. + exit 88 # this exit is taken when break is hit + EOF + quit: + echo You never get here. + +>From arwhite Thu Aug 26 13:53:58 1982 +Subject: CSH/Bourne shell inconsistent newlines + "`command`" deletes newlines from the command in the cshell, not in the + Bourne shell. + +>From idallen (Ian! D. Allen) +Subject: aliases aren't seen after redirection + % date >x + % >x date + + % alias foo date + % foo >x + % >x foo + foo: Command not found. + +>From idallen (Ian! D. Allen) +Subject: $< misbehaves in pipes + + % date | /bin/echo aaa $< bbb + abcdef + aaa a bbb + % bcdef + bcdef: Command not found. + +>From chris@pixutl.UUCP (chris) Fri Oct 5 14:01:13 1984 +Subject: bug in CSH (history) + There are a couple of bugs in the 'history' command of /bin/csh (and + offspring, such as newcsh): + + 1) The maximum number of arguments to the history command is set to 2. + % history -h -r 2 # fails + +>From idallen +Subject: C Shell expression operators explained + + Some odd CSH context-sensitive features. There is ambiguity on how + !~ != and !( should be interpreted: + + 1 - % ~idallen/study # a valid command line + 2 - % !~ # doesn't work + 3 - % echo " !~ " # no history + 4 - % if ( abc !~ def ) echo hi + + 1 - % =xxx # a valid command line + 2 - % != # doesn't work + 3 - % echo " != " # no history + 4 - % if ( 1 != 2 ) echo hi + + 1 - % ( date ) # a valid command line + 2 - % !( # doesn't work + 3 - % echo " !( " # no history + 4 - % if ( !( 1 + 1 ) ) echo hi + + The C Shell parser isn't clever enough to distinguish any of cases 2, + 3, or 4, so it always behaves as if the character pair was part of an + expression, not a history substitution. + +-------------------------------------------------------------------------------- +| *NOT A BUG* +| >From idallenThu Jun 27 08:20:08 1985 +| Subject: Re: Using > vs. | on shell built-in commands. +| +| CSH cannot put the output of the JOBS command into a pipe. In fact, +| the output is going into the pipe, but the output is empty. You +| couldn't know this, but these shells implement piped built-in commands +| by forking the shell to create an independent process for which the +| main shell can wait. But the internal process table is cleaned +| out after a fork(), since a forked shell is just like a subshell +| and must have its own clean process table in which to enter its own +| running jobs. So by the time the JOBS command executes, it's in a +| child shell that has no jobs running. Hence, the output is empty. +| "echo `jobs`" and "( jobs )" are both empty, for the same reason. +-------------------------------------------------------------------------------- + +From: jjg@security.UUCP (Jeff Glass) +Subject: csh and I/O redirection + + put these four lines in a file, say cshtest : + + #! /bin/csh -f + cat << END | ( sh & ) + echo hi there + END + + ( the intent is to send some commands to sh to be executed in the + background, without csh printing the job number of the sh. ) + + now, from csh, enter the command + + source cshtest + + and note that you see the message "hi there". + now enter the commands + + chmod +x cshtest + ./cshtest + + and you get no output. + + removing either the parentheses or the ampersand causes the message + to appear, but not quietly in the background. I don't understand why + it works when source'd but not when exec'd, either. + +-------------------------------------------------------------------------------- +| *FIXED* +| From: matt@prism.UUCP +| Subject: Pointless csh puzzle +| +| Here's a pointless little csh puzzle: In the c-shell, it is +| possible to set and environment variable whose name consist of +| more than one word, in the obvious way: +| +| % setenv "FOO BAR" quux +| +| The printenv builtin will show it residing happily in the +| environment. Now for the puzzle: can anyone find a way to GET +| TO the value of this variable, using only csh builtins? In +| other words, is there an such that +| +| % echo +| +| will print "quux" on the screen, where is formed +| only from csh commands? +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +| *FIXED* +| >From tim@ISM780B.UUCP Wed Nov 20 18:00:00 1985 +| Subject: Re: C-shell puzzles +| +| Here's another good C shell quirk: +| +| $ echo foo +| foo +| $ repeat 3 echo foo +| foo +| foo +| foo +| $ repeat 3 repeat 3 echo foo +| foo +| foo +| foo +| foo +| foo +| $ repeat $N repeat $M echo foo # $N and $M are integers +| [ $N + $M - 1 foo's ] +| $ repeat $N1 repeat $N2 ... repeat $Nk echo foo +| [ $N1 + $N2 + ... + $Nk - k + 1 foo's ] +| $ +-------------------------------------------------------------------------------- + +>From pur-ee!uiucdcsb!liberte Mon Dec 30 23:20:31 EST 1985 +Subject: Csh null strings + + There are at least two different-sized null strings in csh. + But sometimes they are equal anyway. + + % set x = "" + % set y = "`echo`" + % echo $#x $#y + 1 0 + + % set x = + % set y = `echo` + % echo $#x $#y + 1 0 + + % set x = ("") + % set y = ("`echo`") + % echo $#x $#y + 1 0 + + % set x = () + % set y = (`echo`) + % echo $#x $#y + 0 0 + + % if (() == "`echo`") echo huh + % if (() == ("`echo`")) echo huh + huh + % if ("" == ("`echo`")) echo huh + % if ("" == "`echo`") echo "huh?" + huh? + + +>On Jul 18, 8:15am, mark@peek.org (Mark Peek) wrote: +>-- Subject: Updated tcsh-6.12.0 release date? +> +>| Hi Christos, +>| I know I've been (part of) the cause of slipping the release date out +>| for tcsh-6.12.0. :-) Do you have an updated date for releasing it? +>| I'm trying to determine whether it will fit in the time frame for +>| shipment with the next FreeBSD 5.0-DP release. +> +>I hope to release it sometime next week. There are only minor changes in it. +>Is that convenient, or would you like me to push it more? + +I sent a note to the FreeBSD release engineers and they're inclined +to hold off on including the new version in the release which they're +branching later today. If DP2 slips out a bit they might consider +including it. I'd say go ahead with your current schedule and I'll +import it whenever it is available. I definitely will be including it +into the next -stable FreeBSD 4.7 release. + +BTW, one of the release engineers pointed out a bug with using +jobcmd. If you use the example in the book to update an xterm and +then run something like + grep bar `cat file.list` +It screws up the xterm title bar containing "Faulty alias 'jobcmd' +removed" plus the list of files from the cat command. + +The good news is that I was able to reproduce this at home last +night. The bad news is that it is working fine right now here at +work. Oh wait, let me log in remotely and look at the alias I was +using...got it! The command fails if you use: + + alias jobcmd 'echo -n "^[]2;\!#^G"' + +but works fine if you use: (note the switch of ' and " quotes) + + alias jobcmd "echo -n '^[]2;\!#^G'" + +Note: I used the above by vi'ing a file and sourcing it from the shell. + +If you can confirm, I think this just needs to be updated in the man page. + +>Thanks for all the help BTW... + +No problem. I like fixing bugs and contributing code...especially for +a great piece of software like tcsh that I use *all* the time. Thank +you for keeping it going! + +Mark Modified: vendor/tcsh/dist/Fixes ============================================================================== --- vendor/tcsh/dist/Fixes Mon Feb 20 00:30:20 2012 (r231920) +++ vendor/tcsh/dist/Fixes Mon Feb 20 00:53:59 2012 (r231921) @@ -1,3 +1,147 @@ + 6. V6.18.01 - 20120214 + 5. fix interruptible wait again + 4. ignore bogus compiler overflow message + 3. cleanup ifdefs in utmp code, and provide default array entries + 2. Ignore #machine entries in host.defs + 1. Detect missing ) in gethost.c (Corinna Vinschen) + +104. V6.18.00 - 20120114 +103. remove unused variables. +102. Make gethost use definitions for x __x__ and __x automatically. +101. More utmp fixes +100. V6.17.10 - 20120105 + 99. Add more FreeBSD/NetBSD machines + 98. Add portability wrapper for gencat + 97. Fix warning for write in SYSMALLOC systems. + 96. V6.17.09 - 20120102 + 95. revert gencat handling to pre-cygwin fixes (without the env settings) + 94. remove stray endutent() + 93. V6.17.08 - 20111230 + 92. Remove - from gencat + 91. Provide support for malloc_usable_size() so that linux works again + without SYSMALLOC + 90. Add support for FreeBSD's utmpx. + 89. V6.17.07 - 20111227 + 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and + there are more than 10 jobs. + 87. PR/155: Default $anyerror to set for backward compatibility + 86. PR/149: Don't print -1 in %j (Vojtech Vitek) + 85. handle -- on chdir commands as the end of options processing so that + they can process a directory like -x without resorting to ./-x + (Andrew Stevenson) + 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (Robert Byrnes) + 83. PR/38: Null check for jobs (Kurt Miller) + 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger) + 81. PR/120: string0 in filetest does not have enough space. + 80. V6.17.06 - 20110415 + 79. PR/110: Add $anyerror to select behavior. Default to the new one. + 78. Don't try to spell commands that are correct (Rouben Rostamian) + [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo; + chmod +x foo; set correct=cmd; ./foo -> ../foo] + 77. Don't push the syntax struct on the cleanup stack, because on foo;bar + if foo fails, we will free bar prematurely (Ben Miller) + 76. Avoid infinite loop while trying to print the pid of a dying process + to a closed file (Bob Arendt) + 75. Handle completion of ${ variables (Anthony Mallet) + 74. Add --disable-nls-catalogs (Corinna Vinschen) + 73. convert message catalogs to UTF-8 (Werner Fink) + 72. check that the NLS path works before setting $NLSPATH. + 71. use SYSMALLOC for GLIBC (Werner Fink) + 70. use mallinfo for SYSMALLOC (Corinna Vinschen) + 69. V6.17.05 - 20110201 + 68. Use mkstemp() if there for here docs (Werner Fink) + 67. Fix handling of errors and exit values in builtins (Werner Fink) + 66. Better pty name detection (Werner Fink) + 65. Enable NLS catalogs on Cygwin (Corinna Vinschen) + 64. NLSPATH handling fixes (Corinna Vinschen) + 63. Avoid infrequent exit when tcsh cd's into a non-existent directory + https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink) + 62. Don't try to spell check full path binaries that are correct because + they can cause hangs when other nfs partitions are hung. (Werner Fink) + 61. Avoid nested interrupts when exiting causing history writing to fail + https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink) + 60. Instead of giving an error or ignoring lines with missing eol at eof, + process them. + 59. Avoid leaking fd's in mail check (Werner Fink) + 58. Add cygwin_xcrypt() (Corinna Vinschen) + 57. Recognize i686 (Corinna Vinschen) + 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin + settings (Corinna Vinschen) + 55. Avoid double slashes in cdpath (Corinna Vinschen) + 54. V6.17.04 - 20110118 + 53. Revert PR/110, breaks the test suite. + 52. V6.17.03 - 20110117 + 51. PR/102: Complain on input files with missing trailing \n + 50. PR/104: If atime == mtime we don't have new mail. + 49. PR/113: Don't allow illegal variable names to be set. + 48. PR/112: don't set $REMOTEHOST on the local machine. + 47. PR/110: exit status of the pipeline should be the status of the last + command. + 46. Android support (Corinna Vinschen) + 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that + translates unshifted 7 bit ASCII (Werner Fink) + 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL + (Jean-Luc Leger) + 43. PR/109: make wait interruptible (Vojtech Vitek) + 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues + (Robert Byrnes) + 41. remove .bat and .cmd handling for executables on cygwin (Corinna Vinschen) + 40. Don't echo history while history -L or history -M + 39. Check for EOS before ** from Greg Dionne + 38. Don't fork in backeval from Bryan Mason + 37. Better globstar support from Greg Dionne + 36. Error out when processing the last incomplete line instead of silently + ignoring it (Anders Kaseorg) + 35. Fix SEGV from echo `` + 34. Better fixes for histchars and promptchars (nargs) + 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context. + (Fabio Fabbri) + 32. V6.17.02 - 20100512 + 31. PR/79: nargs: Better handling for promptchars. + 30. PR/97: Add parseoctal to retain compatibility with previous versions (Jim + Zajkowski) + 29. PR/84: Performance fixes for large history merges (add + hashtable (Ted Anderson) + 28. Revert previous #23; people should use $histlit if they want this + feature. + 27. Don't kill "hup" background jobs when a child of the shell exits. + From Debian. + 26. Ignore \r\n in the command line options for OS's that don't strip + these from #!; from Debian + 25. Fix enhanced missing patch (Greg Dionne) + 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now. + (Corinna Vinschen) + 23. Turn HistLit on while recording history to avoid \!\! losing its \. + From Debian + 22. set autoexpand; set histchars="";\n crash. From Debian + 21. V6.17.01 - 20100506 + 20. unset verbose while we are reading the history file to avoid echoing + to the terminal. (Jeffrey Bastian) + 19. globstar addition, Enhance addition, euid, euser, gid variables + (Greg Dionne) + 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks) + 17. Handle UTF-16 surrogates (Corinna Vinschen) + 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (Corinna Vinschen) + 15. Better support for Solaris >= 2.9 (Thomas Uhle) + 14. Change internal expression calculations to long long so that we can + deal with > 32 bit time, inodes, uids, file sizes etc. + 13. Add new linux resource limits. + 12. Don't print 'Exit X' when printexitvalue is set in `` expressions + (Jeff Bastian) + 11. Add more LS_COLORS vars (M.H. Anderson) + 10. Reduce whitespace in Makefile (Don Estabrook) + 9. Manual page fixes (Alan R. S. Bueno) + 8. Remove history in loops bug from the documentation (Holger Weiss) + 7. Add autorehash (Holger Weiss) + 6. Add history.at (Ted Anderson) + 5. Better NLSPATH handling (Norm Jacobs) + 4. Fix hostname building from utmp (Cyrus Rahman) + 3. Handle pending signals before flush so that the the history file does + not get truncated. (Ted Anderson) + 2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil) + 1. remember to closedir in mailchk (from Werner Fink, reported by + David Binderman) + 21. V6.17.00 - 20090710 20. Fix dataroot autoconf issue. 19. Fix directory stuff for unit tests. Modified: vendor/tcsh/dist/Imakefile ============================================================================== --- vendor/tcsh/dist/Imakefile Mon Feb 20 00:30:20 2012 (r231920) +++ vendor/tcsh/dist/Imakefile Mon Feb 20 00:53:59 2012 (r231921) @@ -1,5 +1,5 @@ XCOMM -XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $ +XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -93,7 +93,11 @@ ones. Please send in your fixes and add # if (OSMinorVersion < 6) # define ConfigH sol24 # else -# define ConfigH sol26 +# if (OSMinorVersion < 9) +# define ConfigH sol26 +# else +# define ConfigH sol29 +# endif # endif # endif # endif Modified: vendor/tcsh/dist/Makefile.in ============================================================================== --- vendor/tcsh/dist/Makefile.in Mon Feb 20 00:30:20 2012 (r231920) +++ vendor/tcsh/dist/Makefile.in Mon Feb 20 00:53:59 2012 (r231921) @@ -1,4 +1,4 @@ -# $tcsh: Makefile.in,v 3.40 2009/06/24 22:09:05 christos Exp $ +# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -26,22 +26,27 @@ CF=-c CPPFLAGS=-I. -I$(srcdir) LFLAGS= -#LFLAGS= -Zn10000 # hpux lint +# hpux lint +#LFLAGS= -Zn10000 -CFLAGS = @CFLAGS@ # This is set by autoconf. -#CFLAGS= -g # debug -#CFLAGS= -O # production -#CFLAGS= # Broken optimizers.... +# This is set by autoconf: +CFLAGS = @CFLAGS@ +# debug: +#CFLAGS= -g +# production: +#CFLAGS= -O +# Broken optimizers.... +#CFLAGS= #CFLAGS= -g -pg -DPROF #CFLAGS= -O -pg -DPROF # gcc 1.00-1.37 -#CFLAGS= -O -finline-functions -fstrength-reduce +#CFLAGS= -O -finline-functions -fstrength-reduce # gcc 1.37-1.40 -#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce +#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce # add -msoft-float for 68881 machines. # gcc 2.0 @@ -67,8 +72,10 @@ CFLAGS = @CFLAGS@ # This is set by auto #CFLAGS= -O -Mnodebug -Mnoperfmon # DEC Alpha OSF/1 -#CFLAGS= -O2 -Olimit 2000 ## Normal Optimization -#CFLAGS= -O3 -Olimit 2000 ## Full Optimization - may not work +## Normal Optimization +#CFLAGS= -O2 -Olimit 2000 +## Full Optimization - may not work +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u @@ -77,7 +84,8 @@ CFLAGS = @CFLAGS@ # This is set by auto # global optimizer! (-O3). # On SGI 4.0+ you need to add -D__STDC__ too. #CFLAGS= -O3 -#CFLAGS= -O3 -Olimit 2000 ## Ultrix 4.2a +## Ultrix 4.2a +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u ## Ultrix and gnu-make need that @@ -110,14 +118,14 @@ CFLAGS = @CFLAGS@ # This is set by auto # CFLAGS= -O3 # SINIX RMx00 -#CFLAGS= -O # -D_POSIX_SOURCE # -kansi +#CFLAGS= -O# -D_POSIX_SOURCE# -kansi # Apollo's with cc [apollo builtins don't work with gcc] # and apollo should not define __STDC__ if it does not have # the standard header files. RT's (aos4.3) need that too; # you might want to skip the -O on the rt's... Not very wise. # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA) -#DFLAGS=-U__STDC__ +#DFLAGS=-U__STDC__ #DFLAGS=-D_IBMESA # On aix2.2.1 we need more compiler space. #DFLAGS=-Nd4000 -Nn3000 @@ -142,17 +150,25 @@ DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcs ################################################################ ## LDFLAGS. Define something here if you need to ################################################################ -LDFLAGS= @LDFLAGS@ ## This is set by autoconf. -#LDFLAGS= ## The simplest, suitable for all. -#LDFLAGS= -s ## Stripped. Takes less space on disk. -#LDFLAGS= -s -n ## Pure executable. Spares paging over -# ## the network for machines with local -# ## swap but external /usr/local/bin . -#LDFLAGS= -s -n -Bstatic ## Without dynamic linking. (SunOS/cc) -#LDFLAGS= -s -n -static ## Without dynamic linking. (SunOS/gcc) -#LDFLAGS= -Wl,-s,-n ## Stripped, shared text (Unicos) -#LDFLAGS= -s -static ## Link statically. (linux) -#LDFLAGS= -s -N ## Impure executable (linux) +## This is set by autoconf: +LDFLAGS= @LDFLAGS@ +## The simplest, suitable for all. +#LDFLAGS= +## Stripped. Takes less space on disk. +#LDFLAGS= -s +## Pure executable. Spares paging over the network for machines with +## local swap but external /usr/local/bin . +#LDFLAGS= -s -n +## Without dynamic linking. (SunOS/cc) +#LDFLAGS= -s -n -Bstatic +## Without dynamic linking. (SunOS/gcc) +#LDFLAGS= -s -n -static +## Stripped, shared text (Unicos) +#LDFLAGS= -Wl,-s,-n +## Link statically. (linux) +#LDFLAGS= -s -static +## Impure executable (linux) +#LDFLAGS= -s -N ################################################################ ## SBINLDFLAGS. Flags to build a tcsh suitable for installation in @@ -164,53 +180,100 @@ SBINLDFLAGS=-Wl,-R/etc/lib,-I/etc/lib/ld ################################################################ ## LIBES. Pick one, or roll your own. ################################################################ -LIBES= @LIBS@ ## This is set by autoconf. -#LIBES= -ltermcap ## BSD style things -#LIBES= -ltermcap ## SunOS, HP-UX, pyramid -#LIBES= -ltermcap ## Linux -#LIBES= -ltermcap -lshadow ## Linux with PW_SHADOW -#LIBES= -ltermcap -lsec ## Tek XD88/10 (UTekV) with PW_SHADOW -#LIBES= -ltermcap -lsec ## Motorola MPC (sysV88) with PW_SHADOW -#LIBES= -ltermcap -lcs ## Mach -#LIBES= -ltermcap -lbsd ## DEC osf1 on the alpha -#LIBES= -ltermcap -lbsd ## Intel paragon -#LIBES= -ltermcap -lbsd ## Clipper intergraph -#LIBES= -ltermcap -lseq ## Sequent's Dynix -#LIBES= -ltermcap -lauth ## Ultrix with Enhanced Security -#LIBES= -ltermcap -ldir -lx ## Xenix 386 style things -#LIBES= -ltermcap -lndir -lsocket -ljobs ## masscomp RTU6.0 -#LIBES= -lcurses ## AIX on the rt -#LIBES= -lcurses ## TitanOS on the stellar -#LIBES= -ltermlib -lsocket -lnsl ## SysV4 w/o BSDTIMES or Solaris 2 -#LIBES= -lcurses ## SysV3 w/o networking -#LIBES= -lcurses -lnet ## SysV3 with networking -#LIBES= -lcurses -ldir ## SysV2 w/o networking & dirlib -#LIBES= -lcurses -ldir -lnet ## SysV2 with networking & dirlib -#LIBES= -lcurses -lbsd ## AIX on the IBM 370 or rs6000 or ps2 -#LIBES= -lcurses -lbsd ## ETA10 -#LIBES= -lcurses -lbsd ## Irix3.1 on the SGI-IRIS4D -#LIBES= -lcurses -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D w/o yp -#LIBES= -lcurses -lsun -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D with yp -#LIBES= -lcurses -lsocket -lbsd ## Amdahl UTS 2.1 -#LIBES= -lcurses -lsocket ## Intel's hypercube. -#LIBES= -lcurses -lsocket ## ns32000 based Opus. -#LIBES= -lcurses -lcposix ## ISC 2.2 without networking -#LIBES= -lcposix -lc_s -lcurses -linet ## ISC 2.2 with networking -#LIBES= -lcurses -lsec -lc_s ## ISC 2.0.2 without networking -#LIBES= -lcurses -linet -lsec -lc_s ## ISC 2.0.2 with networking -#LIBES= -lcurses -lintl -lcrypt ## SCO SysVR3.2v2.0 -#LIBES= -lcurses -lintl -lsocket -lcrypt ## SCO+ODT1.1 -#LIBES= -lposix -ltermcap ## A/UX 2.0 -#LIBES= -lposix -ltermcap -lc_s ## A/UX 3.0 -#LIBES= -ldirent -lcurses ## att3b1 cc w/o shared lib & dirlib -#LIBES= -shlib -ldirent -lcurses ## att3b1 gcc with shared lib & dirlib -#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a ## SysV4 with BSDTIMES -#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a ## Stardent Vistra -#LIBES= -ltermc ## emx under OS/2 -#LIBES= ## Minix, VMS_POSIX -#LIBES= -ltermcap -lcrypt ## Multiflow -#LIBES= -ltermcap -lcrypt ## NetBSD -#LIBES= -lcurses ## DDE Supermax +## This is set by autoconf. +LIBES= @LIBS@ +## BSD style things +#LIBES= -ltermcap +## SunOS, HP-UX, pyramid +#LIBES= -ltermcap +## Linux +#LIBES= -ltermcap +## Linux with PW_SHADOW +#LIBES= -ltermcap -lshadow +## Tek XD88/10 (UTekV) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Motorola MPC (sysV88) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Mach +#LIBES= -ltermcap -lcs +## DEC osf1 on the alpha +#LIBES= -ltermcap -lbsd +## Intel paragon +#LIBES= -ltermcap -lbsd +## Clipper intergraph +#LIBES= -ltermcap -lbsd +## Sequent's Dynix +#LIBES= -ltermcap -lseq +## Ultrix with Enhanced Security +#LIBES= -ltermcap -lauth +## Xenix 386 style things +#LIBES= -ltermcap -ldir -lx +## masscomp RTU6.0 +#LIBES= -ltermcap -lndir -lsocket -ljobs +## AIX on the rt +#LIBES= -lcurses +## TitanOS on the stellar +#LIBES= -lcurses +## SysV4 w/o BSDTIMES or Solaris 2 +#LIBES= -ltermlib -lsocket -lnsl +## SysV3 w/o networking +#LIBES= -lcurses +## SysV3 with networking +#LIBES= -lcurses -lnet +## SysV2 w/o networking & dirlib +#LIBES= -lcurses -ldir +## SysV2 with networking & dirlib +#LIBES= -lcurses -ldir -lnet +## AIX on the IBM 370 or rs6000 or ps2 +#LIBES= -lcurses -lbsd +## ETA10 +#LIBES= -lcurses -lbsd +## Irix3.1 on the SGI-IRIS4D +#LIBES= -lcurses -lbsd +## Irix3.3 on the SGI-IRIS4D w/o yp +#LIBES= -lcurses -lbsd -lc_s *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 00:56:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EE7B1065670; Mon, 20 Feb 2012 00:56:33 +0000 (UTC) (envelope-from mp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11F068FC18; Mon, 20 Feb 2012 00:56:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1K0uWSn023663; Mon, 20 Feb 2012 00:56:32 GMT (envelope-from mp@svn.freebsd.org) Received: (from mp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1K0uWGu023662; Mon, 20 Feb 2012 00:56:32 GMT (envelope-from mp@svn.freebsd.org) Message-Id: <201202200056.q1K0uWGu023662@svn.freebsd.org> From: Mark Peek Date: Mon, 20 Feb 2012 00:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231922 - vendor/tcsh/6.18.01 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 00:56:33 -0000 Author: mp Date: Mon Feb 20 00:56:32 2012 New Revision: 231922 URL: http://svn.freebsd.org/changeset/base/231922 Log: Tag tcsh 6.18.01 release. Added: vendor/tcsh/6.18.01/ - copied from r231921, vendor/tcsh/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 01:05:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3BA1106564A; Mon, 20 Feb 2012 01:05:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 902A98FC08; Mon, 20 Feb 2012 01:05:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1K15HCF024039; Mon, 20 Feb 2012 01:05:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1K15HRB024037; Mon, 20 Feb 2012 01:05:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201202200105.q1K15HRB024037@svn.freebsd.org> From: Xin LI Date: Mon, 20 Feb 2012 01:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231923 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 01:05:17 -0000 Author: delphij Date: Mon Feb 20 01:05:17 2012 New Revision: 231923 URL: http://svn.freebsd.org/changeset/base/231923 Log: Use uprintf instead of printf for the reason why a kernel module can not be loaded. This way, the administrator can get response immediately from the shell session rather than relying on dmesg. MFC after: 1 month Modified: head/sys/kern/kern_linker.c Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Mon Feb 20 00:56:32 2012 (r231922) +++ head/sys/kern/kern_linker.c Mon Feb 20 01:05:17 2012 (r231923) @@ -2115,7 +2115,7 @@ linker_load_dependencies(linker_file_t l } error = linker_load_module(NULL, modname, lf, verinfo, NULL); if (error) { - printf("KLD %s: depends on %s - not available or" + uprintf("KLD %s: depends on %s - not available or" " version mismatch\n", lf->filename, modname); break; } From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 01:18:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 039BA106566C; Mon, 20 Feb 2012 01:18:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EA218FC14; Mon, 20 Feb 2012 01:18:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1K1IX3N024525; Mon, 20 Feb 2012 01:18:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1K1IXb1024523; Mon, 20 Feb 2012 01:18:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201202200118.q1K1IXb1024523@svn.freebsd.org> From: Xin LI Date: Mon, 20 Feb 2012 01:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231924 - head/sys/dev/arcmsr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 01:18:34 -0000 Author: delphij Date: Mon Feb 20 01:18:32 2012 New Revision: 231924 URL: http://svn.freebsd.org/changeset/base/231924 Log: Return BUS_PROBE_DEFAULT instead of 0 because this is an in-tree driver. MFC after: 1 month Modified: head/sys/dev/arcmsr/arcmsr.c Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Mon Feb 20 01:05:17 2012 (r231923) +++ head/sys/dev/arcmsr/arcmsr.c Mon Feb 20 01:18:32 2012 (r231924) @@ -3861,7 +3861,7 @@ static int arcmsr_probe(device_t dev) return(ENXIO); sprintf(buf, "Areca %s Host Adapter RAID Controller %s\n", type, raid6 ? "(RAID6 capable)" : ""); device_set_desc_copy(dev, buf); - return 0; + return (BUS_PROBE_DEFAULT); } /* ************************************************************************ From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 03:07:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D90B1065674; Mon, 20 Feb 2012 03:07:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05FAD8FC14; Mon, 20 Feb 2012 03:07:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1K377Ck028547; Mon, 20 Feb 2012 03:07:07 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1K377O9028541; Mon, 20 Feb 2012 03:07:07 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202200307.q1K377O9028541@svn.freebsd.org> From: Adrian Chadd Date: Mon, 20 Feb 2012 03:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231927 - in head/sys: conf dev/ath/ath_hal/ar5416 modules/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 03:07:08 -0000 Author: adrian Date: Mon Feb 20 03:07:07 2012 New Revision: 231927 URL: http://svn.freebsd.org/changeset/base/231927 Log: Break out the radar code into a separate source file. This mirrors the internal HAL organisation and reduces the differences between the HAL codebases slightly. Obtained from: Atheros Added: head/sys/dev/ath/ath_hal/ar5416/ar5416_radar.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c head/sys/modules/ath/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 20 01:21:54 2012 (r231926) +++ head/sys/conf/files Mon Feb 20 03:07:07 2012 (r231927) @@ -773,6 +773,10 @@ dev/ath/ath_hal/ar5416/ar5416_power.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +dev/ath/ath_hal/ar5416/ar5416_radar.c \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_recv.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Mon Feb 20 01:21:54 2012 (r231926) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Mon Feb 20 03:07:07 2012 (r231927) @@ -215,6 +215,7 @@ extern HAL_BOOL ar5416GetDiagState(struc void **result, uint32_t *resultsize); extern HAL_BOOL ar5416SetRifsDelay(struct ath_hal *ah, const struct ieee80211_channel *chan, HAL_BOOL enable); + extern void ar5416EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); extern void ar5416GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); extern HAL_BOOL ar5416ProcessRadarEvent(struct ath_hal *ah, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Mon Feb 20 01:21:54 2012 (r231926) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Mon Feb 20 03:07:07 2012 (r231927) @@ -720,361 +720,3 @@ ar5416DetectBBHang(struct ath_hal *ah) #undef N } #undef NUM_STATUS_READS - -/* - * Get the radar parameter values and return them in the pe - * structure - */ -void -ar5416GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) -{ - uint32_t val, temp; - - val = OS_REG_READ(ah, AR_PHY_RADAR_0); - - temp = MS(val,AR_PHY_RADAR_0_FIRPWR); - temp |= 0xFFFFFF80; - pe->pe_firpwr = temp; - pe->pe_rrssi = MS(val, AR_PHY_RADAR_0_RRSSI); - pe->pe_height = MS(val, AR_PHY_RADAR_0_HEIGHT); - pe->pe_prssi = MS(val, AR_PHY_RADAR_0_PRSSI); - pe->pe_inband = MS(val, AR_PHY_RADAR_0_INBAND); - - /* RADAR_1 values */ - val = OS_REG_READ(ah, AR_PHY_RADAR_1); - pe->pe_relpwr = MS(val, AR_PHY_RADAR_1_RELPWR_THRESH); - pe->pe_relstep = MS(val, AR_PHY_RADAR_1_RELSTEP_THRESH); - pe->pe_maxlen = MS(val, AR_PHY_RADAR_1_MAXLEN); - - pe->pe_extchannel = !! (OS_REG_READ(ah, AR_PHY_RADAR_EXT) & - AR_PHY_RADAR_EXT_ENA); - - pe->pe_usefir128 = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & - AR_PHY_RADAR_1_USE_FIR128); - pe->pe_blockradar = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & - AR_PHY_RADAR_1_BLOCK_CHECK); - pe->pe_enmaxrssi = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & - AR_PHY_RADAR_1_MAX_RRSSI); - pe->pe_enabled = !! - (OS_REG_READ(ah, AR_PHY_RADAR_0) & AR_PHY_RADAR_0_ENA); - pe->pe_enrelpwr = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & - AR_PHY_RADAR_1_RELPWR_ENA); - pe->pe_en_relstep_check = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & - AR_PHY_RADAR_1_RELSTEP_CHECK); -} - -/* - * Enable radar detection and set the radar parameters per the - * values in pe - */ -void -ar5416EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) -{ - uint32_t val; - - val = OS_REG_READ(ah, AR_PHY_RADAR_0); - - if (pe->pe_firpwr != HAL_PHYERR_PARAM_NOVAL) { - val &= ~AR_PHY_RADAR_0_FIRPWR; - val |= SM(pe->pe_firpwr, AR_PHY_RADAR_0_FIRPWR); - } - if (pe->pe_rrssi != HAL_PHYERR_PARAM_NOVAL) { - val &= ~AR_PHY_RADAR_0_RRSSI; - val |= SM(pe->pe_rrssi, AR_PHY_RADAR_0_RRSSI); - } - if (pe->pe_height != HAL_PHYERR_PARAM_NOVAL) { - val &= ~AR_PHY_RADAR_0_HEIGHT; - val |= SM(pe->pe_height, AR_PHY_RADAR_0_HEIGHT); - } - if (pe->pe_prssi != HAL_PHYERR_PARAM_NOVAL) { - val &= ~AR_PHY_RADAR_0_PRSSI; - val |= SM(pe->pe_prssi, AR_PHY_RADAR_0_PRSSI); - } - if (pe->pe_inband != HAL_PHYERR_PARAM_NOVAL) { - val &= ~AR_PHY_RADAR_0_INBAND; - val |= SM(pe->pe_inband, AR_PHY_RADAR_0_INBAND); - } - - /*Enable FFT data*/ - val |= AR_PHY_RADAR_0_FFT_ENA; - OS_REG_WRITE(ah, AR_PHY_RADAR_0, val); - - /* Implicitly enable */ - if (pe->pe_enabled == 1) - OS_REG_SET_BIT(ah, AR_PHY_RADAR_0, AR_PHY_RADAR_0_ENA); - else if (pe->pe_enabled == 0) - OS_REG_CLR_BIT(ah, AR_PHY_RADAR_0, AR_PHY_RADAR_0_ENA); - - if (pe->pe_usefir128 == 1) - OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_USE_FIR128); - else if (pe->pe_usefir128 == 0) - OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_USE_FIR128); - - if (pe->pe_enmaxrssi == 1) - OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_MAX_RRSSI); - else if (pe->pe_enmaxrssi == 0) - OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_MAX_RRSSI); - - if (pe->pe_blockradar == 1) - OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_BLOCK_CHECK); - else if (pe->pe_blockradar == 0) - OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_BLOCK_CHECK); - - if (pe->pe_relstep != HAL_PHYERR_PARAM_NOVAL) { - val = OS_REG_READ(ah, AR_PHY_RADAR_1); - val &= ~AR_PHY_RADAR_1_RELSTEP_THRESH; - val |= SM(pe->pe_relstep, AR_PHY_RADAR_1_RELSTEP_THRESH); - OS_REG_WRITE(ah, AR_PHY_RADAR_1, val); - } - if (pe->pe_relpwr != HAL_PHYERR_PARAM_NOVAL) { - val = OS_REG_READ(ah, AR_PHY_RADAR_1); - val &= ~AR_PHY_RADAR_1_RELPWR_THRESH; - val |= SM(pe->pe_relpwr, AR_PHY_RADAR_1_RELPWR_THRESH); - OS_REG_WRITE(ah, AR_PHY_RADAR_1, val); - } - - if (pe->pe_en_relstep_check == 1) - OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, - AR_PHY_RADAR_1_RELSTEP_CHECK); - else if (pe->pe_en_relstep_check == 0) - OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, - AR_PHY_RADAR_1_RELSTEP_CHECK); - - if (pe->pe_enrelpwr == 1) - OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, - AR_PHY_RADAR_1_RELPWR_ENA); - else if (pe->pe_enrelpwr == 0) - OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, - AR_PHY_RADAR_1_RELPWR_ENA); - - if (pe->pe_maxlen != HAL_PHYERR_PARAM_NOVAL) { - val = OS_REG_READ(ah, AR_PHY_RADAR_1); - val &= ~AR_PHY_RADAR_1_MAXLEN; - val |= SM(pe->pe_maxlen, AR_PHY_RADAR_1_MAXLEN); - OS_REG_WRITE(ah, AR_PHY_RADAR_1, val); - } - - /* - * Enable HT/40 if the upper layer asks; - * it should check the channel is HT/40 and HAL_CAP_EXT_CHAN_DFS - * is available. - */ - if (pe->pe_extchannel == 1) - OS_REG_SET_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); - else if (pe->pe_extchannel == 0) - OS_REG_CLR_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); -} - -/* - * Extract the radar event information from the given phy error. - * - * Returns AH_TRUE if the phy error was actually a phy error, - * AH_FALSE if the phy error wasn't a phy error. - */ - -/* Flags for pulse_bw_info */ -#define PRI_CH_RADAR_FOUND 0x01 -#define EXT_CH_RADAR_FOUND 0x02 -#define EXT_CH_RADAR_EARLY_FOUND 0x04 - -HAL_BOOL -ar5416ProcessRadarEvent(struct ath_hal *ah, struct ath_rx_status *rxs, - uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event) -{ - HAL_BOOL doDfsExtCh; - HAL_BOOL doDfsEnhanced; - HAL_BOOL doDfsCombinedRssi; - - uint8_t rssi = 0, ext_rssi = 0; - uint8_t pulse_bw_info = 0, pulse_length_ext = 0, pulse_length_pri = 0; - uint32_t dur = 0; - int pri_found = 1, ext_found = 0; - int early_ext = 0; - int is_dc = 0; - uint16_t datalen; /* length from the RX status field */ - - /* Check whether the given phy error is a radar event */ - if ((rxs->rs_phyerr != HAL_PHYERR_RADAR) && - (rxs->rs_phyerr != HAL_PHYERR_FALSE_RADAR_EXT)) { - return AH_FALSE; - } - - /* Grab copies of the capabilities; just to make the code clearer */ - doDfsExtCh = AH_PRIVATE(ah)->ah_caps.halExtChanDfsSupport; - doDfsEnhanced = AH_PRIVATE(ah)->ah_caps.halEnhancedDfsSupport; - doDfsCombinedRssi = AH_PRIVATE(ah)->ah_caps.halUseCombinedRadarRssi; - - datalen = rxs->rs_datalen; - - /* If hardware supports it, use combined RSSI, else use chain 0 RSSI */ - if (doDfsCombinedRssi) - rssi = (uint8_t) rxs->rs_rssi; - else - rssi = (uint8_t) rxs->rs_rssi_ctl[0]; - - /* Set this; but only use it if doDfsExtCh is set */ - ext_rssi = (uint8_t) rxs->rs_rssi_ext[0]; - - /* Cap it at 0 if the RSSI is a negative number */ - if (rssi & 0x80) - rssi = 0; - - if (ext_rssi & 0x80) - ext_rssi = 0; - - /* - * Fetch the relevant data from the frame - */ - if (doDfsExtCh) { - if (datalen < 3) - return AH_FALSE; - - /* Last three bytes of the frame are of interest */ - pulse_length_pri = *(buf + datalen - 3); - pulse_length_ext = *(buf + datalen - 2); - pulse_bw_info = *(buf + datalen - 1); - HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, ext_rssi=%d, pulse_length_pri=%d," - " pulse_length_ext=%d, pulse_bw_info=%x\n", - __func__, rssi, ext_rssi, pulse_length_pri, pulse_length_ext, - pulse_bw_info); - } else { - /* The pulse width is byte 0 of the data */ - if (datalen >= 1) - dur = ((uint8_t) buf[0]) & 0xff; - else - dur = 0; - - if (dur == 0 && rssi == 0) { - HALDEBUG(ah, HAL_DEBUG_DFS, "%s: dur and rssi are 0\n", __func__); - return AH_FALSE; - } - - HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, dur=%d\n", __func__, rssi, dur); - - /* Single-channel only */ - pri_found = 1; - ext_found = 0; - } - - /* - * If doing extended channel data, pulse_bw_info must - * have one of the flags set. - */ - if (doDfsExtCh && pulse_bw_info == 0x0) - return AH_FALSE; - - /* - * If the extended channel data is available, calculate - * which to pay attention to. - */ - if (doDfsExtCh) { - /* If pulse is on DC, take the larger duration of the two */ - if ((pulse_bw_info & EXT_CH_RADAR_FOUND) && - (pulse_bw_info & PRI_CH_RADAR_FOUND)) { - is_dc = 1; - if (pulse_length_ext > pulse_length_pri) { - dur = pulse_length_ext; - pri_found = 0; - ext_found = 1; - } else { - dur = pulse_length_pri; - pri_found = 1; - ext_found = 0; - } - } else if (pulse_bw_info & EXT_CH_RADAR_EARLY_FOUND) { - dur = pulse_length_ext; - pri_found = 0; - ext_found = 1; - early_ext = 1; - } else if (pulse_bw_info & PRI_CH_RADAR_FOUND) { - dur = pulse_length_pri; - pri_found = 1; - ext_found = 0; - } else if (pulse_bw_info & EXT_CH_RADAR_FOUND) { - dur = pulse_length_ext; - pri_found = 0; - ext_found = 1; - } - - } - - /* - * For enhanced DFS (Merlin and later), pulse_bw_info has - * implications for selecting the correct RSSI value. - */ - if (doDfsEnhanced) { - switch (pulse_bw_info & 0x03) { - case 0: - /* No radar? */ - rssi = 0; - break; - case PRI_CH_RADAR_FOUND: - /* Radar in primary channel */ - /* Cannot use ctrl channel RSSI if ext channel is stronger */ - if (ext_rssi >= (rssi + 3)) { - rssi = 0; - }; - break; - case EXT_CH_RADAR_FOUND: - /* Radar in extended channel */ - /* Cannot use ext channel RSSI if ctrl channel is stronger */ - if (rssi >= (ext_rssi + 12)) { - rssi = 0; - } else { - rssi = ext_rssi; - } - break; - case (PRI_CH_RADAR_FOUND | EXT_CH_RADAR_FOUND): - /* When both are present, use stronger one */ - if (rssi < ext_rssi) - rssi = ext_rssi; - break; - } - } - - /* - * If not doing enhanced DFS, choose the ext channel if - * it is stronger than the main channel - */ - if (doDfsExtCh && !doDfsEnhanced) { - if ((ext_rssi > rssi) && (ext_rssi < 128)) - rssi = ext_rssi; - } - - /* - * XXX what happens if the above code decides the RSSI - * XXX wasn't valid, an sets it to 0? - */ - - /* - * Fill out dfs_event structure. - */ - event->re_full_ts = fulltsf; - event->re_ts = rxs->rs_tstamp; - event->re_rssi = rssi; - event->re_dur = dur; - - event->re_flags = 0; - if (pri_found) - event->re_flags |= HAL_DFS_EVENT_PRICH; - if (ext_found) - event->re_flags |= HAL_DFS_EVENT_EXTCH; - if (early_ext) - event->re_flags |= HAL_DFS_EVENT_EXTEARLY; - if (is_dc) - event->re_flags |= HAL_DFS_EVENT_ISDC; - - return AH_TRUE; -} - -/* - * Return whether fast-clock is currently enabled for this - * channel. - */ -HAL_BOOL -ar5416IsFastClockEnabled(struct ath_hal *ah) -{ - struct ath_hal_private *ahp = AH_PRIVATE(ah); - - return IS_5GHZ_FAST_CLOCK_EN(ah, ahp->ah_curchan); -} Added: head/sys/dev/ath/ath_hal/ar5416/ar5416_radar.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_radar.c Mon Feb 20 03:07:07 2012 (r231927) @@ -0,0 +1,387 @@ +/* + * Copyright (c) 2010-2011 Atheros Communications, Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#include "opt_ah.h" + +#include "ah.h" +#include "ah_internal.h" +#include "ah_devid.h" +#include "ah_desc.h" /* NB: for HAL_PHYERR* */ + +#include "ar5416/ar5416.h" +#include "ar5416/ar5416reg.h" +#include "ar5416/ar5416phy.h" + +#include "ah_eeprom_v14.h" /* for owl_get_ntxchains() */ + +/* + * Get the radar parameter values and return them in the pe + * structure + */ +void +ar5416GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ + uint32_t val, temp; + + val = OS_REG_READ(ah, AR_PHY_RADAR_0); + + temp = MS(val,AR_PHY_RADAR_0_FIRPWR); + temp |= 0xFFFFFF80; + pe->pe_firpwr = temp; + pe->pe_rrssi = MS(val, AR_PHY_RADAR_0_RRSSI); + pe->pe_height = MS(val, AR_PHY_RADAR_0_HEIGHT); + pe->pe_prssi = MS(val, AR_PHY_RADAR_0_PRSSI); + pe->pe_inband = MS(val, AR_PHY_RADAR_0_INBAND); + + /* RADAR_1 values */ + val = OS_REG_READ(ah, AR_PHY_RADAR_1); + pe->pe_relpwr = MS(val, AR_PHY_RADAR_1_RELPWR_THRESH); + pe->pe_relstep = MS(val, AR_PHY_RADAR_1_RELSTEP_THRESH); + pe->pe_maxlen = MS(val, AR_PHY_RADAR_1_MAXLEN); + + pe->pe_extchannel = !! (OS_REG_READ(ah, AR_PHY_RADAR_EXT) & + AR_PHY_RADAR_EXT_ENA); + + pe->pe_usefir128 = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & + AR_PHY_RADAR_1_USE_FIR128); + pe->pe_blockradar = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & + AR_PHY_RADAR_1_BLOCK_CHECK); + pe->pe_enmaxrssi = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & + AR_PHY_RADAR_1_MAX_RRSSI); + pe->pe_enabled = !! + (OS_REG_READ(ah, AR_PHY_RADAR_0) & AR_PHY_RADAR_0_ENA); + pe->pe_enrelpwr = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & + AR_PHY_RADAR_1_RELPWR_ENA); + pe->pe_en_relstep_check = !! (OS_REG_READ(ah, AR_PHY_RADAR_1) & + AR_PHY_RADAR_1_RELSTEP_CHECK); +} + +/* + * Enable radar detection and set the radar parameters per the + * values in pe + */ +void +ar5416EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ + uint32_t val; + + val = OS_REG_READ(ah, AR_PHY_RADAR_0); + + if (pe->pe_firpwr != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_FIRPWR; + val |= SM(pe->pe_firpwr, AR_PHY_RADAR_0_FIRPWR); + } + if (pe->pe_rrssi != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_RRSSI; + val |= SM(pe->pe_rrssi, AR_PHY_RADAR_0_RRSSI); + } + if (pe->pe_height != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_HEIGHT; + val |= SM(pe->pe_height, AR_PHY_RADAR_0_HEIGHT); + } + if (pe->pe_prssi != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_PRSSI; + val |= SM(pe->pe_prssi, AR_PHY_RADAR_0_PRSSI); + } + if (pe->pe_inband != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_INBAND; + val |= SM(pe->pe_inband, AR_PHY_RADAR_0_INBAND); + } + + /*Enable FFT data*/ + val |= AR_PHY_RADAR_0_FFT_ENA; + OS_REG_WRITE(ah, AR_PHY_RADAR_0, val); + + /* Implicitly enable */ + if (pe->pe_enabled == 1) + OS_REG_SET_BIT(ah, AR_PHY_RADAR_0, AR_PHY_RADAR_0_ENA); + else if (pe->pe_enabled == 0) + OS_REG_CLR_BIT(ah, AR_PHY_RADAR_0, AR_PHY_RADAR_0_ENA); + + if (pe->pe_usefir128 == 1) + OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_USE_FIR128); + else if (pe->pe_usefir128 == 0) + OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_USE_FIR128); + + if (pe->pe_enmaxrssi == 1) + OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_MAX_RRSSI); + else if (pe->pe_enmaxrssi == 0) + OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_MAX_RRSSI); + + if (pe->pe_blockradar == 1) + OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_BLOCK_CHECK); + else if (pe->pe_blockradar == 0) + OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, AR_PHY_RADAR_1_BLOCK_CHECK); + + if (pe->pe_relstep != HAL_PHYERR_PARAM_NOVAL) { + val = OS_REG_READ(ah, AR_PHY_RADAR_1); + val &= ~AR_PHY_RADAR_1_RELSTEP_THRESH; + val |= SM(pe->pe_relstep, AR_PHY_RADAR_1_RELSTEP_THRESH); + OS_REG_WRITE(ah, AR_PHY_RADAR_1, val); + } + if (pe->pe_relpwr != HAL_PHYERR_PARAM_NOVAL) { + val = OS_REG_READ(ah, AR_PHY_RADAR_1); + val &= ~AR_PHY_RADAR_1_RELPWR_THRESH; + val |= SM(pe->pe_relpwr, AR_PHY_RADAR_1_RELPWR_THRESH); + OS_REG_WRITE(ah, AR_PHY_RADAR_1, val); + } + + if (pe->pe_en_relstep_check == 1) + OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, + AR_PHY_RADAR_1_RELSTEP_CHECK); + else if (pe->pe_en_relstep_check == 0) + OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, + AR_PHY_RADAR_1_RELSTEP_CHECK); + + if (pe->pe_enrelpwr == 1) + OS_REG_SET_BIT(ah, AR_PHY_RADAR_1, + AR_PHY_RADAR_1_RELPWR_ENA); + else if (pe->pe_enrelpwr == 0) + OS_REG_CLR_BIT(ah, AR_PHY_RADAR_1, + AR_PHY_RADAR_1_RELPWR_ENA); + + if (pe->pe_maxlen != HAL_PHYERR_PARAM_NOVAL) { + val = OS_REG_READ(ah, AR_PHY_RADAR_1); + val &= ~AR_PHY_RADAR_1_MAXLEN; + val |= SM(pe->pe_maxlen, AR_PHY_RADAR_1_MAXLEN); + OS_REG_WRITE(ah, AR_PHY_RADAR_1, val); + } + + /* + * Enable HT/40 if the upper layer asks; + * it should check the channel is HT/40 and HAL_CAP_EXT_CHAN_DFS + * is available. + */ + if (pe->pe_extchannel == 1) + OS_REG_SET_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); + else if (pe->pe_extchannel == 0) + OS_REG_CLR_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); +} + +/* + * Extract the radar event information from the given phy error. + * + * Returns AH_TRUE if the phy error was actually a phy error, + * AH_FALSE if the phy error wasn't a phy error. + */ + +/* Flags for pulse_bw_info */ +#define PRI_CH_RADAR_FOUND 0x01 +#define EXT_CH_RADAR_FOUND 0x02 +#define EXT_CH_RADAR_EARLY_FOUND 0x04 + +HAL_BOOL +ar5416ProcessRadarEvent(struct ath_hal *ah, struct ath_rx_status *rxs, + uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event) +{ + HAL_BOOL doDfsExtCh; + HAL_BOOL doDfsEnhanced; + HAL_BOOL doDfsCombinedRssi; + + uint8_t rssi = 0, ext_rssi = 0; + uint8_t pulse_bw_info = 0, pulse_length_ext = 0, pulse_length_pri = 0; + uint32_t dur = 0; + int pri_found = 1, ext_found = 0; + int early_ext = 0; + int is_dc = 0; + uint16_t datalen; /* length from the RX status field */ + + /* Check whether the given phy error is a radar event */ + if ((rxs->rs_phyerr != HAL_PHYERR_RADAR) && + (rxs->rs_phyerr != HAL_PHYERR_FALSE_RADAR_EXT)) { + return AH_FALSE; + } + + /* Grab copies of the capabilities; just to make the code clearer */ + doDfsExtCh = AH_PRIVATE(ah)->ah_caps.halExtChanDfsSupport; + doDfsEnhanced = AH_PRIVATE(ah)->ah_caps.halEnhancedDfsSupport; + doDfsCombinedRssi = AH_PRIVATE(ah)->ah_caps.halUseCombinedRadarRssi; + + datalen = rxs->rs_datalen; + + /* If hardware supports it, use combined RSSI, else use chain 0 RSSI */ + if (doDfsCombinedRssi) + rssi = (uint8_t) rxs->rs_rssi; + else + rssi = (uint8_t) rxs->rs_rssi_ctl[0]; + + /* Set this; but only use it if doDfsExtCh is set */ + ext_rssi = (uint8_t) rxs->rs_rssi_ext[0]; + + /* Cap it at 0 if the RSSI is a negative number */ + if (rssi & 0x80) + rssi = 0; + + if (ext_rssi & 0x80) + ext_rssi = 0; + + /* + * Fetch the relevant data from the frame + */ + if (doDfsExtCh) { + if (datalen < 3) + return AH_FALSE; + + /* Last three bytes of the frame are of interest */ + pulse_length_pri = *(buf + datalen - 3); + pulse_length_ext = *(buf + datalen - 2); + pulse_bw_info = *(buf + datalen - 1); + HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, ext_rssi=%d, pulse_length_pri=%d," + " pulse_length_ext=%d, pulse_bw_info=%x\n", + __func__, rssi, ext_rssi, pulse_length_pri, pulse_length_ext, + pulse_bw_info); + } else { + /* The pulse width is byte 0 of the data */ + if (datalen >= 1) + dur = ((uint8_t) buf[0]) & 0xff; + else + dur = 0; + + if (dur == 0 && rssi == 0) { + HALDEBUG(ah, HAL_DEBUG_DFS, "%s: dur and rssi are 0\n", __func__); + return AH_FALSE; + } + + HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, dur=%d\n", __func__, rssi, dur); + + /* Single-channel only */ + pri_found = 1; + ext_found = 0; + } + + /* + * If doing extended channel data, pulse_bw_info must + * have one of the flags set. + */ + if (doDfsExtCh && pulse_bw_info == 0x0) + return AH_FALSE; + + /* + * If the extended channel data is available, calculate + * which to pay attention to. + */ + if (doDfsExtCh) { + /* If pulse is on DC, take the larger duration of the two */ + if ((pulse_bw_info & EXT_CH_RADAR_FOUND) && + (pulse_bw_info & PRI_CH_RADAR_FOUND)) { + is_dc = 1; + if (pulse_length_ext > pulse_length_pri) { + dur = pulse_length_ext; + pri_found = 0; + ext_found = 1; + } else { + dur = pulse_length_pri; + pri_found = 1; + ext_found = 0; + } + } else if (pulse_bw_info & EXT_CH_RADAR_EARLY_FOUND) { + dur = pulse_length_ext; + pri_found = 0; + ext_found = 1; + early_ext = 1; + } else if (pulse_bw_info & PRI_CH_RADAR_FOUND) { + dur = pulse_length_pri; + pri_found = 1; + ext_found = 0; + } else if (pulse_bw_info & EXT_CH_RADAR_FOUND) { + dur = pulse_length_ext; + pri_found = 0; + ext_found = 1; + } + + } + + /* + * For enhanced DFS (Merlin and later), pulse_bw_info has + * implications for selecting the correct RSSI value. + */ + if (doDfsEnhanced) { + switch (pulse_bw_info & 0x03) { + case 0: + /* No radar? */ + rssi = 0; + break; + case PRI_CH_RADAR_FOUND: + /* Radar in primary channel */ + /* Cannot use ctrl channel RSSI if ext channel is stronger */ + if (ext_rssi >= (rssi + 3)) { + rssi = 0; + }; + break; + case EXT_CH_RADAR_FOUND: + /* Radar in extended channel */ + /* Cannot use ext channel RSSI if ctrl channel is stronger */ + if (rssi >= (ext_rssi + 12)) { + rssi = 0; + } else { + rssi = ext_rssi; + } + break; + case (PRI_CH_RADAR_FOUND | EXT_CH_RADAR_FOUND): + /* When both are present, use stronger one */ + if (rssi < ext_rssi) + rssi = ext_rssi; + break; + } + } + + /* + * If not doing enhanced DFS, choose the ext channel if + * it is stronger than the main channel + */ + if (doDfsExtCh && !doDfsEnhanced) { + if ((ext_rssi > rssi) && (ext_rssi < 128)) + rssi = ext_rssi; + } + + /* + * XXX what happens if the above code decides the RSSI + * XXX wasn't valid, an sets it to 0? + */ + + /* + * Fill out dfs_event structure. + */ + event->re_full_ts = fulltsf; + event->re_ts = rxs->rs_tstamp; + event->re_rssi = rssi; + event->re_dur = dur; + + event->re_flags = 0; + if (pri_found) + event->re_flags |= HAL_DFS_EVENT_PRICH; + if (ext_found) + event->re_flags |= HAL_DFS_EVENT_EXTCH; + if (early_ext) + event->re_flags |= HAL_DFS_EVENT_EXTEARLY; + if (is_dc) + event->re_flags |= HAL_DFS_EVENT_ISDC; + + return AH_TRUE; +} + +/* + * Return whether fast-clock is currently enabled for this + * channel. + */ +HAL_BOOL +ar5416IsFastClockEnabled(struct ath_hal *ah) +{ + struct ath_hal_private *ahp = AH_PRIVATE(ah); + + return IS_5GHZ_FAST_CLOCK_EN(ah, ahp->ah_curchan); +} Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Mon Feb 20 01:21:54 2012 (r231926) +++ head/sys/modules/ath/Makefile Mon Feb 20 03:07:07 2012 (r231927) @@ -88,8 +88,8 @@ SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \ ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_cal.c \ ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ ar5416_eeprom.c ar5416_gpio.c ar5416_interrupts.c ar5416_keycache.c \ - ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_recv.c \ - ar5416_reset.c ar5416_xmit.c + ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_radar.c \ + ar5416_recv.c ar5416_reset.c ar5416_xmit.c # RF backend for 5416, 9130 and 9160 SRCS+= ar2133.c From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 05:48:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DEDA106566B; Mon, 20 Feb 2012 05:48:58 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 794728FC13; Mon, 20 Feb 2012 05:48:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1K5mw2j034177; Mon, 20 Feb 2012 05:48:58 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1K5mw4a034175; Mon, 20 Feb 2012 05:48:58 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201202200548.q1K5mw4a034175@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 20 Feb 2012 05:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231928 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 05:48:58 -0000 Author: ae Date: Mon Feb 20 05:48:57 2012 New Revision: 231928 URL: http://svn.freebsd.org/changeset/base/231928 Log: Add alias for the partition type 0x0f. Now "ebr" name is used for both types 0x05 and 0x0f, but 0x05 is preferred and used when partition is created with "gpart add -t ebr ...". This should keep EBR partitions accessible after r231754 for those, who have EBR on the partition with type 0x0f. Modified: head/sys/geom/part/g_part_mbr.c Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Mon Feb 20 03:07:07 2012 (r231927) +++ head/sys/geom/part/g_part_mbr.c Mon Feb 20 05:48:57 2012 (r231928) @@ -119,6 +119,7 @@ static struct g_part_mbr_alias { { DOSPTYP_EXT, G_PART_ALIAS_EBR }, { DOSPTYP_NTFS, G_PART_ALIAS_MS_NTFS }, { DOSPTYP_FAT32, G_PART_ALIAS_MS_FAT32 }, + { DOSPTYP_EXTLBA, G_PART_ALIAS_EBR }, { DOSPTYP_LDM, G_PART_ALIAS_MS_LDM_DATA }, { DOSPTYP_LINSWP, G_PART_ALIAS_LINUX_SWAP }, { DOSPTYP_LINUX, G_PART_ALIAS_LINUX_DATA }, From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 05:55:45 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80D711065670; Mon, 20 Feb 2012 05:55:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 0686C8FC13; Mon, 20 Feb 2012 05:55:44 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1K5texG024111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Feb 2012 16:55:42 +1100 Date: Mon, 20 Feb 2012 16:55:40 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Xin LI In-Reply-To: <201202200105.q1K15HRB024037@svn.freebsd.org> Message-ID: <20120220154900.R3579@besplex.bde.org> References: <201202200105.q1K15HRB024037@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r231923 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 05:55:45 -0000 On Mon, 20 Feb 2012, Xin LI wrote: > Log: > Use uprintf instead of printf for the reason why a kernel module can not > be loaded. This way, the administrator can get response immediately from > the shell session rather than relying on dmesg. > > MFC after: 1 month But this way, the message doesn't get logged, and in fact doesn't go to either of the places where it went before (the low-level-console and the log). Its hard to think of many cases where either printf() or uprintf() is correct for system-related or security-related messages generated by applications. printf() spams the console, and uprintf() isn't logged. tprintf() would go to a slightly different controlling terminal than uprintf(), and optionally to the log. In sys/kern, uprintf() was only used for exec errors, and that is almost correct since the errors are application ones (there may be a problem if the application has no controlling terminal -- then the message is not printed anywhere). tprintf() is used mainly by nfs, and that use seems to be correct, except its soleness is incorrect. I don't really like my log files filling up with nfs messages, but at least the messages aren't lost. Outside of sys/kern, most uses of uprintf() except ones in ffs seem to be correct. I think tprintf() should be used in ffs, as in ufs. Most file systems use neither uprintf() nor tprintf(). uprintf() prints on the controlling terminal of the process, while tprintf() prints on the controlling terminal of the session (and optionally, the log). The difference between these controlling terminals is subtle (usually null). I think there is more likely to be a controlling terminal for the session, but if it is not for the process than it is less likely that someone is watching it. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 06:35:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A15106566C; Mon, 20 Feb 2012 06:35:53 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E723D8FC08; Mon, 20 Feb 2012 06:35:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1K6ZqeR035853; Mon, 20 Feb 2012 06:35:52 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1K6ZqOx035851; Mon, 20 Feb 2012 06:35:52 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201202200635.q1K6ZqOx035851@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 20 Feb 2012 06:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231929 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 06:35:53 -0000 Author: ae Date: Mon Feb 20 06:35:52 2012 New Revision: 231929 URL: http://svn.freebsd.org/changeset/base/231929 Log: If nested scheme allows dump kernel to its partition, we may allow dump for the parent partition too. MFC after: 2 weeks Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Mon Feb 20 05:48:57 2012 (r231928) +++ head/sys/geom/part/g_part.c Mon Feb 20 06:35:52 2012 (r231929) @@ -2113,9 +2113,12 @@ g_part_start(struct bio *bp) /* * Check that the partition is suitable for kernel * dumps. Typically only swap partitions should be - * used. + * used. If the request comes from the nested scheme + * we allow dumping there as well. */ - if (!G_PART_DUMPTO(table, entry)) { + if ((bp->bio_from == NULL || + bp->bio_from->geom->class != &g_part_class) && + G_PART_DUMPTO(table, entry) == 0) { g_io_deliver(bp, ENODEV); printf("GEOM_PART: Partition '%s' not suitable" " for kernel dumps (wrong type?)\n", From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 09:32:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50E251065670; Mon, 20 Feb 2012 09:32:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 405628FC17; Mon, 20 Feb 2012 09:32:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1K9WXc8041574; Mon, 20 Feb 2012 09:32:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1K9WXvH041572; Mon, 20 Feb 2012 09:32:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201202200932.q1K9WXvH041572@svn.freebsd.org> From: Xin LI Date: Mon, 20 Feb 2012 09:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231931 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 09:32:33 -0000 Author: delphij Date: Mon Feb 20 09:32:32 2012 New Revision: 231931 URL: http://svn.freebsd.org/changeset/base/231931 Log: Revert r231923 for now. Further work is needed to make sure that the behavior is consistent. Modified: head/sys/kern/kern_linker.c Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Mon Feb 20 08:56:10 2012 (r231930) +++ head/sys/kern/kern_linker.c Mon Feb 20 09:32:32 2012 (r231931) @@ -2115,7 +2115,7 @@ linker_load_dependencies(linker_file_t l } error = linker_load_module(NULL, modname, lf, verinfo, NULL); if (error) { - uprintf("KLD %s: depends on %s - not available or" + printf("KLD %s: depends on %s - not available or" " version mismatch\n", lf->filename, modname); break; } From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 09:44:15 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08121106564A; Mon, 20 Feb 2012 09:44:15 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id DF00A8FC12; Mon, 20 Feb 2012 09:44:14 +0000 (UTC) Received: from delta.delphij.net (unknown [IPv6:2001:470:83bf:0:221:5cff:fe6a:37bb]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 47BDC6FD2; Mon, 20 Feb 2012 01:44:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1329731054; bh=H5MUERkVnbPeOF2rEdpoXb83dhyGZujnjZY8StgwdXY=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=2bq6xJTUJ5D7cYGpfnvOW8XRpCV2a/ulYiA5KGe+rkYiTQP/ARNvw8QbLyB1Lkjnd kO6FQfKFRDZnZuU96gGPWZovtoobQQiI4r4Z5hAUcbKPrRNP3KLiZQg/3F5ABL30lr 6F+B43WNIBBMZTNG8wNigba4sZFBWnPrRwih8O5I= Message-ID: <4F4215E0.20908@delphij.net> Date: Mon, 20 Feb 2012 01:44:00 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Bruce Evans References: <201202200105.q1K15HRB024037@svn.freebsd.org> <20120220154900.R3579@besplex.bde.org> In-Reply-To: <20120220154900.R3579@besplex.bde.org> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, d@delphij.net, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r231923 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 09:44:15 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, Bruce, On 02/19/12 21:55, Bruce Evans wrote: > On Mon, 20 Feb 2012, Xin LI wrote: > >> Log: Use uprintf instead of printf for the reason why a kernel >> module can not be loaded. This way, the administrator can get >> response immediately from the shell session rather than relying >> on dmesg. First of all thanks for your comments! > But this way, the message doesn't get logged, and in fact doesn't > go to either of the places where it went before (the > low-level-console and the log). The old behavior seems to be a little bit contradict with intuition, as the error message could be shown on a different TTY. What happens here would be, let's say the user is on ttyv1, and do a 'kldload foo' where foo.ko depends on a non-existent kernel module, the system would spit error on console (not ttyv1) and log it. > Its hard to think of many cases where either printf() or uprintf() > is correct for system-related or security-related messages > generated by applications. printf() spams the console, and > uprintf() isn't logged. tprintf() would go to a slightly different > controlling terminal than uprintf(), and optionally to the log. > > In sys/kern, uprintf() was only used for exec errors, and that is > almost correct since the errors are application ones (there may be > a problem if the application has no controlling terminal -- then > the message is not printed anywhere). > > tprintf() is used mainly by nfs, and that use seems to be correct, > except its soleness is incorrect. I don't really like my log > files filling up with nfs messages, but at least the messages > aren't lost. > > Outside of sys/kern, most uses of uprintf() except ones in ffs seem > to be correct. I think tprintf() should be used in ffs, as in ufs. > Most file systems use neither uprintf() nor tprintf(). > > uprintf() prints on the controlling terminal of the process, while > tprintf() prints on the controlling terminal of the session (and > optionally, the log). The difference between these controlling > terminals is subtle (usually null). I think there is more likely > to be a controlling terminal for the session, but if it is not for > the process than it is less likely that someone is watching it. I have found another issue so I've reverted this revision for now. I'll put together a new patchset for review. I'm not quite convinced with logging these events, though, since the kernel linker would return a error value if load is not successful, and we do not log e.g. ELF format errors, should kernel modules be treated differently here? Or should I use tprintf(.., LOG_ERR, ..) for these cases? Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJPQhXfAAoJEG80Jeu8UPuz/GYH/iGrO5VJsII1bKdnWg7teOtp ht/YlV2Su2mDNwBdxntlEnsh9G/wGjk+kC1rg/LzaqhJ1lZgukozP5OOL1uj3cST 4BBM2Y0I35nlI611Yj0lC08LMBeDzjM2miDcfNTZz3Yq5s7X2P1zcES6fGDcMZ2P J0b89hya7v5qwEfchk/0LeFi33pvUC3O0IP9sv0GDXfD96KpO6BXyI/hHn07qzYP oCSWIYqz64R7oj5bpdbcFGuskGRtjMG8+0AEiFfaLQ67k7F0L43zhZW51w8yK+5s 5zR+0x+Yziwsmeez+jhWx1fKwhfQX959tlErAaB0dt5f38weGDIKTRvo9q0RPWg= =n/O1 -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 09:54:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69FA7106564A; Mon, 20 Feb 2012 09:54:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id CDF948FC20; Mon, 20 Feb 2012 09:54:10 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q1K9rmh4034507 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Feb 2012 11:53:48 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q1K9rlqb054688; Mon, 20 Feb 2012 11:53:47 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q1K9rl4h054687; Mon, 20 Feb 2012 11:53:47 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 20 Feb 2012 11:53:47 +0200 From: Konstantin Belousov To: Xin LI Message-ID: <20120220095347.GY3283@deviant.kiev.zoral.com.ua> References: <201202200932.q1K9WXvH041572@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NKX+VlCdJCM/2QYV" Content-Disposition: inline In-Reply-To: <201202200932.q1K9WXvH041572@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231931 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 09:54:11 -0000 --NKX+VlCdJCM/2QYV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 20, 2012 at 09:32:33AM +0000, Xin LI wrote: > Author: delphij > Date: Mon Feb 20 09:32:32 2012 > New Revision: 231931 > URL: http://svn.freebsd.org/changeset/base/231931 >=20 > Log: > Revert r231923 for now. Further work is needed to make sure that the > behavior is consistent. You can do both printfs, since both locations are useful. >=20 > Modified: > head/sys/kern/kern_linker.c >=20 > Modified: head/sys/kern/kern_linker.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_linker.c Mon Feb 20 08:56:10 2012 (r231930) > +++ head/sys/kern/kern_linker.c Mon Feb 20 09:32:32 2012 (r231931) > @@ -2115,7 +2115,7 @@ linker_load_dependencies(linker_file_t l > } > error =3D linker_load_module(NULL, modname, lf, verinfo, NULL); > if (error) { > - uprintf("KLD %s: depends on %s - not available or" > + printf("KLD %s: depends on %s - not available or" > " version mismatch\n", lf->filename, modname); > break; > } --NKX+VlCdJCM/2QYV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9CGCsACgkQC3+MBN1Mb4jYuACghGdaNfvz0Pmip4CKFWVbCVfb P3EAniUDYG4g2KcMT0WVSrylb6wfl04F =UDgk -----END PGP SIGNATURE----- --NKX+VlCdJCM/2QYV-- From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 09:56:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 615C2106566B; Mon, 20 Feb 2012 09:56:15 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 510668FC16; Mon, 20 Feb 2012 09:56:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1K9uFtT042327; Mon, 20 Feb 2012 09:56:15 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1K9uFMf042325; Mon, 20 Feb 2012 09:56:15 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201202200956.q1K9uFMf042325@svn.freebsd.org> From: Kevin Lo Date: Mon, 20 Feb 2012 09:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231932 - head/sys/fs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 09:56:15 -0000 Author: kevlo Date: Mon Feb 20 09:56:14 2012 New Revision: 231932 URL: http://svn.freebsd.org/changeset/base/231932 Log: Remove an unnecessary cast. Modified: head/sys/fs/cd9660/cd9660_vfsops.c Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Mon Feb 20 09:32:32 2012 (r231931) +++ head/sys/fs/cd9660/cd9660_vfsops.c Mon Feb 20 09:56:14 2012 (r231932) @@ -205,7 +205,7 @@ iso_mountfs(devvp, mp) struct vnode *devvp; struct mount *mp; { - struct iso_mnt *isomp = (struct iso_mnt *)0; + struct iso_mnt *isomp = NULL; struct buf *bp = NULL; struct buf *pribp = NULL, *supbp = NULL; struct cdev *dev; From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 10:13:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86070106564A; Mon, 20 Feb 2012 10:13:10 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74E9D8FC15; Mon, 20 Feb 2012 10:13:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KADA6C046511; Mon, 20 Feb 2012 10:13:10 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KADArC046509; Mon, 20 Feb 2012 10:13:10 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201202201013.q1KADArC046509@svn.freebsd.org> From: Doug Barton Date: Mon, 20 Feb 2012 10:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231933 - stable/9/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 10:13:10 -0000 Author: dougb Date: Mon Feb 20 10:13:09 2012 New Revision: 231933 URL: http://svn.freebsd.org/changeset/base/231933 Log: MFC r231862: Increase the default shutdown timer to 90 seconds. This will allow certain systems that take a long time to shut down, without adversely affecting things that shut down quickly. It's also 30 seconds less than the default hard limit of 120 seconds in kern.init_shutdown_timeout. PR: conf/109272 Submitted by: Radim Kolar SF.NET Modified: stable/9/etc/defaults/rc.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/defaults/rc.conf ============================================================================== --- stable/9/etc/defaults/rc.conf Mon Feb 20 09:56:14 2012 (r231932) +++ stable/9/etc/defaults/rc.conf Mon Feb 20 10:13:09 2012 (r231933) @@ -24,7 +24,7 @@ rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. rc_startmsgs="YES" # Show "Starting foo:" messages at boot -rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown +rcshutdown_timeout="90" # Seconds to wait before terminating rc.shutdown early_late_divider="FILESYSTEMS" # Script that separates early/late # stages of the boot process. Make sure you know # the ramifications if you change this. From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 10:14:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10300106564A; Mon, 20 Feb 2012 10:14:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F31BE8FC15; Mon, 20 Feb 2012 10:14:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KAEMeb046599; Mon, 20 Feb 2012 10:14:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KAEMpD046597; Mon, 20 Feb 2012 10:14:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201202201014.q1KAEMpD046597@svn.freebsd.org> From: Doug Barton Date: Mon, 20 Feb 2012 10:14:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231934 - stable/8/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 10:14:23 -0000 Author: dougb Date: Mon Feb 20 10:14:22 2012 New Revision: 231934 URL: http://svn.freebsd.org/changeset/base/231934 Log: MFC r231862: Increase the default shutdown timer to 90 seconds. This will allow certain systems that take a long time to shut down, without adversely affecting things that shut down quickly. It's also 30 seconds less than the default hard limit of 120 seconds in kern.init_shutdown_timeout. PR: conf/109272 Submitted by: Radim Kolar SF.NET Approved by: re (kib) Modified: stable/8/etc/defaults/rc.conf Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/defaults/rc.conf ============================================================================== --- stable/8/etc/defaults/rc.conf Mon Feb 20 10:13:09 2012 (r231933) +++ stable/8/etc/defaults/rc.conf Mon Feb 20 10:14:22 2012 (r231934) @@ -24,7 +24,7 @@ rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. rc_startmsgs="YES" # Show "Starting foo:" messages at boot -rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown +rcshutdown_timeout="90" # Seconds to wait before terminating rc.shutdown early_late_divider="FILESYSTEMS" # Script that separates early/late # stages of the boot process. Make sure you know # the ramifications if you change this. From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 10:15:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E19E106564A; Mon, 20 Feb 2012 10:15:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0F678FC0C; Mon, 20 Feb 2012 10:15:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KAFKJk046686; Mon, 20 Feb 2012 10:15:20 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KAFKYT046684; Mon, 20 Feb 2012 10:15:20 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201202201015.q1KAFKYT046684@svn.freebsd.org> From: Doug Barton Date: Mon, 20 Feb 2012 10:15:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231935 - stable/7/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 10:15:21 -0000 Author: dougb Date: Mon Feb 20 10:15:20 2012 New Revision: 231935 URL: http://svn.freebsd.org/changeset/base/231935 Log: MFC r231862: Increase the default shutdown timer to 90 seconds. This will allow certain systems that take a long time to shut down, without adversely affecting things that shut down quickly. It's also 30 seconds less than the default hard limit of 120 seconds in kern.init_shutdown_timeout. PR: conf/109272 Submitted by: Radim Kolar SF.NET Modified: stable/7/etc/defaults/rc.conf Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/defaults/rc.conf ============================================================================== --- stable/7/etc/defaults/rc.conf Mon Feb 20 10:14:22 2012 (r231934) +++ stable/7/etc/defaults/rc.conf Mon Feb 20 10:15:20 2012 (r231935) @@ -23,7 +23,7 @@ rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. -rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown +rcshutdown_timeout="90" # Seconds to wait before terminating rc.shutdown early_late_divider="FILESYSTEMS" # Script that separates early/late # stages of the boot process. Make sure you know # the ramifications if you change this. From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 11:27:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC20C1065674; Mon, 20 Feb 2012 11:27:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 995B08FC08; Mon, 20 Feb 2012 11:27:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KBRcQ0049043; Mon, 20 Feb 2012 11:27:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KBRcpd049031; Mon, 20 Feb 2012 11:27:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202201127.q1KBRcpd049031@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 20 Feb 2012 11:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231936 - in stable/9/sys: fs/ext2fs fs/nfsclient geom/journal kern nfsclient sys ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 11:27:38 -0000 Author: kib Date: Mon Feb 20 11:27:37 2012 New Revision: 231936 URL: http://svn.freebsd.org/changeset/base/231936 Log: MFC r231075: Instead of removing MNTK_ASYNC from mnt_kern_flag, provide a local thread flag to disable async i/o for current thread only. Use the opportunity to move DOINGASYNC() macro into sys/vnode.h and consistently use it through places which tested for MNTK_ASYNC. MFC r231204: Unbreak detection of the async mode for clustered writes after r231075. Modified: stable/9/sys/fs/ext2fs/inode.h stable/9/sys/fs/nfsclient/nfs_clvnops.c stable/9/sys/geom/journal/g_journal.c stable/9/sys/kern/vfs_cluster.c stable/9/sys/kern/vfs_subr.c stable/9/sys/kern/vfs_syscalls.c stable/9/sys/nfsclient/nfs_vnops.c stable/9/sys/sys/proc.h stable/9/sys/sys/vnode.h stable/9/sys/ufs/ufs/inode.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/ext2fs/inode.h ============================================================================== --- stable/9/sys/fs/ext2fs/inode.h Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/fs/ext2fs/inode.h Mon Feb 20 11:27:37 2012 (r231936) @@ -160,9 +160,6 @@ struct indir { #define VTOI(vp) ((struct inode *)(vp)->v_data) #define ITOV(ip) ((ip)->i_vnode) -/* Check whether the MNTK_ASYNC flag has been set for a mount point */ -#define DOINGASYNC(vp) ((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) - /* This overlays the fid structure (see mount.h). */ struct ufid { uint16_t ufid_len; /* Length of structure. */ Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clvnops.c Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/fs/nfsclient/nfs_clvnops.c Mon Feb 20 11:27:37 2012 (r231936) @@ -1385,7 +1385,7 @@ ncl_writerpc(struct vnode *vp, struct ui if (ret && !error) error = ret; } - if (vp->v_mount->mnt_kern_flag & MNTK_ASYNC) + if (DOINGASYNC(vp)) *iomode = NFSWRITE_FILESYNC; if (error && NFS_ISV4(vp)) error = nfscl_maperr(uiop->uio_td, error, (uid_t)0, (gid_t)0); Modified: stable/9/sys/geom/journal/g_journal.c ============================================================================== --- stable/9/sys/geom/journal/g_journal.c Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/geom/journal/g_journal.c Mon Feb 20 11:27:37 2012 (r231936) @@ -2869,7 +2869,7 @@ g_journal_do_switch(struct g_class *clas struct mount *mp; struct bintime bt; char *mountpoint; - int error, vfslocked; + int error, save, vfslocked; DROP_GIANT(); g_topology_lock(); @@ -2931,10 +2931,7 @@ g_journal_do_switch(struct g_class *clas goto next; } - MNT_ILOCK(mp); - mp->mnt_noasync++; - mp->mnt_kern_flag &= ~MNTK_ASYNC; - MNT_IUNLOCK(mp); + save = curthread_pflags_set(TDP_SYNCIO); GJ_TIMER_START(1, &bt); vfs_msync(mp, MNT_NOWAIT); @@ -2949,11 +2946,7 @@ g_journal_do_switch(struct g_class *clas mountpoint, error); } - MNT_ILOCK(mp); - mp->mnt_noasync--; - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) - mp->mnt_kern_flag |= MNTK_ASYNC; - MNT_IUNLOCK(mp); + curthread_pflags_restore(save); vn_finished_write(mp); Modified: stable/9/sys/kern/vfs_cluster.c ============================================================================== --- stable/9/sys/kern/vfs_cluster.c Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/kern/vfs_cluster.c Mon Feb 20 11:27:37 2012 (r231936) @@ -604,7 +604,7 @@ cluster_write(struct vnode *vp, struct b int async; if (vp->v_type == VREG) { - async = vp->v_mount->mnt_kern_flag & MNTK_ASYNC; + async = DOINGASYNC(vp); lblocksize = vp->v_mount->mnt_stat.f_iosize; } else { async = 0; Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/kern/vfs_subr.c Mon Feb 20 11:27:37 2012 (r231936) @@ -3521,7 +3521,7 @@ sync_fsync(struct vop_fsync_args *ap) { struct vnode *syncvp = ap->a_vp; struct mount *mp = syncvp->v_mount; - int error; + int error, save; struct bufobj *bo; /* @@ -3551,17 +3551,10 @@ sync_fsync(struct vop_fsync_args *ap) vfs_unbusy(mp); return (0); } - MNT_ILOCK(mp); - mp->mnt_noasync++; - mp->mnt_kern_flag &= ~MNTK_ASYNC; - MNT_IUNLOCK(mp); + save = curthread_pflags_set(TDP_SYNCIO); vfs_msync(mp, MNT_NOWAIT); error = VFS_SYNC(mp, MNT_LAZY); - MNT_ILOCK(mp); - mp->mnt_noasync--; - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) - mp->mnt_kern_flag |= MNTK_ASYNC; - MNT_IUNLOCK(mp); + curthread_pflags_restore(save); vn_finished_write(mp); vfs_unbusy(mp); return (error); Modified: stable/9/sys/kern/vfs_syscalls.c ============================================================================== --- stable/9/sys/kern/vfs_syscalls.c Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/kern/vfs_syscalls.c Mon Feb 20 11:27:37 2012 (r231936) @@ -134,7 +134,7 @@ sys_sync(td, uap) struct sync_args *uap; { struct mount *mp, *nmp; - int vfslocked; + int save, vfslocked; mtx_lock(&mountlist_mtx); for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { @@ -145,18 +145,10 @@ sys_sync(td, uap) vfslocked = VFS_LOCK_GIANT(mp); if ((mp->mnt_flag & MNT_RDONLY) == 0 && vn_start_write(NULL, &mp, V_NOWAIT) == 0) { - MNT_ILOCK(mp); - mp->mnt_noasync++; - mp->mnt_kern_flag &= ~MNTK_ASYNC; - MNT_IUNLOCK(mp); + save = curthread_pflags_set(TDP_SYNCIO); vfs_msync(mp, MNT_NOWAIT); VFS_SYNC(mp, MNT_NOWAIT); - MNT_ILOCK(mp); - mp->mnt_noasync--; - if ((mp->mnt_flag & MNT_ASYNC) != 0 && - mp->mnt_noasync == 0) - mp->mnt_kern_flag |= MNTK_ASYNC; - MNT_IUNLOCK(mp); + curthread_pflags_restore(save); vn_finished_write(mp); } VFS_UNLOCK_GIANT(vfslocked); Modified: stable/9/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/9/sys/nfsclient/nfs_vnops.c Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/nfsclient/nfs_vnops.c Mon Feb 20 11:27:37 2012 (r231936) @@ -1454,7 +1454,7 @@ nfs_writerpc(struct vnode *vp, struct ui tsiz -= len; } nfsmout: - if (vp->v_mount->mnt_kern_flag & MNTK_ASYNC) + if (DOINGASYNC(vp)) committed = NFSV3WRITE_FILESYNC; *iomode = committed; if (error) Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/sys/proc.h Mon Feb 20 11:27:37 2012 (r231936) @@ -400,7 +400,7 @@ do { \ #define TDP_NOSLEEPING 0x00000100 /* Thread is not allowed to sleep on a sq. */ #define TDP_OWEUPC 0x00000200 /* Call addupc() at next AST. */ #define TDP_ITHREAD 0x00000400 /* Thread is an interrupt thread. */ -#define TDP_UNUSED800 0x00000800 /* available. */ +#define TDP_SYNCIO 0x00000800 /* Local override, disable async i/o. */ #define TDP_SCHED1 0x00001000 /* Reserved for scheduler private use */ #define TDP_SCHED2 0x00002000 /* Reserved for scheduler private use */ #define TDP_SCHED3 0x00004000 /* Reserved for scheduler private use */ Modified: stable/9/sys/sys/vnode.h ============================================================================== --- stable/9/sys/sys/vnode.h Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/sys/vnode.h Mon Feb 20 11:27:37 2012 (r231936) @@ -538,6 +538,10 @@ void assert_vop_unlocked(struct vnode *v */ #define VCALL(c) ((c)->a_desc->vdesc_call(c)) +#define DOINGASYNC(vp) \ + (((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) != 0 && \ + ((curthread->td_pflags & TDP_SYNCIO) == 0)) + /* * VMIO support inline */ Modified: stable/9/sys/ufs/ufs/inode.h ============================================================================== --- stable/9/sys/ufs/ufs/inode.h Mon Feb 20 10:15:20 2012 (r231935) +++ stable/9/sys/ufs/ufs/inode.h Mon Feb 20 11:27:37 2012 (r231936) @@ -176,7 +176,6 @@ struct indir { /* Determine if soft dependencies are being done */ #define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) #define MOUNTEDSOFTDEP(mp) ((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) -#define DOINGASYNC(vp) ((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) #define DOINGSUJ(vp) ((vp)->v_mount->mnt_flag & MNT_SUJ) #define MOUNTEDSUJ(mp) ((mp)->mnt_flag & MNT_SUJ) From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 13:22:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AA33106564A; Mon, 20 Feb 2012 13:22:01 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4728FC13; Mon, 20 Feb 2012 13:22:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KDM0Qp052761; Mon, 20 Feb 2012 13:22:00 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KDM0oj052759; Mon, 20 Feb 2012 13:22:00 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202201322.q1KDM0oj052759@svn.freebsd.org> From: Christian Brueffer Date: Mon, 20 Feb 2012 13:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231937 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 13:22:01 -0000 Author: brueffer Date: Mon Feb 20 13:22:00 2012 New Revision: 231937 URL: http://svn.freebsd.org/changeset/base/231937 Log: More improvements, the biggest one using list environments for enumerations. Modified: head/share/man/man4/oce.4 Modified: head/share/man/man4/oce.4 ============================================================================== --- head/share/man/man4/oce.4 Mon Feb 20 11:27:37 2012 (r231936) +++ head/share/man/man4/oce.4 Mon Feb 20 13:22:00 2012 (r231937) @@ -58,7 +58,7 @@ module at boot time, place the following if_oce_load="YES" .Ed .Sh DESCRIPTION -Emulex one connect adapters come in various skews and with +Emulex OneConnect adapters come in various skews and with different combinations of NIC, FCoE and iSCSI functions. The .Nm @@ -69,47 +69,63 @@ The driver supports VLAN Hardware offload, TCP checksum offload, TCP segmentation offload (TSO), Large receive offload (LRO), Bonding, Jumbo frames (from 1500 - 9000), Multiple TX queues, -Receive-Side Scaling(RSS) and MSI-X interrupts. +Receive-Side Scaling (RSS) and MSI-X interrupts. .Sh HARDWARE The .Nm -driver supports the following Emulex network adapters: +driver supports the following network adapters: .Pp .Bl -bullet -compact .It -BladeEngine 2 +Emulex BladeEngine 2 .It -BladeEngine 3 +Emulex BladeEngine 3 .It -Lancer +Emulex Lancer .El .Sh UPDATING FIRMWARE Adapter firmware updates are persistent. .Pp Firmware can be updated by following the steps below: -.Bd -literal -compact - 1) Copy the below code to a Makefile - ".KMOD=elxflash - FIRMWS=imagename.ufi:elxflash - .include " - 2) Replace imagename in above with UFI file name. - 3) Copy Makefile and UFI to a directory - 4) Execute make & copy generated elxflash.ko to /lib/modules - 5) sysctl dev.oce..fw_upgrade=elxflash - 6) Reboot the machine. +.Bl -enum +.It +Copy the below code to a Makefile: .Pp -In case of issues with supplied UFI, flashing fails with one -of the below errors. - 1) "Invalid BE3 firmware image" - 2) "Invalid Cookie. Firmware image corrupted ?" - 3) "cmd to write to flash rom failed." +.Bd -literal -offset indent +\&.KMOD=elxflash +FIRMWS=imagename.ufi:elxflash +\&.include .Ed +.It +Replace imagename in above with UFI file name +.It +Copy Makefile and UFI file to a directory +.It +Execute make & copy generated elxflash.ko to +.Pa /lib/modules +.It +sysctl dev.oce..fw_upgrade=elxflash +.It +Reboot the machine +.El +.Pp +In case of issues with supplied UFI, flashing fails with one +of the following errors. +.Pp +.Bl -enum -compact +.It +.Qq Invalid BE3 firmware image +.It +.Qq "Invalid Cookie. Firmware image corrupted ?" +.It +.Qq cmd to write to flash rom failed. +.El .Sh SUPPORT For general information and support, go to the Emulex website at: -.Fa http://www.Emulex.com/ +.Pa http://www.Emulex.com/ or E-Mail at -.Fa freebsd-drivers@emulex.com. +.Pa freebsd-drivers@emulex.com . .Sh SEE ALSO .Xr ifconfig 8 .Sh AUTHORS @@ -117,4 +133,4 @@ or E-Mail at The .Nm driver was written by -.An freebsd-drivers@emulex.com. +.An freebsd-drivers@emulex.com . From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 13:59:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A9CA106566C; Mon, 20 Feb 2012 13:59:25 +0000 (UTC) (envelope-from ghelmer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A3E68FC15; Mon, 20 Feb 2012 13:59:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KDxPPF053934; Mon, 20 Feb 2012 13:59:25 GMT (envelope-from ghelmer@svn.freebsd.org) Received: (from ghelmer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KDxPrW053932; Mon, 20 Feb 2012 13:59:25 GMT (envelope-from ghelmer@svn.freebsd.org) Message-Id: <201202201359.q1KDxPrW053932@svn.freebsd.org> From: Guy Helmer Date: Mon, 20 Feb 2012 13:59:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231938 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 13:59:25 -0000 Author: ghelmer Date: Mon Feb 20 13:59:24 2012 New Revision: 231938 URL: http://svn.freebsd.org/changeset/base/231938 Log: Set the O_CLOEXEC flag when opening the pidfile to avoid leaking the file descriptor via exec(3). Now that daemon(8) has been fixed to resolve the issue noted by trociny, the consensus is that this change should be OK. Modified: head/lib/libutil/pidfile.c Modified: head/lib/libutil/pidfile.c ============================================================================== --- head/lib/libutil/pidfile.c Mon Feb 20 13:22:00 2012 (r231937) +++ head/lib/libutil/pidfile.c Mon Feb 20 13:59:24 2012 (r231938) @@ -124,7 +124,7 @@ pidfile_open(const char *path, mode_t mo * pidfile_write() can be called multiple times. */ fd = flopen(pfh->pf_path, - O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode); + O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode); if (fd == -1) { if (errno == EWOULDBLOCK && pidptr != NULL) { count = 20; From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 15:05:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97ABE106566B; Mon, 20 Feb 2012 15:05:22 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 873FB8FC15; Mon, 20 Feb 2012 15:05:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KF5McS056278; Mon, 20 Feb 2012 15:05:22 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KF5MNP056276; Mon, 20 Feb 2012 15:05:22 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201202201505.q1KF5MNP056276@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 20 Feb 2012 15:05:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231939 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 15:05:22 -0000 Author: ray Date: Mon Feb 20 15:05:21 2012 New Revision: 231939 URL: http://svn.freebsd.org/changeset/base/231939 Log: Remove redundant forward declaration of struct ieee80211com. Approved by: bschmidt Modified: head/sys/net80211/ieee80211_node.h Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Mon Feb 20 13:59:24 2012 (r231938) +++ head/sys/net80211/ieee80211_node.h Mon Feb 20 15:05:21 2012 (r231939) @@ -299,8 +299,6 @@ ieee80211_unref_node(struct ieee80211_no *ni = NULL; /* guard against use */ } -struct ieee80211com; - void ieee80211_node_attach(struct ieee80211com *); void ieee80211_node_lateattach(struct ieee80211com *); void ieee80211_node_detach(struct ieee80211com *); From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 16:26:24 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A52881065670; Mon, 20 Feb 2012 16:26:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 3FED68FC08; Mon, 20 Feb 2012 16:26:23 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1KGQDF3009163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Feb 2012 03:26:15 +1100 Date: Tue, 21 Feb 2012 03:26:13 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: d@delphij.net In-Reply-To: <4F4215E0.20908@delphij.net> Message-ID: <20120221023401.B1246@besplex.bde.org> References: <201202200105.q1K15HRB024037@svn.freebsd.org> <20120220154900.R3579@besplex.bde.org> <4F4215E0.20908@delphij.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r231923 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 16:26:24 -0000 On Mon, 20 Feb 2012, Xin Li wrote: > On 02/19/12 21:55, Bruce Evans wrote: >> On Mon, 20 Feb 2012, Xin LI wrote: >> >>> Log: Use uprintf instead of printf for the reason why a kernel >>> module can not be loaded. This way, the administrator can get >>> response immediately from the shell session rather than relying >>> on dmesg. > > First of all thanks for your comments! > >> But this way, the message doesn't get logged, and in fact doesn't >> go to either of the places where it went before (the >> low-level-console and the log). > > The old behavior seems to be a little bit contradict with intuition, > as the error message could be shown on a different TTY. What happens > here would be, let's say the user is on ttyv1, and do a 'kldload foo' > where foo.ko depends on a non-existent kernel module, the system would > spit error on console (not ttyv1) and log it. Yes, this is a general problem with printf. >> Its hard to think of many cases where either printf() or uprintf() >> is correct for system-related or security-related messages >> generated by applications. printf() spams the console, and >> uprintf() isn't logged. tprintf() would go to a slightly different >> controlling terminal than uprintf(), and optionally to the log. >> ... > > I have found another issue so I've reverted this revision for now. > I'll put together a new patchset for review. I'm not quite convinced > with logging these events, though, since the kernel linker would > return a error value if load is not successful, and we do not log e.g. > ELF format errors, should kernel modules be treated differently here? > Or should I use tprintf(.., LOG_ERR, ..) for these cases? tprintf() (or a separate log()) lets you control the priority. printf() gives a high priority and LOG_ERR may be too high too. (BTW, there is a lot of magic for printf()'s priority. syslog.h defines LOG_PRINTF as -1 (without the necessary parentheses). I thought that nothing used this any more, but printf() actually hard-codes the -1.) I don't know why we print anything at all in the kernel about this and other errors. Why not let the application print something? kern_linker.c has lots of other printf()s. Well, the printf()s give more detail than a single error can give. But most other subsystems don't use printf()s for syscalls. kern_linker.c also does some boot-time loading where there is no syscall or terminal, so it must use printf() or log(). I don't believe in modules and haven't used one for years, so I shouldn't be talking about this :-). But I have been looking at the printf() plumbing a lot lately. Another thing that seems wrong, is that log() prints only to the log if the log is open, and only to the console if the log is not open. This seems to mainly break boot code that wants to use log() instead of printf() so as to get better filtering for the log and doesn't care if the console is not used. Why not always print to the message buffer in log(), and also to the console if the log is not open? Well, we risk filling up the log if we write to it when it is not open. But printf() does that anyway, and in practice boot code writes a lot to the log via printf(). Some consider the console part of this to be spam, but everyone wants the log part. So we now have a very large message buffer (up from a whole 4K (non-configurable, MI) in 4.4BSDLite2 to 96K (configurable, MI default)) to hold the non-spam. It can hold a few log() messages too. Boot code apparently knows a little about this problem, so it always uses printf(). Thus the only case where log() is likely to cycle the message buffer when it is not open and doesn't cycle now is after the system is up, but someone kills syslogd and then spams with log(). The correct treatment seems to be: - never write nil priority messages to the message buffer - always write high priority messages to it - otherwise, write to it if it has plenty of space free - otherwise, leave some space for high-priority messages. Do this even of the log is open. - all printf()s probably need to be considered high priority, since there is no way to specify their priority. Change some low priority and/or spammish ones to use log(), although this loses their console printing when the log is open. - abuse the priority field some more to tell log() to print to the console too, so that it can be a full replacement for printf(), with optional printing to the log. Use this to recover console printing for low priority messages and to force logging for high priority ones. An average printf() hopefully doesn't need to be changed to control its logging, so the default for printf() would become to not log it if the log almost full. I often use spammish printf()s in debugging code, and in most cases I don't want them to fill up log files although I might want them to go to the message buffer. Large histories help here too. After a crash that breaks syslogd and/or more, it is often possible to see all the messages in either a large console driver history buffer or in the message buffer. The history sizes are slightly different, so in rare cases you might find useful stuff in the message buffer that is not on the console. But there is currently no way to get low-level console output without also spamming the message buffer, and also the log files if you forget to kill syslogd. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 16:50:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FCC6106566C; Mon, 20 Feb 2012 16:50:16 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E5948FC1C; Mon, 20 Feb 2012 16:50:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KGoG4b059631; Mon, 20 Feb 2012 16:50:16 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KGoGN4059629; Mon, 20 Feb 2012 16:50:16 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201202201650.q1KGoGN4059629@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 20 Feb 2012 16:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231940 - stable/9/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 16:50:16 -0000 Author: ken Date: Mon Feb 20 16:50:16 2012 New Revision: 231940 URL: http://svn.freebsd.org/changeset/base/231940 Log: MFC r231716 Set the max_lun field of the path inquiry CCB to 8. This allows LUNs greater than 0 to be probed. It can be increased later if need be. This brings back SVN rev 224973, which was inadvertently removed with the import of the LSI driver. Reported by: dwhite Modified: stable/9/sys/dev/mps/mps_sas.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/mps/mps_sas.c ============================================================================== --- stable/9/sys/dev/mps/mps_sas.c Mon Feb 20 15:05:21 2012 (r231939) +++ stable/9/sys/dev/mps/mps_sas.c Mon Feb 20 16:50:16 2012 (r231940) @@ -919,7 +919,7 @@ mpssas_action(struct cam_sim *sim, union cpi->hba_misc = PIM_NOBUSRESET; cpi->hba_eng_cnt = 0; cpi->max_target = sassc->sc->facts->MaxTargets - 1; - cpi->max_lun = 0; + cpi->max_lun = 8; cpi->initiator_id = 255; strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strncpy(cpi->hba_vid, "LSILogic", HBA_IDLEN); From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 17:09:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B362106566B; Mon, 20 Feb 2012 17:09:53 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDFC68FC16; Mon, 20 Feb 2012 17:09:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KH9qbx060384; Mon, 20 Feb 2012 17:09:52 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KH9qjs060382; Mon, 20 Feb 2012 17:09:52 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201202201709.q1KH9qjs060382@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 20 Feb 2012 17:09:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231941 - stable/9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 17:09:53 -0000 Author: pluknet Date: Mon Feb 20 17:09:52 2012 New Revision: 231941 URL: http://svn.freebsd.org/changeset/base/231941 Log: MFC r231821: delete-old does not have delete-old-libs dependency. Reflect this in the comment. PR: conf/163993 Submitted by: Eugen Konkov Modified: stable/9/Makefile (contents, props changed) Modified: stable/9/Makefile ============================================================================== --- stable/9/Makefile Mon Feb 20 16:50:16 2012 (r231940) +++ stable/9/Makefile Mon Feb 20 17:09:52 2012 (r231941) @@ -24,7 +24,7 @@ # check-old-dirs - List obsolete directories. # check-old-files - List obsolete files. # check-old-libs - List obsolete libraries. -# delete-old - Delete obsolete directories/files/libraries. +# delete-old - Delete obsolete directories/files. # delete-old-dirs - Delete obsolete directories. # delete-old-files - Delete obsolete files. # delete-old-libs - Delete obsolete libraries. From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 17:57:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0EA2106566B; Mon, 20 Feb 2012 17:57:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by mx1.freebsd.org (Postfix) with ESMTP id 3D46B8FC13; Mon, 20 Feb 2012 17:57:16 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1KHvD5P029328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Feb 2012 04:57:14 +1100 Date: Tue, 21 Feb 2012 04:57:13 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Aleksandr Rybalko In-Reply-To: <201202201505.q1KF5MNP056276@svn.freebsd.org> Message-ID: <20120221041356.A1826@besplex.bde.org> References: <201202201505.q1KF5MNP056276@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231939 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 17:57:17 -0000 On Mon, 20 Feb 2012, Aleksandr Rybalko wrote: > Log: > Remove redundant forward declaration of struct ieee80211com. Thanks, but it now has 1 redundant forward declarations of this instead of 2. There is another section with 3 forward declarations which are all redundant and bogus. Since programmers apparently don't understand C's scope rules for declarations of incomplete structs (these declarations declare just the struct tag), it would be useful for the compiler to warn about bogus ones. The remaining 3 bogus ones are before a struct that uses pointers to the incomplete structs for its struct members. C's scope rules work right in this case, and so any pointer declaration self-declares the same incomplete struct that a previous forward declaration would (thus any previous purely-forward declaration is bogus, and `any' applies to all 3 here), and also forward-declares the incomplete struct for the rest of the file (so any later forward declaration is bogus). > Modified: head/sys/net80211/ieee80211_node.h > ============================================================================== > --- head/sys/net80211/ieee80211_node.h Mon Feb 20 13:59:24 2012 (r231938) > +++ head/sys/net80211/ieee80211_node.h Mon Feb 20 15:05:21 2012 (r231939) > @@ -299,8 +299,6 @@ ieee80211_unref_node(struct ieee80211_no > *ni = NULL; /* guard against use */ > } > > -struct ieee80211com; > - > void ieee80211_node_attach(struct ieee80211com *); > void ieee80211_node_lateattach(struct ieee80211com *); > void ieee80211_node_detach(struct ieee80211com *); OTOH, the scope rules for prototypes (and function definitions) don't work right. Any declaration of an incomplete struct in the function's parameters is purely local to the extent that it doesn't affect the rest of the file, and to go with this the declaration must be of a struct that is incapable being passed, unless the struct has already been declared, perhaps incompletely. So some prototypes need an explicit forward declaration of the struct which is sometimes placed just before the prototype or at the beginning of a block of prototypes. But in many cases, such a declaration is bogus because the struct has already been declared (incompletely and self-referentially) as part of the declaration of a pointer struct member. Normal order puts (complete) struct declarations before prototypes and thus gives the declaration more often than other orders would, and it is good to depend on it since the need for forward declarations before prototypes is just a bug in the scope rules for prototypes so we shouldn't have to write extra code to work around it. Compilers can be relied to warn about cases where the explicit forward declarations are necessary, except in cases of header pollution where most but not all of the necessary forward declarations are provided accidentally by pollution in other headers (you start getting errors if the pollution is fixed or moved, or if the application doesn't happen to include enough headers to supply as much pollution as it used to). I usually find minimal sets of forard declarations by first fixing all pollution and then compiling the header without any other includes before it; then remove all forward declarations and add back the ones that cause compilation failures. Without fixing the pollution, you can't rely on compilation failures to find all the necessary ones. Pollution and non-pollution in other headers make it difficult for a -Wbogus-declarations option to be made usable. The -Wredundant-decls options option is only for variables and prototypes, and is buggy for non-redundant declarations where the declaration is built up, with types and other qualities being completed at each step. Considerable ifdefing was needed to make this usable in the FreeBSD kernel, and it is only enabled by WARNS >= 6 in userland. Similar ifdefing for struct tags might be even more painful. Now it is clearer that some declarations are built up -- a full struct definition is not redundant when it completes an incomplete struct declaration. The self-forward declaration of "struct foo" in "struct foo *bar" is never redundant, and it makes any previous forward declaration of "struct foo" redundant, but the compiler can only usefully warn about this if the previous one is guaranteed to be in scope (thus if it is in another header, it may or not be bogus, depending on whether that header always does it and is always included, and this is so in all other headers). Bruce From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 18:49:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08228106566B; Mon, 20 Feb 2012 18:49:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E94D08FC18; Mon, 20 Feb 2012 18:49:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KInBqN063593; Mon, 20 Feb 2012 18:49:11 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KInBVQ063584; Mon, 20 Feb 2012 18:49:11 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202201849.q1KInBVQ063584@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 20 Feb 2012 18:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231942 - in stable/9/usr.sbin/makefs: . cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 18:49:12 -0000 Author: jkim Date: Mon Feb 20 18:49:11 2012 New Revision: 231942 URL: http://svn.freebsd.org/changeset/base/231942 Log: MFC: r230795 Allow contents of multiple directories to be merged to the current image. Modified: stable/9/usr.sbin/makefs/cd9660.c stable/9/usr.sbin/makefs/cd9660.h stable/9/usr.sbin/makefs/cd9660/cd9660_write.c stable/9/usr.sbin/makefs/ffs.c stable/9/usr.sbin/makefs/makefs.8 stable/9/usr.sbin/makefs/makefs.c stable/9/usr.sbin/makefs/makefs.h stable/9/usr.sbin/makefs/walk.c Directory Properties: stable/9/usr.sbin/makefs/ (props changed) Modified: stable/9/usr.sbin/makefs/cd9660.c ============================================================================== --- stable/9/usr.sbin/makefs/cd9660.c Mon Feb 20 17:09:52 2012 (r231941) +++ stable/9/usr.sbin/makefs/cd9660.c Mon Feb 20 18:49:11 2012 (r231942) @@ -472,8 +472,6 @@ cd9660_makefs(const char *image, const c return; } - diskStructure.rootFilesystemPath = dir; - if (diskStructure.verbose_level > 0) printf("cd9660_makefs: image %s directory %s root %p\n", image, dir, root); @@ -1584,24 +1582,15 @@ cd9660_generate_path_table(void) } void -cd9660_compute_full_filename(cd9660node *node, char *buf, int level) +cd9660_compute_full_filename(cd9660node *node, char *buf) { - cd9660node *parent; - - parent = (node->rr_real_parent == NULL ? - node->parent : node->rr_real_parent); - if (parent != NULL) { - cd9660_compute_full_filename(parent, buf, level + 1); - strcat(buf, node->node->name); - } else { - /* We are at the root */ - strcat(buf, diskStructure.rootFilesystemPath); - if (buf[strlen(buf) - 1] == '/') - buf[strlen(buf) - 1] = '\0'; - } + int len; - if (level != 0) - strcat(buf, "/"); + len = CD9660MAXPATH + 1; + len = snprintf(buf, len, "%s/%s/%s", node->node->root, + node->node->path, node->node->name); + if (len > CD9660MAXPATH) + errx(1, "Pathname too long."); } /* NEW filename conversion method */ Modified: stable/9/usr.sbin/makefs/cd9660.h ============================================================================== --- stable/9/usr.sbin/makefs/cd9660.h Mon Feb 20 17:09:52 2012 (r231941) +++ stable/9/usr.sbin/makefs/cd9660.h Mon Feb 20 18:49:11 2012 (r231942) @@ -244,8 +244,6 @@ typedef struct _iso9660_disk { cd9660node *rootNode; - const char *rootFilesystemPath; - /* Important sector numbers here */ /* primaryDescriptor.type_l_path_table*/ int64_t primaryBigEndianTableSector; @@ -345,7 +343,7 @@ int cd9660_setup_boot_volume_descriptor( int cd9660_write_image(const char *image); int cd9660_copy_file(FILE *, off_t, const char *); -void cd9660_compute_full_filename(cd9660node *, char *, int); +void cd9660_compute_full_filename(cd9660node *, char *); int cd9660_compute_record_size(cd9660node *); /* Debugging functions */ Modified: stable/9/usr.sbin/makefs/cd9660/cd9660_write.c ============================================================================== --- stable/9/usr.sbin/makefs/cd9660/cd9660_write.c Mon Feb 20 17:09:52 2012 (r231941) +++ stable/9/usr.sbin/makefs/cd9660/cd9660_write.c Mon Feb 20 18:49:11 2012 (r231942) @@ -296,7 +296,7 @@ cd9660_write_file(FILE *fd, cd9660node * inode->flags |= FI_WRITTEN; if (writenode->node->contents == NULL) cd9660_compute_full_filename(writenode, - temp_file_name, 0); + temp_file_name); ret = cd9660_copy_file(fd, writenode->fileDataSector, (writenode->node->contents != NULL) ? writenode->node->contents : temp_file_name); Modified: stable/9/usr.sbin/makefs/ffs.c ============================================================================== --- stable/9/usr.sbin/makefs/ffs.c Mon Feb 20 17:09:52 2012 (r231941) +++ stable/9/usr.sbin/makefs/ffs.c Mon Feb 20 18:49:11 2012 (r231942) @@ -780,8 +780,8 @@ ffs_populate_dir(const char *dir, fsnode cur->inode->flags |= FI_WRITTEN; if (cur->contents == NULL) { - if (snprintf(path, sizeof(path), "%s/%s", dir, - cur->name) >= sizeof(path)) + if (snprintf(path, sizeof(path), "%s/%s/%s", cur->root, + cur->path, cur->name) >= (int)sizeof(path)) errx(1, "Pathname too long."); } Modified: stable/9/usr.sbin/makefs/makefs.8 ============================================================================== --- stable/9/usr.sbin/makefs/makefs.8 Mon Feb 20 17:09:52 2012 (r231941) +++ stable/9/usr.sbin/makefs/makefs.8 Mon Feb 20 18:49:11 2012 (r231942) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 10, 2009 +.Dd January 30, 2012 .Dt MAKEFS 8 .Os .Sh NAME @@ -58,6 +58,7 @@ .Op Fl t Ar fs-type .Ar image-file .Ar directory | manifest +.Op Ar extra-directory ... .Sh DESCRIPTION The utility .Nm @@ -67,6 +68,15 @@ from the directory tree .Ar directory or from the mtree manifest .Ar manifest . +If optional directory tree +.Ar extra-directory +is passed, then the directory tree of each argument will be merged +into the +.Ar directory +or +.Ar manifest +first before creating +.Ar image-file . No special devices or privileges are required to perform this task. .Pp The options are as follows: Modified: stable/9/usr.sbin/makefs/makefs.c ============================================================================== --- stable/9/usr.sbin/makefs/makefs.c Mon Feb 20 17:09:52 2012 (r231941) +++ stable/9/usr.sbin/makefs/makefs.c Mon Feb 20 18:49:11 2012 (r231942) @@ -87,7 +87,7 @@ main(int argc, char *argv[]) fstype_t *fstype; fsinfo_t fsoptions; fsnode *root; - int ch, len; + int ch, i, len; char *subtree; char *specfile; @@ -241,7 +241,7 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - if (argc != 2) + if (argc < 2) usage(); /* -x must be accompanied by -F */ @@ -260,7 +260,7 @@ main(int argc, char *argv[]) case S_IFDIR: /* walk the tree */ subtree = argv[1]; TIMER_START(start); - root = walk_dir(subtree, NULL); + root = walk_dir(subtree, ".", NULL, NULL); TIMER_RESULTS(start, "walk_dir"); break; case S_IFREG: /* read the manifest file */ @@ -274,6 +274,17 @@ main(int argc, char *argv[]) /* NOTREACHED */ } + /* append extra directory */ + for (i = 2; i < argc; i++) { + if (stat(argv[i], &sb) == -1) + err(1, "Can't stat `%s'", argv[i]); + if (!S_ISDIR(sb.st_mode)) + errx(1, "%s: not a directory", argv[i]); + TIMER_START(start); + root = walk_dir(argv[i], ".", NULL, root); + TIMER_RESULTS(start, "walk_dir2"); + } + if (specfile) { /* apply a specfile */ TIMER_START(start); apply_specfile(specfile, subtree, root, fsoptions.onlyspec); @@ -282,7 +293,7 @@ main(int argc, char *argv[]) if (debug & DEBUG_DUMP_FSNODES) { printf("\nparent: %s\n", subtree); - dump_fsnodes(".", root); + dump_fsnodes(root); putchar('\n'); } @@ -336,7 +347,7 @@ usage(void) "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" "\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-s image-size]\n" "\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-x]\n" -"\t[-N userdb-dir] image-file directory | manifest\n", +"\t[-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", prog); exit(1); } Modified: stable/9/usr.sbin/makefs/makefs.h ============================================================================== --- stable/9/usr.sbin/makefs/makefs.h Mon Feb 20 17:09:52 2012 (r231941) +++ stable/9/usr.sbin/makefs/makefs.h Mon Feb 20 18:49:11 2012 (r231942) @@ -94,6 +94,8 @@ typedef struct _fsnode { fsinode *inode; /* actual inode data */ char *symlink; /* symlink target */ char *contents; /* file to provide contents */ + const char *root; /* root path */ + char *path; /* directory name */ char *name; /* file name */ int flags; /* misc flags */ } fsnode; @@ -147,11 +149,11 @@ typedef struct { void apply_specfile(const char *, const char *, fsnode *, int); -void dump_fsnodes(const char *, fsnode *); +void dump_fsnodes(fsnode *); const char * inode_type(mode_t); fsnode * read_mtree(const char *, fsnode *); int set_option(option_t *, const char *, const char *); -fsnode * walk_dir(const char *, fsnode *); +fsnode * walk_dir(const char *, const char *, fsnode *, fsnode *); void free_fsnodes(fsnode *); void ffs_prep_opts(fsinfo_t *); Modified: stable/9/usr.sbin/makefs/walk.c ============================================================================== --- stable/9/usr.sbin/makefs/walk.c Mon Feb 20 17:09:52 2012 (r231941) +++ stable/9/usr.sbin/makefs/walk.c Mon Feb 20 18:49:11 2012 (r231942) @@ -57,40 +57,70 @@ __FBSDID("$FreeBSD$"); static void apply_specdir(const char *, NODE *, fsnode *, int); static void apply_specentry(const char *, NODE *, fsnode *); -static fsnode *create_fsnode(const char *, struct stat *); +static fsnode *create_fsnode(const char *, const char *, const char *, + struct stat *); static fsinode *link_check(fsinode *); /* * walk_dir -- - * build a tree of fsnodes from `dir', with a parent fsnode of `parent' - * (which may be NULL for the root of the tree). + * build a tree of fsnodes from `root' and `dir', with a parent + * fsnode of `parent' (which may be NULL for the root of the tree). + * append the tree to a fsnode of `join' if it is not NULL. * each "level" is a directory, with the "." entry guaranteed to be * at the start of the list, and without ".." entries. */ fsnode * -walk_dir(const char *dir, fsnode *parent) +walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join) { - fsnode *first, *cur, *prev; + fsnode *first, *cur, *prev, *last; DIR *dirp; struct dirent *dent; char path[MAXPATHLEN + 1]; struct stat stbuf; + char *name, *rp; + int dot, len; + assert(root != NULL); assert(dir != NULL); + len = snprintf(path, sizeof(path), "%s/%s", root, dir); + if (len >= (int)sizeof(path)) + errx(1, "Pathname too long."); if (debug & DEBUG_WALK_DIR) - printf("walk_dir: %s %p\n", dir, parent); - if ((dirp = opendir(dir)) == NULL) - err(1, "Can't opendir `%s'", dir); - first = prev = NULL; + printf("walk_dir: %s %p\n", path, parent); + if ((dirp = opendir(path)) == NULL) + err(1, "Can't opendir `%s'", path); + rp = path + strlen(root) + 1; + if (join != NULL) { + first = cur = join; + while (cur->next != NULL) + cur = cur->next; + prev = cur; + } else + first = prev = NULL; + last = prev; while ((dent = readdir(dirp)) != NULL) { - if (strcmp(dent->d_name, "..") == 0) - continue; + name = dent->d_name; + dot = 0; + if (name[0] == '.') + switch (name[1]) { + case '\0': /* "." */ + if (join != NULL) + continue; + dot = 1; + break; + case '.': /* ".." */ + if (name[2] == '\0') + continue; + /* FALLTHROUGH */ + default: + dot = 0; + } if (debug & DEBUG_WALK_DIR_NODE) - printf("scanning %s/%s\n", dir, dent->d_name); - if (snprintf(path, sizeof(path), "%s/%s", dir, dent->d_name) - >= sizeof(path)) + printf("scanning %s/%s/%s\n", root, dir, name); + if (snprintf(path + len, sizeof(path) - len, "/%s", name) >= + (int)sizeof(path) - len) errx(1, "Pathname too long."); if (lstat(path, &stbuf) == -1) err(1, "Can't lstat `%s'", path); @@ -102,22 +132,51 @@ walk_dir(const char *dir, fsnode *parent } #endif - cur = create_fsnode(dent->d_name, &stbuf); + if (join != NULL) { + cur = join->next; + for (;;) { + if (cur == NULL || strcmp(cur->name, name) == 0) + break; + if (cur == last) { + cur = NULL; + break; + } + cur = cur->next; + } + if (cur != NULL) { + if (S_ISDIR(cur->type) && + S_ISDIR(stbuf.st_mode)) { + if (debug & DEBUG_WALK_DIR_NODE) + printf("merging %s with %p\n", + path, cur->child); + cur->child = walk_dir(root, rp, cur, + cur->child); + continue; + } + errx(1, "Can't merge %s `%s' with existing %s", + inode_type(stbuf.st_mode), path, + inode_type(cur->type)); + } + } + + cur = create_fsnode(root, dir, name, &stbuf); cur->parent = parent; - if (strcmp(dent->d_name, ".") == 0) { + if (dot) { /* ensure "." is at the start of the list */ cur->next = first; first = cur; if (! prev) prev = cur; + cur->first = first; } else { /* not "." */ if (prev) prev->next = cur; prev = cur; if (!first) first = cur; + cur->first = first; if (S_ISDIR(cur->type)) { - cur->child = walk_dir(path, cur); + cur->child = walk_dir(root, rp, cur, NULL); continue; } } @@ -147,22 +206,27 @@ walk_dir(const char *dir, fsnode *parent err(1, "Memory allocation error"); } } - for (cur = first; cur != NULL; cur = cur->next) - cur->first = first; + assert(first != NULL); + if (join == NULL) + for (cur = first->next; cur != NULL; cur = cur->next) + cur->first = first; if (closedir(dirp) == -1) - err(1, "Can't closedir `%s'", dir); + err(1, "Can't closedir `%s/%s'", root, dir); return (first); } static fsnode * -create_fsnode(const char *name, struct stat *stbuf) +create_fsnode(const char *root, const char *path, const char *name, + struct stat *stbuf) { fsnode *cur; if ((cur = calloc(1, sizeof(fsnode))) == NULL || + (cur->path = strdup(path)) == NULL || (cur->name = strdup(name)) == NULL || (cur->inode = calloc(1, sizeof(fsinode))) == NULL) err(1, "Memory allocation error"); + cur->root = root; cur->type = stbuf->st_mode & S_IFMT; cur->inode->nlink = 1; cur->inode->st = *stbuf; @@ -211,6 +275,7 @@ free_fsnodes(fsnode *node) free(cur->inode); if (cur->symlink) free(cur->symlink); + free(cur->path); free(cur->name); free(cur); } @@ -388,14 +453,16 @@ apply_specdir(const char *dir, NODE *spe stbuf.st_mtimensec = stbuf.st_atimensec = stbuf.st_ctimensec = start_time.tv_nsec; #endif - curfsnode = create_fsnode(curnode->name, &stbuf); + curfsnode = create_fsnode(".", ".", curnode->name, + &stbuf); curfsnode->parent = dirnode->parent; curfsnode->first = dirnode; curfsnode->next = dirnode->next; dirnode->next = curfsnode; if (curfsnode->type == S_IFDIR) { /* for dirs, make "." entry as well */ - curfsnode->child = create_fsnode(".", &stbuf); + curfsnode->child = create_fsnode(".", ".", ".", + &stbuf); curfsnode->child->parent = curfsnode; curfsnode->child->first = curfsnode->child; } @@ -503,19 +570,18 @@ apply_specentry(const char *dir, NODE *s /* * dump_fsnodes -- - * dump the fsnodes from `cur', based in the directory `dir' + * dump the fsnodes from `cur' */ void -dump_fsnodes(const char *dir, fsnode *root) +dump_fsnodes(fsnode *root) { fsnode *cur; char path[MAXPATHLEN + 1]; - assert (dir != NULL); - printf("dump_fsnodes: %s %p\n", dir, root); + printf("dump_fsnodes: %s %p\n", root->path, root); for (cur = root; cur != NULL; cur = cur->next) { - if (snprintf(path, sizeof(path), "%s/%s", dir, cur->name) - >= sizeof(path)) + if (snprintf(path, sizeof(path), "%s/%s", cur->path, + cur->name) >= (int)sizeof(path)) errx(1, "Pathname too long."); if (debug & DEBUG_DUMP_FSNODES_VERBOSE) @@ -534,10 +600,10 @@ dump_fsnodes(const char *dir, fsnode *ro if (cur->child) { assert (cur->type == S_IFDIR); - dump_fsnodes(path, cur->child); + dump_fsnodes(cur->child); } } - printf("dump_fsnodes: finished %s\n", dir); + printf("dump_fsnodes: finished %s/%s\n", root->path, root->name); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 19:35:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45BF31065672; Mon, 20 Feb 2012 19:35:55 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34A988FC13; Mon, 20 Feb 2012 19:35:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KJZtP3065063; Mon, 20 Feb 2012 19:35:55 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KJZtJW065060; Mon, 20 Feb 2012 19:35:55 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202201935.q1KJZtJW065060@svn.freebsd.org> From: Christian Brueffer Date: Mon, 20 Feb 2012 19:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231943 - in head/release/doc: en_US.ISO8859-1/hardware share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 19:35:55 -0000 Author: brueffer Date: Mon Feb 20 19:35:54 2012 New Revision: 231943 URL: http://svn.freebsd.org/changeset/base/231943 Log: Add oce(4) to the hardware notes. MFC after: 3 days Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml head/release/doc/share/misc/dev.archlist.txt Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Mon Feb 20 18:49:11 2012 (r231942) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Mon Feb 20 19:35:54 2012 (r231943) @@ -954,6 +954,8 @@ &hwlist.nxge; + &hwlist.oce; + &hwlist.pcn; &hwlist.qlxgb; Modified: head/release/doc/share/misc/dev.archlist.txt ============================================================================== --- head/release/doc/share/misc/dev.archlist.txt Mon Feb 20 18:49:11 2012 (r231942) +++ head/release/doc/share/misc/dev.archlist.txt Mon Feb 20 19:35:54 2012 (r231943) @@ -97,6 +97,7 @@ ng_ubt i386,pc98,amd64 nsp i386,pc98 nve i386,amd64 nxge i386,amd64 +oce i386,amd64 ohci i386,pc98,ia64,amd64,powerpc oltr i386 pcn i386,pc98,ia64,amd64 From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 20:31:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7FE6106564A; Mon, 20 Feb 2012 20:31:05 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3AEC8FC13; Mon, 20 Feb 2012 20:31:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KKV5VU066758; Mon, 20 Feb 2012 20:31:05 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KKV5kw066755; Mon, 20 Feb 2012 20:31:05 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201202202031.q1KKV5kw066755@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 20 Feb 2012 20:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231944 - stable/8/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 20:31:05 -0000 Author: ken Date: Mon Feb 20 20:31:05 2012 New Revision: 231944 URL: http://svn.freebsd.org/changeset/base/231944 Log: MFC r231716 Set the max_lun field of the path inquiry CCB to 8. This allows LUNs greater than 0 to be probed. It can be increased later if need be. This brings back SVN rev 224973, which was inadvertently removed with the import of the LSI driver. Reported by: dwhite Approved by: re (bz) Modified: stable/8/sys/dev/mps/mps_sas.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/mps/mps_sas.c ============================================================================== --- stable/8/sys/dev/mps/mps_sas.c Mon Feb 20 19:35:54 2012 (r231943) +++ stable/8/sys/dev/mps/mps_sas.c Mon Feb 20 20:31:05 2012 (r231944) @@ -919,7 +919,7 @@ mpssas_action(struct cam_sim *sim, union cpi->hba_misc = PIM_NOBUSRESET; cpi->hba_eng_cnt = 0; cpi->max_target = sassc->sc->facts->MaxTargets - 1; - cpi->max_lun = 0; + cpi->max_lun = 8; cpi->initiator_id = 255; strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strncpy(cpi->hba_vid, "LSILogic", HBA_IDLEN); From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 20:46:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84195106566C; Mon, 20 Feb 2012 20:46:27 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FE358FC12; Mon, 20 Feb 2012 20:46:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KKkROL067257; Mon, 20 Feb 2012 20:46:27 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KKkRLG067255; Mon, 20 Feb 2012 20:46:27 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201202202046.q1KKkRLG067255@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 20 Feb 2012 20:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231945 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 20:46:27 -0000 Author: pjd Date: Mon Feb 20 20:46:27 2012 New Revision: 231945 URL: http://svn.freebsd.org/changeset/base/231945 Log: Document the fact that getgrouplist(3) returns 0 on success. MFC after: 3 days Modified: head/lib/libc/gen/getgrouplist.3 Modified: head/lib/libc/gen/getgrouplist.3 ============================================================================== --- head/lib/libc/gen/getgrouplist.3 Mon Feb 20 20:31:05 2012 (r231944) +++ head/lib/libc/gen/getgrouplist.3 Mon Feb 20 20:46:27 2012 (r231945) @@ -28,7 +28,7 @@ .\" @(#)getgrouplist.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd February 20, 2012 .Dt GETGROUPLIST 3 .Os .Sh NAME @@ -64,7 +64,7 @@ the actual number of groups found is ret The .Fn getgrouplist function -returns \-1 if the size of the group list is too small to +returns 0 on success and \-1 if the size of the group list is too small to hold all the user's groups. Here, the group array will be filled with as many groups as will fit. .Sh FILES From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 21:10:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5E3F1065673; Mon, 20 Feb 2012 21:10:14 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B6658FC17; Mon, 20 Feb 2012 21:10:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1KLAEmQ068072; Mon, 20 Feb 2012 21:10:14 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1KLAEeV068061; Mon, 20 Feb 2012 21:10:14 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201202202110.q1KLAEeV068061@svn.freebsd.org> From: Martin Matuska Date: Mon, 20 Feb 2012 21:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231946 - in stable/9: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 21:10:14 -0000 Author: mm Date: Mon Feb 20 21:10:14 2012 New Revision: 231946 URL: http://svn.freebsd.org/changeset/base/231946 Log: MFC r230397, r230438: MFC r230397 (pjd): By default turn off prefetch when listing snapshots. In my tests it makes listing snapshots 19% faster with cold cache and 47% faster with warm cache. MFC r230438 (pjd): Dramatically optimize listing snapshots when user requests only snapshot names and wants to sort them by name, ie. when executes: # zfs list -t snapshot -o name -s name Because only name is needed we don't have to read all snapshot properties. Below you can find how long does it take to list 34509 snapshots from a single disk pool before and after this change with cold and warm cache: before: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 525s warm cache: 218s after: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 1.7s warm cache: 1.1s Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Mon Feb 20 21:10:14 2012 (r231946) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 Pawel Jakub Dawidek . + * All rights reserved. */ #include @@ -129,8 +131,11 @@ zfs_callback(zfs_handle_t *zhp, void *da cb->cb_depth++; if (zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) (void) zfs_iter_filesystems(zhp, zfs_callback, data); - if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps) - (void) zfs_iter_snapshots(zhp, zfs_callback, data); + if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps) { + (void) zfs_iter_snapshots(zhp, + (cb->cb_flags & ZFS_ITER_SIMPLE) != 0, zfs_callback, + data); + } cb->cb_depth--; } @@ -184,6 +189,14 @@ zfs_free_sort_columns(zfs_sort_column_t } } +boolean_t +zfs_sort_only_by_name(const zfs_sort_column_t *sc) +{ + + return (sc != NULL && sc->sc_next == NULL && + sc->sc_prop == ZFS_PROP_NAME); +} + /* ARGSUSED */ static int zfs_compare(const void *larg, const void *rarg, void *unused) @@ -224,7 +237,13 @@ zfs_compare(const void *larg, const void lcreate = zfs_prop_get_int(l, ZFS_PROP_CREATETXG); rcreate = zfs_prop_get_int(r, ZFS_PROP_CREATETXG); - if (lcreate < rcreate) + /* + * Both lcreate and rcreate being 0 means we don't have + * properties and we should compare full name. + */ + if (lcreate == 0 && rcreate == 0) + ret = strcmp(lat + 1, rat + 1); + else if (lcreate < rcreate) ret = -1; else if (lcreate > rcreate) ret = 1; @@ -290,7 +309,14 @@ zfs_sort(const void *larg, const void *r if (rvalid) verify(nvlist_lookup_string(rval, ZPROP_VALUE, &rstr) == 0); + } else if (psc->sc_prop == ZFS_PROP_NAME) { + lvalid = rvalid = B_TRUE; + + (void) strlcpy(lbuf, zfs_get_name(l), sizeof(lbuf)); + (void) strlcpy(rbuf, zfs_get_name(r), sizeof(rbuf)); + lstr = lbuf; + rstr = rbuf; } else if (zfs_prop_is_string(psc->sc_prop)) { lvalid = (zfs_prop_get(l, psc->sc_prop, lbuf, sizeof (lbuf), NULL, NULL, 0, B_TRUE) == 0); Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Mon Feb 20 21:10:14 2012 (r231946) @@ -43,11 +43,13 @@ typedef struct zfs_sort_column { #define ZFS_ITER_PROP_LISTSNAPS (1 << 2) #define ZFS_ITER_DEPTH_LIMIT (1 << 3) #define ZFS_ITER_RECVD_PROPS (1 << 4) +#define ZFS_ITER_SIMPLE (1 << 5) int zfs_for_each(int, char **, int options, zfs_type_t, zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *); int zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t); void zfs_free_sort_columns(zfs_sort_column_t *); +boolean_t zfs_sort_only_by_name(const zfs_sort_column_t *); #ifdef __cplusplus } Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Feb 20 21:10:14 2012 (r231946) @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. - * Copyright (c) 2011 Pawel Jakub Dawidek . + * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2011 Martin Matuska . All rights reserved. */ @@ -2838,7 +2838,12 @@ print_dataset(zfs_handle_t *zhp, zprop_l first = B_FALSE; } - if (pl->pl_prop != ZPROP_INVAL) { + if (pl->pl_prop == ZFS_PROP_NAME) { + (void) strlcpy(property, zfs_get_name(zhp), + sizeof(property)); + propstr = property; + right_justify = zfs_prop_align_right(pl->pl_prop); + } else if (pl->pl_prop != ZPROP_INVAL) { if (zfs_prop_get(zhp, pl->pl_prop, property, sizeof (property), NULL, NULL, 0, B_FALSE) != 0) propstr = "-"; @@ -3005,6 +3010,13 @@ zfs_do_list(int argc, char **argv) fields = default_fields; /* + * If we are only going to list snapshot names and sort by name, + * then we can use faster version. + */ + if (strcmp(fields, "name") == 0 && zfs_sort_only_by_name(sortcol)) + flags |= ZFS_ITER_SIMPLE; + + /* * If "-o space" and no types were specified, don't display snapshots. */ if (strcmp(fields, "space") == 0 && types_specified == B_FALSE) Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Feb 20 21:10:14 2012 (r231946) @@ -507,7 +507,7 @@ extern int zfs_iter_root(libzfs_handle_t extern int zfs_iter_children(zfs_handle_t *, zfs_iter_f, void *); extern int zfs_iter_dependents(zfs_handle_t *, boolean_t, zfs_iter_f, void *); extern int zfs_iter_filesystems(zfs_handle_t *, zfs_iter_f, void *); -extern int zfs_iter_snapshots(zfs_handle_t *, zfs_iter_f, void *); +extern int zfs_iter_snapshots(zfs_handle_t *, boolean_t, zfs_iter_f, void *); extern int zfs_iter_snapshots_sorted(zfs_handle_t *, zfs_iter_f, void *); extern int zfs_iter_snapspec(zfs_handle_t *, const char *, zfs_iter_f, void *); Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Feb 20 21:10:14 2012 (r231946) @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. - * Copyright (c) 2011 Pawel Jakub Dawidek . + * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. */ @@ -514,6 +514,22 @@ make_dataset_handle_zc(libzfs_handle_t * } zfs_handle_t * +make_dataset_simple_handle_zc(zfs_handle_t *pzhp, zfs_cmd_t *zc) +{ + zfs_handle_t *zhp = calloc(sizeof (zfs_handle_t), 1); + + if (zhp == NULL) + return (NULL); + + zhp->zfs_hdl = pzhp->zfs_hdl; + (void) strlcpy(zhp->zfs_name, zc->zc_name, sizeof (zhp->zfs_name)); + zhp->zfs_head_type = pzhp->zfs_type; + zhp->zfs_type = ZFS_TYPE_SNAPSHOT; + zhp->zpool_hdl = zpool_handle(zhp); + return (zhp); +} + +zfs_handle_t * zfs_handle_dup(zfs_handle_t *zhp_orig) { zfs_handle_t *zhp = calloc(sizeof (zfs_handle_t), 1); Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Feb 20 21:10:14 2012 (r231946) @@ -150,7 +150,7 @@ int zpool_standard_error_fmt(libzfs_hand int get_dependents(libzfs_handle_t *, boolean_t, const char *, char ***, size_t *); zfs_handle_t *make_dataset_handle_zc(libzfs_handle_t *, zfs_cmd_t *); - +zfs_handle_t *make_dataset_simple_handle_zc(zfs_handle_t *, zfs_cmd_t *); int zprop_parse_value(libzfs_handle_t *, nvpair_t *, int, zfs_type_t, nvlist_t *, char **, uint64_t *, const char *); Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Mon Feb 20 21:10:14 2012 (r231946) @@ -23,6 +23,8 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 Pawel Jakub Dawidek . + * All rights reserved. */ #include @@ -137,7 +139,8 @@ zfs_iter_filesystems(zfs_handle_t *zhp, * Iterate over all snapshots */ int -zfs_iter_snapshots(zfs_handle_t *zhp, zfs_iter_f func, void *data) +zfs_iter_snapshots(zfs_handle_t *zhp, boolean_t simple, zfs_iter_f func, + void *data) { zfs_cmd_t zc = { 0 }; zfs_handle_t *nzhp; @@ -146,15 +149,19 @@ zfs_iter_snapshots(zfs_handle_t *zhp, zf if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT) return (0); + zc.zc_simple = simple; + if (zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0) != 0) return (-1); while ((ret = zfs_do_list_ioctl(zhp, ZFS_IOC_SNAPSHOT_LIST_NEXT, &zc)) == 0) { - if ((nzhp = make_dataset_handle_zc(zhp->zfs_hdl, - &zc)) == NULL) { + if (simple) + nzhp = make_dataset_simple_handle_zc(zhp, &zc); + else + nzhp = make_dataset_handle_zc(zhp->zfs_hdl, &zc); + if (nzhp == NULL) continue; - } if ((ret = func(nzhp, data)) != 0) { zcmd_free_nvlists(&zc); @@ -234,7 +241,7 @@ zfs_iter_snapshots_sorted(zfs_handle_t * avl_create(&avl, zfs_snapshot_compare, sizeof (zfs_node_t), offsetof(zfs_node_t, zn_avlnode)); - ret = zfs_iter_snapshots(zhp, zfs_sort_snaps, &avl); + ret = zfs_iter_snapshots(zhp, B_FALSE, zfs_sort_snaps, &avl); for (node = avl_first(&avl); node != NULL; node = AVL_NEXT(&avl, node)) ret |= callback(node->zn_handle, data); @@ -378,7 +385,7 @@ zfs_iter_children(zfs_handle_t *zhp, zfs if ((ret = zfs_iter_filesystems(zhp, func, data)) != 0) return (ret); - return (zfs_iter_snapshots(zhp, func, data)); + return (zfs_iter_snapshots(zhp, B_FALSE, func, data)); } @@ -439,8 +446,10 @@ iter_dependents_cb(zfs_handle_t *zhp, vo isf.next = ida->stack; ida->stack = &isf; err = zfs_iter_filesystems(zhp, iter_dependents_cb, ida); - if (err == 0) - err = zfs_iter_snapshots(zhp, iter_dependents_cb, ida); + if (err == 0) { + err = zfs_iter_snapshots(zhp, B_FALSE, + iter_dependents_cb, ida); + } ida->stack = isf.next; } if (!first && err == 0) Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Mon Feb 20 21:10:14 2012 (r231946) @@ -22,6 +22,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 Pawel Jakub Dawidek . + * All rights reserved. */ #include @@ -717,7 +719,7 @@ send_iterate_fs(zfs_handle_t *zhp, void sd->parent_fromsnap_guid = 0; VERIFY(0 == nvlist_alloc(&sd->parent_snaps, NV_UNIQUE_NAME, 0)); VERIFY(0 == nvlist_alloc(&sd->snapprops, NV_UNIQUE_NAME, 0)); - (void) zfs_iter_snapshots(zhp, send_iterate_snap, sd); + (void) zfs_iter_snapshots(zhp, B_FALSE, send_iterate_snap, sd); VERIFY(0 == nvlist_add_nvlist(nvfs, "snaps", sd->parent_snaps)); VERIFY(0 == nvlist_add_nvlist(nvfs, "snapprops", sd->snapprops)); nvlist_free(sd->parent_snaps); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Mon Feb 20 21:10:14 2012 (r231946) @@ -300,7 +300,8 @@ typedef struct zfs_cmd { boolean_t zc_temphold; uint64_t zc_action_handle; int zc_cleanup_fd; - uint8_t zc_pad[4]; /* alignment */ + uint8_t zc_simple; + uint8_t zc_pad[3]; /* alignment */ uint64_t zc_sendobj; uint64_t zc_fromobj; uint64_t zc_createtxg; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Feb 20 20:46:27 2012 (r231945) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Feb 20 21:10:14 2012 (r231946) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 Pawel Jakub Dawidek . + * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. * Portions Copyright 2011 Martin Matuska * Copyright 2011 Nexenta Systems, Inc. All rights reserved. @@ -81,6 +81,12 @@ CTASSERT(sizeof(zfs_cmd_t) < IOCPARM_MAX); +static int snapshot_list_prefetch; +SYSCTL_DECL(_vfs_zfs); +TUNABLE_INT("vfs.zfs.snapshot_list_prefetch", &snapshot_list_prefetch); +SYSCTL_INT(_vfs_zfs, OID_AUTO, snapshot_list_prefetch, CTLFLAG_RW, + &snapshot_list_prefetch, 0, "Prefetch data when listing snapshots"); + static struct cdev *zfsdev; extern void zfs_init(void); @@ -2030,6 +2036,7 @@ top: * zc_name name of filesystem * zc_cookie zap cursor * zc_nvlist_dst_size size of buffer for property nvlist + * zc_simple when set, only name is requested * * outputs: * zc_name name of next snapshot @@ -2044,7 +2051,7 @@ zfs_ioc_snapshot_list_next(zfs_cmd_t *zc int error; top: - if (zc->zc_cookie == 0) + if (snapshot_list_prefetch && zc->zc_cookie == 0 && !zc->zc_simple) (void) dmu_objset_find(zc->zc_name, dmu_objset_prefetch, NULL, DS_FIND_SNAPSHOTS); @@ -2066,7 +2073,7 @@ top: zc->zc_name + strlen(zc->zc_name), &zc->zc_obj, &zc->zc_cookie, NULL); - if (error == 0) { + if (error == 0 && !zc->zc_simple) { dsl_dataset_t *ds; dsl_pool_t *dp = os->os_dsl_dataset->ds_dir->dd_pool; From owner-svn-src-all@FreeBSD.ORG Mon Feb 20 21:19:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C6AF106566C; Mon, 20 Feb 2012 21:19:36 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [IPv6:2a01:4f8:150:6101::4]) by mx1.freebsd.org (Postfix) with ESMTP id 260D18FC15; Mon, 20 Feb 2012 21:19:35 +0000 (UTC) Received: from core2.vx.sk (localhost [127.0.0.2]) by mail.vx.sk (Postfix) with ESMTP id AA4D925251; Mon, 20 Feb 2012 22:19:32 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk by core2.vx.sk (amavisd-new, unix socket) with LMTP id v7t5HmLTZGDd; Mon, 20 Feb 2012 22:19:28 +0100 (CET) Received: from [192.168.1.129] (unknown [85.237.228.172]) by mail.vx.sk (Postfix) with ESMTPSA id B292425248; Mon, 20 Feb 2012 22:19:27 +0100 (CET) Message-ID: <4F42B8DF.7040400@FreeBSD.org> Date: Mon, 20 Feb 2012 22:19:27 +0100 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sk; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: Jung-uk Kim References: <201201310032.q0V0Wb4i009706@svn.freebsd.org> In-Reply-To: <201201310032.q0V0Wb4i009706@svn.freebsd.org> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: src-committers@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, Hiroki Sato , Ed Schouten , Nathan Whitehorn , svn-src-head@freebsd.org Subject: Re: svn commit: r230795 - in head/usr.sbin/makefs: . cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 21:19:36 -0000 Thanks for the patch, I see it has been adopted by NetBSD. I have seen there has been recently activity in makefs. IMO makefs should be moved to vendor/contrib (originates fron NetBSD) the same way libarchive was moved. Or are we doing the main (or our very own) development of makefs? If we are, it wouldn't be bad to give a statement to clarify this. Dňa 31. 1. 2012 1:32, Jung-uk Kim wrote / napísal(a): > Author: jkim > Date: Tue Jan 31 00:32:37 2012 > New Revision: 230795 > URL: http://svn.freebsd.org/changeset/base/230795 > > Log: > Allow contents of multiple directories to be merged to the current image. > Note this patch was submitted to NetBSD and they already adopted it. > > http://mail-index.netbsd.org/source-changes/2012/01/28/msg031078.html > > MFC after: 1 week > > Modified: > head/usr.sbin/makefs/cd9660.c > head/usr.sbin/makefs/cd9660.h > head/usr.sbin/makefs/cd9660/cd9660_write.c > head/usr.sbin/makefs/ffs.c > head/usr.sbin/makefs/makefs.8 > head/usr.sbin/makefs/makefs.c > head/usr.sbin/makefs/makefs.h > head/usr.sbin/makefs/walk.c > > Modified: head/usr.sbin/makefs/cd9660.c > ============================================================================== > --- head/usr.sbin/makefs/cd9660.c Tue Jan 31 00:12:51 2012 (r230794) > +++ head/usr.sbin/makefs/cd9660.c Tue Jan 31 00:32:37 2012 (r230795) > @@ -472,8 +472,6 @@ cd9660_makefs(const char *image, const c > return; > } > > - diskStructure.rootFilesystemPath = dir; > - > if (diskStructure.verbose_level > 0) > printf("cd9660_makefs: image %s directory %s root %p\n", > image, dir, root); > @@ -1568,24 +1566,15 @@ cd9660_generate_path_table(void) > } > > void > -cd9660_compute_full_filename(cd9660node *node, char *buf, int level) > +cd9660_compute_full_filename(cd9660node *node, char *buf) > { > - cd9660node *parent; > - > - parent = (node->rr_real_parent == NULL ? > - node->parent : node->rr_real_parent); > - if (parent != NULL) { > - cd9660_compute_full_filename(parent, buf, level + 1); > - strcat(buf, node->node->name); > - } else { > - /* We are at the root */ > - strcat(buf, diskStructure.rootFilesystemPath); > - if (buf[strlen(buf) - 1] == '/') > - buf[strlen(buf) - 1] = '\0'; > - } > + int len; > > - if (level != 0) > - strcat(buf, "/"); > + len = CD9660MAXPATH + 1; > + len = snprintf(buf, len, "%s/%s/%s", node->node->root, > + node->node->path, node->node->name); > + if (len > CD9660MAXPATH) > + errx(1, "Pathname too long."); > } > > /* NEW filename conversion method */ > > Modified: head/usr.sbin/makefs/cd9660.h > ============================================================================== > --- head/usr.sbin/makefs/cd9660.h Tue Jan 31 00:12:51 2012 (r230794) > +++ head/usr.sbin/makefs/cd9660.h Tue Jan 31 00:32:37 2012 (r230795) > @@ -244,8 +244,6 @@ typedef struct _iso9660_disk { > > cd9660node *rootNode; > > - const char *rootFilesystemPath; > - > /* Important sector numbers here */ > /* primaryDescriptor.type_l_path_table*/ > int64_t primaryBigEndianTableSector; > @@ -345,7 +343,7 @@ int cd9660_setup_boot_volume_descriptor( > int cd9660_write_image(const char *image); > int cd9660_copy_file(FILE *, off_t, const char *); > > -void cd9660_compute_full_filename(cd9660node *, char *, int); > +void cd9660_compute_full_filename(cd9660node *, char *); > int cd9660_compute_record_size(cd9660node *); > > /* Debugging functions */ > > Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c > ============================================================================== > --- head/usr.sbin/makefs/cd9660/cd9660_write.c Tue Jan 31 00:12:51 2012 (r230794) > +++ head/usr.sbin/makefs/cd9660/cd9660_write.c Tue Jan 31 00:32:37 2012 (r230795) > @@ -296,7 +296,7 @@ cd9660_write_file(FILE *fd, cd9660node * > inode->flags |= FI_WRITTEN; > if (writenode->node->contents == NULL) > cd9660_compute_full_filename(writenode, > - temp_file_name, 0); > + temp_file_name); > ret = cd9660_copy_file(fd, writenode->fileDataSector, > (writenode->node->contents != NULL) ? > writenode->node->contents : temp_file_name); > > Modified: head/usr.sbin/makefs/ffs.c > ============================================================================== > --- head/usr.sbin/makefs/ffs.c Tue Jan 31 00:12:51 2012 (r230794) > +++ head/usr.sbin/makefs/ffs.c Tue Jan 31 00:32:37 2012 (r230795) > @@ -780,8 +780,8 @@ ffs_populate_dir(const char *dir, fsnode > cur->inode->flags |= FI_WRITTEN; > > if (cur->contents == NULL) { > - if (snprintf(path, sizeof(path), "%s/%s", dir, > - cur->name) >= sizeof(path)) > + if (snprintf(path, sizeof(path), "%s/%s/%s", cur->root, > + cur->path, cur->name) >= (int)sizeof(path)) > errx(1, "Pathname too long."); > } > > > Modified: head/usr.sbin/makefs/makefs.8 > ============================================================================== > --- head/usr.sbin/makefs/makefs.8 Tue Jan 31 00:12:51 2012 (r230794) > +++ head/usr.sbin/makefs/makefs.8 Tue Jan 31 00:32:37 2012 (r230795) > @@ -35,7 +35,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd January 10, 2009 > +.Dd January 30, 2012 > .Dt MAKEFS 8 > .Os > .Sh NAME > @@ -58,6 +58,7 @@ > .Op Fl t Ar fs-type > .Ar image-file > .Ar directory | manifest > +.Op Ar extra-directory ... > .Sh DESCRIPTION > The utility > .Nm > @@ -67,6 +68,15 @@ from the directory tree > .Ar directory > or from the mtree manifest > .Ar manifest . > +If optional directory tree > +.Ar extra-directory > +is passed, then the directory tree of each argument will be merged > +into the > +.Ar directory > +or > +.Ar manifest > +first before creating > +.Ar image-file . > No special devices or privileges are required to perform this task. > .Pp > The options are as follows: > > Modified: head/usr.sbin/makefs/makefs.c > ============================================================================== > --- head/usr.sbin/makefs/makefs.c Tue Jan 31 00:12:51 2012 (r230794) > +++ head/usr.sbin/makefs/makefs.c Tue Jan 31 00:32:37 2012 (r230795) > @@ -87,7 +87,7 @@ main(int argc, char *argv[]) > fstype_t *fstype; > fsinfo_t fsoptions; > fsnode *root; > - int ch, len; > + int ch, i, len; > char *subtree; > char *specfile; > > @@ -241,7 +241,7 @@ main(int argc, char *argv[]) > argc -= optind; > argv += optind; > > - if (argc != 2) > + if (argc < 2) > usage(); > > /* -x must be accompanied by -F */ > @@ -260,7 +260,7 @@ main(int argc, char *argv[]) > case S_IFDIR: /* walk the tree */ > subtree = argv[1]; > TIMER_START(start); > - root = walk_dir(subtree, NULL); > + root = walk_dir(subtree, ".", NULL, NULL); > TIMER_RESULTS(start, "walk_dir"); > break; > case S_IFREG: /* read the manifest file */ > @@ -274,6 +274,17 @@ main(int argc, char *argv[]) > /* NOTREACHED */ > } > > + /* append extra directory */ > + for (i = 2; i < argc; i++) { > + if (stat(argv[i], &sb) == -1) > + err(1, "Can't stat `%s'", argv[i]); > + if (!S_ISDIR(sb.st_mode)) > + errx(1, "%s: not a directory", argv[i]); > + TIMER_START(start); > + root = walk_dir(argv[i], ".", NULL, root); > + TIMER_RESULTS(start, "walk_dir2"); > + } > + > if (specfile) { /* apply a specfile */ > TIMER_START(start); > apply_specfile(specfile, subtree, root, fsoptions.onlyspec); > @@ -282,7 +293,7 @@ main(int argc, char *argv[]) > > if (debug & DEBUG_DUMP_FSNODES) { > printf("\nparent: %s\n", subtree); > - dump_fsnodes(".", root); > + dump_fsnodes(root); > putchar('\n'); > } > > @@ -336,7 +347,7 @@ usage(void) > "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" > "\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-s image-size]\n" > "\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-x]\n" > -"\t[-N userdb-dir] image-file directory | manifest\n", > +"\t[-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", > prog); > exit(1); > } > > Modified: head/usr.sbin/makefs/makefs.h > ============================================================================== > --- head/usr.sbin/makefs/makefs.h Tue Jan 31 00:12:51 2012 (r230794) > +++ head/usr.sbin/makefs/makefs.h Tue Jan 31 00:32:37 2012 (r230795) > @@ -94,6 +94,8 @@ typedef struct _fsnode { > fsinode *inode; /* actual inode data */ > char *symlink; /* symlink target */ > char *contents; /* file to provide contents */ > + const char *root; /* root path */ > + char *path; /* directory name */ > char *name; /* file name */ > int flags; /* misc flags */ > } fsnode; > @@ -147,11 +149,11 @@ typedef struct { > > > void apply_specfile(const char *, const char *, fsnode *, int); > -void dump_fsnodes(const char *, fsnode *); > +void dump_fsnodes(fsnode *); > const char * inode_type(mode_t); > fsnode * read_mtree(const char *, fsnode *); > int set_option(option_t *, const char *, const char *); > -fsnode * walk_dir(const char *, fsnode *); > +fsnode * walk_dir(const char *, const char *, fsnode *, fsnode *); > void free_fsnodes(fsnode *); > > void ffs_prep_opts(fsinfo_t *); > > Modified: head/usr.sbin/makefs/walk.c > ============================================================================== > --- head/usr.sbin/makefs/walk.c Tue Jan 31 00:12:51 2012 (r230794) > +++ head/usr.sbin/makefs/walk.c Tue Jan 31 00:32:37 2012 (r230795) > @@ -57,40 +57,70 @@ __FBSDID("$FreeBSD$"); > > static void apply_specdir(const char *, NODE *, fsnode *, int); > static void apply_specentry(const char *, NODE *, fsnode *); > -static fsnode *create_fsnode(const char *, struct stat *); > +static fsnode *create_fsnode(const char *, const char *, const char *, > + struct stat *); > static fsinode *link_check(fsinode *); > > > /* > * walk_dir -- > - * build a tree of fsnodes from `dir', with a parent fsnode of `parent' > - * (which may be NULL for the root of the tree). > + * build a tree of fsnodes from `root' and `dir', with a parent > + * fsnode of `parent' (which may be NULL for the root of the tree). > + * append the tree to a fsnode of `join' if it is not NULL. > * each "level" is a directory, with the "." entry guaranteed to be > * at the start of the list, and without ".." entries. > */ > fsnode * > -walk_dir(const char *dir, fsnode *parent) > +walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join) > { > - fsnode *first, *cur, *prev; > + fsnode *first, *cur, *prev, *last; > DIR *dirp; > struct dirent *dent; > char path[MAXPATHLEN + 1]; > struct stat stbuf; > + char *name, *rp; > + int dot, len; > > + assert(root != NULL); > assert(dir != NULL); > > + len = snprintf(path, sizeof(path), "%s/%s", root, dir); > + if (len >= (int)sizeof(path)) > + errx(1, "Pathname too long."); > if (debug & DEBUG_WALK_DIR) > - printf("walk_dir: %s %p\n", dir, parent); > - if ((dirp = opendir(dir)) == NULL) > - err(1, "Can't opendir `%s'", dir); > - first = prev = NULL; > + printf("walk_dir: %s %p\n", path, parent); > + if ((dirp = opendir(path)) == NULL) > + err(1, "Can't opendir `%s'", path); > + rp = path + strlen(root) + 1; > + if (join != NULL) { > + first = cur = join; > + while (cur->next != NULL) > + cur = cur->next; > + prev = cur; > + } else > + first = prev = NULL; > + last = prev; > while ((dent = readdir(dirp)) != NULL) { > - if (strcmp(dent->d_name, "..") == 0) > - continue; > + name = dent->d_name; > + dot = 0; > + if (name[0] == '.') > + switch (name[1]) { > + case '\0': /* "." */ > + if (join != NULL) > + continue; > + dot = 1; > + break; > + case '.': /* ".." */ > + if (name[2] == '\0') > + continue; > + /* FALLTHROUGH */ > + default: > + dot = 0; > + } > if (debug & DEBUG_WALK_DIR_NODE) > - printf("scanning %s/%s\n", dir, dent->d_name); > - if (snprintf(path, sizeof(path), "%s/%s", dir, dent->d_name) > - >= sizeof(path)) > + printf("scanning %s/%s/%s\n", root, dir, name); > + if (snprintf(path + len, sizeof(path) - len, "/%s", name) >= > + (int)sizeof(path) - len) > errx(1, "Pathname too long."); > if (lstat(path, &stbuf) == -1) > err(1, "Can't lstat `%s'", path); > @@ -102,22 +132,51 @@ walk_dir(const char *dir, fsnode *parent > } > #endif > > - cur = create_fsnode(dent->d_name, &stbuf); > + if (join != NULL) { > + cur = join->next; > + for (;;) { > + if (cur == NULL || strcmp(cur->name, name) == 0) > + break; > + if (cur == last) { > + cur = NULL; > + break; > + } > + cur = cur->next; > + } > + if (cur != NULL) { > + if (S_ISDIR(cur->type) && > + S_ISDIR(stbuf.st_mode)) { > + if (debug & DEBUG_WALK_DIR_NODE) > + printf("merging %s with %p\n", > + path, cur->child); > + cur->child = walk_dir(root, rp, cur, > + cur->child); > + continue; > + } > + errx(1, "Can't merge %s `%s' with existing %s", > + inode_type(stbuf.st_mode), path, > + inode_type(cur->type)); > + } > + } > + > + cur = create_fsnode(root, dir, name, &stbuf); > cur->parent = parent; > - if (strcmp(dent->d_name, ".") == 0) { > + if (dot) { > /* ensure "." is at the start of the list */ > cur->next = first; > first = cur; > if (! prev) > prev = cur; > + cur->first = first; > } else { /* not "." */ > if (prev) > prev->next = cur; > prev = cur; > if (!first) > first = cur; > + cur->first = first; > if (S_ISDIR(cur->type)) { > - cur->child = walk_dir(path, cur); > + cur->child = walk_dir(root, rp, cur, NULL); > continue; > } > } > @@ -147,22 +206,27 @@ walk_dir(const char *dir, fsnode *parent > err(1, "Memory allocation error"); > } > } > - for (cur = first; cur != NULL; cur = cur->next) > - cur->first = first; > + assert(first != NULL); > + if (join == NULL) > + for (cur = first->next; cur != NULL; cur = cur->next) > + cur->first = first; > if (closedir(dirp) == -1) > - err(1, "Can't closedir `%s'", dir); > + err(1, "Can't closedir `%s/%s'", root, dir); > return (first); > } > > static fsnode * > -create_fsnode(const char *name, struct stat *stbuf) > +create_fsnode(const char *root, const char *path, const char *name, > + struct stat *stbuf) > { > fsnode *cur; > > if ((cur = calloc(1, sizeof(fsnode))) == NULL || > + (cur->path = strdup(path)) == NULL || > (cur->name = strdup(name)) == NULL || > (cur->inode = calloc(1, sizeof(fsinode))) == NULL) > err(1, "Memory allocation error"); > + cur->root = root; > cur->type = stbuf->st_mode & S_IFMT; > cur->inode->nlink = 1; > cur->inode->st = *stbuf; > @@ -211,6 +275,7 @@ free_fsnodes(fsnode *node) > free(cur->inode); > if (cur->symlink) > free(cur->symlink); > + free(cur->path); > free(cur->name); > free(cur); > } > @@ -388,14 +453,16 @@ apply_specdir(const char *dir, NODE *spe > stbuf.st_mtimensec = stbuf.st_atimensec = > stbuf.st_ctimensec = start_time.tv_nsec; > #endif > - curfsnode = create_fsnode(curnode->name, &stbuf); > + curfsnode = create_fsnode(".", ".", curnode->name, > + &stbuf); > curfsnode->parent = dirnode->parent; > curfsnode->first = dirnode; > curfsnode->next = dirnode->next; > dirnode->next = curfsnode; > if (curfsnode->type == S_IFDIR) { > /* for dirs, make "." entry as well */ > - curfsnode->child = create_fsnode(".", &stbuf); > + curfsnode->child = create_fsnode(".", ".", ".", > + &stbuf); > curfsnode->child->parent = curfsnode; > curfsnode->child->first = curfsnode->child; > } > @@ -503,19 +570,18 @@ apply_specentry(const char *dir, NODE *s > > /* > * dump_fsnodes -- > - * dump the fsnodes from `cur', based in the directory `dir' > + * dump the fsnodes from `cur' > */ > void > -dump_fsnodes(const char *dir, fsnode *root) > +dump_fsnodes(fsnode *root) > { > fsnode *cur; > char path[MAXPATHLEN + 1]; > > - assert (dir != NULL); > - printf("dump_fsnodes: %s %p\n", dir, root); > + printf("dump_fsnodes: %s %p\n", root->path, root); > for (cur = root; cur != NULL; cur = cur->next) { > - if (snprintf(path, sizeof(path), "%s/%s", dir, cur->name) > - >= sizeof(path)) > + if (snprintf(path, sizeof(path), "%s/%s", cur->path, > + cur->name) >= (int)sizeof(path)) > errx(1, "Pathname too long."); > > if (debug & DEBUG_DUMP_FSNODES_VERBOSE) > @@ -534,10 +600,10 @@ dump_fsnodes(const char *dir, fsnode *ro > > if (cur->child) { > assert (cur->type == S_IFDIR); > - dump_fsnodes(path, cur->child); > + dump_fsnodes(cur->child); > } > } > - printf("dump_fsnodes: finished %s\n", dir); > + printf("dump_fsnodes: finished %s/%s\n", root->path, root->name); > } > > From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 00:10:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC6841065675; Tue, 21 Feb 2012 00:10:33 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id EF8DB8FC1F; Tue, 21 Feb 2012 00:10:32 +0000 (UTC) Received: from rnote.ddteam.net (221-222-133-95.pool.ukrtel.net [95.133.222.221]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id CCA35C493C; Tue, 21 Feb 2012 01:52:22 +0200 (EET) Date: Tue, 21 Feb 2012 01:51:46 +0200 From: Aleksandr Rybalko To: Bruce Evans Message-Id: <20120221015146.48c3e882.ray@freebsd.org> In-Reply-To: <20120221041356.A1826@besplex.bde.org> References: <201202201505.q1KF5MNP056276@svn.freebsd.org> <20120221041356.A1826@besplex.bde.org> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231939 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 00:10:33 -0000 On Tue, 21 Feb 2012 04:57:13 +1100 (EST) Bruce Evans wrote: > On Mon, 20 Feb 2012, Aleksandr Rybalko wrote: > > > Log: > > Remove redundant forward declaration of struct ieee80211com. > > Thanks, but it now has 1 redundant forward declarations of this > instead of 2. There is another section with 3 forward declarations > which are all redundant and bogus. > > Since programmers apparently don't understand C's scope rules for > declarations of incomplete structs (these declarations declare just > the struct tag), it would be useful for the compiler to warn about > bogus ones. Seems me too :) > > The remaining 3 bogus ones are before a struct that uses pointers to > the incomplete structs for its struct members. C's scope rules work > right in this case, and so any pointer declaration self-declares the > same incomplete struct that a previous forward declaration would (thus > any previous purely-forward declaration is bogus, and `any' applies to > all 3 here), and also forward-declares the incomplete struct for the > rest of the file (so any later forward declaration is bogus). So I will try to remove another when complete with understanding of that paragraph of ‘K&R C’ :) > > > Modified: head/sys/net80211/ieee80211_node.h > > ============================================================================== > > --- head/sys/net80211/ieee80211_node.h Mon Feb 20 13:59:24 > > 2012 (r231938) +++ head/sys/net80211/ieee80211_node.h > > Mon Feb 20 15:05:21 2012 (r231939) @@ -299,8 +299,6 @@ > > ieee80211_unref_node(struct ieee80211_no *ni = > > NULL; /* guard against use */ } > > > > -struct ieee80211com; > > - > > void ieee80211_node_attach(struct ieee80211com *); > > void ieee80211_node_lateattach(struct ieee80211com *); > > void ieee80211_node_detach(struct ieee80211com *); > > OTOH, the scope rules for prototypes (and function definitions) don't > work right. Any declaration of an incomplete struct in the function's > parameters is purely local to the extent that it doesn't affect the > rest of the file, and to go with this the declaration must be of a > struct that is incapable being passed, unless the struct has already > been declared, perhaps incompletely. So some prototypes need an > explicit forward declaration of the struct which is sometimes placed > just before the prototype or at the beginning of a block of > prototypes. But in many cases, such a declaration is bogus because > the struct has already been declared (incompletely and > self-referentially) as part of the declaration of a pointer struct > member. Normal order puts (complete) struct declarations before > prototypes and thus gives the declaration more often than other > orders would, and it is good to depend on it since the need for > forward declarations before prototypes is just a bug in the scope > rules for prototypes so we shouldn't have to write extra code to work > around it. > > Compilers can be relied to warn about cases where the explicit forward > declarations are necessary, except in cases of header pollution where > most but not all of the necessary forward declarations are provided > accidentally by pollution in other headers (you start getting errors > if the pollution is fixed or moved, or if the application doesn't > happen to include enough headers to supply as much pollution as it > used to). I usually find minimal sets of forard declarations by first > fixing all pollution and then compiling the header without any other > includes before it; then remove all forward declarations and add back > the ones that cause compilation failures. Without fixing the > pollution, you can't rely on compilation failures to find all the > necessary ones. > > Pollution and non-pollution in other headers make it difficult for > a -Wbogus-declarations option to be made usable. The > -Wredundant-decls options option is only for variables and > prototypes, and is buggy for non-redundant declarations where the > declaration is built up, with types and other qualities being > completed at each step. Considerable ifdefing was needed to make this > usable in the FreeBSD kernel, and it is only enabled by WARNS >= 6 in > userland. Similar ifdefing for struct tags might be even more > painful. Now it is clearer that some declarations are built up -- a > full struct definition is not redundant when it completes an > incomplete struct declaration. The self-forward declaration of > "struct foo" in "struct foo *bar" is never redundant, and it makes > any previous forward declaration of "struct foo" redundant, but the > compiler can only usefully warn about this if the previous one is > guaranteed to be in scope (thus if it is in another header, it may or > not be bogus, depending on whether that header always does it and is > always included, and this is so in all other headers). > > Bruce Thanks for good comments Bruce! WBW -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 00:32:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E751D106564A; Tue, 21 Feb 2012 00:32:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D04C58FC0A; Tue, 21 Feb 2012 00:32:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1L0WODs074334; Tue, 21 Feb 2012 00:32:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1L0WOpc074323; Tue, 21 Feb 2012 00:32:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202210032.q1L0WOpc074323@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 00:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231948 - in stable/8/sys: fs/nfsclient geom/journal gnu/fs/ext2fs kern nfsclient sys ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 00:32:25 -0000 Author: kib Date: Tue Feb 21 00:32:24 2012 New Revision: 231948 URL: http://svn.freebsd.org/changeset/base/231948 Log: MFC r231075: Instead of removing MNTK_ASYNC from mnt_kern_flag, provide a local thread flag to disable async i/o for current thread only. Use the opportunity to move DOINGASYNC() macro into sys/vnode.h and consistently use it through places which tested for MNTK_ASYNC. MFC r231204: Unbreak detection of the async mode for clustered writes after r231075. Approved by: re (bz) Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c stable/8/sys/geom/journal/g_journal.c stable/8/sys/gnu/fs/ext2fs/ext2_inode.c stable/8/sys/kern/vfs_cluster.c stable/8/sys/kern/vfs_subr.c stable/8/sys/kern/vfs_syscalls.c stable/8/sys/nfsclient/nfs_vnops.c stable/8/sys/sys/proc.h stable/8/sys/sys/vnode.h stable/8/sys/ufs/ufs/inode.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Tue Feb 21 00:32:24 2012 (r231948) @@ -1346,7 +1346,7 @@ ncl_writerpc(struct vnode *vp, struct ui if (ret && !error) error = ret; } - if (vp->v_mount->mnt_kern_flag & MNTK_ASYNC) + if (DOINGASYNC(vp)) *iomode = NFSWRITE_FILESYNC; if (error && NFS_ISV4(vp)) error = nfscl_maperr(uiop->uio_td, error, (uid_t)0, (gid_t)0); Modified: stable/8/sys/geom/journal/g_journal.c ============================================================================== --- stable/8/sys/geom/journal/g_journal.c Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/geom/journal/g_journal.c Tue Feb 21 00:32:24 2012 (r231948) @@ -2869,7 +2869,7 @@ g_journal_do_switch(struct g_class *clas struct mount *mp; struct bintime bt; char *mountpoint; - int error, vfslocked; + int error, save, vfslocked; DROP_GIANT(); g_topology_lock(); @@ -2931,10 +2931,7 @@ g_journal_do_switch(struct g_class *clas goto next; } - MNT_ILOCK(mp); - mp->mnt_noasync++; - mp->mnt_kern_flag &= ~MNTK_ASYNC; - MNT_IUNLOCK(mp); + save = curthread_pflags_set(TDP_SYNCIO); GJ_TIMER_START(1, &bt); vfs_msync(mp, MNT_NOWAIT); @@ -2949,11 +2946,7 @@ g_journal_do_switch(struct g_class *clas mountpoint, error); } - MNT_ILOCK(mp); - mp->mnt_noasync--; - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) - mp->mnt_kern_flag |= MNTK_ASYNC; - MNT_IUNLOCK(mp); + curthread_pflags_restore(save); vn_finished_write(mp); Modified: stable/8/sys/gnu/fs/ext2fs/ext2_inode.c ============================================================================== --- stable/8/sys/gnu/fs/ext2fs/ext2_inode.c Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/gnu/fs/ext2fs/ext2_inode.c Tue Feb 21 00:32:24 2012 (r231948) @@ -92,7 +92,7 @@ ext2_update(vp, waitfor) } ext2_i2ei(ip, (struct ext2_inode *)((char *)bp->b_data + EXT2_INODE_SIZE(fs) * ino_to_fsbo(fs, ip->i_number))); - if (waitfor && (vp->v_mount->mnt_kern_flag & MNTK_ASYNC) == 0) + if (waitfor && !DOINGASYNC(vp)) return (bwrite(bp)); else { bdwrite(bp); Modified: stable/8/sys/kern/vfs_cluster.c ============================================================================== --- stable/8/sys/kern/vfs_cluster.c Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/kern/vfs_cluster.c Tue Feb 21 00:32:24 2012 (r231948) @@ -604,7 +604,7 @@ cluster_write(struct vnode *vp, struct b int async; if (vp->v_type == VREG) { - async = vp->v_mount->mnt_kern_flag & MNTK_ASYNC; + async = DOINGASYNC(vp); lblocksize = vp->v_mount->mnt_stat.f_iosize; } else { async = 0; Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/kern/vfs_subr.c Tue Feb 21 00:32:24 2012 (r231948) @@ -3499,7 +3499,7 @@ sync_fsync(struct vop_fsync_args *ap) { struct vnode *syncvp = ap->a_vp; struct mount *mp = syncvp->v_mount; - int error; + int error, save; struct bufobj *bo; /* @@ -3529,17 +3529,10 @@ sync_fsync(struct vop_fsync_args *ap) vfs_unbusy(mp); return (0); } - MNT_ILOCK(mp); - mp->mnt_noasync++; - mp->mnt_kern_flag &= ~MNTK_ASYNC; - MNT_IUNLOCK(mp); + save = curthread_pflags_set(TDP_SYNCIO); vfs_msync(mp, MNT_NOWAIT); error = VFS_SYNC(mp, MNT_LAZY); - MNT_ILOCK(mp); - mp->mnt_noasync--; - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) - mp->mnt_kern_flag |= MNTK_ASYNC; - MNT_IUNLOCK(mp); + curthread_pflags_restore(save); vn_finished_write(mp); vfs_unbusy(mp); return (error); Modified: stable/8/sys/kern/vfs_syscalls.c ============================================================================== --- stable/8/sys/kern/vfs_syscalls.c Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/kern/vfs_syscalls.c Tue Feb 21 00:32:24 2012 (r231948) @@ -132,7 +132,7 @@ sync(td, uap) struct sync_args *uap; { struct mount *mp, *nmp; - int vfslocked; + int save, vfslocked; mtx_lock(&mountlist_mtx); for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { @@ -143,18 +143,10 @@ sync(td, uap) vfslocked = VFS_LOCK_GIANT(mp); if ((mp->mnt_flag & MNT_RDONLY) == 0 && vn_start_write(NULL, &mp, V_NOWAIT) == 0) { - MNT_ILOCK(mp); - mp->mnt_noasync++; - mp->mnt_kern_flag &= ~MNTK_ASYNC; - MNT_IUNLOCK(mp); + save = curthread_pflags_set(TDP_SYNCIO); vfs_msync(mp, MNT_NOWAIT); VFS_SYNC(mp, MNT_NOWAIT); - MNT_ILOCK(mp); - mp->mnt_noasync--; - if ((mp->mnt_flag & MNT_ASYNC) != 0 && - mp->mnt_noasync == 0) - mp->mnt_kern_flag |= MNTK_ASYNC; - MNT_IUNLOCK(mp); + curthread_pflags_restore(save); vn_finished_write(mp); } VFS_UNLOCK_GIANT(vfslocked); Modified: stable/8/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vnops.c Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/nfsclient/nfs_vnops.c Tue Feb 21 00:32:24 2012 (r231948) @@ -1455,7 +1455,7 @@ nfs_writerpc(struct vnode *vp, struct ui tsiz -= len; } nfsmout: - if (vp->v_mount->mnt_kern_flag & MNTK_ASYNC) + if (DOINGASYNC(vp)) committed = NFSV3WRITE_FILESYNC; *iomode = committed; if (error) Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/sys/proc.h Tue Feb 21 00:32:24 2012 (r231948) @@ -395,7 +395,7 @@ do { \ #define TDP_NOSLEEPING 0x00000100 /* Thread is not allowed to sleep on a sq. */ #define TDP_OWEUPC 0x00000200 /* Call addupc() at next AST. */ #define TDP_ITHREAD 0x00000400 /* Thread is an interrupt thread. */ -#define TDP_UNUSED800 0x00000800 /* available. */ +#define TDP_SYNCIO 0x00000800 /* Local override, disable async i/o. */ #define TDP_SCHED1 0x00001000 /* Reserved for scheduler private use */ #define TDP_SCHED2 0x00002000 /* Reserved for scheduler private use */ #define TDP_SCHED3 0x00004000 /* Reserved for scheduler private use */ Modified: stable/8/sys/sys/vnode.h ============================================================================== --- stable/8/sys/sys/vnode.h Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/sys/vnode.h Tue Feb 21 00:32:24 2012 (r231948) @@ -542,6 +542,10 @@ void assert_vop_unlocked(struct vnode *v */ #define VCALL(c) ((c)->a_desc->vdesc_call(c)) +#define DOINGASYNC(vp) \ + (((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) != 0 && \ + ((curthread->td_pflags & TDP_SYNCIO) == 0)) + /* * VMIO support inline */ Modified: stable/8/sys/ufs/ufs/inode.h ============================================================================== --- stable/8/sys/ufs/ufs/inode.h Tue Feb 21 00:26:52 2012 (r231947) +++ stable/8/sys/ufs/ufs/inode.h Tue Feb 21 00:32:24 2012 (r231948) @@ -174,7 +174,6 @@ struct indir { /* Determine if soft dependencies are being done */ #define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & MNT_SOFTDEP) -#define DOINGASYNC(vp) ((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) /* This overlays the fid structure (see mount.h). */ struct ufid { From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 01:05:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B587106564A; Tue, 21 Feb 2012 01:05:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 215A18FC0A; Tue, 21 Feb 2012 01:05:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1L15Dlq075449; Tue, 21 Feb 2012 01:05:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1L15C0t075415; Tue, 21 Feb 2012 01:05:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202210105.q1L15C0t075415@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 01:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231949 - in head/sys: cddl/compat/opensolaris/sys compat/ndis fs/cd9660 fs/devfs fs/ext2fs fs/msdosfs fs/nfsclient fs/nfsserver fs/pseudofs fs/udf kern nfsclient sys ufs/ffs ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 01:05:13 -0000 Author: kib Date: Tue Feb 21 01:05:12 2012 New Revision: 231949 URL: http://svn.freebsd.org/changeset/base/231949 Log: Fix found places where uio_resid is truncated to int. Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from the usermode. Discussed with: bde, das (previous versions) MFC after: 1 month Modified: head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/compat/ndis/subr_ndis.c head/sys/fs/cd9660/cd9660_vnops.c head/sys/fs/devfs/devfs_vnops.c head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsserver/nfs_nfsdstate.c head/sys/fs/pseudofs/pseudofs_vnops.c head/sys/fs/udf/udf_vnops.c head/sys/kern/kern_ctf.c head/sys/kern/kern_gzio.c head/sys/kern/kern_ktrace.c head/sys/kern/kern_linker.c head/sys/kern/link_elf.c head/sys/kern/link_elf_obj.c head/sys/kern/subr_uio.c head/sys/kern/sys_generic.c head/sys/kern/sys_pipe.c head/sys/kern/tty_ttydisc.c head/sys/kern/uipc_mbuf.c head/sys/kern/uipc_socket.c head/sys/kern/uipc_syscalls.c head/sys/kern/vfs_extattr.c head/sys/kern/vfs_mountroot.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/nfsclient/nfs_bio.c head/sys/sys/systm.h head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_vnops.c head/sys/ufs/ufs/ufs_lookup.c Modified: head/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/vnode.h Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/cddl/compat/opensolaris/sys/vnode.h Tue Feb 21 01:05:12 2012 (r231949) @@ -223,7 +223,8 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, ssize_t *residp) { struct thread *td = curthread; - int error, vfslocked, resid; + int error, vfslocked; + ssize_t resid; ASSERT(ioflag == 0); ASSERT(ulimit == RLIM64_INFINITY); Modified: head/sys/compat/ndis/subr_ndis.c ============================================================================== --- head/sys/compat/ndis/subr_ndis.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/compat/ndis/subr_ndis.c Tue Feb 21 01:05:12 2012 (r231949) @@ -2862,7 +2862,8 @@ NdisMapFile(status, mappedbuffer, fileha struct thread *td = curthread; linker_file_t lf; caddr_t kldstart; - int error, resid, vfslocked; + int error, vfslocked; + ssize_t resid; struct vnode *vp; if (filehandle == NULL) { Modified: head/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vnops.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/fs/cd9660/cd9660_vnops.c Tue Feb 21 01:05:12 2012 (r231949) @@ -318,7 +318,7 @@ cd9660_read(ap) do { lbn = lblkno(imp, uio->uio_offset); on = blkoff(imp, uio->uio_offset); - n = min((u_int)(imp->logical_block_size - on), + n = MIN((u_int)(imp->logical_block_size - on), uio->uio_resid); diff = (off_t)ip->i_size - uio->uio_offset; if (diff <= 0) @@ -343,7 +343,7 @@ cd9660_read(ap) } else error = bread(vp, lbn, size, NOCRED, &bp); } - n = min(n, size - bp->b_resid); + n = MIN(n, size - bp->b_resid); if (error) { brelse(bp); return (error); Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/fs/devfs/devfs_vnops.c Tue Feb 21 01:05:12 2012 (r231949) @@ -1156,7 +1156,8 @@ static int devfs_read_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td) { struct cdev *dev; - int ioflag, error, ref, resid; + int ioflag, error, ref; + ssize_t resid; struct cdevsw *dsw; struct file *fpop; @@ -1634,7 +1635,8 @@ static int devfs_write_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td) { struct cdev *dev; - int error, ioflag, ref, resid; + int error, ioflag, ref; + ssize_t resid; struct cdevsw *dsw; struct file *fpop; Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/fs/ext2fs/ext2_lookup.c Tue Feb 21 01:05:12 2012 (r231949) @@ -1001,7 +1001,8 @@ ext2_dirempty(ip, parentino, cred) off_t off; struct dirtemplate dbuf; struct ext2fs_direct_2 *dp = (struct ext2fs_direct_2 *)&dbuf; - int error, count, namlen; + int error, namlen; + ssize_t count; #define MINDIRSIZ (sizeof(struct dirtemplate) / 2) for (off = 0; off < ip->i_size; off += dp->e2d_reclen) { Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Tue Feb 21 01:05:12 2012 (r231949) @@ -543,7 +543,7 @@ msdosfs_read(ap) int error = 0; int blsize; int isadir; - int orig_resid; + ssize_t orig_resid; u_int n; u_long diff; u_long on; @@ -643,7 +643,7 @@ msdosfs_write(ap) { int n; int croffset; - int resid; + ssize_t resid; u_long osize; int error = 0; u_long count; Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/fs/nfsclient/nfs_clbio.c Tue Feb 21 01:05:12 2012 (r231949) @@ -570,7 +570,7 @@ ncl_bioread(struct vnode *vp, struct uio n = 0; if (on < bcount) - n = min((unsigned)(bcount - on), uio->uio_resid); + n = MIN((unsigned)(bcount - on), uio->uio_resid); break; case VLNK: NFSINCRGLOBAL(newnfsstats.biocache_readlinks); @@ -589,7 +589,7 @@ ncl_bioread(struct vnode *vp, struct uio return (error); } } - n = min(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid); + n = MIN(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid); on = 0; break; case VDIR: @@ -757,8 +757,8 @@ nfs_directio_write(vp, uiop, cred, iofla struct iovec iov; do_sync: while (uiop->uio_resid > 0) { - size = min(uiop->uio_resid, wsize); - size = min(uiop->uio_iov->iov_len, size); + size = MIN(uiop->uio_resid, wsize); + size = MIN(uiop->uio_iov->iov_len, size); iov.iov_base = uiop->uio_iov->iov_base; iov.iov_len = size; uio.uio_iov = &iov; @@ -806,8 +806,8 @@ do_sync: * in NFS directio access. */ while (uiop->uio_resid > 0) { - size = min(uiop->uio_resid, wsize); - size = min(uiop->uio_iov->iov_len, size); + size = MIN(uiop->uio_resid, wsize); + size = MIN(uiop->uio_iov->iov_len, size); bp = getpbuf(&ncl_pbuf_freecnt); t_uio = malloc(sizeof(struct uio), M_NFSDIRECTIO, M_WAITOK); t_iov = malloc(sizeof(struct iovec), M_NFSDIRECTIO, M_WAITOK); @@ -1023,7 +1023,7 @@ flush_and_restart: NFSINCRGLOBAL(newnfsstats.biocache_writes); lbn = uio->uio_offset / biosize; on = uio->uio_offset & (biosize-1); - n = min((unsigned)(biosize - on), uio->uio_resid); + n = MIN((unsigned)(biosize - on), uio->uio_resid); again: /* * Handle direct append and file extension cases, calculate @@ -1572,7 +1572,7 @@ ncl_doio(struct vnode *vp, struct buf *b * writes, but that is not possible any longer. */ int nread = bp->b_bcount - uiop->uio_resid; - int left = uiop->uio_resid; + ssize_t left = uiop->uio_resid; if (left > 0) bzero((char *)bp->b_data + nread, left); Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/fs/nfsclient/nfs_clvnops.c Tue Feb 21 01:05:12 2012 (r231949) @@ -2177,7 +2177,8 @@ nfs_readdir(struct vop_readdir_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); struct uio *uio = ap->a_uio; - int tresid, error = 0; + ssize_t tresid; + int error = 0; struct vattr vattr; if (vp->v_type != VDIR) Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Feb 21 01:05:12 2012 (r231949) @@ -3962,7 +3962,7 @@ nfsrv_setupstable(NFSPROC_T *p) struct nfst_rec *tsp; int error, i, tryagain; off_t off = 0; - int aresid, len; + ssize_t aresid, len; struct timeval curtime; /* Modified: head/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vnops.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Tue Feb 21 01:05:12 2012 (r231949) @@ -589,7 +589,8 @@ pfs_read(struct vop_read_args *va) struct proc *proc; struct sbuf *sb = NULL; int error, locked; - unsigned int buflen, offset, resid; + off_t offset; + ssize_t buflen, resid; PFS_TRACE(("%s", pn->pn_name)); pfs_assert_not_owned(pn); Modified: head/sys/fs/udf/udf_vnops.c ============================================================================== --- head/sys/fs/udf/udf_vnops.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/fs/udf/udf_vnops.c Tue Feb 21 01:05:12 2012 (r231949) @@ -439,8 +439,9 @@ udf_read(struct vop_read_args *ap) uint8_t *data; daddr_t lbn, rablock; off_t diff, fsize; + ssize_t n; int error = 0; - long size, n, on; + long size, on; if (uio->uio_resid == 0) return (0); Modified: head/sys/kern/kern_ctf.c ============================================================================== --- head/sys/kern/kern_ctf.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/kern_ctf.c Tue Feb 21 01:05:12 2012 (r231949) @@ -68,7 +68,7 @@ link_elf_ctf_get(linker_file_t lf, linke int flags; int i; int nbytes; - int resid; + ssize_t resid; int vfslocked; size_t sz; struct nameidata nd; Modified: head/sys/kern/kern_gzio.c ============================================================================== --- head/sys/kern/kern_gzio.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/kern_gzio.c Tue Feb 21 01:05:12 2012 (r231949) @@ -97,7 +97,7 @@ gzFile gz_open (path, mode, vp) gz_stream *s; char fmode[80]; /* copy of mode, without the compression level */ char *m = fmode; - int resid; + ssize_t resid; int error; char buf[GZ_HEADER_LEN + 1]; @@ -342,7 +342,7 @@ local void putU32 (s, x) { uint32_t xx; off_t curoff = s->outoff; - int resid; + ssize_t resid; #if BYTE_ORDER == BIG_ENDIAN xx = bswap32(x); Modified: head/sys/kern/kern_ktrace.c ============================================================================== --- head/sys/kern/kern_ktrace.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/kern_ktrace.c Tue Feb 21 01:05:12 2012 (r231949) @@ -684,7 +684,7 @@ ktrgenio(fd, rw, uio, error) } uio->uio_offset = 0; uio->uio_rw = UIO_WRITE; - datalen = imin(uio->uio_resid, ktr_geniosize); + datalen = MIN(uio->uio_resid, ktr_geniosize); buf = malloc(datalen, M_KTRACE, M_WAITOK); error = uiomove(buf, datalen, uio); free(uio, M_IOV); Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/kern_linker.c Tue Feb 21 01:05:12 2012 (r231949) @@ -1748,7 +1748,8 @@ linker_hints_lookup(const char *path, in struct vattr vattr, mattr; u_char *hints = NULL; u_char *cp, *recptr, *bufend, *result, *best, *pathbuf, *sep; - int error, ival, bestver, *intp, reclen, found, flags, clen, blen; + int error, ival, bestver, *intp, found, flags, clen, blen; + ssize_t reclen; int vfslocked = 0; result = NULL; @@ -1793,7 +1794,7 @@ linker_hints_lookup(const char *path, in VFS_UNLOCK_GIANT(vfslocked); nd.ni_vp = NULL; if (reclen != 0) { - printf("can't read %d\n", reclen); + printf("can't read %zd\n", reclen); goto bad; } intp = (int *)hints; Modified: head/sys/kern/link_elf.c ============================================================================== --- head/sys/kern/link_elf.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/link_elf.c Tue Feb 21 01:05:12 2012 (r231949) @@ -655,7 +655,8 @@ link_elf_load_file(linker_class_t cls, c Elf_Addr base_vaddr; Elf_Addr base_vlimit; int error = 0; - int resid, flags; + ssize_t resid; + int flags; elf_file_t ef; linker_file_t lf; Elf_Shdr *shdr; Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/link_elf_obj.c Tue Feb 21 01:05:12 2012 (r231949) @@ -440,7 +440,8 @@ link_elf_load_file(linker_class_t cls, c vm_offset_t mapbase; size_t mapsize; int error = 0; - int resid, flags; + ssize_t resid; + int flags; elf_file_t ef; linker_file_t lf; int symtabindex; Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/subr_uio.c Tue Feb 21 01:05:12 2012 (r231949) @@ -171,7 +171,7 @@ uiomove_faultflag(void *cp, int n, struc { struct thread *td; struct iovec *iov; - u_int cnt; + size_t cnt; int error, newflags, save; td = curthread; @@ -245,14 +245,14 @@ out: int uiomove_frombuf(void *buf, int buflen, struct uio *uio) { - unsigned int offset, n; + size_t offset, n; if (uio->uio_offset < 0 || uio->uio_resid < 0 || (offset = uio->uio_offset) != uio->uio_offset) return (EINVAL); if (buflen <= 0 || offset >= buflen) return (0); - if ((n = buflen - offset) > INT_MAX) + if ((n = buflen - offset) > IOSIZE_MAX) return (EINVAL); return (uiomove((char *)buf + offset, n, uio)); } @@ -479,7 +479,7 @@ copyinuio(const struct iovec *iovp, u_in uio->uio_offset = -1; uio->uio_resid = 0; for (i = 0; i < iovcnt; i++) { - if (iov->iov_len > INT_MAX - uio->uio_resid) { + if (iov->iov_len > IOSIZE_MAX - uio->uio_resid) { free(uio, M_IOV); return (EINVAL); } Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/sys_generic.c Tue Feb 21 01:05:12 2012 (r231949) @@ -74,6 +74,10 @@ __FBSDID("$FreeBSD$"); #include +int iosize_max_clamp = 1; +SYSCTL_INT(_debug, OID_AUTO, iosize_max_clamp, CTLFLAG_RW, &iosize_max_clamp, 0, + "Clamp max i/o size to INT_MAX"); + static MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer"); static MALLOC_DEFINE(M_SELECT, "select", "select() buffer"); MALLOC_DEFINE(M_IOV, "iov", "large iov's"); @@ -145,7 +149,7 @@ sys_read(td, uap) struct iovec aiov; int error; - if (uap->nbyte > INT_MAX) + if (uap->nbyte > IOSIZE_MAX) return (EINVAL); aiov.iov_base = uap->buf; aiov.iov_len = uap->nbyte; @@ -178,7 +182,7 @@ sys_pread(td, uap) struct iovec aiov; int error; - if (uap->nbyte > INT_MAX) + if (uap->nbyte > IOSIZE_MAX) return (EINVAL); aiov.iov_base = uap->buf; aiov.iov_len = uap->nbyte; @@ -334,7 +338,12 @@ dofileread(td, fd, fp, auio, offset, fla ktrgenio(fd, UIO_READ, ktruio, error); } #endif +#if SSIZE_MAX > LONG_MAX + td->td_retval[1] = cnt >> (sizeof(register_t) * CHAR_BIT); + td->td_retval[0] = cnt; +#else td->td_retval[0] = cnt; +#endif return (error); } @@ -354,7 +363,7 @@ sys_write(td, uap) struct iovec aiov; int error; - if (uap->nbyte > INT_MAX) + if (uap->nbyte > IOSIZE_MAX) return (EINVAL); aiov.iov_base = (void *)(uintptr_t)uap->buf; aiov.iov_len = uap->nbyte; @@ -387,7 +396,7 @@ sys_pwrite(td, uap) struct iovec aiov; int error; - if (uap->nbyte > INT_MAX) + if (uap->nbyte > IOSIZE_MAX) return (EINVAL); aiov.iov_base = (void *)(uintptr_t)uap->buf; aiov.iov_len = uap->nbyte; @@ -546,7 +555,12 @@ dofilewrite(td, fd, fp, auio, offset, fl ktrgenio(fd, UIO_WRITE, ktruio, error); } #endif +#if SSIZE_MAX > LONG_MAX + td->td_retval[1] = cnt >> (sizeof(register_t) * CHAR_BIT); td->td_retval[0] = cnt; +#else + td->td_retval[0] = cnt; +#endif return (error); } Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/sys_pipe.c Tue Feb 21 01:05:12 2012 (r231949) @@ -617,7 +617,7 @@ pipe_read(fp, uio, active_cred, flags, t size = rpipe->pipe_buffer.size - rpipe->pipe_buffer.out; if (size > rpipe->pipe_buffer.cnt) size = rpipe->pipe_buffer.cnt; - if (size > (u_int) uio->uio_resid) + if (size > uio->uio_resid) size = (u_int) uio->uio_resid; PIPE_UNLOCK(rpipe); @@ -650,7 +650,7 @@ pipe_read(fp, uio, active_cred, flags, t */ } else if ((size = rpipe->pipe_map.cnt) && (rpipe->pipe_state & PIPE_DIRECTW)) { - if (size > (u_int) uio->uio_resid) + if (size > uio->uio_resid) size = (u_int) uio->uio_resid; PIPE_UNLOCK(rpipe); @@ -764,9 +764,10 @@ pipe_build_write_buffer(wpipe, uio) KASSERT(wpipe->pipe_state & PIPE_DIRECTW, ("Clone attempt on non-direct write pipe!")); - size = (u_int) uio->uio_iov->iov_len; - if (size > wpipe->pipe_buffer.size) - size = wpipe->pipe_buffer.size; + if (uio->uio_iov->iov_len > wpipe->pipe_buffer.size) + size = wpipe->pipe_buffer.size; + else + size = uio->uio_iov->iov_len; if ((i = vm_fault_quick_hold_pages(&curproc->p_vmspace->vm_map, (vm_offset_t)uio->uio_iov->iov_base, size, VM_PROT_READ, @@ -960,7 +961,7 @@ pipe_write(fp, uio, active_cred, flags, int flags; { int error = 0; - int desiredsize, orig_resid; + size_t desiredsize, orig_resid; struct pipe *wpipe, *rpipe; rpipe = fp->f_data; Modified: head/sys/kern/tty_ttydisc.c ============================================================================== --- head/sys/kern/tty_ttydisc.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/tty_ttydisc.c Tue Feb 21 01:05:12 2012 (r231949) @@ -180,7 +180,7 @@ static int ttydisc_read_raw_no_timer(struct tty *tp, struct uio *uio, int ioflag) { size_t vmin = tp->t_termios.c_cc[VMIN]; - int oresid = uio->uio_resid; + ssize_t oresid = uio->uio_resid; int error; MPASS(tp->t_termios.c_cc[VTIME] == 0); @@ -265,7 +265,7 @@ static int ttydisc_read_raw_interbyte_timer(struct tty *tp, struct uio *uio, int ioflag) { size_t vmin = tp->t_termios.c_cc[VMIN]; - int oresid = uio->uio_resid; + ssize_t oresid = uio->uio_resid; int error; MPASS(tp->t_termios.c_cc[VMIN] != 0); @@ -1173,7 +1173,7 @@ int ttydisc_getc_uio(struct tty *tp, struct uio *uio) { int error = 0; - int obytes = uio->uio_resid; + ssize_t obytes = uio->uio_resid; size_t len; char buf[TTY_STACKBUF]; Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/uipc_mbuf.c Tue Feb 21 01:05:12 2012 (r231949) @@ -1726,7 +1726,8 @@ struct mbuf * m_uiotombuf(struct uio *uio, int how, int len, int align, int flags) { struct mbuf *m, *mb; - int error, length, total; + int error, length; + ssize_t total; int progress = 0; /* Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/uipc_socket.c Tue Feb 21 01:05:12 2012 (r231949) @@ -887,7 +887,8 @@ sosend_copyin(struct uio *uio, struct mb int flags) { struct mbuf *m, **mp, *top; - long len, resid; + long len; + ssize_t resid; int error; #ifdef ZERO_COPY_SOCKETS int cow_send; @@ -987,7 +988,8 @@ int sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *td) { - long space, resid; + long space; + ssize_t resid; int clen = 0, error, dontroute; #ifdef ZERO_COPY_SOCKETS int atomic = sosendallatonce(so) || top; @@ -1159,7 +1161,8 @@ int sosend_generic(struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *td) { - long space, resid; + long space; + ssize_t resid; int clen = 0, error, dontroute; int atomic = sosendallatonce(so) || top; @@ -1456,11 +1459,12 @@ soreceive_generic(struct socket *so, str struct mbuf **mp0, struct mbuf **controlp, int *flagsp) { struct mbuf *m, **mp; - int flags, len, error, offset; + int flags, error, offset; + ssize_t len; struct protosw *pr = so->so_proto; struct mbuf *nextrecord; int moff, type = 0; - int orig_resid = uio->uio_resid; + ssize_t orig_resid = uio->uio_resid; mp = mp0; if (psa != NULL) @@ -2119,7 +2123,8 @@ soreceive_dgram(struct socket *so, struc struct mbuf **mp0, struct mbuf **controlp, int *flagsp) { struct mbuf *m, *m2; - int flags, len, error; + int flags, error; + ssize_t len; struct protosw *pr = so->so_proto; struct mbuf *nextrecord; Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/uipc_syscalls.c Tue Feb 21 01:05:12 2012 (r231949) @@ -756,8 +756,8 @@ kern_sendit(td, s, mp, flags, control, s struct uio auio; struct iovec *iov; struct socket *so; - int i; - int len, error; + int i, error; + ssize_t len; cap_rights_t rights; #ifdef KTRACE struct uio *ktruio = NULL; @@ -956,7 +956,7 @@ kern_recvit(td, s, mp, fromseg, controlp struct uio auio; struct iovec *iov; int i; - socklen_t len; + ssize_t len; int error; struct mbuf *m, *control = 0; caddr_t ctlbuf; @@ -1007,19 +1007,19 @@ kern_recvit(td, s, mp, fromseg, controlp (mp->msg_control || controlp) ? &control : (struct mbuf **)0, &mp->msg_flags); if (error) { - if (auio.uio_resid != (int)len && (error == ERESTART || + if (auio.uio_resid != len && (error == ERESTART || error == EINTR || error == EWOULDBLOCK)) error = 0; } #ifdef KTRACE if (ktruio != NULL) { - ktruio->uio_resid = (int)len - auio.uio_resid; + ktruio->uio_resid = len - auio.uio_resid; ktrgenio(s, UIO_READ, ktruio, error); } #endif if (error) goto out; - td->td_retval[0] = (int)len - auio.uio_resid; + td->td_retval[0] = len - auio.uio_resid; if (mp->msg_name) { len = mp->msg_namelen; if (len <= 0 || fromsa == 0) @@ -2086,7 +2086,8 @@ retry_space: else if (uap->flags & SF_NODISKIO) error = EBUSY; else { - int bsize, resid; + int bsize; + ssize_t resid; /* * Ensure that our page is still around @@ -2510,7 +2511,8 @@ sys_sctp_generic_sendmsg_iov(td, uap) struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; struct file *fp = NULL; - int error=0, len, i; + int error=0, i; + ssize_t len; struct sockaddr *to = NULL; #ifdef KTRACE struct uio *ktruio = NULL; @@ -2637,7 +2639,8 @@ sys_sctp_generic_recvmsg(td, uap) struct file *fp = NULL; struct sockaddr *fromsa; int fromlen; - int len, i, msg_flags; + ssize_t len; + int i, msg_flags; int error = 0; #ifdef KTRACE struct uio *ktruio = NULL; @@ -2711,7 +2714,7 @@ sys_sctp_generic_recvmsg(td, uap) (struct sctp_sndrcvinfo *)&sinfo, 1); CURVNET_RESTORE(); if (error) { - if (auio.uio_resid != (int)len && (error == ERESTART || + if (auio.uio_resid != len && (error == ERESTART || error == EINTR || error == EWOULDBLOCK)) error = 0; } else { @@ -2720,13 +2723,13 @@ sys_sctp_generic_recvmsg(td, uap) } #ifdef KTRACE if (ktruio != NULL) { - ktruio->uio_resid = (int)len - auio.uio_resid; + ktruio->uio_resid = len - auio.uio_resid; ktrgenio(uap->sd, UIO_READ, ktruio, error); } #endif /* KTRACE */ if (error) goto out; - td->td_retval[0] = (int)len - auio.uio_resid; + td->td_retval[0] = len - auio.uio_resid; if (fromlen && uap->from) { len = fromlen; @@ -2734,7 +2737,7 @@ sys_sctp_generic_recvmsg(td, uap) len = 0; else { len = MIN(len, fromsa->sa_len); - error = copyout(fromsa, uap->from, (unsigned)len); + error = copyout(fromsa, uap->from, (size_t)len); if (error) goto out; } Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/vfs_extattr.c Tue Feb 21 01:05:12 2012 (r231949) @@ -181,7 +181,7 @@ extattr_set_vp(struct vnode *vp, int att auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > INT_MAX) { + if (nbytes > IOSIZE_MAX) { error = EINVAL; goto done; } @@ -355,7 +355,7 @@ extattr_get_vp(struct vnode *vp, int att auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > INT_MAX) { + if (nbytes > IOSIZE_MAX) { error = EINVAL; goto done; } @@ -672,7 +672,7 @@ extattr_list_vp(struct vnode *vp, int at auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > INT_MAX) { + if (nbytes > IOSIZE_MAX) { error = EINVAL; goto done; } Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/vfs_mountroot.c Tue Feb 21 01:05:12 2012 (r231949) @@ -871,9 +871,8 @@ vfs_mountroot_readconf(struct thread *td static char buf[128]; struct nameidata nd; off_t ofs; - int error, flags; - int len, resid; - int vfslocked; + ssize_t resid; + int error, flags, len, vfslocked; NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, "/.mount.conf", td); Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/vfs_syscalls.c Tue Feb 21 01:05:12 2012 (r231949) @@ -2692,7 +2692,7 @@ kern_readlinkat(struct thread *td, int f struct nameidata nd; int vfslocked; - if (count > INT_MAX) + if (count > IOSIZE_MAX) return (EINVAL); NDINIT_AT(&nd, LOOKUP, NOFOLLOW | LOCKSHARED | LOCKLEAF | MPSAFE | @@ -4153,7 +4153,8 @@ kern_getdirentries(struct thread *td, in int error, eofflag; AUDIT_ARG_FD(fd); - if (count > INT_MAX) + auio.uio_resid = count; + if (auio.uio_resid > IOSIZE_MAX) return (EINVAL); if ((error = getvnode(td->td_proc->p_fd, fd, CAP_READ | CAP_SEEK, &fp)) != 0) @@ -4177,7 +4178,6 @@ unionread: auio.uio_rw = UIO_READ; auio.uio_segflg = UIO_USERSPACE; auio.uio_td = td; - auio.uio_resid = count; vn_lock(vp, LK_SHARED | LK_RETRY); AUDIT_ARG_VNODE1(vp); loff = auio.uio_offset = fp->f_offset; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/kern/vfs_vnops.c Tue Feb 21 01:05:12 2012 (r231949) @@ -373,7 +373,7 @@ vn_rdwr(rw, vp, base, len, offset, segfl int ioflg; struct ucred *active_cred; struct ucred *file_cred; - int *aresid; + ssize_t *aresid; struct thread *td; { struct uio auio; @@ -470,7 +470,7 @@ vn_rdwr_inchunks(rw, vp, base, len, offs struct thread *td; { int error = 0; - int iaresid; + ssize_t iaresid; VFS_ASSERT_GIANT(vp->v_mount); Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/nfsclient/nfs_bio.c Tue Feb 21 01:05:12 2012 (r231949) @@ -564,7 +564,7 @@ nfs_bioread(struct vnode *vp, struct uio n = 0; if (on < bcount) - n = min((unsigned)(bcount - on), uio->uio_resid); + n = MIN((unsigned)(bcount - on), uio->uio_resid); break; case VLNK: nfsstats.biocache_readlinks++; @@ -583,7 +583,7 @@ nfs_bioread(struct vnode *vp, struct uio return (error); } } - n = min(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid); + n = MIN(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid); on = 0; break; case VDIR: @@ -751,8 +751,8 @@ nfs_directio_write(vp, uiop, cred, iofla struct iovec iov; do_sync: while (uiop->uio_resid > 0) { - size = min(uiop->uio_resid, wsize); - size = min(uiop->uio_iov->iov_len, size); + size = MIN(uiop->uio_resid, wsize); + size = MIN(uiop->uio_iov->iov_len, size); iov.iov_base = uiop->uio_iov->iov_base; iov.iov_len = size; uio.uio_iov = &iov; @@ -800,8 +800,8 @@ do_sync: * in NFS directio access. */ while (uiop->uio_resid > 0) { - size = min(uiop->uio_resid, wsize); - size = min(uiop->uio_iov->iov_len, size); + size = MIN(uiop->uio_resid, wsize); + size = MIN(uiop->uio_iov->iov_len, size); bp = getpbuf(&nfs_pbuf_freecnt); t_uio = malloc(sizeof(struct uio), M_NFSDIRECTIO, M_WAITOK); t_iov = malloc(sizeof(struct iovec), M_NFSDIRECTIO, M_WAITOK); @@ -1014,7 +1014,7 @@ flush_and_restart: nfsstats.biocache_writes++; lbn = uio->uio_offset / biosize; on = uio->uio_offset & (biosize-1); - n = min((unsigned)(biosize - on), uio->uio_resid); + n = MIN((unsigned)(biosize - on), uio->uio_resid); again: /* * Handle direct append and file extension cases, calculate Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/sys/systm.h Tue Feb 21 01:05:12 2012 (r231949) @@ -133,6 +133,9 @@ extern char **kenvp; extern const void *zero_region; /* address space maps to a zeroed page */ +extern int iosize_max_clamp; +#define IOSIZE_MAX (iosize_max_clamp ? INT_MAX : SSIZE_MAX) + /* * General function declarations. */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/sys/vnode.h Tue Feb 21 01:05:12 2012 (r231949) @@ -653,7 +653,7 @@ void vn_pages_remove(struct vnode *vp, v int vn_pollrecord(struct vnode *vp, struct thread *p, int events); int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, int len, off_t offset, enum uio_seg segflg, int ioflg, - struct ucred *active_cred, struct ucred *file_cred, int *aresid, + struct ucred *active_cred, struct ucred *file_cred, ssize_t *aresid, struct thread *td); int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base, size_t len, off_t offset, enum uio_seg segflg, int ioflg, Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/ufs/ffs/ffs_vnops.c Tue Feb 21 01:05:12 2012 (r231949) @@ -420,7 +420,8 @@ ffs_read(ap) ufs_lbn_t lbn, nextlbn; off_t bytesinfile; long size, xfersize, blkoffset; - int error, orig_resid; + ssize_t orig_resid; + int error; int seqcount; int ioflag; @@ -633,8 +634,9 @@ ffs_write(ap) struct buf *bp; ufs_lbn_t lbn; off_t osize; + ssize_t resid; int seqcount; - int blkoffset, error, flags, ioflag, resid, size, xfersize; + int blkoffset, error, flags, ioflag, size, xfersize; vp = ap->a_vp; uio = ap->a_uio; @@ -871,7 +873,8 @@ ffs_extread(struct vnode *vp, struct uio ufs_lbn_t lbn, nextlbn; off_t bytesinfile; long size, xfersize, blkoffset; - int error, orig_resid; + ssize_t orig_resid; + int error; ip = VTOI(vp); fs = ip->i_fs; @@ -1024,7 +1027,8 @@ ffs_extwrite(struct vnode *vp, struct ui struct buf *bp; ufs_lbn_t lbn; off_t osize; - int blkoffset, error, flags, resid, size, xfersize; + ssize_t resid; + int blkoffset, error, flags, size, xfersize; ip = VTOI(vp); fs = ip->i_fs; Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Tue Feb 21 00:32:24 2012 (r231948) +++ head/sys/ufs/ufs/ufs_lookup.c Tue Feb 21 01:05:12 2012 (r231949) @@ -1337,7 +1337,8 @@ ufs_dirempty(ip, parentino, cred) doff_t off; struct dirtemplate dbuf; struct direct *dp = (struct direct *)&dbuf; - int error, count, namlen; + int error, namlen; + ssize_t count; #define MINDIRSIZ (sizeof (struct dirtemplate) / 2) for (off = 0; off < ip->i_size; off += dp->d_reclen) { From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 01:19:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 106621065670; Tue, 21 Feb 2012 01:19:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFA168FC12; Tue, 21 Feb 2012 01:19:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1L1Jmeg075928; Tue, 21 Feb 2012 01:19:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1L1JmA7075926; Tue, 21 Feb 2012 01:19:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202210119.q1L1JmA7075926@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 01:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231950 - stable/9/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 01:19:49 -0000 Author: kib Date: Tue Feb 21 01:19:48 2012 New Revision: 231950 URL: http://svn.freebsd.org/changeset/base/231950 Log: MFC r231902: Document PL_FLAG_CHILD. Modified: stable/9/lib/libc/sys/ptrace.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/ptrace.2 ============================================================================== --- stable/9/lib/libc/sys/ptrace.2 Tue Feb 21 01:05:12 2012 (r231949) +++ stable/9/lib/libc/sys/ptrace.2 Tue Feb 21 01:19:48 2012 (r231950) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd October 5, 2011 +.Dd February 19, 2012 .Dt PTRACE 2 .Os .Sh NAME @@ -355,6 +355,11 @@ The process identifier of the new proces .Va pl_child_pid member of .Vt "struct ptrace_lwpinfo" . +.It PL_FLAG_CHILD +The flag is set for first event reported from a new child, which is +automatically attached due to +.Dv PT_FOLLOW_FORK +enabled. .El .It pl_sigmask The current signal mask of the LWP From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 01:27:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C927C106566C; Tue, 21 Feb 2012 01:27:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49BBB8FC0C; Tue, 21 Feb 2012 01:27:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1L1ROQ9076204; Tue, 21 Feb 2012 01:27:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1L1ROP4076201; Tue, 21 Feb 2012 01:27:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202210127.q1L1ROP4076201@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 01:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231951 - stable/9/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 01:27:24 -0000 Author: kib Date: Tue Feb 21 01:27:23 2012 New Revision: 231951 URL: http://svn.freebsd.org/changeset/base/231951 Log: MFC r231122: Sprinkle missed calls to asynchronous UFS_UPDATE() in attempt to guarantee that all UFS inode metadata changes results in the dirtiness of the inodeblock. Modified: stable/9/sys/ufs/ufs/ufs_acl.c stable/9/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ufs/ufs_acl.c ============================================================================== --- stable/9/sys/ufs/ufs/ufs_acl.c Tue Feb 21 01:19:48 2012 (r231950) +++ stable/9/sys/ufs/ufs/ufs_acl.c Tue Feb 21 01:27:23 2012 (r231951) @@ -422,7 +422,8 @@ ufs_setacl_nfs4_internal(struct vnode *v VN_KNOTE_UNLOCKED(vp, NOTE_ATTRIB); - return (0); + error = UFS_UPDATE(vp, 0); + return (error); } static int @@ -591,10 +592,11 @@ ufs_setacl_posix1e(struct vop_setacl_arg */ ufs_sync_inode_from_acl(ap->a_aclp, ip); ip->i_flag |= IN_CHANGE; + error = UFS_UPDATE(ap->a_vp, 0); } VN_KNOTE_UNLOCKED(ap->a_vp, NOTE_ATTRIB); - return (0); + return (error); } int Modified: stable/9/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/9/sys/ufs/ufs/ufs_vnops.c Tue Feb 21 01:19:48 2012 (r231950) +++ stable/9/sys/ufs/ufs/ufs_vnops.c Tue Feb 21 01:27:23 2012 (r231951) @@ -571,8 +571,9 @@ ufs_setattr(ap) DIP_SET(ip, i_flags, ip->i_flags); } ip->i_flag |= IN_CHANGE; + error = UFS_UPDATE(vp, 0); if (vap->va_flags & (IMMUTABLE | APPEND)) - return (0); + return (error); } if (ip->i_flags & (IMMUTABLE | APPEND)) return (EPERM); @@ -738,6 +739,9 @@ ufs_markatime(ap) VI_LOCK(vp); ip->i_flag |= IN_ACCESS; VI_UNLOCK(vp); + /* + * XXXKIB No UFS_UPDATE(ap->a_vp, 0) there. + */ return (0); } @@ -794,6 +798,9 @@ ufs_chmod(vp, mode, cred, td) if ((vp->v_mount->mnt_flag & MNT_NFS4ACLS) != 0) error = ufs_update_nfs4_acl_after_mode_change(vp, mode, ip->i_uid, cred, td); #endif + if (error == 0 && (ip->i_flag & IN_CHANGE) != 0) + error = UFS_UPDATE(vp, 0); + return (error); } @@ -912,7 +919,8 @@ good: DIP_SET(ip, i_mode, ip->i_mode); } } - return (0); + error = UFS_UPDATE(vp, 0); + return (error); } static int @@ -2079,6 +2087,7 @@ ufs_rmdir(ap) dp->i_nlink--; DIP_SET(dp, i_nlink, dp->i_nlink); dp->i_flag |= IN_CHANGE; + error = UFS_UPDATE(dvp, 0); ip->i_nlink--; DIP_SET(ip, i_nlink, ip->i_nlink); ip->i_flag |= IN_CHANGE; @@ -2122,6 +2131,7 @@ ufs_symlink(ap) ip->i_size = len; DIP_SET(ip, i_size, len); ip->i_flag |= IN_CHANGE | IN_UPDATE; + error = UFS_UPDATE(vp, 0); } else error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 01:37:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BBE9106564A; Tue, 21 Feb 2012 01:37:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65D228FC0C; Tue, 21 Feb 2012 01:37:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1L1bSpF076552; Tue, 21 Feb 2012 01:37:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1L1bSVM076550; Tue, 21 Feb 2012 01:37:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202210137.q1L1bSVM076550@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 01:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231952 - stable/9/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 01:37:28 -0000 Author: kib Date: Tue Feb 21 01:37:27 2012 New Revision: 231952 URL: http://svn.freebsd.org/changeset/base/231952 Log: MFC r231160 (by mckusick): Do not fsync all resident UFS vnodes from the syncer vnode call to ffs_sync(). Since all inode metadata updates are translated to inodeblock updates, the vnodes syncing is handled by syncer dirty buffer wheel. The only things that shall be synced by ffs_sync() from the syncer calls are the filesystem metadata proper. Modified: stable/9/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_vfsops.c Tue Feb 21 01:27:23 2012 (r231951) +++ stable/9/sys/ufs/ffs/ffs_vfsops.c Tue Feb 21 01:37:27 2012 (r231952) @@ -1436,17 +1436,26 @@ ffs_sync(mp, waitfor) int softdep_accdeps; struct bufobj *bo; + wait = 0; + suspend = 0; + suspended = 0; td = curthread; fs = ump->um_fs; if (fs->fs_fmod != 0 && fs->fs_ronly != 0 && ump->um_fsckpid == 0) panic("%s: ffs_sync: modification on read-only filesystem", fs->fs_fsmnt); /* + * For a lazy sync, we just care about the filesystem metadata. + */ + if (waitfor == MNT_LAZY) { + secondary_accwrites = 0; + secondary_writes = 0; + lockreq = 0; + goto metasync; + } + /* * Write back each (modified) inode. */ - wait = 0; - suspend = 0; - suspended = 0; lockreq = LK_EXCLUSIVE | LK_NOWAIT; if (waitfor == MNT_SUSPEND) { suspend = 1; @@ -1517,11 +1526,12 @@ loop: #ifdef QUOTA qsync(mp); #endif + +metasync: devvp = ump->um_devvp; bo = &devvp->v_bufobj; BO_LOCK(bo); - if (waitfor != MNT_LAZY && - (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0)) { + if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) { BO_UNLOCK(bo); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); if ((error = VOP_FSYNC(devvp, waitfor, td)) != 0) From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 01:43:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27ED7106566B; Tue, 21 Feb 2012 01:43:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECAE78FC15; Tue, 21 Feb 2012 01:43:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1L1hVuT076767; Tue, 21 Feb 2012 01:43:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1L1hV6K076765; Tue, 21 Feb 2012 01:43:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202210143.q1L1hV6K076765@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 01:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231953 - stable/9/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 01:43:32 -0000 Author: kib Date: Tue Feb 21 01:43:31 2012 New Revision: 231953 URL: http://svn.freebsd.org/changeset/base/231953 Log: MFC r231313 (by mckusick): First attempt the uiomove() to the newly allocated (and dirty) buffer and only zeros it if the uiomove() fails. The effect is to eliminate the gratuitous zeroing of the buffer in the usual case where the uiomove() successfully fills it. Modified: stable/9/sys/ufs/ffs/ffs_vnops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_vnops.c Tue Feb 21 01:37:27 2012 (r231952) +++ stable/9/sys/ufs/ffs/ffs_vnops.c Tue Feb 21 01:43:31 2012 (r231953) @@ -718,15 +718,6 @@ ffs_write(ap) vnode_pager_setsize(vp, ip->i_size); break; } - /* - * If the buffer is not valid we have to clear out any - * garbage data from the pages instantiated for the buffer. - * If we do not, a failed uiomove() during a write can leave - * the prior contents of the pages exposed to a userland - * mmap(). XXX deal with uiomove() errors a better way. - */ - if ((bp->b_flags & B_CACHE) == 0 && fs->fs_bsize <= xfersize) - vfs_bio_clrbuf(bp); if (ioflag & IO_DIRECT) bp->b_flags |= B_DIRECT; if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL)) @@ -743,6 +734,26 @@ ffs_write(ap) error = uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio); + /* + * If the buffer is not already filled and we encounter an + * error while trying to fill it, we have to clear out any + * garbage data from the pages instantiated for the buffer. + * If we do not, a failed uiomove() during a write can leave + * the prior contents of the pages exposed to a userland mmap. + * + * Note that we need only clear buffers with a transfer size + * equal to the block size because buffers with a shorter + * transfer size were cleared above by the call to UFS_BALLOC() + * with the BA_CLRBUF flag set. + * + * If the source region for uiomove identically mmaps the + * buffer, uiomove() performed the NOP copy, and the buffer + * content remains valid because the page fault handler + * validated the pages. + */ + if (error != 0 && (bp->b_flags & B_CACHE) == 0 && + fs->fs_bsize == xfersize) + vfs_bio_clrbuf(bp); if ((ioflag & (IO_VMIO|IO_DIRECT)) && (LIST_EMPTY(&bp->b_dep))) { bp->b_flags |= B_RELBUF; From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 01:46:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 265BC106566B; Tue, 21 Feb 2012 01:46:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10E578FC0A; Tue, 21 Feb 2012 01:46:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1L1kfp6076921; Tue, 21 Feb 2012 01:46:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1L1kfQ4076919; Tue, 21 Feb 2012 01:46:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202210146.q1L1kfQ4076919@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 01:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231954 - stable/9/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 01:46:42 -0000 Author: kib Date: Tue Feb 21 01:46:41 2012 New Revision: 231954 URL: http://svn.freebsd.org/changeset/base/231954 Log: MFC r231572 (by mckusick): Missing conditions in checking whether an inode has been written. Modified: stable/9/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_softdep.c Tue Feb 21 01:43:31 2012 (r231953) +++ stable/9/sys/ufs/ffs/ffs_softdep.c Tue Feb 21 01:46:41 2012 (r231954) @@ -7160,13 +7160,16 @@ check_inode_unwritten(inodedep) mtx_assert(&lk, MA_OWNED); if ((inodedep->id_state & (DEPCOMPLETE | UNLINKED)) != 0 || + !LIST_EMPTY(&inodedep->id_dirremhd) || !LIST_EMPTY(&inodedep->id_pendinghd) || !LIST_EMPTY(&inodedep->id_bufwait) || !LIST_EMPTY(&inodedep->id_inowait) || + !TAILQ_EMPTY(&inodedep->id_inoreflst) || !TAILQ_EMPTY(&inodedep->id_inoupdt) || !TAILQ_EMPTY(&inodedep->id_newinoupdt) || !TAILQ_EMPTY(&inodedep->id_extupdt) || !TAILQ_EMPTY(&inodedep->id_newextupdt) || + !TAILQ_EMPTY(&inodedep->id_freeblklst) || inodedep->id_mkdiradd != NULL || inodedep->id_nlinkdelta != 0) return (0); From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 04:12:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E9F51065673; Tue, 21 Feb 2012 04:12:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECD6D8FC0A; Tue, 21 Feb 2012 04:12:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1L4CS99082124; Tue, 21 Feb 2012 04:12:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1L4CSTB082122; Tue, 21 Feb 2012 04:12:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201202210412.q1L4CSTB082122@svn.freebsd.org> From: Xin LI Date: Tue, 21 Feb 2012 04:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231961 - stable/9/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 04:12:29 -0000 Author: delphij Date: Tue Feb 21 04:12:28 2012 New Revision: 231961 URL: http://svn.freebsd.org/changeset/base/231961 Log: MFC r231632: wctob() returns EOF and not WEOF. Noticed by: Zhihao Yuan Modified: stable/9/lib/libc/locale/btowc.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/locale/btowc.3 ============================================================================== --- stable/9/lib/libc/locale/btowc.3 Tue Feb 21 04:08:31 2012 (r231960) +++ stable/9/lib/libc/locale/btowc.3 Tue Feb 21 04:12:28 2012 (r231961) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 3, 2002 +.Dd February 13, 2012 .Dt BTOWC 3 .Os .Sh NAME @@ -58,7 +58,7 @@ If the wide character is or not able to be represented as a single byte in the initial shift state, .Fn wctob returns -.Dv WEOF . +.Dv EOF . .Sh SEE ALSO .Xr mbrtowc 3 , .Xr multibyte 3 , From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 10:11:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D9E0106564A; Tue, 21 Feb 2012 10:11:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D0EA8FC19; Tue, 21 Feb 2012 10:11:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LABHYi093396; Tue, 21 Feb 2012 10:11:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LABHTA093393; Tue, 21 Feb 2012 10:11:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202211011.q1LABHTA093393@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 10:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231965 - stable/8/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 10:11:18 -0000 Author: kib Date: Tue Feb 21 10:11:17 2012 New Revision: 231965 URL: http://svn.freebsd.org/changeset/base/231965 Log: MFC r231122: Sprinkle missed calls to asynchronous UFS_UPDATE() in attempt to guarantee that all UFS inode metadata changes results in the dirtiness of the inodeblock. Approved by: re (bz) Modified: stable/8/sys/ufs/ufs/ufs_acl.c stable/8/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/ufs/ufs/ufs_acl.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_acl.c Tue Feb 21 09:12:35 2012 (r231964) +++ stable/8/sys/ufs/ufs/ufs_acl.c Tue Feb 21 10:11:17 2012 (r231965) @@ -420,7 +420,8 @@ ufs_setacl_nfs4_internal(struct vnode *v VN_KNOTE_UNLOCKED(vp, NOTE_ATTRIB); - return (0); + error = UFS_UPDATE(vp, 0); + return (error); } static int @@ -589,10 +590,11 @@ ufs_setacl_posix1e(struct vop_setacl_arg */ ufs_sync_inode_from_acl(ap->a_aclp, ip); ip->i_flag |= IN_CHANGE; + error = UFS_UPDATE(ap->a_vp, 0); } VN_KNOTE_UNLOCKED(ap->a_vp, NOTE_ATTRIB); - return (0); + return (error); } int Modified: stable/8/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_vnops.c Tue Feb 21 09:12:35 2012 (r231964) +++ stable/8/sys/ufs/ufs/ufs_vnops.c Tue Feb 21 10:11:17 2012 (r231965) @@ -562,8 +562,9 @@ ufs_setattr(ap) DIP_SET(ip, i_flags, ip->i_flags); } ip->i_flag |= IN_CHANGE; + error = UFS_UPDATE(vp, 0); if (vap->va_flags & (IMMUTABLE | APPEND)) - return (0); + return (error); } if (ip->i_flags & (IMMUTABLE | APPEND)) return (EPERM); @@ -729,6 +730,9 @@ ufs_markatime(ap) VI_LOCK(vp); ip->i_flag |= IN_ACCESS; VI_UNLOCK(vp); + /* + * XXXKIB No UFS_UPDATE(ap->a_vp, 0) there. + */ return (0); } @@ -785,6 +789,9 @@ ufs_chmod(vp, mode, cred, td) if ((vp->v_mount->mnt_flag & MNT_NFS4ACLS) != 0) error = ufs_update_nfs4_acl_after_mode_change(vp, mode, ip->i_uid, cred, td); #endif + if (error == 0 && (ip->i_flag & IN_CHANGE) != 0) + error = UFS_UPDATE(vp, 0); + return (error); } @@ -903,7 +910,8 @@ good: DIP_SET(ip, i_mode, ip->i_mode); } } - return (0); + error = UFS_UPDATE(vp, 0); + return (error); } static int @@ -2071,6 +2079,7 @@ ufs_rmdir(ap) dp->i_nlink--; DIP_SET(dp, i_nlink, dp->i_nlink); dp->i_flag |= IN_CHANGE; + error = UFS_UPDATE(dvp, 0); ip->i_nlink--; DIP_SET(ip, i_nlink, ip->i_nlink); ip->i_flag |= IN_CHANGE; @@ -2119,6 +2128,7 @@ ufs_symlink(ap) ip->i_size = len; DIP_SET(ip, i_size, len); ip->i_flag |= IN_CHANGE | IN_UPDATE; + error = UFS_UPDATE(vp, 0); } else error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 10:13:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43164106564A; Tue, 21 Feb 2012 10:13:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D7AE8FC18; Tue, 21 Feb 2012 10:13:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LADc2r093519; Tue, 21 Feb 2012 10:13:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LADbsw093517; Tue, 21 Feb 2012 10:13:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201202211013.q1LADbsw093517@svn.freebsd.org> From: Xin LI Date: Tue, 21 Feb 2012 10:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231966 - stable/8/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 10:13:38 -0000 Author: delphij Date: Tue Feb 21 10:13:37 2012 New Revision: 231966 URL: http://svn.freebsd.org/changeset/base/231966 Log: MFC r231632: wctob() returns EOF and not WEOF. Noticed by: Zhihao Yuan Approved by: re (kib) Modified: stable/8/lib/libc/locale/btowc.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/locale/btowc.3 ============================================================================== --- stable/8/lib/libc/locale/btowc.3 Tue Feb 21 10:11:17 2012 (r231965) +++ stable/8/lib/libc/locale/btowc.3 Tue Feb 21 10:13:37 2012 (r231966) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 3, 2002 +.Dd February 13, 2012 .Dt BTOWC 3 .Os .Sh NAME @@ -58,7 +58,7 @@ If the wide character is or not able to be represented as a single byte in the initial shift state, .Fn wctob returns -.Dv WEOF . +.Dv EOF . .Sh SEE ALSO .Xr mbrtowc 3 , .Xr multibyte 3 , From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 10:16:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F30A1065676; Tue, 21 Feb 2012 10:16:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED6A88FC15; Tue, 21 Feb 2012 10:16:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LAGHe2093639; Tue, 21 Feb 2012 10:16:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LAGHAP093637; Tue, 21 Feb 2012 10:16:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202211016.q1LAGHAP093637@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 10:16:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231967 - stable/8/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 10:16:18 -0000 Author: kib Date: Tue Feb 21 10:16:17 2012 New Revision: 231967 URL: http://svn.freebsd.org/changeset/base/231967 Log: MFC r231160 (by mckusick): Do not fsync all resident UFS vnodes from the syncer vnode call to ffs_sync(). Since all inode metadata updates are translated to inodeblock updates, the vnodes syncing is handled by syncer dirty buffer wheel. The only things that shall be synced by ffs_sync() from the syncer calls are the filesystem metadata proper. Approved by: re (bz) Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_vfsops.c Tue Feb 21 10:13:37 2012 (r231966) +++ stable/8/sys/ufs/ffs/ffs_vfsops.c Tue Feb 21 10:16:17 2012 (r231967) @@ -1321,17 +1321,26 @@ ffs_sync(mp, waitfor) int softdep_accdeps; struct bufobj *bo; + wait = 0; + suspend = 0; + suspended = 0; td = curthread; fs = ump->um_fs; if (fs->fs_fmod != 0 && fs->fs_ronly != 0) panic("%s: ffs_sync: modification on read-only filesystem", fs->fs_fsmnt); /* + * For a lazy sync, we just care about the filesystem metadata. + */ + if (waitfor == MNT_LAZY) { + secondary_accwrites = 0; + secondary_writes = 0; + lockreq = 0; + goto metasync; + } + /* * Write back each (modified) inode. */ - wait = 0; - suspend = 0; - suspended = 0; lockreq = LK_EXCLUSIVE | LK_NOWAIT; if (waitfor == MNT_SUSPEND) { suspend = 1; @@ -1402,11 +1411,12 @@ loop: #ifdef QUOTA qsync(mp); #endif + +metasync: devvp = ump->um_devvp; bo = &devvp->v_bufobj; BO_LOCK(bo); - if (waitfor != MNT_LAZY && - (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0)) { + if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) { BO_UNLOCK(bo); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); if ((error = VOP_FSYNC(devvp, waitfor, td)) != 0) From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 14:59:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5CB81065670; Tue, 21 Feb 2012 14:59:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D57D38FC15; Tue, 21 Feb 2012 14:59:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LEx71e004544; Tue, 21 Feb 2012 14:59:07 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LEx78t004542; Tue, 21 Feb 2012 14:59:07 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201202211459.q1LEx78t004542@svn.freebsd.org> From: Ed Maste Date: Tue, 21 Feb 2012 14:59:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231973 - head/libexec/tftpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 14:59:08 -0000 Author: emaste Date: Tue Feb 21 14:59:07 2012 New Revision: 231973 URL: http://svn.freebsd.org/changeset/base/231973 Log: Avoid error log for transfer stop w/o error code. A number of tftp clients, including the one in Intel's pxe boot loader, may intentionally stop a transfer using error code 0 (i.e., EUNDEF). These are not real errors. Avoid spamming log files with these by logging them at level LOG_DEBUG instead. Discussed on -hackers with an initial patch proposal; this change is an improved approach suggested by kan@. Modified: head/libexec/tftpd/tftp-io.c Modified: head/libexec/tftpd/tftp-io.c ============================================================================== --- head/libexec/tftpd/tftp-io.c Tue Feb 21 14:29:28 2012 (r231972) +++ head/libexec/tftpd/tftp-io.c Tue Feb 21 14:59:07 2012 (r231973) @@ -463,7 +463,8 @@ receive_packet(int peer, char *data, int } if (pkt->th_opcode == ERROR) { - tftp_log(LOG_ERR, "Got ERROR packet: %s", pkt->th_msg); + tftp_log(pkt->th_code == EUNDEF ? LOG_DEBUG : LOG_ERR, + "Got ERROR packet: %s", pkt->th_msg); return (RP_ERROR); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 18:29:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D48D6106566C; Tue, 21 Feb 2012 18:29:46 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA8BF8FC19; Tue, 21 Feb 2012 18:29:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LITk6q012591; Tue, 21 Feb 2012 18:29:46 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LITkJF012590; Tue, 21 Feb 2012 18:29:46 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201202211829.q1LITkJF012590@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 21 Feb 2012 18:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231974 - stable/9/share X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 18:29:46 -0000 Author: jh Date: Tue Feb 21 18:29:46 2012 New Revision: 231974 URL: http://svn.freebsd.org/changeset/base/231974 Log: Clean up mergeinfo. Discussed on: src-committers Modified: Directory Properties: stable/9/share/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 19:35:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3668106564A; Tue, 21 Feb 2012 19:35:59 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C30C88FC0A; Tue, 21 Feb 2012 19:35:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LJZx1P014875; Tue, 21 Feb 2012 19:35:59 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LJZxU8014873; Tue, 21 Feb 2012 19:35:59 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202211935.q1LJZxU8014873@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 21 Feb 2012 19:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231975 - head/sys/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 19:35:59 -0000 Author: trociny Date: Tue Feb 21 19:35:59 2012 New Revision: 231975 URL: http://svn.freebsd.org/changeset/base/231975 Log: Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR. Reviewed by: kib MFC after: 1 week Modified: head/sys/tools/vnode_if.awk Modified: head/sys/tools/vnode_if.awk ============================================================================== --- head/sys/tools/vnode_if.awk Tue Feb 21 18:29:46 2012 (r231974) +++ head/sys/tools/vnode_if.awk Tue Feb 21 19:35:59 2012 (r231975) @@ -195,7 +195,7 @@ while ((getline < srcfile) > 0) { continue; if ($1 ~ /^%%/) { if (NF != 6 || - $2 !~ /^[a-z]+$/ || $3 !~ /^[a-z]+$/ || + $2 !~ /^[a-z_]+$/ || $3 !~ /^[a-z]+$/ || $4 !~ /^.$/ || $5 !~ /^.$/ || $6 !~ /^.$/) { die("Invalid %s construction", "%%"); continue; From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 19:40:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5759106564A; Tue, 21 Feb 2012 19:40:13 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A512D8FC16; Tue, 21 Feb 2012 19:40:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LJeDFY015058; Tue, 21 Feb 2012 19:40:13 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LJeD7g015056; Tue, 21 Feb 2012 19:40:13 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202211940.q1LJeD7g015056@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 21 Feb 2012 19:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231976 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 19:40:13 -0000 Author: trociny Date: Tue Feb 21 19:40:13 2012 New Revision: 231976 URL: http://svn.freebsd.org/changeset/base/231976 Log: unp_connect() may use a shared lock on the vnode to fetch the socket. Suggested by: jhb Reviewed by: jhb, kib, rwatson MFC after: 2 weeks Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Tue Feb 21 19:35:59 2012 (r231975) +++ head/sys/kern/uipc_usrreq.c Tue Feb 21 19:40:13 2012 (r231976) @@ -1273,8 +1273,8 @@ unp_connect(struct socket *so, struct so UNP_PCB_UNLOCK(unp); sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF, UIO_SYSSPACE, buf, - td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKSHARED | LOCKLEAF, + UIO_SYSSPACE, buf, td); error = namei(&nd); if (error) vp = NULL; From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 20:29:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 084C7106566B; Tue, 21 Feb 2012 20:29:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E15DA8FC0A; Tue, 21 Feb 2012 20:29:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LKTcsi016816; Tue, 21 Feb 2012 20:29:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LKTcLI016813; Tue, 21 Feb 2012 20:29:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202212029.q1LKTcLI016813@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 20:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231977 - in stable/9/sys/amd64: amd64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 20:29:39 -0000 Author: kib Date: Tue Feb 21 20:29:38 2012 New Revision: 231977 URL: http://svn.freebsd.org/changeset/base/231977 Log: MFC r230538: Order newly added functions alphabetically. MFC r230766: Move xrstor/xsave/xsetbv into fpu.c and reorder them. Modified: stable/9/sys/amd64/amd64/fpu.c stable/9/sys/amd64/include/cpufunc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/fpu.c ============================================================================== --- stable/9/sys/amd64/amd64/fpu.c Tue Feb 21 19:40:13 2012 (r231976) +++ stable/9/sys/amd64/amd64/fpu.c Tue Feb 21 20:29:38 2012 (r231977) @@ -78,6 +78,41 @@ __FBSDID("$FreeBSD$"); : : "n" (CR0_TS) : "ax") #define stop_emulating() __asm __volatile("clts") +static __inline void +xrstor(char *addr, uint64_t mask) +{ + uint32_t low, hi; + + low = mask; + hi = mask >> 32; + /* xrstor (%rdi) */ + __asm __volatile(".byte 0x0f,0xae,0x2f" : : + "a" (low), "d" (hi), "D" (addr)); +} + +static __inline void +xsave(char *addr, uint64_t mask) +{ + uint32_t low, hi; + + low = mask; + hi = mask >> 32; + /* xsave (%rdi) */ + __asm __volatile(".byte 0x0f,0xae,0x27" : : + "a" (low), "d" (hi), "D" (addr) : "memory"); +} + +static __inline void +xsetbv(uint32_t reg, uint64_t val) +{ + uint32_t low, hi; + + low = val; + hi = val >> 32; + __asm __volatile(".byte 0x0f,0x01,0xd1" : : + "c" (reg), "a" (low), "d" (hi)); +} + #else /* !(__GNUCLIKE_ASM && !lint) */ void fldcw(u_short cw); @@ -90,6 +125,9 @@ void fxrstor(caddr_t addr); void ldmxcsr(u_int csr); void start_emulating(void); void stop_emulating(void); +void xrstor(char *addr, uint64_t mask); +void xsave(char *addr, uint64_t mask); +void xsetbv(uint32_t reg, uint64_t val); #endif /* __GNUCLIKE_ASM && !lint */ Modified: stable/9/sys/amd64/include/cpufunc.h ============================================================================== --- stable/9/sys/amd64/include/cpufunc.h Tue Feb 21 19:40:13 2012 (r231976) +++ stable/9/sys/amd64/include/cpufunc.h Tue Feb 21 20:29:38 2012 (r231977) @@ -669,41 +669,6 @@ intr_restore(register_t rflags) write_rflags(rflags); } -static __inline void -xsetbv(uint32_t reg, uint64_t val) -{ - uint32_t low, hi; - - low = val; - hi = val >> 32; - __asm __volatile(".byte 0x0f,0x01,0xd1" : : - "c" (reg), "a" (low), "d" (hi)); -} - -static __inline void -xsave(char *addr, uint64_t mask) -{ - uint32_t low, hi; - - low = mask; - hi = mask >> 32; - /* xsave (%rdi) */ - __asm __volatile(".byte 0x0f,0xae,0x27" : : - "a" (low), "d" (hi), "D" (addr) : "memory"); -} - -static __inline void -xrstor(char *addr, uint64_t mask) -{ - uint32_t low, hi; - - low = mask; - hi = mask >> 32; - /* xrstor (%rdi) */ - __asm __volatile(".byte 0x0f,0xae,0x2f" : : - "a" (low), "d" (hi), "D" (addr)); -} - #else /* !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */ int breakpoint(void); @@ -768,9 +733,6 @@ u_int rgs(void); void wbinvd(void); void write_rflags(u_int rf); void wrmsr(u_int msr, uint64_t newval); -void xsetbv(uint32_t reg, uint64_t val); -void xsave(char *addr, uint64_t mask); -void xrstor(char *addr, uint64_t mask); #endif /* __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE */ From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 20:55:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D5951065677; Tue, 21 Feb 2012 20:55:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02A078FC13; Tue, 21 Feb 2012 20:55:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LKthg7018750; Tue, 21 Feb 2012 20:55:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LKthUO018747; Tue, 21 Feb 2012 20:55:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201202212055.q1LKthUO018747@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Feb 2012 20:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231978 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 20:55:44 -0000 Author: dim Date: Tue Feb 21 20:55:43 2012 New Revision: 231978 URL: http://svn.freebsd.org/changeset/base/231978 Log: When building with clang, disable -Wunneeded-internal-declaration for several sys/cam/ctl files, since these get the following warnings: In file included from sys/cam/ctl/ctl_backend.c:60: sys/cam/ctl/ctl_private.h:300:30: error: variable 'page_index_template' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static struct ctl_page_index page_index_template[] = { ^ These warnings are tricky to fix without a lot of overhaul, and they are harmless, so disable them for now. MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.mk Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Feb 21 20:29:38 2012 (r231977) +++ head/sys/conf/files Tue Feb 21 20:55:43 2012 (r231978) @@ -116,16 +116,21 @@ cam/scsi/scsi_cd.c optional cd cam/scsi/scsi_ch.c optional ch cam/ata/ata_da.c optional ada | da cam/ctl/ctl.c optional ctl -cam/ctl/ctl_backend.c optional ctl +cam/ctl/ctl_backend.c optional ctl \ + compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" cam/ctl/ctl_backend_block.c optional ctl cam/ctl/ctl_backend_ramdisk.c optional ctl -cam/ctl/ctl_cmd_table.c optional ctl -cam/ctl/ctl_frontend.c optional ctl +cam/ctl/ctl_cmd_table.c optional ctl \ + compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" +cam/ctl/ctl_frontend.c optional ctl \ + compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" cam/ctl/ctl_frontend_cam_sim.c optional ctl -cam/ctl/ctl_frontend_internal.c optional ctl +cam/ctl/ctl_frontend_internal.c optional ctl \ + compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" cam/ctl/ctl_mem_pool.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl -cam/ctl/ctl_error.c optional ctl +cam/ctl/ctl_error.c optional ctl \ + compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/scsi/scsi_da.c optional da Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Feb 21 20:29:38 2012 (r231977) +++ head/sys/conf/kern.mk Tue Feb 21 20:55:43 2012 (r231978) @@ -22,6 +22,7 @@ NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-cou NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow NO_WUNUSED_VALUE= -Wno-unused-value NO_WSELF_ASSIGN= -Wno-self-assign +NO_WUNNEEDED_INTERNAL_DECL= -Wno-unneeded-internal-declaration # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 20:56:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1A8B1065678; Tue, 21 Feb 2012 20:56:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CBA68FC15; Tue, 21 Feb 2012 20:56:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LKu3RZ018842; Tue, 21 Feb 2012 20:56:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LKu31R018830; Tue, 21 Feb 2012 20:56:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202212056.q1LKu31R018830@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 20:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231979 - in stable/9/sys: amd64/acpica amd64/amd64 amd64/ia32 amd64/include compat/ia32 conf crypto/aesni crypto/via dev/random i386/i386 i386/include i386/isa pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 20:56:03 -0000 Author: kib Date: Tue Feb 21 20:56:03 2012 New Revision: 231979 URL: http://svn.freebsd.org/changeset/base/231979 Log: MFC r230426: Add support for the extended FPU states on amd64, both for native 64bit and 32bit ABIs. As a side-effect, it enables AVX on capable CPUs. MFC r230765: Synchronize the struct sigcontext definitions on x86 with mcontext_t. Added: stable/9/sys/amd64/amd64/ptrace_machdep.c - copied unchanged from r230426, head/sys/amd64/amd64/ptrace_machdep.c Modified: stable/9/sys/amd64/acpica/acpi_switch.S stable/9/sys/amd64/acpica/acpi_wakecode.S stable/9/sys/amd64/acpica/acpi_wakeup.c stable/9/sys/amd64/amd64/cpu_switch.S stable/9/sys/amd64/amd64/fpu.c stable/9/sys/amd64/amd64/genassym.c stable/9/sys/amd64/amd64/initcpu.c stable/9/sys/amd64/amd64/machdep.c stable/9/sys/amd64/amd64/mp_machdep.c stable/9/sys/amd64/amd64/sys_machdep.c stable/9/sys/amd64/amd64/trap.c stable/9/sys/amd64/amd64/vm_machdep.c stable/9/sys/amd64/ia32/ia32_reg.c stable/9/sys/amd64/ia32/ia32_signal.c stable/9/sys/amd64/include/fpu.h stable/9/sys/amd64/include/frame.h stable/9/sys/amd64/include/md_var.h stable/9/sys/amd64/include/pcb.h stable/9/sys/amd64/include/ptrace.h stable/9/sys/amd64/include/signal.h stable/9/sys/amd64/include/sysarch.h stable/9/sys/amd64/include/ucontext.h stable/9/sys/compat/ia32/ia32_signal.h stable/9/sys/conf/files.amd64 stable/9/sys/crypto/aesni/aesni.c stable/9/sys/crypto/aesni/aesni.h stable/9/sys/crypto/aesni/aesni_wrap.c stable/9/sys/crypto/via/padlock.c stable/9/sys/crypto/via/padlock.h stable/9/sys/crypto/via/padlock_cipher.c stable/9/sys/crypto/via/padlock_hash.c stable/9/sys/dev/random/nehemiah.c stable/9/sys/i386/i386/machdep.c stable/9/sys/i386/include/npx.h stable/9/sys/i386/include/ptrace.h stable/9/sys/i386/include/signal.h stable/9/sys/i386/include/sysarch.h stable/9/sys/i386/include/ucontext.h stable/9/sys/i386/isa/npx.c stable/9/sys/pc98/pc98/machdep.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_switch.S ============================================================================== --- stable/9/sys/amd64/acpica/acpi_switch.S Tue Feb 21 20:55:43 2012 (r231978) +++ stable/9/sys/amd64/acpica/acpi_switch.S Tue Feb 21 20:56:03 2012 (r231979) @@ -146,11 +146,22 @@ ENTRY(acpi_restorecpu) /* Restore FPU state. */ fninit - fxrstor PCB_USERFPU(%rdi) + movq WAKEUP_CTX(fpusave),%rdi + cmpl $0,use_xsave + jne 1f + fxrstor (%rdi) + jmp 2f +1: movl xsave_mask,%eax + movl xsave_mask+4,%edx +/* xrstor (%rdi) */ + .byte 0x0f,0xae,0x2f +2: /* Reload CR0. */ movq %rcx, %cr0 + movq WAKEUP_CTX(pcb),%rdi + /* Restore return address. */ movq PCB_RIP(%rdi), %rax movq %rax, (%rsp) Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakecode.S Tue Feb 21 20:55:43 2012 (r231978) +++ stable/9/sys/amd64/acpica/acpi_wakecode.S Tue Feb 21 20:56:03 2012 (r231979) @@ -270,6 +270,8 @@ wakeup_pcb: wakeup_gdt: .word 0 .quad 0 +wakeup_fpusave: + .quad 0 ALIGN_DATA wakeup_efer: Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakeup.c Tue Feb 21 20:55:43 2012 (r231978) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Tue Feb 21 20:56:03 2012 (r231979) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef SMP #include @@ -67,8 +68,10 @@ extern int acpi_reset_video; #ifdef SMP extern struct pcb **susppcbs; +extern void **suspfpusave; #else static struct pcb **susppcbs; +static void **suspfpusave; #endif int acpi_restorecpu(vm_offset_t, struct pcb *); @@ -105,6 +108,7 @@ acpi_wakeup_ap(struct acpi_softc *sc, in int ms; WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[cpu]); + WAKECODE_FIXUP(wakeup_fpusave, void *, suspfpusave[cpu]); WAKECODE_FIXUP(wakeup_gdt, uint16_t, susppcbs[cpu]->pcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, susppcbs[cpu]->pcb_gdt.rd_base); @@ -244,6 +248,7 @@ acpi_sleep_machdep(struct acpi_softc *sc load_cr3(KPML4phys); if (savectx(susppcbs[0])) { + ctx_fpusave(suspfpusave[0]); #ifdef SMP if (!CPU_EMPTY(&wakeup_cpus) && suspend_cpus(wakeup_cpus) == 0) { @@ -256,6 +261,7 @@ acpi_sleep_machdep(struct acpi_softc *sc WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]); + WAKECODE_FIXUP(wakeup_fpusave, void *, suspfpusave[0]); WAKECODE_FIXUP(wakeup_gdt, uint16_t, susppcbs[0]->pcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, @@ -333,8 +339,11 @@ acpi_alloc_wakeup_handler(void) return (NULL); } susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK); - for (i = 0; i < mp_ncpus; i++) + suspfpusave = malloc(mp_ncpus * sizeof(void *), M_DEVBUF, M_WAITOK); + for (i = 0; i < mp_ncpus; i++) { susppcbs[i] = malloc(sizeof(**susppcbs), M_DEVBUF, M_WAITOK); + suspfpusave[i] = alloc_fpusave(M_WAITOK); + } return (wakeaddr); } Modified: stable/9/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/9/sys/amd64/amd64/cpu_switch.S Tue Feb 21 20:55:43 2012 (r231978) +++ stable/9/sys/amd64/amd64/cpu_switch.S Tue Feb 21 20:56:03 2012 (r231979) @@ -112,16 +112,25 @@ done_store_dr: /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) - jne 1f + jne 3f movq PCB_SAVEFPU(%r8),%r8 clts + cmpl $0,use_xsave + jne 1f fxsave (%r8) - smsw %ax + jmp 2f +1: movq %rdx,%rcx + movl xsave_mask,%eax + movl xsave_mask+4,%edx +/* xsave (%r8) */ + .byte 0x41,0x0f,0xae,0x20 + movq %rcx,%rdx +2: smsw %ax orb $CR0_TS,%al lmsw %ax xorl %eax,%eax movq %rax,PCPU(FPCURTHREAD) -1: +3: /* Save is done. Now fire up new thread. Leave old vmspace. */ movq TD_PCB(%rsi),%r8 @@ -354,10 +363,19 @@ ENTRY(savectx) sldt PCB_LDT(%rdi) str PCB_TR(%rdi) - clts - fxsave PCB_USERFPU(%rdi) - movq %rsi,%cr0 /* The previous %cr0 is saved in %rsi. */ +2: movq %rsi,%cr0 /* The previous %cr0 is saved in %rsi. */ movl $1,%eax ret END(savectx) + +/* + * Wrapper around fpusave to care about TS0_CR. + */ +ENTRY(ctx_fpusave) + movq %cr0,%rsi + clts + call fpusave + movq %rsi,%cr0 + ret +END(ctx_fpusave) Modified: stable/9/sys/amd64/amd64/fpu.c ============================================================================== --- stable/9/sys/amd64/amd64/fpu.c Tue Feb 21 20:55:43 2012 (r231978) +++ stable/9/sys/amd64/amd64/fpu.c Tue Feb 21 20:56:03 2012 (r231979) @@ -134,19 +134,97 @@ void xsetbv(uint32_t reg, uint64_t val); #define GET_FPU_CW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_cw) #define GET_FPU_SW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_sw) -typedef u_char bool_t; +CTASSERT(sizeof(struct savefpu) == 512); +CTASSERT(sizeof(struct xstate_hdr) == 64); +CTASSERT(sizeof(struct savefpu_ymm) == 832); + +/* + * This requirement is to make it easier for asm code to calculate + * offset of the fpu save area from the pcb address. FPU save area + * must by 64-bytes aligned. + */ +CTASSERT(sizeof(struct pcb) % XSAVE_AREA_ALIGN == 0); static void fpu_clean_state(void); SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, NULL, 1, "Floating point instructions executed in hardware"); -static struct savefpu fpu_initialstate; +int use_xsave; /* non-static for cpu_switch.S */ +uint64_t xsave_mask; /* the same */ +static struct savefpu *fpu_initialstate; + +void +fpusave(void *addr) +{ + + if (use_xsave) + xsave((char *)addr, xsave_mask); + else + fxsave((char *)addr); +} + +static void +fpurestore(void *addr) +{ + + if (use_xsave) + xrstor((char *)addr, xsave_mask); + else + fxrstor((char *)addr); +} + +/* + * Enable XSAVE if supported and allowed by user. + * Calculate the xsave_mask. + */ +static void +fpuinit_bsp1(void) +{ + u_int cp[4]; + uint64_t xsave_mask_user; + + if ((cpu_feature2 & CPUID2_XSAVE) != 0) { + use_xsave = 1; + TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); + } + if (!use_xsave) + return; + + cpuid_count(0xd, 0x0, cp); + xsave_mask = XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; + if ((cp[0] & xsave_mask) != xsave_mask) + panic("CPU0 does not support X87 or SSE: %x", cp[0]); + xsave_mask = ((uint64_t)cp[3] << 32) | cp[0]; + xsave_mask_user = xsave_mask; + TUNABLE_ULONG_FETCH("hw.xsave_mask", &xsave_mask_user); + xsave_mask_user |= XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; + xsave_mask &= xsave_mask_user; +} /* - * Initialize the floating point unit. On the boot CPU we generate a - * clean state that is used to initialize the floating point unit when - * it is first used by a process. + * Calculate the fpu save area size. + */ +static void +fpuinit_bsp2(void) +{ + u_int cp[4]; + + if (use_xsave) { + cpuid_count(0xd, 0x0, cp); + cpu_max_ext_state_size = cp[1]; + + /* + * Reload the cpu_feature2, since we enabled OSXSAVE. + */ + do_cpuid(1, cp); + cpu_feature2 = cp[2]; + } else + cpu_max_ext_state_size = sizeof(struct savefpu); +} + +/* + * Initialize the floating point unit. */ void fpuinit(void) @@ -155,6 +233,20 @@ fpuinit(void) u_int mxcsr; u_short control; + if (IS_BSP()) + fpuinit_bsp1(); + + if (use_xsave) { + load_cr4(rcr4() | CR4_XSAVE); + xsetbv(XCR0, xsave_mask); + } + + /* + * XCR0 shall be set up before CPU can report the save area size. + */ + if (IS_BSP()) + fpuinit_bsp2(); + /* * It is too early for critical_enter() to work on AP. */ @@ -165,20 +257,46 @@ fpuinit(void) fldcw(control); mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); - if (PCPU_GET(cpuid) == 0) { - fxsave(&fpu_initialstate); - if (fpu_initialstate.sv_env.en_mxcsr_mask) - cpu_mxcsr_mask = fpu_initialstate.sv_env.en_mxcsr_mask; - else - cpu_mxcsr_mask = 0xFFBF; - bzero(fpu_initialstate.sv_fp, sizeof(fpu_initialstate.sv_fp)); - bzero(fpu_initialstate.sv_xmm, sizeof(fpu_initialstate.sv_xmm)); - } start_emulating(); intr_restore(saveintr); } /* + * On the boot CPU we generate a clean state that is used to + * initialize the floating point unit when it is first used by a + * process. + */ +static void +fpuinitstate(void *arg __unused) +{ + register_t saveintr; + + fpu_initialstate = malloc(cpu_max_ext_state_size, M_DEVBUF, + M_WAITOK | M_ZERO); + saveintr = intr_disable(); + stop_emulating(); + + fpusave(fpu_initialstate); + if (fpu_initialstate->sv_env.en_mxcsr_mask) + cpu_mxcsr_mask = fpu_initialstate->sv_env.en_mxcsr_mask; + else + cpu_mxcsr_mask = 0xFFBF; + + /* + * The fninit instruction does not modify XMM registers. The + * fpusave call dumped the garbage contained in the registers + * after reset to the initial state saved. Clear XMM + * registers file image to make the startup program state and + * signal handler XMM register content predictable. + */ + bzero(&fpu_initialstate->sv_xmm[0], sizeof(struct xmmacc)); + + start_emulating(); + intr_restore(saveintr); +} +SYSINIT(fpuinitstate, SI_SUB_DRIVERS, SI_ORDER_ANY, fpuinitstate, NULL); + +/* * Free coprocessor (if we have it). */ void @@ -188,7 +306,7 @@ fpuexit(struct thread *td) critical_enter(); if (curthread == PCPU_GET(fpcurthread)) { stop_emulating(); - fxsave(PCPU_GET(curpcb)->pcb_save); + fpusave(PCPU_GET(curpcb)->pcb_save); start_emulating(); PCPU_SET(fpcurthread, 0); } @@ -461,7 +579,7 @@ fpudna(void) * the PCB doesn't contain a clean FPU state. Explicitly * load an initial state. */ - fxrstor(&fpu_initialstate); + fpurestore(fpu_initialstate); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) fldcw(pcb->pcb_initial_fpucw); if (PCB_USER_FPU(pcb)) @@ -470,7 +588,7 @@ fpudna(void) else set_pcb_flags(pcb, PCB_FPUINITDONE); } else - fxrstor(pcb->pcb_save); + fpurestore(pcb->pcb_save); critical_exit(); } @@ -499,15 +617,16 @@ fpugetregs(struct thread *td) pcb = td->td_pcb; if ((pcb->pcb_flags & PCB_USERFPUINITDONE) == 0) { - bcopy(&fpu_initialstate, &pcb->pcb_user_save, - sizeof(fpu_initialstate)); - pcb->pcb_user_save.sv_env.en_cw = pcb->pcb_initial_fpucw; + bcopy(fpu_initialstate, get_pcb_user_save_pcb(pcb), + cpu_max_ext_state_size); + get_pcb_user_save_pcb(pcb)->sv_env.en_cw = + pcb->pcb_initial_fpucw; fpuuserinited(td); return (_MC_FPOWNED_PCB); } critical_enter(); if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { - fxsave(&pcb->pcb_user_save); + fpusave(get_pcb_user_save_pcb(pcb)); critical_exit(); return (_MC_FPOWNED_FPU); } else { @@ -529,25 +648,78 @@ fpuuserinited(struct thread *td) set_pcb_flags(pcb, PCB_FPUINITDONE); } +int +fpusetxstate(struct thread *td, char *xfpustate, size_t xfpustate_size) +{ + struct xstate_hdr *hdr, *ehdr; + size_t len, max_len; + uint64_t bv; + + /* XXXKIB should we clear all extended state in xstate_bv instead ? */ + if (xfpustate == NULL) + return (0); + if (!use_xsave) + return (EOPNOTSUPP); + + len = xfpustate_size; + if (len < sizeof(struct xstate_hdr)) + return (EINVAL); + max_len = cpu_max_ext_state_size - sizeof(struct savefpu); + if (len > max_len) + return (EINVAL); + + ehdr = (struct xstate_hdr *)xfpustate; + bv = ehdr->xstate_bv; + + /* + * Avoid #gp. + */ + if (bv & ~xsave_mask) + return (EINVAL); + if ((bv & (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE)) != + (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE)) + return (EINVAL); + + hdr = (struct xstate_hdr *)(get_pcb_user_save_td(td) + 1); + + hdr->xstate_bv = bv; + bcopy(xfpustate + sizeof(struct xstate_hdr), + (char *)(hdr + 1), len - sizeof(struct xstate_hdr)); + + return (0); +} + /* * Set the state of the FPU. */ -void -fpusetregs(struct thread *td, struct savefpu *addr) +int +fpusetregs(struct thread *td, struct savefpu *addr, char *xfpustate, + size_t xfpustate_size) { struct pcb *pcb; + int error; pcb = td->td_pcb; critical_enter(); if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { - fxrstor(addr); + error = fpusetxstate(td, xfpustate, xfpustate_size); + if (error != 0) { + critical_exit(); + return (error); + } + bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); + fpurestore(get_pcb_user_save_td(td)); critical_exit(); set_pcb_flags(pcb, PCB_FPUINITDONE | PCB_USERFPUINITDONE); } else { critical_exit(); - bcopy(addr, &td->td_pcb->pcb_user_save, sizeof(*addr)); + error = fpusetxstate(td, xfpustate, xfpustate_size); + if (error != 0) + return (error); + bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); fpuuserinited(td); } + return (0); } /* @@ -637,20 +809,62 @@ static devclass_t fpupnp_devclass; DRIVER_MODULE(fpupnp, acpi, fpupnp_driver, fpupnp_devclass, 0, 0); #endif /* DEV_ISA */ +static MALLOC_DEFINE(M_FPUKERN_CTX, "fpukern_ctx", + "Kernel contexts for FPU state"); + +#define FPU_KERN_CTX_FPUINITDONE 0x01 + +struct fpu_kern_ctx { + struct savefpu *prev; + uint32_t flags; + char hwstate1[]; +}; + +struct fpu_kern_ctx * +fpu_kern_alloc_ctx(u_int flags) +{ + struct fpu_kern_ctx *res; + size_t sz; + + sz = sizeof(struct fpu_kern_ctx) + XSAVE_AREA_ALIGN + + cpu_max_ext_state_size; + res = malloc(sz, M_FPUKERN_CTX, ((flags & FPU_KERN_NOWAIT) ? + M_NOWAIT : M_WAITOK) | M_ZERO); + return (res); +} + +void +fpu_kern_free_ctx(struct fpu_kern_ctx *ctx) +{ + + /* XXXKIB clear the memory ? */ + free(ctx, M_FPUKERN_CTX); +} + +static struct savefpu * +fpu_kern_ctx_savefpu(struct fpu_kern_ctx *ctx) +{ + vm_offset_t p; + + p = (vm_offset_t)&ctx->hwstate1; + p = roundup2(p, XSAVE_AREA_ALIGN); + return ((struct savefpu *)p); +} + int fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags) { struct pcb *pcb; pcb = td->td_pcb; - KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == &pcb->pcb_user_save, - ("mangled pcb_save")); + KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == + get_pcb_user_save_pcb(pcb), ("mangled pcb_save")); ctx->flags = 0; if ((pcb->pcb_flags & PCB_FPUINITDONE) != 0) ctx->flags |= FPU_KERN_CTX_FPUINITDONE; fpuexit(td); ctx->prev = pcb->pcb_save; - pcb->pcb_save = &ctx->hwstate; + pcb->pcb_save = fpu_kern_ctx_savefpu(ctx); set_pcb_flags(pcb, PCB_KERNFPU); clear_pcb_flags(pcb, PCB_FPUINITDONE); return (0); @@ -667,7 +881,7 @@ fpu_kern_leave(struct thread *td, struct fpudrop(); critical_exit(); pcb->pcb_save = ctx->prev; - if (pcb->pcb_save == &pcb->pcb_user_save) { + if (pcb->pcb_save == get_pcb_user_save_pcb(pcb)) { if ((pcb->pcb_flags & PCB_USERFPUINITDONE) != 0) { set_pcb_flags(pcb, PCB_FPUINITDONE); clear_pcb_flags(pcb, PCB_KERNFPU); @@ -691,7 +905,8 @@ fpu_kern_thread(u_int flags) pcb = PCPU_GET(curpcb); KASSERT((curthread->td_pflags & TDP_KTHREAD) != 0, ("Only kthread may use fpu_kern_thread")); - KASSERT(pcb->pcb_save == &pcb->pcb_user_save, ("mangled pcb_save")); + KASSERT(pcb->pcb_save == get_pcb_user_save_pcb(pcb), + ("mangled pcb_save")); KASSERT(PCB_USER_FPU(pcb), ("recursive call")); set_pcb_flags(pcb, PCB_KERNFPU); Modified: stable/9/sys/amd64/amd64/genassym.c ============================================================================== --- stable/9/sys/amd64/amd64/genassym.c Tue Feb 21 20:55:43 2012 (r231978) +++ stable/9/sys/amd64/amd64/genassym.c Tue Feb 21 20:56:03 2012 (r231979) @@ -156,7 +156,7 @@ ASSYM(PCB_GS32SD, offsetof(struct pcb, p ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp)); ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save)); ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu)); -ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save)); +ASSYM(PCB_USERFPU, sizeof(struct pcb)); ASSYM(PCB_SIZE, sizeof(struct pcb)); ASSYM(PCB_FULL_IRET, PCB_FULL_IRET); ASSYM(PCB_DBREGS, PCB_DBREGS); Modified: stable/9/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/9/sys/amd64/amd64/initcpu.c Tue Feb 21 20:55:43 2012 (r231978) +++ stable/9/sys/amd64/amd64/initcpu.c Tue Feb 21 20:56:03 2012 (r231979) @@ -72,6 +72,7 @@ u_int cpu_vendor_id; /* CPU vendor ID * u_int cpu_fxsr; /* SSE enabled */ u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ u_int cpu_clflush_line_size = 32; +u_int cpu_max_ext_state_size; SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: stable/9/sys/amd64/amd64/machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/machdep.c Tue Feb 21 20:55:43 2012 (r231978) +++ stable/9/sys/amd64/amd64/machdep.c Tue Feb 21 20:56:03 2012 (r231979) @@ -154,8 +154,10 @@ extern void panicifcpuunsupported(void); #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) static void cpu_startup(void *); -static void get_fpcontext(struct thread *td, mcontext_t *mcp); -static int set_fpcontext(struct thread *td, const mcontext_t *mcp); +static void get_fpcontext(struct thread *td, mcontext_t *mcp, + char *xfpusave, size_t xfpusave_len); +static int set_fpcontext(struct thread *td, const mcontext_t *mcp, + char *xfpustate, size_t xfpustate_len); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); /* @@ -315,6 +317,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, struct sigacts *psp; char *sp; struct trapframe *regs; + char *xfpusave; + size_t xfpusave_len; int sig; int oonstack; @@ -328,6 +332,14 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs = td->td_frame; oonstack = sigonstack(regs->tf_rsp); + if (cpu_max_ext_state_size > sizeof(struct savefpu) && use_xsave) { + xfpusave_len = cpu_max_ext_state_size - sizeof(struct savefpu); + xfpusave = __builtin_alloca(xfpusave_len); + } else { + xfpusave_len = 0; + xfpusave = NULL; + } + /* Save user context. */ bzero(&sf, sizeof(sf)); sf.sf_uc.uc_sigmask = *mask; @@ -337,7 +349,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; bcopy(regs, &sf.sf_uc.uc_mcontext.mc_rdi, sizeof(*regs)); sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ - get_fpcontext(td, &sf.sf_uc.uc_mcontext); + get_fpcontext(td, &sf.sf_uc.uc_mcontext, xfpusave, xfpusave_len); fpstate_drop(td); sf.sf_uc.uc_mcontext.mc_fsbase = pcb->pcb_fsbase; sf.sf_uc.uc_mcontext.mc_gsbase = pcb->pcb_gsbase; @@ -348,13 +360,18 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { - sp = td->td_sigstk.ss_sp + - td->td_sigstk.ss_size - sizeof(struct sigframe); + sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size; #if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else - sp = (char *)regs->tf_rsp - sizeof(struct sigframe) - 128; + sp = (char *)regs->tf_rsp - 128; + if (xfpusave != NULL) { + sp -= xfpusave_len; + sp = (char *)((unsigned long)sp & ~0x3Ful); + sf.sf_uc.uc_mcontext.mc_xfpustate = (register_t)sp; + } + sp -= sizeof(struct sigframe); /* Align to 16 bytes. */ sfp = (struct sigframe *)((unsigned long)sp & ~0xFul); @@ -387,7 +404,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* * Copy the sigframe out to the user's stack. */ - if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { + if (copyout(&sf, sfp, sizeof(*sfp)) != 0 || + (xfpusave != NULL && copyout(xfpusave, + (void *)sf.sf_uc.uc_mcontext.mc_xfpustate, xfpusave_len) + != 0)) { #ifdef DEBUG printf("process %ld has trashed its stack\n", (long)p->p_pid); #endif @@ -432,6 +452,8 @@ sys_sigreturn(td, uap) struct proc *p; struct trapframe *regs; ucontext_t *ucp; + char *xfpustate; + size_t xfpustate_len; long rflags; int cs, error, ret; ksiginfo_t ksi; @@ -490,7 +512,28 @@ sys_sigreturn(td, uap) return (EINVAL); } - ret = set_fpcontext(td, &ucp->uc_mcontext); + if ((uc.uc_mcontext.mc_flags & _MC_HASFPXSTATE) != 0) { + xfpustate_len = uc.uc_mcontext.mc_xfpustate_len; + if (xfpustate_len > cpu_max_ext_state_size - + sizeof(struct savefpu)) { + uprintf("pid %d (%s): sigreturn xfpusave_len = 0x%zx\n", + p->p_pid, td->td_name, xfpustate_len); + return (EINVAL); + } + xfpustate = __builtin_alloca(xfpustate_len); + error = copyin((const void *)uc.uc_mcontext.mc_xfpustate, + xfpustate, xfpustate_len); + if (error != 0) { + uprintf( + "pid %d (%s): sigreturn copying xfpustate failed\n", + p->p_pid, td->td_name); + return (error); + } + } else { + xfpustate = NULL; + xfpustate_len = 0; + } + ret = set_fpcontext(td, &ucp->uc_mcontext, xfpustate, xfpustate_len); if (ret != 0) { uprintf("pid %d (%s): sigreturn set_fpcontext err %d\n", p->p_pid, td->td_name, ret); @@ -1563,6 +1606,7 @@ hammer_time(u_int64_t modulep, u_int64_t int gsel_tss, x; struct pcpu *pc; struct nmi_pcpu *np; + struct xstate_hdr *xhdr; u_int64_t msr; char *env; size_t kstack0_sz; @@ -1572,7 +1616,6 @@ hammer_time(u_int64_t modulep, u_int64_t kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; bzero((void *)thread0.td_kstack, kstack0_sz); physfree += kstack0_sz; - thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1; /* * This may be done better later if it gets more high level @@ -1621,7 +1664,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree += DPCPU_SIZE; PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); - PCPU_SET(curpcb, thread0.td_pcb); PCPU_SET(tssp, &common_tss[0]); PCPU_SET(commontssp, &common_tss[0]); PCPU_SET(tss, (struct system_segment_descriptor *)&gdt[GPROC0_SEL]); @@ -1713,13 +1755,6 @@ hammer_time(u_int64_t modulep, u_int64_t initializecpu(); /* Initialize CPU registers */ initializecpucache(); - /* make an initial tss so cpu can get interrupt stack on syscall! */ - common_tss[0].tss_rsp0 = thread0.td_kstack + - kstack0_sz - sizeof(struct pcb); - /* Ensure the stack is aligned to 16 bytes */ - common_tss[0].tss_rsp0 &= ~0xFul; - PCPU_SET(rsp0, common_tss[0].tss_rsp0); - /* doublefault stack space, runs on ist1 */ common_tss[0].tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)]; @@ -1756,6 +1791,25 @@ hammer_time(u_int64_t modulep, u_int64_t msgbufinit(msgbufp, msgbufsize); fpuinit(); + /* + * Set up thread0 pcb after fpuinit calculated pcb + fpu save + * area size. Zero out the extended state header in fpu save + * area. + */ + thread0.td_pcb = get_pcb_td(&thread0); + bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size); + if (use_xsave) { + xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) + + 1); + xhdr->xstate_bv = xsave_mask; + } + /* make an initial tss so cpu can get interrupt stack on syscall! */ + common_tss[0].tss_rsp0 = (vm_offset_t)thread0.td_pcb; + /* Ensure the stack is aligned to 16 bytes */ + common_tss[0].tss_rsp0 &= ~0xFul; + PCPU_SET(rsp0, common_tss[0].tss_rsp0); + PCPU_SET(curpcb, thread0.td_pcb); + /* transfer to user mode */ _ucodesel = GSEL(GUCODE_SEL, SEL_UPL); @@ -2025,7 +2079,7 @@ fill_fpregs(struct thread *td, struct fp P_SHOULDSTOP(td->td_proc), ("not suspended thread %p", td)); fpugetregs(td); - fill_fpregs_xmm(&td->td_pcb->pcb_user_save, fpregs); + fill_fpregs_xmm(get_pcb_user_save_td(td), fpregs); return (0); } @@ -2034,7 +2088,7 @@ int set_fpregs(struct thread *td, struct fpreg *fpregs) { - set_fpregs_xmm(fpregs, &td->td_pcb->pcb_user_save); + set_fpregs_xmm(fpregs, get_pcb_user_save_td(td)); fpuuserinited(td); return (0); } @@ -2085,9 +2139,11 @@ get_mcontext(struct thread *td, mcontext mcp->mc_gs = tp->tf_gs; mcp->mc_flags = tp->tf_flags; mcp->mc_len = sizeof(*mcp); - get_fpcontext(td, mcp); + get_fpcontext(td, mcp, NULL, 0); mcp->mc_fsbase = pcb->pcb_fsbase; mcp->mc_gsbase = pcb->pcb_gsbase; + mcp->mc_xfpustate = 0; + mcp->mc_xfpustate_len = 0; bzero(mcp->mc_spare, sizeof(mcp->mc_spare)); return (0); } @@ -2103,6 +2159,7 @@ set_mcontext(struct thread *td, const mc { struct pcb *pcb; struct trapframe *tp; + char *xfpustate; long rflags; int ret; @@ -2113,7 +2170,18 @@ set_mcontext(struct thread *td, const mc return (EINVAL); rflags = (mcp->mc_rflags & PSL_USERCHANGE) | (tp->tf_rflags & ~PSL_USERCHANGE); - ret = set_fpcontext(td, mcp); + if (mcp->mc_flags & _MC_HASFPXSTATE) { + if (mcp->mc_xfpustate_len > cpu_max_ext_state_size - + sizeof(struct savefpu)) + return (EINVAL); + xfpustate = __builtin_alloca(mcp->mc_xfpustate_len); + ret = copyin((void *)mcp->mc_xfpustate, xfpustate, + mcp->mc_xfpustate_len); + if (ret != 0) + return (ret); + } else + xfpustate = NULL; + ret = set_fpcontext(td, mcp, xfpustate, mcp->mc_xfpustate_len); if (ret != 0) return (ret); tp->tf_r15 = mcp->mc_r15; @@ -2151,35 +2219,51 @@ set_mcontext(struct thread *td, const mc } static void -get_fpcontext(struct thread *td, mcontext_t *mcp) +get_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpusave, + size_t xfpusave_len) { + size_t max_len, len; mcp->mc_ownedfp = fpugetregs(td); - bcopy(&td->td_pcb->pcb_user_save, &mcp->mc_fpstate, + bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); mcp->mc_fpformat = fpuformat(); + if (!use_xsave || xfpusave_len == 0) + return; + max_len = cpu_max_ext_state_size - sizeof(struct savefpu); + len = xfpusave_len; + if (len > max_len) { + len = max_len; + bzero(xfpusave + max_len, len - max_len); + } + mcp->mc_flags |= _MC_HASFPXSTATE; + mcp->mc_xfpustate_len = len; + bcopy(get_pcb_user_save_td(td) + 1, xfpusave, len); } static int -set_fpcontext(struct thread *td, const mcontext_t *mcp) +set_fpcontext(struct thread *td, const mcontext_t *mcp, char *xfpustate, + size_t xfpustate_len) { struct savefpu *fpstate; + int error; if (mcp->mc_fpformat == _MC_FPFMT_NODEV) return (0); else if (mcp->mc_fpformat != _MC_FPFMT_XMM) return (EINVAL); - else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE) + else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE) { /* We don't care what state is left in the FPU or PCB. */ fpstate_drop(td); - else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || + error = 0; + } else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || mcp->mc_ownedfp == _MC_FPOWNED_PCB) { fpstate = (struct savefpu *)&mcp->mc_fpstate; fpstate->sv_env.en_mxcsr &= cpu_mxcsr_mask; - fpusetregs(td, fpstate); + error = fpusetregs(td, fpstate, xfpustate, xfpustate_len); } else return (EINVAL); - return (0); + return (error); } void Modified: stable/9/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/mp_machdep.c Tue Feb 21 20:55:43 2012 (r231978) +++ stable/9/sys/amd64/amd64/mp_machdep.c Tue Feb 21 20:56:03 2012 (r231979) @@ -99,7 +99,8 @@ char *nmi_stack; void *dpcpu; struct pcb stoppcbs[MAXCPU]; -struct pcb **susppcbs = NULL; +struct pcb **susppcbs; +void **suspfpusave; /* Variables needed for SMP tlb shootdown. */ vm_offset_t smp_tlb_addr1; @@ -1422,6 +1423,7 @@ cpususpend_handler(void) cr3 = rcr3(); if (savectx(susppcbs[cpu])) { + ctx_fpusave(suspfpusave[cpu]); wbinvd(); CPU_SET_ATOMIC(cpu, &stopped_cpus); } else { Copied: stable/9/sys/amd64/amd64/ptrace_machdep.c (from r230426, head/sys/amd64/amd64/ptrace_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/amd64/amd64/ptrace_machdep.c Tue Feb 21 20:56:03 2012 (r231979, copy of r230426, head/sys/amd64/amd64/ptrace_machdep.c) @@ -0,0 +1,141 @@ +/*- + * Copyright (c) 2011 Konstantin Belousov + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_compat.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +static int +cpu_ptrace_xstate(struct thread *td, int req, void *addr, int data) +{ + char *savefpu; + int error; + + if (!use_xsave) + return (EOPNOTSUPP); + + switch (req) { + case PT_GETXSTATE: + savefpu = (char *)(get_pcb_user_save_td(td) + 1); + error = copyout(savefpu, addr, + cpu_max_ext_state_size - sizeof(struct savefpu)); + break; + + case PT_SETXSTATE: + if (data > cpu_max_ext_state_size - sizeof(struct savefpu)) { + error = EINVAL; + break; + } + savefpu = malloc(data, M_TEMP, M_WAITOK); + error = copyin(addr, savefpu, data); + if (error == 0) + error = fpusetxstate(td, savefpu, data); + free(savefpu, M_TEMP); + break; + + default: + error = EINVAL; + break; + } + + return (error); +} + +#ifdef COMPAT_FREEBSD32 +#define PT_I386_GETXMMREGS (PT_FIRSTMACH + 0) +#define PT_I386_SETXMMREGS (PT_FIRSTMACH + 1) +#define PT_I386_GETXSTATE (PT_FIRSTMACH + 2) +#define PT_I386_SETXSTATE (PT_FIRSTMACH + 3) + +static int +cpu32_ptrace(struct thread *td, int req, void *addr, int data) +{ + struct savefpu *fpstate; + int error; + + switch (req) { + case PT_I386_GETXMMREGS: + error = copyout(get_pcb_user_save_td(td), addr, + sizeof(*fpstate)); + break; + + case PT_I386_SETXMMREGS: + fpstate = get_pcb_user_save_td(td); + error = copyin(addr, fpstate, sizeof(*fpstate)); + fpstate->sv_env.en_mxcsr &= cpu_mxcsr_mask; + break; + + case PT_I386_GETXSTATE: + error = cpu_ptrace_xstate(td, PT_GETXSTATE, addr, data); + break; + + case PT_I386_SETXSTATE: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 20:59:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8F75106566B; Tue, 21 Feb 2012 20:59:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C31BF8FC12; Tue, 21 Feb 2012 20:59:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LKxnVp019393; Tue, 21 Feb 2012 20:59:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LKxnFP019391; Tue, 21 Feb 2012 20:59:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202212059.q1LKxnFP019391@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 20:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231980 - stable/9/gnu/usr.bin/gdb/kgdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 20:59:50 -0000 Author: kib Date: Tue Feb 21 20:59:49 2012 New Revision: 231980 URL: http://svn.freebsd.org/changeset/base/231980 Log: MFC r230427: Adopt to new layout of struct pcb. Modified: stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Directory Properties: stable/9/gnu/usr.bin/gdb/kgdb/ (props changed) Modified: stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Tue Feb 21 20:56:03 2012 (r231979) +++ stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Tue Feb 21 20:59:49 2012 (r231980) @@ -66,7 +66,7 @@ kgdb_trgt_fetch_registers(int regno __un supply_register(AMD64_R8_REGNUM + 6, (char *)&pcb.pcb_r14); supply_register(AMD64_R15_REGNUM, (char *)&pcb.pcb_r15); supply_register(AMD64_RIP_REGNUM, (char *)&pcb.pcb_rip); - amd64_supply_fxsave(current_regcache, -1, &pcb.pcb_user_save); + amd64_supply_fxsave(current_regcache, -1, (struct fpusave *)(&pcb + 1)); } void From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 21:18:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA0B1106566C; Tue, 21 Feb 2012 21:18:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C48DC8FC12; Tue, 21 Feb 2012 21:18:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LLIxca020209; Tue, 21 Feb 2012 21:18:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LLIx8R020188; Tue, 21 Feb 2012 21:18:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202212118.q1LLIx8R020188@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 21:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231981 - in stable/9: lib/libc/amd64/gen lib/libc/arm/gen lib/libc/gen lib/libc/i386/gen lib/libc/ia64/gen lib/libc/mips/gen lib/libc/powerpc/gen lib/libc/powerpc64/gen lib/libc/sparc6... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 21:19:00 -0000 Author: kib Date: Tue Feb 21 21:18:59 2012 New Revision: 231981 URL: http://svn.freebsd.org/changeset/base/231981 Log: MFC r230429: Add API for obtaining extended machine context states that cannot be fit into existing mcontext_t. On i386 and amd64 do return the extended FPU states using getcontextx(3). For other architectures, getcontextx(3) returns the same information as getcontext(2). MFC r230864: Make the sys/ucontext.h self-contained by changing the return type of __getcontextx_size(3) from size_t to int. Added: stable/9/lib/libc/amd64/gen/getcontextx.c - copied, changed from r230429, head/lib/libc/amd64/gen/getcontextx.c stable/9/lib/libc/arm/gen/getcontextx.c - copied, changed from r230429, head/lib/libc/arm/gen/getcontextx.c stable/9/lib/libc/i386/gen/getcontextx.c - copied, changed from r230429, head/lib/libc/i386/gen/getcontextx.c stable/9/lib/libc/ia64/gen/getcontextx.c - copied, changed from r230429, head/lib/libc/ia64/gen/getcontextx.c stable/9/lib/libc/mips/gen/getcontextx.c - copied, changed from r230429, head/lib/libc/mips/gen/getcontextx.c stable/9/lib/libc/powerpc/gen/getcontextx.c - copied, changed from r230429, head/lib/libc/powerpc/gen/getcontextx.c stable/9/lib/libc/powerpc64/gen/getcontextx.c - copied, changed from r230429, head/lib/libc/powerpc64/gen/getcontextx.c stable/9/lib/libc/sparc64/gen/getcontextx.c - copied, changed from r230429, head/lib/libc/sparc64/gen/getcontextx.c Modified: stable/9/lib/libc/amd64/gen/Makefile.inc stable/9/lib/libc/arm/gen/Makefile.inc stable/9/lib/libc/gen/Symbol.map stable/9/lib/libc/gen/getcontext.3 stable/9/lib/libc/gen/ucontext.3 stable/9/lib/libc/i386/gen/Makefile.inc stable/9/lib/libc/ia64/gen/Makefile.inc stable/9/lib/libc/mips/gen/Makefile.inc stable/9/lib/libc/powerpc/gen/Makefile.inc stable/9/lib/libc/powerpc64/gen/Makefile.inc stable/9/lib/libc/sparc64/gen/Makefile.inc stable/9/sys/sys/ucontext.h Directory Properties: stable/9/lib/libc/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/lib/libc/amd64/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/amd64/gen/Makefile.inc Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/amd64/gen/Makefile.inc Tue Feb 21 21:18:59 2012 (r231981) @@ -2,7 +2,7 @@ # $FreeBSD$ SRCS+= _setjmp.S _set_tp.c rfork_thread.S setjmp.S sigsetjmp.S \ - fabs.S modf.S \ + fabs.S getcontextx.c modf.S \ infinity.c ldexp.c makecontext.c signalcontext.c \ flt_rounds.c fpgetmask.c fpsetmask.c fpgetprec.c fpsetprec.c \ fpgetround.c fpsetround.c fpgetsticky.c Copied and modified: stable/9/lib/libc/amd64/gen/getcontextx.c (from r230429, head/lib/libc/amd64/gen/getcontextx.c) ============================================================================== --- head/lib/libc/amd64/gen/getcontextx.c Sat Jan 21 18:00:28 2012 (r230429, copy source) +++ stable/9/lib/libc/amd64/gen/getcontextx.c Tue Feb 21 21:18:59 2012 (r231981) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); static int xstate_sz = -1; -size_t +int __getcontextx_size(void) { u_int p[4]; Modified: stable/9/lib/libc/arm/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/arm/gen/Makefile.inc Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/arm/gen/Makefile.inc Tue Feb 21 21:18:59 2012 (r231981) @@ -2,5 +2,5 @@ # $FreeBSD$ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ - infinity.c ldexp.c makecontext.c modf.c \ + getcontextx.c infinity.c ldexp.c makecontext.c modf.c \ setjmp.S signalcontext.c sigsetjmp.S divsi3.S Copied and modified: stable/9/lib/libc/arm/gen/getcontextx.c (from r230429, head/lib/libc/arm/gen/getcontextx.c) ============================================================================== --- head/lib/libc/arm/gen/getcontextx.c Sat Jan 21 18:00:28 2012 (r230429, copy source) +++ stable/9/lib/libc/arm/gen/getcontextx.c Tue Feb 21 21:18:59 2012 (r231981) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include -size_t +int __getcontextx_size(void) { Modified: stable/9/lib/libc/gen/Symbol.map ============================================================================== --- stable/9/lib/libc/gen/Symbol.map Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/gen/Symbol.map Tue Feb 21 21:18:59 2012 (r231981) @@ -383,6 +383,7 @@ FBSD_1.2 { FBSD_1.3 { fdlopen; __FreeBSD_libc_enter_restricted_mode; + getcontextx; }; FBSDprivate_1.0 { @@ -506,4 +507,6 @@ FBSDprivate_1.0 { __elf_aux_vector; __pthread_map_stacks_exec; + __fillcontextx; + __getcontextx_size; }; Modified: stable/9/lib/libc/gen/getcontext.3 ============================================================================== --- stable/9/lib/libc/gen/getcontext.3 Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/gen/getcontext.3 Tue Feb 21 21:18:59 2012 (r231981) @@ -35,11 +35,11 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2002 +.Dd December 26, 2011 .Dt GETCONTEXT 3 .Os .Sh NAME -.Nm getcontext , setcontext +.Nm getcontext , getcontextx , setcontext .Nd get and set user thread context .Sh LIBRARY .Lb libc @@ -59,6 +59,20 @@ This saved context may then later be res .Fn setcontext . .Pp The +.Fn getcontextx +function saves the current execution context in the newly allocated structure +.Vt ucontext_t , +which is returned on success. +If architecture defines additional CPU states that can be stored in extended +blocks referenced from the +.Vt ucontext_t , +the memory for them may be allocated and their context also stored. +Memory returned by +.Fn getcontextx +function shall be freed using +.Fn free 3 . +.Pp +The .Fn setcontext function makes a previously saved thread context the current thread context, i.e., @@ -109,11 +123,24 @@ If successful, returns zero and .Fn setcontext does not return; otherwise \-1 is returned. +The +.Fn getcontextx +returns pointer to the allocated and initialized context on success, and +.Va NULL +on failure. .Sh ERRORS No errors are defined for .Fn getcontext or .Fn setcontext . +The +.Fn getcontextx +may return the following errors in +.Va errno : +.Bl -tag -width Er +.It Bq Er ENOMEM +No memory was available to allocate for the context or some extended state. +.El .Sh SEE ALSO .Xr sigaction 2 , .Xr sigaltstack 2 , Modified: stable/9/lib/libc/gen/ucontext.3 ============================================================================== --- stable/9/lib/libc/gen/ucontext.3 Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/gen/ucontext.3 Tue Feb 21 21:18:59 2012 (r231981) @@ -92,6 +92,9 @@ structures: .Ft int .Fn getcontext "ucontext_t *" ; .It +.Ft "ucontext_t *" +.Fn getcontextx "void" ; +.It .Ft int .Fn setcontext "const ucontext_t *" ; .It @@ -104,4 +107,5 @@ structures: .Sh SEE ALSO .Xr sigaltstack 2 , .Xr getcontext 3 , +.Xr getcontextx 3 , .Xr makecontext 3 Modified: stable/9/lib/libc/i386/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/i386/gen/Makefile.inc Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/i386/gen/Makefile.inc Tue Feb 21 21:18:59 2012 (r231981) @@ -2,5 +2,5 @@ # $FreeBSD$ SRCS+= _ctx_start.S _setjmp.S _set_tp.c fabs.S \ - flt_rounds.c infinity.c ldexp.c makecontext.c modf.S \ + flt_rounds.c getcontextx.c infinity.c ldexp.c makecontext.c modf.S \ rfork_thread.S setjmp.S signalcontext.c sigsetjmp.S Copied and modified: stable/9/lib/libc/i386/gen/getcontextx.c (from r230429, head/lib/libc/i386/gen/getcontextx.c) ============================================================================== --- head/lib/libc/i386/gen/getcontextx.c Sat Jan 21 18:00:28 2012 (r230429, copy source) +++ stable/9/lib/libc/i386/gen/getcontextx.c Tue Feb 21 21:18:59 2012 (r231981) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); static int xstate_sz = -1; -size_t +int __getcontextx_size(void) { u_int p[4]; Modified: stable/9/lib/libc/ia64/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/ia64/gen/Makefile.inc Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/ia64/gen/Makefile.inc Tue Feb 21 21:18:59 2012 (r231981) @@ -3,7 +3,7 @@ SRCS+= __divdf3.S __divdi3.S __divsf3.S __divsi3.S __moddi3.S __modsi3.S \ __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S _mcount.S _set_tp.c \ _setjmp.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c fpsetmask.c \ - fpsetround.c infinity.c ldexp.c makecontext.c modf.c setjmp.S \ + fpsetround.c getcontextx.c infinity.c ldexp.c makecontext.c modf.c setjmp.S \ signalcontext.c sigsetjmp.S # The following may go away if function _Unwind_FindTableEntry() Copied and modified: stable/9/lib/libc/ia64/gen/getcontextx.c (from r230429, head/lib/libc/ia64/gen/getcontextx.c) ============================================================================== --- head/lib/libc/ia64/gen/getcontextx.c Sat Jan 21 18:00:28 2012 (r230429, copy source) +++ stable/9/lib/libc/ia64/gen/getcontextx.c Tue Feb 21 21:18:59 2012 (r231981) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include -size_t +int __getcontextx_size(void) { Modified: stable/9/lib/libc/mips/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/mips/gen/Makefile.inc Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/mips/gen/Makefile.inc Tue Feb 21 21:18:59 2012 (r231981) @@ -6,4 +6,5 @@ SRCS+= infinity.c fabs.c ldexp.c modf.c # SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ # fpsetround.c fpsetsticky.c -SRCS+= _ctx_start.S _set_tp.c _setjmp.S makecontext.c setjmp.S signalcontext.c sigsetjmp.S +SRCS+= _ctx_start.S _set_tp.c _setjmp.S getcontextx.c makecontext.c \ + setjmp.S signalcontext.c sigsetjmp.S Copied and modified: stable/9/lib/libc/mips/gen/getcontextx.c (from r230429, head/lib/libc/mips/gen/getcontextx.c) ============================================================================== --- head/lib/libc/mips/gen/getcontextx.c Sat Jan 21 18:00:28 2012 (r230429, copy source) +++ stable/9/lib/libc/mips/gen/getcontextx.c Tue Feb 21 21:18:59 2012 (r231981) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include -size_t +int __getcontextx_size(void) { Modified: stable/9/lib/libc/powerpc/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/powerpc/gen/Makefile.inc Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/powerpc/gen/Makefile.inc Tue Feb 21 21:18:59 2012 (r231981) @@ -1,7 +1,7 @@ # $FreeBSD$ SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ - fpgetsticky.c fpsetmask.c fpsetround.c \ + fpgetsticky.c fpsetmask.c fpsetround.c getcontextx.c \ infinity.c ldexp.c makecontext.c modf.c _setjmp.S \ setjmp.S sigsetjmp.S signalcontext.c syncicache.c \ _set_tp.c Copied and modified: stable/9/lib/libc/powerpc/gen/getcontextx.c (from r230429, head/lib/libc/powerpc/gen/getcontextx.c) ============================================================================== --- head/lib/libc/powerpc/gen/getcontextx.c Sat Jan 21 18:00:28 2012 (r230429, copy source) +++ stable/9/lib/libc/powerpc/gen/getcontextx.c Tue Feb 21 21:18:59 2012 (r231981) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include -size_t +int __getcontextx_size(void) { Modified: stable/9/lib/libc/powerpc64/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/powerpc64/gen/Makefile.inc Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/powerpc64/gen/Makefile.inc Tue Feb 21 21:18:59 2012 (r231981) @@ -1,7 +1,7 @@ # $FreeBSD$ SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ - fpgetsticky.c fpsetmask.c fpsetround.c \ + fpgetsticky.c fpsetmask.c fpsetround.c getcontextx.c \ infinity.c ldexp.c makecontext.c modf.c _setjmp.S \ setjmp.S sigsetjmp.S signalcontext.c syncicache.c \ _set_tp.c Copied and modified: stable/9/lib/libc/powerpc64/gen/getcontextx.c (from r230429, head/lib/libc/powerpc64/gen/getcontextx.c) ============================================================================== --- head/lib/libc/powerpc64/gen/getcontextx.c Sat Jan 21 18:00:28 2012 (r230429, copy source) +++ stable/9/lib/libc/powerpc64/gen/getcontextx.c Tue Feb 21 21:18:59 2012 (r231981) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include -size_t +int __getcontextx_size(void) { Modified: stable/9/lib/libc/sparc64/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/sparc64/gen/Makefile.inc Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/lib/libc/sparc64/gen/Makefile.inc Tue Feb 21 21:18:59 2012 (r231981) @@ -2,5 +2,5 @@ SRCS+= _ctx_start.S _setjmp.S fabs.S fixunsdfsi.S flt_rounds.c fpgetmask.c \ fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c \ - infinity.c ldexp.c makecontext.c modf.S \ + getcontextx.c infinity.c ldexp.c makecontext.c modf.S \ signalcontext.c setjmp.S sigsetjmp.S _set_tp.c Copied and modified: stable/9/lib/libc/sparc64/gen/getcontextx.c (from r230429, head/lib/libc/sparc64/gen/getcontextx.c) ============================================================================== --- head/lib/libc/sparc64/gen/getcontextx.c Sat Jan 21 18:00:28 2012 (r230429, copy source) +++ stable/9/lib/libc/sparc64/gen/getcontextx.c Tue Feb 21 21:18:59 2012 (r231981) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include -size_t +int __getcontextx_size(void) { Modified: stable/9/sys/sys/ucontext.h ============================================================================== --- stable/9/sys/sys/ucontext.h Tue Feb 21 20:59:49 2012 (r231980) +++ stable/9/sys/sys/ucontext.h Tue Feb 21 21:18:59 2012 (r231981) @@ -72,11 +72,17 @@ struct ucontext4 { __BEGIN_DECLS int getcontext(ucontext_t *); +ucontext_t *getcontextx(void); int setcontext(const ucontext_t *); void makecontext(ucontext_t *, void (*)(void), int, ...); int signalcontext(ucontext_t *, int, __sighandler_t *); int swapcontext(ucontext_t *, const ucontext_t *); +#if __BSD_VISIBLE +int __getcontextx_size(void); +int __fillcontextx(char *ctx); +#endif + __END_DECLS #else /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 21:20:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8F89106566B; Tue, 21 Feb 2012 21:20:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EEB38FC14; Tue, 21 Feb 2012 21:20:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LLKqIf020320; Tue, 21 Feb 2012 21:20:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LLKqmP020317; Tue, 21 Feb 2012 21:20:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201202212120.q1LLKqmP020317@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Feb 2012 21:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231982 - in head/sys: conf modules/hpt27xx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 21:20:52 -0000 Author: dim Date: Tue Feb 21 21:20:52 2012 New Revision: 231982 URL: http://svn.freebsd.org/changeset/base/231982 Log: When building with clang, disable -Wformat-security for sys/dev/hpt27xx/osm_bsd.c, since it gets the following warnings: sys/dev/hpt27xx/osm_bsd.c:1180:25: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] S_IRUSR | S_IWUSR, driver_name); ^~~~~~~~~~~ @/dev/hpt27xx/hpt27xx_config.h:46:21: note: expanded from: #define driver_name hpt27xx_driver_name ^~~~~~~~~~~~~~~~~~~ Since 'hpt27xx_driver_name' is a constant string symbol (coming from the proprietary hpt27xx_lib.o file), there is no security problem. Because this driver is provided by the vendor, and applying changes requires re-certification and other bureaucratic exercises, just disable the warning for now. MFC after: 1 week Modified: head/sys/conf/kern.mk head/sys/modules/hpt27xx/Makefile Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Feb 21 21:18:59 2012 (r231981) +++ head/sys/conf/kern.mk Tue Feb 21 21:20:52 2012 (r231982) @@ -23,6 +23,7 @@ NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-cou NO_WUNUSED_VALUE= -Wno-unused-value NO_WSELF_ASSIGN= -Wno-self-assign NO_WUNNEEDED_INTERNAL_DECL= -Wno-unneeded-internal-declaration +NO_WFORMAT_SECURITY= -Wno-format-security # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. Modified: head/sys/modules/hpt27xx/Makefile ============================================================================== --- head/sys/modules/hpt27xx/Makefile Tue Feb 21 21:18:59 2012 (r231981) +++ head/sys/modules/hpt27xx/Makefile Tue Feb 21 21:20:52 2012 (r231982) @@ -12,3 +12,6 @@ hpt27xx_lib.o: uudecode -p < ${HPT27XX}/$(MACHINE_ARCH)-elf.hpt27xx_lib.o.uu > ${.TARGET} .include + +CWARNFLAGS.osm_bsd.c= ${NO_WFORMAT_SECURITY} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 21:21:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 545F41065674; Tue, 21 Feb 2012 21:21:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 426D38FC14; Tue, 21 Feb 2012 21:21:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LLLWLj020378; Tue, 21 Feb 2012 21:21:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LLLW6l020376; Tue, 21 Feb 2012 21:21:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202212121.q1LLLW6l020376@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 21 Feb 2012 21:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231983 - stable/9/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 21:21:32 -0000 Author: kib Date: Tue Feb 21 21:21:31 2012 New Revision: 231983 URL: http://svn.freebsd.org/changeset/base/231983 Log: MFC r230430: Use getcontextx(3) internal API instead of getcontext(2) to provide the signal handlers with the context information in the deferrred case. Modified: stable/9/lib/libthr/thread/thr_sig.c Directory Properties: stable/9/lib/libthr/ (props changed) Modified: stable/9/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/9/lib/libthr/thread/thr_sig.c Tue Feb 21 21:20:52 2012 (r231982) +++ stable/9/lib/libthr/thread/thr_sig.c Tue Feb 21 21:21:31 2012 (r231983) @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include "un-namespace.h" @@ -314,16 +315,24 @@ check_cancel(struct pthread *curthread, static void check_deferred_signal(struct pthread *curthread) { - ucontext_t uc; + ucontext_t *uc; struct sigaction act; siginfo_t info; if (__predict_true(curthread->deferred_siginfo.si_signo == 0)) return; - getcontext(&uc); + +#if defined(__amd64__) || defined(__i386__) + uc = alloca(__getcontextx_size()); + __fillcontextx((char *)uc); +#else + ucontext_t ucv; + uc = &ucv; + getcontext(uc); +#endif if (curthread->deferred_siginfo.si_signo != 0) { act = curthread->deferred_sigact; - uc.uc_sigmask = curthread->deferred_sigmask; + uc->uc_sigmask = curthread->deferred_sigmask; memcpy(&info, &curthread->deferred_siginfo, sizeof(siginfo_t)); /* remove signal */ curthread->deferred_siginfo.si_signo = 0; @@ -334,7 +343,7 @@ check_deferred_signal(struct pthread *cu tact.sa_handler = SIG_DFL; _sigaction(info.si_signo, &tact, NULL); } - handle_signal(&act, info.si_signo, &info, &uc); + handle_signal(&act, info.si_signo, &info, uc); } } From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 21:59:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F1DA106567C; Tue, 21 Feb 2012 21:59:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6517E8FC13; Tue, 21 Feb 2012 21:59:13 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 005A746B17; Tue, 21 Feb 2012 16:59:13 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5F1AFB93E; Tue, 21 Feb 2012 16:59:12 -0500 (EST) From: John Baldwin To: Sergey Kandaurov Date: Tue, 21 Feb 2012 14:49:04 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201112291825.pBTIPIrp067447@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201202211449.04291.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 21 Feb 2012 16:59:12 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228966 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 21:59:13 -0000 On Friday, February 17, 2012 3:14:51 am Sergey Kandaurov wrote: > On 29 December 2011 22:25, John Baldwin wrote: > > Author: jhb > > Date: Thu Dec 29 18:25:18 2011 > > New Revision: 228966 > > URL: http://svn.freebsd.org/changeset/base/228966 > > > > Log: > > Use queue(3) macros instead of home-rolled versions in several places in > > the INET6 code. This includes retiring the 'ndpr_next' and 'pfr_next' > > macros. > > > > Submitted by: pluknet (earlier version) > > Reviewed by: pluknet > > > > Modified: > > head/sys/netinet/sctp_output.c > > head/sys/netinet6/icmp6.c > > head/sys/netinet6/in6.c > > head/sys/netinet6/in6_ifattach.c > > head/sys/netinet6/nd6.c > > head/sys/netinet6/nd6.h > > head/sys/netinet6/nd6_rtr.c > > Hi. > > Do you intend to merge this change to stable branches? Oh, hmm, it probably should be. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Feb 21 23:46:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15AF01065670; Tue, 21 Feb 2012 23:46:42 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03E1C8FC08; Tue, 21 Feb 2012 23:46:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1LNkfQL025083; Tue, 21 Feb 2012 23:46:41 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1LNkfah025080; Tue, 21 Feb 2012 23:46:41 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201202212346.q1LNkfah025080@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 21 Feb 2012 23:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231984 - head/tools/regression/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 23:46:42 -0000 Author: jilles Date: Tue Feb 21 23:46:41 2012 New Revision: 231984 URL: http://svn.freebsd.org/changeset/base/231984 Log: libc: Add some tests for fmtmsg(). Added: head/tools/regression/lib/libc/gen/test-fmtmsg.c (contents, props changed) Modified: head/tools/regression/lib/libc/gen/Makefile Modified: head/tools/regression/lib/libc/gen/Makefile ============================================================================== --- head/tools/regression/lib/libc/gen/Makefile Tue Feb 21 21:21:31 2012 (r231983) +++ head/tools/regression/lib/libc/gen/Makefile Tue Feb 21 23:46:41 2012 (r231984) @@ -1,6 +1,6 @@ # $FreeBSD$ -TESTS= test-arc4random test-fmtcheck test-fnmatch \ +TESTS= test-arc4random test-fmtcheck test-fmtmsg test-fnmatch \ test-fpclassify test-posix_spawn test-wordexp .PHONY: tests Added: head/tools/regression/lib/libc/gen/test-fmtmsg.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/gen/test-fmtmsg.c Tue Feb 21 23:46:41 2012 (r231984) @@ -0,0 +1,251 @@ +/*- + * Copyright (c) 2012 Jilles Tjoelker + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include +#include +#include +#include +#include + +static char *run_test(long classification, const char *label, int severity, + const char *text, const char *action, const char *tag); + +struct testcase { + long classification; + const char *label; + int severity; + const char *text; + const char *action; + const char *tag; + const char *msgverb; + const char *result; +} testcases[] = { + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + NULL, + "BSD:ls: ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "text:severity:action:tag", + "illegal option -- z: ERROR\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "text", + "illegal option -- z\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "severity:text", + "ERROR: illegal option -- z\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "ignore me", + "BSD:ls: ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "tag:severity:text:nothing:action", + "BSD:ls: ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "", + "BSD:ls: ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, MM_NULLLBL, MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + NULL, + "ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", MM_NULLACT, MM_NULLTAG, + NULL, + "BSD:ls: ERROR: illegal option -- z\n" + }, + { + MM_UTIL | MM_NULLMC, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + NULL, + "" + }, + { + MM_APPL | MM_PRINT, "ABCDEFGHIJ:abcdefghijklmn", MM_INFO, + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "refer to manual", "ABCDEFGHIJ:abcdefghijklmn:001", + NULL, + "ABCDEFGHIJ:abcdefghijklmn: INFO: " + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" + "TO FIX: refer to manual ABCDEFGHIJ:abcdefghijklmn:001\n" + }, + { + MM_OPSYS | MM_PRINT, "TEST:test", MM_HALT, + "failed", "nothing can help me", "NOTHING", + NULL, + "TEST:test: HALT: failed\n" + "TO FIX: nothing can help me NOTHING\n" + }, + { + MM_OPSYS | MM_PRINT, "TEST:test", MM_WARNING, + "failed", "nothing can help me", "NOTHING", + NULL, + "TEST:test: WARNING: failed\n" + "TO FIX: nothing can help me NOTHING\n" + }, + { + MM_OPSYS | MM_PRINT, "TEST:test", MM_NOSEV, + "failed", "nothing can help me", "NOTHING", + NULL, + "TEST:test: failed\n" + "TO FIX: nothing can help me NOTHING\n" + } +}; + +static char * +run_test(long classification, const char *label, int severity, + const char *text, const char *action, const char *tag) +{ + int pip[2]; + pid_t pid, wpid; + char *result, *p; + size_t resultsize; + ssize_t n; + int status; + + if (pipe(pip) == -1) + err(2, "pipe"); + pid = fork(); + if (pid == -1) + err(2, "fork"); + if (pid == 0) { + close(pip[0]); + if (pip[1] != STDERR_FILENO && + dup2(pip[1], STDERR_FILENO) == -1) + _exit(2); + if (fmtmsg(classification, label, severity, text, action, tag) + != MM_OK) + _exit(1); + else + _exit(0); + } + close(pip[1]); + resultsize = 1024; + result = malloc(resultsize); + p = result; + while ((n = read(pip[0], p, result + resultsize - p - 1)) != 0) { + if (n == -1) { + if (errno == EINTR) + continue; + else + err(2, "read"); + } + p += n; + if (result + resultsize == p - 1) { + resultsize *= 2; + result = realloc(result, resultsize); + if (result == NULL) + err(2, "realloc"); + } + } + if (memchr(result, '\0', p - result) != NULL) { + free(result); + return (NULL); + } + *p = '\0'; + close(pip[0]); + while ((wpid = waitpid(pid, &status, 0)) == -1 && errno == EINTR) + ; + if (wpid == -1) + err(2, "waitpid"); + if (status != 0) { + free(result); + return (NULL); + } + return (result); +} + +int +main(void) +{ + size_t i, n; + int errors; + char *result; + struct testcase *t; + + n = sizeof(testcases) / sizeof(testcases[0]); + errors = 0; + printf("1..%zu\n", n); + for (i = 0; i < n; i++) { + t = &testcases[i]; + if (t->msgverb != NULL) + setenv("MSGVERB", t->msgverb, 1); + else + unsetenv("MSGVERB"); + result = run_test(t->classification, t->label, t->severity, + t->text, t->action, t->tag); + if (result != NULL && strcmp(result, t->result) == 0) + printf("ok %zu - correct\n", + i + 1); + else { + printf("not ok %zu - %s\n", + i + 1, result != NULL ? "incorrect" : "failed"); + errors = 1; + } + free(result); + } + + return (errors); +} From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 01:08:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BE101065672; Wed, 22 Feb 2012 01:08:59 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86E418FC08; Wed, 22 Feb 2012 01:08:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M18xx6027806; Wed, 22 Feb 2012 01:08:59 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M18xUX027804; Wed, 22 Feb 2012 01:08:59 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201202220108.q1M18xUX027804@svn.freebsd.org> From: Kevin Lo Date: Wed, 22 Feb 2012 01:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231985 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 01:08:59 -0000 Author: kevlo Date: Wed Feb 22 01:08:59 2012 New Revision: 231985 URL: http://svn.freebsd.org/changeset/base/231985 Log: Fix memset sizeof Modified: head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Tue Feb 21 23:46:41 2012 (r231984) +++ head/sys/dev/isp/isp_freebsd.h Wed Feb 22 01:08:59 2012 (r231985) @@ -494,7 +494,7 @@ default: \ #define XS_SAVE_SENSE(xs, sense_ptr, slen) do { \ (xs)->ccb_h.status |= CAM_AUTOSNS_VALID; \ - memset(&(xs)->sense_data, 0, sizeof(&(xs)->sense_data));\ + memset(&(xs)->sense_data, 0, sizeof((xs)->sense_data)); \ memcpy(&(xs)->sense_data, sense_ptr, imin(XS_SNSLEN(xs),\ slen)); \ if (slen < (xs)->sense_len) \ From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 01:23:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2EA2106566C; Wed, 22 Feb 2012 01:23:14 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E1078FC15; Wed, 22 Feb 2012 01:23:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M1NE0G028329; Wed, 22 Feb 2012 01:23:14 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M1NEpS028327; Wed, 22 Feb 2012 01:23:14 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201202220123.q1M1NEpS028327@svn.freebsd.org> From: Kevin Lo Date: Wed, 22 Feb 2012 01:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231986 - head/secure/lib/libcrypt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 01:23:14 -0000 Author: kevlo Date: Wed Feb 22 01:23:14 2012 New Revision: 231986 URL: http://svn.freebsd.org/changeset/base/231986 Log: Return NULL on error rather than ":", per the crypt(3) man page. Discussed in: http://www.openwall.com/lists/oss-security/2011/11/15/3 Modified: head/secure/lib/libcrypt/crypt-blowfish.c Modified: head/secure/lib/libcrypt/crypt-blowfish.c ============================================================================== --- head/secure/lib/libcrypt/crypt-blowfish.c Wed Feb 22 01:08:59 2012 (r231985) +++ head/secure/lib/libcrypt/crypt-blowfish.c Wed Feb 22 01:23:14 2012 (r231986) @@ -72,7 +72,6 @@ static void encode_base64(u_int8_t *, u_ static void decode_base64(u_int8_t *, u_int16_t, const u_int8_t *); static char encrypted[_PASSWORD_LEN]; -static char error[] = ":"; static const u_int8_t Base64Code[] = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; @@ -160,8 +159,8 @@ crypt_blowfish(const char *key, const ch salt++; if (*salt > BCRYPT_VERSION) { - /* How do I handle errors ? Return ':' */ - return error; + /* How do I handle errors ? Return NULL */ + return NULL; } /* Check for minor versions */ @@ -173,7 +172,7 @@ crypt_blowfish(const char *key, const ch salt++; break; default: - return error; + return NULL; } } else minr = 0; @@ -183,13 +182,13 @@ crypt_blowfish(const char *key, const ch if (salt[2] != '$') /* Out of sync with passwd entry */ - return error; + return NULL; /* Computer power doesnt increase linear, 2^x should be fine */ logr = (u_int8_t)atoi(salt); rounds = 1 << logr; if (rounds < BCRYPT_MINROUNDS) - return error; + return NULL; /* Discard num rounds + "$" identifier */ salt += 3; From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 01:30:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81FCD106566C; Wed, 22 Feb 2012 01:30:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 626308FC0A; Wed, 22 Feb 2012 01:30:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M1UQsX028601; Wed, 22 Feb 2012 01:30:26 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M1UQ30028591; Wed, 22 Feb 2012 01:30:26 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201202220130.q1M1UQ30028591@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 22 Feb 2012 01:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231987 - in head/sys/mips/cavium: . octe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 01:30:26 -0000 Author: gonzo Date: Wed Feb 22 01:30:25 2012 New Revision: 231987 URL: http://svn.freebsd.org/changeset/base/231987 Log: Refctor address assignment for Octeon's ethernet ports: - Centralize address assignment - Make sure managment ports get first MAC address in pool - Properly propagate fail if address allocation failed Submitted by: Andrew Duane Modified: head/sys/mips/cavium/files.octeon1 head/sys/mips/cavium/if_octm.c head/sys/mips/cavium/octe/ethernet-common.c head/sys/mips/cavium/octe/ethernet-common.h head/sys/mips/cavium/octe/ethernet-rgmii.c head/sys/mips/cavium/octe/ethernet-sgmii.c head/sys/mips/cavium/octe/ethernet-spi.c head/sys/mips/cavium/octe/ethernet-xaui.c head/sys/mips/cavium/octe/ethernet.c Modified: head/sys/mips/cavium/files.octeon1 ============================================================================== --- head/sys/mips/cavium/files.octeon1 Wed Feb 22 01:23:14 2012 (r231986) +++ head/sys/mips/cavium/files.octeon1 Wed Feb 22 01:30:25 2012 (r231987) @@ -24,6 +24,10 @@ mips/cavium/cryptocteon/cryptocteon.c o mips/mips/octeon_cop2_swtch.S standard mips/mips/octeon_cop2.c standard +# octm must be first, so management ports get the first MAC addresses +mips/cavium/if_octm.c optional octm +contrib/octeon-sdk/cvmx-mgmt-port.c optional octm + mips/cavium/octe/ethernet.c optional octe mips/cavium/octe/ethernet-mv88e61xx.c optional octe octeon_vendor_lanner mips/cavium/octe/ethernet-common.c optional octe @@ -39,10 +43,6 @@ mips/cavium/octe/mv88e61xxphy.c option mips/cavium/octe/octe.c optional octe mips/cavium/octe/octebus.c optional octe -mips/cavium/if_octm.c optional octm - -contrib/octeon-sdk/cvmx-mgmt-port.c optional octm - mips/cavium/octopci.c optional pci mips/cavium/octopci_bus_space.c optional pci Modified: head/sys/mips/cavium/if_octm.c ============================================================================== --- head/sys/mips/cavium/if_octm.c Wed Feb 22 01:23:14 2012 (r231986) +++ head/sys/mips/cavium/if_octm.c Wed Feb 22 01:30:25 2012 (r231987) @@ -63,6 +63,7 @@ #include #include #include +#include "octe/ethernet-common.h" struct octm_softc { struct ifnet *sc_ifp; @@ -176,9 +177,10 @@ octm_attach(device_t dev) /* * Set MAC address for this management port. */ - mac = 0; - memcpy((u_int8_t *)&mac + 2, cvmx_sysinfo_get()->mac_addr_base, 6); - mac += sc->sc_port; + if (cvm_assign_mac_address(&mac, NULL) != 0) { + device_printf(dev, "unable to allocate MAC address.\n"); + return (ENXIO); + } cvmx_mgmt_port_set_mac(sc->sc_port, mac); /* No watermark for input ring. */ Modified: head/sys/mips/cavium/octe/ethernet-common.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet-common.c Wed Feb 22 01:23:14 2012 (r231986) +++ head/sys/mips/cavium/octe/ethernet-common.c Wed Feb 22 01:30:25 2012 (r231987) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); extern int octeon_is_simulation(void); +static uint64_t mac_addr = 0; +static uint32_t mac_offset = 0; /** * Set the multicast list. Currently unimplemented. @@ -90,6 +92,37 @@ void cvm_oct_common_set_multicast_list(s /** + * Assign a MAC addres from the pool of available MAC addresses + * Can return as either a 64-bit value and/or 6 octets. + * + * @param macp Filled in with the assigned address if non-NULL + * @param octets Filled in with the assigned address if non-NULL + * @return Zero on success + */ +int cvm_assign_mac_address(uint64_t *macp, uint8_t *octets) +{ + /* Initialize from global MAC address base; fail if not set */ + if (mac_addr == 0) { + memcpy((uint8_t *)&mac_addr + 2, cvmx_sysinfo_get()->mac_addr_base, 6); + if (mac_addr == 0) + return ENXIO; + } + + if (mac_offset >= cvmx_sysinfo_get()->mac_addr_count) + return ENXIO; /* Out of addresses to assign */ + + if (macp) + *macp = mac_addr; + if (octets) + memcpy(octets, (u_int8_t *)&mac_addr + 2, 6); + + mac_addr++; + mac_offset++; + + return 0; +} + +/** * Set the hardware MAC address for a device * * @param dev Device to change the MAC address for @@ -268,16 +301,11 @@ void cvm_oct_common_poll(struct ifnet *i */ int cvm_oct_common_init(struct ifnet *ifp) { - char mac[6] = { - cvmx_sysinfo_get()->mac_addr_base[0], - cvmx_sysinfo_get()->mac_addr_base[1], - cvmx_sysinfo_get()->mac_addr_base[2], - cvmx_sysinfo_get()->mac_addr_base[3], - cvmx_sysinfo_get()->mac_addr_base[4], - cvmx_sysinfo_get()->mac_addr_base[5] }; + uint8_t mac[6]; cvm_oct_private_t *priv = (cvm_oct_private_t *)ifp->if_softc; - mac[5] += cvm_oct_mac_addr_offset++; + if (cvm_assign_mac_address(NULL, mac) != 0) + return ENXIO; ifp->if_mtu = ETHERMTU; Modified: head/sys/mips/cavium/octe/ethernet-common.h ============================================================================== --- head/sys/mips/cavium/octe/ethernet-common.h Wed Feb 22 01:23:14 2012 (r231986) +++ head/sys/mips/cavium/octe/ethernet-common.h Wed Feb 22 01:30:25 2012 (r231987) @@ -37,6 +37,7 @@ void cvm_oct_common_uninit(struct ifnet int cvm_oct_common_change_mtu(struct ifnet *ifp, int new_mtu); void cvm_oct_common_set_multicast_list(struct ifnet *ifp); void cvm_oct_common_set_mac_address(struct ifnet *ifp, const void *); +int cvm_assign_mac_address(uint64_t *, uint8_t *); int cvm_oct_init_module(device_t); void cvm_oct_cleanup_module(device_t); @@ -52,4 +53,3 @@ int cvm_oct_spi_init(struct ifnet *ifp); void cvm_oct_spi_uninit(struct ifnet *ifp); int cvm_oct_xaui_init(struct ifnet *ifp); -extern unsigned int cvm_oct_mac_addr_offset; Modified: head/sys/mips/cavium/octe/ethernet-rgmii.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet-rgmii.c Wed Feb 22 01:23:14 2012 (r231986) +++ head/sys/mips/cavium/octe/ethernet-rgmii.c Wed Feb 22 01:30:25 2012 (r231987) @@ -215,7 +215,9 @@ int cvm_oct_rgmii_init(struct ifnet *ifp int error; int rid; - cvm_oct_common_init(ifp); + if (cvm_oct_common_init(ifp) != 0) + return ENXIO; + priv->open = cvm_oct_common_open; priv->stop = cvm_oct_common_stop; priv->stop(ifp); Modified: head/sys/mips/cavium/octe/ethernet-sgmii.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet-sgmii.c Wed Feb 22 01:23:14 2012 (r231986) +++ head/sys/mips/cavium/octe/ethernet-sgmii.c Wed Feb 22 01:30:25 2012 (r231987) @@ -49,7 +49,10 @@ extern int octeon_is_simulation(void); int cvm_oct_sgmii_init(struct ifnet *ifp) { cvm_oct_private_t *priv = (cvm_oct_private_t *)ifp->if_softc; - cvm_oct_common_init(ifp); + + if (cvm_oct_common_init(ifp) != 0) + return ENXIO; + priv->open = cvm_oct_common_open; priv->stop = cvm_oct_common_stop; priv->stop(ifp); Modified: head/sys/mips/cavium/octe/ethernet-spi.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet-spi.c Wed Feb 22 01:23:14 2012 (r231986) +++ head/sys/mips/cavium/octe/ethernet-spi.c Wed Feb 22 01:30:25 2012 (r231987) @@ -289,7 +289,8 @@ int cvm_oct_spi_init(struct ifnet *ifp) cvm_oct_spi_enable_error_reporting(INTERFACE(priv->port)); priv->poll = cvm_oct_spi_poll; } - cvm_oct_common_init(ifp); + if (cvm_oct_common_init(ifp) != 0) + return ENXIO; return 0; } Modified: head/sys/mips/cavium/octe/ethernet-xaui.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet-xaui.c Wed Feb 22 01:23:14 2012 (r231986) +++ head/sys/mips/cavium/octe/ethernet-xaui.c Wed Feb 22 01:30:25 2012 (r231987) @@ -49,7 +49,10 @@ extern int octeon_is_simulation(void); int cvm_oct_xaui_init(struct ifnet *ifp) { cvm_oct_private_t *priv = (cvm_oct_private_t *)ifp->if_softc; - cvm_oct_common_init(ifp); + + if (cvm_oct_common_init(ifp) != 0) + return ENXIO; + priv->open = cvm_oct_common_open; priv->stop = cvm_oct_common_stop; priv->stop(ifp); Modified: head/sys/mips/cavium/octe/ethernet.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet.c Wed Feb 22 01:23:14 2012 (r231986) +++ head/sys/mips/cavium/octe/ethernet.c Wed Feb 22 01:30:25 2012 (r231987) @@ -97,15 +97,6 @@ static struct taskqueue *cvm_oct_link_ta */ static int cvm_oct_num_output_buffers; -/* - * The offset from mac_addr_base that should be used for the next port - * that is configured. By convention, if any mgmt ports exist on the - * chip, they get the first mac addresses. The ports controlled by - * this driver are numbered sequencially following any mgmt addresses - * that may exist. - */ -unsigned int cvm_oct_mac_addr_offset; - /** * Function to update link status. */ @@ -321,20 +312,6 @@ int cvm_oct_init_module(device_t bus) printf("cavium-ethernet: %s\n", OCTEON_SDK_VERSION_STRING); - /* - * MAC addresses for this driver start after the management - * ports. - * - * XXX Would be nice if __cvmx_mgmt_port_num_ports() were - * not static to cvmx-mgmt-port.c. - */ - if (OCTEON_IS_MODEL(OCTEON_CN56XX)) - cvm_oct_mac_addr_offset = 1; - else if (OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN63XX)) - cvm_oct_mac_addr_offset = 2; - else - cvm_oct_mac_addr_offset = 0; - cvm_oct_rx_initialize(); cvm_oct_configure_common_hw(bus); @@ -375,15 +352,17 @@ int cvm_oct_init_module(device_t bus) int num_ports = cvmx_helper_ports_on_interface(interface); int port; - for (port = cvmx_helper_get_ipd_port(interface, 0); port < cvmx_helper_get_ipd_port(interface, num_ports); port++) { + for (port = cvmx_helper_get_ipd_port(interface, 0); + port < cvmx_helper_get_ipd_port(interface, num_ports); + ifnum++, port++) { cvm_oct_private_t *priv; struct ifnet *ifp; - dev = BUS_ADD_CHILD(bus, 0, "octe", ifnum++); + dev = BUS_ADD_CHILD(bus, 0, "octe", ifnum); if (dev != NULL) ifp = if_alloc(IFT_ETHER); if (dev == NULL || ifp == NULL) { - printf("\t\tFailed to allocate ethernet device for port %d\n", port); + printf("Failed to allocate ethernet device for interface %d port %d\n", interface, port); continue; } @@ -454,12 +433,13 @@ int cvm_oct_init_module(device_t bus) ifp->if_softc = priv; if (!priv->init) { - panic("%s: unsupported device type, need to free ifp.", __func__); - } else - if (priv->init(ifp) < 0) { - printf("\t\tFailed to register ethernet device for interface %d, port %d\n", - interface, priv->port); - panic("%s: init failed, need to free ifp.", __func__); + printf("octe%d: unsupported device type interface %d, port %d\n", + ifnum, interface, priv->port); + if_free(ifp); + } else if (priv->init(ifp) != 0) { + printf("octe%d: failed to register device for interface %d, port %d\n", + ifnum, interface, priv->port); + if_free(ifp); } else { cvm_oct_device[priv->port] = ifp; fau -= cvmx_pko_get_num_queues(priv->port) * sizeof(uint32_t); From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 02:56:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA612106566B; Wed, 22 Feb 2012 02:56:56 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id BDCA78FC12; Wed, 22 Feb 2012 02:56:55 +0000 (UTC) Received: by wibhn14 with SMTP id hn14so6252702wib.13 for ; Tue, 21 Feb 2012 18:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=6y+3ce1yclbQTSsjUISLVNz4jA6yTSoRGe9LyGeqhac=; b=ge0ovpolsPclr0/66FYAvYBgdBxBUNBDtK0rDyxwFZhwUfln8wffQ35coaahVMk2UW oISb7HF3l06NDwP7pF+RKn6yOn657dIlcUHjBd2Zf3FlTBUYaPE14eUr07pLKMLK+S67 VG4HvDU0kAoCoODTxOV30Wgja+wZazD09sVzo= Received: by 10.180.107.99 with SMTP id hb3mr25934651wib.5.1329879414315; Tue, 21 Feb 2012 18:56:54 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.223.15.90 with HTTP; Tue, 21 Feb 2012 18:56:24 -0800 (PST) In-Reply-To: <201202220123.q1M1NEpS028327@svn.freebsd.org> References: <201202220123.q1M1NEpS028327@svn.freebsd.org> From: Eitan Adler Date: Tue, 21 Feb 2012 21:56:24 -0500 X-Google-Sender-Auth: EIIp_dEyjMbT1_54xksX4sAUgMU Message-ID: To: Kevin Lo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnpz1ULSfsDiTlSbnQNOWC7YU+wHGox5Cq3AAv7K8ifkTooc8JHRIKtQxibe02aHFLm/l7O Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231986 - head/secure/lib/libcrypt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 02:56:56 -0000 On Tue, Feb 21, 2012 at 8:23 PM, Kevin Lo wrote: > Author: kevlo > Date: Wed Feb 22 01:23:14 2012 > New Revision: 231986 > URL: http://svn.freebsd.org/changeset/base/231986 > > Log: > =C2=A0Return NULL on error rather than ":", per the crypt(3) man page. > =C2=A0Discussed in: http://www.openwall.com/lists/oss-security/2011/11/15= /3 Thanks! --=20 Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 03:22:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 994CB106564A; Wed, 22 Feb 2012 03:22:50 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 836D28FC15; Wed, 22 Feb 2012 03:22:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M3MoLY032334; Wed, 22 Feb 2012 03:22:50 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M3MoFE032330; Wed, 22 Feb 2012 03:22:50 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201202220322.q1M3MoFE032330@svn.freebsd.org> From: David Xu Date: Wed, 22 Feb 2012 03:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231989 - in head: lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 03:22:50 -0000 Author: davidxu Date: Wed Feb 22 03:22:49 2012 New Revision: 231989 URL: http://svn.freebsd.org/changeset/base/231989 Log: Use unused fourth argument of umtx_op to pass flags to kernel for operation UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower 16bits is used to pass flags. The change saves a clock_gettime() syscall from libthr. Modified: head/lib/libthr/thread/thr_umtx.c head/sys/kern/kern_umtx.c head/sys/sys/umtx.h Modified: head/lib/libthr/thread/thr_umtx.c ============================================================================== --- head/lib/libthr/thread/thr_umtx.c Wed Feb 22 01:50:13 2012 (r231988) +++ head/lib/libthr/thread/thr_umtx.c Wed Feb 22 03:22:49 2012 (r231989) @@ -200,20 +200,10 @@ int _thr_umtx_timedwait_uint(volatile u_int *mtx, u_int id, int clockid, const struct timespec *abstime, int shared) { - struct timespec ts, ts2, *tsp; - - if (abstime != NULL) { - clock_gettime(clockid, &ts); - TIMESPEC_SUB(&ts2, abstime, &ts); - if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) - return (ETIMEDOUT); - tsp = &ts2; - } else { - tsp = NULL; - } return _umtx_op_err(__DEVOLATILE(void *, mtx), - shared ? UMTX_OP_WAIT_UINT : UMTX_OP_WAIT_UINT_PRIVATE, id, NULL, - tsp); + shared ? UMTX_OP_WAIT_UINT : UMTX_OP_WAIT_UINT_PRIVATE, id, + abstime != NULL ? (void *)(uintptr_t)((clockid << 16) | UMTX_WAIT_ABSTIME) : 0, + __DECONST(void *, abstime)); } int Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Wed Feb 22 01:50:13 2012 (r231988) +++ head/sys/kern/kern_umtx.c Wed Feb 22 03:22:49 2012 (r231989) @@ -970,17 +970,26 @@ do_unlock_umtx32(struct thread *td, uint } #endif +static inline int +tstohz(const struct timespec *tsp) +{ + struct timeval tv; + + TIMESPEC_TO_TIMEVAL(&tv, tsp); + return tvtohz(&tv); +} + /* * Fetch and compare value, sleep on the address if value is not changed. */ static int do_wait(struct thread *td, void *addr, u_long id, - struct timespec *timeout, int compat32, int is_private) + struct timespec *timeout, int compat32, int is_private, uint32_t flags) { struct umtx_q *uq; - struct timespec ts, ts2, ts3; - struct timeval tv; + struct timespec ets, cts, tts; u_long tmp; + int clockid = (flags >> 16) & 0xFFFF; int error = 0; uq = td->td_umtxq; @@ -1005,12 +1014,22 @@ do_wait(struct thread *td, void *addr, u umtxq_remove(uq); umtxq_unlock(&uq->uq_key); } else { - getnanouptime(&ts); - timespecadd(&ts, timeout); - TIMESPEC_TO_TIMEVAL(&tv, timeout); + kern_clock_gettime(td, clockid, &cts); + if ((flags & UMTX_WAIT_ABSTIME) == 0) { + ets = cts; + timespecadd(&ets, timeout); + } else { + ets = *timeout; + } umtxq_lock(&uq->uq_key); for (;;) { - error = umtxq_sleep(uq, "uwait", tvtohz(&tv)); + if (timespeccmp(&cts, &ets, >=)) { + error = ETIMEDOUT; + break; + } + tts = ets; + timespecsub(&tts, &cts); + error = umtxq_sleep(uq, "uwait", tstohz(&tts)); if (!(uq->uq_flags & UQF_UMTXQ)) { error = 0; break; @@ -1018,15 +1037,7 @@ do_wait(struct thread *td, void *addr, u if (error != ETIMEDOUT) break; umtxq_unlock(&uq->uq_key); - getnanouptime(&ts2); - if (timespeccmp(&ts2, &ts, >=)) { - error = ETIMEDOUT; - umtxq_lock(&uq->uq_key); - break; - } - ts3 = ts; - timespecsub(&ts3, &ts2); - TIMESPEC_TO_TIMEVAL(&tv, &ts3); + kern_clock_gettime(td, clockid, &cts); umtxq_lock(&uq->uq_key); } umtxq_remove(uq); @@ -2941,6 +2952,7 @@ __umtx_op_wait(struct thread *td, struct { struct timespec *ts, timeout; int error; + uint32_t flags; if (uap->uaddr2 == NULL) ts = NULL; @@ -2950,7 +2962,8 @@ __umtx_op_wait(struct thread *td, struct return (error); ts = &timeout; } - return do_wait(td, uap->obj, uap->val, ts, 0, 0); + flags = (uint32_t)(uintptr_t)uap->uaddr1; + return do_wait(td, uap->obj, uap->val, ts, 0, 0, flags); } static int @@ -2958,6 +2971,7 @@ __umtx_op_wait_uint(struct thread *td, s { struct timespec *ts, timeout; int error; + uint32_t flags; if (uap->uaddr2 == NULL) ts = NULL; @@ -2967,7 +2981,8 @@ __umtx_op_wait_uint(struct thread *td, s return (error); ts = &timeout; } - return do_wait(td, uap->obj, uap->val, ts, 1, 0); + flags = (uint32_t)(uintptr_t)uap->uaddr1; + return do_wait(td, uap->obj, uap->val, ts, 1, 0, flags); } static int @@ -2975,6 +2990,7 @@ __umtx_op_wait_uint_private(struct threa { struct timespec *ts, timeout; int error; + uint32_t flags; if (uap->uaddr2 == NULL) ts = NULL; @@ -2984,7 +3000,8 @@ __umtx_op_wait_uint_private(struct threa return (error); ts = &timeout; } - return do_wait(td, uap->obj, uap->val, ts, 1, 1); + flags = (uint32_t)(uintptr_t)uap->uaddr1; + return do_wait(td, uap->obj, uap->val, ts, 1, 1, flags); } static int @@ -3286,6 +3303,7 @@ __umtx_op_wait_compat32(struct thread *t { struct timespec *ts, timeout; int error; + uint32_ flags; if (uap->uaddr2 == NULL) ts = NULL; @@ -3295,7 +3313,8 @@ __umtx_op_wait_compat32(struct thread *t return (error); ts = &timeout; } - return do_wait(td, uap->obj, uap->val, ts, 1, 0); + flags = (uint32_t)(uintptr_t)uap->uaddr1; + return do_wait(td, uap->obj, uap->val, ts, 1, 0, flags); } static int @@ -3394,6 +3413,7 @@ __umtx_op_wait_uint_private_compat32(str { struct timespec *ts, timeout; int error; + uint32_t flags; if (uap->uaddr2 == NULL) ts = NULL; @@ -3403,7 +3423,8 @@ __umtx_op_wait_uint_private_compat32(str return (error); ts = &timeout; } - return do_wait(td, uap->obj, uap->val, ts, 1, 1); + flags = (uint32_t)(uintptr_t)uap->uaddr1; + return do_wait(td, uap->obj, uap->val, ts, 1, 1, flags); } static int Modified: head/sys/sys/umtx.h ============================================================================== --- head/sys/sys/umtx.h Wed Feb 22 01:50:13 2012 (r231988) +++ head/sys/sys/umtx.h Wed Feb 22 03:22:49 2012 (r231989) @@ -87,6 +87,8 @@ #define CVWAIT_ABSTIME 0x02 #define CVWAIT_CLOCKID 0x04 +#define UMTX_WAIT_ABSTIME 0x01 + #define UMTX_CHECK_UNPARKING CVWAIT_CHECK_UNPARKING #ifndef _KERNEL From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 03:36:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CB04106564A; Wed, 22 Feb 2012 03:36:17 +0000 (UTC) (envelope-from mp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8EF48FC13; Wed, 22 Feb 2012 03:36:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M3aGPc032775; Wed, 22 Feb 2012 03:36:16 GMT (envelope-from mp@svn.freebsd.org) Received: (from mp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M3aGwO032763; Wed, 22 Feb 2012 03:36:16 GMT (envelope-from mp@svn.freebsd.org) Message-Id: <201202220336.q1M3aGwO032763@svn.freebsd.org> From: Mark Peek Date: Wed, 22 Feb 2012 03:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231990 - in head: bin/csh contrib/tcsh contrib/tcsh/config contrib/tcsh/nls contrib/tcsh/nls/C contrib/tcsh/nls/et contrib/tcsh/nls/finnish contrib/tcsh/nls/french contrib/tcsh/nls/ger... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 03:36:17 -0000 Author: mp Date: Wed Feb 22 03:36:15 2012 New Revision: 231990 URL: http://svn.freebsd.org/changeset/base/231990 Log: Update to tcsh 6.18.01. Added: head/contrib/tcsh/nls/Makefile.in - copied unchanged from r231922, vendor/tcsh/dist/nls/Makefile.in head/contrib/tcsh/nls/catgen - copied unchanged from r231922, vendor/tcsh/dist/nls/catgen head/contrib/tcsh/svn - copied unchanged from r231922, vendor/tcsh/dist/svn Deleted: head/bin/csh/host.defs head/contrib/tcsh/nls/Makefile Modified: head/bin/csh/Makefile head/bin/csh/config.h head/bin/csh/config_p.h head/contrib/tcsh/Fixes head/contrib/tcsh/Imakefile head/contrib/tcsh/Makefile.in head/contrib/tcsh/Ported head/contrib/tcsh/README head/contrib/tcsh/WishList head/contrib/tcsh/complete.tcsh head/contrib/tcsh/config.guess head/contrib/tcsh/config.h.in head/contrib/tcsh/config.sub head/contrib/tcsh/config/bsd4.4 head/contrib/tcsh/config_f.h head/contrib/tcsh/configure head/contrib/tcsh/configure.in head/contrib/tcsh/ed.chared.c head/contrib/tcsh/ed.inputl.c head/contrib/tcsh/ed.refresh.c head/contrib/tcsh/ed.screen.c head/contrib/tcsh/ed.term.c head/contrib/tcsh/gethost.c head/contrib/tcsh/glob.c head/contrib/tcsh/glob.h head/contrib/tcsh/host.defs head/contrib/tcsh/install-sh head/contrib/tcsh/nls/C/charset head/contrib/tcsh/nls/C/set19 head/contrib/tcsh/nls/et/charset head/contrib/tcsh/nls/et/set1 head/contrib/tcsh/nls/et/set10 head/contrib/tcsh/nls/et/set11 head/contrib/tcsh/nls/et/set13 head/contrib/tcsh/nls/et/set14 head/contrib/tcsh/nls/et/set15 head/contrib/tcsh/nls/et/set16 head/contrib/tcsh/nls/et/set17 head/contrib/tcsh/nls/et/set18 head/contrib/tcsh/nls/et/set19 head/contrib/tcsh/nls/et/set2 head/contrib/tcsh/nls/et/set20 head/contrib/tcsh/nls/et/set21 head/contrib/tcsh/nls/et/set22 head/contrib/tcsh/nls/et/set23 head/contrib/tcsh/nls/et/set24 head/contrib/tcsh/nls/et/set25 head/contrib/tcsh/nls/et/set26 head/contrib/tcsh/nls/et/set27 head/contrib/tcsh/nls/et/set3 head/contrib/tcsh/nls/et/set30 head/contrib/tcsh/nls/et/set4 head/contrib/tcsh/nls/et/set5 head/contrib/tcsh/nls/et/set6 head/contrib/tcsh/nls/et/set7 head/contrib/tcsh/nls/et/set8 head/contrib/tcsh/nls/et/set9 head/contrib/tcsh/nls/finnish/charset head/contrib/tcsh/nls/finnish/set1 head/contrib/tcsh/nls/finnish/set10 head/contrib/tcsh/nls/finnish/set11 head/contrib/tcsh/nls/finnish/set12 head/contrib/tcsh/nls/finnish/set13 head/contrib/tcsh/nls/finnish/set14 head/contrib/tcsh/nls/finnish/set16 head/contrib/tcsh/nls/finnish/set17 head/contrib/tcsh/nls/finnish/set18 head/contrib/tcsh/nls/finnish/set19 head/contrib/tcsh/nls/finnish/set2 head/contrib/tcsh/nls/finnish/set20 head/contrib/tcsh/nls/finnish/set22 head/contrib/tcsh/nls/finnish/set23 head/contrib/tcsh/nls/finnish/set25 head/contrib/tcsh/nls/finnish/set26 head/contrib/tcsh/nls/finnish/set27 head/contrib/tcsh/nls/finnish/set29 head/contrib/tcsh/nls/finnish/set3 head/contrib/tcsh/nls/finnish/set6 head/contrib/tcsh/nls/finnish/set7 head/contrib/tcsh/nls/finnish/set9 head/contrib/tcsh/nls/french/charset head/contrib/tcsh/nls/french/set1 head/contrib/tcsh/nls/french/set10 head/contrib/tcsh/nls/french/set11 head/contrib/tcsh/nls/french/set12 head/contrib/tcsh/nls/french/set13 head/contrib/tcsh/nls/french/set15 head/contrib/tcsh/nls/french/set16 head/contrib/tcsh/nls/french/set17 head/contrib/tcsh/nls/french/set18 head/contrib/tcsh/nls/french/set19 head/contrib/tcsh/nls/french/set2 head/contrib/tcsh/nls/french/set20 head/contrib/tcsh/nls/french/set21 head/contrib/tcsh/nls/french/set22 head/contrib/tcsh/nls/french/set23 head/contrib/tcsh/nls/french/set25 head/contrib/tcsh/nls/french/set26 head/contrib/tcsh/nls/french/set27 head/contrib/tcsh/nls/french/set3 head/contrib/tcsh/nls/french/set30 head/contrib/tcsh/nls/french/set31 head/contrib/tcsh/nls/french/set4 head/contrib/tcsh/nls/french/set6 head/contrib/tcsh/nls/french/set7 head/contrib/tcsh/nls/french/set8 head/contrib/tcsh/nls/french/set9 head/contrib/tcsh/nls/german/charset head/contrib/tcsh/nls/german/set1 head/contrib/tcsh/nls/german/set10 head/contrib/tcsh/nls/german/set13 head/contrib/tcsh/nls/german/set15 head/contrib/tcsh/nls/german/set16 head/contrib/tcsh/nls/german/set17 head/contrib/tcsh/nls/german/set18 head/contrib/tcsh/nls/german/set19 head/contrib/tcsh/nls/german/set2 head/contrib/tcsh/nls/german/set20 head/contrib/tcsh/nls/german/set22 head/contrib/tcsh/nls/german/set23 head/contrib/tcsh/nls/german/set25 head/contrib/tcsh/nls/german/set26 head/contrib/tcsh/nls/german/set27 head/contrib/tcsh/nls/german/set29 head/contrib/tcsh/nls/german/set3 head/contrib/tcsh/nls/german/set30 head/contrib/tcsh/nls/german/set31 head/contrib/tcsh/nls/german/set4 head/contrib/tcsh/nls/german/set5 head/contrib/tcsh/nls/german/set6 head/contrib/tcsh/nls/german/set7 head/contrib/tcsh/nls/german/set8 head/contrib/tcsh/nls/german/set9 head/contrib/tcsh/nls/greek/charset head/contrib/tcsh/nls/greek/set1 (contents, props changed) head/contrib/tcsh/nls/greek/set10 (contents, props changed) head/contrib/tcsh/nls/greek/set11 (contents, props changed) head/contrib/tcsh/nls/greek/set12 (contents, props changed) head/contrib/tcsh/nls/greek/set13 (contents, props changed) head/contrib/tcsh/nls/greek/set14 (contents, props changed) head/contrib/tcsh/nls/greek/set15 (contents, props changed) head/contrib/tcsh/nls/greek/set16 (contents, props changed) head/contrib/tcsh/nls/greek/set17 (contents, props changed) head/contrib/tcsh/nls/greek/set18 (contents, props changed) head/contrib/tcsh/nls/greek/set19 (contents, props changed) head/contrib/tcsh/nls/greek/set2 (contents, props changed) head/contrib/tcsh/nls/greek/set20 (contents, props changed) head/contrib/tcsh/nls/greek/set21 (contents, props changed) head/contrib/tcsh/nls/greek/set22 (contents, props changed) head/contrib/tcsh/nls/greek/set23 (contents, props changed) head/contrib/tcsh/nls/greek/set25 (contents, props changed) head/contrib/tcsh/nls/greek/set26 (contents, props changed) head/contrib/tcsh/nls/greek/set27 (contents, props changed) head/contrib/tcsh/nls/greek/set29 (contents, props changed) head/contrib/tcsh/nls/greek/set3 (contents, props changed) head/contrib/tcsh/nls/greek/set30 (contents, props changed) head/contrib/tcsh/nls/greek/set31 (contents, props changed) head/contrib/tcsh/nls/greek/set4 (contents, props changed) head/contrib/tcsh/nls/greek/set5 (contents, props changed) head/contrib/tcsh/nls/greek/set6 (contents, props changed) head/contrib/tcsh/nls/greek/set7 (contents, props changed) head/contrib/tcsh/nls/greek/set8 (contents, props changed) head/contrib/tcsh/nls/greek/set9 (contents, props changed) head/contrib/tcsh/nls/italian/charset head/contrib/tcsh/nls/italian/set1 head/contrib/tcsh/nls/italian/set11 head/contrib/tcsh/nls/italian/set13 head/contrib/tcsh/nls/italian/set15 head/contrib/tcsh/nls/italian/set17 head/contrib/tcsh/nls/italian/set19 head/contrib/tcsh/nls/italian/set2 head/contrib/tcsh/nls/italian/set20 head/contrib/tcsh/nls/italian/set22 head/contrib/tcsh/nls/italian/set23 head/contrib/tcsh/nls/italian/set26 head/contrib/tcsh/nls/italian/set3 head/contrib/tcsh/nls/italian/set30 head/contrib/tcsh/nls/italian/set4 head/contrib/tcsh/nls/italian/set6 head/contrib/tcsh/nls/italian/set7 head/contrib/tcsh/nls/ja/charset head/contrib/tcsh/nls/ja/set1 (contents, props changed) head/contrib/tcsh/nls/ja/set10 (contents, props changed) head/contrib/tcsh/nls/ja/set11 (contents, props changed) head/contrib/tcsh/nls/ja/set12 (contents, props changed) head/contrib/tcsh/nls/ja/set13 (contents, props changed) head/contrib/tcsh/nls/ja/set15 (contents, props changed) head/contrib/tcsh/nls/ja/set16 (contents, props changed) head/contrib/tcsh/nls/ja/set17 (contents, props changed) head/contrib/tcsh/nls/ja/set18 (contents, props changed) head/contrib/tcsh/nls/ja/set2 (contents, props changed) head/contrib/tcsh/nls/ja/set21 (contents, props changed) head/contrib/tcsh/nls/ja/set29 (contents, props changed) head/contrib/tcsh/nls/ja/set3 (contents, props changed) head/contrib/tcsh/nls/ja/set30 (contents, props changed) head/contrib/tcsh/nls/ja/set4 (contents, props changed) head/contrib/tcsh/nls/ja/set5 (contents, props changed) head/contrib/tcsh/nls/ja/set6 (contents, props changed) head/contrib/tcsh/nls/ja/set7 (contents, props changed) head/contrib/tcsh/nls/ja/set8 (contents, props changed) head/contrib/tcsh/nls/russian/charset head/contrib/tcsh/nls/russian/set1 (contents, props changed) head/contrib/tcsh/nls/russian/set10 (contents, props changed) head/contrib/tcsh/nls/russian/set11 (contents, props changed) head/contrib/tcsh/nls/russian/set12 (contents, props changed) head/contrib/tcsh/nls/russian/set13 (contents, props changed) head/contrib/tcsh/nls/russian/set14 (contents, props changed) head/contrib/tcsh/nls/russian/set15 (contents, props changed) head/contrib/tcsh/nls/russian/set16 (contents, props changed) head/contrib/tcsh/nls/russian/set17 (contents, props changed) head/contrib/tcsh/nls/russian/set18 (contents, props changed) head/contrib/tcsh/nls/russian/set19 (contents, props changed) head/contrib/tcsh/nls/russian/set2 (contents, props changed) head/contrib/tcsh/nls/russian/set20 (contents, props changed) head/contrib/tcsh/nls/russian/set22 (contents, props changed) head/contrib/tcsh/nls/russian/set23 (contents, props changed) head/contrib/tcsh/nls/russian/set25 (contents, props changed) head/contrib/tcsh/nls/russian/set26 (contents, props changed) head/contrib/tcsh/nls/russian/set27 (contents, props changed) head/contrib/tcsh/nls/russian/set29 (contents, props changed) head/contrib/tcsh/nls/russian/set30 (contents, props changed) head/contrib/tcsh/nls/russian/set31 (contents, props changed) head/contrib/tcsh/nls/russian/set4 (contents, props changed) head/contrib/tcsh/nls/russian/set5 (contents, props changed) head/contrib/tcsh/nls/russian/set6 (contents, props changed) head/contrib/tcsh/nls/russian/set7 (contents, props changed) head/contrib/tcsh/nls/russian/set8 (contents, props changed) head/contrib/tcsh/nls/russian/set9 (contents, props changed) head/contrib/tcsh/nls/spanish/charset head/contrib/tcsh/nls/spanish/set1 head/contrib/tcsh/nls/spanish/set10 head/contrib/tcsh/nls/spanish/set13 head/contrib/tcsh/nls/spanish/set14 head/contrib/tcsh/nls/spanish/set15 head/contrib/tcsh/nls/spanish/set16 head/contrib/tcsh/nls/spanish/set17 head/contrib/tcsh/nls/spanish/set18 head/contrib/tcsh/nls/spanish/set19 head/contrib/tcsh/nls/spanish/set2 head/contrib/tcsh/nls/spanish/set20 head/contrib/tcsh/nls/spanish/set22 head/contrib/tcsh/nls/spanish/set23 head/contrib/tcsh/nls/spanish/set25 head/contrib/tcsh/nls/spanish/set26 head/contrib/tcsh/nls/spanish/set27 head/contrib/tcsh/nls/spanish/set3 head/contrib/tcsh/nls/spanish/set30 head/contrib/tcsh/nls/spanish/set4 head/contrib/tcsh/nls/spanish/set5 head/contrib/tcsh/nls/spanish/set6 head/contrib/tcsh/nls/spanish/set7 head/contrib/tcsh/nls/spanish/set8 head/contrib/tcsh/nls/spanish/set9 head/contrib/tcsh/nls/ukrainian/charset head/contrib/tcsh/nls/ukrainian/set1 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set10 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set11 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set12 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set13 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set14 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set15 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set16 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set17 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set18 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set19 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set2 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set20 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set22 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set23 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set25 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set26 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set27 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set29 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set30 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set31 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set5 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set6 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set7 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set8 (contents, props changed) head/contrib/tcsh/nls/ukrainian/set9 (contents, props changed) head/contrib/tcsh/patchlevel.h head/contrib/tcsh/pathnames.h head/contrib/tcsh/sh.c head/contrib/tcsh/sh.char.c head/contrib/tcsh/sh.char.h head/contrib/tcsh/sh.decls.h head/contrib/tcsh/sh.dir.c head/contrib/tcsh/sh.dol.c head/contrib/tcsh/sh.err.c head/contrib/tcsh/sh.exec.c head/contrib/tcsh/sh.exp.c head/contrib/tcsh/sh.file.c head/contrib/tcsh/sh.func.c head/contrib/tcsh/sh.glob.c head/contrib/tcsh/sh.h head/contrib/tcsh/sh.hist.c head/contrib/tcsh/sh.lex.c head/contrib/tcsh/sh.misc.c head/contrib/tcsh/sh.parse.c head/contrib/tcsh/sh.print.c head/contrib/tcsh/sh.proc.c head/contrib/tcsh/sh.proc.h head/contrib/tcsh/sh.sem.c head/contrib/tcsh/sh.set.c head/contrib/tcsh/sh.time.c head/contrib/tcsh/tc.alloc.c head/contrib/tcsh/tc.const.c head/contrib/tcsh/tc.decls.h head/contrib/tcsh/tc.disc.c head/contrib/tcsh/tc.func.c head/contrib/tcsh/tc.nls.c head/contrib/tcsh/tc.nls.h head/contrib/tcsh/tc.os.c head/contrib/tcsh/tc.os.h head/contrib/tcsh/tc.prompt.c head/contrib/tcsh/tc.sig.c head/contrib/tcsh/tc.sig.h head/contrib/tcsh/tc.str.c head/contrib/tcsh/tc.wait.h head/contrib/tcsh/tc.who.c head/contrib/tcsh/tcsh.man head/contrib/tcsh/tcsh.man2html head/contrib/tcsh/tw.color.c head/contrib/tcsh/tw.init.c head/contrib/tcsh/tw.parse.c head/contrib/tcsh/vms.termcap.c Directory Properties: head/contrib/tcsh/ (props changed) head/contrib/tcsh/nls/greek/set24 (props changed) head/contrib/tcsh/nls/ja/set24 (props changed) head/contrib/tcsh/nls/russian/set21 (props changed) head/contrib/tcsh/nls/russian/set24 (props changed) head/contrib/tcsh/nls/russian/set3 (props changed) head/contrib/tcsh/nls/ukrainian/set21 (props changed) head/contrib/tcsh/nls/ukrainian/set24 (props changed) head/contrib/tcsh/nls/ukrainian/set3 (props changed) head/contrib/tcsh/nls/ukrainian/set4 (props changed) Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Wed Feb 22 03:22:49 2012 (r231989) +++ head/bin/csh/Makefile Wed Feb 22 03:36:15 2012 (r231990) @@ -18,7 +18,7 @@ DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' .endif CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} -WARNS?= 0 +WARNS?= 1 SRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ @@ -116,10 +116,10 @@ gethost: gethost.c sh.err.h tc.const.h s ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ ${TCSHDIR}/gethost.c -tc.defs.c: gethost ${.CURDIR}/host.defs +tc.defs.c: gethost ${TCSHDIR}/host.defs @rm -f ${.TARGET} @echo "/* Do not edit this file, make creates it */" > ${.TARGET} - ./gethost ${.CURDIR}/host.defs >> ${.TARGET} + ./gethost ${TCSHDIR}/host.defs >> ${.TARGET} ed.defns.h: ed.defns.c @rm -f ${.TARGET} Modified: head/bin/csh/config.h ============================================================================== --- head/bin/csh/config.h Wed Feb 22 03:22:49 2012 (r231989) +++ head/bin/csh/config.h Wed Feb 22 03:36:15 2012 (r231990) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* config.h. Generated by configure. */ +/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.in by autoheader. */ /* Define to the type of elements in the array set by `getgroups'. Usually @@ -12,9 +12,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_AUTH_H */ -/* Define to 1 if you have the `catgets' function. */ -#define HAVE_CATGETS 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_CRYPT_H */ @@ -41,6 +38,9 @@ /* Define to 1 if you have the `dup2' function. */ #define HAVE_DUP2 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FEATURES_H */ + /* Define to 1 if you have the `getauthid' function. */ /* #undef HAVE_GETAUTHID */ @@ -54,9 +54,12 @@ #define HAVE_GETPWENT 1 /* Define to 1 if you have the `getutent' function. */ -#define HAVE_GETUTENT 1 +/* #undef HAVE_GETUTENT */ -/* Define if you have the iconv() function. */ +/* Define to 1 if you have the `getutxent' function. */ +#define HAVE_GETUTXENT 1 + +/* Define if you have the iconv() function and it works. */ /* #undef HAVE_ICONV */ /* Define to 1 if you have the header file. */ @@ -65,6 +68,9 @@ /* Define to 1 if the system has the type `long long'. */ #define HAVE_LONG_LONG 1 +/* Define to 1 if you have the `mallinfo' function. */ +/* #undef HAVE_MALLINFO */ + /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #define HAVE_MBRTOWC 1 @@ -77,6 +83,9 @@ /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -86,6 +95,9 @@ /* Define to 1 if you have the `nl_langinfo' function. */ #define HAVE_NL_LANGINFO 1 +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -120,22 +132,34 @@ /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 -/* Define to 1 if `d_ino' is member of `struct dirent'. */ +/* Define to 1 if `d_ino' is a member of `struct dirent'. */ #define HAVE_STRUCT_DIRENT_D_INO 1 -/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -/* Define to 1 if `ut_host' is member of `struct utmp'. */ +/* Define to 1 if `ut_host' is a member of `struct utmpx'. */ +#define HAVE_STRUCT_UTMPX_UT_HOST 1 + +/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */ +#define HAVE_STRUCT_UTMPX_UT_TV 1 + +/* Define to 1 if `ut_user' is a member of `struct utmpx'. */ +#define HAVE_STRUCT_UTMPX_UT_USER 1 + +/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_XTIME */ + +/* Define to 1 if `ut_host' is a member of `struct utmp'. */ #define HAVE_STRUCT_UTMP_UT_HOST 1 -/* Define to 1 if `ut_tv' is member of `struct utmp'. */ +/* Define to 1 if `ut_tv' is a member of `struct utmp'. */ #define HAVE_STRUCT_UTMP_UT_TV 1 -/* Define to 1 if `ut_user' is member of `struct utmp'. */ +/* Define to 1 if `ut_user' is a member of `struct utmp'. */ #define HAVE_STRUCT_UTMP_UT_USER 1 -/* Define to 1 if `ut_xtime' is member of `struct utmp'. */ +/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_XTIME */ /* Define to 1 if you have the `sysconf' function. */ @@ -179,25 +203,31 @@ /* Support NLS. */ #define NLS 1 +/* Support NLS catalogs. */ +#define NLS_CATALOGS 1 + /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" +#define PACKAGE_BUGREPORT "http://bugs.gw.com/" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "tcsh" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "tcsh 6.18.01" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "tcsh" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "6.18.01" /* Define to 1 if the `setpgrp' function takes no argument. */ /* #undef SETPGRP_VOID */ -/* The size of a `wchar_t', as computed by sizeof. */ +/* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 4 /* Define to 1 if the `S_IS*' macros in do not work properly. */ @@ -206,6 +236,11 @@ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ @@ -215,7 +250,7 @@ /* Define to `int' if does not define. */ /* #undef mode_t */ -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define to `int' if neither nor define. */ @@ -227,6 +262,10 @@ /* Define to `int' if doesn't define. */ /* #undef uid_t */ +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ /* #undef volatile */ @@ -234,9 +273,5 @@ #include "config_p.h" #include "config_f.h" -#ifndef NO_NLS_CATALOGS -#define NLS_CATALOGS -#endif - /* Work around a vendor issue where config_f.h is #undef'ing this setting */ #define SYSMALLOC Modified: head/bin/csh/config_p.h ============================================================================== --- head/bin/csh/config_p.h Wed Feb 22 03:22:49 2012 (r231989) +++ head/bin/csh/config_p.h Wed Feb 22 03:36:15 2012 (r231990) @@ -106,9 +106,6 @@ #elif defined(__APPLE__) # define SYSMALLOC - -#else -# define NLS_CATALOGS #endif #endif /* _h_config */ Modified: head/contrib/tcsh/Fixes ============================================================================== --- head/contrib/tcsh/Fixes Wed Feb 22 03:22:49 2012 (r231989) +++ head/contrib/tcsh/Fixes Wed Feb 22 03:36:15 2012 (r231990) @@ -1,3 +1,147 @@ + 6. V6.18.01 - 20120214 + 5. fix interruptible wait again + 4. ignore bogus compiler overflow message + 3. cleanup ifdefs in utmp code, and provide default array entries + 2. Ignore #machine entries in host.defs + 1. Detect missing ) in gethost.c (Corinna Vinschen) + +104. V6.18.00 - 20120114 +103. remove unused variables. +102. Make gethost use definitions for x __x__ and __x automatically. +101. More utmp fixes +100. V6.17.10 - 20120105 + 99. Add more FreeBSD/NetBSD machines + 98. Add portability wrapper for gencat + 97. Fix warning for write in SYSMALLOC systems. + 96. V6.17.09 - 20120102 + 95. revert gencat handling to pre-cygwin fixes (without the env settings) + 94. remove stray endutent() + 93. V6.17.08 - 20111230 + 92. Remove - from gencat + 91. Provide support for malloc_usable_size() so that linux works again + without SYSMALLOC + 90. Add support for FreeBSD's utmpx. + 89. V6.17.07 - 20111227 + 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and + there are more than 10 jobs. + 87. PR/155: Default $anyerror to set for backward compatibility + 86. PR/149: Don't print -1 in %j (Vojtech Vitek) + 85. handle -- on chdir commands as the end of options processing so that + they can process a directory like -x without resorting to ./-x + (Andrew Stevenson) + 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (Robert Byrnes) + 83. PR/38: Null check for jobs (Kurt Miller) + 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger) + 81. PR/120: string0 in filetest does not have enough space. + 80. V6.17.06 - 20110415 + 79. PR/110: Add $anyerror to select behavior. Default to the new one. + 78. Don't try to spell commands that are correct (Rouben Rostamian) + [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo; + chmod +x foo; set correct=cmd; ./foo -> ../foo] + 77. Don't push the syntax struct on the cleanup stack, because on foo;bar + if foo fails, we will free bar prematurely (Ben Miller) + 76. Avoid infinite loop while trying to print the pid of a dying process + to a closed file (Bob Arendt) + 75. Handle completion of ${ variables (Anthony Mallet) + 74. Add --disable-nls-catalogs (Corinna Vinschen) + 73. convert message catalogs to UTF-8 (Werner Fink) + 72. check that the NLS path works before setting $NLSPATH. + 71. use SYSMALLOC for GLIBC (Werner Fink) + 70. use mallinfo for SYSMALLOC (Corinna Vinschen) + 69. V6.17.05 - 20110201 + 68. Use mkstemp() if there for here docs (Werner Fink) + 67. Fix handling of errors and exit values in builtins (Werner Fink) + 66. Better pty name detection (Werner Fink) + 65. Enable NLS catalogs on Cygwin (Corinna Vinschen) + 64. NLSPATH handling fixes (Corinna Vinschen) + 63. Avoid infrequent exit when tcsh cd's into a non-existent directory + https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink) + 62. Don't try to spell check full path binaries that are correct because + they can cause hangs when other nfs partitions are hung. (Werner Fink) + 61. Avoid nested interrupts when exiting causing history writing to fail + https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink) + 60. Instead of giving an error or ignoring lines with missing eol at eof, + process them. + 59. Avoid leaking fd's in mail check (Werner Fink) + 58. Add cygwin_xcrypt() (Corinna Vinschen) + 57. Recognize i686 (Corinna Vinschen) + 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin + settings (Corinna Vinschen) + 55. Avoid double slashes in cdpath (Corinna Vinschen) + 54. V6.17.04 - 20110118 + 53. Revert PR/110, breaks the test suite. + 52. V6.17.03 - 20110117 + 51. PR/102: Complain on input files with missing trailing \n + 50. PR/104: If atime == mtime we don't have new mail. + 49. PR/113: Don't allow illegal variable names to be set. + 48. PR/112: don't set $REMOTEHOST on the local machine. + 47. PR/110: exit status of the pipeline should be the status of the last + command. + 46. Android support (Corinna Vinschen) + 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that + translates unshifted 7 bit ASCII (Werner Fink) + 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL + (Jean-Luc Leger) + 43. PR/109: make wait interruptible (Vojtech Vitek) + 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues + (Robert Byrnes) + 41. remove .bat and .cmd handling for executables on cygwin (Corinna Vinschen) + 40. Don't echo history while history -L or history -M + 39. Check for EOS before ** from Greg Dionne + 38. Don't fork in backeval from Bryan Mason + 37. Better globstar support from Greg Dionne + 36. Error out when processing the last incomplete line instead of silently + ignoring it (Anders Kaseorg) + 35. Fix SEGV from echo `` + 34. Better fixes for histchars and promptchars (nargs) + 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context. + (Fabio Fabbri) + 32. V6.17.02 - 20100512 + 31. PR/79: nargs: Better handling for promptchars. + 30. PR/97: Add parseoctal to retain compatibility with previous versions (Jim + Zajkowski) + 29. PR/84: Performance fixes for large history merges (add + hashtable (Ted Anderson) + 28. Revert previous #23; people should use $histlit if they want this + feature. + 27. Don't kill "hup" background jobs when a child of the shell exits. + From Debian. + 26. Ignore \r\n in the command line options for OS's that don't strip + these from #!; from Debian + 25. Fix enhanced missing patch (Greg Dionne) + 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now. + (Corinna Vinschen) + 23. Turn HistLit on while recording history to avoid \!\! losing its \. + From Debian + 22. set autoexpand; set histchars="";\n crash. From Debian + 21. V6.17.01 - 20100506 + 20. unset verbose while we are reading the history file to avoid echoing + to the terminal. (Jeffrey Bastian) + 19. globstar addition, Enhance addition, euid, euser, gid variables + (Greg Dionne) + 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks) + 17. Handle UTF-16 surrogates (Corinna Vinschen) + 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (Corinna Vinschen) + 15. Better support for Solaris >= 2.9 (Thomas Uhle) + 14. Change internal expression calculations to long long so that we can + deal with > 32 bit time, inodes, uids, file sizes etc. + 13. Add new linux resource limits. + 12. Don't print 'Exit X' when printexitvalue is set in `` expressions + (Jeff Bastian) + 11. Add more LS_COLORS vars (M.H. Anderson) + 10. Reduce whitespace in Makefile (Don Estabrook) + 9. Manual page fixes (Alan R. S. Bueno) + 8. Remove history in loops bug from the documentation (Holger Weiss) + 7. Add autorehash (Holger Weiss) + 6. Add history.at (Ted Anderson) + 5. Better NLSPATH handling (Norm Jacobs) + 4. Fix hostname building from utmp (Cyrus Rahman) + 3. Handle pending signals before flush so that the the history file does + not get truncated. (Ted Anderson) + 2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil) + 1. remember to closedir in mailchk (from Werner Fink, reported by + David Binderman) + 21. V6.17.00 - 20090710 20. Fix dataroot autoconf issue. 19. Fix directory stuff for unit tests. Modified: head/contrib/tcsh/Imakefile ============================================================================== --- head/contrib/tcsh/Imakefile Wed Feb 22 03:22:49 2012 (r231989) +++ head/contrib/tcsh/Imakefile Wed Feb 22 03:36:15 2012 (r231990) @@ -1,5 +1,5 @@ XCOMM -XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $ +XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -93,7 +93,11 @@ ones. Please send in your fixes and add # if (OSMinorVersion < 6) # define ConfigH sol24 # else -# define ConfigH sol26 +# if (OSMinorVersion < 9) +# define ConfigH sol26 +# else +# define ConfigH sol29 +# endif # endif # endif # endif Modified: head/contrib/tcsh/Makefile.in ============================================================================== --- head/contrib/tcsh/Makefile.in Wed Feb 22 03:22:49 2012 (r231989) +++ head/contrib/tcsh/Makefile.in Wed Feb 22 03:36:15 2012 (r231990) @@ -1,4 +1,4 @@ -# $tcsh: Makefile.in,v 3.40 2009/06/24 22:09:05 christos Exp $ +# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -26,22 +26,27 @@ CF=-c CPPFLAGS=-I. -I$(srcdir) LFLAGS= -#LFLAGS= -Zn10000 # hpux lint +# hpux lint +#LFLAGS= -Zn10000 -CFLAGS = @CFLAGS@ # This is set by autoconf. -#CFLAGS= -g # debug -#CFLAGS= -O # production -#CFLAGS= # Broken optimizers.... +# This is set by autoconf: +CFLAGS = @CFLAGS@ +# debug: +#CFLAGS= -g +# production: +#CFLAGS= -O +# Broken optimizers.... +#CFLAGS= #CFLAGS= -g -pg -DPROF #CFLAGS= -O -pg -DPROF # gcc 1.00-1.37 -#CFLAGS= -O -finline-functions -fstrength-reduce +#CFLAGS= -O -finline-functions -fstrength-reduce # gcc 1.37-1.40 -#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce +#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce # add -msoft-float for 68881 machines. # gcc 2.0 @@ -67,8 +72,10 @@ CFLAGS = @CFLAGS@ # This is set by auto #CFLAGS= -O -Mnodebug -Mnoperfmon # DEC Alpha OSF/1 -#CFLAGS= -O2 -Olimit 2000 ## Normal Optimization -#CFLAGS= -O3 -Olimit 2000 ## Full Optimization - may not work +## Normal Optimization +#CFLAGS= -O2 -Olimit 2000 +## Full Optimization - may not work +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u @@ -77,7 +84,8 @@ CFLAGS = @CFLAGS@ # This is set by auto # global optimizer! (-O3). # On SGI 4.0+ you need to add -D__STDC__ too. #CFLAGS= -O3 -#CFLAGS= -O3 -Olimit 2000 ## Ultrix 4.2a +## Ultrix 4.2a +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u ## Ultrix and gnu-make need that @@ -110,14 +118,14 @@ CFLAGS = @CFLAGS@ # This is set by auto # CFLAGS= -O3 # SINIX RMx00 -#CFLAGS= -O # -D_POSIX_SOURCE # -kansi +#CFLAGS= -O# -D_POSIX_SOURCE# -kansi # Apollo's with cc [apollo builtins don't work with gcc] # and apollo should not define __STDC__ if it does not have # the standard header files. RT's (aos4.3) need that too; # you might want to skip the -O on the rt's... Not very wise. # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA) -#DFLAGS=-U__STDC__ +#DFLAGS=-U__STDC__ #DFLAGS=-D_IBMESA # On aix2.2.1 we need more compiler space. #DFLAGS=-Nd4000 -Nn3000 @@ -142,17 +150,25 @@ DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcs ################################################################ ## LDFLAGS. Define something here if you need to ################################################################ -LDFLAGS= @LDFLAGS@ ## This is set by autoconf. -#LDFLAGS= ## The simplest, suitable for all. -#LDFLAGS= -s ## Stripped. Takes less space on disk. -#LDFLAGS= -s -n ## Pure executable. Spares paging over -# ## the network for machines with local -# ## swap but external /usr/local/bin . -#LDFLAGS= -s -n -Bstatic ## Without dynamic linking. (SunOS/cc) -#LDFLAGS= -s -n -static ## Without dynamic linking. (SunOS/gcc) -#LDFLAGS= -Wl,-s,-n ## Stripped, shared text (Unicos) -#LDFLAGS= -s -static ## Link statically. (linux) -#LDFLAGS= -s -N ## Impure executable (linux) +## This is set by autoconf: +LDFLAGS= @LDFLAGS@ +## The simplest, suitable for all. +#LDFLAGS= +## Stripped. Takes less space on disk. +#LDFLAGS= -s +## Pure executable. Spares paging over the network for machines with +## local swap but external /usr/local/bin . +#LDFLAGS= -s -n +## Without dynamic linking. (SunOS/cc) +#LDFLAGS= -s -n -Bstatic +## Without dynamic linking. (SunOS/gcc) +#LDFLAGS= -s -n -static +## Stripped, shared text (Unicos) +#LDFLAGS= -Wl,-s,-n +## Link statically. (linux) +#LDFLAGS= -s -static +## Impure executable (linux) +#LDFLAGS= -s -N ################################################################ ## SBINLDFLAGS. Flags to build a tcsh suitable for installation in @@ -164,53 +180,100 @@ SBINLDFLAGS=-Wl,-R/etc/lib,-I/etc/lib/ld ################################################################ ## LIBES. Pick one, or roll your own. ################################################################ -LIBES= @LIBS@ ## This is set by autoconf. -#LIBES= -ltermcap ## BSD style things -#LIBES= -ltermcap ## SunOS, HP-UX, pyramid -#LIBES= -ltermcap ## Linux -#LIBES= -ltermcap -lshadow ## Linux with PW_SHADOW -#LIBES= -ltermcap -lsec ## Tek XD88/10 (UTekV) with PW_SHADOW -#LIBES= -ltermcap -lsec ## Motorola MPC (sysV88) with PW_SHADOW -#LIBES= -ltermcap -lcs ## Mach -#LIBES= -ltermcap -lbsd ## DEC osf1 on the alpha -#LIBES= -ltermcap -lbsd ## Intel paragon -#LIBES= -ltermcap -lbsd ## Clipper intergraph -#LIBES= -ltermcap -lseq ## Sequent's Dynix -#LIBES= -ltermcap -lauth ## Ultrix with Enhanced Security -#LIBES= -ltermcap -ldir -lx ## Xenix 386 style things -#LIBES= -ltermcap -lndir -lsocket -ljobs ## masscomp RTU6.0 -#LIBES= -lcurses ## AIX on the rt -#LIBES= -lcurses ## TitanOS on the stellar -#LIBES= -ltermlib -lsocket -lnsl ## SysV4 w/o BSDTIMES or Solaris 2 -#LIBES= -lcurses ## SysV3 w/o networking -#LIBES= -lcurses -lnet ## SysV3 with networking -#LIBES= -lcurses -ldir ## SysV2 w/o networking & dirlib -#LIBES= -lcurses -ldir -lnet ## SysV2 with networking & dirlib -#LIBES= -lcurses -lbsd ## AIX on the IBM 370 or rs6000 or ps2 -#LIBES= -lcurses -lbsd ## ETA10 -#LIBES= -lcurses -lbsd ## Irix3.1 on the SGI-IRIS4D -#LIBES= -lcurses -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D w/o yp -#LIBES= -lcurses -lsun -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D with yp -#LIBES= -lcurses -lsocket -lbsd ## Amdahl UTS 2.1 -#LIBES= -lcurses -lsocket ## Intel's hypercube. -#LIBES= -lcurses -lsocket ## ns32000 based Opus. -#LIBES= -lcurses -lcposix ## ISC 2.2 without networking -#LIBES= -lcposix -lc_s -lcurses -linet ## ISC 2.2 with networking -#LIBES= -lcurses -lsec -lc_s ## ISC 2.0.2 without networking -#LIBES= -lcurses -linet -lsec -lc_s ## ISC 2.0.2 with networking -#LIBES= -lcurses -lintl -lcrypt ## SCO SysVR3.2v2.0 -#LIBES= -lcurses -lintl -lsocket -lcrypt ## SCO+ODT1.1 -#LIBES= -lposix -ltermcap ## A/UX 2.0 -#LIBES= -lposix -ltermcap -lc_s ## A/UX 3.0 -#LIBES= -ldirent -lcurses ## att3b1 cc w/o shared lib & dirlib -#LIBES= -shlib -ldirent -lcurses ## att3b1 gcc with shared lib & dirlib -#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a ## SysV4 with BSDTIMES -#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a ## Stardent Vistra -#LIBES= -ltermc ## emx under OS/2 -#LIBES= ## Minix, VMS_POSIX -#LIBES= -ltermcap -lcrypt ## Multiflow -#LIBES= -ltermcap -lcrypt ## NetBSD -#LIBES= -lcurses ## DDE Supermax +## This is set by autoconf. +LIBES= @LIBS@ +## BSD style things +#LIBES= -ltermcap +## SunOS, HP-UX, pyramid +#LIBES= -ltermcap +## Linux +#LIBES= -ltermcap +## Linux with PW_SHADOW +#LIBES= -ltermcap -lshadow +## Tek XD88/10 (UTekV) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Motorola MPC (sysV88) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Mach +#LIBES= -ltermcap -lcs +## DEC osf1 on the alpha +#LIBES= -ltermcap -lbsd +## Intel paragon +#LIBES= -ltermcap -lbsd +## Clipper intergraph +#LIBES= -ltermcap -lbsd +## Sequent's Dynix +#LIBES= -ltermcap -lseq +## Ultrix with Enhanced Security +#LIBES= -ltermcap -lauth +## Xenix 386 style things +#LIBES= -ltermcap -ldir -lx +## masscomp RTU6.0 +#LIBES= -ltermcap -lndir -lsocket -ljobs +## AIX on the rt +#LIBES= -lcurses +## TitanOS on the stellar +#LIBES= -lcurses +## SysV4 w/o BSDTIMES or Solaris 2 +#LIBES= -ltermlib -lsocket -lnsl +## SysV3 w/o networking +#LIBES= -lcurses +## SysV3 with networking +#LIBES= -lcurses -lnet +## SysV2 w/o networking & dirlib +#LIBES= -lcurses -ldir +## SysV2 with networking & dirlib +#LIBES= -lcurses -ldir -lnet +## AIX on the IBM 370 or rs6000 or ps2 +#LIBES= -lcurses -lbsd +## ETA10 +#LIBES= -lcurses -lbsd +## Irix3.1 on the SGI-IRIS4D +#LIBES= -lcurses -lbsd +## Irix3.3 on the SGI-IRIS4D w/o yp +#LIBES= -lcurses -lbsd -lc_s +## Irix3.3 on the SGI-IRIS4D with yp +#LIBES= -lcurses -lsun -lbsd -lc_s +## Amdahl UTS 2.1 +#LIBES= -lcurses -lsocket -lbsd +## Intel's hypercube. +#LIBES= -lcurses -lsocket +## ns32000 based Opus. +#LIBES= -lcurses -lsocket +## ISC 2.2 without networking +#LIBES= -lcurses -lcposix +## ISC 2.2 with networking +#LIBES= -lcposix -lc_s -lcurses -linet +## ISC 2.0.2 without networking +#LIBES= -lcurses -lsec -lc_s +## ISC 2.0.2 with networking +#LIBES= -lcurses -linet -lsec -lc_s +## SCO SysVR3.2v2.0 +#LIBES= -lcurses -lintl -lcrypt +## SCO+ODT1.1 +#LIBES= -lcurses -lintl -lsocket -lcrypt +## A/UX 2.0 +#LIBES= -lposix -ltermcap +## A/UX 3.0 +#LIBES= -lposix -ltermcap -lc_s +## att3b1 cc w/o shared lib & dirlib +#LIBES= -ldirent -lcurses +## att3b1 gcc with shared lib & dirlib +#LIBES= -shlib -ldirent -lcurses +## SysV4 with BSDTIMES +#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a +## Stardent Vistra +#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a +## emx under OS/2 +#LIBES= -ltermc +## Minix, VMS_POSIX +#LIBES= +## Multiflow +#LIBES= -ltermcap -lcrypt +## NetBSD +#LIBES= -ltermcap -lcrypt +## DDE Supermax +#LIBES= -lcurses ################################################################ ## EXTRAFLAGS and EXTRALIBS @@ -222,8 +285,10 @@ LIBES= @LIBS@ ## This is set by aut # #Solaris and HPUX require the BSD libraries with AFS. #We use -lc to use only what we require. -#AFSAUXLIB = -lsocket -lnsl -lc -lucb # Solaris -#AFSAUXLIB = -lc -lBSD # HPUX +# Solaris +#AFSAUXLIB = -lsocket -lnsl -lc -lucb +# HPUX +#AFSAUXLIB = -lc -lBSD # #AFSLIB = -L$(AFSLIBDIR) -L$(AFSLIBDIR)/afs -lkauth -lprot -lubik\ # -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\ @@ -244,26 +309,38 @@ EXTRALIBS = @HESLIB@ $(AFSLIB) @LIBICONV # will lose the editor and job control. # This is for setting your C preprocessor value. -CPP = @CPP@ # This is set by autoconf. +# This is set by autoconf. +CPP = @CPP@ # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which # on the suns does not know how to make dynamically linked binaries. -CC = @CC@ # This is set by autoconf. +# This is set by autoconf. +CC = @CC@ #CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra -#CC= gcc -Wall -pipe -B/bin/ # -ansi -pedantic -#CC= gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux) -#CC= shlicc # BSDI2.1 w/ shared libraries +# -ansi -pedantic +#CC= gcc -Wall -pipe -B/bin/ +# Generate code for Intel 486 (linux) +#CC= gcc -m486 -pipe -Wall +# BSDI2.1 w/ shared libraries +#CC= shlicc #CC= cc #CC= occ #CC= acc #CC= pcc #CC= hc -w -#CC= c89 # For VMS/POSIX -#CC= /bin/cc # For suns, w/o gcc and SVR4 -#CC= /usr/lib/sun.compile/cc # FPS 500 (+FPX) with Sun C compiler -#CC= /opt/SUNWspro/bin/cc # Solaris 2.1 -#CC= scc # Alliant fx2800 -#CC= cc -h0,ansi,novector,float0 # for NEC SX-4 +# For VMS/POSIX +#CC= c89 +# For suns, w/o gcc and SVR4 +#CC= /bin/cc +# FPS 500 (+FPX) with Sun C compiler +#CC= /usr/lib/sun.compile/cc +# Solaris 2.1 +#CC= /opt/SUNWspro/bin/cc +# Alliant fx2800 +#CC= scc +# for NEC SX-4 +#CC= cc -h0,ansi,novector,float0 #CC= lcc -wa +CC_FOR_GETHOST = @CC_FOR_GETHOST@ ED= ed AS= as RM= rm @@ -272,8 +349,10 @@ VGRIND= csh /usr/ucb/vgrind CTAGS= /usr/ucb/ctags #XSTR= /usr/ucb/xstr SCCS= /usr/local/sccs -PARALLEL=12 # Make the multi-max run fast. -#P=& # Use Sequent's parallel make +# Make the multi-max run fast. +PARALLEL=12 +# Use Sequent's parallel make +#P=& P= prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -282,12 +361,17 @@ mandir=@datarootdir@/man MANSECT=1 DESTBIN=${DESTDIR}${bindir} DESTMAN=${DESTDIR}${mandir}/man${MANSECT} -# DESTMAN=${DESTDIR}/catman/man${MANSECT} # A/UX -# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4) -# DESTMAN=/usr/catman/1l # Amiga unix (SysVR4) +# A/UX +# DESTMAN=${DESTDIR}/catman/man${MANSECT} +# Stardent Vistra (SysVR4) +# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} +# Amiga unix (SysVR4) +# DESTMAN=/usr/catman/1l EXEEXT=@EXEEXT@ FTPAREA=/usr/spool/ftp +BUILD_CATALOGS = @BUILD_CATALOGS@ + ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ @@ -330,9 +414,9 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin host.defs gethost.c tcsh.man2html configure.in configure config.h.in \ tests/testsuite.at TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \ - tests/expr.at tests/lexical.at tests/mb-eucjp.at tests/mb-utf8.at \ - tests/noexec.at tests/syntax.at tests/subst.at tests/variables.at \ - tests/sh.dol.at + tests/expr.at tests/lexical.at tests/mb-eucjp.at \ + tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \ + tests/variables.at tests/sh.dol.at VHSRCS=${PVSRCS} ${AVSRCS} @@ -345,7 +429,7 @@ DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS} -all: ${BUILD} +all: ${BUILD} catalogs tcsh$(EXEEXT):$(P) ${OBJS} rm -f tcsh$(EXEEXT) core @@ -365,7 +449,7 @@ pure:$(P) ${OBJS} gethost: gethost.c sh.err.h tc.const.h sh.h rm -f gethost - ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS} + ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c tc.defs.c: gethost host.defs @rm -f $@.tmp @@ -463,7 +547,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ } >$(srcdir)/tests/package.m4 -$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir}/tests/testsuite.at $(TESTFILES) +$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir)/tests/testsuite.at $(TESTFILES) autom4te --language=autotest -I $(srcdir)/tests \ $(srcdir)/tests/testsuite.at -o $@.tmp mv $@.tmp $@ @@ -511,20 +595,36 @@ vgrind: install-strip: install -install: tcsh$(EXEEXT) +install: tcsh$(EXEEXT) install.catalogs install.man -mkdir -p ${DESTBIN} -mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT) -strip ${DESTBIN}/tcsh$(EXEEXT) chmod 755 ${DESTBIN}/tcsh$(EXEEXT) +install.catalogs: + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} install DESTDIR=${DESTDIR}) || exit 0 + install.man: tcsh.man -mkdir -p ${DESTMAN} -rm -f ${DESTMAN}/tcsh.${MANSECT} cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT} chmod 444 ${DESTMAN}/tcsh.${MANSECT} -install.cygwin: install install.man +# Amiga Unix +#install.man: tcsh.man +# compress tcsh.man +# cp tcsh.man.Z ${DESTMAN}/tcsh.Z +# chmod 444 ${DESTMAN}/tcsh.Z + +# Apple A/UX +#install.man: tcsh.man +# -rm -f ${DESTMAN}/tcsh.${MANSECT}.Z +# nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z +# chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z + +install.cygwin: install + -gzip ${DESTMAN}/tcsh.${MANSECT} -mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh @@ -542,24 +642,15 @@ install.cygwin: install install.man cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh -# Amiga Unix -#install.man: tcsh.man -# compress tcsh.man -# cp tcsh.man.Z ${DESTMAN}/tcsh.Z -# chmod 444 ${DESTMAN}/tcsh.Z - -# Apple A/UX -#install.man: tcsh.man -# -rm -f ${DESTMAN}/tcsh.${MANSECT}.Z -# nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z -# chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z - -clean: +clean: clean.catalogs ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost ${RM} -f *.${SUF} *.i *.s ${RM} -f sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c ${RM} -f tcsh.*.m tcsh.*.cat +clean.catalogs: + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} clean) || exit 0 + veryclean: clean ${RM} -f Makefile config.h config_p.h ${RM} -f config.status config.cache config.log tcsh.ps @@ -607,7 +698,7 @@ shar: rm -rf tcsh-${VERSION} catalogs: - @(cd nls; make catalogs) + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} catalogs) || exit 0 tcsh-${VERSION}.tar.Z: rm -rf tcsh-${VERSION} Modified: head/contrib/tcsh/Ported ============================================================================== --- head/contrib/tcsh/Ported Wed Feb 22 03:22:49 2012 (r231989) +++ head/contrib/tcsh/Ported Wed Feb 22 03:36:15 2012 (r231990) @@ -7,7 +7,7 @@ find it out-of-date, or you have additio christos -VENDOR : sun +VENDOR : Sun MODELS : sun3, sun4, sun386i COMPILER: cc, gcc, acc CFLAGS : normal @@ -18,7 +18,7 @@ ENVIRON : n/a NOTES : Don't compile with /usr/5bin/cc VERSION : 6.08 -VENDOR : sun +VENDOR : Sun MODELS : sun4, ultra COMPILER: cc, gcc CFLAGS : normal @@ -34,18 +34,29 @@ NOTES : The sunpro compiler cannot compi : point failures of programs exec'ed from tcsh. VERSION : 6.08 -VENDOR : sun +VENDOR : Sun MODELS : ultra COMPILER: WorkShop cc CFLAGS : normal LIBES : -lcurses -lsocket -lnsl -OS : solaris 2.6 +OS : solaris 2.6, 2.7, 8 CONFIG : sol26 ENVIRON : n/a NOTES : none VERSION : 6.08 -VENDOR : sun +VENDOR : Sun +MODELS : ultra, i686, x86_64 +COMPILER: Sun Studio cc +CFLAGS : normal +LIBES : -lcurses -lsocket -lnsl +OS : solaris 9, 10 +CONFIG : sol29 +ENVIRON : n/a +NOTES : none +VERSION : 6.18 + +VENDOR : Sun MODELS : i386 COMPILER: cc, gcc CFLAGS : -D__STDC__=0 @@ -56,7 +67,7 @@ ENVIRON : n/a NOTES : n/a VERSION : 6.04.13 -VENDOR : sun +VENDOR : Sun MODELS : sun4 COMPILER: gcc CFLAGS : normal Modified: head/contrib/tcsh/README ============================================================================== --- head/contrib/tcsh/README Wed Feb 22 03:22:49 2012 (r231989) +++ head/contrib/tcsh/README Wed Feb 22 03:36:15 2012 (r231990) @@ -1,4 +1,4 @@ -This is tcsh version 6.17.00. Tcsh is a version of the Berkeley +This is tcsh version 6.18.01. Tcsh is a version of the Berkeley C-Shell, with the addition of: a command line editor, command and file name completion, listing, etc. and a bunch of small additions to the shell itself. @@ -87,7 +87,7 @@ To install tcsh: 10) Enjoy. -12) PLEASE file any bug reports (and fixes), code for new features at: +11) PLEASE file any bug reports (and fixes), code for new features at: http://bugs.gw.com/ Modified: head/contrib/tcsh/WishList ============================================================================== --- head/contrib/tcsh/WishList Wed Feb 22 03:22:49 2012 (r231989) +++ head/contrib/tcsh/WishList Wed Feb 22 03:36:15 2012 (r231990) @@ -52,17 +52,6 @@ ey ) - bhooglan _________________________________________________________________ - I'm a long-time faithful user of tcsh, and one thing has always bugged - me -- the need to type "rehash" at a prompt when adding a new command. - My suggestions is to change tcsh so before printing "Command not - found.", it first searches its entire path and rebuilds its hash - table. Only after doing this, and if the command is still not in the - path, then print "Command not found.". I realize there are some - extreme cases in which this is suboptimal, but in most cases with - normal users this would be a big win, and simplify the manual and - perhaps even the code. - _________________________________________________________________ - Wish "tcsh -l" would accept other flags. At least "-c". Currently I can't get ssh to have the right environment unless it is a Modified: head/contrib/tcsh/complete.tcsh ============================================================================== --- head/contrib/tcsh/complete.tcsh Wed Feb 22 03:22:49 2012 (r231989) +++ head/contrib/tcsh/complete.tcsh Wed Feb 22 03:36:15 2012 (r231990) @@ -1,5 +1,5 @@ # -# $tcsh: complete.tcsh,v 1.51 2007/10/01 21:51:59 christos Exp $ +# $tcsh: complete.tcsh,v 1.52 2010/05/07 17:54:13 christos Exp $ # example file using the new completion code # # Debian GNU/Linux @@ -636,7 +636,7 @@ if ($?_complete) then complete nmap 'n@-e@`ifconfig -l`@' 'p/*/$hostnames/' complete perldoc 'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@' complete postfix 'n/*/(start stop reload abort flush check)/' - complete postmap 'n/1/(hash: regexp:)' 'c/hash:/f/' 'c/regexp:/f/' + complete postmap 'n/1/(hash: regexp:)/' 'c/hash:/f/' 'c/regexp:/f/' complete rcsdiff 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@' *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 04:19:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E54EF106566B; Wed, 22 Feb 2012 04:19:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D09518FC0C; Wed, 22 Feb 2012 04:19:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M4JXsG034136; Wed, 22 Feb 2012 04:19:33 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M4JX9Q034134; Wed, 22 Feb 2012 04:19:33 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201202220419.q1M4JX9Q034134@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 22 Feb 2012 04:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231991 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 04:19:34 -0000 Author: ae Date: Wed Feb 22 04:19:33 2012 New Revision: 231991 URL: http://svn.freebsd.org/changeset/base/231991 Log: Don't use `m' after m_megapullup. PR: kern/165373 MFC after: 3 days Modified: head/sys/netinet/ipfw/ip_fw_nat.c Modified: head/sys/netinet/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_nat.c Wed Feb 22 03:36:15 2012 (r231990) +++ head/sys/netinet/ipfw/ip_fw_nat.c Wed Feb 22 04:19:33 2012 (r231991) @@ -315,7 +315,7 @@ ipfw_nat(struct ip_fw_args *args, struct } if (retval == PKT_ALIAS_RESPOND) - m->m_flags |= M_SKIP_FIREWALL; + mcl->m_flags |= M_SKIP_FIREWALL; mcl->m_pkthdr.len = mcl->m_len = ntohs(ip->ip_len); /* From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 04:51:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F2FB1065670; Wed, 22 Feb 2012 04:51:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1A98FC08; Wed, 22 Feb 2012 04:51:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M4pHaL035108; Wed, 22 Feb 2012 04:51:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M4pH6k035106; Wed, 22 Feb 2012 04:51:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201202220451.q1M4pH6k035106@svn.freebsd.org> From: Eitan Adler Date: Wed, 22 Feb 2012 04:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231992 - head/sbin/geom/class/sched X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 04:51:18 -0000 Author: eadler Date: Wed Feb 22 04:51:17 2012 New Revision: 231992 URL: http://svn.freebsd.org/changeset/base/231992 Log: Remove reference to gsched_as module, which doesn't actually exist. PR: docs/163043 Submitted by: olgeni Approved by: brd MFC after: 3 days Modified: head/sbin/geom/class/sched/gsched.8 Modified: head/sbin/geom/class/sched/gsched.8 ============================================================================== --- head/sbin/geom/class/sched/gsched.8 Wed Feb 22 04:19:33 2012 (r231991) +++ head/sbin/geom/class/sched/gsched.8 Wed Feb 22 04:51:17 2012 (r231992) @@ -141,7 +141,7 @@ and how to destroy it. # Load the geom_sched module: kldload geom_sched # Load some scheduler classes used by geom_sched: -kldload gsched_rr gsched_as +kldload gsched_rr # Configure device ad0 to use scheduler "rr": geom sched insert -a rr ad0 # Now provider ad0 uses the "rr" algorithm; From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 06:27:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7553106564A; Wed, 22 Feb 2012 06:27:20 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFDA48FC0A; Wed, 22 Feb 2012 06:27:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M6RKv9038154; Wed, 22 Feb 2012 06:27:20 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M6RKRY038145; Wed, 22 Feb 2012 06:27:20 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201202220627.q1M6RKRY038145@svn.freebsd.org> From: Kevin Lo Date: Wed, 22 Feb 2012 06:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231994 - in head: sbin/init usr.bin/chkey usr.bin/enigma usr.bin/lock usr.bin/newgrp usr.sbin/ppp usr.sbin/pw usr.sbin/rpc.yppasswdd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 06:27:20 -0000 Author: kevlo Date: Wed Feb 22 06:27:20 2012 New Revision: 231994 URL: http://svn.freebsd.org/changeset/base/231994 Log: Handle NULL return from crypt(3). Mostly from DragonFly Modified: head/sbin/init/init.c head/usr.bin/chkey/chkey.c head/usr.bin/enigma/enigma.c head/usr.bin/lock/lock.c head/usr.bin/newgrp/newgrp.c head/usr.sbin/ppp/auth.c head/usr.sbin/pw/pw_user.c head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Wed Feb 22 04:52:38 2012 (r231993) +++ head/sbin/init/init.c Wed Feb 22 06:27:20 2012 (r231994) @@ -657,7 +657,8 @@ single_user(void) _exit(0); password = crypt(clear, pp->pw_passwd); bzero(clear, _PASSWORD_LEN); - if (strcmp(password, pp->pw_passwd) == 0) + if (password == NULL || + strcmp(password, pp->pw_passwd) == 0) break; warning("single-user login failed\n"); } Modified: head/usr.bin/chkey/chkey.c ============================================================================== --- head/usr.bin/chkey/chkey.c Wed Feb 22 04:52:38 2012 (r231993) +++ head/usr.bin/chkey/chkey.c Wed Feb 22 06:27:20 2012 (r231994) @@ -94,6 +94,9 @@ main(int argc, char **argv) #ifdef YP char *master; #endif +#ifdef YPPASSWD + char *cryptpw; +#endif while ((ch = getopt(argc, argv, "f")) != -1) switch(ch) { @@ -149,7 +152,8 @@ main(int argc, char **argv) pass = getpass("Password:"); #ifdef YPPASSWD if (!force) { - if (strcmp(crypt(pass, pw->pw_passwd), pw->pw_passwd) != 0) + cryptpw = crypt(pass, pw->pw_passwd); + if (cryptpw == NULL || strcmp(cryptpw, pw->pw_passwd) != 0) errx(1, "invalid password"); } #else Modified: head/usr.bin/enigma/enigma.c ============================================================================== --- head/usr.bin/enigma/enigma.c Wed Feb 22 04:52:38 2012 (r231993) +++ head/usr.bin/enigma/enigma.c Wed Feb 22 06:27:20 2012 (r231994) @@ -41,9 +41,15 @@ setup(char *pw) char salt[3]; unsigned rnd; int32_t seed; + char *cryptpw; strlcpy(salt, pw, sizeof(salt)); - memcpy(buf, crypt(pw, salt), sizeof(buf)); + cryptpw = crypt(pw, salt); + if (cryptpw == NULL) { + fprintf(stderr, "crypt(3) failure\n"); + exit(1); + } + memcpy(buf, cryptpw, sizeof(buf)); seed = 123; for (i=0; i<13; i++) seed = seed*buf[i] + i; Modified: head/usr.bin/lock/lock.c ============================================================================== --- head/usr.bin/lock/lock.c Wed Feb 22 04:52:38 2012 (r231993) +++ head/usr.bin/lock/lock.c Wed Feb 22 06:27:20 2012 (r231994) @@ -94,7 +94,7 @@ main(int argc, char **argv) struct itimerval ntimer, otimer; struct tm *timp; int ch, failures, sectimeout, usemine, vtylock; - char *ap, *mypw, *ttynam, *tzn; + char *ap, *cryptpw, *mypw, *ttynam, *tzn; char hostname[MAXHOSTNAMELEN], s[BUFSIZ], s1[BUFSIZ]; openlog("lock", LOG_ODELAY, LOG_AUTH); @@ -222,7 +222,8 @@ main(int argc, char **argv) } if (usemine) { s[strlen(s) - 1] = '\0'; - if (!strcmp(mypw, crypt(s, mypw))) + cryptpw = crypt(s, mypw); + if (cryptpw == NULL || !strcmp(mypw, cryptpw)) break; } else if (!strcmp(s, s1)) Modified: head/usr.bin/newgrp/newgrp.c ============================================================================== --- head/usr.bin/newgrp/newgrp.c Wed Feb 22 04:52:38 2012 (r231993) +++ head/usr.bin/newgrp/newgrp.c Wed Feb 22 06:27:20 2012 (r231994) @@ -151,7 +151,7 @@ addgroup(const char *grpname) int dbmember, i, ngrps; gid_t egid; struct group *grp; - char *ep, *pass; + char *ep, *pass, *cryptpw; char **p; egid = getegid(); @@ -178,8 +178,10 @@ addgroup(const char *grpname) } if (!dbmember && *grp->gr_passwd != '\0' && getuid() != 0) { pass = getpass("Password:"); - if (pass == NULL || - strcmp(grp->gr_passwd, crypt(pass, grp->gr_passwd)) != 0) { + if (pass == NULL) + return; + cryptpw = crypt(pass, grp->gr_passwd); + if (cryptpw == NULL || strcmp(grp->gr_passwd, cryptpw) != 0) { fprintf(stderr, "Sorry\n"); return; } Modified: head/usr.sbin/ppp/auth.c ============================================================================== --- head/usr.sbin/ppp/auth.c Wed Feb 22 04:52:38 2012 (r231993) +++ head/usr.sbin/ppp/auth.c Wed Feb 22 06:27:20 2012 (r231994) @@ -126,9 +126,11 @@ auth_CheckPasswd(const char *name, const /* Then look up the real password database */ struct passwd *pw; int result; + char *cryptpw; + cryptpw = crypt(key, pw->pw_passwd); result = (pw = getpwnam(name)) && - !strcmp(crypt(key, pw->pw_passwd), pw->pw_passwd); + (cryptpw == NULL || !strcmp(cryptpw, pw->pw_passwd)); endpwent(); return result; #else /* !NOPAM */ Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Wed Feb 22 04:52:38 2012 (r231993) +++ head/usr.sbin/pw/pw_user.c Wed Feb 22 06:27:20 2012 (r231994) @@ -1028,6 +1028,7 @@ pw_pwcrypt(char *password) { int i; char salt[SALTSIZE + 1]; + char *cryptpw; static char buf[256]; @@ -1038,7 +1039,10 @@ pw_pwcrypt(char *password) salt[i] = chars[arc4random_uniform(sizeof(chars) - 1)]; salt[SALTSIZE] = '\0'; - return strcpy(buf, crypt(password, salt)); + cryptpw = crypt(password, salt); + if (cryptpw == NULL) + errx(EX_CONFIG, "crypt(3) failure"); + return strcpy(buf, cryptpw); } Modified: head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c ============================================================================== --- head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Wed Feb 22 04:52:38 2012 (r231993) +++ head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Wed Feb 22 06:27:20 2012 (r231994) @@ -460,6 +460,7 @@ yppasswdproc_update_1_svc(yppasswd *argp int passwd_changed = 0; int shell_changed = 0; int gecos_changed = 0; + char *cryptpw; char *oldshell = NULL; char *oldgecos = NULL; char *passfile_hold; @@ -537,8 +538,8 @@ yppasswdproc_update_1_svc(yppasswd *argp /* Step 2: check that the supplied oldpass is valid. */ - if (strcmp(crypt(argp->oldpass, yp_password.pw_passwd), - yp_password.pw_passwd)) { + cryptpw = crypt(argp->oldpass, yp_password.pw_passwd); + if (cryptpw == NULL || strcmp(cryptpw, yp_password.pw_passwd)) { yp_error("rejected change attempt -- bad password"); yp_error("client address: %s username: %s", inet_ntoa(rqhost->sin_addr), From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 06:45:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B586106566C; Wed, 22 Feb 2012 06:45:05 +0000 (UTC) (envelope-from joel@freebsd.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id 13E4B8FC13; Wed, 22 Feb 2012 06:45:04 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 31D69E3F07A; Wed, 22 Feb 2012 07:28:58 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ggG88fJHeuU8; Wed, 22 Feb 2012 07:28:52 +0100 (CET) Received: from goofy01.vnodelab.local (unknown [212.247.52.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id A16C0E3F079; Wed, 22 Feb 2012 07:28:52 +0100 (CET) Date: Wed, 22 Feb 2012 07:28:50 +0100 From: Joel Dahl To: Mark Peek Message-ID: <20120222062850.GH99651@goofy01.vnodelab.local> References: <201202220336.q1M3aGwO032763@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201202220336.q1M3aGwO032763@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231990 - in head: bin/csh contrib/tcsh contrib/tcsh/config contrib/tcsh/nls contrib/tcsh/nls/C contrib/tcsh/nls/et contrib/tcsh/nls/finnish contrib/tcsh/nls/french contrib/tcsh/nls/ger... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 06:45:05 -0000 On 22-02-2012 3:36, Mark Peek wrote: > Author: mp > Date: Wed Feb 22 03:36:15 2012 > New Revision: 231990 > URL: http://svn.freebsd.org/changeset/base/231990 > > Log: > Update to tcsh 6.18.01. Thank you. :-) -- Joel From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 07:34:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E929A106566B; Wed, 22 Feb 2012 07:34:23 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAF3B8FC0A; Wed, 22 Feb 2012 07:34:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M7YNGN040211; Wed, 22 Feb 2012 07:34:23 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M7YN1F040209; Wed, 22 Feb 2012 07:34:23 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201202220734.q1M7YN1F040209@svn.freebsd.org> From: David Xu Date: Wed, 22 Feb 2012 07:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231995 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 07:34:24 -0000 Author: davidxu Date: Wed Feb 22 07:34:23 2012 New Revision: 231995 URL: http://svn.freebsd.org/changeset/base/231995 Log: Fix typo. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Wed Feb 22 06:27:20 2012 (r231994) +++ head/sys/kern/kern_umtx.c Wed Feb 22 07:34:23 2012 (r231995) @@ -3303,7 +3303,7 @@ __umtx_op_wait_compat32(struct thread *t { struct timespec *ts, timeout; int error; - uint32_ flags; + uint32_t flags; if (uap->uaddr2 == NULL) ts = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 08:30:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B5D11065670; Wed, 22 Feb 2012 08:30:19 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 652A98FC0C; Wed, 22 Feb 2012 08:30:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M8UJjJ041917; Wed, 22 Feb 2012 08:30:19 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M8UJuO041915; Wed, 22 Feb 2012 08:30:19 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201202220830.q1M8UJuO041915@svn.freebsd.org> From: David Xu Date: Wed, 22 Feb 2012 08:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231996 - stable/9/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 08:30:19 -0000 Author: davidxu Date: Wed Feb 22 08:30:18 2012 New Revision: 231996 URL: http://svn.freebsd.org/changeset/base/231996 Log: MFC 231906: Check both seconds and nanoseconds are zero, only checking nanoseconds is zero may trigger timeout too early. It seems a copy&paste bug. Modified: stable/9/lib/libthr/thread/thr_umtx.c Directory Properties: stable/9/lib/libthr/ (props changed) Modified: stable/9/lib/libthr/thread/thr_umtx.c ============================================================================== --- stable/9/lib/libthr/thread/thr_umtx.c Wed Feb 22 07:34:23 2012 (r231995) +++ stable/9/lib/libthr/thread/thr_umtx.c Wed Feb 22 08:30:18 2012 (r231996) @@ -205,7 +205,7 @@ _thr_umtx_timedwait_uint(volatile u_int if (abstime != NULL) { clock_gettime(clockid, &ts); TIMESPEC_SUB(&ts2, abstime, &ts); - if (ts2.tv_sec < 0 || ts2.tv_nsec <= 0) + if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) return (ETIMEDOUT); tsp = &ts2; } else { From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 09:08:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 301031065672; Wed, 22 Feb 2012 09:08:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ACBB8FC12; Wed, 22 Feb 2012 09:08:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M98p4d043224; Wed, 22 Feb 2012 09:08:51 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1M98pFm043222; Wed, 22 Feb 2012 09:08:51 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201202220908.q1M98pFm043222@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Feb 2012 09:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231997 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 09:08:52 -0000 Author: glebius Date: Wed Feb 22 09:08:51 2012 New Revision: 231997 URL: http://svn.freebsd.org/changeset/base/231997 Log: Revert r231829, that was my braino. Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Wed Feb 22 08:30:18 2012 (r231996) +++ head/sys/netgraph/ng_base.c Wed Feb 22 09:08:51 2012 (r231997) @@ -3208,11 +3208,11 @@ ngb_mod_event(module_t mod, int event, v MTX_DEF); #endif ng_qzone = uma_zcreate("NetGraph items", sizeof(struct ng_item), - NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, M_WAITOK); + NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); uma_zone_set_max(ng_qzone, maxalloc); ng_qdzone = uma_zcreate("NetGraph data items", sizeof(struct ng_item), NULL, NULL, NULL, NULL, - UMA_ALIGN_CACHE, M_WAITOK); + UMA_ALIGN_CACHE, 0); uma_zone_set_max(ng_qdzone, maxdata); /* Autoconfigure number of threads. */ if (numthreads <= 0) From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 13:01:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5156E106568C; Wed, 22 Feb 2012 13:01:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31B9F8FC12; Wed, 22 Feb 2012 13:01:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MD1Iak052877; Wed, 22 Feb 2012 13:01:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MD1HLw052872; Wed, 22 Feb 2012 13:01:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202221301.q1MD1HLw052872@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Feb 2012 13:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231998 - head/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 13:01:18 -0000 Author: kib Date: Wed Feb 22 13:01:17 2012 New Revision: 231998 URL: http://svn.freebsd.org/changeset/base/231998 Log: Use DOINGASYNC() to test for async allowance, to honor VFS syncing requests. Noted by: bde MFC after: 1 week Modified: head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/msdosfs/msdosfs_lookup.c head/sys/fs/msdosfs/msdosfs_vnops.c Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Wed Feb 22 09:08:51 2012 (r231997) +++ head/sys/fs/msdosfs/msdosfs_denode.c Wed Feb 22 13:01:17 2012 (r231998) @@ -431,7 +431,7 @@ detrunc(dep, length, flags, cred, td) if (allerror) printf("detrunc(): vtruncbuf error %d\n", allerror); #endif - error = deupdat(dep, !(DETOV(dep)->v_mount->mnt_flag & MNT_ASYNC)); + error = deupdat(dep, !DOINGASYNC((DETOV(dep)))); if (error != 0 && allerror == 0) allerror = error; #ifdef MSDOSFS_DEBUG @@ -510,7 +510,7 @@ deextend(dep, length, cred) } dep->de_FileSize = length; dep->de_flag |= DE_UPDATE | DE_MODIFIED; - return (deupdat(dep, !(DETOV(dep)->v_mount->mnt_flag & MNT_ASYNC))); + return (deupdat(dep, !DOINGASYNC(DETOV(dep)))); } /* Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Wed Feb 22 09:08:51 2012 (r231997) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Wed Feb 22 13:01:17 2012 (r231998) @@ -690,7 +690,7 @@ createde(dep, ddep, depp, cnp) while (--ddep->de_fndcnt >= 0) { if (!(ddep->de_fndoffset & pmp->pm_crbomask)) { - if (DETOV(ddep)->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(DETOV(ddep))) bdwrite(bp); else if ((error = bwrite(bp)) != 0) return error; @@ -720,7 +720,7 @@ createde(dep, ddep, depp, cnp) } } - if (DETOV(ddep)->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(DETOV(ddep))) bdwrite(bp); else if ((error = bwrite(bp)) != 0) return error; @@ -1022,7 +1022,7 @@ removede(pdep, dep) || ep->deAttributes != ATTR_WIN95) break; } - if (DETOV(pdep)->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(DETOV(pdep))) bdwrite(bp); else if ((error = bwrite(bp)) != 0) return error; Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Wed Feb 22 09:08:51 2012 (r231997) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Wed Feb 22 13:01:17 2012 (r231998) @@ -1249,7 +1249,7 @@ abortit: putushort(dotdotp->deStartCluster, dp->de_StartCluster); if (FAT32(pmp)) putushort(dotdotp->deHighClust, dp->de_StartCluster >> 16); - if (fvp->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(fvp)) bdwrite(bp); else if ((error = bwrite(bp)) != 0) { /* XXX should downgrade to ro here, fs is corrupt */ @@ -1383,7 +1383,7 @@ msdosfs_mkdir(ap) putushort(denp[1].deHighClust, pdep->de_StartCluster >> 16); } - if (ap->a_dvp->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(ap->a_dvp)) bdwrite(bp); else if ((error = bwrite(bp)) != 0) goto bad; From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 15:05:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22F64106566C; Wed, 22 Feb 2012 15:05:20 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 042CB8FC14; Wed, 22 Feb 2012 15:05:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MF5JbD057165; Wed, 22 Feb 2012 15:05:19 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MF5JNt057163; Wed, 22 Feb 2012 15:05:19 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201202221505.q1MF5JNt057163@svn.freebsd.org> From: Josh Paetzel Date: Wed, 22 Feb 2012 15:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231999 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 15:05:20 -0000 Author: jpaetzel Date: Wed Feb 22 15:05:19 2012 New Revision: 231999 URL: http://svn.freebsd.org/changeset/base/231999 Log: Fix various typos and normalize spelling. Approved by: kib (mentor) Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Feb 22 13:01:17 2012 (r231998) +++ head/sys/conf/NOTES Wed Feb 22 15:05:19 2012 (r231999) @@ -219,19 +219,19 @@ options MAXCPU=32 # ADAPTIVE_MUTEXES changes the behavior of blocking mutexes to spin # if the thread that currently owns the mutex is executing on another -# CPU. This behaviour is enabled by default, so this option can be used +# CPU. This behavior is enabled by default, so this option can be used # to disable it. options NO_ADAPTIVE_MUTEXES # ADAPTIVE_RWLOCKS changes the behavior of reader/writer locks to spin # if the thread that currently owns the rwlock is executing on another -# CPU. This behaviour is enabled by default, so this option can be used +# CPU. This behavior is enabled by default, so this option can be used # to disable it. options NO_ADAPTIVE_RWLOCKS # ADAPTIVE_SX changes the behavior of sx locks to spin if the thread that # currently owns the sx lock is executing on another CPU. -# This behaviour is enabled by default, so this option can be used to +# This behavior is enabled by default, so this option can be used to # disable it. options NO_ADAPTIVE_SX @@ -437,7 +437,7 @@ options KTRACE_REQUEST_POOL=101 # initial value of the ktr_mask variable which determines at runtime # what events to trace. KTR_CPUMASK determines which CPU's log # events, with bit X corresponding to CPU X. The layout of the string -# passed as KTR_CPUMASK must match a serie of bitmasks each of them +# passed as KTR_CPUMASK must match a series of bitmasks each of them # separated by the ", " characters (ie: # KTR_CPUMASK=("0xAF, 0xFFFFFFFFFFFFFFFF")). KTR_VERBOSE enables # dumping of KTR events to the console by default. This functionality @@ -602,7 +602,7 @@ options FLOWTABLE options SCTP # There are bunches of options: # this one turns on all sorts of -# nastly printing that you can +# nastily printing that you can # do. It's all controlled by a # bit mask (settable by socket opt and # by sysctl). Including will not cause @@ -1269,7 +1269,7 @@ hint.sa.1.target="6" # The sg driver provides a passthrough API that is compatible with the # Linux SG driver. It will work in conjunction with the COMPAT_LINUX # option to run linux SG apps. It can also stand on its own and provide -# source level API compatiblity for porting apps to FreeBSD. +# source level API compatibility for porting apps to FreeBSD. # # Target Mode support is provided here but also requires that a SIM # (SCSI Host Adapter Driver) provide support as well. @@ -1434,7 +1434,7 @@ options SC_NORM_REV_ATTR=(FG_YELLOW|BG_ options SC_KERNEL_CONS_ATTR=(FG_RED|BG_BLACK) options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED) -# The following options will let you change the default behaviour of +# The following options will let you change the default behavior of # cut-n-paste feature options SC_CUT_SPACES2TABS # convert leading spaces into tabs options SC_CUT_SEPCHARS=\"x09\" # set of characters that delimit words @@ -1835,7 +1835,7 @@ hint.uart.0.baud="115200" # specifically, the 0x20 flag can also be set (see above). # Currently, at most one unit can have console support; the # first one (in config file order) with this flag set is -# preferred. Setting this flag for sio0 gives the old behaviour. +# preferred. Setting this flag for sio0 gives the old behavior. # 0x80 use this port for serial line gdb support in ddb. Also known # as debug port. # @@ -2335,7 +2335,7 @@ hint.gusc.0.flags="0x13" # sanity checking and possible increase of # verbosity. # -# SND_DIAGNOSTIC Simmilar in a spirit of INVARIANTS/DIAGNOSTIC, +# SND_DIAGNOSTIC Similar in a spirit of INVARIANTS/DIAGNOSTIC, # zero tolerance against inconsistencies. # # SND_FEEDER_MULTIFORMAT By default, only 16/32 bit feeders are compiled @@ -2418,7 +2418,7 @@ device cmx # options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC # Specifies the default video capture mode. # This is required for Dual Crystal (28&35Mhz) boards where PAL is used -# to prevent hangs during initialisation, e.g. VideoLogic Captivator PCI. +# to prevent hangs during initialization, e.g. VideoLogic Captivator PCI. # # options BKTR_USE_PLL # This is required for PAL or SECAM boards with a 28Mhz crystal and no 35Mhz @@ -2428,7 +2428,7 @@ device cmx # This enables IOCTLs which give user level access to the GPIO port. # # options BKTR_NO_MSP_RESET -# Prevents the MSP34xx reset. Good if you initialise the MSP in another OS first +# Prevents the MSP34xx reset. Good if you initialize the MSP in another OS first # # options BKTR_430_FX_MODE # Switch Bt878/879 cards into Intel 430FX chipset compatibility mode. From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 17:52:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B9A0106567E; Wed, 22 Feb 2012 17:52:53 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AF5A8FC14; Wed, 22 Feb 2012 17:52:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MHqrtf062552; Wed, 22 Feb 2012 17:52:53 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MHqrAk062550; Wed, 22 Feb 2012 17:52:53 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201202221752.q1MHqrAk062550@svn.freebsd.org> From: Maxim Konovalov Date: Wed, 22 Feb 2012 17:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232000 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 17:52:53 -0000 Author: maxim Date: Wed Feb 22 17:52:53 2012 New Revision: 232000 URL: http://svn.freebsd.org/changeset/base/232000 Log: DragonFly 3.0.1 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Wed Feb 22 15:05:19 2012 (r231999) +++ head/share/misc/bsd-family-tree Wed Feb 22 17:52:53 2012 (r232000) @@ -251,7 +251,7 @@ FreeBSD 5.2 | | | 10.7 | | | | | | OpenBSD 5.0 | +--FreeBSD | | | | - | 9.0 | | | | + | 9.0 | | | DragonFly 3.0.1 | v | | | | | | | | | FreeBSD 10 -current | NetBSD -current OpenBSD -current | @@ -543,6 +543,7 @@ OpenBSD 4.9 2011-05-01 [OBD] Mac OS X 10.7 2011-07-20 [APL] OpenBSD 5.0 2011-11-01 [OBD] FreeBSD 9.0 2012-01-12 [FBD] +DragonFly 3.0.1 2012-02-21 [DFB] Bibliography ------------------------ From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 20:00:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75EC71065673; Wed, 22 Feb 2012 20:00:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1F48FC15; Wed, 22 Feb 2012 20:00:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MK0nOJ066445; Wed, 22 Feb 2012 20:00:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MK0nYA066443; Wed, 22 Feb 2012 20:00:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202222000.q1MK0nYA066443@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Feb 2012 20:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232001 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 20:00:49 -0000 Author: kib Date: Wed Feb 22 20:00:48 2012 New Revision: 232001 URL: http://svn.freebsd.org/changeset/base/232001 Log: Free Josh. Approved by: core (implicit) Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Wed Feb 22 17:52:53 2012 (r232000) +++ svnadmin/conf/mentors Wed Feb 22 20:00:48 2012 (r232001) @@ -26,7 +26,6 @@ jhibbits nwhitehorn jimharris scottl Co-mentor: sbruno jinmei gnn jonathan rwatson -jpaetzel kib kargl das melifaro ae Co-mentor: kib miwi rwatson From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 20:01:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45FA51065670; Wed, 22 Feb 2012 20:01:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 359528FC0A; Wed, 22 Feb 2012 20:01:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MK1dTv066506; Wed, 22 Feb 2012 20:01:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MK1dOg066504; Wed, 22 Feb 2012 20:01:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202222001.q1MK1dOg066504@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Feb 2012 20:01:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232002 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 20:01:39 -0000 Author: kib Date: Wed Feb 22 20:01:38 2012 New Revision: 232002 URL: http://svn.freebsd.org/changeset/base/232002 Log: Remove wrong comment. Discussed with: alc MFC after: 3 days Modified: head/sys/vm/vnode_pager.h Modified: head/sys/vm/vnode_pager.h ============================================================================== --- head/sys/vm/vnode_pager.h Wed Feb 22 20:00:48 2012 (r232001) +++ head/sys/vm/vnode_pager.h Wed Feb 22 20:01:38 2012 (r232002) @@ -40,10 +40,6 @@ #ifdef _KERNEL -/* - * XXX Generic routines; currently called by badly written FS code; these - * XXX should go away soon. - */ int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, int reqpage); int vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m, From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 20:03:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3E80106566C; Wed, 22 Feb 2012 20:03:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B340A8FC1D; Wed, 22 Feb 2012 20:03:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MK3pv6066611; Wed, 22 Feb 2012 20:03:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MK3pfl066609; Wed, 22 Feb 2012 20:03:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202222003.q1MK3pfl066609@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Feb 2012 20:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232003 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 20:03:51 -0000 Author: kib Date: Wed Feb 22 20:03:51 2012 New Revision: 232003 URL: http://svn.freebsd.org/changeset/base/232003 Log: Properly lock DQREF() with dqhlock. Missed locking caused counter corruption. Assert that the dq reference value is sane before decrementing it. Reported and tested by: pho MFC after: 1 week Modified: head/sys/ufs/ufs/ufs_quota.c Modified: head/sys/ufs/ufs/ufs_quota.c ============================================================================== --- head/sys/ufs/ufs/ufs_quota.c Wed Feb 22 20:01:38 2012 (r232002) +++ head/sys/ufs/ufs/ufs_quota.c Wed Feb 22 20:03:51 2012 (r232003) @@ -1469,6 +1469,7 @@ dqrele(struct vnode *vp, struct dquot *d if (dq == NODQUOT) return; DQH_LOCK(); + KASSERT(dq->dq_cnt > 0, ("Lost dq %p reference 1", dq)); if (dq->dq_cnt > 1) { dq->dq_cnt--; DQH_UNLOCK(); @@ -1479,6 +1480,7 @@ sync: (void) dqsync(vp, dq); DQH_LOCK(); + KASSERT(dq->dq_cnt > 0, ("Lost dq %p reference 2", dq)); if (--dq->dq_cnt > 0) { DQH_UNLOCK(); @@ -1658,6 +1660,7 @@ quotaref(vp, qrp) */ found = 0; ip = VTOI(vp); + mtx_lock(&dqhlock); for (i = 0; i < MAXQUOTAS; i++) { if ((dq = ip->i_dquot[i]) == NODQUOT) continue; @@ -1665,6 +1668,7 @@ quotaref(vp, qrp) qrp[i] = dq; found++; } + mtx_unlock(&dqhlock); return (found); } From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 21:01:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5682106567D; Wed, 22 Feb 2012 21:01:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 81A038FC1B; Wed, 22 Feb 2012 21:01:40 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 90BEC2A28CC8; Wed, 22 Feb 2012 22:01:39 +0100 (CET) Date: Wed, 22 Feb 2012 22:01:39 +0100 From: Ed Schouten To: Dimitry Andric Message-ID: <20120222210139.GA32748@hoeg.nl> References: <201202212055.q1LKthUO018747@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <201202212055.q1LKthUO018747@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231978 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 21:01:41 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Dimitry Andric , 20120221 21:55: > These warnings are tricky to fix without a lot of overhaul, and they are > harmless, so disable them for now. What about marking it const? It seems to be never written to. --=20 Ed Schouten WWW: http://80386.nl/ --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iQIcBAEBAgAGBQJPRVezAAoJEG5e2P40kaK71w4P/0UJEoRRgIn1qqLCFCiYEE7N tDEqnd0w6JoivjrAW0OVRguU8uX+RNqITU7xBuK1UjBXMoHfqOzEw3scvctq2Ycu x/2khLUlDvIBc5HZIg4dEqEa12N7H8UdiTnWDk7RuLD1EEjeZnmrqr6/2jKK1t0x xfJzFNdfErRpCdMUWeIw/znXIcS5QnEnc6gMncmY98gvlnwJEEJpTg6us5mEu7j+ oDUfz2GxO8Pbj78AvsQX+FyfUclz2gqBHGrANrGGFl5x4cehUbdgycQcBsoMdHTK USHvqCRHT/mNVPV9wTnY/txg9JYLs91Dhqdu2498tUyS+rFHlhJtu6sPCHNo8/vv cj9dBuE08amta4OMOJvcq27GSteltq5DTeExauf9hhJXtTzKFaE+6M/1dC6KVd4/ EG+QA5GCRNG4hzHjXQ6Z9uSAJHNXdMRy3qN33EbQKzWqeYSLIvLZxg/AAdsmwyN1 0Fnx8JdddTuHikHJjX0Ie3pjULvfqf1eX0mn+KETlw7ymc7mLnQVwL2QscvHZSrN oIQVkMQI/P2FPdmsJ3JlEYROPuo9MPKvQxok/ZefE5MQWD88HYDHObDysPvY3sa9 eyQBZIIF6eVNMY8+9wYdZrOHToq9NyCjtUdRGbbZSVMfMG0mVhiKCQwXX5cvgufH FbCcbnDxdi1o7VNJVg53 =HOah -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 21:08:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06FBC106566C; Wed, 22 Feb 2012 21:08:59 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA8AB8FC08; Wed, 22 Feb 2012 21:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1ML8wdr069118; Wed, 22 Feb 2012 21:08:58 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1ML8wh1069116; Wed, 22 Feb 2012 21:08:58 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201202222108.q1ML8wh1069116@svn.freebsd.org> From: Maxim Konovalov Date: Wed, 22 Feb 2012 21:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232004 - head/usr.bin/ncal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 21:08:59 -0000 Author: maxim Date: Wed Feb 22 21:08:58 2012 New Revision: 232004 URL: http://svn.freebsd.org/changeset/base/232004 Log: o Use ISO 3166 county code for Sweden. PR: standards/165400 Submitted by: Carsten Hey MFC after: 1 week Modified: head/usr.bin/ncal/ncal.c Modified: head/usr.bin/ncal/ncal.c ============================================================================== --- head/usr.bin/ncal/ncal.c Wed Feb 22 20:03:51 2012 (r232003) +++ head/usr.bin/ncal/ncal.c Wed Feb 22 21:08:58 2012 (r232004) @@ -105,7 +105,7 @@ static struct djswitch { {"RO", "Romania", {1919, 3, 31}}, {"RU", "Russia", {1918, 1, 31}}, {"SI", "Slovenia", {1919, 3, 4}}, - {"SW", "Sweden", {1753, 2, 17}}, + {"SE", "Sweden", {1753, 2, 17}}, {"TR", "Turkey", {1926, 12, 18}}, {"US", "United States", {1752, 9, 2}}, {"YU", "Yugoslavia", {1919, 3, 4}} From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 21:47:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 428BE106566B; Wed, 22 Feb 2012 21:47:51 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31B5F8FC0C; Wed, 22 Feb 2012 21:47:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MLlp7T070414; Wed, 22 Feb 2012 21:47:51 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MLlpji070412; Wed, 22 Feb 2012 21:47:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201202222147.q1MLlpji070412@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 22 Feb 2012 21:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232007 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 21:47:51 -0000 Author: jilles Date: Wed Feb 22 21:47:50 2012 New Revision: 232007 URL: http://svn.freebsd.org/changeset/base/232007 Log: libc: Eliminate some relative relocations in fmtmsg(). Modified: head/lib/libc/gen/fmtmsg.c Modified: head/lib/libc/gen/fmtmsg.c ============================================================================== --- head/lib/libc/gen/fmtmsg.c Wed Feb 22 21:46:15 2012 (r232006) +++ head/lib/libc/gen/fmtmsg.c Wed Feb 22 21:47:50 2012 (r232007) @@ -45,10 +45,6 @@ static const char *sevinfo(int); static int validmsgverb(const char *); -static const char *validlist[] = { - "label", "severity", "text", "action", "tag", NULL -}; - int fmtmsg(long class, const char *label, int sev, const char *text, const char *action, const char *tag) @@ -205,14 +201,18 @@ sevinfo(int sev) static int validmsgverb(const char *msgverb) { + const char *validlist = "label\0severity\0text\0action\0tag\0"; char *msgcomp; - int i, equality; + size_t len1, len2; + const char *p; + int equality; equality = 0; while ((msgcomp = nextcomp(msgverb)) != NULL) { equality--; - for (i = 0; validlist[i] != NULL; i++) { - if (strcmp(msgcomp, validlist[i]) == 0) + len1 = strlen(msgcomp); + for (p = validlist; (len2 = strlen(p)) != 0; p += len2 + 1) { + if (len1 == len2 && memcmp(msgcomp, p, len1) == 0) equality++; } } From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 22:01:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A610106564A; Wed, 22 Feb 2012 22:01:30 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FE718FC1C; Wed, 22 Feb 2012 22:01:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MM1UgO070938; Wed, 22 Feb 2012 22:01:30 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MM1Ubv070934; Wed, 22 Feb 2012 22:01:30 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202222201.q1MM1Ubv070934@svn.freebsd.org> From: Andrew Thompson Date: Wed, 22 Feb 2012 22:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232008 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 22:01:30 -0000 Author: thompsa Date: Wed Feb 22 22:01:30 2012 New Revision: 232008 URL: http://svn.freebsd.org/changeset/base/232008 Log: Using the flowid in the mbuf assumes the network card is giving a good hash for the traffic flow, this may not be the case giving poor traffic distribution. Add a sysctl which allows us to fall back to our own flow hash code. PR: kern/164901 Submitted by: Eugene Grosbein MFC after: 1 week Modified: head/sys/net/ieee8023ad_lacp.c head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Wed Feb 22 21:47:50 2012 (r232007) +++ head/sys/net/ieee8023ad_lacp.c Wed Feb 22 22:01:30 2012 (r232008) @@ -812,7 +812,7 @@ lacp_select_tx_port(struct lagg_softc *s return (NULL); } - if (m->m_flags & M_FLOWID) + if (sc->use_flowid && (m->m_flags & M_FLOWID)) hash = m->m_pkthdr.flowid; else hash = lagg_hashmbuf(m, lsc->lsc_hashkey); Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Wed Feb 22 21:47:50 2012 (r232007) +++ head/sys/net/if_lagg.c Wed Feb 22 22:01:30 2012 (r232008) @@ -262,6 +262,8 @@ lagg_clone_create(struct if_clone *ifc, struct ifnet *ifp; int i, error = 0; static const u_char eaddr[6]; /* 00:00:00:00:00:00 */ + struct sysctl_oid *oid; + char num[14]; /* sufficient for 32 bits */ sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO); ifp = sc->sc_ifp = if_alloc(IFT_ETHER); @@ -270,6 +272,15 @@ lagg_clone_create(struct if_clone *ifc, return (ENOSPC); } + sysctl_ctx_init(&sc->ctx); + snprintf(num, sizeof(num), "%u", unit); + sc->use_flowid = 1; + oid = SYSCTL_ADD_NODE(&sc->ctx, &SYSCTL_NODE_CHILDREN(_net_link, lagg), + OID_AUTO, num, CTLFLAG_RD, NULL, ""); + SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "use_flowid", CTLTYPE_INT|CTLFLAG_RW, &sc->use_flowid, sc->use_flowid, + "Use flow id for load sharing"); + sc->sc_proto = LAGG_PROTO_NONE; for (i = 0; lagg_protos[i].ti_proto != LAGG_PROTO_NONE; i++) { if (lagg_protos[i].ti_proto == LAGG_PROTO_DEFAULT) { @@ -349,6 +360,7 @@ lagg_clone_destroy(struct ifnet *ifp) LAGG_WUNLOCK(sc); + sysctl_ctx_free(&sc->ctx); ifmedia_removeall(&sc->sc_media); ether_ifdetach(ifp); if_free(ifp); @@ -1676,7 +1688,7 @@ lagg_lb_start(struct lagg_softc *sc, str struct lagg_port *lp = NULL; uint32_t p = 0; - if (m->m_flags & M_FLOWID) + if (sc->use_flowid && (m->m_flags & M_FLOWID)) p = m->m_pkthdr.flowid; else p = lagg_hashmbuf(m, lb->lb_key); Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Wed Feb 22 21:47:50 2012 (r232007) +++ head/sys/net/if_lagg.h Wed Feb 22 22:01:30 2012 (r232008) @@ -21,6 +21,8 @@ #ifndef _NET_LAGG_H #define _NET_LAGG_H +#include + /* * Global definitions */ @@ -202,6 +204,8 @@ struct lagg_softc { eventhandler_tag vlan_attach; eventhandler_tag vlan_detach; #endif + struct sysctl_ctx_list ctx; /* sysctl variables */ + int use_flowid; /* use M_FLOWID */ }; struct lagg_port { From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 22:09:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DEB9106566C; Wed, 22 Feb 2012 22:09:18 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D4118FC12; Wed, 22 Feb 2012 22:09:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MM9I3g071205; Wed, 22 Feb 2012 22:09:18 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MM9Hau071203; Wed, 22 Feb 2012 22:09:17 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202222209.q1MM9Hau071203@svn.freebsd.org> From: Andrew Thompson Date: Wed, 22 Feb 2012 22:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232009 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 22:09:18 -0000 Author: thompsa Date: Wed Feb 22 22:09:17 2012 New Revision: 232009 URL: http://svn.freebsd.org/changeset/base/232009 Log: Make it clear that fec is just an alias Modified: head/share/man/man4/lagg.4 Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Wed Feb 22 22:01:30 2012 (r232008) +++ head/share/man/man4/lagg.4 Wed Feb 22 22:09:17 2012 (r232009) @@ -88,8 +88,9 @@ variable to a nonzero value, which is useful for certain bridged network setups. .It Ic fec Supports Cisco EtherChannel. -This is a static setup and does not negotiate aggregation with the peer or -exchange frames to monitor the link. +This is an alias for +.Ic loadbalance +mode. .It Ic lacp Supports the IEEE 802.3ad Link Aggregation Control Protocol (LACP) and the Marker Protocol. From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 22:29:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD4B61065677; Wed, 22 Feb 2012 22:29:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC98C8FC08; Wed, 22 Feb 2012 22:29:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MMTNC2071846; Wed, 22 Feb 2012 22:29:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MMTNZs071844; Wed, 22 Feb 2012 22:29:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202222229.q1MMTNZs071844@svn.freebsd.org> From: Andrew Thompson Date: Wed, 22 Feb 2012 22:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232010 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 22:29:24 -0000 Author: thompsa Date: Wed Feb 22 22:29:23 2012 New Revision: 232010 URL: http://svn.freebsd.org/changeset/base/232010 Log: Document the net.link.lagg.X.use_flowid sysctl from r232008. Modified: head/share/man/man4/lagg.4 Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Wed Feb 22 22:09:17 2012 (r232009) +++ head/share/man/man4/lagg.4 Wed Feb 22 22:29:23 2012 (r232010) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2010 +.Dd February 23, 2012 .Dt LAGG 4 .Os .Sh NAME @@ -134,6 +134,18 @@ variable in .Pp The MTU of the first interface to be added is used as the lagg MTU. All additional interfaces are required to have exactly the same value. +.Pp +The +.Ic loadbalance +and +.Ic lacp +modes will use the RSS hash from the network card if available to avoid +computing one, this may give poor traffic distribution if the hash is invalid +or uses less of the protocol header information. +Local hash computation can be forced by setting the +.Va net.link.lagg.X.use_flowid +.Xr sysctl 8 +variable to zero where X is the interface number. .Sh EXAMPLES Create a 802.3ad link aggregation using LACP with two .Xr bge 4 From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 22:36:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 10FC9106566B; Wed, 22 Feb 2012 22:36:42 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-197-151.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 18F2614E072; Wed, 22 Feb 2012 22:36:41 +0000 (UTC) Message-ID: <4F456DF8.7070709@FreeBSD.org> Date: Wed, 22 Feb 2012 14:36:40 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.2) Gecko/20120218 Thunderbird/10.0.2 MIME-Version: 1.0 To: Josh Paetzel References: <201202221505.q1MF5JNt057163@svn.freebsd.org> In-Reply-To: <201202221505.q1MF5JNt057163@svn.freebsd.org> X-Enigmail-Version: 1.3.5 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231999 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 22:36:42 -0000 On 02/22/2012 07:05, Josh Paetzel wrote: > -# CPU. This behaviour is enabled by default, so this option can be used That's not a typo, it's an alternate spelling, which we usually don't "correct" (same with initialisation). I'm not asking for the change to be backed out, just letting you know for future reference. Doug -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 22:40:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D99F2106566B; Wed, 22 Feb 2012 22:40:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C91EA8FC08; Wed, 22 Feb 2012 22:40:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1MMeK49072247; Wed, 22 Feb 2012 22:40:20 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1MMeK0N072245; Wed, 22 Feb 2012 22:40:20 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201202222240.q1MMeK0N072245@svn.freebsd.org> From: Glen Barber Date: Wed, 22 Feb 2012 22:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232011 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 22:40:20 -0000 Author: gjb (doc committer) Date: Wed Feb 22 22:40:20 2012 New Revision: 232011 URL: http://svn.freebsd.org/changeset/base/232011 Log: Xref the following in wlan(4): - bwn(4) - mwl(4) - run(4) MFC after: 3 days Modified: head/share/man/man4/wlan.4 Modified: head/share/man/man4/wlan.4 ============================================================================== --- head/share/man/man4/wlan.4 Wed Feb 22 22:29:23 2012 (r232010) +++ head/share/man/man4/wlan.4 Wed Feb 22 22:40:20 2012 (r232011) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2009 +.Dd February 22, 2012 .Dt WLAN 4 .Os .Sh NAME @@ -174,13 +174,16 @@ may not interoperate. .Xr an 4 , .Xr ath 4 , .Xr bwi 4 , +.Xr bwn 4 , .Xr ipw 4 , .Xr iwi 4 , .Xr iwn 4 , .Xr malo 4 , +.Xr mwl 4 , .Xr netintro 4 , .Xr ral 4 , .Xr rum 4 , +.Xr run 4 , .Xr uath 4 , .Xr upgt 4 , .Xr ural 4 , From owner-svn-src-all@FreeBSD.ORG Wed Feb 22 23:42:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A9071065674; Wed, 22 Feb 2012 23:42:58 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id D905B8FC08; Wed, 22 Feb 2012 23:42:57 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 04DDF36FA57; Thu, 23 Feb 2012 00:42:55 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id DED7C28468; Thu, 23 Feb 2012 00:42:54 +0100 (CET) Date: Thu, 23 Feb 2012 00:42:54 +0100 From: Jilles Tjoelker To: David Xu Message-ID: <20120222234254.GC95122@stack.nl> References: <201202220322.q1M3MoFE032330@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201202220322.q1M3MoFE032330@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231989 - in head: lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 23:42:58 -0000 On Wed, Feb 22, 2012 at 03:22:50AM +0000, David Xu wrote: > Author: davidxu > Date: Wed Feb 22 03:22:49 2012 > New Revision: 231989 > URL: http://svn.freebsd.org/changeset/base/231989 > Log: > Use unused fourth argument of umtx_op to pass flags to kernel for operation > UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower > 16bits is used to pass flags. The change saves a clock_gettime() syscall > from libthr. > Modified: > head/lib/libthr/thread/thr_umtx.c > head/sys/kern/kern_umtx.c > head/sys/sys/umtx.h > > Modified: head/lib/libthr/thread/thr_umtx.c > ============================================================================== > --- head/lib/libthr/thread/thr_umtx.c Wed Feb 22 01:50:13 2012 (r231988) > +++ head/lib/libthr/thread/thr_umtx.c Wed Feb 22 03:22:49 2012 (r231989) > @@ -200,20 +200,10 @@ int > + abstime != NULL ? (void *)(uintptr_t)((clockid << 16) | UMTX_WAIT_ABSTIME) : 0, Please check that this shift does not lose any information (i.e., clockid >= 0 && clockid <= 0xFFFF) before doing it. Implementing clock_getcpuclockid() will require clockids greater than 65535 because such clockids contain a process id. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 00:07:53 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0201106566B; Thu, 23 Feb 2012 00:07:53 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DC0AA8FC1C; Thu, 23 Feb 2012 00:07:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1N07pWS061698; Thu, 23 Feb 2012 00:07:52 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4F458355.8090405@gmail.com> Date: Thu, 23 Feb 2012 08:07:49 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Jilles Tjoelker References: <201202220322.q1M3MoFE032330@svn.freebsd.org> <20120222234254.GC95122@stack.nl> In-Reply-To: <20120222234254.GC95122@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, David Xu Subject: Re: svn commit: r231989 - in head: lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 00:07:54 -0000 On 2012/2/23 7:42, Jilles Tjoelker wrote: > On Wed, Feb 22, 2012 at 03:22:50AM +0000, David Xu wrote: >> Author: davidxu >> Date: Wed Feb 22 03:22:49 2012 >> New Revision: 231989 >> URL: http://svn.freebsd.org/changeset/base/231989 >> Log: >> Use unused fourth argument of umtx_op to pass flags to kernel for operation >> UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower >> 16bits is used to pass flags. The change saves a clock_gettime() syscall >> from libthr. >> Modified: >> head/lib/libthr/thread/thr_umtx.c >> head/sys/kern/kern_umtx.c >> head/sys/sys/umtx.h >> >> Modified: head/lib/libthr/thread/thr_umtx.c >> ============================================================================== >> --- head/lib/libthr/thread/thr_umtx.c Wed Feb 22 01:50:13 2012 (r231988) >> +++ head/lib/libthr/thread/thr_umtx.c Wed Feb 22 03:22:49 2012 (r231989) >> @@ -200,20 +200,10 @@ int >> + abstime != NULL ? (void *)(uintptr_t)((clockid<< 16) | UMTX_WAIT_ABSTIME) : 0, > Please check that this shift does not lose any information (i.e., > clockid>= 0&& clockid<= 0xFFFF) before doing it. > > Implementing clock_getcpuclockid() will require clockids greater than > 65535 because such clockids contain a process id. > In which document said the clock id includes a process id ? I think the clock_getcpuclockid() is a simplified version of getrusage(). From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 00:52:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4A86106566B; Thu, 23 Feb 2012 00:52:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B97AC8FC27; Thu, 23 Feb 2012 00:52:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N0qRB9076380; Thu, 23 Feb 2012 00:52:27 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N0qR7e076376; Thu, 23 Feb 2012 00:52:27 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202230052.q1N0qR7e076376@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 00:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232013 - in stable/9/sys: conf dev/random modules/random X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 00:52:28 -0000 Author: jkim Date: Thu Feb 23 00:52:27 2012 New Revision: 232013 URL: http://svn.freebsd.org/changeset/base/232013 Log: MFC: r229887 Enable hardware RNG for VIA Nano processors. Modified: stable/9/sys/conf/files.amd64 stable/9/sys/dev/random/probe.c stable/9/sys/modules/random/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/files.amd64 ============================================================================== --- stable/9/sys/conf/files.amd64 Wed Feb 22 22:45:49 2012 (r232012) +++ stable/9/sys/conf/files.amd64 Thu Feb 23 00:52:27 2012 (r232013) @@ -216,6 +216,7 @@ dev/lindev/lindev.c optional lindev dev/nfe/if_nfe.c optional nfe pci dev/nve/if_nve.c optional nve pci dev/nvram/nvram.c optional nvram isa +dev/random/nehemiah.c optional random dev/qlxgb/qla_dbg.c optional qlxgb pci dev/qlxgb/qla_hw.c optional qlxgb pci dev/qlxgb/qla_ioctl.c optional qlxgb pci Modified: stable/9/sys/dev/random/probe.c ============================================================================== --- stable/9/sys/dev/random/probe.c Wed Feb 22 22:45:49 2012 (r232012) +++ stable/9/sys/dev/random/probe.c Thu Feb 23 00:52:27 2012 (r232013) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__i386__) && !defined(PC98) +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) #include #include #include @@ -55,7 +55,7 @@ random_ident_hardware(struct random_syst *systat = random_yarrow; /* Then go looking for hardware */ -#if defined(__i386__) && !defined(PC98) +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) if (via_feature_rng & VIA_HAS_RNG) { *systat = random_nehemiah; } Modified: stable/9/sys/modules/random/Makefile ============================================================================== --- stable/9/sys/modules/random/Makefile Wed Feb 22 22:45:49 2012 (r232012) +++ stable/9/sys/modules/random/Makefile Thu Feb 23 00:52:27 2012 (r232013) @@ -6,7 +6,7 @@ KMOD= random SRCS= randomdev.c probe.c -.if ${MACHINE} == "i386" +.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" SRCS+= nehemiah.c .endif SRCS+= randomdev_soft.c yarrow.c hash.c From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 00:59:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8344E1065673; Thu, 23 Feb 2012 00:59:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 588248FC12; Thu, 23 Feb 2012 00:59:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N0xMoH076619; Thu, 23 Feb 2012 00:59:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N0xM8B076615; Thu, 23 Feb 2012 00:59:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202230059.q1N0xM8B076615@svn.freebsd.org> From: Andrew Thompson Date: Thu, 23 Feb 2012 00:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232014 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 00:59:22 -0000 Author: thompsa Date: Thu Feb 23 00:59:21 2012 New Revision: 232014 URL: http://svn.freebsd.org/changeset/base/232014 Log: bstp_input() always consumes the packet so remove the mbuf handling dance around it. Obtained from: OpenBSD (r1.37) Modified: head/sys/net/bridgestp.c head/sys/net/bridgestp.h head/sys/net/if_bridge.c Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Thu Feb 23 00:52:27 2012 (r232013) +++ head/sys/net/bridgestp.c Thu Feb 23 00:59:21 2012 (r232014) @@ -446,7 +446,7 @@ bstp_pdu_flags(struct bstp_port *bp) return (flags); } -struct mbuf * +void bstp_input(struct bstp_port *bp, struct ifnet *ifp, struct mbuf *m) { struct bstp_state *bs = bp->bp_bs; @@ -456,7 +456,7 @@ bstp_input(struct bstp_port *bp, struct if (bp->bp_active == 0) { m_freem(m); - return (NULL); + return; } BSTP_LOCK(bs); @@ -521,7 +521,6 @@ out: BSTP_UNLOCK(bs); if (m) m_freem(m); - return (NULL); } static void Modified: head/sys/net/bridgestp.h ============================================================================== --- head/sys/net/bridgestp.h Thu Feb 23 00:52:27 2012 (r232013) +++ head/sys/net/bridgestp.h Thu Feb 23 00:59:21 2012 (r232014) @@ -392,6 +392,6 @@ int bstp_set_edge(struct bstp_port *, in int bstp_set_autoedge(struct bstp_port *, int); int bstp_set_ptp(struct bstp_port *, int); int bstp_set_autoptp(struct bstp_port *, int); -struct mbuf *bstp_input(struct bstp_port *, struct ifnet *, struct mbuf *); +void bstp_input(struct bstp_port *, struct ifnet *, struct mbuf *); #endif /* _KERNEL */ Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Thu Feb 23 00:52:27 2012 (r232013) +++ head/sys/net/if_bridge.c Thu Feb 23 00:59:21 2012 (r232014) @@ -2215,11 +2215,9 @@ bridge_input(struct ifnet *ifp, struct m /* Tap off 802.1D packets; they do not get forwarded. */ if (memcmp(eh->ether_dhost, bstp_etheraddr, ETHER_ADDR_LEN) == 0) { - m = bstp_input(&bif->bif_stp, ifp, m); - if (m == NULL) { - BRIDGE_UNLOCK(sc); - return (NULL); - } + bstp_input(&bif->bif_stp, ifp, m); /* consumes mbuf */ + BRIDGE_UNLOCK(sc); + return (NULL); } if ((bif->bif_flags & IFBIF_STP) && From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 01:20:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2EF31065670; Thu, 23 Feb 2012 01:20:21 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7A7C8FC17; Thu, 23 Feb 2012 01:20:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N1KLAT077287; Thu, 23 Feb 2012 01:20:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N1KLe0077285; Thu, 23 Feb 2012 01:20:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202230120.q1N1KLe0077285@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 01:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232015 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 01:20:22 -0000 Author: yongari Date: Thu Feb 23 01:20:21 2012 New Revision: 232015 URL: http://svn.freebsd.org/changeset/base/232015 Log: Add Seeq Technology 80220 PHY support to smcphy(4). This PHY is found on Adaptec AIC-6915 Starfire ethernet controller. While here, use status register to know resolved speed/duplex. With this change, sf(4) correctly reports speed/duplex of established link. Reviewed by: marius Modified: head/sys/dev/mii/smcphy.c Modified: head/sys/dev/mii/smcphy.c ============================================================================== --- head/sys/dev/mii/smcphy.c Thu Feb 23 00:59:21 2012 (r232014) +++ head/sys/dev/mii/smcphy.c Thu Feb 23 01:20:21 2012 (r232015) @@ -55,6 +55,7 @@ static int smcphy_attach(device_t); static int smcphy_service(struct mii_softc *, struct mii_data *, int); static void smcphy_reset(struct mii_softc *); static void smcphy_auto(struct mii_softc *, int); +static void smcphy_status(struct mii_softc *); static device_method_t smcphy_methods[] = { /* device interface */ @@ -76,13 +77,20 @@ static driver_t smcphy_driver = { DRIVER_MODULE(smcphy, miibus, smcphy_driver, smcphy_devclass, 0, 0); static const struct mii_phydesc smcphys[] = { + MII_PHY_DESC(SEEQ, 80220), MII_PHY_DESC(SEEQ, 84220), MII_PHY_END }; +static const struct mii_phy_funcs smcphy80220_funcs = { + smcphy_service, + smcphy_status, + mii_phy_reset +}; + static const struct mii_phy_funcs smcphy_funcs = { smcphy_service, - ukphy_status, + smcphy_status, smcphy_reset }; @@ -97,11 +105,16 @@ static int smcphy_attach(device_t dev) { struct mii_softc *sc; + struct mii_attach_args *ma; + const struct mii_phy_funcs *mpf; sc = device_get_softc(dev); - - mii_phy_dev_attach(dev, MIIF_NOISOLATE | MIIF_NOMANPAUSE, - &smcphy_funcs, 1); + ma = device_get_ivars(dev); + if (MII_MODEL(ma->mii_id2) == MII_MODEL_SEEQ_80220) + mpf = &smcphy80220_funcs; + else + mpf = &smcphy_funcs; + mii_phy_dev_attach(dev, MIIF_NOISOLATE | MIIF_NOMANPAUSE, mpf, 1); mii_phy_setmedia(sc); return (0); @@ -214,3 +227,46 @@ smcphy_auto(struct mii_softc *sc, int me anar = PHY_READ(sc, MII_ANAR); PHY_WRITE(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG); } + +static void +smcphy_status(struct mii_softc *sc) +{ + struct mii_data *mii; + uint32_t bmcr, bmsr, status; + + mii = sc->mii_pdata; + mii->mii_media_status = IFM_AVALID; + mii->mii_media_active = IFM_ETHER; + + bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); + if ((bmsr & BMSR_LINK) != 0) + mii->mii_media_status |= IFM_ACTIVE; + + bmcr = PHY_READ(sc, MII_BMCR); + if ((bmcr & BMCR_ISO) != 0) { + mii->mii_media_active |= IFM_NONE; + mii->mii_media_status = 0; + return; + } + + if ((bmcr & BMCR_LOOP) != 0) + mii->mii_media_active |= IFM_LOOP; + + if ((bmcr & BMCR_AUTOEN) != 0) { + if ((bmsr & BMSR_ACOMP) == 0) { + /* Erg, still trying, I guess... */ + mii->mii_media_active |= IFM_NONE; + return; + } + } + + status = PHY_READ(sc, 0x12); + if (status & 0x0080) + mii->mii_media_active |= IFM_100_TX; + else + mii->mii_media_active |= IFM_10_T; + if (status & 0x0040) + mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc); + else + mii->mii_media_active |= IFM_HDX; +} From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 01:22:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B6AE1065677; Thu, 23 Feb 2012 01:22:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A79A8FC1A; Thu, 23 Feb 2012 01:22:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N1Mfbg077401; Thu, 23 Feb 2012 01:22:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N1Me3S077399; Thu, 23 Feb 2012 01:22:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202230122.q1N1Me3S077399@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 01:22:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232016 - head/sys/modules/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 01:22:41 -0000 Author: yongari Date: Thu Feb 23 01:22:40 2012 New Revision: 232016 URL: http://svn.freebsd.org/changeset/base/232016 Log: Connect smcphy(4) to mii module build. Modified: head/sys/modules/mii/Makefile Modified: head/sys/modules/mii/Makefile ============================================================================== --- head/sys/modules/mii/Makefile Thu Feb 23 01:20:21 2012 (r232015) +++ head/sys/modules/mii/Makefile Thu Feb 23 01:22:40 2012 (r232016) @@ -8,7 +8,7 @@ SRCS+= ciphy.c device_if.h SRCS+= e1000phy.c gentbi.c icsphy.c ip1000phy.c jmphy.c lxtphy.c SRCS+= miibus_if.c miibus_if.h mii.c miidevs.h mii_bitbang.c mii_physubr.c SRCS+= mlphy.c nsgphy.c nsphy.c nsphyter.c pci_if.h pnaphy.c qsphy.c -SRCS+= rdcphy.c rgephy.c rlphy.c tdkphy.c tlphy.c truephy.c +SRCS+= rdcphy.c rgephy.c rlphy.c smcphy.c tdkphy.c tlphy.c truephy.c SRCS+= ukphy.c ukphy_subr.c SRCS+= xmphy.c From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 04:32:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED0DB106566B; Thu, 23 Feb 2012 04:32:41 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C19C58FC1A; Thu, 23 Feb 2012 04:32:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N4WfWp083500; Thu, 23 Feb 2012 04:32:41 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N4WffV083497; Thu, 23 Feb 2012 04:32:41 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201202230432.q1N4WffV083497@svn.freebsd.org> From: Rick Macklem Date: Thu, 23 Feb 2012 04:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232018 - in stable/9/sys/fs: nfs nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 04:32:42 -0000 Author: rmacklem Date: Thu Feb 23 04:32:41 2012 New Revision: 232018 URL: http://svn.freebsd.org/changeset/base/232018 Log: MFC: r231805 Delete a couple of out of date comments that are no longer true in the new NFS client. Modified: stable/9/sys/fs/nfs/nfs_commonport.c stable/9/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_commonport.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonport.c Thu Feb 23 03:16:09 2012 (r232017) +++ stable/9/sys/fs/nfs/nfs_commonport.c Thu Feb 23 04:32:41 2012 (r232018) @@ -109,9 +109,6 @@ MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD r * Definition of mutex locks. * newnfsd_mtx is used in nfsrvd_nfsd() to protect the nfs socket list * and assorted other nfsd structures. - * Giant is used to protect the nfsd list and count, which is just - * updated when nfsd's start/stop and is grabbed for nfsrvd_dorpc() - * for the VFS ops. */ struct mtx newnfsd_mtx; struct mtx nfs_sockl_mutex; Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Feb 23 03:16:09 2012 (r232017) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Feb 23 04:32:41 2012 (r232018) @@ -319,11 +319,7 @@ nfsvno_setattr(struct vnode *vp, struct } /* - * Set up nameidata for a lookup() call and do it - * For the cases where we are crossing mount points - * (looking up the public fh path or the v4 root path when - * not using a pseudo-root fs), set/release the Giant lock, - * as required. + * Set up nameidata for a lookup() call and do it. */ int nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 05:10:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F745106566B; Thu, 23 Feb 2012 05:10:01 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1705B8FC0A; Thu, 23 Feb 2012 05:10:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N5A08q084804; Thu, 23 Feb 2012 05:10:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N5A0Ie084802; Thu, 23 Feb 2012 05:10:00 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202230510.q1N5A0Ie084802@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 05:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232019 - head/sys/dev/sf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 05:10:01 -0000 Author: yongari Date: Thu Feb 23 05:10:00 2012 New Revision: 232019 URL: http://svn.freebsd.org/changeset/base/232019 Log: Give hardware chance to drain active DMA cycles. Modified: head/sys/dev/sf/if_sf.c Modified: head/sys/dev/sf/if_sf.c ============================================================================== --- head/sys/dev/sf/if_sf.c Thu Feb 23 04:32:41 2012 (r232018) +++ head/sys/dev/sf/if_sf.c Thu Feb 23 05:10:00 2012 (r232019) @@ -2329,6 +2329,9 @@ sf_stop(struct sf_softc *sc) /* Disable Tx/Rx egine. */ csr_write_4(sc, SF_GEN_ETH_CTL, 0); + /* Give hardware chance to drain active DMA cycles. */ + DELAY(1000); + csr_write_4(sc, SF_CQ_CONSIDX, 0); csr_write_4(sc, SF_CQ_PRODIDX, 0); csr_write_4(sc, SF_RXDQ_ADDR_Q1, 0); From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 05:14:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56588106564A; Thu, 23 Feb 2012 05:14:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4236E8FC16; Thu, 23 Feb 2012 05:14:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N5ECJ5085024; Thu, 23 Feb 2012 05:14:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N5ECmK085022; Thu, 23 Feb 2012 05:14:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202230514.q1N5ECmK085022@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 05:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232021 - head/sys/dev/sf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 05:14:12 -0000 Author: yongari Date: Thu Feb 23 05:14:11 2012 New Revision: 232021 URL: http://svn.freebsd.org/changeset/base/232021 Log: If there are not enough RX buffers, release partially allocated RX buffers. Modified: head/sys/dev/sf/if_sf.c Modified: head/sys/dev/sf/if_sf.c ============================================================================== --- head/sys/dev/sf/if_sf.c Thu Feb 23 05:13:46 2012 (r232020) +++ head/sys/dev/sf/if_sf.c Thu Feb 23 05:14:11 2012 (r232021) @@ -2010,6 +2010,7 @@ sf_init_locked(struct sf_softc *sc) if (sf_init_rx_ring(sc) == ENOBUFS) { device_printf(sc->sf_dev, "initialization failed: no memory for rx buffers\n"); + sf_stop(sc); return; } From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 05:23:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95954106566C; Thu, 23 Feb 2012 05:23:22 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 819D78FC0A; Thu, 23 Feb 2012 05:23:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N5NMuX085502; Thu, 23 Feb 2012 05:23:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N5NMZB085500; Thu, 23 Feb 2012 05:23:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202230523.q1N5NMZB085500@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 05:23:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232025 - head/sys/dev/sf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 05:23:22 -0000 Author: yongari Date: Thu Feb 23 05:23:21 2012 New Revision: 232025 URL: http://svn.freebsd.org/changeset/base/232025 Log: Introduce sf_ifmedia_upd_locked() and have driver reset PHY before switching to selected media. While here, set if_drv_flags before switching to selected media. Modified: head/sys/dev/sf/if_sf.c Modified: head/sys/dev/sf/if_sf.c ============================================================================== --- head/sys/dev/sf/if_sf.c Thu Feb 23 05:19:34 2012 (r232024) +++ head/sys/dev/sf/if_sf.c Thu Feb 23 05:23:21 2012 (r232025) @@ -172,6 +172,7 @@ static void sf_init_locked(struct sf_sof static void sf_stop(struct sf_softc *); static void sf_watchdog(struct sf_softc *); static int sf_ifmedia_upd(struct ifnet *); +static int sf_ifmedia_upd_locked(struct ifnet *); static void sf_ifmedia_sts(struct ifnet *, struct ifmediareq *); static void sf_reset(struct sf_softc *); static int sf_dma_alloc(struct sf_softc *); @@ -523,20 +524,27 @@ static int sf_ifmedia_upd(struct ifnet *ifp) { struct sf_softc *sc; - struct mii_data *mii; - struct mii_softc *miisc; int error; sc = ifp->if_softc; SF_LOCK(sc); + error = sf_ifmedia_upd_locked(ifp); + SF_UNLOCK(sc); + return (error); +} +static int +sf_ifmedia_upd_locked(struct ifnet *ifp) +{ + struct sf_softc *sc; + struct mii_data *mii; + struct mii_softc *miisc; + + sc = ifp->if_softc; mii = device_get_softc(sc->sf_miibus); LIST_FOREACH(miisc, &mii->mii_phys, mii_list) PHY_RESET(miisc); - error = mii_mediachg(mii); - SF_UNLOCK(sc); - - return (error); + return (mii_mediachg(mii)); } /* @@ -2136,12 +2144,12 @@ sf_init_locked(struct sf_softc *sc) else SF_CLRBIT(sc, SF_GEN_ETH_CTL, SF_ETHCTL_RXGFP_ENB); - sc->sf_link = 0; - mii_mediachg(mii); - ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + sc->sf_link = 0; + sf_ifmedia_upd_locked(ifp); + callout_reset(&sc->sf_co, hz, sf_tick, sc); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 05:25:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C30E1065673; Thu, 23 Feb 2012 05:25:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB79C8FC1A; Thu, 23 Feb 2012 05:25:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N5PER3085634; Thu, 23 Feb 2012 05:25:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N5PE0P085632; Thu, 23 Feb 2012 05:25:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202230525.q1N5PE0P085632@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 05:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232027 - head/sys/dev/sf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 05:25:15 -0000 Author: yongari Date: Thu Feb 23 05:25:14 2012 New Revision: 232027 URL: http://svn.freebsd.org/changeset/base/232027 Log: No need to reprogram hardware RX filter when driver is not running. Modified: head/sys/dev/sf/if_sf.c Modified: head/sys/dev/sf/if_sf.c ============================================================================== --- head/sys/dev/sf/if_sf.c Thu Feb 23 05:23:42 2012 (r232026) +++ head/sys/dev/sf/if_sf.c Thu Feb 23 05:25:14 2012 (r232027) @@ -600,7 +600,8 @@ sf_ioctl(struct ifnet *ifp, u_long comma case SIOCADDMULTI: case SIOCDELMULTI: SF_LOCK(sc); - sf_rxfilter(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + sf_rxfilter(sc); SF_UNLOCK(sc); break; case SIOCGIFMEDIA: From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 06:13:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F775106564A; Thu, 23 Feb 2012 06:13:13 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 510688FC08; Thu, 23 Feb 2012 06:13:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N6DDdh087181; Thu, 23 Feb 2012 06:13:13 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N6DD2a087178; Thu, 23 Feb 2012 06:13:13 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202230613.q1N6DD2a087178@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 06:13:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232029 - head/sys/dev/sf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 06:13:13 -0000 Author: yongari Date: Thu Feb 23 06:13:12 2012 New Revision: 232029 URL: http://svn.freebsd.org/changeset/base/232029 Log: Remove taskqueue based MII stat change handler. Driver does not need deferred link state change processing. While I'm here, do not report current link status if interface is not UP. Modified: head/sys/dev/sf/if_sf.c head/sys/dev/sf/if_sfreg.h Modified: head/sys/dev/sf/if_sf.c ============================================================================== --- head/sys/dev/sf/if_sf.c Thu Feb 23 05:36:49 2012 (r232028) +++ head/sys/dev/sf/if_sf.c Thu Feb 23 06:13:12 2012 (r232029) @@ -96,7 +96,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -192,7 +191,6 @@ static uint8_t sf_read_eeprom(struct sf_ static int sf_miibus_readreg(device_t, int, int); static int sf_miibus_writereg(device_t, int, int, int); static void sf_miibus_statchg(device_t); -static void sf_link_task(void *, int); #ifdef DEVICE_POLLING static int sf_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif @@ -394,30 +392,16 @@ static void sf_miibus_statchg(device_t dev) { struct sf_softc *sc; - - sc = device_get_softc(dev); - taskqueue_enqueue(taskqueue_swi, &sc->sf_link_task); -} - -static void -sf_link_task(void *arg, int pending) -{ - struct sf_softc *sc; struct mii_data *mii; struct ifnet *ifp; uint32_t val; - sc = (struct sf_softc *)arg; - - SF_LOCK(sc); - + sc = device_get_softc(dev); mii = device_get_softc(sc->sf_miibus); ifp = sc->sf_ifp; if (mii == NULL || ifp == NULL || - (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - SF_UNLOCK(sc); + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - } if (mii->mii_media_status & IFM_ACTIVE) { if (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) @@ -454,8 +438,6 @@ sf_link_task(void *arg, int pending) else val &= ~SF_TIMER_TIMES_TEN; csr_write_4(sc, SF_TIMER_CTL, val); - - SF_UNLOCK(sc); } static void @@ -558,8 +540,12 @@ sf_ifmedia_sts(struct ifnet *ifp, struct sc = ifp->if_softc; SF_LOCK(sc); - mii = device_get_softc(sc->sf_miibus); + if ((ifp->if_flags & IFF_UP) == 0) { + SF_UNLOCK(sc); + return; + } + mii = device_get_softc(sc->sf_miibus); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; @@ -753,7 +739,6 @@ sf_attach(device_t dev) mtx_init(&sc->sf_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->sf_co, &sc->sf_mtx, 0); - TASK_INIT(&sc->sf_link_task, 0, sf_link_task, sc); /* * Map control/status registers. @@ -955,7 +940,6 @@ sf_detach(device_t dev) sf_stop(sc); SF_UNLOCK(sc); callout_drain(&sc->sf_co); - taskqueue_drain(taskqueue_swi, &sc->sf_link_task); if (ifp != NULL) ether_ifdetach(ifp); } Modified: head/sys/dev/sf/if_sfreg.h ============================================================================== --- head/sys/dev/sf/if_sfreg.h Thu Feb 23 05:36:49 2012 (r232028) +++ head/sys/dev/sf/if_sfreg.h Thu Feb 23 06:13:12 2012 (r232029) @@ -1083,7 +1083,6 @@ struct sf_softc { int sf_if_flags; struct callout sf_co; int sf_watchdog_timer; - struct task sf_link_task; int sf_link; int sf_suspended; int sf_detach; From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 06:26:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD8511065670; Thu, 23 Feb 2012 06:26:16 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 992B98FC08; Thu, 23 Feb 2012 06:26:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N6QGpM087606; Thu, 23 Feb 2012 06:26:16 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N6QGAX087604; Thu, 23 Feb 2012 06:26:16 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202230626.q1N6QGAX087604@svn.freebsd.org> From: Andrew Thompson Date: Thu, 23 Feb 2012 06:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232030 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 06:26:16 -0000 Author: thompsa Date: Thu Feb 23 06:26:16 2012 New Revision: 232030 URL: http://svn.freebsd.org/changeset/base/232030 Log: Now that network interfaces advertise if they support linkstate notifications we do not need to perform a media ioctl every 15 seconds. Modified: head/sys/net/bridgestp.c Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Thu Feb 23 06:13:12 2012 (r232029) +++ head/sys/net/bridgestp.c Thu Feb 23 06:26:16 2012 (r232030) @@ -1861,10 +1861,12 @@ bstp_tick(void *arg) CURVNET_SET(bs->bs_vnet); - /* slow timer to catch missed link events */ + /* poll link events on interfaces that do not support linkstate */ if (bstp_timer_expired(&bs->bs_link_timer)) { - LIST_FOREACH(bp, &bs->bs_bplist, bp_next) - bstp_ifupdstatus(bs, bp); + LIST_FOREACH(bp, &bs->bs_bplist, bp_next) { + if (!(bp->bp_ifp->if_capabilities & IFCAP_LINKSTATE)) + bstp_ifupdstatus(bs, bp); + } bstp_timer_start(&bs->bs_link_timer, BSTP_LINK_TIMER); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 06:35:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 311F6106566B; Thu, 23 Feb 2012 06:35:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B7038FC0A; Thu, 23 Feb 2012 06:35:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N6ZInZ087918; Thu, 23 Feb 2012 06:35:18 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N6ZID4087916; Thu, 23 Feb 2012 06:35:18 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202230635.q1N6ZID4087916@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 06:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232031 - head/sys/dev/sf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 06:35:19 -0000 Author: yongari Date: Thu Feb 23 06:35:18 2012 New Revision: 232031 URL: http://svn.freebsd.org/changeset/base/232031 Log: With r232015, sf(4) gets correct speed/duplex of established link. Add more strict speed check in sf_miibus_statchg() and do not touch MAC config registers when driver lost a link. Modified: head/sys/dev/sf/if_sf.c Modified: head/sys/dev/sf/if_sf.c ============================================================================== --- head/sys/dev/sf/if_sf.c Thu Feb 23 06:26:16 2012 (r232030) +++ head/sys/dev/sf/if_sf.c Thu Feb 23 06:35:18 2012 (r232031) @@ -403,11 +403,19 @@ sf_miibus_statchg(device_t dev) (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - if (mii->mii_media_status & IFM_ACTIVE) { - if (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) + sc->sf_link = 0; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + case IFM_100_FX: sc->sf_link = 1; - } else - sc->sf_link = 0; + break; + } + } + if (sc->sf_link == 0) + return; val = csr_read_4(sc, SF_MACCFG_1); val &= ~SF_MACCFG1_FULLDUPLEX; From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 07:23:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F99B1065673; Thu, 23 Feb 2012 07:23:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 696F68FC1A; Thu, 23 Feb 2012 07:23:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N7NY1t089559; Thu, 23 Feb 2012 07:23:34 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N7NYZY089556; Thu, 23 Feb 2012 07:23:34 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201202230723.q1N7NYZY089556@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 23 Feb 2012 07:23:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232035 - stable/9/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 07:23:34 -0000 Author: hselasky Date: Thu Feb 23 07:23:33 2012 New Revision: 232035 URL: http://svn.freebsd.org/changeset/base/232035 Log: MFC r231835: Add support for filtering USB traces using the BPF functionality. Modified: stable/9/usr.sbin/usbdump/usbdump.8 stable/9/usr.sbin/usbdump/usbdump.c Directory Properties: stable/9/usr.sbin/usbdump/ (props changed) Modified: stable/9/usr.sbin/usbdump/usbdump.8 ============================================================================== --- stable/9/usr.sbin/usbdump/usbdump.8 Thu Feb 23 07:19:12 2012 (r232034) +++ stable/9/usr.sbin/usbdump/usbdump.8 Thu Feb 23 07:23:33 2012 (r232035) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2011 +.Dd February 16, 2012 .Dt USBDUMP 8 .Os .Sh NAME @@ -38,6 +38,7 @@ .Op Fl s Ar snaplen .Op Fl v .Op Fl w Ar file +.Op Fl f Ar filter .Sh DESCRIPTION The .Nm @@ -61,6 +62,16 @@ When defined multiple times the verbosit .It Fl w Ar file Write the raw packets to .Ar file . +.It Fl f Ar filter +The filter argument consists of either one or two numbers separated by a dot. +The first indicates the device unit number which should be traced. +The second number which is optional indicates the endpoint which should be traced. +To get all traffic for the control endpoint, two filters should be +created, one for endpoint 0 and one for endpoint 128. +If 128 is added to the endpoint number that means IN direction, else OUT direction is implied. +A device unit or endpoint value of -1 means ignore this field. +If no filters are specified, all packets are passed through using the default -1,-1 filter. +This option can be specified multiple times. .El .Sh EXAMPLES Capture the USB raw packets on usbus2: @@ -72,6 +83,11 @@ size limit: .Pp .Dl "usbdump -i usbus2 -s 0 -w /tmp/dump_pkts" .Pp +Dump the USB raw packets of usbus2, but only the control endpoint traffic +of device unit number 3: +.Pp +.Dl "usbdump -i usbus2 -s 0 -f 3.0 -f 3.128 -w /tmp/dump_pkts" +.Pp Read and display the USB raw packets from previous file: .Pp .Dl "usbdump -r /tmp/dump_pkts -v" Modified: stable/9/usr.sbin/usbdump/usbdump.c ============================================================================== --- stable/9/usr.sbin/usbdump/usbdump.c Thu Feb 23 07:19:12 2012 (r232034) +++ stable/9/usr.sbin/usbdump/usbdump.c Thu Feb 23 07:23:33 2012 (r232035) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -45,12 +46,33 @@ #include #include #include +#include #include #include #include #include #include +#define BPF_STORE_JUMP(x,_c,_k,_jt,_jf) do { \ + (x).code = (_c); \ + (x).k = (_k); \ + (x).jt = (_jt); \ + (x).jf = (_jf); \ +} while (0) + +#define BPF_STORE_STMT(x,_c,_k) do { \ + (x).code = (_c); \ + (x).k = (_k); \ + (x).jt = 0; \ + (x).jf = 0; \ +} while (0) + +struct usb_filt { + STAILQ_ENTRY(usb_filt) entry; + int unit; + int endpoint; +}; + struct usbcap { int fd; /* fd for /dev/usbpf */ uint32_t bufsize; @@ -123,6 +145,114 @@ static const char *speed_table[USB_SPEED [USB_SPEED_SUPER] = "SUPER", }; +static STAILQ_HEAD(,usb_filt) usb_filt_head = + STAILQ_HEAD_INITIALIZER(usb_filt_head); + +static void +add_filter(int usb_filt_unit, int usb_filt_ep) +{ + struct usb_filt *puf; + + puf = malloc(sizeof(struct usb_filt)); + if (puf == NULL) + errx(EX_SOFTWARE, "Out of memory."); + + puf->unit = usb_filt_unit; + puf->endpoint = usb_filt_ep; + + STAILQ_INSERT_TAIL(&usb_filt_head, puf, entry); +} + +static void +make_filter(struct bpf_program *pprog, int snapshot) +{ + struct usb_filt *puf; + struct bpf_insn *dynamic_insn; + int len; + + len = 0; + + STAILQ_FOREACH(puf, &usb_filt_head, entry) + len++; + + dynamic_insn = malloc(((len * 5) + 1) * sizeof(struct bpf_insn)); + + if (dynamic_insn == NULL) + errx(EX_SOFTWARE, "Out of memory."); + + len++; + + if (len == 1) { + /* accept all packets */ + + BPF_STORE_STMT(dynamic_insn[0], BPF_RET | BPF_K, snapshot); + + goto done; + } + + len = 0; + + STAILQ_FOREACH(puf, &usb_filt_head, entry) { + const int addr_off = (uintptr_t)&((struct usbpf_pkthdr *)0)->up_address; + const int addr_ep = (uintptr_t)&((struct usbpf_pkthdr *)0)->up_endpoint; + + if (puf->unit != -1) { + if (puf->endpoint != -1) { + BPF_STORE_STMT(dynamic_insn[len], + BPF_LD | BPF_B | BPF_ABS, addr_off); + len++; + BPF_STORE_JUMP(dynamic_insn[len], + BPF_JMP | BPF_JEQ | BPF_K, (uint8_t)puf->unit, 0, 3); + len++; + BPF_STORE_STMT(dynamic_insn[len], + BPF_LD | BPF_W | BPF_ABS, addr_ep); + len++; + BPF_STORE_JUMP(dynamic_insn[len], + BPF_JMP | BPF_JEQ | BPF_K, htobe32(puf->endpoint), 0, 1); + len++; + } else { + BPF_STORE_STMT(dynamic_insn[len], + BPF_LD | BPF_B | BPF_ABS, addr_off); + len++; + BPF_STORE_JUMP(dynamic_insn[len], + BPF_JMP | BPF_JEQ | BPF_K, (uint8_t)puf->unit, 0, 1); + len++; + } + } else { + if (puf->endpoint != -1) { + BPF_STORE_STMT(dynamic_insn[len], + BPF_LD | BPF_W | BPF_ABS, addr_ep); + len++; + BPF_STORE_JUMP(dynamic_insn[len], + BPF_JMP | BPF_JEQ | BPF_K, htobe32(puf->endpoint), 0, 1); + len++; + } + } + BPF_STORE_STMT(dynamic_insn[len], + BPF_RET | BPF_K, snapshot); + len++; + } + + BPF_STORE_STMT(dynamic_insn[len], BPF_RET | BPF_K, 0); + len++; + +done: + pprog->bf_len = len; + pprog->bf_insns = dynamic_insn; +} + +static void +free_filter(struct bpf_program *pprog) +{ + struct usb_filt *puf; + + while ((puf = STAILQ_FIRST(&usb_filt_head)) != NULL) { + STAILQ_REMOVE_HEAD(&usb_filt_head, entry); + free(puf); + } + free(pprog->bf_insns); +} + static void handle_sigint(int sig) { @@ -527,6 +657,7 @@ usage(void) #define FMT " %-14s %s\n" fprintf(stderr, "usage: usbdump [options]\n"); fprintf(stderr, FMT, "-i ", "Listen on USB bus interface"); + fprintf(stderr, FMT, "-f ", "Specify a device and endpoint filter"); fprintf(stderr, FMT, "-r ", "Read the raw packets from file"); fprintf(stderr, FMT, "-s ", "Snapshot bytes from each packet"); fprintf(stderr, FMT, "-v", "Increase the verbose level"); @@ -539,7 +670,6 @@ int main(int argc, char *argv[]) { struct timeval tv; - struct bpf_insn total_insn; struct bpf_program total_prog; struct bpf_stat us; struct bpf_version bv; @@ -547,12 +677,16 @@ main(int argc, char *argv[]) struct ifreq ifr; long snapshot = 192; uint32_t v; - int fd, o; + int fd; + int o; + int filt_unit; + int filt_ep; const char *optstring; + char *pp; memset(&uc, 0, sizeof(struct usbcap)); - optstring = "i:r:s:vw:"; + optstring = "i:r:s:vw:f:"; while ((o = getopt(argc, argv, optstring)) != -1) { switch (o) { case 'i': @@ -563,8 +697,10 @@ main(int argc, char *argv[]) init_rfile(p); break; case 's': - snapshot = strtol(optarg, NULL, 10); + snapshot = strtol(optarg, &pp, 10); errno = 0; + if (pp != NULL && *pp != 0) + usage(); if (snapshot == 0 && errno == EINVAL) usage(); /* snapeshot == 0 is special */ @@ -578,6 +714,20 @@ main(int argc, char *argv[]) w_arg = optarg; init_wfile(p); break; + case 'f': + filt_unit = strtol(optarg, &pp, 10); + filt_ep = -1; + if (pp != NULL) { + if (*pp == '.') { + filt_ep = strtol(pp + 1, &pp, 10); + if (pp != NULL && *pp != 0) + usage(); + } else if (*pp != 0) { + usage(); + } + } + add_filter(filt_unit, filt_ep); + break; default: usage(); /* NOTREACHED */ @@ -623,17 +773,13 @@ main(int argc, char *argv[]) if (p->buffer == NULL) errx(EX_SOFTWARE, "Out of memory."); - /* XXX no read filter rules yet so at this moment accept everything */ - total_insn.code = (u_short)(BPF_RET | BPF_K); - total_insn.jt = 0; - total_insn.jf = 0; - total_insn.k = snapshot; + make_filter(&total_prog, snapshot); - total_prog.bf_len = 1; - total_prog.bf_insns = &total_insn; if (ioctl(p->fd, BIOCSETF, (caddr_t)&total_prog) < 0) err(EXIT_FAILURE, "BIOCSETF ioctl failed"); + free_filter(&total_prog); + /* 1 second read timeout */ tv.tv_sec = 1; tv.tv_usec = 0; From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 07:26:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BF40106564A; Thu, 23 Feb 2012 07:26:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 263518FC12; Thu, 23 Feb 2012 07:26:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N7QxAS089712; Thu, 23 Feb 2012 07:26:59 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N7QwZr089709; Thu, 23 Feb 2012 07:26:58 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201202230726.q1N7QwZr089709@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 23 Feb 2012 07:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232036 - in stable/9/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 07:26:59 -0000 Author: hselasky Date: Thu Feb 23 07:26:58 2012 New Revision: 232036 URL: http://svn.freebsd.org/changeset/base/232036 Log: MFC r231713: Add new USB device ID. PR: usb/165154 Modified: stable/9/sys/dev/usb/serial/u3g.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/9/sys/dev/usb/serial/u3g.c Thu Feb 23 07:23:33 2012 (r232035) +++ stable/9/sys/dev/usb/serial/u3g.c Thu Feb 23 07:26:58 2012 (r232036) @@ -432,6 +432,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUANTA, Q111, 0), U3G_DEV(SIERRA, AC402, 0), U3G_DEV(SIERRA, AC595U, 0), + U3G_DEV(SIERRA, AC313U, 0), U3G_DEV(SIERRA, AC597E, 0), U3G_DEV(SIERRA, AC875E, 0), U3G_DEV(SIERRA, AC875U, 0), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Thu Feb 23 07:23:33 2012 (r232035) +++ stable/9/sys/dev/usb/usbdevs Thu Feb 23 07:26:58 2012 (r232036) @@ -3000,6 +3000,7 @@ product SIERRA E6892 0x6892 E6892 product SIERRA E6893 0x6893 E6893 product SIERRA MC8700 0x68A3 MC8700 product SIERRA AIRCARD875 0x6820 Aircard 875 HSDPA +product SIERRA AC313U 0x68aa Sierra Wireless AirCard 313U product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer /* Sigmatel products */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 07:34:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04681106566B; Thu, 23 Feb 2012 07:34:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E29CE8FC12; Thu, 23 Feb 2012 07:34:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N7YrpT090043; Thu, 23 Feb 2012 07:34:53 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N7Yr9E090040; Thu, 23 Feb 2012 07:34:53 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201202230734.q1N7Yr9E090040@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 23 Feb 2012 07:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232038 - stable/9/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 07:34:54 -0000 Author: hselasky Date: Thu Feb 23 07:34:53 2012 New Revision: 232038 URL: http://svn.freebsd.org/changeset/base/232038 Log: MFC r230204 and r230209: Export information about USB serial port unit and port numbers directly via the sysctl interface. PR: usb/164090 Modified: stable/9/sys/dev/usb/serial/usb_serial.c stable/9/sys/dev/usb/serial/usb_serial.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/serial/usb_serial.c ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.c Thu Feb 23 07:27:20 2012 (r232037) +++ stable/9/sys/dev/usb/serial/usb_serial.c Thu Feb 23 07:34:53 2012 (r232038) @@ -248,10 +248,16 @@ ucom_attach(struct ucom_super_softc *ssc return (EINVAL); } + /* allocate a uniq unit number */ ssc->sc_unit = ucom_unit_alloc(); if (ssc->sc_unit == -1) return (ENOMEM); + /* generate TTY name string */ + snprintf(ssc->sc_ttyname, sizeof(ssc->sc_ttyname), + UCOM_TTY_PREFIX "%d", ssc->sc_unit); + + /* create USB request handling process */ error = usb_proc_create(&ssc->sc_tq, mtx, "ucom", USB_PRI_MED); if (error) { ucom_unit_free(ssc->sc_unit); @@ -292,6 +298,16 @@ ucom_detach(struct ucom_super_softc *ssc if (ssc->sc_subunits == 0) return; /* not initialized */ + if (ssc->sc_sysctl_ttyname != NULL) { + sysctl_remove_oid(ssc->sc_sysctl_ttyname, 1, 0); + ssc->sc_sysctl_ttyname = NULL; + } + + if (ssc->sc_sysctl_ttyports != NULL) { + sysctl_remove_oid(ssc->sc_sysctl_ttyports, 1, 0); + ssc->sc_sysctl_ttyports = NULL; + } + usb_proc_drain(&ssc->sc_tq); for (subunit = 0; subunit < ssc->sc_subunits; subunit++) { @@ -420,19 +436,36 @@ ucom_detach_tty(struct ucom_softc *sc) void ucom_set_pnpinfo_usb(struct ucom_super_softc *ssc, device_t dev) { - char buf[64]; - uint8_t iface_index; - struct usb_attach_arg *uaa; - - snprintf(buf, sizeof(buf), "ttyname=%s%d ttyports=%d", - UCOM_TTY_PREFIX, ssc->sc_unit, ssc->sc_subunits); - - /* Store the PNP info in the first interface for the dev */ - uaa = device_get_ivars(dev); - iface_index = uaa->info.bIfaceIndex; + char buf[64]; + uint8_t iface_index; + struct usb_attach_arg *uaa; + + snprintf(buf, sizeof(buf), "ttyname=" UCOM_TTY_PREFIX + "%d ttyports=%d", ssc->sc_unit, ssc->sc_subunits); + + /* Store the PNP info in the first interface for the device */ + uaa = device_get_ivars(dev); + iface_index = uaa->info.bIfaceIndex; - if (usbd_set_pnpinfo(uaa->device, iface_index, buf) != 0) - device_printf(dev, "Could not set PNP info\n"); + if (usbd_set_pnpinfo(uaa->device, iface_index, buf) != 0) + device_printf(dev, "Could not set PNP info\n"); + + /* + * The following information is also replicated in the PNP-info + * string which is registered above: + */ + if (ssc->sc_sysctl_ttyname == NULL) { + ssc->sc_sysctl_ttyname = SYSCTL_ADD_STRING(NULL, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "ttyname", CTLFLAG_RD, ssc->sc_ttyname, 0, + "TTY device basename"); + } + if (ssc->sc_sysctl_ttyports == NULL) { + ssc->sc_sysctl_ttyports = SYSCTL_ADD_INT(NULL, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "ttyports", CTLFLAG_RD, + NULL, ssc->sc_subunits, "Number of ports"); + } } static void Modified: stable/9/sys/dev/usb/serial/usb_serial.h ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.h Thu Feb 23 07:27:20 2012 (r232037) +++ stable/9/sys/dev/usb/serial/usb_serial.h Thu Feb 23 07:34:53 2012 (r232038) @@ -70,6 +70,7 @@ #include #include #include +#include /* Module interface related macros */ #define UCOM_MODVER 1 @@ -132,8 +133,11 @@ struct ucom_param_task { struct ucom_super_softc { struct usb_process sc_tq; - uint32_t sc_unit; - uint32_t sc_subunits; + int sc_unit; + int sc_subunits; + struct sysctl_oid *sc_sysctl_ttyname; + struct sysctl_oid *sc_sysctl_ttyports; + char sc_ttyname[16]; }; struct ucom_softc { From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 07:56:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 835251065672; Thu, 23 Feb 2012 07:56:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 546428FC17; Thu, 23 Feb 2012 07:56:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N7uKMV090698; Thu, 23 Feb 2012 07:56:20 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N7uK1J090696; Thu, 23 Feb 2012 07:56:20 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201202230756.q1N7uK1J090696@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 23 Feb 2012 07:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232039 - head/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 07:56:20 -0000 Author: hselasky Date: Thu Feb 23 07:56:19 2012 New Revision: 232039 URL: http://svn.freebsd.org/changeset/base/232039 Log: Avoid creating PCM devices for MIDI adapters. MFC after: 3 days Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Thu Feb 23 07:34:53 2012 (r232038) +++ head/sys/dev/sound/usb/uaudio.c Thu Feb 23 07:56:19 2012 (r232039) @@ -626,21 +626,21 @@ uaudio_attach(device_t dev) sc->sc_mixer_count); if (sc->sc_play_chan.valid) { - device_printf(dev, "Play: %d Hz, %d ch, %s format\n", + device_printf(dev, "Play: %d Hz, %d ch, %s format.\n", sc->sc_play_chan.sample_rate, sc->sc_play_chan.p_asf1d->bNrChannels, sc->sc_play_chan.p_fmt->description); } else { - device_printf(dev, "No playback!\n"); + device_printf(dev, "No playback.\n"); } if (sc->sc_rec_chan.valid) { - device_printf(dev, "Record: %d Hz, %d ch, %s format\n", + device_printf(dev, "Record: %d Hz, %d ch, %s format.\n", sc->sc_rec_chan.sample_rate, sc->sc_rec_chan.p_asf1d->bNrChannels, sc->sc_rec_chan.p_fmt->description); } else { - device_printf(dev, "No recording!\n"); + device_printf(dev, "No recording.\n"); } if (sc->sc_midi_chan.valid) { @@ -648,9 +648,9 @@ uaudio_attach(device_t dev) if (umidi_probe(dev)) { goto detach; } - device_printf(dev, "MIDI sequencer\n"); + device_printf(dev, "MIDI sequencer.\n"); } else { - device_printf(dev, "No midi sequencer\n"); + device_printf(dev, "No midi sequencer.\n"); } DPRINTF("doing child attach\n"); @@ -659,13 +659,21 @@ uaudio_attach(device_t dev) sc->sc_sndcard_func.func = SCF_PCM; - child = device_add_child(dev, "pcm", -1); + /* + * Only attach a PCM device if we have a playback, recording + * or mixer device present: + */ + if (sc->sc_play_chan.valid || + sc->sc_rec_chan.valid || + sc->sc_mix_info) { + child = device_add_child(dev, "pcm", -1); - if (child == NULL) { - DPRINTF("out of memory\n"); - goto detach; + if (child == NULL) { + DPRINTF("out of memory\n"); + goto detach; + } + device_set_ivars(child, &sc->sc_sndcard_func); } - device_set_ivars(child, &sc->sc_sndcard_func); if (bus_generic_attach(dev)) { DPRINTF("child attach failed\n"); From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 08:22:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1EC71065784; Thu, 23 Feb 2012 08:22:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B36988FC19; Thu, 23 Feb 2012 08:22:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N8MiWY091541; Thu, 23 Feb 2012 08:22:44 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N8Mik4091539; Thu, 23 Feb 2012 08:22:44 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202230822.q1N8Mik4091539@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 08:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232040 - head/sys/dev/sf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 08:22:45 -0000 Author: yongari Date: Thu Feb 23 08:22:44 2012 New Revision: 232040 URL: http://svn.freebsd.org/changeset/base/232040 Log: Add check for IFF_DRV_RUNNING flag after serving an interrupt and don't give RX path more priority than TX path. Also remove infinite loop in interrupt handler and limit number of iteration to 32. This change addresses system load fluctuations under high network load. Modified: head/sys/dev/sf/if_sf.c Modified: head/sys/dev/sf/if_sf.c ============================================================================== --- head/sys/dev/sf/if_sf.c Thu Feb 23 07:56:19 2012 (r232039) +++ head/sys/dev/sf/if_sf.c Thu Feb 23 08:22:44 2012 (r232040) @@ -1549,7 +1549,9 @@ sf_rxeof(struct sf_softc *sc) */ eidx = 0; prog = 0; - for (cons = sc->sf_cdata.sf_rxc_cons; ; SF_INC(cons, SF_RX_CLIST_CNT)) { + for (cons = sc->sf_cdata.sf_rxc_cons; + (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0; + SF_INC(cons, SF_RX_CLIST_CNT)) { cur_cmp = &sc->sf_rdata.sf_rx_cring[cons]; status = le32toh(cur_cmp->sf_rx_status1); if (status == 0) @@ -1852,6 +1854,7 @@ sf_intr(void *arg) struct sf_softc *sc; struct ifnet *ifp; uint32_t status; + int cnt; sc = (struct sf_softc *)arg; SF_LOCK(sc); @@ -1870,13 +1873,13 @@ sf_intr(void *arg) if ((ifp->if_capenable & IFCAP_POLLING) != 0) goto done_locked; #endif - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - goto done_locked; /* Disable interrupts. */ csr_write_4(sc, SF_IMR, 0x00000000); - for (; (status & SF_INTRS) != 0;) { + for (cnt = 32; (status & SF_INTRS) != 0;) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; if ((status & SF_ISR_RXDQ1_DMADONE) != 0) sf_rxeof(sc); @@ -1911,15 +1914,19 @@ sf_intr(void *arg) #endif } } + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + sf_start_locked(ifp); + if (--cnt <= 0) + break; /* Reading the ISR register clears all interrrupts. */ status = csr_read_4(sc, SF_ISR); } - /* Re-enable interrupts. */ - csr_write_4(sc, SF_IMR, SF_INTRS); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + /* Re-enable interrupts. */ + csr_write_4(sc, SF_IMR, SF_INTRS); + } - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - sf_start_locked(ifp); done_locked: SF_UNLOCK(sc); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 08:32:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF8F8106566B; Thu, 23 Feb 2012 08:32:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA6A28FC08; Thu, 23 Feb 2012 08:32:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N8Ws7P091886; Thu, 23 Feb 2012 08:32:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N8WsxW091884; Thu, 23 Feb 2012 08:32:54 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202230832.q1N8WsxW091884@svn.freebsd.org> From: Adrian Chadd Date: Thu, 23 Feb 2012 08:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232041 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 08:32:55 -0000 Author: adrian Date: Thu Feb 23 08:32:54 2012 New Revision: 232041 URL: http://svn.freebsd.org/changeset/base/232041 Log: Use the passed-in channel rather than ic->ic_curchan. I'm not sure _why_ the ic is NULL here, but I've seen it occasionally do this after I've been tinkering with things for a while. It ends up crashing in a call to ath_chan_set() via the net80211 scan code and scan task. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Feb 23 08:22:44 2012 (r232040) +++ head/sys/dev/ath/if_ath.c Thu Feb 23 08:32:54 2012 (r232041) @@ -5432,7 +5432,7 @@ ath_chan_set(struct ath_softc *sc, struc sc->sc_diversity = ath_hal_getdiversity(ah); /* Let DFS at it in case it's a DFS channel */ - ath_dfs_radar_enable(sc, ic->ic_curchan); + ath_dfs_radar_enable(sc, chan); /* * Re-enable rx framework. From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 11:25:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C197C106564A; Thu, 23 Feb 2012 11:25:30 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC05A8FC0C; Thu, 23 Feb 2012 11:25:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NBPUFu001391; Thu, 23 Feb 2012 11:25:30 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NBPUQc001389; Thu, 23 Feb 2012 11:25:30 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202231125.q1NBPUQc001389@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 11:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232045 - stable/9/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 11:25:30 -0000 Author: yongari Date: Thu Feb 23 11:25:30 2012 New Revision: 232045 URL: http://svn.freebsd.org/changeset/base/232045 Log: MFC r231622: For RTL8168/8111D controller, make sure to wake PHY from power down mode. Otherwise, PHY access times out under certain conditions. Modified: stable/9/sys/dev/re/if_re.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Thu Feb 23 10:19:24 2012 (r232044) +++ stable/9/sys/dev/re/if_re.c Thu Feb 23 11:25:30 2012 (r232045) @@ -1429,11 +1429,16 @@ re_attach(device_t dev) sc->rl_flags |= RL_FLAG_MACSLEEP; /* FALLTHROUGH */ case RL_HWREV_8168CP: - case RL_HWREV_8168D: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | RL_FLAG_WOL_MANLINK; break; + case RL_HWREV_8168D: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | + RL_FLAG_WOL_MANLINK; + break; case RL_HWREV_8168DP: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_AUTOPAD | From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 11:26:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A0111065673; Thu, 23 Feb 2012 11:26:48 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E840E8FC15; Thu, 23 Feb 2012 11:26:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NBQl4D001462; Thu, 23 Feb 2012 11:26:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NBQl8J001460; Thu, 23 Feb 2012 11:26:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202231126.q1NBQl8J001460@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 11:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232046 - stable/8/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 11:26:48 -0000 Author: yongari Date: Thu Feb 23 11:26:47 2012 New Revision: 232046 URL: http://svn.freebsd.org/changeset/base/232046 Log: MFC r231622: For RTL8168/8111D controller, make sure to wake PHY from power down mode. Otherwise, PHY access times out under certain conditions. Approved by: re (kib) Modified: stable/8/sys/dev/re/if_re.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Thu Feb 23 11:25:30 2012 (r232045) +++ stable/8/sys/dev/re/if_re.c Thu Feb 23 11:26:47 2012 (r232046) @@ -1429,11 +1429,16 @@ re_attach(device_t dev) sc->rl_flags |= RL_FLAG_MACSLEEP; /* FALLTHROUGH */ case RL_HWREV_8168CP: - case RL_HWREV_8168D: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | RL_FLAG_WOL_MANLINK; break; + case RL_HWREV_8168D: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | + RL_FLAG_WOL_MANLINK; + break; case RL_HWREV_8168DP: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_AUTOPAD | From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 11:28:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42D97106564A; Thu, 23 Feb 2012 11:28:20 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D6558FC12; Thu, 23 Feb 2012 11:28:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NBSKgM001543; Thu, 23 Feb 2012 11:28:20 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NBSJ78001541; Thu, 23 Feb 2012 11:28:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202231128.q1NBSJ78001541@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 23 Feb 2012 11:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232047 - stable/7/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 11:28:20 -0000 Author: yongari Date: Thu Feb 23 11:28:19 2012 New Revision: 232047 URL: http://svn.freebsd.org/changeset/base/232047 Log: MFC r231622: For RTL8168/8111D controller, make sure to wake PHY from power down mode. Otherwise, PHY access times out under certain conditions. Approved by: re (kib) Modified: stable/7/sys/dev/re/if_re.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Thu Feb 23 11:26:47 2012 (r232046) +++ stable/7/sys/dev/re/if_re.c Thu Feb 23 11:28:19 2012 (r232047) @@ -1434,11 +1434,16 @@ re_attach(device_t dev) sc->rl_flags |= RL_FLAG_MACSLEEP; /* FALLTHROUGH */ case RL_HWREV_8168CP: - case RL_HWREV_8168D: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | RL_FLAG_WOL_MANLINK; break; + case RL_HWREV_8168D: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | + RL_FLAG_WOL_MANLINK; + break; case RL_HWREV_8168DP: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_AUTOPAD | From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 11:50:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 195DB106566B; Thu, 23 Feb 2012 11:50:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0320D8FC0A; Thu, 23 Feb 2012 11:50:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NBoNYd002811; Thu, 23 Feb 2012 11:50:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NBoNmW002806; Thu, 23 Feb 2012 11:50:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202231150.q1NBoNmW002806@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 23 Feb 2012 11:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232048 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 11:50:24 -0000 Author: kib Date: Thu Feb 23 11:50:23 2012 New Revision: 232048 URL: http://svn.freebsd.org/changeset/base/232048 Log: Allow the parent to gather the exit status of the children reparented to the debugger. When reparenting for debugging, keep the child in the new orphan list of old parent. When looping over the children in kern_wait(), iterate over both children list and orphan list to search for the process by pid. Submitted by: Dmitry Mikulin MFC after: 2 weeks Modified: head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/sys_process.c head/sys/sys/proc.h Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Thu Feb 23 11:28:19 2012 (r232047) +++ head/sys/kern/kern_exit.c Thu Feb 23 11:50:23 2012 (r232048) @@ -720,7 +720,6 @@ proc_reap(struct thread *td, struct proc if (p->p_oppid && (t = pfind(p->p_oppid)) != NULL) { PROC_LOCK(p); proc_reparent(p, t); - p->p_pptr->p_dbg_child--; p->p_oppid = 0; PROC_UNLOCK(p); pksignal(t, SIGCHLD, p->p_ksi); @@ -739,6 +738,10 @@ proc_reap(struct thread *td, struct proc LIST_REMOVE(p, p_list); /* off zombproc */ sx_xunlock(&allproc_lock); LIST_REMOVE(p, p_sibling); + if (p->p_flag & P_ORPHAN) { + LIST_REMOVE(p, p_orphan); + p->p_flag &= ~P_ORPHAN; + } leavepgrp(p); #ifdef PROCDESC if (p->p_procdesc != NULL) @@ -803,12 +806,53 @@ proc_reap(struct thread *td, struct proc sx_xunlock(&allproc_lock); } +static int +proc_to_reap(struct thread *td, struct proc *p, pid_t pid, int *status, + int options, struct rusage *rusage) +{ + struct proc *q; + + q = td->td_proc; + PROC_LOCK(p); + if (pid != WAIT_ANY && p->p_pid != pid && p->p_pgid != -pid) { + PROC_UNLOCK(p); + return (0); + } + if (p_canwait(td, p)) { + PROC_UNLOCK(p); + return (0); + } + + /* + * This special case handles a kthread spawned by linux_clone + * (see linux_misc.c). The linux_wait4 and linux_waitpid + * functions need to be able to distinguish between waiting + * on a process and waiting on a thread. It is a thread if + * p_sigparent is not SIGCHLD, and the WLINUXCLONE option + * signifies we want to wait for threads and not processes. + */ + if ((p->p_sigparent != SIGCHLD) ^ + ((options & WLINUXCLONE) != 0)) { + PROC_UNLOCK(p); + return (0); + } + + PROC_SLOCK(p); + if (p->p_state == PRS_ZOMBIE) { + proc_reap(td, p, status, options, rusage); + return (-1); + } + PROC_SUNLOCK(p); + PROC_UNLOCK(p); + return (1); +} + int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rusage) { struct proc *p, *q; - int error, nfound; + int error, nfound, ret; AUDIT_ARG_PID(pid); AUDIT_ARG_VALUE(options); @@ -831,37 +875,16 @@ loop: nfound = 0; sx_xlock(&proctree_lock); LIST_FOREACH(p, &q->p_children, p_sibling) { - PROC_LOCK(p); - if (pid != WAIT_ANY && - p->p_pid != pid && p->p_pgid != -pid) { - PROC_UNLOCK(p); + ret = proc_to_reap(td, p, pid, status, options, rusage); + if (ret == 0) continue; - } - if (p_canwait(td, p)) { - PROC_UNLOCK(p); - continue; - } - - /* - * This special case handles a kthread spawned by linux_clone - * (see linux_misc.c). The linux_wait4 and linux_waitpid - * functions need to be able to distinguish between waiting - * on a process and waiting on a thread. It is a thread if - * p_sigparent is not SIGCHLD, and the WLINUXCLONE option - * signifies we want to wait for threads and not processes. - */ - if ((p->p_sigparent != SIGCHLD) ^ - ((options & WLINUXCLONE) != 0)) { - PROC_UNLOCK(p); - continue; - } + else if (ret == 1) + nfound++; + else + return (0); - nfound++; + PROC_LOCK(p); PROC_SLOCK(p); - if (p->p_state == PRS_ZOMBIE) { - proc_reap(td, p, status, options, rusage); - return (0); - } if ((p->p_flag & P_STOPPED_SIG) && (p->p_suspcount == p->p_numthreads) && (p->p_flag & P_WAITED) == 0 && @@ -893,16 +916,34 @@ loop: if (status) *status = SIGCONT; - return (0); } PROC_UNLOCK(p); } + + /* + * Look in the orphans list too, to allow the parent to + * collect it's child exit status even if child is being + * debugged. + * + * Debugger detaches from the parent upon successful + * switch-over from parent to child. At this point due to + * re-parenting the parent loses the child to debugger and a + * wait4(2) call would report that it has no children to wait + * for. By maintaining a list of orphans we allow the parent + * to successfully wait until the child becomes a zombie. + */ + LIST_FOREACH(p, &q->p_orphans, p_orphan) { + ret = proc_to_reap(td, p, pid, status, options, rusage); + if (ret == 0) + continue; + else if (ret == 1) + nfound++; + else + return (0); + } if (nfound == 0) { sx_xunlock(&proctree_lock); - if (td->td_proc->p_dbg_child) - return (0); - else - return (ECHILD); + return (ECHILD); } if (options & WNOHANG) { sx_xunlock(&proctree_lock); @@ -940,5 +981,15 @@ proc_reparent(struct proc *child, struct PROC_UNLOCK(child->p_pptr); LIST_REMOVE(child, p_sibling); LIST_INSERT_HEAD(&parent->p_children, child, p_sibling); + + if (child->p_flag & P_ORPHAN) { + LIST_REMOVE(child, p_orphan); + child->p_flag &= ~P_ORPHAN; + } + if (child->p_flag & P_TRACED) { + LIST_INSERT_HEAD(&child->p_pptr->p_orphans, child, p_orphan); + child->p_flag |= P_ORPHAN; + } + child->p_pptr = parent; } Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Feb 23 11:28:19 2012 (r232047) +++ head/sys/kern/kern_fork.c Thu Feb 23 11:50:23 2012 (r232048) @@ -590,6 +590,7 @@ do_fork(struct thread *td, int flags, st LIST_INSERT_AFTER(p1, p2, p_pglist); PGRP_UNLOCK(p1->p_pgrp); LIST_INIT(&p2->p_children); + LIST_INIT(&p2->p_orphans); callout_init(&p2->p_itcallout, CALLOUT_MPSAFE); Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Thu Feb 23 11:28:19 2012 (r232047) +++ head/sys/kern/sys_process.c Thu Feb 23 11:50:23 2012 (r232048) @@ -841,8 +841,6 @@ kern_ptrace(struct thread *td, int req, p->p_flag |= P_TRACED; p->p_oppid = p->p_pptr->p_pid; if (p->p_pptr != td->td_proc) { - /* Remember that a child is being debugged(traced). */ - p->p_pptr->p_dbg_child++; proc_reparent(p, td->td_proc); } data = SIGSTOP; @@ -931,7 +929,6 @@ kern_ptrace(struct thread *td, int req, PROC_UNLOCK(pp); PROC_LOCK(p); proc_reparent(p, pp); - p->p_pptr->p_dbg_child--; if (pp == initproc) p->p_sigparent = SIGCHLD; } Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Feb 23 11:28:19 2012 (r232047) +++ head/sys/sys/proc.h Thu Feb 23 11:50:23 2012 (r232048) @@ -507,8 +507,6 @@ struct proc { /* The following fields are all zeroed upon creation in fork. */ #define p_startzero p_oppid pid_t p_oppid; /* (c + e) Save ppid in ptrace. XXX */ - int p_dbg_child; /* (c + e) # of debugged children in - ptrace. */ struct vmspace *p_vmspace; /* (b) Address space. */ u_int p_swtick; /* (c) Tick when swapped in or out. */ struct itimerval p_realtimer; /* (c) Alarm timer. */ @@ -576,6 +574,14 @@ struct proc { after fork. */ uint64_t p_prev_runtime; /* (c) Resource usage accounting. */ struct racct *p_racct; /* (b) Resource accounting. */ + /* + * An orphan is the child that has beed re-parented to the + * debugger as a result of attaching to it. Need to keep + * track of them for parent to be able to collect the exit + * status of what used to be children. + */ + LIST_ENTRY(proc) p_orphan; /* (e) List of orphan processes. */ + LIST_HEAD(, proc) p_orphans; /* (e) Pointer to list of orphans. */ }; #define p_session p_pgrp->pg_session @@ -614,6 +620,7 @@ struct proc { #define P_HWPMC 0x800000 /* Process is using HWPMCs */ #define P_JAILED 0x1000000 /* Process is in jail. */ +#define P_ORPHAN 0x2000000 /* Orphaned. */ #define P_INEXEC 0x4000000 /* Process is in execve(). */ #define P_STATCHILD 0x8000000 /* Child process stopped or exited. */ #define P_INMEM 0x10000000 /* Loaded into memory. */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 12:20:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 799BC1065670; Thu, 23 Feb 2012 12:20:57 +0000 (UTC) Date: Thu, 23 Feb 2012 12:20:57 +0000 From: Alexander Best To: Doug Barton Message-ID: <20120223122057.GA72389@freebsd.org> References: <201202221505.q1MF5JNt057163@svn.freebsd.org> <4F456DF8.7070709@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F456DF8.7070709@FreeBSD.org> Cc: Josh Paetzel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231999 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 12:20:57 -0000 On Wed Feb 22 12, Doug Barton wrote: > On 02/22/2012 07:05, Josh Paetzel wrote: > > -# CPU. This behaviour is enabled by default, so this option can be used > > That's not a typo, it's an alternate spelling, which we usually don't > "correct" (same with initialisation). I'm not asking for the change to > be backed out, just letting you know for future reference. i think the commit should be reverted. freebsd is an international project and by turning comments that were made by people using british english spelling into american english spelling, this commit implies that freebsd prefers a certain spelling. expecially, if the comments came from someone who lives in a native english speaking country, changing the perfectly valid spelling into american english might be offensive. just my 0.02 $ though. cheers. alex > > > Doug > > -- > > It's always a long day; 86400 doesn't fit into a short. > > Breadth of IT experience, and depth of knowledge in the DNS. > Yours for the right price. :) http://SupersetSolutions.com/ > From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 16:47:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7CFB106566C; Thu, 23 Feb 2012 16:47:05 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 999718FC18; Thu, 23 Feb 2012 16:47:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NGl53p013858; Thu, 23 Feb 2012 16:47:05 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NGl51V013856; Thu, 23 Feb 2012 16:47:05 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201202231647.q1NGl51V013856@svn.freebsd.org> From: Rick Macklem Date: Thu, 23 Feb 2012 16:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232050 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 16:47:05 -0000 Author: rmacklem Date: Thu Feb 23 16:47:05 2012 New Revision: 232050 URL: http://svn.freebsd.org/changeset/base/232050 Log: hrs@ reported a panic to freebsd-stable@ under the subject line "panic in 8.3-PRERELEASE" on Feb. 22, 2012. This panic was caused by use of a mix of tsleep() and msleep() calls on the same event in the new NFS server DRC code. It did "mtx_unlock(); tsleep();" in two places, which kib@ noted introduced a slight risk that the wakeup() would occur before the tsleep(), resulting in a 10sec delay before waking up. This patch fixes the problem by replacing "mtx_unlock(); tsleep();" with mtx_sleep(..PDROP..). It also changes a nfsmsleep() call to mtx_sleep() so that the code uses mtx_sleep() consistently within the file. Tested by: hrs (in progress) Reviewed by: jhb MFC after: 5 days Modified: head/sys/fs/nfsserver/nfs_nfsdcache.c Modified: head/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdcache.c Thu Feb 23 14:35:56 2012 (r232049) +++ head/sys/fs/nfsserver/nfs_nfsdcache.c Thu Feb 23 16:47:05 2012 (r232050) @@ -336,9 +336,8 @@ loop: nfsaddr_match(NETFAMILY(rp), &rp->rc_haddr, nd->nd_nam)) { if ((rp->rc_flag & RC_LOCKED) != 0) { rp->rc_flag |= RC_WANTED; - NFSUNLOCKCACHE(); - (void) tsleep((caddr_t)rp, PZERO - 1, - "nfsrc", 10 * hz); + (void)mtx_sleep(rp, NFSCACHEMUTEXPTR, + (PZERO - 1) | PDROP, "nfsrc", 10 * hz); goto loop; } if (rp->rc_flag == 0) @@ -622,8 +621,8 @@ tryagain: rp = hitrp; if ((rp->rc_flag & RC_LOCKED) != 0) { rp->rc_flag |= RC_WANTED; - NFSUNLOCKCACHE(); - (void) tsleep((caddr_t)rp, PZERO-1, "nfsrc", 10 * hz); + (void)mtx_sleep(rp, NFSCACHEMUTEXPTR, + (PZERO - 1) | PDROP, "nfsrc", 10 * hz); goto tryagain; } if (rp->rc_flag == 0) @@ -694,7 +693,7 @@ nfsrc_lock(struct nfsrvcache *rp) NFSCACHELOCKREQUIRED(); while ((rp->rc_flag & RC_LOCKED) != 0) { rp->rc_flag |= RC_WANTED; - (void) nfsmsleep((caddr_t)rp, NFSCACHEMUTEXPTR, PZERO - 1, + (void)mtx_sleep(rp, NFSCACHEMUTEXPTR, PZERO - 1, "nfsrc", 0); } rp->rc_flag |= RC_LOCKED; From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 17:47:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65C6B106566B; Thu, 23 Feb 2012 17:47:20 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 500298FC12; Thu, 23 Feb 2012 17:47:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NHlKri015700; Thu, 23 Feb 2012 17:47:20 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NHlK1u015695; Thu, 23 Feb 2012 17:47:20 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202231747.q1NHlK1u015695@svn.freebsd.org> From: Christian Brueffer Date: Thu, 23 Feb 2012 17:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232051 - in head: . share/man/man9 sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 17:47:20 -0000 Author: brueffer Date: Thu Feb 23 17:47:19 2012 New Revision: 232051 URL: http://svn.freebsd.org/changeset/base/232051 Log: Catch up with r195837 (2.5 years ago) which renamed net_add_domain() to domain_add(). PR: 165424 Submitted by: Lachlan Kang MFC after: 1 week Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile head/share/man/man9/domain.9 head/sys/kern/uipc_domain.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Feb 23 16:47:05 2012 (r232050) +++ head/ObsoleteFiles.inc Thu Feb 23 17:47:19 2012 (r232051) @@ -707,6 +707,8 @@ OLD_LIBS+=usr/lib32/pam_unix.so.4 .endif # 20090718: the gdm pam.d file is no longer required. OLD_FILES+=etc/pam.d/gdm +# 20090714: net_add_domain(9) renamed to domain_add(9) +OLD_FILES+=usr/share/man/man9/net_add_domain.9.gz # 20090713: vimage container structs removed. OLD_FILES+=usr/include/netinet/vinet.h OLD_FILES+=usr/include/netinet6/vinet6.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Feb 23 16:47:05 2012 (r232050) +++ head/share/man/man9/Makefile Thu Feb 23 17:47:19 2012 (r232051) @@ -615,7 +615,7 @@ MLINKS+=disk.9 disk_alloc.9 \ disk.9 disk_destroy.9 \ disk.9 disk_gone.9 MLINKS+=domain.9 DOMAIN_SET.9 \ - domain.9 net_add_domain.9 \ + domain.9 domain_add.9 \ domain.9 pfctlinput.9 \ domain.9 pfctlinput2.9 \ domain.9 pffindproto.9 \ Modified: head/share/man/man9/domain.9 ============================================================================== --- head/share/man/man9/domain.9 Thu Feb 23 16:47:05 2012 (r232050) +++ head/share/man/man9/domain.9 Thu Feb 23 17:47:19 2012 (r232051) @@ -26,11 +26,11 @@ .\" .\" $FreeBSD$ .\" -.Dd December 23, 2008 +.Dd February 23, 2012 .Dt DOMAIN 9 .Os .Sh NAME -.Nm net_add_domain , +.Nm domain_add , .Nm pfctlinput , .Nm pfctlinput2 , .Nm pffindproto , @@ -43,7 +43,7 @@ .In sys/protosw.h .In sys/domain.h .Ft void -.Fn net_add_domain "void *data" +.Fn domain_add "void *data" .Ft void .Fn pfctlinput "int cmd" "struct sockaddr *sa" .Ft void @@ -142,7 +142,7 @@ have their .Fn pr_ctlinput function called. .Pp -.Fn net_add_domain +.Fn domain_add adds a new protocol domain to the system. The argument .Fa data @@ -153,13 +153,13 @@ within the function, but is declared in order to prevent compiler warnings when new domains are registered with .Fn SYSINIT . In most cases -.Fn net_add_domain +.Fn domain_add is not called directly, instead .Fn DOMAIN_SET is used. .Pp If the new domain has defined an initialization routine, it is called by -.Fn net_add_domain ; +.Fn domain_add ; as well, each of the protocols within the domain that have defined an initialization routine will have theirs called. .Pp Modified: head/sys/kern/uipc_domain.c ============================================================================== --- head/sys/kern/uipc_domain.c Thu Feb 23 16:47:05 2012 (r232050) +++ head/sys/kern/uipc_domain.c Thu Feb 23 17:47:19 2012 (r232051) @@ -220,7 +220,7 @@ domain_add(void *data) domains = dp; KASSERT(domain_init_status >= 1, - ("attempt to net_add_domain(%s) before domaininit()", + ("attempt to domain_add(%s) before domaininit()", dp->dom_name)); #ifndef INVARIANTS if (domain_init_status < 1) From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 17:47:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFCE71065715; Thu, 23 Feb 2012 17:47:48 +0000 (UTC) (envelope-from osa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB3948FC28; Thu, 23 Feb 2012 17:47:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NHlmop015747; Thu, 23 Feb 2012 17:47:48 GMT (envelope-from osa@svn.freebsd.org) Received: (from osa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NHlmhe015745; Thu, 23 Feb 2012 17:47:48 GMT (envelope-from osa@svn.freebsd.org) Message-Id: <201202231747.q1NHlmhe015745@svn.freebsd.org> From: "Sergey A. Osokin" Date: Thu, 23 Feb 2012 17:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232052 - head/usr.bin/calendar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 17:47:49 -0000 Author: osa (ports committer) Date: Thu Feb 23 17:47:48 2012 New Revision: 232052 URL: http://svn.freebsd.org/changeset/base/232052 Log: Add pt_BR.ISO8859-1 and pt_BR.UTF-8 directories to install. It was forgotten in r219937 commit. Approved by: edwin MFC after: 1 week Modified: head/usr.bin/calendar/Makefile Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Thu Feb 23 17:47:19 2012 (r232051) +++ head/usr.bin/calendar/Makefile Thu Feb 23 17:47:48 2012 (r232052) @@ -7,7 +7,8 @@ SRCS= calendar.c locale.c events.c dates DPADD= ${LIBM} LDADD= -lm INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ - hr_HR.ISO8859-2 hu_HU.ISO8859-2 ru_RU.KOI8-R uk_UA.KOI8-U + hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ + pt_BR.UTF-8 ru_RU.KOI8-R uk_UA.KOI8-U DE_LINKS= de_DE.ISO8859-15 FR_LINKS= fr_FR.ISO8859-15 TEXTMODE?= 444 From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 17:57:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B350D1065673; Thu, 23 Feb 2012 17:57:08 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C9598FC13; Thu, 23 Feb 2012 17:57:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NHv8RZ016068; Thu, 23 Feb 2012 17:57:08 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NHv89s016065; Thu, 23 Feb 2012 17:57:08 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202231757.q1NHv89s016065@svn.freebsd.org> From: Christian Brueffer Date: Thu, 23 Feb 2012 17:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232053 - in stable/9/release/doc: en_US.ISO8859-1/hardware share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 17:57:08 -0000 Author: brueffer Date: Thu Feb 23 17:57:08 2012 New Revision: 232053 URL: http://svn.freebsd.org/changeset/base/232053 Log: MFC: r231943 Add oce(4) to the hardware notes. Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/9/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/9/release/ (props changed) stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/9/release/picobsd/tinyware/passwd/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 17:47:48 2012 (r232052) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 17:57:08 2012 (r232053) @@ -956,6 +956,8 @@ &hwlist.nxge; + &hwlist.oce; + &hwlist.pcn; &hwlist.qlxgb; Modified: stable/9/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/9/release/doc/share/misc/dev.archlist.txt Thu Feb 23 17:47:48 2012 (r232052) +++ stable/9/release/doc/share/misc/dev.archlist.txt Thu Feb 23 17:57:08 2012 (r232053) @@ -97,6 +97,7 @@ ng_ubt i386,pc98,amd64 nsp i386,pc98 nve i386,amd64 nxge i386,amd64 +oce i386,amd64 ohci i386,pc98,ia64,amd64,powerpc oltr i386 pcn i386,pc98,ia64,amd64 From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 18:21:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BA061065670; Thu, 23 Feb 2012 18:21:38 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CD908FC13; Thu, 23 Feb 2012 18:21:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NILci1016959; Thu, 23 Feb 2012 18:21:38 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NILcnS016955; Thu, 23 Feb 2012 18:21:38 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201202231821.q1NILcnS016955@svn.freebsd.org> From: Kip Macy Date: Thu, 23 Feb 2012 18:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232054 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 18:21:38 -0000 Author: kmacy Date: Thu Feb 23 18:21:37 2012 New Revision: 232054 URL: http://svn.freebsd.org/changeset/base/232054 Log: When using flowtable llentrys can outlive the interface with which they're associated at which the lle_tbl pointer points to freed memory and the llt_free pointer is no longer valid. Move the free pointer in to the llentry itself and update the initalization sites. MFC after: 2 weeks Modified: head/sys/net/if_llatbl.h head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Thu Feb 23 17:57:08 2012 (r232053) +++ head/sys/net/if_llatbl.h Thu Feb 23 18:21:37 2012 (r232054) @@ -106,7 +106,6 @@ struct llentry { ("negative refcnt %d", (lle)->lle_refcnt)); \ (lle)->lle_refcnt++; \ } while (0) - #define LLE_REMREF(lle) do { \ LLE_WLOCK_ASSERT(lle); \ KASSERT((lle)->lle_refcnt > 1, \ @@ -116,7 +115,7 @@ struct llentry { #define LLE_FREE_LOCKED(lle) do { \ if ((lle)->lle_refcnt <= 1) \ - (lle)->lle_tbl->llt_free((lle)->lle_tbl, (lle));\ + (lle)->lle_free((lle)->lle_tbl, (lle));\ else { \ (lle)->lle_refcnt--; \ LLE_WUNLOCK(lle); \ @@ -152,7 +151,6 @@ struct lltable { int llt_af; struct ifnet *llt_ifp; - void (*llt_free)(struct lltable *, struct llentry *); void (*llt_prefix_free)(struct lltable *, const struct sockaddr *prefix, const struct sockaddr *mask, Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Thu Feb 23 17:57:08 2012 (r232053) +++ head/sys/netinet/in.c Thu Feb 23 18:21:37 2012 (r232054) @@ -1260,6 +1260,20 @@ struct in_llentry { struct sockaddr_in l3_addr4; }; +/* + * Deletes an address from the address table. + * This function is called by the timer functions + * such as arptimer() and nd6_llinfo_timer(), and + * the caller does the locking. + */ +static void +in_lltable_free(struct lltable *llt, struct llentry *lle) +{ + LLE_WUNLOCK(lle); + LLE_LOCK_DESTROY(lle); + free(lle, M_LLTABLE); +} + static struct llentry * in_lltable_new(const struct sockaddr *l3addr, u_int flags) { @@ -1277,25 +1291,11 @@ in_lltable_new(const struct sockaddr *l3 lle->base.la_expire = time_uptime; /* mark expired */ lle->l3_addr4 = *(const struct sockaddr_in *)l3addr; lle->base.lle_refcnt = 1; + lle->base.lle_free = in_lltable_free; LLE_LOCK_INIT(&lle->base); return &lle->base; } -/* - * Deletes an address from the address table. - * This function is called by the timer functions - * such as arptimer() and nd6_llinfo_timer(), and - * the caller does the locking. - */ -static void -in_lltable_free(struct lltable *llt, struct llentry *lle) -{ - LLE_WUNLOCK(lle); - LLE_LOCK_DESTROY(lle); - free(lle, M_LLTABLE); -} - - #define IN_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \ (((ntohl((d)->sin_addr.s_addr) ^ (a)->sin_addr.s_addr) & (m)->sin_addr.s_addr)) == 0 ) @@ -1577,7 +1577,6 @@ in_domifattach(struct ifnet *ifp) llt = lltable_init(ifp, AF_INET); if (llt != NULL) { - llt->llt_free = in_lltable_free; llt->llt_prefix_free = in_lltable_prefix_free; llt->llt_lookup = in_lltable_lookup; llt->llt_dump = in_lltable_dump; Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Thu Feb 23 17:57:08 2012 (r232053) +++ head/sys/netinet6/in6.c Thu Feb 23 18:21:37 2012 (r232054) @@ -2439,6 +2439,20 @@ struct in6_llentry { struct sockaddr_in6 l3_addr6; }; +/* + * Deletes an address from the address table. + * This function is called by the timer functions + * such as arptimer() and nd6_llinfo_timer(), and + * the caller does the locking. + */ +static void +in6_lltable_free(struct lltable *llt, struct llentry *lle) +{ + LLE_WUNLOCK(lle); + LLE_LOCK_DESTROY(lle); + free(lle, M_LLTABLE); +} + static struct llentry * in6_lltable_new(const struct sockaddr *l3addr, u_int flags) { @@ -2451,6 +2465,7 @@ in6_lltable_new(const struct sockaddr *l lle->l3_addr6 = *(const struct sockaddr_in6 *)l3addr; lle->base.lle_refcnt = 1; + lle->base.lle_free = in6_lltable_free; LLE_LOCK_INIT(&lle->base); callout_init_rw(&lle->base.ln_timer_ch, &lle->base.lle_lock, CALLOUT_RETURNUNLOCKED); @@ -2458,20 +2473,6 @@ in6_lltable_new(const struct sockaddr *l return &lle->base; } -/* - * Deletes an address from the address table. - * This function is called by the timer functions - * such as arptimer() and nd6_llinfo_timer(), and - * the caller does the locking. - */ -static void -in6_lltable_free(struct lltable *llt, struct llentry *lle) -{ - LLE_WUNLOCK(lle); - LLE_LOCK_DESTROY(lle); - free(lle, M_LLTABLE); -} - static void in6_lltable_prefix_free(struct lltable *llt, const struct sockaddr *prefix, @@ -2713,7 +2714,6 @@ in6_domifattach(struct ifnet *ifp) ext->scope6_id = scope6_ifattach(ifp); ext->lltable = lltable_init(ifp, AF_INET6); if (ext->lltable != NULL) { - ext->lltable->llt_free = in6_lltable_free; ext->lltable->llt_prefix_free = in6_lltable_prefix_free; ext->lltable->llt_lookup = in6_lltable_lookup; ext->lltable->llt_dump = in6_lltable_dump; From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 18:37:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 087AF106568B; Thu, 23 Feb 2012 18:37:31 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E65AE8FC14; Thu, 23 Feb 2012 18:37:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NIbUXG017568; Thu, 23 Feb 2012 18:37:30 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NIbUG1017563; Thu, 23 Feb 2012 18:37:30 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201202231837.q1NIbUG1017563@svn.freebsd.org> From: Kip Macy Date: Thu, 23 Feb 2012 18:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232055 - in head/sys: fs/fifofs kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 18:37:31 -0000 Author: kmacy Date: Thu Feb 23 18:37:30 2012 New Revision: 232055 URL: http://svn.freebsd.org/changeset/base/232055 Log: merge pipe and fifo implementations Also reviewed by: jhb, jilles (initial revision) Tested by: pho, jilles Submitted by: gianni Reviewed by: bde Modified: head/sys/fs/fifofs/fifo.h head/sys/fs/fifofs/fifo_vnops.c head/sys/kern/sys_pipe.c head/sys/sys/pipe.h Modified: head/sys/fs/fifofs/fifo.h ============================================================================== --- head/sys/fs/fifofs/fifo.h Thu Feb 23 18:21:37 2012 (r232054) +++ head/sys/fs/fifofs/fifo.h Thu Feb 23 18:37:30 2012 (r232055) @@ -33,6 +33,7 @@ /* * Prototypes for fifo operations on vnodes. */ +int fifo_iseof(struct file *); int fifo_vnoperate(struct vop_generic_args *); int fifo_printinfo(struct vnode *); Modified: head/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- head/sys/fs/fifofs/fifo_vnops.c Thu Feb 23 18:21:37 2012 (r232054) +++ head/sys/fs/fifofs/fifo_vnops.c Thu Feb 23 18:37:30 2012 (r232055) @@ -2,6 +2,7 @@ * Copyright (c) 1990, 1993, 1995 * The Regents of the University of California. * Copyright (c) 2005 Robert N. M. Watson + * Copyright (c) 2012 Giovanni Trematerra * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,11 +43,10 @@ #include #include #include -#include +#include +#include #include #include -#include -#include #include #include #include @@ -54,43 +54,19 @@ #include #include -static fo_rdwr_t fifo_read_f; -static fo_rdwr_t fifo_write_f; -static fo_ioctl_t fifo_ioctl_f; -static fo_poll_t fifo_poll_f; -static fo_kqfilter_t fifo_kqfilter_f; -static fo_stat_t fifo_stat_f; -static fo_close_t fifo_close_f; -static fo_truncate_t fifo_truncate_f; - -struct fileops fifo_ops_f = { - .fo_read = fifo_read_f, - .fo_write = fifo_write_f, - .fo_truncate = fifo_truncate_f, - .fo_ioctl = fifo_ioctl_f, - .fo_poll = fifo_poll_f, - .fo_kqfilter = fifo_kqfilter_f, - .fo_stat = fifo_stat_f, - .fo_close = fifo_close_f, - .fo_chmod = vn_chmod, - .fo_chown = vn_chown, - .fo_flags = DFLAG_PASSABLE -}; - /* * This structure is associated with the FIFO vnode and stores * the state associated with the FIFO. * Notes about locking: - * - fi_readsock and fi_writesock are invariant since init time. - * - fi_readers and fi_writers are vnode lock protected. - * - fi_wgen is fif_mtx lock protected. + * - fi_pipe is invariant since init time. + * - fi_readers and fi_writers are protected by the vnode lock. + * - fi_wgen is protected by the pipe mutex. */ struct fifoinfo { - struct socket *fi_readsock; - struct socket *fi_writesock; - long fi_readers; - long fi_writers; - int fi_wgen; + struct pipe *fi_pipe; + long fi_readers; + long fi_writers; + int fi_wgen; }; static vop_print_t fifo_print; @@ -99,29 +75,6 @@ static vop_close_t fifo_close; static vop_pathconf_t fifo_pathconf; static vop_advlock_t fifo_advlock; -static void filt_fifordetach(struct knote *kn); -static int filt_fiforead(struct knote *kn, long hint); -static void filt_fifowdetach(struct knote *kn); -static int filt_fifowrite(struct knote *kn, long hint); -static void filt_fifodetach_notsup(struct knote *kn); -static int filt_fifo_notsup(struct knote *kn, long hint); - -static struct filterops fiforead_filtops = { - .f_isfd = 1, - .f_detach = filt_fifordetach, - .f_event = filt_fiforead, -}; -static struct filterops fifowrite_filtops = { - .f_isfd = 1, - .f_detach = filt_fifowdetach, - .f_event = filt_fifowrite, -}; -static struct filterops fifo_notsup_filtops = { - .f_isfd = 1, - .f_detach = filt_fifodetach_notsup, - .f_event = filt_fifo_notsup, -}; - struct vop_vector fifo_specops = { .vop_default = &default_vnodeops, @@ -150,22 +103,19 @@ struct vop_vector fifo_specops = { .vop_write = VOP_PANIC, }; -struct mtx fifo_mtx; -MTX_SYSINIT(fifo, &fifo_mtx, "fifo mutex", MTX_DEF); - /* * Dispose of fifo resources. */ static void fifo_cleanup(struct vnode *vp) { - struct fifoinfo *fip = vp->v_fifoinfo; + struct fifoinfo *fip; ASSERT_VOP_ELOCKED(vp, "fifo_cleanup"); + fip = vp->v_fifoinfo; if (fip->fi_readers == 0 && fip->fi_writers == 0) { vp->v_fifoinfo = NULL; - (void)soclose(fip->fi_readsock); - (void)soclose(fip->fi_writesock); + pipe_dtor(fip->fi_pipe); free(fip, M_VNODE); } } @@ -185,101 +135,80 @@ fifo_open(ap) struct file *a_fp; } */ *ap; { - struct vnode *vp = ap->a_vp; + struct vnode *vp; + struct file *fp; + struct thread *td; struct fifoinfo *fip; - struct thread *td = ap->a_td; - struct ucred *cred = ap->a_cred; - struct file *fp = ap->a_fp; - struct socket *rso, *wso; + struct pipe *fpipe; int error; + vp = ap->a_vp; + fp = ap->a_fp; + td = ap->a_td; ASSERT_VOP_ELOCKED(vp, "fifo_open"); if (fp == NULL) return (EINVAL); if ((fip = vp->v_fifoinfo) == NULL) { - fip = malloc(sizeof(*fip), M_VNODE, M_WAITOK); - error = socreate(AF_LOCAL, &rso, SOCK_STREAM, 0, cred, td); - if (error) - goto fail1; - fip->fi_readsock = rso; - error = socreate(AF_LOCAL, &wso, SOCK_STREAM, 0, cred, td); - if (error) - goto fail2; - fip->fi_writesock = wso; - error = soconnect2(wso, rso); - /* Close the direction we do not use, so we can get POLLHUP. */ - if (error == 0) - error = soshutdown(rso, SHUT_WR); - if (error) { - (void)soclose(wso); -fail2: - (void)soclose(rso); -fail1: - free(fip, M_VNODE); + error = pipe_named_ctor(&fpipe, td); + if (error != 0) return (error); - } + fip = malloc(sizeof(*fip), M_VNODE, M_WAITOK); + fip->fi_pipe = fpipe; fip->fi_wgen = fip->fi_readers = fip->fi_writers = 0; - wso->so_snd.sb_lowat = PIPE_BUF; - SOCKBUF_LOCK(&rso->so_rcv); - rso->so_rcv.sb_state |= SBS_CANTRCVMORE; - SOCKBUF_UNLOCK(&rso->so_rcv); - KASSERT(vp->v_fifoinfo == NULL, - ("fifo_open: v_fifoinfo race")); + KASSERT(vp->v_fifoinfo == NULL, ("fifo_open: v_fifoinfo race")); vp->v_fifoinfo = fip; } + fpipe = fip->fi_pipe; + KASSERT(fpipe != NULL, ("fifo_open: pipe is NULL")); /* - * Use the fifo_mtx lock here, in addition to the vnode lock, + * Use the pipe mutex here, in addition to the vnode lock, * in order to allow vnode lock dropping before msleep() calls * and still avoiding missed wakeups. */ - mtx_lock(&fifo_mtx); + PIPE_LOCK(fpipe); if (ap->a_mode & FREAD) { fip->fi_readers++; if (fip->fi_readers == 1) { - SOCKBUF_LOCK(&fip->fi_writesock->so_snd); - fip->fi_writesock->so_snd.sb_state &= ~SBS_CANTSENDMORE; - SOCKBUF_UNLOCK(&fip->fi_writesock->so_snd); - if (fip->fi_writers > 0) { + fpipe->pipe_state &= ~PIPE_EOF; + if (fip->fi_writers > 0) wakeup(&fip->fi_writers); - sowwakeup(fip->fi_writesock); - } } fp->f_seqcount = fip->fi_wgen - fip->fi_writers; } if (ap->a_mode & FWRITE) { if ((ap->a_mode & O_NONBLOCK) && fip->fi_readers == 0) { - mtx_unlock(&fifo_mtx); + PIPE_UNLOCK(fpipe); if (fip->fi_writers == 0) fifo_cleanup(vp); return (ENXIO); } fip->fi_writers++; if (fip->fi_writers == 1) { - SOCKBUF_LOCK(&fip->fi_readsock->so_rcv); - fip->fi_readsock->so_rcv.sb_state &= ~SBS_CANTRCVMORE; - SOCKBUF_UNLOCK(&fip->fi_readsock->so_rcv); - if (fip->fi_readers > 0) { + fpipe->pipe_state &= ~PIPE_EOF; + if (fip->fi_readers > 0) wakeup(&fip->fi_readers); - sorwakeup(fip->fi_readsock); - } } } if ((ap->a_mode & O_NONBLOCK) == 0) { if ((ap->a_mode & FREAD) && fip->fi_writers == 0) { VOP_UNLOCK(vp, 0); - error = msleep(&fip->fi_readers, &fifo_mtx, + error = msleep(&fip->fi_readers, PIPE_MTX(fpipe), PDROP | PCATCH | PSOCK, "fifoor", 0); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (error) { fip->fi_readers--; if (fip->fi_readers == 0) { - socantsendmore(fip->fi_writesock); + PIPE_LOCK(fpipe); + fpipe->pipe_state |= PIPE_EOF; + if (fpipe->pipe_state & PIPE_WANTW) + wakeup(fpipe); + PIPE_UNLOCK(fpipe); fifo_cleanup(vp); } return (error); } - mtx_lock(&fifo_mtx); + PIPE_LOCK(fpipe); /* * We must have got woken up because we had a writer. * That (and not still having one) is the condition @@ -288,16 +217,18 @@ fail1: } if ((ap->a_mode & FWRITE) && fip->fi_readers == 0) { VOP_UNLOCK(vp, 0); - error = msleep(&fip->fi_writers, &fifo_mtx, + error = msleep(&fip->fi_writers, PIPE_MTX(fpipe), PDROP | PCATCH | PSOCK, "fifoow", 0); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (error) { fip->fi_writers--; if (fip->fi_writers == 0) { - socantrcvmore(fip->fi_readsock); - mtx_lock(&fifo_mtx); + PIPE_LOCK(fpipe); + fpipe->pipe_state |= PIPE_EOF; + if (fpipe->pipe_state & PIPE_WANTR) + wakeup(fpipe); fip->fi_wgen++; - mtx_unlock(&fifo_mtx); + PIPE_UNLOCK(fpipe); fifo_cleanup(vp); } return (error); @@ -307,82 +238,13 @@ fail1: * a reader. That (and not still having one) * is the condition that we must wait for. */ - mtx_lock(&fifo_mtx); + PIPE_LOCK(fpipe); } } - mtx_unlock(&fifo_mtx); + PIPE_UNLOCK(fpipe); KASSERT(fp != NULL, ("can't fifo/vnode bypass")); KASSERT(fp->f_ops == &badfileops, ("not badfileops in fifo_open")); - finit(fp, fp->f_flag, DTYPE_FIFO, fip, &fifo_ops_f); - return (0); -} - -static void -filt_fifordetach(struct knote *kn) -{ - struct socket *so = (struct socket *)kn->kn_hook; - - SOCKBUF_LOCK(&so->so_rcv); - knlist_remove(&so->so_rcv.sb_sel.si_note, kn, 1); - if (knlist_empty(&so->so_rcv.sb_sel.si_note)) - so->so_rcv.sb_flags &= ~SB_KNOTE; - SOCKBUF_UNLOCK(&so->so_rcv); -} - -static int -filt_fiforead(struct knote *kn, long hint) -{ - struct socket *so = (struct socket *)kn->kn_hook; - - SOCKBUF_LOCK_ASSERT(&so->so_rcv); - kn->kn_data = so->so_rcv.sb_cc; - if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { - kn->kn_flags |= EV_EOF; - return (1); - } else { - kn->kn_flags &= ~EV_EOF; - return (kn->kn_data > 0); - } -} - -static void -filt_fifowdetach(struct knote *kn) -{ - struct socket *so = (struct socket *)kn->kn_hook; - - SOCKBUF_LOCK(&so->so_snd); - knlist_remove(&so->so_snd.sb_sel.si_note, kn, 1); - if (knlist_empty(&so->so_snd.sb_sel.si_note)) - so->so_snd.sb_flags &= ~SB_KNOTE; - SOCKBUF_UNLOCK(&so->so_snd); -} - -static int -filt_fifowrite(struct knote *kn, long hint) -{ - struct socket *so = (struct socket *)kn->kn_hook; - - SOCKBUF_LOCK_ASSERT(&so->so_snd); - kn->kn_data = sbspace(&so->so_snd); - if (so->so_snd.sb_state & SBS_CANTSENDMORE) { - kn->kn_flags |= EV_EOF; - return (1); - } else { - kn->kn_flags &= ~EV_EOF; - return (kn->kn_data >= so->so_snd.sb_lowat); - } -} - -static void -filt_fifodetach_notsup(struct knote *kn) -{ - -} - -static int -filt_fifo_notsup(struct knote *kn, long hint) -{ - + finit(fp, fp->f_flag, DTYPE_FIFO, fpipe, &pipeops); return (0); } @@ -399,26 +261,33 @@ fifo_close(ap) struct thread *a_td; } */ *ap; { - struct vnode *vp = ap->a_vp; - struct fifoinfo *fip = vp->v_fifoinfo; + struct vnode *vp; + struct fifoinfo *fip; + struct pipe *cpipe; + vp = ap->a_vp; + fip = vp->v_fifoinfo; + cpipe = fip->fi_pipe; ASSERT_VOP_ELOCKED(vp, "fifo_close"); - if (fip == NULL) { - printf("fifo_close: no v_fifoinfo %p\n", vp); - return (0); - } if (ap->a_fflag & FREAD) { fip->fi_readers--; - if (fip->fi_readers == 0) - socantsendmore(fip->fi_writesock); + if (fip->fi_readers == 0) { + PIPE_LOCK(cpipe); + cpipe->pipe_state |= PIPE_EOF; + if (cpipe->pipe_state & PIPE_WANTW) + wakeup(cpipe); + PIPE_UNLOCK(cpipe); + } } if (ap->a_fflag & FWRITE) { fip->fi_writers--; if (fip->fi_writers == 0) { - socantrcvmore(fip->fi_readsock); - mtx_lock(&fifo_mtx); + PIPE_LOCK(cpipe); + cpipe->pipe_state |= PIPE_EOF; + if (cpipe->pipe_state & PIPE_WANTR) + wakeup(cpipe); fip->fi_wgen++; - mtx_unlock(&fifo_mtx); + PIPE_UNLOCK(cpipe); } } fifo_cleanup(vp); @@ -504,212 +373,15 @@ fifo_advlock(ap) return (ap->a_flags & F_FLOCK ? EOPNOTSUPP : EINVAL); } -static int -fifo_close_f(struct file *fp, struct thread *td) -{ - - return (vnops.fo_close(fp, td)); -} - -/* - * The implementation of ioctl() for named fifos is complicated by the fact - * that we permit O_RDWR fifo file descriptors, meaning that the actions of - * ioctls may have to be applied to both the underlying sockets rather than - * just one. The original implementation simply forward the ioctl to one - * or both sockets based on fp->f_flag. We now consider each ioctl - * separately, as the composition effect requires careful ordering. - * - * We do not blindly pass all ioctls through to the socket in order to avoid - * providing unnecessary ioctls that might be improperly depended on by - * applications (such as socket-specific, routing, and interface ioctls). - * - * Unlike sys_pipe.c, fifos do not implement the deprecated TIOCSPGRP and - * TIOCGPGRP ioctls. Earlier implementations of fifos did forward SIOCSPGRP - * and SIOCGPGRP ioctls, so we might need to re-add those here. - */ -static int -fifo_ioctl_f(struct file *fp, u_long com, void *data, struct ucred *cred, - struct thread *td) -{ - struct fifoinfo *fi; - struct file filetmp; /* Local, so need not be locked. */ - int error; - - error = ENOTTY; - fi = fp->f_data; - - switch (com) { - case FIONBIO: - /* - * Non-blocking I/O is implemented at the fifo layer using - * MSG_NBIO, so does not need to be forwarded down the stack. - */ - return (0); - - case FIOASYNC: - case FIOSETOWN: - case FIOGETOWN: - /* - * These socket ioctls don't have any ordering requirements, - * so are called in an arbitrary order, and only on the - * sockets indicated by the file descriptor rights. - * - * XXXRW: If O_RDWR and the read socket accepts an ioctl but - * the write socket doesn't, the socketpair is left in an - * inconsistent state. - */ - if (fp->f_flag & FREAD) { - filetmp.f_data = fi->fi_readsock; - filetmp.f_cred = cred; - error = soo_ioctl(&filetmp, com, data, cred, td); - if (error) - return (error); - } - if (fp->f_flag & FWRITE) { - filetmp.f_data = fi->fi_writesock; - filetmp.f_cred = cred; - error = soo_ioctl(&filetmp, com, data, cred, td); - } - return (error); - - case FIONREAD: - /* - * FIONREAD will return 0 for non-readable descriptors, and - * the results of FIONREAD on the read socket for readable - * descriptors. - */ - if (!(fp->f_flag & FREAD)) { - *(int *)data = 0; - return (0); - } - filetmp.f_data = fi->fi_readsock; - filetmp.f_cred = cred; - return (soo_ioctl(&filetmp, com, data, cred, td)); - - default: - return (ENOTTY); - } -} - -/* - * Because fifos are now a file descriptor layer object, EVFILT_VNODE is not - * implemented. Likely, fifo_kqfilter() should be removed, and - * fifo_kqfilter_f() should know how to forward the request to the underling - * vnode using f_vnode in the file descriptor here. - */ -static int -fifo_kqfilter_f(struct file *fp, struct knote *kn) -{ - struct fifoinfo *fi; - struct socket *so; - struct sockbuf *sb; - - fi = fp->f_data; - - /* - * If a filter is requested that is not supported by this file - * descriptor, don't return an error, but also don't ever generate an - * event. - */ - if ((kn->kn_filter == EVFILT_READ) && !(fp->f_flag & FREAD)) { - kn->kn_fop = &fifo_notsup_filtops; - return (0); - } - - if ((kn->kn_filter == EVFILT_WRITE) && !(fp->f_flag & FWRITE)) { - kn->kn_fop = &fifo_notsup_filtops; - return (0); - } - - switch (kn->kn_filter) { - case EVFILT_READ: - kn->kn_fop = &fiforead_filtops; - so = fi->fi_readsock; - sb = &so->so_rcv; - break; - case EVFILT_WRITE: - kn->kn_fop = &fifowrite_filtops; - so = fi->fi_writesock; - sb = &so->so_snd; - break; - default: - return (EINVAL); - } - - kn->kn_hook = (caddr_t)so; - - SOCKBUF_LOCK(sb); - knlist_add(&sb->sb_sel.si_note, kn, 1); - sb->sb_flags |= SB_KNOTE; - SOCKBUF_UNLOCK(sb); - - return (0); -} - -static int -fifo_poll_f(struct file *fp, int events, struct ucred *cred, struct thread *td) -{ - struct fifoinfo *fip; - struct file filetmp; - int levents, revents = 0; - - fip = fp->f_data; - levents = events & - (POLLIN | POLLINIGNEOF | POLLPRI | POLLRDNORM | POLLRDBAND); - if ((fp->f_flag & FREAD) && levents) { - filetmp.f_data = fip->fi_readsock; - filetmp.f_cred = cred; - mtx_lock(&fifo_mtx); - if (fp->f_seqcount == fip->fi_wgen) - levents |= POLLINIGNEOF; - mtx_unlock(&fifo_mtx); - revents |= soo_poll(&filetmp, levents, cred, td); - } - levents = events & (POLLOUT | POLLWRNORM | POLLWRBAND); - if ((fp->f_flag & FWRITE) && levents) { - filetmp.f_data = fip->fi_writesock; - filetmp.f_cred = cred; - revents |= soo_poll(&filetmp, levents, cred, td); - } - return (revents); -} - -static int -fifo_read_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td) +int +fifo_iseof(struct file *fp) { struct fifoinfo *fip; - int sflags; - fip = fp->f_data; - KASSERT(uio->uio_rw == UIO_READ,("fifo_read mode")); - if (uio->uio_resid == 0) - return (0); - sflags = (fp->f_flag & FNONBLOCK) ? MSG_NBIO : 0; - return (soreceive(fip->fi_readsock, NULL, uio, NULL, NULL, &sflags)); + KASSERT(fp->f_vnode != NULL, ("fifo_iseof: no vnode info")); + KASSERT(fp->f_vnode->v_fifoinfo != NULL, ("fifo_iseof: no fifoinfo")); + fip = fp->f_vnode->v_fifoinfo; + PIPE_LOCK_ASSERT(fip->fi_pipe, MA_OWNED); + return (fp->f_seqcount == fip->fi_wgen); } -static int -fifo_stat_f(struct file *fp, struct stat *sb, struct ucred *cred, struct thread *td) -{ - - return (vnops.fo_stat(fp, sb, cred, td)); -} - -static int -fifo_truncate_f(struct file *fp, off_t length, struct ucred *cred, struct thread *td) -{ - - return (vnops.fo_truncate(fp, length, cred, td)); -} - -static int -fifo_write_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td) -{ - struct fifoinfo *fip; - int sflags; - - fip = fp->f_data; - KASSERT(uio->uio_rw == UIO_WRITE,("fifo_write mode")); - sflags = (fp->f_flag & FNONBLOCK) ? MSG_NBIO : 0; - return (sosend(fip->fi_writesock, NULL, uio, 0, NULL, sflags, td)); -} Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Thu Feb 23 18:21:37 2012 (r232054) +++ head/sys/kern/sys_pipe.c Thu Feb 23 18:37:30 2012 (r232055) @@ -1,5 +1,6 @@ /*- * Copyright (c) 1996 John S. Dyson + * Copyright (c) 2012 Giovanni Trematerra * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -128,6 +129,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + /* * Use this define if you want to disable *fancy* VM things. Expect an * approx 30% decrease in transfer rate. This could be useful for @@ -135,6 +138,9 @@ __FBSDID("$FreeBSD$"); */ /* #define PIPE_NODIRECT */ +#define PIPE_PEER(pipe) \ + (((pipe)->pipe_state & PIPE_NAMED) ? (pipe) : ((pipe)->pipe_peer)) + /* * interfaces to the outside world */ @@ -147,7 +153,7 @@ static fo_kqfilter_t pipe_kqfilter; static fo_stat_t pipe_stat; static fo_close_t pipe_close; -static struct fileops pipeops = { +struct fileops pipeops = { .fo_read = pipe_read, .fo_write = pipe_write, .fo_truncate = pipe_truncate, @@ -162,9 +168,16 @@ static struct fileops pipeops = { }; static void filt_pipedetach(struct knote *kn); +static void filt_pipedetach_notsup(struct knote *kn); +static int filt_pipenotsup(struct knote *kn, long hint); static int filt_piperead(struct knote *kn, long hint); static int filt_pipewrite(struct knote *kn, long hint); +static struct filterops pipe_nfiltops = { + .f_isfd = 1, + .f_detach = filt_pipedetach_notsup, + .f_event = filt_pipenotsup +}; static struct filterops pipe_rfiltops = { .f_isfd = 1, .f_detach = filt_pipedetach, @@ -208,6 +221,7 @@ static void pipeinit(void *dummy __unuse static void pipeclose(struct pipe *cpipe); static void pipe_free_kmem(struct pipe *cpipe); static int pipe_create(struct pipe *pipe, int backing); +static int pipe_paircreate(struct thread *td, struct pipepair **p_pp); static __inline int pipelock(struct pipe *cpipe, int catch); static __inline void pipeunlock(struct pipe *cpipe); static __inline void pipeselwakeup(struct pipe *cpipe); @@ -317,20 +331,14 @@ pipe_zone_fini(void *mem, int size) mtx_destroy(&pp->pp_mtx); } -/* - * The pipe system call for the DTYPE_PIPE type of pipes. If we fail, let - * the zone pick up the pieces via pipeclose(). - */ -int -kern_pipe(struct thread *td, int fildes[2]) +static int +pipe_paircreate(struct thread *td, struct pipepair **p_pp) { - struct filedesc *fdp = td->td_proc->p_fd; - struct file *rf, *wf; struct pipepair *pp; struct pipe *rpipe, *wpipe; - int fd, error; + int error; - pp = uma_zalloc(pipe_zone, M_WAITOK); + *p_pp = pp = uma_zalloc(pipe_zone, M_WAITOK); #ifdef MAC /* * The MAC label is shared between the connected endpoints. As a @@ -356,7 +364,59 @@ kern_pipe(struct thread *td, int fildes[ rpipe->pipe_state |= PIPE_DIRECTOK; wpipe->pipe_state |= PIPE_DIRECTOK; + return (0); +} + +int +pipe_named_ctor(struct pipe **ppipe, struct thread *td) +{ + struct pipepair *pp; + int error; + + error = pipe_paircreate(td, &pp); + if (error != 0) + return (error); + pp->pp_rpipe.pipe_state |= PIPE_NAMED; + *ppipe = &pp->pp_rpipe; + return (0); +} + +void +pipe_dtor(struct pipe *dpipe) +{ + ino_t ino; + + ino = dpipe->pipe_ino; + funsetown(&dpipe->pipe_sigio); + pipeclose(dpipe); + if (dpipe->pipe_state & PIPE_NAMED) { + dpipe = dpipe->pipe_peer; + funsetown(&dpipe->pipe_sigio); + pipeclose(dpipe); + } + if (ino != 0 && ino != (ino_t)-1) + free_unr(pipeino_unr, ino); +} + +/* + * The pipe system call for the DTYPE_PIPE type of pipes. If we fail, let + * the zone pick up the pieces via pipeclose(). + */ +int +kern_pipe(struct thread *td, int fildes[2]) +{ + struct filedesc *fdp; + struct file *rf, *wf; + struct pipe *rpipe, *wpipe; + struct pipepair *pp; + int fd, error; + fdp = td->td_proc->p_fd; + error = pipe_paircreate(td, &pp); + if (error != 0) + return (error); + rpipe = &pp->pp_rpipe; + wpipe = &pp->pp_wpipe; error = falloc(td, &rf, &fd, 0); if (error) { pipeclose(rpipe); @@ -582,11 +642,12 @@ pipe_read(fp, uio, active_cred, flags, t struct thread *td; int flags; { - struct pipe *rpipe = fp->f_data; + struct pipe *rpipe; int error; int nread = 0; u_int size; + rpipe = fp->f_data; PIPE_LOCK(rpipe); ++rpipe->pipe_busy; error = pipelock(rpipe, 1); @@ -960,13 +1021,12 @@ pipe_write(fp, uio, active_cred, flags, struct thread *td; int flags; { - int error = 0; + int error; size_t desiredsize, orig_resid; struct pipe *wpipe, *rpipe; rpipe = fp->f_data; - wpipe = rpipe->pipe_peer; - + wpipe = PIPE_PEER(rpipe); PIPE_LOCK(rpipe); error = pipelock(wpipe, 1); if (error) { @@ -1243,6 +1303,9 @@ pipe_truncate(fp, length, active_cred, t struct thread *td; { + /* For named pipes call the vnode operation. */ + if (fp->f_vnode != NULL) + return (vnops.fo_truncate(fp, length, active_cred, td)); return (EINVAL); } @@ -1285,6 +1348,11 @@ pipe_ioctl(fp, cmd, data, active_cred, t break; case FIONREAD: + if (!(fp->f_flag & FREAD)) { + *(int *)data = 0; + PIPE_UNLOCK(mpipe); + return (0); + } if (mpipe->pipe_state & PIPE_DIRECTW) *(int *)data = mpipe->pipe_map.cnt; else @@ -1327,26 +1395,28 @@ pipe_poll(fp, events, active_cred, td) struct ucred *active_cred; struct thread *td; { - struct pipe *rpipe = fp->f_data; + struct pipe *rpipe; struct pipe *wpipe; - int revents = 0; + int levents, revents; #ifdef MAC int error; #endif - wpipe = rpipe->pipe_peer; + revents = 0; + rpipe = fp->f_data; + wpipe = PIPE_PEER(rpipe); PIPE_LOCK(rpipe); #ifdef MAC error = mac_pipe_check_poll(active_cred, rpipe->pipe_pair); if (error) goto locked_error; #endif - if (events & (POLLIN | POLLRDNORM)) + if (fp->f_flag & FREAD && events & (POLLIN | POLLRDNORM)) if ((rpipe->pipe_state & PIPE_DIRECTW) || (rpipe->pipe_buffer.cnt > 0)) revents |= events & (POLLIN | POLLRDNORM); - if (events & (POLLOUT | POLLWRNORM)) + if (fp->f_flag & FWRITE && events & (POLLOUT | POLLWRNORM)) if (wpipe->pipe_present != PIPE_ACTIVE || (wpipe->pipe_state & PIPE_EOF) || (((wpipe->pipe_state & PIPE_DIRECTW) == 0) && @@ -1354,6 +1424,12 @@ pipe_poll(fp, events, active_cred, td) wpipe->pipe_buffer.size == 0))) revents |= events & (POLLOUT | POLLWRNORM); + levents = events & + (POLLIN | POLLINIGNEOF | POLLPRI | POLLRDNORM | POLLRDBAND); + if (rpipe->pipe_state & PIPE_NAMED && fp->f_flag & FREAD && levents && + fifo_iseof(fp)) + events |= POLLINIGNEOF; + if ((events & POLLINIGNEOF) == 0) { if (rpipe->pipe_state & PIPE_EOF) { revents |= (events & (POLLIN | POLLRDNORM)); @@ -1364,13 +1440,13 @@ pipe_poll(fp, events, active_cred, td) } if (revents == 0) { - if (events & (POLLIN | POLLRDNORM)) { + if (fp->f_flag & FREAD && events & (POLLIN | POLLRDNORM)) { selrecord(td, &rpipe->pipe_sel); if (SEL_WAITING(&rpipe->pipe_sel)) rpipe->pipe_state |= PIPE_SEL; } - if (events & (POLLOUT | POLLWRNORM)) { + if (fp->f_flag & FWRITE && events & (POLLOUT | POLLWRNORM)) { selrecord(td, &wpipe->pipe_sel); if (SEL_WAITING(&wpipe->pipe_sel)) wpipe->pipe_state |= PIPE_SEL; @@ -1410,6 +1486,13 @@ pipe_stat(fp, ub, active_cred, td) return (error); } #endif + + /* For named pipes ask the underlying filesystem. */ + if (pipe->pipe_state & PIPE_NAMED) { + PIPE_UNLOCK(pipe); + return (vnops.fo_stat(fp, ub, active_cred, td)); + } + /* * Lazily allocate an inode number for the pipe. Most pipe * users do not call fstat(2) on the pipe, which means that @@ -1456,12 +1539,12 @@ pipe_close(fp, td) struct file *fp; struct thread *td; { - struct pipe *cpipe = fp->f_data; + if (fp->f_vnode != NULL) + return vnops.fo_close(fp, td); fp->f_ops = &badfileops; + pipe_dtor(fp->f_data); fp->f_data = NULL; - funsetown(&cpipe->pipe_sigio); - pipeclose(cpipe); return (0); } @@ -1498,7 +1581,6 @@ pipeclose(cpipe) { struct pipepair *pp; struct pipe *ppipe; - ino_t ino; KASSERT(cpipe != NULL, ("pipeclose: cpipe == NULL")); @@ -1557,12 +1639,6 @@ pipeclose(cpipe) knlist_destroy(&cpipe->pipe_sel.si_note); /* - * Postpone the destroy of the fake inode number allocated for - * our end, until pipe mtx is unlocked. - */ - ino = cpipe->pipe_ino; - - /* * If both endpoints are now closed, release the memory for the * pipe pair. If not, unlock. */ @@ -1574,9 +1650,6 @@ pipeclose(cpipe) uma_zfree(pipe_zone, cpipe->pipe_pair); } else PIPE_UNLOCK(cpipe); - - if (ino != 0 && ino != (ino_t)-1) - free_unr(pipeino_unr, ino); } /*ARGSUSED*/ @@ -1585,7 +1658,20 @@ pipe_kqfilter(struct file *fp, struct kn { struct pipe *cpipe; - cpipe = kn->kn_fp->f_data; + /* + * If a filter is requested that is not supported by this file + * descriptor, don't return an error, but also don't ever generate an + * event. + */ + if ((kn->kn_filter == EVFILT_READ) && !(fp->f_flag & FREAD)) { + kn->kn_fop = &pipe_nfiltops; + return (0); + } + if ((kn->kn_filter == EVFILT_WRITE) && !(fp->f_flag & FWRITE)) { + kn->kn_fop = &pipe_nfiltops; + return (0); + } + cpipe = fp->f_data; PIPE_LOCK(cpipe); switch (kn->kn_filter) { case EVFILT_READ: @@ -1598,13 +1684,14 @@ pipe_kqfilter(struct file *fp, struct kn PIPE_UNLOCK(cpipe); return (EPIPE); } - cpipe = cpipe->pipe_peer; + cpipe = PIPE_PEER(cpipe); break; default: PIPE_UNLOCK(cpipe); return (EINVAL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 18:48:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB77C106566B; Thu, 23 Feb 2012 18:48:02 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5D378FC17; Thu, 23 Feb 2012 18:48:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NIm2Bb018094; Thu, 23 Feb 2012 18:48:02 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NIm2S3018092; Thu, 23 Feb 2012 18:48:02 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202231848.q1NIm2S3018092@svn.freebsd.org> From: Christian Brueffer Date: Thu, 23 Feb 2012 18:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232056 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 18:48:02 -0000 Author: brueffer Date: Thu Feb 23 18:48:02 2012 New Revision: 232056 URL: http://svn.freebsd.org/changeset/base/232056 Log: Rename DESCRIPTION section to HARDWARE, so this manpage can be used for automatic hardware notes generation. MFC after: 3 days Modified: head/share/man/man4/isci.4 Modified: head/share/man/man4/isci.4 ============================================================================== --- head/share/man/man4/isci.4 Thu Feb 23 18:37:30 2012 (r232055) +++ head/share/man/man4/isci.4 Thu Feb 23 18:48:02 2012 (r232056) @@ -52,7 +52,7 @@ Or, to load the driver as a module at bo .Bd -literal -offset indent isci_load="YES" .Ed -.Sh DESCRIPTION +.Sh HARDWARE The .Nm driver provides support for Intel C600 From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 18:49:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DBFD106564A; Thu, 23 Feb 2012 18:49:39 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 372BE8FC1A; Thu, 23 Feb 2012 18:49:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NInduu018175; Thu, 23 Feb 2012 18:49:39 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NIndrV018172; Thu, 23 Feb 2012 18:49:39 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202231849.q1NIndrV018172@svn.freebsd.org> From: Christian Brueffer Date: Thu, 23 Feb 2012 18:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232057 - in stable/8/release: doc/en_US.ISO8859-1/hardware doc/share/misc picobsd/floppy.tree/sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 18:49:39 -0000 Author: brueffer Date: Thu Feb 23 18:49:38 2012 New Revision: 232057 URL: http://svn.freebsd.org/changeset/base/232057 Log: MFC: r231943 Add oce(4) to the hardware notes. Approved by: re (bz) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/8/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/8/release/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) stable/8/release/picobsd/tinyware/login/ (props changed) stable/8/release/picobsd/tinyware/passwd/ (props changed) stable/8/release/powerpc/ (props changed) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:48:02 2012 (r232056) +++ stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:49:38 2012 (r232057) @@ -900,6 +900,8 @@ &hwlist.nxge; + &hwlist.oce; + &hwlist.pcn; &hwlist.re; Modified: stable/8/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/8/release/doc/share/misc/dev.archlist.txt Thu Feb 23 18:48:02 2012 (r232056) +++ stable/8/release/doc/share/misc/dev.archlist.txt Thu Feb 23 18:49:38 2012 (r232057) @@ -97,6 +97,7 @@ ng_ubt i386,pc98,amd64 nsp i386,pc98 nve i386,amd64 nxge i386,amd64 +oce i386,amd64 ohci i386,pc98,ia64,amd64,powerpc oltr i386 pcn i386,pc98,ia64,amd64 From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 18:50:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 846801065670; Thu, 23 Feb 2012 18:50:19 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FAD78FC08; Thu, 23 Feb 2012 18:50:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NIoJqs018250; Thu, 23 Feb 2012 18:50:19 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NIoJYw018247; Thu, 23 Feb 2012 18:50:19 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201202231850.q1NIoJYw018247@svn.freebsd.org> From: Kip Macy Date: Thu, 23 Feb 2012 18:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232058 - stable/9/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 18:50:19 -0000 Author: kmacy Date: Thu Feb 23 18:50:19 2012 New Revision: 232058 URL: http://svn.freebsd.org/changeset/base/232058 Log: MFC r230598 A flowtable entry can continue referencing an llentry indefinitely if the entry is repeatedly referenced within its timeout window. This change clears the LLE_VALID flag when an llentry is removed from an interface's hash table and adds an extra check to the flowtable code for the LLE_VALID flag in llentry to avoid retaining and using a stale reference. Modified: stable/9/sys/net/flowtable.c stable/9/sys/net/if_llatbl.c Modified: stable/9/sys/net/flowtable.c ============================================================================== --- stable/9/sys/net/flowtable.c Thu Feb 23 18:49:38 2012 (r232057) +++ stable/9/sys/net/flowtable.c Thu Feb 23 18:50:19 2012 (r232058) @@ -1185,12 +1185,14 @@ keycheck: rt = __DEVOLATILE(struct rtentry *, fle->f_rt); lle = __DEVOLATILE(struct llentry *, fle->f_lle); if ((rt != NULL) + && lle != NULL && fle->f_fhash == hash && flowtable_key_equal(fle, key) && (proto == fle->f_proto) && (fibnum == fle->f_fibnum) && (rt->rt_flags & RTF_UP) - && (rt->rt_ifp != NULL)) { + && (rt->rt_ifp != NULL) + && (lle->la_flags & LLE_VALID)) { fs->ft_hits++; fle->f_uptime = time_uptime; fle->f_flags |= flags; Modified: stable/9/sys/net/if_llatbl.c ============================================================================== --- stable/9/sys/net/if_llatbl.c Thu Feb 23 18:49:38 2012 (r232057) +++ stable/9/sys/net/if_llatbl.c Thu Feb 23 18:50:19 2012 (r232058) @@ -125,6 +125,7 @@ llentry_free(struct llentry *lle) ("%s: la_numheld %d > 0, pkts_droped %zd", __func__, lle->la_numheld, pkts_dropped)); + lle->la_flags &= ~LLE_VALID; LLE_FREE_LOCKED(lle); return (pkts_dropped); From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 18:51:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A0831065740; Thu, 23 Feb 2012 18:51:25 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 433DE8FC1C; Thu, 23 Feb 2012 18:51:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NIpOpL018335; Thu, 23 Feb 2012 18:51:24 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NIpOxH018329; Thu, 23 Feb 2012 18:51:24 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201202231851.q1NIpOxH018329@svn.freebsd.org> From: Martin Matuska Date: Thu, 23 Feb 2012 18:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232059 - in head: sys/fs/devfs sys/fs/nullfs sys/kern sys/sys usr.sbin/jail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 18:51:25 -0000 Author: mm Date: Thu Feb 23 18:51:24 2012 New Revision: 232059 URL: http://svn.freebsd.org/changeset/base/232059 Log: To improve control over the use of mount(8) inside a jail(8), introduce a new jail parameter node with the following parameters: allow.mount.devfs: allow mounting the devfs filesystem inside a jail allow.mount.nullfs: allow mounting the nullfs filesystem inside a jail Both parameters are disabled by default (equals the behavior before devfs and nullfs in jails). Administrators have to explicitly allow mounting devfs and nullfs for each jail. The value "-1" of the devfs_ruleset parameter is removed in favor of the new allow setting. Reviewed by: jamie Suggested by: pjd MFC after: 2 weeks Modified: head/sys/fs/devfs/devfs_vfsops.c head/sys/fs/nullfs/null_vfsops.c head/sys/kern/kern_jail.c head/sys/sys/jail.h head/usr.sbin/jail/jail.8 Modified: head/sys/fs/devfs/devfs_vfsops.c ============================================================================== --- head/sys/fs/devfs/devfs_vfsops.c Thu Feb 23 18:50:19 2012 (r232058) +++ head/sys/fs/devfs/devfs_vfsops.c Thu Feb 23 18:51:24 2012 (r232059) @@ -71,7 +71,7 @@ devfs_mount(struct mount *mp) struct devfs_mount *fmp; struct vnode *rvp; struct thread *td = curthread; - int rsnum; + int injail, rsnum; if (devfs_unr == NULL) devfs_unr = new_unrhdr(0, INT_MAX, NULL); @@ -81,7 +81,11 @@ devfs_mount(struct mount *mp) if (mp->mnt_flag & MNT_ROOTFS) return (EOPNOTSUPP); + if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_DEVFS)) + return (EPERM); + rsnum = 0; + injail = jailed(td->td_ucred); if (mp->mnt_optnew != NULL) { if (vfs_filteropt(mp->mnt_optnew, devfs_opts)) @@ -89,24 +93,20 @@ devfs_mount(struct mount *mp) if (vfs_getopt(mp->mnt_optnew, "ruleset", NULL, NULL) == 0 && (vfs_scanopt(mp->mnt_optnew, "ruleset", "%d", - &rsnum) != 1 || rsnum < 0 || rsnum > 65535)) - error = EINVAL; - } + &rsnum) != 1 || rsnum < 0 || rsnum > 65535)) { + vfs_mount_error(mp, "%s", + "invalid ruleset specification"); + return (EINVAL); + } - /* jails enforce their ruleset, prison0 has no restrictions */ - if (td->td_ucred->cr_prison->pr_devfs_rsnum != 0) { - rsnum = td->td_ucred->cr_prison->pr_devfs_rsnum; - if (rsnum == -1) + if (injail && rsnum != 0 && + rsnum != td->td_ucred->cr_prison->pr_devfs_rsnum) return (EPERM); - /* check rsnum for sanity, devfs_rsnum is uint16_t */ - if (rsnum < 0 || rsnum > 65535) - error = EINVAL; } - if (error) { - vfs_mount_error(mp, "%s", "invalid ruleset specification"); - return (error); - } + /* jails enforce their ruleset */ + if (injail) + rsnum = td->td_ucred->cr_prison->pr_devfs_rsnum; if (mp->mnt_flag & MNT_UPDATE) { if (rsnum != 0) { Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Thu Feb 23 18:50:19 2012 (r232058) +++ head/sys/fs/nullfs/null_vfsops.c Thu Feb 23 18:51:24 2012 (r232059) @@ -50,6 +50,7 @@ #include #include #include +#include #include @@ -75,12 +76,16 @@ nullfs_mount(struct mount *mp) struct vnode *lowerrootvp, *vp; struct vnode *nullm_rootvp; struct null_mount *xmp; + struct thread *td = curthread; char *target; int isvnunlocked = 0, len; struct nameidata nd, *ndp = &nd; NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); + if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_NULLFS)) + return (EPERM); + if (mp->mnt_flag & MNT_ROOTFS) return (EOPNOTSUPP); /* Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu Feb 23 18:50:19 2012 (r232058) +++ head/sys/kern/kern_jail.c Thu Feb 23 18:51:24 2012 (r232059) @@ -201,6 +201,8 @@ static char *pr_allow_names[] = { "allow.mount", "allow.quotas", "allow.socket_af", + "allow.mount.devfs", + "allow.mount.nullfs", }; const size_t pr_allow_names_size = sizeof(pr_allow_names); @@ -212,12 +214,14 @@ static char *pr_allow_nonames[] = { "allow.nomount", "allow.noquotas", "allow.nosocket_af", + "allow.mount.nodevfs", + "allow.mount.nonullfs", }; const size_t pr_allow_nonames_size = sizeof(pr_allow_nonames); #define JAIL_DEFAULT_ALLOW PR_ALLOW_SET_HOSTNAME #define JAIL_DEFAULT_ENFORCE_STATFS 2 -#define JAIL_DEFAULT_DEVFS_RSNUM -1 +#define JAIL_DEFAULT_DEVFS_RSNUM 0 static unsigned jail_default_allow = JAIL_DEFAULT_ALLOW; static int jail_default_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS; static int jail_default_devfs_rsnum = JAIL_DEFAULT_DEVFS_RSNUM; @@ -1279,7 +1283,7 @@ kern_jail_set(struct thread *td, struct pr->pr_securelevel = ppr->pr_securelevel; pr->pr_allow = JAIL_DEFAULT_ALLOW & ppr->pr_allow; pr->pr_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS; - pr->pr_devfs_rsnum = JAIL_DEFAULT_DEVFS_RSNUM; + pr->pr_devfs_rsnum = ppr->pr_devfs_rsnum; LIST_INIT(&pr->pr_children); mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF | MTX_DUPOK); @@ -1361,21 +1365,19 @@ kern_jail_set(struct thread *td, struct if (gotrsnum) { /* * devfs_rsnum is a uint16_t - * value of -1 disables devfs mounts */ - if (rsnum < -1 || rsnum > 65535) { + if (rsnum < 0 || rsnum > 65535) { error = EINVAL; goto done_deref_locked; } /* - * Nested jails may inherit parent's devfs ruleset - * or disable devfs + * Nested jails always inherit parent's devfs ruleset */ if (jailed(td->td_ucred)) { if (rsnum > 0 && rsnum != ppr->pr_devfs_rsnum) { error = EPERM; goto done_deref_locked; - } else if (rsnum == 0) + } else rsnum = ppr->pr_devfs_rsnum; } } @@ -1623,8 +1625,7 @@ kern_jail_set(struct thread *td, struct pr->pr_devfs_rsnum = rsnum; /* Pass this restriction on to the children. */ FOREACH_PRISON_DESCENDANT_LOCKED(pr, tpr, descend) - if (tpr->pr_devfs_rsnum != -1) - tpr->pr_devfs_rsnum = rsnum; + tpr->pr_devfs_rsnum = rsnum; } if (name != NULL) { if (ppr == &prison0) @@ -4195,6 +4196,14 @@ SYSCTL_PROC(_security_jail, OID_AUTO, mo CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, PR_ALLOW_MOUNT, sysctl_jail_default_allow, "I", "Processes in jail can mount/unmount jail-friendly file systems"); +SYSCTL_PROC(_security_jail, OID_AUTO, mount_devfs_allowed, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + NULL, PR_ALLOW_MOUNT_DEVFS, sysctl_jail_default_allow, "I", + "Processes in jail can mount/unmount the devfs file system"); +SYSCTL_PROC(_security_jail, OID_AUTO, mount_nullfs_allowed, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + NULL, PR_ALLOW_MOUNT_NULLFS, sysctl_jail_default_allow, "I", + "Processes in jail can mount/unmount the nullfs file system"); static int sysctl_jail_default_level(SYSCTL_HANDLER_ARGS) @@ -4329,13 +4338,19 @@ SYSCTL_JAIL_PARAM(_allow, raw_sockets, C "B", "Jail may create raw sockets"); SYSCTL_JAIL_PARAM(_allow, chflags, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may alter system file flags"); -SYSCTL_JAIL_PARAM(_allow, mount, CTLTYPE_INT | CTLFLAG_RW, - "B", "Jail may mount/unmount jail-friendly file systems"); SYSCTL_JAIL_PARAM(_allow, quotas, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may set file quotas"); SYSCTL_JAIL_PARAM(_allow, socket_af, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may create sockets other than just UNIX/IPv4/IPv6/route"); +SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags"); +SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount/unmount jail-friendly file systems in general"); +SYSCTL_JAIL_PARAM(_allow_mount, devfs, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount/unmount the devfs file system"); +SYSCTL_JAIL_PARAM(_allow_mount, nullfs, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount/unmount the nullfs file system"); + void prison_racct_foreach(void (*callback)(struct racct *racct, void *arg2, void *arg3), void *arg2, void *arg3) Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Thu Feb 23 18:50:19 2012 (r232058) +++ head/sys/sys/jail.h Thu Feb 23 18:51:24 2012 (r232059) @@ -223,7 +223,9 @@ struct prison_racct { #define PR_ALLOW_MOUNT 0x0010 #define PR_ALLOW_QUOTAS 0x0020 #define PR_ALLOW_SOCKET_AF 0x0040 -#define PR_ALLOW_ALL 0x007f +#define PR_ALLOW_MOUNT_DEVFS 0x0080 +#define PR_ALLOW_MOUNT_NULLFS 0x0100 +#define PR_ALLOW_ALL 0x01ff /* * OSD methods @@ -338,6 +340,8 @@ SYSCTL_DECL(_security_jail_param); sysctl_jail_param, fmt, descr) #define SYSCTL_JAIL_PARAM_NODE(module, descr) \ SYSCTL_NODE(_security_jail_param, OID_AUTO, module, 0, 0, descr) +#define SYSCTL_JAIL_PARAM_SUBNODE(parent, module, descr) \ + SYSCTL_NODE(_security_jail_param_##parent, OID_AUTO, module, 0, 0, descr) #define SYSCTL_JAIL_PARAM_SYS_NODE(module, access, descr) \ SYSCTL_JAIL_PARAM_NODE(module, descr); \ SYSCTL_JAIL_PARAM(_##module, , CTLTYPE_INT | (access), "E,jailsys", \ Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Thu Feb 23 18:50:19 2012 (r232058) +++ head/usr.sbin/jail/jail.8 Thu Feb 23 18:51:24 2012 (r232059) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 9, 2012 +.Dd February 23, 2012 .Dt JAIL 8 .Os .Sh NAME @@ -303,15 +303,16 @@ If the system securelevel is changed, an least as secure. .It Va devfs_ruleset The number of the devfs ruleset that is enforced for mounting devfs in -this jail and its descendants. A value of zero means no ruleset is enforced -or if set inside a jail for a descendant jail, the parent jails's devfs -ruleset enforcement is inherited. A value of -1 (default) means mounting a -devfs filesystem is not allowed. Mounting devfs inside a jail is possible -only if the +this jail. A value of zero (default) means no ruleset is enforced. Descendant +jails inherit the parent jail's devfs ruleset enforcement. Mounting devfs +inside a jail is possible only if the .Va allow.mount -permission is effective and +and +.Va allow.mount.devfs +permissions are effective and .Va enforce_statfs -is set to a value lower than 2. +is set to a value lower than 2. Devfs rules and rulesets cannot be viewed or +modified from inside a jail. .It Va children.max The number of child jails allowed to be created by this jail (or by other jails under this jail). @@ -407,6 +408,25 @@ within a jail. This permission is effective only if .Va enforce_statfs is set to a value lower than 2. +.It Va allow.mount.devfs +privileged users inside the jail will be able to mount and unmount the +devfs file system. +This permission is effective only together with +.Va allow.mount +and if +.Va enforce_statfs +is set to a value lower than 2. Please consider restricting the devfs ruleset +with the +.Va devfs_ruleset +option. +.It Va allow.mount.nullfs +privileged users inside the jail will be able to mount and unmount the +nullfs file system. +This permission is effective only together with +.Va allow.mount +and if +.Va enforce_statfs +is set to a value lower than 2. .It Va allow.quotas The prison root may administer quotas on the jail's filesystem(s). This includes filesystems that the jail may share with other jails or From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 18:54:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06E7B1065670; Thu, 23 Feb 2012 18:54:34 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E582D8FC0C; Thu, 23 Feb 2012 18:54:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NIsXmI018475; Thu, 23 Feb 2012 18:54:33 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NIsXCg018472; Thu, 23 Feb 2012 18:54:33 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202231854.q1NIsXCg018472@svn.freebsd.org> From: Christian Brueffer Date: Thu, 23 Feb 2012 18:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232060 - in head/release/doc: en_US.ISO8859-1/hardware share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 18:54:34 -0000 Author: brueffer Date: Thu Feb 23 18:54:33 2012 New Revision: 232060 URL: http://svn.freebsd.org/changeset/base/232060 Log: Add isci(4) to the hardware notes. MFC after: 3 days Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml head/release/doc/share/misc/dev.archlist.txt Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:51:24 2012 (r232059) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:54:33 2012 (r232060) @@ -788,6 +788,8 @@ &hwlist.ips; + &hwlist.isci; + &hwlist.isp; &hwlist.mfi; Modified: head/release/doc/share/misc/dev.archlist.txt ============================================================================== --- head/release/doc/share/misc/dev.archlist.txt Thu Feb 23 18:51:24 2012 (r232059) +++ head/release/doc/share/misc/dev.archlist.txt Thu Feb 23 18:54:33 2012 (r232060) @@ -80,6 +80,7 @@ ida i386 ie i386 iir i386,ia64,amd64 ips i386,amd64 +isci i386,amd64 ixgb i386,amd64 kue i386,pc98,ia64,amd64,powerpc lge i386,pc98,amd64 From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 18:59:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B3A110656DF; Thu, 23 Feb 2012 18:59:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFACF8FC28; Thu, 23 Feb 2012 18:59:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NIxWSL018673; Thu, 23 Feb 2012 18:59:32 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NIxWTU018671; Thu, 23 Feb 2012 18:59:32 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202231859.q1NIxWTU018671@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 18:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232061 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 18:59:35 -0000 Author: jkim Date: Thu Feb 23 18:59:32 2012 New Revision: 232061 URL: http://svn.freebsd.org/changeset/base/232061 Log: Fix a typo introduced in r231843. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Thu Feb 23 18:54:33 2012 (r232060) +++ head/sys/dev/fb/vesa.c Thu Feb 23 18:59:32 2012 (r232061) @@ -1481,7 +1481,7 @@ vesa_load_state(video_adapter_t *adp, vo (void)vesa_bios_post(); mode = adp->va_mode; (void)vesa_set_mode(adp, adp->va_initial_mode); - if (mode != adp->va_initial_mode); + if (mode != adp->va_initial_mode) (void)vesa_set_mode(adp, mode); return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs)); From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 19:05:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E1721065672; Thu, 23 Feb 2012 19:05:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FEFF8FC13; Thu, 23 Feb 2012 19:05:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NJ5w5P018962; Thu, 23 Feb 2012 19:05:58 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NJ5wBq018960; Thu, 23 Feb 2012 19:05:58 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202231905.q1NJ5wBq018960@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 19:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232063 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 19:05:58 -0000 Author: jkim Date: Thu Feb 23 19:05:57 2012 New Revision: 232063 URL: http://svn.freebsd.org/changeset/base/232063 Log: Probe supported states for save/restore function. Some VBE implementation refuses to save/restore states if an unsupported bit is set. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Thu Feb 23 19:03:22 2012 (r232062) +++ head/sys/dev/fb/vesa.c Thu Feb 23 19:05:57 2012 (r232063) @@ -80,6 +80,7 @@ typedef struct adp_state adp_state_t; static struct mtx vesa_lock; +static int vesa_state; static void *vesa_state_buf = NULL; static uint32_t vesa_state_buf_offs = 0; static ssize_t vesa_state_buf_size = 0; @@ -205,13 +206,7 @@ static int vesa_bios_load_palette2(int s #define STATE_SIZE 0 #define STATE_SAVE 1 #define STATE_LOAD 2 -#define STATE_HW (1<<0) -#define STATE_DATA (1<<1) -#define STATE_DAC (1<<2) -#define STATE_REG (1<<3) -#define STATE_MOST (STATE_HW | STATE_DATA | STATE_REG) -#define STATE_ALL (STATE_HW | STATE_DATA | STATE_DAC | STATE_REG) -static ssize_t vesa_bios_state_buf_size(void); +static ssize_t vesa_bios_state_buf_size(int); static int vesa_bios_save_restore(int code, void *p); #ifdef MODE_TABLE_BROKEN static int vesa_bios_get_line_length(void); @@ -509,14 +504,14 @@ vesa_bios_load_palette2(int start, int c } static ssize_t -vesa_bios_state_buf_size(void) +vesa_bios_state_buf_size(int state) { x86regs_t regs; x86bios_init_regs(®s); regs.R_AX = 0x4f04; /* regs.R_DL = STATE_SIZE; */ - regs.R_CX = STATE_MOST; + regs.R_CX = state; x86bios_intr(®s, 0x10); @@ -537,7 +532,7 @@ vesa_bios_save_restore(int code, void *p x86bios_init_regs(®s); regs.R_AX = 0x4f04; regs.R_DL = code; - regs.R_CX = STATE_MOST; + regs.R_CX = vesa_state; regs.R_ES = X86BIOS_PHYSTOSEG(vesa_state_buf_offs); regs.R_BX = X86BIOS_PHYSTOOFF(vesa_state_buf_offs); @@ -1041,7 +1036,12 @@ vesa_bios_init(void) x86bios_free(vmbuf, sizeof(*buf)); - vesa_state_buf_size = vesa_bios_state_buf_size(); + /* Probe supported save/restore states. */ + for (i = 0; i < 4; i++) + if (vesa_bios_state_buf_size(1 << i) > 0) + vesa_state |= 1 << i; + if (vesa_state != 0) + vesa_state_buf_size = vesa_bios_state_buf_size(vesa_state); vesa_palette = x86bios_alloc(&vesa_palette_offs, VESA_PALETTE_SIZE + vesa_state_buf_size, M_WAITOK); if (vesa_state_buf_size > 0) { From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 19:13:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FDF61065740; Thu, 23 Feb 2012 19:13:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00C988FC08; Thu, 23 Feb 2012 19:13:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NJDJEL019246; Thu, 23 Feb 2012 19:13:19 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NJDJKg019243; Thu, 23 Feb 2012 19:13:19 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201202231913.q1NJDJKg019243@svn.freebsd.org> From: Martin Matuska Date: Thu, 23 Feb 2012 19:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232064 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 19:13:20 -0000 Author: mm Date: Thu Feb 23 19:13:19 2012 New Revision: 232064 URL: http://svn.freebsd.org/changeset/base/232064 Log: Import illumos changeset 13608 [1]: add support for "-t " argument to zfs get References: https://www.illumos.org/issues/1936 Update zfs(8) manpage in respect of [1]. Fix typo in zfs(8) manpage. Obtained from: illumos (issue #1936) MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Feb 23 19:05:57 2012 (r232063) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Feb 23 19:13:19 2012 (r232064) @@ -1,5 +1,5 @@ '\" te -.\" Copyright (c) 2011, Martin Matuska . +.\" Copyright (c) 2012, Martin Matuska . .\" All Rights Reserved. .\" .\" The contents of this file are subject to the terms of the @@ -18,8 +18,8 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. -.\" Copyright 2011 Nexenta Systems, Inc. All rights reserved. .\" Copyright (c) 2011 by Delphix. All rights reserved. +.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" .\" $FreeBSD$ @@ -113,6 +113,7 @@ .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp .Op Fl o Ar all | field Ns Op , Ns Ar ... +.Op Fl t Ar type Ns Op , Ns Ar ... .Op Fl s Ar source Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot @@ -1753,7 +1754,7 @@ A comma-separated list of types to displ is one of .Sy filesystem , snapshot , volume , No or Sy all . For example, specifying -.Fl o Cm snapshot +.Fl t Cm snapshot displays only snapshots. .It Fl s Ar property A property for sorting the output by column in ascending order based on the @@ -1811,6 +1812,7 @@ section. .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp .Op Fl o Ar all | field Ns Op , Ns Ar ... +.Op Fl t Ar type Ns Op , Ns Ar ... .Op Fl s Ar source Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot @@ -1871,6 +1873,14 @@ Default values are The keyword .Cm all specifies all columns. +.It Fl t Ar type Ns Op , Ns Ar ... +A comma-separated list of types to display, where +.Ar type +is one of +.Sy filesystem , snapshot , volume , No or Sy all . +For example, specifying +.Fl t Cm snapshot +displays only snapshots. .It Fl s Ar source Ns Op , Ns Ar ... A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Feb 23 19:05:57 2012 (r232063) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Feb 23 19:13:19 2012 (r232064) @@ -227,7 +227,8 @@ get_usage(zfs_help_t idx) "[%][,...]\n")); case HELP_GET: return (gettext("\tget [-rHp] [-d max] " - "[-o \"all\" | field[,...]] [-s source[,...]]\n" + "[-o \"all\" | field[,...]] [-t type[,...]] " + "[-s source[,...]]\n" "\t <\"all\" | property[,...]> " "[filesystem|volume|snapshot] ...\n")); case HELP_INHERIT: @@ -1473,6 +1474,7 @@ zfs_do_get(int argc, char **argv) { zprop_get_cbdata_t cb = { 0 }; int i, c, flags = ZFS_ITER_ARGS_CAN_BE_PATHS; + int types = ZFS_TYPE_DATASET; char *value, *fields; int ret = 0; int limit = 0; @@ -1489,7 +1491,7 @@ zfs_do_get(int argc, char **argv) cb.cb_type = ZFS_TYPE_DATASET; /* check options */ - while ((c = getopt(argc, argv, ":d:o:s:rHp")) != -1) { + while ((c = getopt(argc, argv, ":d:o:s:rt:Hp")) != -1) { switch (c) { case 'p': cb.cb_literal = B_TRUE; @@ -1607,6 +1609,37 @@ zfs_do_get(int argc, char **argv) } break; + case 't': + types = 0; + flags &= ~ZFS_ITER_PROP_LISTSNAPS; + while (*optarg != '\0') { + static char *type_subopts[] = { "filesystem", + "volume", "snapshot", "all", NULL }; + + switch (getsubopt(&optarg, type_subopts, + &value)) { + case 0: + types |= ZFS_TYPE_FILESYSTEM; + break; + case 1: + types |= ZFS_TYPE_VOLUME; + break; + case 2: + types |= ZFS_TYPE_SNAPSHOT; + break; + case 3: + types = ZFS_TYPE_DATASET; + break; + + default: + (void) fprintf(stderr, + gettext("invalid type '%s'\n"), + value); + usage(B_FALSE); + } + } + break; + case '?': (void) fprintf(stderr, gettext("invalid option '%c'\n"), optopt); @@ -1650,7 +1683,7 @@ zfs_do_get(int argc, char **argv) cb.cb_first = B_TRUE; /* run for each object */ - ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, NULL, + ret = zfs_for_each(argc, argv, flags, types, NULL, &cb.cb_proplist, limit, get_callback, &cb); if (cb.cb_proplist == &fake_name) From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 19:16:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 391451065708; Thu, 23 Feb 2012 19:16:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 233D08FC0A; Thu, 23 Feb 2012 19:16:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NJG5Fw019388; Thu, 23 Feb 2012 19:16:05 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NJG5Oj019386; Thu, 23 Feb 2012 19:16:05 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202231916.q1NJG5Oj019386@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 19:16:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232065 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 19:16:06 -0000 Author: jkim Date: Thu Feb 23 19:16:05 2012 New Revision: 232065 URL: http://svn.freebsd.org/changeset/base/232065 Log: Update my copyright date. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Thu Feb 23 19:13:19 2012 (r232064) +++ head/sys/dev/fb/vesa.c Thu Feb 23 19:16:05 2012 (r232065) @@ -1,6 +1,6 @@ /*- * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith - * Copyright (c) 2009-2010 Jung-uk Kim + * Copyright (c) 2009-2012 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 19:20:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 262C5106564A; Thu, 23 Feb 2012 19:20:37 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E2E08FC0C; Thu, 23 Feb 2012 19:20:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NJKa1k019562; Thu, 23 Feb 2012 19:20:36 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NJKa13019550; Thu, 23 Feb 2012 19:20:36 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201202231920.q1NJKa13019550@svn.freebsd.org> From: Kip Macy Date: Thu, 23 Feb 2012 19:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232066 - in stable/9: cddl/contrib/opensolaris/lib/libzpool/common/sys sys/amd64/amd64 sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/sys sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 19:20:37 -0000 Author: kmacy Date: Thu Feb 23 19:20:36 2012 New Revision: 232066 URL: http://svn.freebsd.org/changeset/base/232066 Log: MFC r230623 exclude kmem_alloc'ed ARC data buffers from kernel minidumps on amd64 excluding other allocations including UMA now entails the addition of a single flag to kmem_alloc or uma zone create Reviewed by: alc,avg Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/9/sys/amd64/amd64/minidump_machdep.c stable/9/sys/amd64/amd64/uma_machdep.c stable/9/sys/cddl/compat/opensolaris/sys/kmem.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/9/sys/sys/malloc.h stable/9/sys/vm/uma.h stable/9/sys/vm/uma_core.c stable/9/sys/vm/vm_kern.c stable/9/sys/vm/vm_page.c stable/9/sys/vm/vm_page.h Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Feb 23 19:20:36 2012 (r232066) @@ -329,6 +329,7 @@ extern void cv_broadcast(kcondvar_t *cv) #define KM_SLEEP UMEM_NOFAIL #define KM_PUSHPAGE KM_SLEEP #define KM_NOSLEEP UMEM_DEFAULT +#define KM_NODEBUG 0 #define KMC_NODEBUG UMC_NODEBUG #define KMC_NOTOUCH 0 /* not needed for userland caches */ #define kmem_alloc(_s, _f) umem_alloc(_s, _f) Modified: stable/9/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/minidump_machdep.c Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/amd64/amd64/minidump_machdep.c Thu Feb 23 19:20:36 2012 (r232066) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#include #include #include #include @@ -75,8 +76,11 @@ CTASSERT(sizeof(*vm_page_dump) == 8); static int is_dumpable(vm_paddr_t pa) { + vm_page_t m; int i; + if ((m = vm_phys_paddr_to_vm_page(pa)) != NULL) + return ((m->flags & PG_NODUMP) == 0); for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) { if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) return (1); Modified: stable/9/sys/amd64/amd64/uma_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/uma_machdep.c Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/amd64/amd64/uma_machdep.c Thu Feb 23 19:20:36 2012 (r232066) @@ -66,7 +66,8 @@ uma_small_alloc(uma_zone_t zone, int byt break; } pa = m->phys_addr; - dump_add_page(pa); + if ((wait & M_NODUMP) == 0) + dump_add_page(pa); va = (void *)PHYS_TO_DMAP(pa); if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) pagezero(va); Modified: stable/9/sys/cddl/compat/opensolaris/sys/kmem.h ============================================================================== --- stable/9/sys/cddl/compat/opensolaris/sys/kmem.h Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/cddl/compat/opensolaris/sys/kmem.h Thu Feb 23 19:20:36 2012 (r232066) @@ -45,8 +45,10 @@ MALLOC_DECLARE(M_SOLARIS); #define KM_SLEEP M_WAITOK #define KM_PUSHPAGE M_WAITOK #define KM_NOSLEEP M_NOWAIT -#define KMC_NODEBUG 0 +#define KM_ZERO M_ZERO +#define KM_NODEBUG M_NODUMP #define KMC_NOTOUCH 0 +#define KMC_NODEBUG UMA_ZONE_NODUMP typedef struct kmem_cache { char kc_name[32]; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Feb 23 19:20:36 2012 (r232066) @@ -121,7 +121,7 @@ zio_init(void) size_t size = (c + 1) << SPA_MINBLOCKSHIFT; size_t p2 = size; size_t align = 0; - size_t cflags = (size > zio_buf_debug_limit) ? KMC_NODEBUG : 0; + size_t cflags = (size > zio_buf_debug_limit) ? (KMC_NODEBUG|KMC_NOTOUCH) : 0; while (p2 & (p2 - 1)) p2 &= p2 - 1; @@ -242,7 +242,7 @@ zio_data_buf_alloc(size_t size) if (zio_use_uma) return (kmem_cache_alloc(zio_data_buf_cache[c], KM_PUSHPAGE)); else - return (kmem_alloc(size, KM_SLEEP)); + return (kmem_alloc(size, KM_SLEEP | KM_NODEBUG)); } void Modified: stable/9/sys/sys/malloc.h ============================================================================== --- stable/9/sys/sys/malloc.h Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/sys/malloc.h Thu Feb 23 19:20:36 2012 (r232066) @@ -50,6 +50,7 @@ #define M_ZERO 0x0100 /* bzero the allocation */ #define M_NOVM 0x0200 /* don't ask VM for pages */ #define M_USE_RESERVE 0x0400 /* can alloc out of reserve memory */ +#define M_NODUMP 0x0800 /* don't dump pages in this allocation */ #define M_MAGIC 877983977 /* time when first defined :-) */ Modified: stable/9/sys/vm/uma.h ============================================================================== --- stable/9/sys/vm/uma.h Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/vm/uma.h Thu Feb 23 19:20:36 2012 (r232066) @@ -248,6 +248,10 @@ int uma_zsecond_add(uma_zone_t zone, uma * backend pages and can fail early. */ #define UMA_ZONE_VTOSLAB 0x2000 /* Zone uses vtoslab for lookup. */ +#define UMA_ZONE_NODUMP 0x4000 /* + * Zone's pages will not be included in + * mini-dumps. + */ /* * These flags are shared between the keg and zone. In zones wishing to add Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/vm/uma_core.c Thu Feb 23 19:20:36 2012 (r232066) @@ -840,6 +840,9 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t else wait &= ~M_ZERO; + if (keg->uk_flags & UMA_ZONE_NODUMP) + wait |= M_NODUMP; + /* zone is passed for legacy reasons. */ mem = allocf(zone, keg->uk_ppera * UMA_SLAB_SIZE, &flags, wait); if (mem == NULL) { Modified: stable/9/sys/vm/vm_kern.c ============================================================================== --- stable/9/sys/vm/vm_kern.c Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/vm/vm_kern.c Thu Feb 23 19:20:36 2012 (r232066) @@ -382,6 +382,8 @@ kmem_back(vm_map_t map, vm_offset_t addr if (flags & M_ZERO) pflags |= VM_ALLOC_ZERO; + if (flags & M_NODUMP) + pflags |= VM_ALLOC_NODUMP; VM_OBJECT_LOCK(kmem_object); for (i = 0; i < size; i += PAGE_SIZE) { Modified: stable/9/sys/vm/vm_page.c ============================================================================== --- stable/9/sys/vm/vm_page.c Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/vm/vm_page.c Thu Feb 23 19:20:36 2012 (r232066) @@ -1424,6 +1424,8 @@ vm_page_alloc(vm_object_t object, vm_pin * must be cleared before the free page queues lock is released. */ flags = 0; + if (req & VM_ALLOC_NODUMP) + flags |= PG_NODUMP; if (m->flags & PG_ZERO) { vm_page_zero_count--; if (req & VM_ALLOC_ZERO) Modified: stable/9/sys/vm/vm_page.h ============================================================================== --- stable/9/sys/vm/vm_page.h Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/vm/vm_page.h Thu Feb 23 19:20:36 2012 (r232066) @@ -263,6 +263,7 @@ extern struct vpglocks pa_lock[]; #define PG_MARKER 0x10 /* special queue marker page */ #define PG_SLAB 0x20 /* object pointer is actually a slab */ #define PG_WINATCFLS 0x40 /* flush dirty page on inactive q */ +#define PG_NODUMP 0x80 /* don't include this page in the dump */ /* * Misc constants. @@ -350,6 +351,7 @@ extern struct vpglocks vm_page_queue_loc #define VM_ALLOC_IFCACHED 0x0400 /* Fail if the page is not cached */ #define VM_ALLOC_IFNOTCACHED 0x0800 /* Fail if the page is cached */ #define VM_ALLOC_IGN_SBUSY 0x1000 /* vm_page_grab() only */ +#define VM_ALLOC_NODUMP 0x2000 /* don't include in dump */ #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 19:49:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A467D106564A; Thu, 23 Feb 2012 19:49:25 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92D168FC16; Thu, 23 Feb 2012 19:49:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NJnPgj020537; Thu, 23 Feb 2012 19:49:25 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NJnPlI020535; Thu, 23 Feb 2012 19:49:25 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201202231949.q1NJnPlI020535@svn.freebsd.org> From: Colin Percival Date: Thu, 23 Feb 2012 19:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232067 - stable/9/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 19:49:25 -0000 Author: cperciva Date: Thu Feb 23 19:49:25 2012 New Revision: 232067 URL: http://svn.freebsd.org/changeset/base/232067 Log: MFC 230184, 230185: Add XENHVM config file to i386. Added: stable/9/sys/i386/conf/XENHVM (contents, props changed) - copied, changed from r230184, head/sys/i386/conf/XENHVM Modified: Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Copied and modified: stable/9/sys/i386/conf/XENHVM (from r230184, head/sys/i386/conf/XENHVM) ============================================================================== --- head/sys/i386/conf/XENHVM Mon Jan 16 02:42:16 2012 (r230184, copy source) +++ stable/9/sys/i386/conf/XENHVM Thu Feb 23 19:49:25 2012 (r232067) @@ -1,5 +1,5 @@ # -# XENHVM -- Xen HVM kernel configuration file for FreeBSD/amd64 +# XENHVM -- Xen HVM kernel configuration file for FreeBSD/i386 # # $FreeBSD$ # From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 19:52:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A3391065672; Thu, 23 Feb 2012 19:52:33 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7886C8FC19; Thu, 23 Feb 2012 19:52:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NJqXrK020683; Thu, 23 Feb 2012 19:52:33 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NJqXwt020681; Thu, 23 Feb 2012 19:52:33 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201202231952.q1NJqXwt020681@svn.freebsd.org> From: Colin Percival Date: Thu, 23 Feb 2012 19:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232068 - in stable/9/sys: dev/xen/xenpci i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 19:52:33 -0000 Author: cperciva Date: Thu Feb 23 19:52:33 2012 New Revision: 232068 URL: http://svn.freebsd.org/changeset/base/232068 Log: MFC 230183: Make XENHVM work on i386 by fixing the definition of __ffs. Modified: stable/9/sys/dev/xen/xenpci/evtchn.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/dev/xen/xenpci/evtchn.c ============================================================================== --- stable/9/sys/dev/xen/xenpci/evtchn.c Thu Feb 23 19:49:25 2012 (r232067) +++ stable/9/sys/dev/xen/xenpci/evtchn.c Thu Feb 23 19:52:33 2012 (r232068) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #if defined(__i386__) -#define __ffs(word) ffs(word) +#define __ffs(word) (ffs(word) - 1) #elif defined(__amd64__) static inline unsigned long __ffs(unsigned long word) { From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 20:36:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 040901065673; Thu, 23 Feb 2012 20:36:24 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 85A748FC12; Thu, 23 Feb 2012 20:36:23 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 66F7B25D385E; Thu, 23 Feb 2012 20:36:22 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 963FEBDBFE3; Thu, 23 Feb 2012 20:36:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id oj0EkVpITICw; Thu, 23 Feb 2012 20:36:20 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 700A5BDBFE2; Thu, 23 Feb 2012 20:36:20 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201202231821.q1NILcnS016955@svn.freebsd.org> Date: Thu, 23 Feb 2012 20:36:18 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <85AA3B74-CE2B-41E3-8FFB-2B6DC867D173@lists.zabbadoz.net> References: <201202231821.q1NILcnS016955@svn.freebsd.org> To: Kip Macy X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232054 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 20:36:24 -0000 On 23. Feb 2012, at 18:21 , Kip Macy wrote: > Author: kmacy > Date: Thu Feb 23 18:21:37 2012 > New Revision: 232054 > URL: http://svn.freebsd.org/changeset/base/232054 >=20 > Log: > When using flowtable llentrys can outlive the interface with which = they're associated > at which the lle_tbl pointer points to freed memory and the llt_free = pointer is no longer > valid. >=20 > Move the free pointer in to the llentry itself and update the = initalization sites. >=20 > MFC after: 2 weeks Please note that you cannot remove llt_free when MFCing; it's used in = modules through the previous version of the macro. >=20 > Modified: > head/sys/net/if_llatbl.h > head/sys/netinet/in.c > head/sys/netinet6/in6.c --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 20:54:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 325F7106564A; Thu, 23 Feb 2012 20:54:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21D0D8FC17; Thu, 23 Feb 2012 20:54:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NKsNOH022667; Thu, 23 Feb 2012 20:54:23 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NKsNEf022665; Thu, 23 Feb 2012 20:54:23 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232054.q1NKsNEf022665@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 20:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232069 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 20:54:23 -0000 Author: jkim Date: Thu Feb 23 20:54:22 2012 New Revision: 232069 URL: http://svn.freebsd.org/changeset/base/232069 Log: If the VBE implementation does not support save/restore function, defer to VGA methods. Unconditionally reset the VESA adapter before restoring state. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Thu Feb 23 19:52:33 2012 (r232068) +++ head/sys/dev/fb/vesa.c Thu Feb 23 20:54:22 2012 (r232069) @@ -1451,15 +1451,13 @@ static int vesa_save_state(video_adapter_t *adp, void *p, size_t size) { - if (adp != vesa_adp) + if (adp != vesa_adp || vesa_state_buf_size == 0) return ((*prevvidsw->save_state)(adp, p, size)); - if (vesa_state_buf_size == 0) - return (1); if (size == 0) return (offsetof(adp_state_t, regs) + vesa_state_buf_size); if (size < (offsetof(adp_state_t, regs) + vesa_state_buf_size)) - return (1); + return (EINVAL); ((adp_state_t *)p)->sig = V_STATE_SIG; bzero(((adp_state_t *)p)->regs, vesa_state_buf_size); @@ -1471,12 +1469,9 @@ vesa_load_state(video_adapter_t *adp, vo { int mode; - if ((adp != vesa_adp) || (((adp_state_t *)p)->sig != V_STATE_SIG)) + if (adp != vesa_adp) return ((*prevvidsw->load_state)(adp, p)); - if (vesa_state_buf_size == 0) - return (1); - /* Try BIOS POST to restore a sane state. */ (void)vesa_bios_post(); mode = adp->va_mode; @@ -1484,6 +1479,8 @@ vesa_load_state(video_adapter_t *adp, vo if (mode != adp->va_initial_mode) (void)vesa_set_mode(adp, mode); + if (((adp_state_t *)p)->sig != V_STATE_SIG) + return ((*prevvidsw->load_state)(adp, p)); return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs)); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 20:58:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85C0E106564A; Thu, 23 Feb 2012 20:58:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BD0B8FC08; Thu, 23 Feb 2012 20:58:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NKwq1B022838; Thu, 23 Feb 2012 20:58:52 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NKwq2Z022836; Thu, 23 Feb 2012 20:58:52 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202232058.q1NKwq2Z022836@svn.freebsd.org> From: Andrew Thompson Date: Thu, 23 Feb 2012 20:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232070 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 20:58:52 -0000 Author: thompsa Date: Thu Feb 23 20:58:52 2012 New Revision: 232070 URL: http://svn.freebsd.org/changeset/base/232070 Log: Indicate this function decrements the timer as well as testing for expiry. Modified: head/sys/net/bridgestp.c Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Thu Feb 23 20:54:22 2012 (r232069) +++ head/sys/net/bridgestp.c Thu Feb 23 20:58:52 2012 (r232070) @@ -134,7 +134,7 @@ static void bstp_tick(void *); static void bstp_timer_start(struct bstp_timer *, uint16_t); static void bstp_timer_stop(struct bstp_timer *); static void bstp_timer_latch(struct bstp_timer *); -static int bstp_timer_expired(struct bstp_timer *); +static int bstp_timer_dectest(struct bstp_timer *); static void bstp_hello_timer_expiry(struct bstp_state *, struct bstp_port *); static void bstp_message_age_expiry(struct bstp_state *, @@ -1862,7 +1862,7 @@ bstp_tick(void *arg) CURVNET_SET(bs->bs_vnet); /* poll link events on interfaces that do not support linkstate */ - if (bstp_timer_expired(&bs->bs_link_timer)) { + if (bstp_timer_dectest(&bs->bs_link_timer)) { LIST_FOREACH(bp, &bs->bs_bplist, bp_next) { if (!(bp->bp_ifp->if_capabilities & IFCAP_LINKSTATE)) bstp_ifupdstatus(bs, bp); @@ -1872,21 +1872,21 @@ bstp_tick(void *arg) LIST_FOREACH(bp, &bs->bs_bplist, bp_next) { /* no events need to happen for these */ - bstp_timer_expired(&bp->bp_tc_timer); - bstp_timer_expired(&bp->bp_recent_root_timer); - bstp_timer_expired(&bp->bp_forward_delay_timer); - bstp_timer_expired(&bp->bp_recent_backup_timer); + bstp_timer_dectest(&bp->bp_tc_timer); + bstp_timer_dectest(&bp->bp_recent_root_timer); + bstp_timer_dectest(&bp->bp_forward_delay_timer); + bstp_timer_dectest(&bp->bp_recent_backup_timer); - if (bstp_timer_expired(&bp->bp_hello_timer)) + if (bstp_timer_dectest(&bp->bp_hello_timer)) bstp_hello_timer_expiry(bs, bp); - if (bstp_timer_expired(&bp->bp_message_age_timer)) + if (bstp_timer_dectest(&bp->bp_message_age_timer)) bstp_message_age_expiry(bs, bp); - if (bstp_timer_expired(&bp->bp_migrate_delay_timer)) + if (bstp_timer_dectest(&bp->bp_migrate_delay_timer)) bstp_migrate_delay_expiry(bs, bp); - if (bstp_timer_expired(&bp->bp_edge_delay_timer)) + if (bstp_timer_dectest(&bp->bp_edge_delay_timer)) bstp_edge_delay_expiry(bs, bp); /* update the various state machines for the port */ @@ -1925,7 +1925,7 @@ bstp_timer_latch(struct bstp_timer *t) } static int -bstp_timer_expired(struct bstp_timer *t) +bstp_timer_dectest(struct bstp_timer *t) { if (t->active == 0 || t->latched) return (0); From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:07:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92774106564A; Thu, 23 Feb 2012 21:07:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80DFD8FC14; Thu, 23 Feb 2012 21:07:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NL7Gkb023146; Thu, 23 Feb 2012 21:07:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NL7GHi023139; Thu, 23 Feb 2012 21:07:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202232107.q1NL7GHi023139@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 23 Feb 2012 21:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232071 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:07:16 -0000 Author: kib Date: Thu Feb 23 21:07:16 2012 New Revision: 232071 URL: http://svn.freebsd.org/changeset/base/232071 Log: Account the writeable shared mappings backed by file in the vnode v_writecount. Keep the amount of the virtual address space used by the mappings in the new vm_object un_pager.vnp.writemappings counter. The vnode v_writecount is incremented when writemappings gets non-zero value, and decremented when writemappings is returned to zero. Writeable shared vnode-backed mappings are accounted for in vm_mmap(), and vm_map_insert() is instructed to set MAP_ENTRY_VN_WRITECNT flag on the created map entry. During deferred map entry deallocation, vm_map_process_deferred() checks for MAP_ENTRY_VN_WRITECOUNT and decrements writemappings for the vm object. Now, the writeable mount cannot be demoted to read-only while writeable shared mappings of the vnodes from the mount point exist. Also, execve(2) fails for such files with ETXTBUSY, as it should be. Noted by: tegge Reviewed by: tegge (long time ago, early version), alc Tested by: pho MFC after: 3 weeks Modified: head/sys/vm/vm_map.c head/sys/vm/vm_map.h head/sys/vm/vm_mmap.c head/sys/vm/vm_object.h head/sys/vm/vnode_pager.c head/sys/vm/vnode_pager.h Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Feb 23 20:58:52 2012 (r232070) +++ head/sys/vm/vm_map.c Thu Feb 23 21:07:16 2012 (r232071) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -475,11 +476,23 @@ vm_map_process_deferred(void) { struct thread *td; vm_map_entry_t entry; + vm_object_t object; td = curthread; - while ((entry = td->td_map_def_user) != NULL) { td->td_map_def_user = entry->next; + if ((entry->eflags & MAP_ENTRY_VN_WRITECNT) != 0) { + /* + * Decrement the object's writemappings and + * possibly the vnode's v_writecount. + */ + KASSERT((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0, + ("Submap with writecount")); + object = entry->object.vm_object; + KASSERT(object != NULL, ("No object for writecount")); + vnode_pager_release_writecount(object, entry->start, + entry->end); + } vm_map_entry_deallocate(entry, FALSE); } } @@ -1174,6 +1187,8 @@ vm_map_insert(vm_map_t map, vm_object_t protoeflags |= MAP_ENTRY_NOSYNC; if (cow & MAP_DISABLE_COREDUMP) protoeflags |= MAP_ENTRY_NOCOREDUMP; + if (cow & MAP_VN_WRITECOUNT) + protoeflags |= MAP_ENTRY_VN_WRITECNT; if (cow & MAP_INHERIT_SHARE) inheritance = VM_INHERIT_SHARE; else @@ -1516,6 +1531,11 @@ vm_map_simplify_entry(vm_map_t map, vm_m * references. Thus, the map lock can be kept * without causing a lock-order reversal with * the vnode lock. + * + * Since we count the number of virtual page + * mappings in object->un_pager.vnp.writemappings, + * the writemappings value should not be adjusted + * when the entry is disposed of. */ if (prev->object.vm_object) vm_object_deallocate(prev->object.vm_object); @@ -1627,6 +1647,13 @@ _vm_map_clip_start(vm_map_t map, vm_map_ if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0) { vm_object_reference(new_entry->object.vm_object); + /* + * The object->un_pager.vnp.writemappings for the + * object of MAP_ENTRY_VN_WRITECNT type entry shall be + * kept as is here. The virtual pages are + * re-distributed among the clipped entries, so the sum is + * left the same. + */ } } @@ -2900,6 +2927,7 @@ vm_map_copy_entry( vm_ooffset_t *fork_charge) { vm_object_t src_object; + vm_map_entry_t fake_entry; vm_offset_t size; struct ucred *cred; int charged; @@ -2965,6 +2993,27 @@ vm_map_copy_entry( src_entry->eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY); dst_entry->eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY); dst_entry->offset = src_entry->offset; + if (src_entry->eflags & MAP_ENTRY_VN_WRITECNT) { + /* + * MAP_ENTRY_VN_WRITECNT cannot + * indicate write reference from + * src_entry, since the entry is + * marked as needs copy. Allocate a + * fake entry that is used to + * decrement object->un_pager.vnp.writecount + * at the appropriate time. Attach + * fake_entry to the deferred list. + */ + fake_entry = vm_map_entry_create(dst_map); + fake_entry->eflags = MAP_ENTRY_VN_WRITECNT; + src_entry->eflags &= ~MAP_ENTRY_VN_WRITECNT; + vm_object_reference(src_object); + fake_entry->object.vm_object = src_object; + fake_entry->start = src_entry->start; + fake_entry->end = src_entry->end; + fake_entry->next = curthread->td_map_def_user; + curthread->td_map_def_user = fake_entry; + } } else { dst_entry->object.vm_object = NULL; dst_entry->offset = 0; @@ -3043,6 +3092,7 @@ vmspace_fork(struct vmspace *vm1, vm_oof vm_map_lock(old_map); if (old_map->busy) vm_map_wait_busy(old_map); + new_map = NULL; /* silence gcc */ vm2 = vmspace_alloc(old_map->min_offset, old_map->max_offset); if (vm2 == NULL) goto unlock_and_return; @@ -3122,6 +3172,16 @@ vmspace_fork(struct vmspace *vm1, vm_oof new_entry->eflags &= ~(MAP_ENTRY_USER_WIRED | MAP_ENTRY_IN_TRANSITION); new_entry->wired_count = 0; + if (new_entry->eflags & MAP_ENTRY_VN_WRITECNT) { + object = new_entry->object.vm_object; + KASSERT(((struct vnode *)object->handle)-> + v_writecount > 0, + ("vmspace_fork: v_writecount")); + KASSERT(object->un_pager.vnp.writemappings > 0, + ("vmspace_fork: vnp.writecount")); + vnode_pager_update_writecount(object, + new_entry->start, new_entry->end); + } /* * Insert the entry into the new map -- we know we're @@ -3146,8 +3206,11 @@ vmspace_fork(struct vmspace *vm1, vm_oof */ new_entry = vm_map_entry_create(new_map); *new_entry = *old_entry; + /* + * Copied entry is COW over the old object. + */ new_entry->eflags &= ~(MAP_ENTRY_USER_WIRED | - MAP_ENTRY_IN_TRANSITION); + MAP_ENTRY_IN_TRANSITION | MAP_ENTRY_VN_WRITECNT); new_entry->wired_count = 0; new_entry->object.vm_object = NULL; new_entry->cred = NULL; @@ -3161,9 +3224,15 @@ vmspace_fork(struct vmspace *vm1, vm_oof old_entry = old_entry->next; } unlock_and_return: - vm_map_unlock(old_map); + /* + * Use inlined vm_map_unlock() to postpone handling the deferred + * map entries, which cannot be done until both old_map and + * new_map locks are released. + */ + sx_xunlock(&old_map->lock); if (vm2 != NULL) - vm_map_unlock(new_map); + sx_xunlock(&new_map->lock); + vm_map_process_deferred(); return (vm2); } Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Thu Feb 23 20:58:52 2012 (r232070) +++ head/sys/vm/vm_map.h Thu Feb 23 21:07:16 2012 (r232071) @@ -139,6 +139,7 @@ struct vm_map_entry { #define MAP_ENTRY_GROWS_UP 0x2000 /* Bottom-up stacks */ #define MAP_ENTRY_WIRE_SKIPPED 0x4000 +#define MAP_ENTRY_VN_WRITECNT 0x8000 /* writeable vnode mapping */ #ifdef _KERNEL static __inline u_char @@ -315,6 +316,7 @@ long vmspace_wired_count(struct vmspace #define MAP_DISABLE_SYNCER 0x0020 #define MAP_DISABLE_COREDUMP 0x0100 #define MAP_PREFAULT_MADVISE 0x0200 /* from (user) madvise request */ +#define MAP_VN_WRITECOUNT 0x0400 #define MAP_STACK_GROWS_DOWN 0x1000 #define MAP_STACK_GROWS_UP 0x2000 #define MAP_ACC_CHARGED 0x4000 Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Thu Feb 23 20:58:52 2012 (r232070) +++ head/sys/vm/vm_mmap.c Thu Feb 23 21:07:16 2012 (r232071) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef HWPMC_HOOKS #include @@ -93,7 +94,7 @@ struct sbrk_args { #endif static int vm_mmap_vnode(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, - int *, struct vnode *, vm_ooffset_t *, vm_object_t *); + int *, struct vnode *, vm_ooffset_t *, vm_object_t *, boolean_t *); static int vm_mmap_cdev(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, int *, struct cdev *, vm_ooffset_t *, vm_object_t *); static int vm_mmap_shm(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, @@ -1218,28 +1219,33 @@ sys_munlock(td, uap) /* * vm_mmap_vnode() * - * MPSAFE - * * Helper function for vm_mmap. Perform sanity check specific for mmap * operations on vnodes. + * + * For VCHR vnodes, the vnode lock is held over the call to + * vm_mmap_cdev() to keep vp->v_rdev valid. */ int vm_mmap_vnode(struct thread *td, vm_size_t objsize, vm_prot_t prot, vm_prot_t *maxprotp, int *flagsp, - struct vnode *vp, vm_ooffset_t *foffp, vm_object_t *objp) + struct vnode *vp, vm_ooffset_t *foffp, vm_object_t *objp, + boolean_t *writecounted) { struct vattr va; vm_object_t obj; vm_offset_t foff; struct mount *mp; struct ucred *cred; - int error, flags; - int vfslocked; + int error, flags, locktype, vfslocked; mp = vp->v_mount; cred = td->td_ucred; + if ((*maxprotp & VM_PROT_WRITE) && (*flagsp & MAP_SHARED)) + locktype = LK_EXCLUSIVE; + else + locktype = LK_SHARED; vfslocked = VFS_LOCK_GIANT(mp); - if ((error = vget(vp, LK_SHARED, td)) != 0) { + if ((error = vget(vp, locktype, td)) != 0) { VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -1256,8 +1262,20 @@ vm_mmap_vnode(struct thread *td, vm_size } if (obj->handle != vp) { vput(vp); - vp = (struct vnode*)obj->handle; - vget(vp, LK_SHARED, td); + vp = (struct vnode *)obj->handle; + /* + * Bypass filesystems obey the mpsafety of the + * underlying fs. + */ + error = vget(vp, locktype, td); + if (error != 0) { + VFS_UNLOCK_GIANT(vfslocked); + return (error); + } + if (locktype == LK_EXCLUSIVE) { + *writecounted = TRUE; + vnode_pager_update_writecount(obj, 0, objsize); + } } } else if (vp->v_type == VCHR) { error = vm_mmap_cdev(td, objsize, prot, maxprotp, flagsp, @@ -1293,7 +1311,7 @@ vm_mmap_vnode(struct thread *td, vm_size objsize = round_page(va.va_size); if (va.va_nlink == 0) flags |= MAP_NOSYNC; - obj = vm_pager_allocate(OBJT_VNODE, vp, objsize, prot, foff, td->td_ucred); + obj = vm_pager_allocate(OBJT_VNODE, vp, objsize, prot, foff, cred); if (obj == NULL) { error = ENOMEM; goto done; @@ -1432,6 +1450,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, int rv = KERN_SUCCESS; int docow, error; struct thread *td = curthread; + boolean_t writecounted; if (size == 0) return (0); @@ -1470,6 +1489,8 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, return (EINVAL); fitit = FALSE; } + writecounted = FALSE; + /* * Lookup/allocate object. */ @@ -1480,7 +1501,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, break; case OBJT_VNODE: error = vm_mmap_vnode(td, size, prot, &maxprot, &flags, - handle, &foff, &object); + handle, &foff, &object, &writecounted); break; case OBJT_SWAP: error = vm_mmap_shm(td, size, prot, &maxprot, &flags, @@ -1520,6 +1541,8 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, /* Shared memory is also shared with children. */ if (flags & MAP_SHARED) docow |= MAP_INHERIT_SHARE; + if (writecounted) + docow |= MAP_VN_WRITECOUNT; if (flags & MAP_STACK) rv = vm_map_stack(map, *addr, size, prot, maxprot, @@ -1537,7 +1560,12 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, * Lose the object reference. Will destroy the * object if it's an unnamed anonymous mapping * or named anonymous without other references. + * + * If this mapping was accounted for in the vnode's + * writecount, then undo that now. */ + if (writecounted) + vnode_pager_release_writecount(object, 0, size); vm_object_deallocate(object); } Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Thu Feb 23 20:58:52 2012 (r232070) +++ head/sys/vm/vm_object.h Thu Feb 23 21:07:16 2012 (r232071) @@ -112,6 +112,7 @@ struct vm_object { */ struct { off_t vnp_size; + vm_ooffset_t writemappings; } vnp; /* Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Thu Feb 23 20:58:52 2012 (r232070) +++ head/sys/vm/vnode_pager.c Thu Feb 23 21:07:16 2012 (r232071) @@ -222,6 +222,7 @@ retry: object = vm_object_allocate(OBJT_VNODE, OFF_TO_IDX(round_page(size))); object->un_pager.vnp.vnp_size = size; + object->un_pager.vnp.writemappings = 0; object->handle = handle; VI_LOCK(vp); @@ -268,10 +269,16 @@ vnode_pager_dealloc(object) wakeup(object); } ASSERT_VOP_ELOCKED(vp, "vnode_pager_dealloc"); + if (object->un_pager.vnp.writemappings > 0) { + object->un_pager.vnp.writemappings = 0; + vp->v_writecount--; + } vp->v_object = NULL; vp->v_vflag &= ~VV_TEXT; + VM_OBJECT_UNLOCK(object); while (refs-- > 0) vunref(vp); + VM_OBJECT_LOCK(object); } static boolean_t @@ -1215,3 +1222,81 @@ vnode_pager_undirty_pages(vm_page_t *ma, } VM_OBJECT_UNLOCK(obj); } + +void +vnode_pager_update_writecount(vm_object_t object, vm_offset_t start, + vm_offset_t end) +{ + struct vnode *vp; + vm_ooffset_t old_wm; + + VM_OBJECT_LOCK(object); + if (object->type != OBJT_VNODE) { + VM_OBJECT_UNLOCK(object); + return; + } + old_wm = object->un_pager.vnp.writemappings; + object->un_pager.vnp.writemappings += (vm_ooffset_t)end - start; + vp = object->handle; + if (old_wm == 0 && object->un_pager.vnp.writemappings != 0) { + ASSERT_VOP_ELOCKED(vp, "v_writecount inc"); + vp->v_writecount++; + } else if (old_wm != 0 && object->un_pager.vnp.writemappings == 0) { + ASSERT_VOP_ELOCKED(vp, "v_writecount dec"); + vp->v_writecount--; + } + VM_OBJECT_UNLOCK(object); +} + +void +vnode_pager_release_writecount(vm_object_t object, vm_offset_t start, + vm_offset_t end) +{ + struct vnode *vp; + struct mount *mp; + vm_offset_t inc; + int vfslocked; + + VM_OBJECT_LOCK(object); + + /* + * First, recheck the object type to account for the race when + * the vnode is reclaimed. + */ + if (object->type != OBJT_VNODE) { + VM_OBJECT_UNLOCK(object); + return; + } + + /* + * Optimize for the case when writemappings is not going to + * zero. + */ + inc = end - start; + if (object->un_pager.vnp.writemappings != inc) { + object->un_pager.vnp.writemappings -= inc; + VM_OBJECT_UNLOCK(object); + return; + } + + vp = object->handle; + vhold(vp); + VM_OBJECT_UNLOCK(object); + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + mp = NULL; + vn_start_write(vp, &mp, V_WAIT); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + + /* + * Decrement the object's writemappings, by swapping the start + * and end arguments for vnode_pager_update_writecount(). If + * there was not a race with vnode reclaimation, then the + * vnode's v_writecount is decremented. + */ + vnode_pager_update_writecount(object, end, start); + VOP_UNLOCK(vp, 0); + vdrop(vp); + if (mp != NULL) + vn_finished_write(mp); + VFS_UNLOCK_GIANT(vfslocked); +} Modified: head/sys/vm/vnode_pager.h ============================================================================== --- head/sys/vm/vnode_pager.h Thu Feb 23 20:58:52 2012 (r232070) +++ head/sys/vm/vnode_pager.h Thu Feb 23 21:07:16 2012 (r232071) @@ -46,7 +46,11 @@ int vnode_pager_generic_putpages(struct int count, boolean_t sync, int *rtvals); +void vnode_pager_release_writecount(vm_object_t object, vm_offset_t start, + vm_offset_t end); void vnode_pager_undirty_pages(vm_page_t *ma, int *rtvals, int written); +void vnode_pager_update_writecount(vm_object_t object, vm_offset_t start, + vm_offset_t end); #endif /* _KERNEL */ #endif /* _VNODE_PAGER_ */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:08:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF903106564A; Thu, 23 Feb 2012 21:08:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEE4C8FC17; Thu, 23 Feb 2012 21:08:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NL8Lhn023216; Thu, 23 Feb 2012 21:08:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NL8LeB023212; Thu, 23 Feb 2012 21:08:21 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201202232108.q1NL8LeB023212@svn.freebsd.org> From: John Baldwin Date: Thu, 23 Feb 2012 21:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232072 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:08:21 -0000 Author: jhb Date: Thu Feb 23 21:08:21 2012 New Revision: 232072 URL: http://svn.freebsd.org/changeset/base/232072 Log: Pretty-print the advice constants passed to posix_fadvise(2). MFC after: 2 weeks Modified: head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Thu Feb 23 21:07:16 2012 (r232071) +++ head/usr.bin/kdump/kdump.c Thu Feb 23 21:08:21 2012 (r232072) @@ -1014,6 +1014,15 @@ ktrsyscall(struct ktr_syscall *ktr, u_in } capname(arg); break; + case SYS_posix_fadvise: + print_number(ip,narg,c); + print_number(ip,narg,c); + print_number(ip,narg,c); + (void)putchar(','); + fadvisebehavname((int)*ip); + ip++; + narg--; + break; } } while (narg > 0) { Modified: head/usr.bin/kdump/mksubr ============================================================================== --- head/usr.bin/kdump/mksubr Thu Feb 23 21:07:16 2012 (r232071) +++ head/usr.bin/kdump/mksubr Thu Feb 23 21:08:21 2012 (r232072) @@ -340,6 +340,7 @@ auto_or_type "accessmodename" " auto_switch_type "acltypename" "ACL_TYPE_[A-Z4_]+[[:space:]]+0x[0-9]+" "sys/acl.h" auto_or_type "capname" "CAP_[A-Z]+[[:space:]]+0x[01248]{16}ULL" "sys/capability.h" auto_switch_type "extattrctlname" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/extattr.h" +auto_switch_type "fadvisebehavname" "POSIX_FADV_[A-Z]+[[:space:]]+[0-9]+" "sys/fcntl.h" auto_or_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" auto_or_type "flockname" "LOCK_[A-Z]+[[:space:]]+0x[0-9]+" "sys/fcntl.h" auto_or_type "getfsstatflagsname" "MNT_[A-Z]+[[:space:]]+[1-9][0-9]*" "sys/mount.h" From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:32:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FC02106564A; Thu, 23 Feb 2012 21:32:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD298FC14; Thu, 23 Feb 2012 21:32:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NLWW9t023973; Thu, 23 Feb 2012 21:32:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NLWWfB023970; Thu, 23 Feb 2012 21:32:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201202232132.q1NLWWfB023970@svn.freebsd.org> From: Dimitry Andric Date: Thu, 23 Feb 2012 21:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232073 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:32:33 -0000 Author: dim Date: Thu Feb 23 21:32:32 2012 New Revision: 232073 URL: http://svn.freebsd.org/changeset/base/232073 Log: Revert r231978, so I can apply a more proper fix to silence unneeded internal declaration warnings in several sys/cam/ctl files. MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.mk Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Feb 23 21:08:21 2012 (r232072) +++ head/sys/conf/files Thu Feb 23 21:32:32 2012 (r232073) @@ -116,21 +116,16 @@ cam/scsi/scsi_cd.c optional cd cam/scsi/scsi_ch.c optional ch cam/ata/ata_da.c optional ada | da cam/ctl/ctl.c optional ctl -cam/ctl/ctl_backend.c optional ctl \ - compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" +cam/ctl/ctl_backend.c optional ctl cam/ctl/ctl_backend_block.c optional ctl cam/ctl/ctl_backend_ramdisk.c optional ctl -cam/ctl/ctl_cmd_table.c optional ctl \ - compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" -cam/ctl/ctl_frontend.c optional ctl \ - compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" +cam/ctl/ctl_cmd_table.c optional ctl +cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl -cam/ctl/ctl_frontend_internal.c optional ctl \ - compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" +cam/ctl/ctl_frontend_internal.c optional ctl cam/ctl/ctl_mem_pool.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl -cam/ctl/ctl_error.c optional ctl \ - compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" +cam/ctl/ctl_error.c optional ctl cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/scsi/scsi_da.c optional da Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Feb 23 21:08:21 2012 (r232072) +++ head/sys/conf/kern.mk Thu Feb 23 21:32:32 2012 (r232073) @@ -22,7 +22,6 @@ NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-cou NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow NO_WUNUSED_VALUE= -Wno-unused-value NO_WSELF_ASSIGN= -Wno-self-assign -NO_WUNNEEDED_INTERNAL_DECL= -Wno-unneeded-internal-declaration NO_WFORMAT_SECURITY= -Wno-format-security # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:34:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 800781065674; Thu, 23 Feb 2012 21:34:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F98F8FC08; Thu, 23 Feb 2012 21:34:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NLYEaF024069; Thu, 23 Feb 2012 21:34:14 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NLYEq5024067; Thu, 23 Feb 2012 21:34:14 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201202232134.q1NLYEq5024067@svn.freebsd.org> From: Dimitry Andric Date: Thu, 23 Feb 2012 21:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232074 - head/sys/cam/ctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:34:14 -0000 Author: dim Date: Thu Feb 23 21:34:14 2012 New Revision: 232074 URL: http://svn.freebsd.org/changeset/base/232074 Log: Use a better way to silence unneeded internal declaration warnings in several sys/cam/ctl files. Suggested by: ed Reviewed by: ken MFC after: 1 week Modified: head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Thu Feb 23 21:32:32 2012 (r232073) +++ head/sys/cam/ctl/ctl_private.h Thu Feb 23 21:34:14 2012 (r232074) @@ -297,7 +297,7 @@ struct ctl_page_index { #define CTL_PAGE_DEFAULT 0x02 #define CTL_PAGE_SAVED 0x03 -static struct ctl_page_index page_index_template[] = { +static const struct ctl_page_index page_index_template[] = { {SMS_FORMAT_DEVICE_PAGE, 0, sizeof(struct scsi_format_page), NULL, CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, {SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL, From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:42:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D30A9106566B; Thu, 23 Feb 2012 21:42:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1BE28FC08; Thu, 23 Feb 2012 21:42:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NLgfQt024372; Thu, 23 Feb 2012 21:42:41 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NLgfDG024370; Thu, 23 Feb 2012 21:42:41 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232142.q1NLgfDG024370@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 21:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232075 - stable/9/sys/amd64/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:42:41 -0000 Author: jkim Date: Thu Feb 23 21:42:41 2012 New Revision: 232075 URL: http://svn.freebsd.org/changeset/base/232075 Log: MFC: r230777 Naturally align a newly added wakeup_fpusave. Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:34:14 2012 (r232074) +++ stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:42:41 2012 (r232075) @@ -267,11 +267,11 @@ wakeup_ctx: .quad 0 wakeup_pcb: .quad 0 +wakeup_fpusave: + .quad 0 wakeup_gdt: .word 0 .quad 0 -wakeup_fpusave: - .quad 0 ALIGN_DATA wakeup_efer: From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:44:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87D481065722; Thu, 23 Feb 2012 21:44:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 760E08FC0C; Thu, 23 Feb 2012 21:44:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NLiiPp024495; Thu, 23 Feb 2012 21:44:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NLiiiL024491; Thu, 23 Feb 2012 21:44:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232144.q1NLiiiL024491@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 21:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232076 - stable/9/sys/amd64/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:44:44 -0000 Author: jkim Date: Thu Feb 23 21:44:44 2012 New Revision: 232076 URL: http://svn.freebsd.org/changeset/base/232076 Log: MFC: r230830 Restore XCR0 before restoring extended FPU states. Modified: stable/9/sys/amd64/acpica/acpi_switch.S stable/9/sys/amd64/acpica/acpi_wakecode.S stable/9/sys/amd64/acpica/acpi_wakeup.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_switch.S ============================================================================== --- stable/9/sys/amd64/acpica/acpi_switch.S Thu Feb 23 21:42:41 2012 (r232075) +++ stable/9/sys/amd64/acpica/acpi_switch.S Thu Feb 23 21:44:44 2012 (r232076) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI - * Copyright (c) 2008-2010 Jung-uk Kim + * Copyright (c) 2008-2012 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -95,7 +95,6 @@ ENTRY(acpi_restorecpu) /* Restore CR0 except for FPU mode. */ movq PCB_CR0(%rdi), %rax - movq %rax, %rcx andq $~(CR0_EM | CR0_TS), %rax movq %rax, %cr0 @@ -146,21 +145,26 @@ ENTRY(acpi_restorecpu) /* Restore FPU state. */ fninit - movq WAKEUP_CTX(fpusave),%rdi - cmpl $0,use_xsave - jne 1f - fxrstor (%rdi) + movq WAKEUP_CTX(xsmask), %rax + testq %rax, %rax + jz 1f + movq %rax, %rdx + shrq $32, %rdx + movl $XCR0, %ecx +/* xsetbv */ + .byte 0x0f, 0x01, 0xd1 + movq WAKEUP_CTX(fpusave), %rcx +/* xrstor (%rcx) */ + .byte 0x0f, 0xae, 0x29 jmp 2f -1: movl xsave_mask,%eax - movl xsave_mask+4,%edx -/* xrstor (%rdi) */ - .byte 0x0f,0xae,0x2f +1: + movq WAKEUP_CTX(fpusave), %rcx + fxrstor (%rcx) 2: /* Reload CR0. */ - movq %rcx, %cr0 - - movq WAKEUP_CTX(pcb),%rdi + movq PCB_CR0(%rdi), %rax + movq %rax, %cr0 /* Restore return address. */ movq PCB_RIP(%rdi), %rax Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:42:41 2012 (r232075) +++ stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:44:44 2012 (r232076) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2010 Jung-uk Kim + * Copyright (c) 2008-2012 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -284,6 +284,8 @@ wakeup_cstar: .quad 0 wakeup_sfmask: .quad 0 +wakeup_xsmask: + .quad 0 wakeup_cpu: .long 0 dummy: Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 21:42:41 2012 (r232075) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 21:44:44 2012 (r232076) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2010 Jung-uk Kim + * Copyright (c) 2008-2012 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -386,6 +386,7 @@ acpi_install_wakeup_handler(struct acpi_ WAKECODE_FIXUP(wakeup_lstar, uint64_t, rdmsr(MSR_LSTAR)); WAKECODE_FIXUP(wakeup_cstar, uint64_t, rdmsr(MSR_CSTAR)); WAKECODE_FIXUP(wakeup_sfmask, uint64_t, rdmsr(MSR_SF_MASK)); + WAKECODE_FIXUP(wakeup_xsmask, uint64_t, xsave_mask); /* Build temporary page tables below realmode code. */ pt4 = wakeaddr; From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:48:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50089106564A; Thu, 23 Feb 2012 21:48:40 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EBEE8FC0A; Thu, 23 Feb 2012 21:48:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NLmeeS024661; Thu, 23 Feb 2012 21:48:40 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NLme7f024659; Thu, 23 Feb 2012 21:48:40 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232148.q1NLme7f024659@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 21:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232077 - stable/9/sys/amd64/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:48:40 -0000 Author: jkim Date: Thu Feb 23 21:48:39 2012 New Revision: 232077 URL: http://svn.freebsd.org/changeset/base/232077 Log: MFC: r230957 Fix a function prototype to reflect reality. Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 21:44:44 2012 (r232076) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 21:48:39 2012 (r232077) @@ -74,7 +74,7 @@ static struct pcb **susppcbs; static void **suspfpusave; #endif -int acpi_restorecpu(vm_offset_t, struct pcb *); +int acpi_restorecpu(uint64_t, vm_offset_t); static void *acpi_alloc_wakeup_handler(void); static void acpi_stop_beep(void *); From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:50:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 950D11065676; Thu, 23 Feb 2012 21:50:13 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83AF48FC21; Thu, 23 Feb 2012 21:50:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NLoDt9024758; Thu, 23 Feb 2012 21:50:13 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NLoD2I024756; Thu, 23 Feb 2012 21:50:13 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232150.q1NLoD2I024756@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 21:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232078 - stable/9/sys/amd64/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:50:13 -0000 Author: jkim Date: Thu Feb 23 21:50:13 2012 New Revision: 232078 URL: http://svn.freebsd.org/changeset/base/232078 Log: MFC: r230958 Restore callee saved registers later and micro-optimize. Modified: stable/9/sys/amd64/acpica/acpi_switch.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_switch.S ============================================================================== --- stable/9/sys/amd64/acpica/acpi_switch.S Thu Feb 23 21:48:39 2012 (r232077) +++ stable/9/sys/amd64/acpica/acpi_switch.S Thu Feb 23 21:50:13 2012 (r232078) @@ -120,15 +120,6 @@ ENTRY(acpi_restorecpu) #undef SDT_SYSTSS #undef SDT_SYSBSY - /* Restore other callee saved registers. */ - movq PCB_R15(%rdi), %r15 - movq PCB_R14(%rdi), %r14 - movq PCB_R13(%rdi), %r13 - movq PCB_R12(%rdi), %r12 - movq PCB_RBP(%rdi), %rbp - movq PCB_RSP(%rdi), %rsp - movq PCB_RBX(%rdi), %rbx - /* Restore debug registers. */ movq PCB_DR0(%rdi), %rax movq %rax, %dr0 @@ -145,6 +136,7 @@ ENTRY(acpi_restorecpu) /* Restore FPU state. */ fninit + movq WAKEUP_CTX(fpusave), %rbx movq WAKEUP_CTX(xsmask), %rax testq %rax, %rax jz 1f @@ -153,19 +145,26 @@ ENTRY(acpi_restorecpu) movl $XCR0, %ecx /* xsetbv */ .byte 0x0f, 0x01, 0xd1 - movq WAKEUP_CTX(fpusave), %rcx -/* xrstor (%rcx) */ - .byte 0x0f, 0xae, 0x29 +/* xrstor (%rbx) */ + .byte 0x0f, 0xae, 0x2b jmp 2f 1: - movq WAKEUP_CTX(fpusave), %rcx - fxrstor (%rcx) + fxrstor (%rbx) 2: /* Reload CR0. */ movq PCB_CR0(%rdi), %rax movq %rax, %cr0 + /* Restore other callee saved registers. */ + movq PCB_R15(%rdi), %r15 + movq PCB_R14(%rdi), %r14 + movq PCB_R13(%rdi), %r13 + movq PCB_R12(%rdi), %r12 + movq PCB_RBP(%rdi), %rbp + movq PCB_RSP(%rdi), %rsp + movq PCB_RBX(%rdi), %rbx + /* Restore return address. */ movq PCB_RIP(%rdi), %rax movq %rax, (%rsp) From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:54:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45B121065672; Thu, 23 Feb 2012 21:54:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 348338FC16; Thu, 23 Feb 2012 21:54:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NLs50U024920; Thu, 23 Feb 2012 21:54:05 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NLs5Tk024918; Thu, 23 Feb 2012 21:54:05 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232154.q1NLs5Tk024918@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 21:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232079 - stable/9/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:54:05 -0000 Author: jkim Date: Thu Feb 23 21:54:04 2012 New Revision: 232079 URL: http://svn.freebsd.org/changeset/base/232079 Log: MFC: r231169 Do not EOI local APIC too early when suspending APs. Just do doreti instead of taking a shortcut. Modified: stable/9/sys/amd64/amd64/apic_vector.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/9/sys/amd64/amd64/apic_vector.S Thu Feb 23 21:50:13 2012 (r232078) +++ stable/9/sys/amd64/amd64/apic_vector.S Thu Feb 23 21:54:04 2012 (r232079) @@ -300,13 +300,10 @@ IDTVEC(cpustop) IDTVEC(cpususpend) PUSH_FRAME + call cpususpend_handler movq lapic, %rax movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ - - call cpususpend_handler - - POP_FRAME - jmp doreti_iret + jmp doreti /* * Executed by a CPU when it receives a RENDEZVOUS IPI from another CPU. From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 21:56:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27756106564A; Thu, 23 Feb 2012 21:56:54 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0E3C8FC0A; Thu, 23 Feb 2012 21:56:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NLurPI025057; Thu, 23 Feb 2012 21:56:53 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NLurPU025054; Thu, 23 Feb 2012 21:56:53 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202232156.q1NLurPU025054@svn.freebsd.org> From: Andrew Thompson Date: Thu, 23 Feb 2012 21:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232080 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:56:54 -0000 Author: thompsa Date: Thu Feb 23 21:56:53 2012 New Revision: 232080 URL: http://svn.freebsd.org/changeset/base/232080 Log: Add a sysctl/tunable default value for the use_flowid sysctl in r232008. Modified: head/share/man/man4/lagg.4 head/sys/net/if_lagg.c Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Thu Feb 23 21:54:04 2012 (r232079) +++ head/share/man/man4/lagg.4 Thu Feb 23 21:56:53 2012 (r232080) @@ -142,10 +142,12 @@ and modes will use the RSS hash from the network card if available to avoid computing one, this may give poor traffic distribution if the hash is invalid or uses less of the protocol header information. -Local hash computation can be forced by setting the +Local hash computation can be forced per interface by setting the .Va net.link.lagg.X.use_flowid .Xr sysctl 8 -variable to zero where X is the interface number. +variable to zero where X is the interface number, the default for +new interfaces is set via +.Va net.link.lagg.default_use_flowid . .Sh EXAMPLES Create a 802.3ad link aggregation using LACP with two .Xr bge 4 Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Thu Feb 23 21:54:04 2012 (r232079) +++ head/sys/net/if_lagg.c Thu Feb 23 21:56:53 2012 (r232080) @@ -172,6 +172,11 @@ static int lagg_failover_rx_all = 0; /* SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW, &lagg_failover_rx_all, 0, "Accept input from any interface in a failover lagg"); +static int def_use_flowid = 1; /* Default value for using M_FLOWID */ +TUNABLE_INT("net.link.lagg.default_use_flowid", &def_use_flowid); +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RW, + &def_use_flowid, 0, + "Default setting for using flow id for load sharing"); static int lagg_modevent(module_t mod, int type, void *data) @@ -274,7 +279,7 @@ lagg_clone_create(struct if_clone *ifc, sysctl_ctx_init(&sc->ctx); snprintf(num, sizeof(num), "%u", unit); - sc->use_flowid = 1; + sc->use_flowid = def_use_flowid; oid = SYSCTL_ADD_NODE(&sc->ctx, &SYSCTL_NODE_CHILDREN(_net_link, lagg), OID_AUTO, num, CTLFLAG_RD, NULL, ""); SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:00:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEDB010656F0; Thu, 23 Feb 2012 22:00:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD7E08FC08; Thu, 23 Feb 2012 22:00:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NM0Viq025223; Thu, 23 Feb 2012 22:00:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NM0VdB025221; Thu, 23 Feb 2012 22:00:31 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232200.q1NM0VdB025221@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232081 - stable/9/sys/amd64/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:00:32 -0000 Author: jkim Date: Thu Feb 23 22:00:31 2012 New Revision: 232081 URL: http://svn.freebsd.org/changeset/base/232081 Log: MFC: r231787 Make ACPI resume beeper less cryptic. Set PIC timer2 mode properly. Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:56:53 2012 (r232080) +++ stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 22:00:31 2012 (r232081) @@ -30,7 +30,9 @@ */ #include +#include #include +#include #include "assym.s" @@ -71,13 +73,21 @@ wakeup_start: testb $~0, resume_beep - wakeup_start jz 1f movb $0, resume_beep - wakeup_start - movb $0xc0, %al - outb %al, $0x42 - movb $0x04, %al - outb %al, $0x42 - inb $0x61, %al - orb $0x3, %al - outb %al, $0x61 + + /* Set PIC timer2 to beep. */ + movb $(TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT), %al + outb %al, $TIMER_MODE + + /* Turn on speaker. */ + inb $IO_PPI, %al + orb $PIT_SPKR, %al + outb %al, $IO_PPI + + /* Set frequency. */ + movw $0x4c0, %ax + outb %al, $TIMER_CNTR2 + shrw $8, %ax + outb %al, $TIMER_CNTR2 1: /* Re-initialize video BIOS if the reset_video tunable is set. */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:03:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E888E106564A; Thu, 23 Feb 2012 22:03:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDD318FC12; Thu, 23 Feb 2012 22:03:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NM3Ke6025368; Thu, 23 Feb 2012 22:03:20 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NM3Kb6025366; Thu, 23 Feb 2012 22:03:20 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232203.q1NM3Kb6025366@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232082 - stable/9/sys/amd64/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:03:21 -0000 Author: jkim Date: Thu Feb 23 22:03:20 2012 New Revision: 232082 URL: http://svn.freebsd.org/changeset/base/232082 Log: MFC: r231791, r231840 Set up an event handler to turn off speaker if user requested it. Speaker will stop beeping after all device drivers are resumed. Use proper API to "acquire" and "release" PIC timer2 for consistency and correctness. Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:00:31 2012 (r232081) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:03:20 2012 (r232082) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -40,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -92,11 +94,12 @@ static void acpi_wakeup_cpus(struct acp *addr = val; \ } while (0) -/* Turn off bits 1&2 of the PIT, stopping the beep. */ static void acpi_stop_beep(void *arg) { - outb(0x61, inb(0x61) & ~0x3); + + if (acpi_resume_beep != 0) + timer_spkr_release(); } #ifdef SMP @@ -234,6 +237,9 @@ acpi_sleep_machdep(struct acpi_softc *sc CPU_CLR(PCPU_GET(cpuid), &wakeup_cpus); #endif + if (acpi_resume_beep != 0) + timer_spkr_acquire(); + AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); rf = intr_disable(); @@ -312,10 +318,6 @@ out: mem_range_softc.mr_op->reinit != NULL) mem_range_softc.mr_op->reinit(&mem_range_softc); - /* If we beeped, turn it off after a delay. */ - if (acpi_resume_beep) - timeout(acpi_stop_beep, NULL, 3 * hz); - return (ret); } @@ -338,6 +340,12 @@ acpi_alloc_wakeup_handler(void) printf("%s: can't alloc wake memory\n", __func__); return (NULL); } + if (EVENTHANDLER_REGISTER(power_resume, acpi_stop_beep, NULL, + EVENTHANDLER_PRI_LAST) == NULL) { + printf("%s: can't register event handler\n", __func__); + contigfree(wakeaddr, 4 * PAGE_SIZE, M_DEVBUF); + return (NULL); + } susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK); suspfpusave = malloc(mp_ncpus * sizeof(void *), M_DEVBUF, M_WAITOK); for (i = 0; i < mp_ncpus; i++) { From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:10:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5D38106566B; Thu, 23 Feb 2012 22:10:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA5518FC0A; Thu, 23 Feb 2012 22:10:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NMAnG9026321; Thu, 23 Feb 2012 22:10:49 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NMAn7a026317; Thu, 23 Feb 2012 22:10:49 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232210.q1NMAn7a026317@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232083 - in stable/9: etc sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:10:49 -0000 Author: jkim Date: Thu Feb 23 22:10:49 2012 New Revision: 232083 URL: http://svn.freebsd.org/changeset/base/232083 Log: MFC: r231226, r231295 Revert r211288 and move the logic to the acpi_timer itself. Modified: stable/9/etc/rc.resume stable/9/etc/rc.suspend stable/9/sys/dev/acpica/acpi_timer.c Directory Properties: stable/9/etc/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/etc/rc.resume ============================================================================== --- stable/9/etc/rc.resume Thu Feb 23 22:03:20 2012 (r232082) +++ stable/9/etc/rc.resume Thu Feb 23 22:10:49 2012 (r232083) @@ -43,12 +43,6 @@ if [ -r /var/run/rc.suspend.pid ]; then echo 'rc.resume: killed rc.suspend that was still around' fi -if [ -r /var/run/rc.suspend.tch ]; then - _t=`cat /var/run/rc.suspend.tch` - /sbin/sysctl -n kern.timecounter.hardware=$_t > /dev/null 2>&1 - /bin/rm -f /var/run/rc.suspend.tch -fi - # Turns on a power supply of a card in the slot inactivated. # See also contrib/pccardq.c (only for PAO users). # pccardq | awk -F '~' '$5 == "inactive" \ Modified: stable/9/etc/rc.suspend ============================================================================== --- stable/9/etc/rc.suspend Thu Feb 23 22:03:20 2012 (r232082) +++ stable/9/etc/rc.suspend Thu Feb 23 22:10:49 2012 (r232083) @@ -43,18 +43,6 @@ fi echo $$ 2> /dev/null > /var/run/rc.suspend.pid -_t=`/sbin/sysctl -n kern.timecounter.hardware 2> /dev/null` -case ${_t#ACPI-} in -fast|safe) - /bin/rm -f /var/run/rc.suspend.tch - ;; -*) - { /sbin/sysctl -n kern.timecounter.hardware=ACPI-fast || \ - /sbin/sysctl -n kern.timecounter.hardware=ACPI-safe; } \ - > /dev/null 2>&1 && echo $_t > /var/run/rc.suspend.tch - ;; -esac - # If you have troubles on suspending with PC-CARD modem, try this. # See also contrib/pccardq.c (Only for PAO users). # pccardq | awk -F '~' '$5 == "filled" && $4 ~ /uart/ \ Modified: stable/9/sys/dev/acpica/acpi_timer.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_timer.c Thu Feb 23 22:03:20 2012 (r232082) +++ stable/9/sys/dev/acpica/acpi_timer.c Thu Feb 23 22:10:49 2012 (r232083) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" #include #include +#include #include #include #include @@ -60,12 +61,15 @@ static device_t acpi_timer_dev; static struct resource *acpi_timer_reg; static bus_space_handle_t acpi_timer_bsh; static bus_space_tag_t acpi_timer_bst; +static eventhandler_tag acpi_timer_eh; static u_int acpi_timer_frequency = 14318182 / 4; static void acpi_timer_identify(driver_t *driver, device_t parent); static int acpi_timer_probe(device_t dev); static int acpi_timer_attach(device_t dev); +static void acpi_timer_resume_handler(struct timecounter *); +static void acpi_timer_suspend_handler(struct timecounter *); static u_int acpi_timer_get_timecount(struct timecounter *tc); static u_int acpi_timer_get_timecount_safe(struct timecounter *tc); static int acpi_timer_sysctl_freq(SYSCTL_HANDLER_ARGS); @@ -244,9 +248,60 @@ acpi_timer_attach(device_t dev) return (ENXIO); acpi_timer_bsh = rman_get_bushandle(acpi_timer_reg); acpi_timer_bst = rman_get_bustag(acpi_timer_reg); + + /* Register suspend event handler. */ + if (EVENTHANDLER_REGISTER(power_suspend, acpi_timer_suspend_handler, + &acpi_timer_timecounter, EVENTHANDLER_PRI_LAST) == NULL) + device_printf(dev, "failed to register suspend event handler\n"); + return (0); } +static void +acpi_timer_resume_handler(struct timecounter *newtc) +{ + struct timecounter *tc; + + tc = timecounter; + if (tc != newtc) { + if (bootverbose) + device_printf(acpi_timer_dev, + "restoring timecounter, %s -> %s\n", + tc->tc_name, newtc->tc_name); + (void)newtc->tc_get_timecount(newtc); + (void)newtc->tc_get_timecount(newtc); + timecounter = newtc; + } +} + +static void +acpi_timer_suspend_handler(struct timecounter *newtc) +{ + struct timecounter *tc; + + /* Deregister existing resume event handler. */ + if (acpi_timer_eh != NULL) { + EVENTHANDLER_DEREGISTER(power_resume, acpi_timer_eh); + acpi_timer_eh = NULL; + } + + KASSERT(newtc == &acpi_timer_timecounter, + ("acpi_timer_suspend_handler: wrong timecounter")); + + tc = timecounter; + if (tc != newtc) { + if (bootverbose) + device_printf(acpi_timer_dev, + "switching timecounter, %s -> %s\n", + tc->tc_name, newtc->tc_name); + (void)acpi_timer_read(); + (void)acpi_timer_read(); + timecounter = newtc; + acpi_timer_eh = EVENTHANDLER_REGISTER(power_resume, + acpi_timer_resume_handler, tc, EVENTHANDLER_PRI_LAST); + } +} + /* * Fetch current time value from reliable hardware. */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:15:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A7631065677; Thu, 23 Feb 2012 22:15:57 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 289118FC19; Thu, 23 Feb 2012 22:15:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NMFvCR026984; Thu, 23 Feb 2012 22:15:57 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NMFuWe026980; Thu, 23 Feb 2012 22:15:56 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232215.q1NMFuWe026980@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232084 - in stable/9/sys: amd64/acpica dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:15:57 -0000 Author: jkim Date: Thu Feb 23 22:15:56 2012 New Revision: 232084 URL: http://svn.freebsd.org/changeset/base/232084 Log: MFC: r231227 Reset clock after atrtc(4) is properly resumed. Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c stable/9/sys/dev/acpica/acpi.c stable/9/sys/dev/acpica/acpivar.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:10:49 2012 (r232083) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:15:56 2012 (r232084) @@ -297,7 +297,6 @@ acpi_sleep_machdep(struct acpi_softc *sc if (!CPU_EMPTY(&wakeup_cpus)) acpi_wakeup_cpus(sc, &wakeup_cpus); #endif - acpi_resync_clock(sc); ret = 0; } Modified: stable/9/sys/dev/acpica/acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:10:49 2012 (r232083) +++ stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:15:56 2012 (r232084) @@ -152,6 +152,7 @@ static ACPI_STATUS acpi_EnterSleepState( static void acpi_shutdown_final(void *arg, int howto); static void acpi_enable_fixed_events(struct acpi_softc *sc); static BOOLEAN acpi_has_hid(ACPI_HANDLE handle); +static void acpi_resync_clock(struct acpi_softc *sc); static int acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate); static int acpi_wake_run_prep(ACPI_HANDLE handle, int sstate); static int acpi_wake_prep_walk(int sstate); @@ -277,11 +278,13 @@ TUNABLE_INT("debug.acpi.interpreter_slac SYSCTL_INT(_debug_acpi, OID_AUTO, interpreter_slack, CTLFLAG_RDTUN, &acpi_interpreter_slack, 1, "Turn on interpreter slack mode."); +#ifdef __amd64__ /* Reset system clock while resuming. XXX Remove once tested. */ static int acpi_reset_clock = 1; TUNABLE_INT("debug.acpi.reset_clock", &acpi_reset_clock); SYSCTL_INT(_debug_acpi, OID_AUTO, reset_clock, CTLFLAG_RW, &acpi_reset_clock, 1, "Reset system clock while resuming."); +#endif /* Allow users to override quirks. */ TUNABLE_INT("debug.acpi.quirks", &acpi_quirks); @@ -2735,8 +2738,10 @@ backout: AcpiLeaveSleepState(state); if (slp_state >= ACPI_SS_DEV_SUSPEND) DEVICE_RESUME(root_bus); - if (slp_state >= ACPI_SS_SLEPT) + if (slp_state >= ACPI_SS_SLEPT) { + acpi_resync_clock(sc); acpi_enable_fixed_events(sc); + } sc->acpi_next_sstate = 0; mtx_unlock(&Giant); @@ -2759,10 +2764,10 @@ backout: return_ACPI_STATUS (status); } -void +static void acpi_resync_clock(struct acpi_softc *sc) { - +#ifdef __amd64__ if (!acpi_reset_clock) return; @@ -2772,6 +2777,7 @@ acpi_resync_clock(struct acpi_softc *sc) (void)timecounter->tc_get_timecount(timecounter); (void)timecounter->tc_get_timecount(timecounter); inittodr(time_second + sc->acpi_sleep_delay); +#endif } /* Enable or disable the device's wake GPE. */ Modified: stable/9/sys/dev/acpica/acpivar.h ============================================================================== --- stable/9/sys/dev/acpica/acpivar.h Thu Feb 23 22:10:49 2012 (r232083) +++ stable/9/sys/dev/acpica/acpivar.h Thu Feb 23 22:15:56 2012 (r232084) @@ -339,7 +339,6 @@ ACPI_STATUS acpi_SetIntrModel(int model) int acpi_ReqSleepState(struct acpi_softc *sc, int state); int acpi_AckSleepState(struct apm_clone_data *clone, int error); ACPI_STATUS acpi_SetSleepState(struct acpi_softc *sc, int state); -void acpi_resync_clock(struct acpi_softc *sc); int acpi_wake_set_enable(device_t dev, int enable); int acpi_parse_prw(ACPI_HANDLE h, struct acpi_prw_data *prw); ACPI_STATUS acpi_Startup(void); From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:20:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6322B106566C; Thu, 23 Feb 2012 22:20:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 515A28FC13; Thu, 23 Feb 2012 22:20:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NMKrO7027633; Thu, 23 Feb 2012 22:20:53 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NMKrb1027630; Thu, 23 Feb 2012 22:20:53 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232220.q1NMKrb1027630@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232085 - in stable/9/sys/amd64: acpica amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:20:53 -0000 Author: jkim Date: Thu Feb 23 22:20:52 2012 New Revision: 232085 URL: http://svn.freebsd.org/changeset/base/232085 Log: MFC: r231797 Clean up RFLAG and CR3 register handling and nearby comments. For BSP, use spinlock_enter()/spinlock_exit() to save/restore RFLAGS. We know interrupt is disabled when returning from S3. For AP, we do not have to save/restore it because IRET will do it for us any way. Do not save CR3 locally because savectx() does it and BSP does not have to switch to kernel map for amd64. Change contigmalloc(9) flag while I am in the neighborhood. Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c stable/9/sys/amd64/amd64/mp_machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:15:56 2012 (r232084) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:20:52 2012 (r232085) @@ -223,7 +223,6 @@ acpi_sleep_machdep(struct acpi_softc *sc #ifdef SMP cpuset_t wakeup_cpus; #endif - register_t cr3, rf; ACPI_STATUS status; int ret; @@ -242,17 +241,9 @@ acpi_sleep_machdep(struct acpi_softc *sc AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); - rf = intr_disable(); + spinlock_enter(); intr_suspend(); - /* - * Temporarily switch to the kernel pmap because it provides - * an identity mapping (setup at boot) for the low physical - * memory region containing the wakeup code. - */ - cr3 = rcr3(); - load_cr3(KPML4phys); - if (savectx(susppcbs[0])) { ctx_fpusave(suspfpusave[0]); #ifdef SMP @@ -291,6 +282,7 @@ acpi_sleep_machdep(struct acpi_softc *sc ia32_pause(); } else { pmap_init_pat(); + load_cr3(susppcbs[0]->pcb_cr3); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); #ifdef SMP @@ -306,10 +298,9 @@ out: restart_cpus(wakeup_cpus); #endif - load_cr3(cr3); mca_resume(); intr_resume(); - intr_restore(rf); + spinlock_exit(); AcpiSetFirmwareWakingVector(0); @@ -333,7 +324,7 @@ acpi_alloc_wakeup_handler(void) * and ROM area (0xa0000 and above). The temporary page tables must be * page-aligned. */ - wakeaddr = contigmalloc(4 * PAGE_SIZE, M_DEVBUF, M_NOWAIT, 0x500, + wakeaddr = contigmalloc(4 * PAGE_SIZE, M_DEVBUF, M_WAITOK, 0x500, 0xa0000, PAGE_SIZE, 0ul); if (wakeaddr == NULL) { printf("%s: can't alloc wake memory\n", __func__); Modified: stable/9/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/mp_machdep.c Thu Feb 23 22:15:56 2012 (r232084) +++ stable/9/sys/amd64/amd64/mp_machdep.c Thu Feb 23 22:20:52 2012 (r232085) @@ -1414,20 +1414,17 @@ cpustop_handler(void) void cpususpend_handler(void) { - register_t cr3, rf; u_int cpu; cpu = PCPU_GET(cpuid); - rf = intr_disable(); - cr3 = rcr3(); - if (savectx(susppcbs[cpu])) { ctx_fpusave(suspfpusave[cpu]); wbinvd(); CPU_SET_ATOMIC(cpu, &stopped_cpus); } else { pmap_init_pat(); + load_cr3(susppcbs[cpu]->pcb_cr3); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); } @@ -1439,11 +1436,9 @@ cpususpend_handler(void) CPU_CLR_ATOMIC(cpu, &started_cpus); CPU_CLR_ATOMIC(cpu, &stopped_cpus); - /* Restore CR3 and enable interrupts */ - load_cr3(cr3); + /* Resume MCA and local APIC */ mca_resume(); lapic_setup(0); - intr_restore(rf); } /* From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:26:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F127106564A; Thu, 23 Feb 2012 22:26:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 846038FC08; Thu, 23 Feb 2012 22:26:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NMQFnP028328; Thu, 23 Feb 2012 22:26:15 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NMQFAB028321; Thu, 23 Feb 2012 22:26:15 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232226.q1NMQFAB028321@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232086 - stable/9/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:26:15 -0000 Author: jkim Date: Thu Feb 23 22:26:14 2012 New Revision: 232086 URL: http://svn.freebsd.org/changeset/base/232086 Log: MFC: r231161 - Give all clocks and timers on acpi0 the equal probing order. - Increase probing order for ECDT table to match HID-based probing. - Decrease probing order for HPET table to match HID-based probing. - Decrease probing order for CPUs and system resources. - Fix ACPI_DEV_BASE_ORDER to reflect the reality. Modified: stable/9/sys/dev/acpica/acpi.c stable/9/sys/dev/acpica/acpi_ec.c stable/9/sys/dev/acpica/acpi_hpet.c stable/9/sys/dev/acpica/acpi_timer.c stable/9/sys/dev/acpica/acpivar.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/acpica/acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:26:14 2012 (r232086) @@ -1815,23 +1815,29 @@ acpi_probe_children(device_t bus) static void acpi_probe_order(ACPI_HANDLE handle, int *order) { - ACPI_OBJECT_TYPE type; + ACPI_OBJECT_TYPE type; - /* - * 1. CPUs - * 2. I/O port and memory system resource holders - * 3. Embedded controllers (to handle early accesses) - * 4. PCI Link Devices - */ - AcpiGetType(handle, &type); - if (type == ACPI_TYPE_PROCESSOR) - *order = 1; - else if (acpi_MatchHid(handle, "PNP0C01") || acpi_MatchHid(handle, "PNP0C02")) - *order = 2; - else if (acpi_MatchHid(handle, "PNP0C09")) - *order = 3; - else if (acpi_MatchHid(handle, "PNP0C0F")) - *order = 4; + /* + * 0. CPUs + * 1. I/O port and memory system resource holders + * 2. Clocks and timers (to handle early accesses) + * 3. Embedded controllers (to handle early accesses) + * 4. PCI Link Devices + */ + AcpiGetType(handle, &type); + if (type == ACPI_TYPE_PROCESSOR) + *order = 0; + else if (acpi_MatchHid(handle, "PNP0C01") || + acpi_MatchHid(handle, "PNP0C02")) + *order = 1; + else if (acpi_MatchHid(handle, "PNP0100") || + acpi_MatchHid(handle, "PNP0103") || + acpi_MatchHid(handle, "PNP0B00")) + *order = 2; + else if (acpi_MatchHid(handle, "PNP0C09")) + *order = 3; + else if (acpi_MatchHid(handle, "PNP0C0F")) + *order = 4; } /* @@ -1892,7 +1898,7 @@ acpi_probe_child(ACPI_HANDLE handle, UIN * resources). */ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "scanning '%s'\n", handle_str)); - order = level * 10 + 100; + order = level * 10 + ACPI_DEV_BASE_ORDER; acpi_probe_order(handle, &order); child = BUS_ADD_CHILD(bus, order, NULL, -1); if (child == NULL) Modified: stable/9/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_ec.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi_ec.c Thu Feb 23 22:26:14 2012 (r232086) @@ -295,7 +295,7 @@ acpi_ec_ecdt_probe(device_t parent) } /* Create the child device with the given unit number. */ - child = BUS_ADD_CHILD(parent, 0, "acpi_ec", ecdt->Uid); + child = BUS_ADD_CHILD(parent, 3, "acpi_ec", ecdt->Uid); if (child == NULL) { printf("%s: can't add child\n", __func__); return; Modified: stable/9/sys/dev/acpica/acpi_hpet.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_hpet.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi_hpet.c Thu Feb 23 22:26:14 2012 (r232086) @@ -342,7 +342,7 @@ hpet_identify(driver_t *driver, device_t if (found) continue; /* If not - create it from table info. */ - child = BUS_ADD_CHILD(parent, ACPI_DEV_BASE_ORDER, "hpet", 0); + child = BUS_ADD_CHILD(parent, 2, "hpet", 0); if (child == NULL) { printf("%s: can't add child\n", __func__); continue; Modified: stable/9/sys/dev/acpica/acpi_timer.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_timer.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi_timer.c Thu Feb 23 22:26:14 2012 (r232086) @@ -128,7 +128,7 @@ acpi_timer_identify(driver_t *driver, de acpi_timer_dev) return_VOID; - if ((dev = BUS_ADD_CHILD(parent, 0, "acpi_timer", 0)) == NULL) { + if ((dev = BUS_ADD_CHILD(parent, 2, "acpi_timer", 0)) == NULL) { device_printf(parent, "could not add acpi_timer0\n"); return_VOID; } Modified: stable/9/sys/dev/acpica/acpivar.h ============================================================================== --- stable/9/sys/dev/acpica/acpivar.h Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpivar.h Thu Feb 23 22:26:14 2012 (r232086) @@ -472,7 +472,7 @@ ACPI_HANDLE acpi_GetReference(ACPI_HANDL * probe order sorted so that things like sysresource are available before * their children need them. */ -#define ACPI_DEV_BASE_ORDER 10 +#define ACPI_DEV_BASE_ORDER 100 /* Default maximum number of tasks to enqueue. */ #ifndef ACPI_MAX_TASKS From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:29:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E298F106566B; Thu, 23 Feb 2012 22:29:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D14538FC0A; Thu, 23 Feb 2012 22:29:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NMTaO5028769; Thu, 23 Feb 2012 22:29:36 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NMTaFb028767; Thu, 23 Feb 2012 22:29:36 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232229.q1NMTaFb028767@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232087 - stable/9/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:29:37 -0000 Author: jkim Date: Thu Feb 23 22:29:36 2012 New Revision: 232087 URL: http://svn.freebsd.org/changeset/base/232087 Log: MFC: r231474 De-obfuscate acpi_acquire_global_lock(). Modified: stable/9/sys/dev/acpica/Osd/OsdSynch.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/acpica/Osd/OsdSynch.c ============================================================================== --- stable/9/sys/dev/acpica/Osd/OsdSynch.c Thu Feb 23 22:26:14 2012 (r232086) +++ stable/9/sys/dev/acpica/Osd/OsdSynch.c Thu Feb 23 22:29:36 2012 (r232087) @@ -566,11 +566,8 @@ AcpiOsReleaseLock(ACPI_SPINLOCK Handle, } /* Section 5.2.10.1: global lock acquire/release functions */ -#define GL_ACQUIRED (-1) -#define GL_BUSY 0 #define GL_BIT_PENDING 0x01 #define GL_BIT_OWNED 0x02 -#define GL_BIT_MASK (GL_BIT_PENDING | GL_BIT_OWNED) /* * Acquire the global lock. If busy, set the pending bit. The caller @@ -584,11 +581,12 @@ acpi_acquire_global_lock(uint32_t *lock) do { old = *lock; - new = ((old & ~GL_BIT_MASK) | GL_BIT_OWNED) | - ((old >> 1) & GL_BIT_PENDING); + new = (old & ~GL_BIT_PENDING) | GL_BIT_OWNED; + if ((old & GL_BIT_OWNED) != 0) + new |= GL_BIT_PENDING; } while (atomic_cmpset_acq_int(lock, old, new) == 0); - return ((new < GL_BIT_MASK) ? GL_ACQUIRED : GL_BUSY); + return ((new & GL_BIT_PENDING) == 0); } /* @@ -603,8 +601,8 @@ acpi_release_global_lock(uint32_t *lock) do { old = *lock; - new = old & ~GL_BIT_MASK; + new = old & ~(GL_BIT_PENDING | GL_BIT_OWNED); } while (atomic_cmpset_rel_int(lock, old, new) == 0); - return (old & GL_BIT_PENDING); + return ((old & GL_BIT_PENDING) != 0); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:34:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 248A5106564A; Thu, 23 Feb 2012 22:34:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 133288FC0A; Thu, 23 Feb 2012 22:34:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NMYi6t029441; Thu, 23 Feb 2012 22:34:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NMYiuW029439; Thu, 23 Feb 2012 22:34:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232234.q1NMYiuW029439@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232088 - stable/9/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:34:45 -0000 Author: jkim Date: Thu Feb 23 22:34:44 2012 New Revision: 232088 URL: http://svn.freebsd.org/changeset/base/232088 Log: MFC: r231781 Some BIOSes are known for corrupting low 64KB between suspend and resume. Mask off the first 16 pages unless we appear to be running in a VM. This address may be overridden by 'hw.physmem.start' tunable from loader. Modified: stable/9/sys/amd64/amd64/machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/machdep.c Thu Feb 23 22:29:36 2012 (r232087) +++ stable/9/sys/amd64/amd64/machdep.c Thu Feb 23 22:34:44 2012 (r232088) @@ -1352,7 +1352,7 @@ getmemsize(caddr_t kmdp, u_int64_t first { int i, physmap_idx, pa_indx, da_indx; vm_paddr_t pa, physmap[PHYSMAP_SIZE]; - u_long physmem_tunable, memtest; + u_long physmem_start, physmem_tunable, memtest; pt_entry_t *pte; struct bios_smap *smapbase, *smap, *smapend; u_int32_t smapsize; @@ -1440,8 +1440,19 @@ getmemsize(caddr_t kmdp, u_int64_t first /* * Size up each available chunk of physical memory. + * + * XXX Some BIOSes corrupt low 64KB between suspend and resume. + * By default, mask off the first 16 pages unless we appear to be + * running in a VM. */ - physmap[0] = PAGE_SIZE; /* mask off page 0 */ + physmem_start = (vm_guest > VM_GUEST_NO ? 1 : 16) << PAGE_SHIFT; + TUNABLE_ULONG_FETCH("hw.physmem.start", &physmem_start); + if (physmem_start < PAGE_SIZE) + physmap[0] = PAGE_SIZE; + else if (physmem_start >= physmap[1]) + physmap[0] = round_page(physmap[1] - PAGE_SIZE); + else + physmap[0] = round_page(physmem_start); pa_indx = 0; da_indx = 1; phys_avail[pa_indx++] = physmap[0]; From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:43:12 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39B3D106566B; Thu, 23 Feb 2012 22:43:12 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id C999D8FC0C; Thu, 23 Feb 2012 22:43:11 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 951761DD415; Thu, 23 Feb 2012 23:43:10 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 6AF9228468; Thu, 23 Feb 2012 23:43:10 +0100 (CET) Date: Thu, 23 Feb 2012 23:43:10 +0100 From: Jilles Tjoelker To: davidxu@FreeBSD.org Message-ID: <20120223224310.GA10491@stack.nl> References: <201202220322.q1M3MoFE032330@svn.freebsd.org> <20120222234254.GC95122@stack.nl> <4F458355.8090405@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F458355.8090405@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r231989 - in head: lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:43:12 -0000 On Thu, Feb 23, 2012 at 08:07:49AM +0800, David Xu wrote: > On 2012/2/23 7:42, Jilles Tjoelker wrote: > > On Wed, Feb 22, 2012 at 03:22:50AM +0000, David Xu wrote: > >> Author: davidxu > >> Date: Wed Feb 22 03:22:49 2012 > >> New Revision: 231989 > >> URL: http://svn.freebsd.org/changeset/base/231989 > >> Log: > >> Use unused fourth argument of umtx_op to pass flags to kernel for operation > >> UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower > >> 16bits is used to pass flags. The change saves a clock_gettime() syscall > >> from libthr. > >> Modified: > >> head/lib/libthr/thread/thr_umtx.c > >> head/sys/kern/kern_umtx.c > >> head/sys/sys/umtx.h > >> > >> Modified: head/lib/libthr/thread/thr_umtx.c > >> ============================================================================== > >> --- head/lib/libthr/thread/thr_umtx.c Wed Feb 22 01:50:13 2012 (r231988) > >> +++ head/lib/libthr/thread/thr_umtx.c Wed Feb 22 03:22:49 2012 (r231989) > >> @@ -200,20 +200,10 @@ int > >> + abstime != NULL ? (void *)(uintptr_t)((clockid<< 16) | UMTX_WAIT_ABSTIME) : 0, > > Please check that this shift does not lose any information (i.e., > > clockid>= 0&& clockid<= 0xFFFF) before doing it. > > Implementing clock_getcpuclockid() will require clockids greater than > > 65535 because such clockids contain a process id. > In which document said the clock id includes a process id ? I think the > clock_getcpuclockid() > is a simplified version of getrusage(). clock_getcpuclockid() lets you find a clock ID for the CPU time clock of a process. Usage could be like this: int error; pid_t pid; clockid_t clk; struct timespec ts; error = clock_getcpuclockid(pid, &clk); if (error == 0) if (clock_gettime(clk, &ts) == 0) printf("%lu.%09lu\n", (unsigned long)ts.tv_sec, (unsigned long)ts.tv_usec); One way to implement it is to reserve a PID_MAX sized subrange of clockid_t for this purpose. Similarly, pthread_getcpuclockid() lets you find a clock ID for the CPU time clock of a thread. These seem mostly useful for clock_getres(), clock_gettime() and possibly timer_create(). Besides, sem_timedwait() doesn't even let you specify a clock ID. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 23:23:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id E9A19106566C; Thu, 23 Feb 2012 23:23:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-197-151.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 845B214E707; Thu, 23 Feb 2012 23:23:12 +0000 (UTC) Message-ID: <4F46CA60.6030409@FreeBSD.org> Date: Thu, 23 Feb 2012 15:23:12 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.2) Gecko/20120218 Thunderbird/10.0.2 MIME-Version: 1.0 To: Andrew Thompson References: <201202232156.q1NLurPU025054@svn.freebsd.org> In-Reply-To: <201202232156.q1NLurPU025054@svn.freebsd.org> X-Enigmail-Version: 1.3.5 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232080 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 23:23:13 -0000 First, I'm always glad to see devs updating the documentation, so please don't take this as in any way being critical, just trying to help. :) On 02/23/2012 13:56, Andrew Thompson wrote: > Modified: head/share/man/man4/lagg.4 > ============================================================================== > --- head/share/man/man4/lagg.4 Thu Feb 23 21:54:04 2012 (r232079) > +++ head/share/man/man4/lagg.4 Thu Feb 23 21:56:53 2012 (r232080) > @@ -142,10 +142,12 @@ and > modes will use the RSS hash from the network card if available to avoid > computing one, this may give poor traffic distribution if the hash is invalid > or uses less of the protocol header information. > -Local hash computation can be forced by setting the > +Local hash computation can be forced per interface by setting the This is a great example of why we use short lines in the man page sources. It allows people to come along later and add text without having to make changes to multiple lines. > .Va net.link.lagg.X.use_flowid > .Xr sysctl 8 > -variable to zero where X is the interface number. > +variable to zero where X is the interface number, the default for > +new interfaces is set via > +.Va net.link.lagg.default_use_flowid . If adding a comma there was the right change the new clause should still have started on the next line, for the reason described above. However, what you added is actually a sentence that can/should stand on its own. hth, Doug -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 23:24:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 217C31065672; Thu, 23 Feb 2012 23:24:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-197-151.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 22C1A14DA20; Thu, 23 Feb 2012 23:24:49 +0000 (UTC) Message-ID: <4F46CAC0.5030501@FreeBSD.org> Date: Thu, 23 Feb 2012 15:24:48 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.2) Gecko/20120218 Thunderbird/10.0.2 MIME-Version: 1.0 To: Jung-uk Kim References: <201202231916.q1NJG5Oj019386@svn.freebsd.org> In-Reply-To: <201202231916.q1NJG5Oj019386@svn.freebsd.org> X-Enigmail-Version: 1.3.5 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232065 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 23:24:50 -0000 According to the logs you didn't make any changes to this file in 2011, so that would be properly written as: 2009-2010, 2012 hth, Doug On 02/23/2012 11:16, Jung-uk Kim wrote: > Author: jkim > Date: Thu Feb 23 19:16:05 2012 > New Revision: 232065 > URL: http://svn.freebsd.org/changeset/base/232065 > > Log: > Update my copyright date. > > Modified: > head/sys/dev/fb/vesa.c > > Modified: head/sys/dev/fb/vesa.c > ============================================================================== > --- head/sys/dev/fb/vesa.c Thu Feb 23 19:13:19 2012 (r232064) > +++ head/sys/dev/fb/vesa.c Thu Feb 23 19:16:05 2012 (r232065) > @@ -1,6 +1,6 @@ > /*- > * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith > - * Copyright (c) 2009-2010 Jung-uk Kim > + * Copyright (c) 2009-2012 Jung-uk Kim > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 23:37:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F3A3106566C; Thu, 23 Feb 2012 23:37:30 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E64A8FC15; Thu, 23 Feb 2012 23:37:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NNbUSB031490; Thu, 23 Feb 2012 23:37:30 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NNbU17031488; Thu, 23 Feb 2012 23:37:30 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202232337.q1NNbU17031488@svn.freebsd.org> From: Andrew Thompson Date: Thu, 23 Feb 2012 23:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232089 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 23:37:30 -0000 Author: thompsa Date: Thu Feb 23 23:37:29 2012 New Revision: 232089 URL: http://svn.freebsd.org/changeset/base/232089 Log: Break the last part to its own sentence rather than a run-on. Suggested by: dougb Modified: head/share/man/man4/lagg.4 Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Thu Feb 23 22:34:44 2012 (r232088) +++ head/share/man/man4/lagg.4 Thu Feb 23 23:37:29 2012 (r232089) @@ -145,9 +145,10 @@ or uses less of the protocol header info Local hash computation can be forced per interface by setting the .Va net.link.lagg.X.use_flowid .Xr sysctl 8 -variable to zero where X is the interface number, the default for -new interfaces is set via -.Va net.link.lagg.default_use_flowid . +variable to zero where X is the interface number. +The default for new interfaces is set via the +.Va net.link.lagg.default_use_flowid +.Xr sysctl 8 . .Sh EXAMPLES Create a 802.3ad link aggregation using LACP with two .Xr bge 4 From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 00:02:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A82A9106564A; Fri, 24 Feb 2012 00:02:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95CAE8FC0C; Fri, 24 Feb 2012 00:02:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O02k1I032294; Fri, 24 Feb 2012 00:02:46 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O02k8w032291; Fri, 24 Feb 2012 00:02:46 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202240002.q1O02k8w032291@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 24 Feb 2012 00:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232090 - in head: share/man/man4 sys/dev/amdtemp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 00:02:46 -0000 Author: jkim Date: Fri Feb 24 00:02:46 2012 New Revision: 232090 URL: http://svn.freebsd.org/changeset/base/232090 Log: - Add support for Family 12h, 14h and 15h processors. - Remove all attempts to guess physical temperature using DiodeOffset. There are too many reports that it varies wildly depending on motherboard. Instead, if it is known to scale well and its offset is known from other temperature sensors on board, the user may set "dev.amdtemp.0.sensor_offset" tunable to compensate the difference. Document the caveats in amdtemp(4). - Add a quirk for Socket AM2 Revision G processors. These processors are known to have a different offset according to Linux k8temp driver. - Warn about Family 10h Erratum 319. These processors have broken sensors. - Report temperature in more logical orders under dev.amdtemp node. For example, "dev.amdtemp.0.sensor0.core0" is now "dev.amdtemp.0.core0.sensor0". - Replace K8, K10 and K11 with official processor names in amdtemp(4). Modified: head/share/man/man4/amdtemp.4 head/sys/dev/amdtemp/amdtemp.c Modified: head/share/man/man4/amdtemp.4 ============================================================================== --- head/share/man/man4/amdtemp.4 Thu Feb 23 23:37:29 2012 (r232089) +++ head/share/man/man4/amdtemp.4 Fri Feb 24 00:02:46 2012 (r232090) @@ -25,12 +25,14 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2008 +.Dd February 23, 2012 .Dt AMDTEMP 4 .Os .Sh NAME .Nm amdtemp -.Nd device driver for AMD K8, K10 and K11 on-die digital thermal sensor +.Nd device driver for +.Tn AMD +processor on-die digital thermal sensor .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your @@ -49,22 +51,38 @@ amdtemp_load="YES" The .Nm driver provides support for the on-die digital thermal sensor present -in AMD K8, K10 and K11 processors. +in +.Tn AMD +Family 0Fh, 10h, 11h, 12h, 14h, and 15h processors. .Pp -For the K8 family, the +For Family 0Fh processors, the .Nm -driver reports each core's temperature through a sysctl node in the -corresponding CPU devices's sysctl tree, named -.Va dev.amdtemp.%d.sensor{0,1}.core{0,1} . +driver reports each core's temperature through sysctl nodes, named +.Va dev.amdtemp.%d.core{0,1}.sensor{0,1} . The driver also creates .Va dev.cpu.%d.temperature -displaying the maximum temperature of the two sensors -located in each CPU core. +in the corresponding CPU device's sysctl tree, displaying the maximum +temperature of the two sensors located in each CPU core. .Pp -For the K10 and K11 families, the driver creates +For Family 10h, 11h, 12h, 14h, and 15h processors, the driver reports each +package's temperature through a sysctl node, named +.Va dev.amdtemp.%d.core0.sensor0 . +The driver also creates .Va dev.cpu.%d.temperature -with the temperature of each core. +in the corresponding CPU device's sysctl tree, displaying the temperature +of the shared sensor located in each CPU package. +.Sh SYSCTL VARIABLES +The following variable is available as both +.Xr sysctl 8 +variable and +.Xr loader 8 +tunable: +.Bl -tag -width indent +.It Va dev.amdtemp.%d.sensor_offset +.El +Add the given offset to the temperature of the sensor. Default is 0. .Sh SEE ALSO +.Xr loader 8 , .Xr sysctl 8 .Sh HISTORY The @@ -74,6 +92,19 @@ driver first appeared in .Sh AUTHORS .An Rui Paulo Aq rpaulo@FreeBSD.org .An Norikatsu Shigemura Aq nork@FreeBSD.org -.Sh BUGS -AMD K9 is not supported because temperature reporting has been replaced -by Maltese. +.An Jung-uk Kim Aq jkim@FreeBSD.org +.Sh CAVEATS +For Family 10h and later processors, +.Do +(the reported temperature) is a non-physical temperature measured on +an arbitrary scale and it does not represent an actual physical +temperature like die or case temperature. Instead, it specifies +the processor temperature relative to the point at which the system +must supply the maximum cooling for the processor's specified maximum +case temperature and maximum thermal power dissipation +.Dc +according to +.Rs +.%T BIOS and Kernel Developer's Guide (BKDG) for AMD Processors +.%U http://developer.amd.com/documentation/guides/Pages/default.aspx +.Re Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Thu Feb 23 23:37:29 2012 (r232089) +++ head/sys/dev/amdtemp/amdtemp.c Fri Feb 24 00:02:46 2012 (r232090) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2008, 2009 Rui Paulo * Copyright (c) 2009 Norikatsu Shigemura - * Copyright (c) 2009 Jung-uk Kim + * Copyright (c) 2009-2012 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ */ /* - * Driver for the AMD CPU on-die thermal sensors for Family 0Fh/10h/11h procs. + * Driver for the AMD CPU on-die thermal sensors. * Initially based on the k8temp Linux driver. */ @@ -47,12 +47,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include typedef enum { - SENSOR0_CORE0, - SENSOR0_CORE1, - SENSOR1_CORE0, - SENSOR1_CORE1, + CORE0_SENSOR0, + CORE0_SENSOR1, + CORE1_SENSOR0, + CORE1_SENSOR1, CORE0, CORE1 } amdsensor_t; @@ -62,11 +63,10 @@ struct amdtemp_softc { int sc_ncores; int sc_ntemps; int sc_flags; -#define AMDTEMP_FLAG_DO_QUIRK 0x01 /* DiodeOffset may be incorrect. */ -#define AMDTEMP_FLAG_DO_ZERO 0x02 /* DiodeOffset starts from 0C. */ -#define AMDTEMP_FLAG_DO_SIGN 0x04 /* DiodeOffsetSignBit is present. */ -#define AMDTEMP_FLAG_CS_SWAP 0x08 /* ThermSenseCoreSel is inverted. */ -#define AMDTEMP_FLAG_CT_10BIT 0x10 /* CurTmp is 10-bit wide. */ +#define AMDTEMP_FLAG_CS_SWAP 0x01 /* ThermSenseCoreSel is inverted. */ +#define AMDTEMP_FLAG_CT_10BIT 0x02 /* CurTmp is 10-bit wide. */ +#define AMDTEMP_FLAG_ALT_OFFSET 0x04 /* CurTmp starts at -28C. */ + int32_t sc_offset; int32_t (*sc_gettemp)(device_t, amdsensor_t); struct sysctl_oid *sc_sysctl_cpu[MAXCPU]; struct intr_config_hook sc_ich; @@ -76,6 +76,8 @@ struct amdtemp_softc { #define DEVICEID_AMD_MISC0F 0x1103 #define DEVICEID_AMD_MISC10 0x1203 #define DEVICEID_AMD_MISC11 0x1303 +#define DEVICEID_AMD_MISC14 0x1703 +#define DEVICEID_AMD_MISC15 0x1603 static struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -84,20 +86,28 @@ static struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_MISC0F }, { VENDORID_AMD, DEVICEID_AMD_MISC10 }, { VENDORID_AMD, DEVICEID_AMD_MISC11 }, + { VENDORID_AMD, DEVICEID_AMD_MISC14 }, + { VENDORID_AMD, DEVICEID_AMD_MISC15 }, { 0, 0 } }; /* - * Reported Temperature Control Register (Family 10h/11h only) + * Reported Temperature Control Register */ #define AMDTEMP_REPTMP_CTRL 0xa4 /* - * Thermaltrip Status Register + * Thermaltrip Status Register (Family 0Fh only) */ #define AMDTEMP_THERMTP_STAT 0xe4 -#define AMDTEMP_TTSR_SELCORE 0x04 /* Family 0Fh only */ -#define AMDTEMP_TTSR_SELSENSOR 0x40 /* Family 0Fh only */ +#define AMDTEMP_TTSR_SELCORE 0x04 +#define AMDTEMP_TTSR_SELSENSOR 0x40 + +/* + * DRAM Configuration High Register + */ +#define AMDTEMP_DRAM_CONF_HIGH 0x94 /* Function 2 */ +#define AMDTEMP_DRAM_MODE_DDR3 0x0100 /* * CPU Family/Model Register @@ -189,6 +199,9 @@ amdtemp_probe(device_t dev) break; case 0x10: case 0x11: + case 0x12: + case 0x14: + case 0x15: break; default: return (ENXIO); @@ -201,26 +214,23 @@ amdtemp_probe(device_t dev) static int amdtemp_attach(device_t dev) { + char tn[32]; + u_int regs[4]; struct amdtemp_softc *sc = device_get_softc(dev); struct sysctl_ctx_list *sysctlctx; struct sysctl_oid *sysctlnode; - uint32_t regs[4]; uint32_t cpuid, family, model; + u_int bid; + int erratum319, unit; - /* - * Errata #154: Incorect Diode Offset - */ - if (cpu_id == 0x20f32) { - do_cpuid(0x80000001, regs); - if ((regs[1] & 0xfff) == 0x2c) - sc->sc_flags |= AMDTEMP_FLAG_DO_QUIRK; - } + erratum319 = 0; /* * CPUID Register is available from Revision F. */ - family = CPUID_TO_FAMILY(cpu_id); - model = CPUID_TO_MODEL(cpu_id); + cpuid = cpu_id; + family = CPUID_TO_FAMILY(cpuid); + model = CPUID_TO_MODEL(cpuid); if (family != 0x0f || model >= 0x40) { cpuid = pci_read_config(dev, AMDTEMP_CPUID, 4); family = CPUID_TO_FAMILY(cpuid); @@ -232,11 +242,6 @@ amdtemp_attach(device_t dev) /* * Thermaltrip Status Register * - * - DiodeOffsetSignBit - * - * Revision D & E: bit 24 - * Other: N/A - * * - ThermSenseCoreSel * * Revision F & G: 0 - Core1, 1 - Core0 @@ -254,15 +259,37 @@ amdtemp_attach(device_t dev) * ThermSenseCoreSel work in undocumented cases as well. * In fact, the Linux driver suggests it may not work but * we just assume it does until we find otherwise. + * + * XXX According to Linux, CurTmp starts at -28C on + * Socket AM2 Revision G processors, which is not + * documented anywhere. */ - if (model < 0x40) { - sc->sc_flags |= AMDTEMP_FLAG_DO_ZERO; - if (model >= 0x10) - sc->sc_flags |= AMDTEMP_FLAG_DO_SIGN; - } else { + if (model >= 0x40) sc->sc_flags |= AMDTEMP_FLAG_CS_SWAP; - if (model >= 0x60 && model != 0xc1) - sc->sc_flags |= AMDTEMP_FLAG_CT_10BIT; + if (model >= 0x60 && model != 0xc1) { + do_cpuid(0x80000001, regs); + bid = (regs[1] >> 9) & 0x1f; + switch (model) { + case 0x68: /* Socket S1g1 */ + case 0x6c: + case 0x7c: + break; + case 0x6b: /* Socket AM2 and ASB1 (2 cores) */ + if (bid != 0x0b && bid != 0x0c) + sc->sc_flags |= + AMDTEMP_FLAG_ALT_OFFSET; + break; + case 0x6f: /* Socket AM2 and ASB1 (1 core) */ + case 0x7f: + if (bid != 0x07 && bid != 0x09 && + bid != 0x0c) + sc->sc_flags |= + AMDTEMP_FLAG_ALT_OFFSET; + break; + default: + sc->sc_flags |= AMDTEMP_FLAG_ALT_OFFSET; + } + sc->sc_flags |= AMDTEMP_FLAG_CT_10BIT; } /* @@ -273,7 +300,31 @@ amdtemp_attach(device_t dev) sc->sc_gettemp = amdtemp_gettemp0f; break; case 0x10: + /* + * Erratum 319 Inaccurate Temperature Measurement + * + * http://support.amd.com/us/Processor_TechDocs/41322.pdf + */ + do_cpuid(0x80000001, regs); + switch ((regs[1] >> 28) & 0xf) { + case 0: /* Socket F */ + erratum319 = 1; + break; + case 1: /* Socket AM2+ or AM3 */ + if ((pci_cfgregread(pci_get_bus(dev), + pci_get_slot(dev), 2, AMDTEMP_DRAM_CONF_HIGH, 2) & + AMDTEMP_DRAM_MODE_DDR3) != 0 || model > 0x04 || + (model == 0x04 && (cpuid & CPUID_STEPPING) >= 3)) + break; + /* XXX 00100F42h (RB-C2) exists in both formats. */ + erratum319 = 1; + break; + } + /* FALLTHROUGH */ case 0x11: + case 0x12: + case 0x14: + case 0x15: /* * There is only one sensor per package. */ @@ -289,6 +340,9 @@ amdtemp_attach(device_t dev) if (sc->sc_ncores > MAXCPU) return (ENXIO); + if (erratum319) + device_printf(dev, + "Erratum 319: temperature measurement may be inaccurate\n"); if (bootverbose) device_printf(dev, "Found %d cores and %d sensors.\n", sc->sc_ncores, @@ -297,41 +351,49 @@ amdtemp_attach(device_t dev) /* * dev.amdtemp.N tree. */ + unit = device_get_unit(dev); + snprintf(tn, sizeof(tn), "dev.amdtemp.%d.sensor_offset", unit); + TUNABLE_INT_FETCH(tn, &sc->sc_offset); + sysctlctx = device_get_sysctl_ctx(dev); + SYSCTL_ADD_INT(sysctlctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "sensor_offset", CTLFLAG_RW, &sc->sc_offset, 0, + "Temperature sensor offset"); sysctlnode = SYSCTL_ADD_NODE(sysctlctx, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "sensor0", CTLFLAG_RD, 0, "Sensor 0"); + "core0", CTLFLAG_RD, 0, "Core 0"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sysctlnode), - OID_AUTO, "core0", CTLTYPE_INT | CTLFLAG_RD, - dev, SENSOR0_CORE0, amdtemp_sysctl, "IK", - "Sensor 0 / Core 0 temperature"); + OID_AUTO, "sensor0", CTLTYPE_INT | CTLFLAG_RD, + dev, CORE0_SENSOR0, amdtemp_sysctl, "IK", + "Core 0 / Sensor 0 temperature"); if (sc->sc_ntemps > 1) { - if (sc->sc_ncores > 1) - SYSCTL_ADD_PROC(sysctlctx, - SYSCTL_CHILDREN(sysctlnode), - OID_AUTO, "core1", CTLTYPE_INT | CTLFLAG_RD, - dev, SENSOR0_CORE1, amdtemp_sysctl, "IK", - "Sensor 0 / Core 1 temperature"); - - sysctlnode = SYSCTL_ADD_NODE(sysctlctx, - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "sensor1", CTLFLAG_RD, 0, "Sensor 1"); - SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sysctlnode), - OID_AUTO, "core0", CTLTYPE_INT | CTLFLAG_RD, - dev, SENSOR1_CORE0, amdtemp_sysctl, "IK", - "Sensor 1 / Core 0 temperature"); + OID_AUTO, "sensor1", CTLTYPE_INT | CTLFLAG_RD, + dev, CORE0_SENSOR1, amdtemp_sysctl, "IK", + "Core 0 / Sensor 1 temperature"); + + if (sc->sc_ncores > 1) { + sysctlnode = SYSCTL_ADD_NODE(sysctlctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "core1", CTLFLAG_RD, 0, "Core 1"); - if (sc->sc_ncores > 1) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sysctlnode), - OID_AUTO, "core1", CTLTYPE_INT | CTLFLAG_RD, - dev, SENSOR1_CORE1, amdtemp_sysctl, "IK", - "Sensor 1 / Core 1 temperature"); + OID_AUTO, "sensor0", CTLTYPE_INT | CTLFLAG_RD, + dev, CORE1_SENSOR0, amdtemp_sysctl, "IK", + "Core 1 / Sensor 0 temperature"); + + SYSCTL_ADD_PROC(sysctlctx, + SYSCTL_CHILDREN(sysctlnode), + OID_AUTO, "sensor1", CTLTYPE_INT | CTLFLAG_RD, + dev, CORE1_SENSOR1, amdtemp_sysctl, "IK", + "Core 1 / Sensor 1 temperature"); + } } /* @@ -377,7 +439,7 @@ amdtemp_intrhook(void *arg) sysctlctx = device_get_sysctl_ctx(cpu); sensor = sc->sc_ntemps > 1 ? - (i == 0 ? CORE0 : CORE1) : SENSOR0_CORE0; + (i == 0 ? CORE0 : CORE1) : CORE0_SENSOR0; sc->sc_sysctl_cpu[i] = SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(device_get_sysctl_tree(cpu)), OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, @@ -415,13 +477,13 @@ amdtemp_sysctl(SYSCTL_HANDLER_ARGS) switch (sensor) { case CORE0: - auxtemp[0] = sc->sc_gettemp(dev, SENSOR0_CORE0); - auxtemp[1] = sc->sc_gettemp(dev, SENSOR1_CORE0); + auxtemp[0] = sc->sc_gettemp(dev, CORE0_SENSOR0); + auxtemp[1] = sc->sc_gettemp(dev, CORE0_SENSOR1); temp = imax(auxtemp[0], auxtemp[1]); break; case CORE1: - auxtemp[0] = sc->sc_gettemp(dev, SENSOR0_CORE1); - auxtemp[1] = sc->sc_gettemp(dev, SENSOR1_CORE1); + auxtemp[0] = sc->sc_gettemp(dev, CORE1_SENSOR0); + auxtemp[1] = sc->sc_gettemp(dev, CORE1_SENSOR1); temp = imax(auxtemp[0], auxtemp[1]); break; default: @@ -439,53 +501,36 @@ static int32_t amdtemp_gettemp0f(device_t dev, amdsensor_t sensor) { struct amdtemp_softc *sc = device_get_softc(dev); - uint32_t mask, temp; - int32_t diode_offset, offset; - uint8_t cfg, sel; + uint32_t mask, offset, temp; /* Set Sensor/Core selector. */ - sel = 0; + temp = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 1); + temp &= ~(AMDTEMP_TTSR_SELCORE | AMDTEMP_TTSR_SELSENSOR); switch (sensor) { - case SENSOR1_CORE0: - sel |= AMDTEMP_TTSR_SELSENSOR; + case CORE0_SENSOR1: + temp |= AMDTEMP_TTSR_SELSENSOR; /* FALLTHROUGH */ - case SENSOR0_CORE0: + case CORE0_SENSOR0: case CORE0: if ((sc->sc_flags & AMDTEMP_FLAG_CS_SWAP) != 0) - sel |= AMDTEMP_TTSR_SELCORE; + temp |= AMDTEMP_TTSR_SELCORE; break; - case SENSOR1_CORE1: - sel |= AMDTEMP_TTSR_SELSENSOR; + case CORE1_SENSOR1: + temp |= AMDTEMP_TTSR_SELSENSOR; /* FALLTHROUGH */ - case SENSOR0_CORE1: + case CORE1_SENSOR0: case CORE1: if ((sc->sc_flags & AMDTEMP_FLAG_CS_SWAP) == 0) - sel |= AMDTEMP_TTSR_SELCORE; + temp |= AMDTEMP_TTSR_SELCORE; break; } - cfg = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 1); - cfg &= ~(AMDTEMP_TTSR_SELSENSOR | AMDTEMP_TTSR_SELCORE); - pci_write_config(dev, AMDTEMP_THERMTP_STAT, cfg | sel, 1); - - /* CurTmp starts from -49C. */ - offset = AMDTEMP_ZERO_C_TO_K - 490; - - /* Adjust offset if DiodeOffset is set and valid. */ - temp = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 4); - diode_offset = (temp >> 8) & 0x3f; - if ((sc->sc_flags & AMDTEMP_FLAG_DO_ZERO) != 0) { - if ((sc->sc_flags & AMDTEMP_FLAG_DO_SIGN) != 0 && - ((temp >> 24) & 0x1) != 0) - diode_offset *= -1; - if ((sc->sc_flags & AMDTEMP_FLAG_DO_QUIRK) != 0 && - ((temp >> 25) & 0xf) <= 2) - diode_offset += 10; - offset += diode_offset * 10; - } else if (diode_offset != 0) - offset += (diode_offset - 11) * 10; + pci_write_config(dev, AMDTEMP_THERMTP_STAT, temp, 1); mask = (sc->sc_flags & AMDTEMP_FLAG_CT_10BIT) != 0 ? 0x3ff : 0x3fc; - temp = ((temp >> 14) & mask) * 5 / 2 + offset; + offset = (sc->sc_flags & AMDTEMP_FLAG_ALT_OFFSET) != 0 ? 28 : 49; + temp = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 4); + temp = ((temp >> 14) & mask) * 5 / 2; + temp += AMDTEMP_ZERO_C_TO_K + (sc->sc_offset - offset) * 10; return (temp); } @@ -493,20 +538,12 @@ amdtemp_gettemp0f(device_t dev, amdsenso static int32_t amdtemp_gettemp(device_t dev, amdsensor_t sensor) { + struct amdtemp_softc *sc = device_get_softc(dev); uint32_t temp; - int32_t diode_offset, offset; - - /* CurTmp starts from 0C. */ - offset = AMDTEMP_ZERO_C_TO_K; - - /* Adjust offset if DiodeOffset is set and valid. */ - temp = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 4); - diode_offset = (temp >> 8) & 0x7f; - if (diode_offset > 0 && diode_offset < 0x40) - offset += (diode_offset - 11) * 10; temp = pci_read_config(dev, AMDTEMP_REPTMP_CTRL, 4); - temp = ((temp >> 21) & 0x7ff) * 5 / 4 + offset; + temp = ((temp >> 21) & 0x7ff) * 5 / 4; + temp += AMDTEMP_ZERO_C_TO_K + sc->sc_offset * 10; return (temp); } From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 00:07:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93B41106564A for ; Fri, 24 Feb 2012 00:07:04 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6AF8FC1A for ; Fri, 24 Feb 2012 00:07:04 +0000 (UTC) Received: by pbcxa7 with SMTP id xa7so2174811pbc.13 for ; Thu, 23 Feb 2012 16:07:04 -0800 (PST) Received-SPF: pass (google.com: domain of andy@fud.org.nz designates 10.68.73.97 as permitted sender) client-ip=10.68.73.97; Authentication-Results: mr.google.com; spf=pass (google.com: domain of andy@fud.org.nz designates 10.68.73.97 as permitted sender) smtp.mail=andy@fud.org.nz Received: from mr.google.com ([10.68.73.97]) by 10.68.73.97 with SMTP id k1mr772568pbv.61.1330042024196 (num_hops = 1); Thu, 23 Feb 2012 16:07:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.73.97 with SMTP id k1mr440557pbv.61.1330040324513; Thu, 23 Feb 2012 15:38:44 -0800 (PST) Sender: andy@fud.org.nz Received: by 10.68.2.229 with HTTP; Thu, 23 Feb 2012 15:38:44 -0800 (PST) In-Reply-To: <4F46CA60.6030409@FreeBSD.org> References: <201202232156.q1NLurPU025054@svn.freebsd.org> <4F46CA60.6030409@FreeBSD.org> Date: Fri, 24 Feb 2012 12:38:44 +1300 X-Google-Sender-Auth: TJEFVLDLwu0lJn1D2rQ5ZhWuYro Message-ID: From: Andrew Thompson To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlZRbFkny1cBuoesmdK6HN0QDczmkEU0gBmm4dDO/CVtfTq1db2DtvYb5yYY4HDK6dXVDnO Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232080 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 00:07:04 -0000 On 24 February 2012 12:23, Doug Barton wrote: > First, I'm always glad to see devs updating the documentation, so please > don't take this as in any way being critical, just trying to help. :) n/p, I like feedback. > On 02/23/2012 13:56, Andrew Thompson wrote: >> Modified: head/share/man/man4/lagg.4 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/share/man/man4/lagg.4 =A0 =A0 =A0 =A0Thu Feb 23 21:54:04 2012 = =A0 =A0 =A0 =A0(r232079) >> +++ head/share/man/man4/lagg.4 =A0 =A0 =A0 =A0Thu Feb 23 21:56:53 2012 = =A0 =A0 =A0 =A0(r232080) >> @@ -142,10 +142,12 @@ and >> =A0modes will use the RSS hash from the network card if available to avo= id >> =A0computing one, this may give poor traffic distribution if the hash is= invalid >> =A0or uses less of the protocol header information. >> -Local hash computation can be forced by setting the >> +Local hash computation can be forced per interface by setting the > > This is a great example of why we use short lines in the man page > sources. It allows people to come along later and add text without > having to make changes to multiple lines. I can see your point here. >> =A0.Va net.link.lagg.X.use_flowid >> =A0.Xr sysctl 8 >> -variable to zero where X is the interface number. >> +variable to zero where X is the interface number, the default for >> +new interfaces is set via >> +.Va net.link.lagg.default_use_flowid . > > If adding a comma there was the right change the new clause should still > have started on the next line, for the reason described above. However, > what you added is actually a sentence that can/should stand on its own. Fixed. Andrew From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 00:09:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id C3BCC1065670; Fri, 24 Feb 2012 00:09:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-197-151.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 36219176188; Fri, 24 Feb 2012 00:09:09 +0000 (UTC) Message-ID: <4F46D524.5000209@FreeBSD.org> Date: Thu, 23 Feb 2012 16:09:08 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.2) Gecko/20120218 Thunderbird/10.0.2 MIME-Version: 1.0 To: Andrew Thompson References: <201202232156.q1NLurPU025054@svn.freebsd.org> <4F46CA60.6030409@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.3.5 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232080 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 00:09:44 -0000 On 02/23/2012 15:38, Andrew Thompson wrote: > Fixed. Thanks for the quick response. :) -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 00:17:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 52BE510656A9; Fri, 24 Feb 2012 00:17:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Doug Barton Date: Thu, 23 Feb 2012 19:17:18 -0500 User-Agent: KMail/1.6.2 References: <201202231916.q1NJG5Oj019386@svn.freebsd.org> <4F46CAC0.5030501@FreeBSD.org> In-Reply-To: <4F46CAC0.5030501@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201202231917.32499.jkim@FreeBSD.org> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r232065 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 00:17:38 -0000 On Thursday 23 February 2012 06:24 pm, Doug Barton wrote: > According to the logs you didn't make any changes to this file in > 2011, so that would be properly written as: 2009-2010, 2012 I made few local changes in 2011 but forgot to commit. ;-) Besides, I remember there were some discussions in developers@ that "2009-2012" is more appropriate than "2009, 2010, 2012" or "2009-2010, 2012", if my memory serves. Anyone? Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 00:24:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 10557106567A; Fri, 24 Feb 2012 00:24:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-197-151.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id EEBD81A65C1; Fri, 24 Feb 2012 00:24:36 +0000 (UTC) Message-ID: <4F46D8C4.2030401@FreeBSD.org> Date: Thu, 23 Feb 2012 16:24:36 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.2) Gecko/20120218 Thunderbird/10.0.2 MIME-Version: 1.0 To: Jung-uk Kim References: <201202231916.q1NJG5Oj019386@svn.freebsd.org> <4F46CAC0.5030501@FreeBSD.org> <201202231917.32499.jkim@FreeBSD.org> In-Reply-To: <201202231917.32499.jkim@FreeBSD.org> X-Enigmail-Version: 1.3.5 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r232065 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 00:24:46 -0000 On 02/23/2012 16:17, Jung-uk Kim wrote: > I remember there were some discussions in developers@ that > "2009-2012" is more appropriate than "2009, 2010, 2012" or > "2009-2010, 2012", if my memory serves. Anyone? "2009, 2010, 2012" is as synonym for "2009-2010, 2012" and I see it both ways. That's not the issue. (However, if it were 2008-2010 that is generally preferred vs. listing all 3 years individually.) The issue is that it's a basic tenet of copyright law that you cannot claim copyright in a year that you didn't actually make any changes. This makes sense if you think about it ... your rights from the last year you changed something don't expire at the end of that year, and if you didn't make changes in 2011 you don't have any new material that needs protection. For instance: Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. Doug -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 00:42:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4B01106566B; Fri, 24 Feb 2012 00:42:50 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B41128FC14; Fri, 24 Feb 2012 00:42:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O0gotD033538; Fri, 24 Feb 2012 00:42:50 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O0goLX033536; Fri, 24 Feb 2012 00:42:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202240042.q1O0goLX033536@svn.freebsd.org> From: Marius Strobl Date: Fri, 24 Feb 2012 00:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232091 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 00:42:50 -0000 Author: marius Date: Fri Feb 24 00:42:50 2012 New Revision: 232091 URL: http://svn.freebsd.org/changeset/base/232091 Log: Forced commit to denote that the commit message of r231621 should have read: - As it turns out, MSI-X is broken for at least LSI SAS1068E when passed through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here. Note that besides currently there not being a quirk type that disables MSI-X only and there's no evidence that MSI doesn't work with the VMware pass-through, it's really questionable whether MSI generally works in that setup as VMware only mention three know working devices [1, p. 4]. Also not that this quirk entry currently doesn't affect the devices emulated by VMware in any way as these don't claim support MSI/MSI-X to begin with. [2] While at it, make the PCI quirk table const and static. - Remove some duplicated empty lines. - Use DEVMETHOD_END. PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2] Reviewed by: jhb MFC after: 3 days [1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 00:47:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7429106564A; Fri, 24 Feb 2012 00:47:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACC178FC17; Fri, 24 Feb 2012 00:47:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O0lEuW033798; Fri, 24 Feb 2012 00:47:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O0lEq2033796; Fri, 24 Feb 2012 00:47:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202240047.q1O0lEq2033796@svn.freebsd.org> From: Marius Strobl Date: Fri, 24 Feb 2012 00:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232092 - stable/9/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 00:47:14 -0000 Author: marius Date: Fri Feb 24 00:47:14 2012 New Revision: 232092 URL: http://svn.freebsd.org/changeset/base/232092 Log: MFC: r231621 - As it turns out, MSI-X is broken for at least LSI SAS1068E when passed through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here. Note that besides currently there not being a quirk type that disables MSI-X only and there's no evidence that MSI doesn't work with the VMware pass-through, it's really questionable whether MSI generally works in that setup as VMware only mention three know working devices [1, p. 4]. Also not that this quirk entry currently doesn't affect the devices emulated by VMware in any way as these don't claim support MSI/MSI-X to begin with. [2] While at it, make the PCI quirk table const and static. - Remove some duplicated empty lines. - Use DEVMETHOD_END. PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2] Reviewed by: jhb [1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf Modified: stable/9/sys/dev/pci/pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/pci/pci.c ============================================================================== --- stable/9/sys/dev/pci/pci.c Fri Feb 24 00:42:50 2012 (r232091) +++ stable/9/sys/dev/pci/pci.c Fri Feb 24 00:47:14 2012 (r232092) @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #define PCIR_IS_BIOS(cfg, reg) \ (((cfg)->hdrtype == PCIM_HDRTYPE_NORMAL && reg == PCIR_BIOS) || \ ((cfg)->hdrtype == PCIM_HDRTYPE_BRIDGE && reg == PCIR_BIOS_1)) - static pci_addr_t pci_mapbase(uint64_t mapreg); static const char *pci_maptype(uint64_t mapreg); @@ -171,7 +170,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_msi_count, pci_msi_count_method), DEVMETHOD(pci_msix_count, pci_msix_count_method), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(pci, pci_driver, pci_methods, 0); @@ -183,7 +182,6 @@ MODULE_VERSION(pci, 1); static char *pci_vendordata; static size_t pci_vendordata_size; - struct pci_quirk { uint32_t devid; /* Vendor/device of the card */ int type; @@ -194,7 +192,7 @@ struct pci_quirk { int arg2; }; -struct pci_quirk pci_quirks[] = { +static const struct pci_quirk const pci_quirks[] = { /* The Intel 82371AB and 82443MX has a map register at offset 0x90. */ { 0x71138086, PCI_QUIRK_MAP_REG, 0x90, 0 }, { 0x719b8086, PCI_QUIRK_MAP_REG, 0x90, 0 }, @@ -227,6 +225,12 @@ struct pci_quirk pci_quirks[] = { { 0x74501022, PCI_QUIRK_DISABLE_MSI, 0, 0 }, /* + * MSI-X doesn't work with at least LSI SAS1068E passed through by + * VMware. + */ + { 0x079015ad, PCI_QUIRK_DISABLE_MSI, 0, 0 }, + + /* * Some virtualization environments emulate an older chipset * but support MSI just fine. QEMU uses the Intel 82440. */ @@ -724,7 +728,6 @@ pci_read_cap(device_t pcib, pcicfgregs * } } - #if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) /* * Enable the MSI mapping window for all HyperTransport @@ -1873,7 +1876,7 @@ pci_remap_intr_method(device_t bus, devi int pci_msi_device_blacklisted(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; if (!pci_honor_msi_blacklist) return (0); @@ -1893,7 +1896,7 @@ pci_msi_device_blacklisted(device_t dev) static int pci_msi_vm_chipset(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; for (q = &pci_quirks[0]; q->devid; q++) { if (q->devid == pci_get_devid(dev) && @@ -3023,7 +3026,7 @@ pci_add_resources(device_t bus, device_t struct pci_devinfo *dinfo = device_get_ivars(dev); pcicfgregs *cfg = &dinfo->cfg; struct resource_list *rl = &dinfo->resources; - struct pci_quirk *q; + const struct pci_quirk *q; int i; /* ATA devices needs special map treatment */ @@ -3864,7 +3867,6 @@ pci_write_ivar(device_t dev, device_t ch } } - #include "opt_ddb.h" #ifdef DDB #include @@ -4021,7 +4023,6 @@ out:; return (res); } - struct resource * pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 00:48:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 312D9106566B; Fri, 24 Feb 2012 00:48:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F41ED8FC0A; Fri, 24 Feb 2012 00:48:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O0mRFL033888; Fri, 24 Feb 2012 00:48:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O0mRqI033886; Fri, 24 Feb 2012 00:48:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202240048.q1O0mRqI033886@svn.freebsd.org> From: Marius Strobl Date: Fri, 24 Feb 2012 00:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232093 - stable/8/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 00:48:28 -0000 Author: marius Date: Fri Feb 24 00:48:27 2012 New Revision: 232093 URL: http://svn.freebsd.org/changeset/base/232093 Log: MFC: r231621 - As it turns out, MSI-X is broken for at least LSI SAS1068E when passed through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here. Note that besides currently there not being a quirk type that disables MSI-X only and there's no evidence that MSI doesn't work with the VMware pass-through, it's really questionable whether MSI generally works in that setup as VMware only mention three know working devices [1, p. 4]. Also not that this quirk entry currently doesn't affect the devices emulated by VMware in any way as these don't claim support MSI/MSI-X to begin with. [2] While at it, make the PCI quirk table const and static. - Remove some duplicated empty lines. - Use DEVMETHOD_END. PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2] Reviewed by: jhb Approved by: re (kib) [1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf Modified: stable/8/sys/dev/pci/pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/pci/pci.c ============================================================================== --- stable/8/sys/dev/pci/pci.c Fri Feb 24 00:47:14 2012 (r232092) +++ stable/8/sys/dev/pci/pci.c Fri Feb 24 00:48:27 2012 (r232093) @@ -170,7 +170,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_msi_count, pci_msi_count_method), DEVMETHOD(pci_msix_count, pci_msix_count_method), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(pci, pci_driver, pci_methods, 0); @@ -182,7 +182,6 @@ MODULE_VERSION(pci, 1); static char *pci_vendordata; static size_t pci_vendordata_size; - struct pci_quirk { uint32_t devid; /* Vendor/device of the card */ int type; @@ -193,7 +192,7 @@ struct pci_quirk { int arg2; }; -struct pci_quirk pci_quirks[] = { +static const struct pci_quirk const pci_quirks[] = { /* The Intel 82371AB and 82443MX has a map register at offset 0x90. */ { 0x71138086, PCI_QUIRK_MAP_REG, 0x90, 0 }, { 0x719b8086, PCI_QUIRK_MAP_REG, 0x90, 0 }, @@ -226,6 +225,12 @@ struct pci_quirk pci_quirks[] = { { 0x74501022, PCI_QUIRK_DISABLE_MSI, 0, 0 }, /* + * MSI-X doesn't work with at least LSI SAS1068E passed through by + * VMware. + */ + { 0x079015ad, PCI_QUIRK_DISABLE_MSI, 0, 0 }, + + /* * Some virtualization environments emulate an older chipset * but support MSI just fine. QEMU uses the Intel 82440. */ @@ -1813,7 +1818,7 @@ pci_remap_intr_method(device_t bus, devi int pci_msi_device_blacklisted(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; if (!pci_honor_msi_blacklist) return (0); @@ -1833,7 +1838,7 @@ pci_msi_device_blacklisted(device_t dev) static int pci_msi_vm_chipset(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; for (q = &pci_quirks[0]; q->devid; q++) { if (q->devid == pci_get_devid(dev) && @@ -2788,7 +2793,7 @@ pci_add_resources(device_t bus, device_t struct pci_devinfo *dinfo = device_get_ivars(dev); pcicfgregs *cfg = &dinfo->cfg; struct resource_list *rl = &dinfo->resources; - struct pci_quirk *q; + const struct pci_quirk *q; int i; /* ATA devices needs special map treatment */ @@ -3593,7 +3598,6 @@ pci_write_ivar(device_t dev, device_t ch } } - #include "opt_ddb.h" #ifdef DDB #include @@ -3734,7 +3738,6 @@ out:; return (res); } - struct resource * pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 00:49:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B598106566C; Fri, 24 Feb 2012 00:49:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 798B18FC15; Fri, 24 Feb 2012 00:49:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O0nJkV033959; Fri, 24 Feb 2012 00:49:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O0nJdw033957; Fri, 24 Feb 2012 00:49:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202240049.q1O0nJdw033957@svn.freebsd.org> From: Marius Strobl Date: Fri, 24 Feb 2012 00:49:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232094 - stable/7/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 00:49:19 -0000 Author: marius Date: Fri Feb 24 00:49:18 2012 New Revision: 232094 URL: http://svn.freebsd.org/changeset/base/232094 Log: MFC: r231621 - As it turns out, MSI-X is broken for at least LSI SAS1068E when passed through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here. Note that besides currently there not being a quirk type that disables MSI-X only and there's no evidence that MSI doesn't work with the VMware pass-through, it's really questionable whether MSI generally works in that setup as VMware only mention three know working devices [1, p. 4]. Also not that this quirk entry currently doesn't affect the devices emulated by VMware in any way as these don't claim support MSI/MSI-X to begin with. [2] While at it, make the PCI quirk table const and static. - Remove some duplicated empty lines. - Use DEVMETHOD_END. PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2] Reviewed by: jhb [1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf Modified: stable/7/sys/dev/pci/pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/pci/pci.c ============================================================================== --- stable/7/sys/dev/pci/pci.c Fri Feb 24 00:48:27 2012 (r232093) +++ stable/7/sys/dev/pci/pci.c Fri Feb 24 00:49:18 2012 (r232094) @@ -160,7 +160,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_msi_count, pci_msi_count_method), DEVMETHOD(pci_msix_count, pci_msix_count_method), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(pci, pci_driver, pci_methods, 0); @@ -172,7 +172,6 @@ MODULE_VERSION(pci, 1); static char *pci_vendordata; static size_t pci_vendordata_size; - struct pci_quirk { uint32_t devid; /* Vendor/device of the card */ int type; @@ -183,7 +182,7 @@ struct pci_quirk { int arg2; }; -struct pci_quirk pci_quirks[] = { +static const struct pci_quirk const pci_quirks[] = { /* The Intel 82371AB and 82443MX has a map register at offset 0x90. */ { 0x71138086, PCI_QUIRK_MAP_REG, 0x90, 0 }, { 0x719b8086, PCI_QUIRK_MAP_REG, 0x90, 0 }, @@ -216,6 +215,12 @@ struct pci_quirk pci_quirks[] = { { 0x74501022, PCI_QUIRK_DISABLE_MSI, 0, 0 }, /* + * MSI-X doesn't work with at least LSI SAS1068E passed through by + * VMware. + */ + { 0x079015ad, PCI_QUIRK_DISABLE_MSI, 0, 0 }, + + /* * Some virtualization environments emulate an older chipset * but support MSI just fine. QEMU uses the Intel 82440. */ @@ -1767,7 +1772,7 @@ pci_remap_msi_irq(device_t dev, u_int ir int pci_msi_device_blacklisted(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; if (!pci_honor_msi_blacklist) return (0); @@ -1787,7 +1792,7 @@ pci_msi_device_blacklisted(device_t dev) static int pci_msi_vm_chipset(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; for (q = &pci_quirks[0]; q->devid; q++) { if (q->devid == pci_get_devid(dev) && @@ -2627,7 +2632,7 @@ pci_add_resources(device_t bus, device_t struct pci_devinfo *dinfo = device_get_ivars(dev); pcicfgregs *cfg = &dinfo->cfg; struct resource_list *rl = &dinfo->resources; - struct pci_quirk *q; + const struct pci_quirk *q; int i; /* ATA devices needs special map treatment */ @@ -3423,7 +3428,6 @@ pci_write_ivar(device_t dev, device_t ch } } - #include "opt_ddb.h" #ifdef DDB #include @@ -3564,7 +3568,6 @@ out:; return (res); } - struct resource * pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 01:03:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 3B93A1065675; Fri, 24 Feb 2012 01:03:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Doug Barton Date: Thu, 23 Feb 2012 20:03:10 -0500 User-Agent: KMail/1.6.2 References: <201202231916.q1NJG5Oj019386@svn.freebsd.org> <201202231917.32499.jkim@FreeBSD.org> <4F46D8C4.2030401@FreeBSD.org> In-Reply-To: <4F46D8C4.2030401@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201202232003.13676.jkim@FreeBSD.org> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r232065 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 01:03:19 -0000 On Thursday 23 February 2012 07:24 pm, Doug Barton wrote: > On 02/23/2012 16:17, Jung-uk Kim wrote: > > I remember there were some discussions in developers@ that > > "2009-2012" is more appropriate than "2009, 2010, 2012" or > > "2009-2010, 2012", if my memory serves. Anyone? > > "2009, 2010, 2012" is as synonym for "2009-2010, 2012" and I see it > both ways. That's not the issue. (However, if it were 2008-2010 > that is generally preferred vs. listing all 3 years individually.) > > The issue is that it's a basic tenet of copyright law that you > cannot claim copyright in a year that you didn't actually make any > changes. This makes sense if you think about it ... your rights > from the last year you changed something don't expire at the end of > that year, and if you didn't make changes in 2011 you don't have > any new material that needs protection. I am not a lawyer but I do know the date is optional, at least in the US. I just googled a bit. Some people say "first-last" form is fine. Some say otherwise. Also, it seems it depends on where they live. Is there any authoritative answer from the Foundation, I wonder? > For instance: > > Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, > 1994 The Regents of the University of California. All rights > reserved. Yeah, I know that example very well. I've seen that copyright notice for two decades or so. :-) Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 01:29:00 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE42C1065676; Fri, 24 Feb 2012 01:29:00 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 904558FC0C; Fri, 24 Feb 2012 01:29:00 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1O1SwAw011182; Fri, 24 Feb 2012 01:28:59 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4F46E7D6.4090605@gmail.com> Date: Fri, 24 Feb 2012 09:28:54 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Jilles Tjoelker References: <201202220322.q1M3MoFE032330@svn.freebsd.org> <20120222234254.GC95122@stack.nl> <4F458355.8090405@gmail.com> <20120223224310.GA10491@stack.nl> In-Reply-To: <20120223224310.GA10491@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, davidxu@FreeBSD.org Subject: Re: svn commit: r231989 - in head: lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 01:29:00 -0000 On 2012/2/24 6:43, Jilles Tjoelker wrote: > On Thu, Feb 23, 2012 at 08:07:49AM +0800, David Xu wrote: >> On 2012/2/23 7:42, Jilles Tjoelker wrote: >>> On Wed, Feb 22, 2012 at 03:22:50AM +0000, David Xu wrote: >>>> Author: davidxu >>>> Date: Wed Feb 22 03:22:49 2012 >>>> New Revision: 231989 >>>> URL: http://svn.freebsd.org/changeset/base/231989 >>>> Log: >>>> Use unused fourth argument of umtx_op to pass flags to kernel for operation >>>> UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower >>>> 16bits is used to pass flags. The change saves a clock_gettime() syscall >>>> from libthr. >>>> Modified: >>>> head/lib/libthr/thread/thr_umtx.c >>>> head/sys/kern/kern_umtx.c >>>> head/sys/sys/umtx.h >>>> >>>> Modified: head/lib/libthr/thread/thr_umtx.c >>>> ============================================================================== >>>> --- head/lib/libthr/thread/thr_umtx.c Wed Feb 22 01:50:13 2012 (r231988) >>>> +++ head/lib/libthr/thread/thr_umtx.c Wed Feb 22 03:22:49 2012 (r231989) >>>> @@ -200,20 +200,10 @@ int >>>> + abstime != NULL ? (void *)(uintptr_t)((clockid<< 16) | UMTX_WAIT_ABSTIME) : 0, >>> Please check that this shift does not lose any information (i.e., >>> clockid>= 0&& clockid<= 0xFFFF) before doing it. >>> Implementing clock_getcpuclockid() will require clockids greater than >>> 65535 because such clockids contain a process id. >> In which document said the clock id includes a process id ? I think the >> clock_getcpuclockid() >> is a simplified version of getrusage(). > clock_getcpuclockid() lets you find a clock ID for the CPU time clock of > a process. Usage could be like this: > > int error; > pid_t pid; > clockid_t clk; > struct timespec ts; > > error = clock_getcpuclockid(pid,&clk); > if (error == 0) > if (clock_gettime(clk,&ts) == 0) > printf("%lu.%09lu\n", (unsigned long)ts.tv_sec, > (unsigned long)ts.tv_usec); > > One way to implement it is to reserve a PID_MAX sized subrange of > clockid_t for this purpose. > > Similarly, pthread_getcpuclockid() lets you find a clock ID for the CPU > time clock of a thread. So the clock ID may be dynamically allocated in theory ? > These seem mostly useful for clock_getres(), clock_gettime() and > possibly timer_create(). Besides, sem_timedwait() doesn't even let you > specify a clock ID. > Yes, sem_timedwait does not specify a clock ID, it is inconsistent with pthread condition variable, it is not surprising, it is not first time that the POSIX has a bug. From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 02:54:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1B971065672 for ; Fri, 24 Feb 2012 02:54:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (onyx.glenbarber.us [199.48.134.227]) by mx1.freebsd.org (Postfix) with SMTP id 691318FC1A for ; Fri, 24 Feb 2012 02:54:49 +0000 (UTC) Received: (qmail 68763 invoked by uid 0); 23 Feb 2012 21:28:07 -0500 Received: from unknown (HELO glenbarber.us) (76.124.49.145) by 0 with SMTP; 23 Feb 2012 21:28:07 -0500 Date: Thu, 23 Feb 2012 21:28:02 -0500 From: Glen Barber To: Christian Brueffer Message-ID: <20120224022802.GA1873@glenbarber.us> References: <201202231849.q1NIndrV018172@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201202231849.q1NIndrV018172@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, freebsd-www@FreeBSD.org Subject: Re: svn commit: r232057 - in stable/8/release: doc/en_US.ISO8859-1/hardware doc/share/misc picobsd/floppy.tree/sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 02:54:49 -0000 On Thu, Feb 23, 2012 at 06:49:39PM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Thu Feb 23 18:49:38 2012 > New Revision: 232057 > URL: http://svn.freebsd.org/changeset/base/232057 > > Log: > MFC: r231943 > > Add oce(4) to the hardware notes. I'm not sure this should have been MFCd to 8-STABLE; I don't see a manual for oce(4), which appears to be breaking the www build. Glen > > Approved by: re (bz) > > Modified: > stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml > stable/8/release/doc/share/misc/dev.archlist.txt > Directory Properties: > stable/8/release/ (props changed) > stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) > stable/8/release/picobsd/ (props changed) > stable/8/release/picobsd/floppy.tree/sbin/ (props changed) > stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) > stable/8/release/picobsd/qemu/ (props changed) > stable/8/release/picobsd/tinyware/login/ (props changed) > stable/8/release/picobsd/tinyware/passwd/ (props changed) > stable/8/release/powerpc/ (props changed) > > Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml > ============================================================================== > --- stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:48:02 2012 (r232056) > +++ stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:49:38 2012 (r232057) > @@ -900,6 +900,8 @@ > > &hwlist.nxge; > > + &hwlist.oce; > + > &hwlist.pcn; > > &hwlist.re; > > Modified: stable/8/release/doc/share/misc/dev.archlist.txt > ============================================================================== > --- stable/8/release/doc/share/misc/dev.archlist.txt Thu Feb 23 18:48:02 2012 (r232056) > +++ stable/8/release/doc/share/misc/dev.archlist.txt Thu Feb 23 18:49:38 2012 (r232057) > @@ -97,6 +97,7 @@ ng_ubt i386,pc98,amd64 > nsp i386,pc98 > nve i386,amd64 > nxge i386,amd64 > +oce i386,amd64 > ohci i386,pc98,ia64,amd64,powerpc > oltr i386 > pcn i386,pc98,ia64,amd64 From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 05:33:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E347106566C; Fri, 24 Feb 2012 05:33:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DAA78FC1C; Fri, 24 Feb 2012 05:33:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O5XCmH043913; Fri, 24 Feb 2012 05:33:12 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O5XCgj043911; Fri, 24 Feb 2012 05:33:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202240533.q1O5XCgj043911@svn.freebsd.org> From: Adrian Chadd Date: Fri, 24 Feb 2012 05:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232095 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 05:33:12 -0000 Author: adrian Date: Fri Feb 24 05:33:11 2012 New Revision: 232095 URL: http://svn.freebsd.org/changeset/base/232095 Log: Add a radiotap vendor header definition. Modified: head/sys/net80211/ieee80211_radiotap.h Modified: head/sys/net80211/ieee80211_radiotap.h ============================================================================== --- head/sys/net80211/ieee80211_radiotap.h Fri Feb 24 00:49:18 2012 (r232094) +++ head/sys/net80211/ieee80211_radiotap.h Fri Feb 24 05:33:11 2012 (r232095) @@ -54,6 +54,12 @@ #define IEEE80211_RADIOTAP_HDRLEN 64 /* XXX deprecated */ +struct ieee80211_radiotap_vendor_header { + uint8_t vh_oui[3]; /* 3 byte vendor OUI */ + uint8_t vh_sub_ns; /* Sub namespace of this section */ + uint16_t vh_skip_len; /* Length of this vendor section */ +} __packed; + /* * The radio capture header precedes the 802.11 header. * From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 05:39:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59AA0106564A; Fri, 24 Feb 2012 05:39:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FA838FC08; Fri, 24 Feb 2012 05:39:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O5d1dU044106; Fri, 24 Feb 2012 05:39:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O5d0mE044104; Fri, 24 Feb 2012 05:39:00 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202240539.q1O5d0mE044104@svn.freebsd.org> From: Adrian Chadd Date: Fri, 24 Feb 2012 05:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232096 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 05:39:01 -0000 Author: adrian Date: Fri Feb 24 05:39:00 2012 New Revision: 232096 URL: http://svn.freebsd.org/changeset/base/232096 Log: Although it's documented that the vap newstate call can drop the comlock, I'd like to find and analyse these cases to see if they really are valid. So, throw in a lock here and wait for the (hopefully!) inevitable complaints. Modified: head/sys/net80211/ieee80211_proto.c Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Fri Feb 24 05:33:11 2012 (r232095) +++ head/sys/net80211/ieee80211_proto.c Fri Feb 24 05:39:00 2012 (r232096) @@ -1615,6 +1615,7 @@ markwaiting(struct ieee80211vap *vap0) if (vap->iv_state != IEEE80211_S_INIT) { /* NB: iv_newstate may drop the lock */ vap->iv_newstate(vap, IEEE80211_S_INIT, 0); + IEEE80211_LOCK_ASSERT(ic); vap->iv_flags_ext |= IEEE80211_FEXT_SCANWAIT; } } @@ -1649,6 +1650,7 @@ wakeupwaiting(struct ieee80211vap *vap0) vap->iv_newstate(vap, vap->iv_opmode == IEEE80211_M_STA ? IEEE80211_S_SCAN : IEEE80211_S_RUN, 0); + IEEE80211_LOCK_ASSERT(ic); } } } @@ -1678,6 +1680,7 @@ ieee80211_newstate_cb(void *xvap, int np ieee80211_state_name[vap->iv_state], ieee80211_state_name[IEEE80211_S_INIT], arg); vap->iv_newstate(vap, IEEE80211_S_INIT, arg); + IEEE80211_LOCK_ASSERT(ic); vap->iv_flags_ext &= ~IEEE80211_FEXT_REINIT; } @@ -1699,6 +1702,7 @@ ieee80211_newstate_cb(void *xvap, int np ieee80211_state_name[ostate], ieee80211_state_name[nstate], arg); rc = vap->iv_newstate(vap, nstate, arg); + IEEE80211_LOCK_ASSERT(ic); vap->iv_flags_ext &= ~IEEE80211_FEXT_STATEWAIT; if (rc != 0) { /* State transition failed */ @@ -1724,7 +1728,9 @@ ieee80211_newstate_cb(void *xvap, int np * Note this can also happen as a result of SLEEP->RUN * (i.e. coming out of power save mode). */ + IF_LOCK(&vap->iv_ifp->if_snd); vap->iv_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + IF_UNLOCK(&vap->iv_ifp->if_snd); if_start(vap->iv_ifp); /* bring up any vaps waiting on us */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 05:40:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C54D41065675; Fri, 24 Feb 2012 05:40:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B49A78FC13; Fri, 24 Feb 2012 05:40:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O5eauN044195; Fri, 24 Feb 2012 05:40:36 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O5ea88044193; Fri, 24 Feb 2012 05:40:36 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202240540.q1O5ea88044193@svn.freebsd.org> From: Adrian Chadd Date: Fri, 24 Feb 2012 05:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232097 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 05:40:36 -0000 Author: adrian Date: Fri Feb 24 05:40:36 2012 New Revision: 232097 URL: http://svn.freebsd.org/changeset/base/232097 Log: Hold IF_LOCK when manipulating the interface flags. It doesn't _really_ help all that much, I'll commit something to sys/net/if.c at some point explaining why, but the lock should be held when checking/manipulating/branching because of said lock. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Fri Feb 24 05:39:00 2012 (r232096) +++ head/sys/net80211/ieee80211_output.c Fri Feb 24 05:40:36 2012 (r232097) @@ -157,8 +157,10 @@ ieee80211_start(struct ifnet *ifp) "%s: ignore queue, in %s state\n", __func__, ieee80211_state_name[vap->iv_state]); vap->iv_stats.is_tx_badstate++; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; IEEE80211_UNLOCK(ic); + IFQ_LOCK(&ifp->if_snd); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + IFQ_UNLOCK(&ifp->if_snd); return; } IEEE80211_UNLOCK(ic); @@ -389,7 +391,9 @@ ieee80211_output(struct ifnet *ifp, stru struct ieee80211_frame *wh; int error; + IFQ_LOCK(&ifp->if_snd); if (ifp->if_drv_flags & IFF_DRV_OACTIVE) { + IFQ_UNLOCK(&ifp->if_snd); /* * Short-circuit requests if the vap is marked OACTIVE * as this can happen because a packet came down through @@ -400,6 +404,7 @@ ieee80211_output(struct ifnet *ifp, stru */ senderr(ENETDOWN); } + IFQ_UNLOCK(&ifp->if_snd); vap = ifp->if_softc; /* * Hand to the 802.3 code if not tagged as From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 07:00:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB516106564A; Fri, 24 Feb 2012 07:00:29 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B91278FC22; Fri, 24 Feb 2012 07:00:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O70TwQ046677; Fri, 24 Feb 2012 07:00:29 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O70Txf046674; Fri, 24 Feb 2012 07:00:29 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202240700.q1O70Txf046674@svn.freebsd.org> From: Christian Brueffer Date: Fri, 24 Feb 2012 07:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232098 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 07:00:30 -0000 Author: brueffer Date: Fri Feb 24 07:00:29 2012 New Revision: 232098 URL: http://svn.freebsd.org/changeset/base/232098 Log: MFC: r231880,r231915,r231937 Add a manpage for the oce(4) driver. Added: stable/9/share/man/man4/oce.4 - copied, changed from r231880, head/share/man/man4/oce.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Fri Feb 24 05:40:36 2012 (r232097) +++ stable/9/share/man/man4/Makefile Fri Feb 24 07:00:29 2012 (r232098) @@ -328,6 +328,7 @@ MAN= aac.4 \ ${_nvram.4} \ ${_nvram2env.4} \ ${_nxge.4} \ + oce.4 \ ohci.4 \ orm.4 \ ${_padlock.4} \ Copied and modified: stable/9/share/man/man4/oce.4 (from r231880, head/share/man/man4/oce.4) ============================================================================== --- head/share/man/man4/oce.4 Fri Feb 17 14:02:44 2012 (r231880, copy source) +++ stable/9/share/man/man4/oce.4 Fri Feb 24 07:00:29 2012 (r232098) @@ -36,9 +36,7 @@ .\" .\" $FreeBSD$ .\" - - -.Dd February 14, 2012 +.Dd February 19, 2012 .Dt OCE 4 .Os .Sh NAME @@ -49,64 +47,85 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device pci" .Cd "device oce" .Ed .Pp -To load the driver as a +Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_oce_load="YES" .Ed .Sh DESCRIPTION -Emulex one connect adapters come in various skews and with +Emulex OneConnect adapters come in various skews and with different combinations of NIC, FCoE and iSCSI functions. -oce claims the NIC functions in all these adapters. +The +.Nm +driver claims the NIC functions in all these adapters. .Pp The .Nm driver supports VLAN Hardware offload, TCP checksum offload, TCP segmentation offload (TSO), Large receive offload (LRO), Bonding, Jumbo frames (from 1500 - 9000), Multiple TX queues, -Receive-Side Scaling(RSS) and MSI-X interrupts. +Receive-Side Scaling (RSS) and MSI-X interrupts. .Sh HARDWARE +The .Nm -driver supports the following Emulex network adapters: +driver supports the following network adapters: +.Pp .Bl -bullet -compact .It -BladeEngine 2 +Emulex BladeEngine 2 .It -BladeEngine 3 +Emulex BladeEngine 3 .It -Lancer +Emulex Lancer .El .Sh UPDATING FIRMWARE Adapter firmware updates are persistent. - +.Pp Firmware can be updated by following the steps below: -.nf - 1) Copy the below code to a Makefile - ".KMOD=elxflash - FIRMWS=imagename.ufi:elxflash - .include " - 2) Replace imagename in above with UFI file name. - 3) Copy Makefile and UFI to a directory - 4) Execute make & copy generated elxflash.ko to /lib/modules - 5) sysctl dev.oce..fw_upgrade=elxflash - 6) Reboot the machine. - +.Bl -enum +.It +Copy the below code to a Makefile: +.Pp +.Bd -literal -offset indent +\&.KMOD=elxflash +FIRMWS=imagename.ufi:elxflash +\&.include +.Ed +.It +Replace imagename in above with UFI file name +.It +Copy Makefile and UFI file to a directory +.It +Execute make & copy generated elxflash.ko to +.Pa /lib/modules +.It +sysctl dev.oce..fw_upgrade=elxflash +.It +Reboot the machine +.El +.Pp In case of issues with supplied UFI, flashing fails with one -of the below errors. - 1) "Invalid BE3 firmware image" - 2) "Invalid Cookie. Firmware image corrupted ?" - 3) "cmd to write to flash rom failed." -.fi +of the following errors. +.Pp +.Bl -enum -compact +.It +.Qq Invalid BE3 firmware image +.It +.Qq "Invalid Cookie. Firmware image corrupted ?" +.It +.Qq cmd to write to flash rom failed. +.El .Sh SUPPORT For general information and support, go to the Emulex website at: -.Fa http://www.Emulex.com/ -or E-Mail at -.Fa freebsd-drivers@emulex.com. +.Pa http://www.Emulex.com/ +or E-Mail at +.Pa freebsd-drivers@emulex.com . .Sh SEE ALSO .Xr ifconfig 8 .Sh AUTHORS @@ -114,4 +133,4 @@ or E-Mail at The .Nm driver was written by -.An freebsd-drivers@emulex.com. +.An freebsd-drivers@emulex.com . From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 07:29:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A0EE106566B; Fri, 24 Feb 2012 07:29:07 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 702BA8FC18; Fri, 24 Feb 2012 07:29:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O7T7eg047577; Fri, 24 Feb 2012 07:29:07 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O7T7Fw047575; Fri, 24 Feb 2012 07:29:07 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201202240729.q1O7T7Fw047575@svn.freebsd.org> From: Kevin Lo Date: Fri, 24 Feb 2012 07:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232099 - head/sys/fs/ntfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 07:29:07 -0000 Author: kevlo Date: Fri Feb 24 07:29:06 2012 New Revision: 232099 URL: http://svn.freebsd.org/changeset/base/232099 Log: Check if the user has necessary permissions on the device Modified: head/sys/fs/ntfs/ntfs_vfsops.c Modified: head/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 24 07:00:29 2012 (r232098) +++ head/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 24 07:29:06 2012 (r232099) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -150,13 +151,16 @@ static const char *ntfs_opts[] = { }; static int -ntfs_mount (struct mount *mp) +ntfs_mount(struct mount *mp) { - int err = 0, error; - struct vnode *devvp; + int err = 0, error; + accmode_t accmode; + struct vnode *devvp; struct nameidata ndp; + struct thread *td; char *from; + td = curthread; if (vfs_filteropt(mp->mnt_optnew, ntfs_opts)) return (EINVAL); @@ -183,7 +187,7 @@ ntfs_mount (struct mount *mp) * Not an update, or updating the name: look up the name * and verify that it refers to a sensible block device. */ - NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from, curthread); + NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from, td); err = namei(&ndp); if (err) { /* can't get devvp!*/ @@ -197,6 +201,21 @@ ntfs_mount (struct mount *mp) return (err); } + /* + * If mount by non-root, then verify that user has necessary + * permissions on the device. + */ + accmode = VREAD; + if ((mp->mnt_flag & MNT_RDONLY) == 0) + accmode |= VWRITE; + err = VOP_ACCESS(devvp, accmode, td->td_ucred, td); + if (err) + err = priv_check(td, PRIV_VFS_MOUNT_PERM); + if (err) { + vput(devvp); + return (err); + } + if (mp->mnt_flag & MNT_UPDATE) { #if 0 /* @@ -230,7 +249,7 @@ ntfs_mount (struct mount *mp) /* Save "mounted from" info for mount point (NULL pad)*/ vfs_mountedfrom(mp, from); - err = ntfs_mountfs(devvp, mp, curthread); + err = ntfs_mountfs(devvp, mp, td); } if (err) { vrele(devvp); @@ -243,7 +262,7 @@ error_1: /* no state to back out*/ /* XXX: missing NDFREE(&ndp, ...) */ success: - return(err); + return (err); } /* From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 07:30:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E645E106564A; Fri, 24 Feb 2012 07:30:44 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5EEC8FC13; Fri, 24 Feb 2012 07:30:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O7Uih0047677; Fri, 24 Feb 2012 07:30:44 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O7UiiV047674; Fri, 24 Feb 2012 07:30:44 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201202240730.q1O7UiiV047674@svn.freebsd.org> From: Kevin Lo Date: Fri, 24 Feb 2012 07:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232100 - head/sys/fs/ntfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 07:30:45 -0000 Author: kevlo Date: Fri Feb 24 07:30:44 2012 New Revision: 232100 URL: http://svn.freebsd.org/changeset/base/232100 Log: Remove an unused structure and unnecessary cast Modified: head/sys/fs/ntfs/ntfs.h head/sys/fs/ntfs/ntfs_vfsops.c Modified: head/sys/fs/ntfs/ntfs.h ============================================================================== --- head/sys/fs/ntfs/ntfs.h Fri Feb 24 07:29:06 2012 (r232099) +++ head/sys/fs/ntfs/ntfs.h Fri Feb 24 07:30:44 2012 (r232100) @@ -36,7 +36,7 @@ typedef u_int16_t wchar; #pragma pack(1) #define BBSIZE 1024 #define BBOFF ((off_t)(0)) -#define BBLOCK ((daddr_t)(0)) +#define BBLOCK 0 #define NTFS_MFTINO 0 #define NTFS_VOLUMEINO 3 #define NTFS_ATTRDEFINO 4 Modified: head/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 24 07:29:06 2012 (r232099) +++ head/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 24 07:30:44 2012 (r232100) @@ -67,8 +67,6 @@ MALLOC_DEFINE(M_NTFSNTNODE,"ntfs_ntnode" MALLOC_DEFINE(M_NTFSFNODE,"ntfs_fnode", "NTFS fnode information"); MALLOC_DEFINE(M_NTFSDIR,"ntfs_dir", "NTFS dir buffer"); -struct sockaddr; - static int ntfs_mountfs(register struct vnode *, struct mount *, struct thread *); static int ntfs_calccfree(struct ntfsmount *ntmp, cn_t *cfreep); From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 07:49:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E0B0106566B; Fri, 24 Feb 2012 07:49:56 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 138AF8FC0C; Fri, 24 Feb 2012 07:49:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O7ntS7048311; Fri, 24 Feb 2012 07:49:55 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O7ntuu048309; Fri, 24 Feb 2012 07:49:55 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201202240749.q1O7ntuu048309@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 24 Feb 2012 07:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232101 - head/usr.sbin/wake X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 07:49:56 -0000 Author: jh Date: Fri Feb 24 07:49:55 2012 New Revision: 232101 URL: http://svn.freebsd.org/changeset/base/232101 Log: style(9). MFC after: 2 weeks Modified: head/usr.sbin/wake/wake.c Modified: head/usr.sbin/wake/wake.c ============================================================================== --- head/usr.sbin/wake/wake.c Fri Feb 24 07:30:44 2012 (r232100) +++ head/usr.sbin/wake/wake.c Fri Feb 24 07:49:55 2012 (r232101) @@ -78,7 +78,7 @@ wake(int bpf, const char *host) if (get_ether(host, &macaddr) == -1) return (-1); - return send_wakeup(bpf, &macaddr); + return (send_wakeup(bpf, &macaddr)); } static int @@ -111,10 +111,10 @@ find_ether(char *dst, size_t len) int nifs; if (dst == NULL || len == 0) - return 0; + return (0); if (getifaddrs(&ifap) != 0) - return -1; + return (-1); /* XXX also check the link state */ for (nifs = 0, ifa = ifap; ifa; ifa = ifa->ifa_next) @@ -128,7 +128,7 @@ find_ether(char *dst, size_t len) } freeifaddrs(ifap); - return nifs == 1 ? 0 : -1; + return (nifs == 1 ? 0 : -1); } static int From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 07:54:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E8BF106564A; Fri, 24 Feb 2012 07:54:09 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E02E8FC13; Fri, 24 Feb 2012 07:54:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1O7s9aT048508; Fri, 24 Feb 2012 07:54:09 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1O7s94S048506; Fri, 24 Feb 2012 07:54:09 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201202240754.q1O7s94S048506@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 24 Feb 2012 07:54:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232102 - head/usr.sbin/wake X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 07:54:09 -0000 Author: jh Date: Fri Feb 24 07:54:08 2012 New Revision: 232102 URL: http://svn.freebsd.org/changeset/base/232102 Log: Exit with proper status when wake() fails. PR: bin/153527 Submitted by: Douglas Steinwand MFC after: 2 weeks Modified: head/usr.sbin/wake/wake.c Modified: head/usr.sbin/wake/wake.c ============================================================================== --- head/usr.sbin/wake/wake.c Fri Feb 24 07:49:55 2012 (r232101) +++ head/usr.sbin/wake/wake.c Fri Feb 24 07:54:08 2012 (r232102) @@ -183,7 +183,7 @@ send_wakeup(int bpf, struct ether_addr c int main(int argc, char *argv[]) { - int bpf, n; + int bpf, n, rval; char ifname[IF_NAMESIZE]; if (argc < 2) @@ -204,10 +204,13 @@ main(int argc, char *argv[]) if (n >= argc) usage(); - for (; n < argc; n++) - if (wake(bpf, argv[n])) + rval = 0; + for (; n < argc; n++) { + if (wake(bpf, argv[n]) != 0) { + rval = 1; warn("Cannot send Wake on LAN frame over `%s' to `%s'", ifname, argv[n]); - - return (0); + } + } + exit(rval); } From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 08:44:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D321106566C for ; Fri, 24 Feb 2012 08:44:56 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id E80668FC12 for ; Fri, 24 Feb 2012 08:44:55 +0000 (UTC) Received: by werm13 with SMTP id m13so1930391wer.13 for ; Fri, 24 Feb 2012 00:44:54 -0800 (PST) Received-SPF: pass (google.com: domain of juli@clockworksquid.com designates 10.216.135.37 as permitted sender) client-ip=10.216.135.37; Authentication-Results: mr.google.com; spf=pass (google.com: domain of juli@clockworksquid.com designates 10.216.135.37 as permitted sender) smtp.mail=juli@clockworksquid.com Received: from mr.google.com ([10.216.135.37]) by 10.216.135.37 with SMTP id t37mr624667wei.44.1330073094883 (num_hops = 1); Fri, 24 Feb 2012 00:44:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=c+q1Svd7z22mOuAltEm+JkF1Iir8332TOrtEKnFcxeE=; b=Jq9n2p6Vd9ZEnG3uYvIyu/EBL/mtPDx1QPWexjU5DW//ql9PtJlC/4enfMZmTNsENj nUWHBZzUSa1wsf7j2XN122BFJe6+ufFgWDjy2xY+b1YwY4wYUiztePgGH06GIvLS2XsR kofbAJr4kzpKoqNrwzlS9VllaVKiXSrYXVMwo= Received: by 10.216.135.37 with SMTP id t37mr461102wei.44.1330071383199; Fri, 24 Feb 2012 00:16:23 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.227.209.78 with HTTP; Fri, 24 Feb 2012 00:16:03 -0800 (PST) In-Reply-To: <201202220130.q1M1UQ30028591@svn.freebsd.org> References: <201202220130.q1M1UQ30028591@svn.freebsd.org> From: Juli Mallett Date: Fri, 24 Feb 2012 00:16:03 -0800 X-Google-Sender-Auth: bkTN8CZPuRsW7BeZpgYYS70gl3M Message-ID: To: Oleksandr Tymoshenko Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkDoFsGvy1Q18mwtRvQlpH95MzpRXP4Dbo0zt0ud3nAOcEk+BizpV3ndo4IckCyLGvXAGQb Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231987 - in head/sys/mips/cavium: . octe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 08:44:56 -0000 On Tue, Feb 21, 2012 at 17:30, Oleksandr Tymoshenko wro= te: > Author: gonzo > Date: Wed Feb 22 01:30:25 2012 > New Revision: 231987 > URL: http://svn.freebsd.org/changeset/base/231987 > > Log: > =C2=A0Refctor address assignment for Octeon's ethernet ports: > > =C2=A0- Centralize address assignment > =C2=A0- Make sure managment ports get first MAC address in pool It was the case that this would happen, now we're relying on object link order to do the right thing, which I think is a mistake. This is a fix for a bug introduced by this patch. I don't like the idea of handing out MAC addresses to ports as they're configured, as this *does* break things if you don't have the octm driver in your kernel, but do have management ports. Your bootloader comes up, uses the same logic we were using to assign MACs (which is the gold standard in publicly-available Octeonland, even if there are private bootloaders and kernels which did differently), and then when the kernel boots, the MAC assigned to the physical ports is different. If you use DHCP + bootp on the management port to boot up, and then configure octe0 via DHCP, your lease moves from one physical port to another. In my experience, before I fixed things to match bootloader behavior, this could result in mysterious and exciting behavior involving long delays in connectivity at boot. And of course, now you'll get a different MAC for octe0 based on whether octm is in your kernel or not. Which is its own set of fun. The Octeon hardware doesn't need a per-port MAC you can read because there is a consistent way to allocate them to ports that is easy to follow. I don't see the benefit in handing them out dynamically, especially relying in link order to get it right. The previous method had shortcomings and a load of comments since there were dragons in the vicinity. This introduces a lot more magic, actually-confusing behavior, etc., and has few comments, and none that catch eyes in the right places. If we want to abstract this out into cvm_assign_mac_address so that downstream consumers of this code (or upstream, as the case may be) can do their own thing, I'd suggest passing down the interface number, whether it's a management port, etc., and restoring the original, consistent logic, in that function. This has the potential to be markedly-astonishing. What happens if we add support for loading octe and octm as modules (which has been requested by consumers of the Octeon code in the past)? Yikes! > =C2=A0- Properly propagate fail if address allocation failed > > =C2=A0Submitted by: Andrew Duane > > Modified: > =C2=A0head/sys/mips/cavium/files.octeon1 > =C2=A0head/sys/mips/cavium/if_octm.c > =C2=A0head/sys/mips/cavium/octe/ethernet-common.c > =C2=A0head/sys/mips/cavium/octe/ethernet-common.h > =C2=A0head/sys/mips/cavium/octe/ethernet-rgmii.c > =C2=A0head/sys/mips/cavium/octe/ethernet-sgmii.c > =C2=A0head/sys/mips/cavium/octe/ethernet-spi.c > =C2=A0head/sys/mips/cavium/octe/ethernet-xaui.c > =C2=A0head/sys/mips/cavium/octe/ethernet.c > > Modified: head/sys/mips/cavium/files.octeon1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/cavium/files.octeon1 =C2=A0Wed Feb 22 01:23:14 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r231986) > +++ head/sys/mips/cavium/files.octeon1 =C2=A0Wed Feb 22 01:30:25 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r231987) > @@ -24,6 +24,10 @@ mips/cavium/cryptocteon/cryptocteon.c =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0o > =C2=A0mips/mips/octeon_cop2_swtch.S =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0standard > =C2=A0mips/mips/octeon_cop2.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0standa= rd > > +# octm must be first, so management ports get the first MAC addresses > +mips/cavium/if_octm.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional octm > +contrib/octeon-sdk/cvmx-mgmt-port.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0optional octm > + > =C2=A0mips/cavium/octe/ethernet.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional octe > =C2=A0mips/cavium/octe/ethernet-mv88e61xx.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0optional octe octeon_vendor_lanner > =C2=A0mips/cavium/octe/ethernet-common.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 optional octe > @@ -39,10 +43,6 @@ mips/cavium/octe/mv88e61xxphy.c =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0option > =C2=A0mips/cavium/octe/octe.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0option= al octe > =C2=A0mips/cavium/octe/octebus.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 optional octe > > -mips/cavium/if_octm.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional octm > - > -contrib/octeon-sdk/cvmx-mgmt-port.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0optional octm > - > =C2=A0mips/cavium/octopci.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional pci > =C2=A0mips/cavium/octopci_bus_space.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional pci > > > Modified: head/sys/mips/cavium/if_octm.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/cavium/if_octm.c =C2=A0 =C2=A0 =C2=A0Wed Feb 22 01:23:1= 4 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231986) > +++ head/sys/mips/cavium/if_octm.c =C2=A0 =C2=A0 =C2=A0Wed Feb 22 01:30:2= 5 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231987) > @@ -63,6 +63,7 @@ > =C2=A0#include > =C2=A0#include > =C2=A0#include > +#include "octe/ethernet-common.h" > > =C2=A0struct octm_softc { > =C2=A0 =C2=A0 =C2=A0 =C2=A0struct ifnet *sc_ifp; > @@ -176,9 +177,10 @@ octm_attach(device_t dev) > =C2=A0 =C2=A0 =C2=A0 =C2=A0/* > =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Set MAC address for this management port. > =C2=A0 =C2=A0 =C2=A0 =C2=A0 */ > - =C2=A0 =C2=A0 =C2=A0 mac =3D 0; > - =C2=A0 =C2=A0 =C2=A0 memcpy((u_int8_t *)&mac + 2, cvmx_sysinfo_get()->m= ac_addr_base, 6); > - =C2=A0 =C2=A0 =C2=A0 mac +=3D sc->sc_port; > + =C2=A0 =C2=A0 =C2=A0 if (cvm_assign_mac_address(&mac, NULL) !=3D 0) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 device_printf(dev, "un= able to allocate MAC address.\n"); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (ENXIO); > + =C2=A0 =C2=A0 =C2=A0 } > =C2=A0 =C2=A0 =C2=A0 =C2=A0cvmx_mgmt_port_set_mac(sc->sc_port, mac); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0/* No watermark for input ring. =C2=A0*/ > > Modified: head/sys/mips/cavium/octe/ethernet-common.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/cavium/octe/ethernet-common.c Wed Feb 22 01:23:14 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231986) > +++ head/sys/mips/cavium/octe/ethernet-common.c Wed Feb 22 01:30:25 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231987) > @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); > > =C2=A0extern int octeon_is_simulation(void); > > +static uint64_t mac_addr =3D 0; > +static uint32_t mac_offset =3D 0; > > =C2=A0/** > =C2=A0* Set the multicast list. Currently unimplemented. > @@ -90,6 +92,37 @@ void cvm_oct_common_set_multicast_list(s > > > =C2=A0/** > + * Assign a MAC addres from the pool of available MAC addresses > + * Can return as either a 64-bit value and/or 6 octets. > + * > + * @param macp =C2=A0 =C2=A0Filled in with the assigned address if non-N= ULL > + * @param octets =C2=A0Filled in with the assigned address if non-NULL > + * @return Zero on success > + */ > +int cvm_assign_mac_address(uint64_t *macp, uint8_t *octets) > +{ > + =C2=A0 =C2=A0 =C2=A0 /* Initialize from global MAC address base; fail i= f not set */ > + =C2=A0 =C2=A0 =C2=A0 if (mac_addr =3D=3D 0) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 memcpy((uint8_t *)&mac= _addr + 2, cvmx_sysinfo_get()->mac_addr_base, 6); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (mac_addr =3D=3D 0) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 return ENXIO; > + =C2=A0 =C2=A0 =C2=A0 } > + > + =C2=A0 =C2=A0 =C2=A0 if (mac_offset >=3D cvmx_sysinfo_get()->mac_addr_c= ount) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return ENXIO; =C2=A0 = =C2=A0 =C2=A0 /* Out of addresses to assign */ > + > + =C2=A0 =C2=A0 =C2=A0 if (macp) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *macp =3D mac_addr; > + =C2=A0 =C2=A0 =C2=A0 if (octets) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 memcpy(octets, (u_int8= _t *)&mac_addr + 2, 6); > + > + =C2=A0 =C2=A0 =C2=A0 mac_addr++; > + =C2=A0 =C2=A0 =C2=A0 mac_offset++; > + > + =C2=A0 =C2=A0 =C2=A0 return 0; > +} > + > +/** > =C2=A0* Set the hardware MAC address for a device > =C2=A0* > =C2=A0* @param dev =C2=A0 =C2=A0Device to change the MAC address for > @@ -268,16 +301,11 @@ void cvm_oct_common_poll(struct ifnet *i > =C2=A0*/ > =C2=A0int cvm_oct_common_init(struct ifnet *ifp) > =C2=A0{ > - =C2=A0 =C2=A0 =C2=A0 char mac[6] =3D { > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cvmx_sysinfo_get()->ma= c_addr_base[0], > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cvmx_sysinfo_get()->ma= c_addr_base[1], > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cvmx_sysinfo_get()->ma= c_addr_base[2], > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cvmx_sysinfo_get()->ma= c_addr_base[3], > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cvmx_sysinfo_get()->ma= c_addr_base[4], > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cvmx_sysinfo_get()->ma= c_addr_base[5] }; > + =C2=A0 =C2=A0 =C2=A0 uint8_t mac[6]; > =C2=A0 =C2=A0 =C2=A0 =C2=A0cvm_oct_private_t *priv =3D (cvm_oct_private_t= *)ifp->if_softc; > > - =C2=A0 =C2=A0 =C2=A0 mac[5] +=3D cvm_oct_mac_addr_offset++; > + =C2=A0 =C2=A0 =C2=A0 if (cvm_assign_mac_address(NULL, mac) !=3D 0) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return ENXIO; > > =C2=A0 =C2=A0 =C2=A0 =C2=A0ifp->if_mtu =3D ETHERMTU; > > > Modified: head/sys/mips/cavium/octe/ethernet-common.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/cavium/octe/ethernet-common.h Wed Feb 22 01:23:14 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231986) > +++ head/sys/mips/cavium/octe/ethernet-common.h Wed Feb 22 01:30:25 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231987) > @@ -37,6 +37,7 @@ void cvm_oct_common_uninit(struct ifnet > =C2=A0int cvm_oct_common_change_mtu(struct ifnet *ifp, int new_mtu); > =C2=A0void cvm_oct_common_set_multicast_list(struct ifnet *ifp); > =C2=A0void cvm_oct_common_set_mac_address(struct ifnet *ifp, const void *= ); > +int cvm_assign_mac_address(uint64_t *, uint8_t *); > > =C2=A0int cvm_oct_init_module(device_t); > =C2=A0void cvm_oct_cleanup_module(device_t); > @@ -52,4 +53,3 @@ int cvm_oct_spi_init(struct ifnet *ifp); > =C2=A0void cvm_oct_spi_uninit(struct ifnet *ifp); > =C2=A0int cvm_oct_xaui_init(struct ifnet *ifp); > > -extern unsigned int cvm_oct_mac_addr_offset; > > Modified: head/sys/mips/cavium/octe/ethernet-rgmii.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/cavium/octe/ethernet-rgmii.c =C2=A0Wed Feb 22 01:23:14 = 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231986) > +++ head/sys/mips/cavium/octe/ethernet-rgmii.c =C2=A0Wed Feb 22 01:30:25 = 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231987) > @@ -215,7 +215,9 @@ int cvm_oct_rgmii_init(struct ifnet *ifp > =C2=A0 =C2=A0 =C2=A0 =C2=A0int error; > =C2=A0 =C2=A0 =C2=A0 =C2=A0int rid; > > - =C2=A0 =C2=A0 =C2=A0 cvm_oct_common_init(ifp); > + =C2=A0 =C2=A0 =C2=A0 if (cvm_oct_common_init(ifp) !=3D 0) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return ENXIO; > + > =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->open =3D cvm_oct_common_open; > =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->stop =3D cvm_oct_common_stop; > =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->stop(ifp); > > Modified: head/sys/mips/cavium/octe/ethernet-sgmii.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/cavium/octe/ethernet-sgmii.c =C2=A0Wed Feb 22 01:23:14 = 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231986) > +++ head/sys/mips/cavium/octe/ethernet-sgmii.c =C2=A0Wed Feb 22 01:30:25 = 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231987) > @@ -49,7 +49,10 @@ extern int octeon_is_simulation(void); > =C2=A0int cvm_oct_sgmii_init(struct ifnet *ifp) > =C2=A0{ > =C2=A0 =C2=A0 =C2=A0 =C2=A0cvm_oct_private_t *priv =3D (cvm_oct_private_t= *)ifp->if_softc; > - =C2=A0 =C2=A0 =C2=A0 cvm_oct_common_init(ifp); > + > + =C2=A0 =C2=A0 =C2=A0 if (cvm_oct_common_init(ifp) !=3D 0) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return ENXIO; > + > =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->open =3D cvm_oct_common_open; > =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->stop =3D cvm_oct_common_stop; > =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->stop(ifp); > > Modified: head/sys/mips/cavium/octe/ethernet-spi.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/cavium/octe/ethernet-spi.c =C2=A0 =C2=A0Wed Feb 22 01:2= 3:14 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231986) > +++ head/sys/mips/cavium/octe/ethernet-spi.c =C2=A0 =C2=A0Wed Feb 22 01:3= 0:25 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231987) > @@ -289,7 +289,8 @@ int cvm_oct_spi_init(struct ifnet *ifp) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cvm_oct_spi_enable= _error_reporting(INTERFACE(priv->port)); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->poll =3D cvm= _oct_spi_poll; > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > - =C2=A0 =C2=A0 =C2=A0 cvm_oct_common_init(ifp); > + =C2=A0 =C2=A0 =C2=A0 if (cvm_oct_common_init(ifp) !=3D 0) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return ENXIO; > =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0; > =C2=A0} > > > Modified: head/sys/mips/cavium/octe/ethernet-xaui.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/cavium/octe/ethernet-xaui.c =C2=A0 Wed Feb 22 01:23:14 = 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231986) > +++ head/sys/mips/cavium/octe/ethernet-xaui.c =C2=A0 Wed Feb 22 01:30:25 = 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231987) > @@ -49,7 +49,10 @@ extern int octeon_is_simulation(void); > =C2=A0int cvm_oct_xaui_init(struct ifnet *ifp) > =C2=A0{ > =C2=A0 =C2=A0 =C2=A0 =C2=A0cvm_oct_private_t *priv =3D (cvm_oct_private_t= *)ifp->if_softc; > - =C2=A0 =C2=A0 =C2=A0 cvm_oct_common_init(ifp); > + > + =C2=A0 =C2=A0 =C2=A0 if (cvm_oct_common_init(ifp) !=3D 0) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return ENXIO; > + > =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->open =3D cvm_oct_common_open; > =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->stop =3D cvm_oct_common_stop; > =C2=A0 =C2=A0 =C2=A0 =C2=A0priv->stop(ifp); > > Modified: head/sys/mips/cavium/octe/ethernet.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/cavium/octe/ethernet.c =C2=A0 =C2=A0 =C2=A0 =C2=A0Wed F= eb 22 01:23:14 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231986) > +++ head/sys/mips/cavium/octe/ethernet.c =C2=A0 =C2=A0 =C2=A0 =C2=A0Wed F= eb 22 01:30:25 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r231987) > @@ -97,15 +97,6 @@ static struct taskqueue *cvm_oct_link_ta > =C2=A0*/ > =C2=A0static int cvm_oct_num_output_buffers; > > -/* > - * The offset from mac_addr_base that should be used for the next port > - * that is configured. =C2=A0By convention, if any mgmt ports exist on t= he > - * chip, they get the first mac addresses. =C2=A0The ports controlled by > - * this driver are numbered sequencially following any mgmt addresses > - * that may exist. > - */ > -unsigned int cvm_oct_mac_addr_offset; > - > =C2=A0/** > =C2=A0* Function to update link status. > =C2=A0*/ > @@ -321,20 +312,6 @@ int cvm_oct_init_module(device_t bus) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0printf("cavium-ethernet: %s\n", OCTEON_SDK_VER= SION_STRING); > > - =C2=A0 =C2=A0 =C2=A0 /* > - =C2=A0 =C2=A0 =C2=A0 =C2=A0* MAC addresses for this driver start after = the management > - =C2=A0 =C2=A0 =C2=A0 =C2=A0* ports. > - =C2=A0 =C2=A0 =C2=A0 =C2=A0* > - =C2=A0 =C2=A0 =C2=A0 =C2=A0* XXX Would be nice if __cvmx_mgmt_port_num_= ports() were > - =C2=A0 =C2=A0 =C2=A0 =C2=A0* =C2=A0 =C2=A0 not static to cvmx-mgmt-port= .c. > - =C2=A0 =C2=A0 =C2=A0 =C2=A0*/ > - =C2=A0 =C2=A0 =C2=A0 if (OCTEON_IS_MODEL(OCTEON_CN56XX)) > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cvm_oct_mac_addr_offse= t =3D 1; > - =C2=A0 =C2=A0 =C2=A0 else if (OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_= IS_MODEL(OCTEON_CN63XX)) > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cvm_oct_mac_addr_offse= t =3D 2; > - =C2=A0 =C2=A0 =C2=A0 else > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cvm_oct_mac_addr_offse= t =3D 0; > - > =C2=A0 =C2=A0 =C2=A0 =C2=A0cvm_oct_rx_initialize(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0cvm_oct_configure_common_hw(bus); > > @@ -375,15 +352,17 @@ int cvm_oct_init_module(device_t bus) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0int num_ports =3D = cvmx_helper_ports_on_interface(interface); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0int port; > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (port =3D cvmx_hel= per_get_ipd_port(interface, 0); port < cvmx_helper_get_ipd_port(interface, = num_ports); port++) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (port =3D cvmx_hel= per_get_ipd_port(interface, 0); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0po= rt < cvmx_helper_get_ipd_port(interface, num_ports); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if= num++, port++) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0cvm_oct_private_t *priv; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0struct ifnet *ifp; > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 dev =3D BUS_ADD_CHILD(bus, 0, "octe", ifnum++); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 dev =3D BUS_ADD_CHILD(bus, 0, "octe", ifnum); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (dev !=3D NULL) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ifp =3D if_alloc(IFT_ETHER); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (dev =3D=3D NULL || ifp =3D=3D NULL) { > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("\t\tFailed to allocate ethernet = device for port %d\n", port); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("Failed to allocate ethernet devi= ce for interface %d port %d\n", interface, port); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0continue; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0} > > @@ -454,12 +433,13 @@ int cvm_oct_init_module(device_t bus) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0ifp->if_softc =3D priv; > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (!priv->init) { > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 panic("%s: unsupported device type, need= to free ifp.", __func__); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 } else > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 if (priv->init(ifp) < 0) { > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("\t\tFailed to register ethernet = device for interface %d, port %d\n", > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 interface, priv->port); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 panic("%s: init failed, need to free ifp= .", __func__); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("octe%d: unsupported device type = interface %d, port %d\n", > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ifnum, interf= ace, priv->port); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if_free(ifp); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 } else if (priv->init(ifp) !=3D 0) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("octe%d: failed to register devic= e for interface %d, port %d\n", > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ifnum, interf= ace, priv->port); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if_free(ifp); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0} else { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cvm_oct_device[priv->port] =3D ifp; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fau -=3D cvmx_pko_get_num_queues(priv= ->port) * sizeof(uint32_t); From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 09:38:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id C31151065673; Fri, 24 Feb 2012 09:38:07 +0000 (UTC) Date: Fri, 24 Feb 2012 09:38:07 +0000 From: Alexander Best To: Dimitry Andric Message-ID: <20120224093807.GA88853@freebsd.org> References: <201202232134.q1NLYEq5024067@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201202232134.q1NLYEq5024067@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232074 - head/sys/cam/ctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 09:38:07 -0000 On Thu Feb 23 12, Dimitry Andric wrote: > Author: dim > Date: Thu Feb 23 21:34:14 2012 > New Revision: 232074 > URL: http://svn.freebsd.org/changeset/base/232074 > > Log: > Use a better way to silence unneeded internal declaration warnings in > several sys/cam/ctl files. is the clang version in base able to do complete universe builds for i386 and amd64 without the need for NO_WERROR= and WERROR= now? cheers. alex ps: are there any plans to add support for compiling kernel+userland with clang tot? maybe this can be accomplished by doing something like echo "WITH_CLANG_TOT=yes" >> /etc/src.conf which will turn all -Wformat-invalid-specifier and -Wformat-extra-args errors into warnings (because clang tot doesn't support -fformat-extensions)? > > Suggested by: ed > Reviewed by: ken > MFC after: 1 week > > Modified: > head/sys/cam/ctl/ctl_private.h > > Modified: head/sys/cam/ctl/ctl_private.h > ============================================================================== > --- head/sys/cam/ctl/ctl_private.h Thu Feb 23 21:32:32 2012 (r232073) > +++ head/sys/cam/ctl/ctl_private.h Thu Feb 23 21:34:14 2012 (r232074) > @@ -297,7 +297,7 @@ struct ctl_page_index { > #define CTL_PAGE_DEFAULT 0x02 > #define CTL_PAGE_SAVED 0x03 > > -static struct ctl_page_index page_index_template[] = { > +static const struct ctl_page_index page_index_template[] = { > {SMS_FORMAT_DEVICE_PAGE, 0, sizeof(struct scsi_format_page), NULL, > CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, > {SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL, From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 10:41:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9F44106566B; Fri, 24 Feb 2012 10:41:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5E018FC08; Fri, 24 Feb 2012 10:41:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OAfwes055384; Fri, 24 Feb 2012 10:41:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OAfwWv055382; Fri, 24 Feb 2012 10:41:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202241041.q1OAfwWv055382@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 24 Feb 2012 10:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232103 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 10:41:59 -0000 Author: kib Date: Fri Feb 24 10:41:58 2012 New Revision: 232103 URL: http://svn.freebsd.org/changeset/base/232103 Log: Place the if() at the right location, to activate the v_writecount accounting for shared writeable mappings for all filesystems, not only for the bypass layers. Submitted by: alc Pointy hat to: kib MFC after: 20 days Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Fri Feb 24 07:54:08 2012 (r232102) +++ head/sys/vm/vm_mmap.c Fri Feb 24 10:41:58 2012 (r232103) @@ -1272,10 +1272,10 @@ vm_mmap_vnode(struct thread *td, vm_size VFS_UNLOCK_GIANT(vfslocked); return (error); } - if (locktype == LK_EXCLUSIVE) { - *writecounted = TRUE; - vnode_pager_update_writecount(obj, 0, objsize); - } + } + if (locktype == LK_EXCLUSIVE) { + *writecounted = TRUE; + vnode_pager_update_writecount(obj, 0, objsize); } } else if (vp->v_type == VCHR) { error = vm_mmap_cdev(td, objsize, prot, maxprotp, flagsp, From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 11:02:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 059261065672; Fri, 24 Feb 2012 11:02:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E634E8FC1A; Fri, 24 Feb 2012 11:02:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OB2ZmC056048; Fri, 24 Feb 2012 11:02:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OB2ZYr056046; Fri, 24 Feb 2012 11:02:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202241102.q1OB2ZYr056046@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 24 Feb 2012 11:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232104 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 11:02:36 -0000 Author: kib Date: Fri Feb 24 11:02:35 2012 New Revision: 232104 URL: http://svn.freebsd.org/changeset/base/232104 Log: Restore the return statement erronously removed in the r232048. Submitted by: cognet Pointy hat to: kib (reuse the one I already got today) MFC after: 13 days Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Fri Feb 24 10:41:58 2012 (r232103) +++ head/sys/kern/kern_exit.c Fri Feb 24 11:02:35 2012 (r232104) @@ -916,6 +916,7 @@ loop: if (status) *status = SIGCONT; + return (0); } PROC_UNLOCK(p); } From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 11:09:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FCDE1065687; Fri, 24 Feb 2012 11:09:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id BF6EF8FC18; Fri, 24 Feb 2012 11:09:26 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:61a6:3c1:817b:1b1c] (unknown [IPv6:2001:7b8:3a7:0:61a6:3c1:817b:1b1c]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id C84B65C37; Fri, 24 Feb 2012 12:09:25 +0100 (CET) Message-ID: <4F476FEA.1090004@FreeBSD.org> Date: Fri, 24 Feb 2012 12:09:30 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120216 Thunderbird/11.0 MIME-Version: 1.0 To: Alexander Best References: <201202232134.q1NLYEq5024067@svn.freebsd.org> <20120224093807.GA88853@freebsd.org> In-Reply-To: <20120224093807.GA88853@freebsd.org> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232074 - head/sys/cam/ctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 11:09:27 -0000 On 2012-02-24 10:38, Alexander Best wrote: > is the clang version in base able to do complete universe builds for i386 and > amd64 without the need for NO_WERROR= and WERROR= now? "universe" means all arches, and all kernel configs, so no. The status for head with clang is as follows: - buildworld with default options, e.g. no WITH_XXX or WITHOUT_XXX settings, will complete without any (fatal) warnings. - buildkernel of the default GENERIC config still has one warning left, in sys/dev/mps/mps_sas.c. It should be simple to fix, but I'm checking it with Ken first. - The LINT kernel configs probably have many warnings left. I haven't tested those extensively. As soon as world & kernel compile without warnings, I'd like to have a tinderbox that continually builds with clang. So head won't be regressing any more. :) > ps: are there any plans to add support for compiling kernel+userland with clang > tot? maybe this can be accomplished by doing something like > > echo "WITH_CLANG_TOT=yes" >> /etc/src.conf I'm not working on this at the moment. Pawel Worach (CC'd) has a buildbot setup that builds FreeBSD daily with clang ToT. Apparently just a few patches are needed. > which will turn all -Wformat-invalid-specifier and -Wformat-extra-args errors > into warnings (because clang tot doesn't support -fformat-extensions)? It would be better to push our format extensions upstream, I think. Though the option should probably be renamed to something else, e.g. -ffreebsd-extensions, or such. From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 11:22:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 903A1106566B; Fri, 24 Feb 2012 11:22:24 +0000 (UTC) Date: Fri, 24 Feb 2012 11:22:24 +0000 From: Alexander Best To: Dimitry Andric Message-ID: <20120224112224.GA13109@freebsd.org> References: <201202232134.q1NLYEq5024067@svn.freebsd.org> <20120224093807.GA88853@freebsd.org> <4F476FEA.1090004@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F476FEA.1090004@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232074 - head/sys/cam/ctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 11:22:24 -0000 On Fri Feb 24 12, Dimitry Andric wrote: > On 2012-02-24 10:38, Alexander Best wrote: > > is the clang version in base able to do complete universe builds for i386 and > > amd64 without the need for NO_WERROR= and WERROR= now? > > "universe" means all arches, and all kernel configs, so no. The status > for head with clang is as follows: i meant with TARGETS=i386 amd64 set. i think this will only do a universe build for those arches. > > - buildworld with default options, e.g. no WITH_XXX or WITHOUT_XXX > settings, will complete without any (fatal) warnings. > - buildkernel of the default GENERIC config still has one warning left, > in sys/dev/mps/mps_sas.c. It should be simple to fix, but I'm > checking it with Ken first. > - The LINT kernel configs probably have many warnings left. I haven't > tested those extensively. > > As soon as world & kernel compile without warnings, I'd like to have a > tinderbox that continually builds with clang. So head won't be > regressing any more. :) yeah good idea. :) > > > > ps: are there any plans to add support for compiling kernel+userland with clang > > tot? maybe this can be accomplished by doing something like > > > > echo "WITH_CLANG_TOT=yes" >> /etc/src.conf > > I'm not working on this at the moment. Pawel Worach (CC'd) has a > buildbot setup that builds FreeBSD daily with clang ToT. Apparently > just a few patches are needed. > > > > which will turn all -Wformat-invalid-specifier and -Wformat-extra-args errors > > into warnings (because clang tot doesn't support -fformat-extensions)? > > It would be better to push our format extensions upstream, I think. > Though the option should probably be renamed to something else, e.g. > -ffreebsd-extensions, or such. i'm still confused regarding the actual politics regarding this change. everytime this comes up i get a different answer. the last one was that since the special printf format is only used for kernel code, the -fformat-extensions code within clang base shouldn't be pushed upstream. personally i like the idea of pushing it upstream and renaming it to -ffreebsd-extensions. that would make it easier to import new clang versions and it would be a lot easier to build freebsd with clang tot. maybe pushing the -fformat-extensions code upstream could happen before freebsd 10.0 gets released. thanks for your answer. cheers. alex From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 11:40:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C6551065672; Fri, 24 Feb 2012 11:40:21 +0000 (UTC) (envelope-from osa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1EC18FC16; Fri, 24 Feb 2012 11:40:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OBeKja057197; Fri, 24 Feb 2012 11:40:20 GMT (envelope-from osa@svn.freebsd.org) Received: (from osa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OBeK4h057193; Fri, 24 Feb 2012 11:40:20 GMT (envelope-from osa@svn.freebsd.org) Message-Id: <201202241140.q1OBeK4h057193@svn.freebsd.org> From: "Sergey A. Osokin" Date: Fri, 24 Feb 2012 11:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232105 - in head/usr.bin/calendar/calendars: hr_HR.ISO8859-2 ru_RU.KOI8-R X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 11:40:21 -0000 Author: osa (ports committer) Date: Fri Feb 24 11:40:20 2012 New Revision: 232105 URL: http://svn.freebsd.org/changeset/base/232105 Log: Add underscore symbol to the end of definition strings to keep all calendar files are consistency. Approved by: edwin MFC after: 1 week Modified: head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici head/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all Modified: head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all ============================================================================== --- head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all Fri Feb 24 11:02:35 2012 (r232104) +++ head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all Fri Feb 24 11:40:20 2012 (r232105) @@ -4,9 +4,9 @@ * $FreeBSD$ */ -#ifndef _hr_HR_ISO8859_2_all -#define _hr_HR_ISO8859_2_all +#ifndef _hr_HR_ISO8859_2_all_ +#define _hr_HR_ISO8859_2_all_ #include -#endif /* !_hr_HR_ISO8859_2_all */ +#endif /* !_hr_HR_ISO8859_2_all_ */ Modified: head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici ============================================================================== --- head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici Fri Feb 24 11:02:35 2012 (r232104) +++ head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici Fri Feb 24 11:40:20 2012 (r232105) @@ -4,8 +4,8 @@ * $FreeBSD$ */ -#ifndef _hr_HR_ISO8859_2_praznici -#define _hr_HR_ISO8859_2_praznici +#ifndef _hr_HR_ISO8859_2_praznici_ +#define _hr_HR_ISO8859_2_praznici_ LANG=hr_HR.ISO8859-2 @@ -41,4 +41,4 @@ Easter+39 Uza¹a¹æe 03/NedjeljaLast Poèetak ljetnog vremena 10/NedjeljaLast Kraj ljetnog vremena -#endif /* !_hr_HR_ISO8859_2_praznici */ +#endif /* !_hr_HR_ISO8859_2_praznici_ */ Modified: head/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all ============================================================================== --- head/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all Fri Feb 24 11:02:35 2012 (r232104) +++ head/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all Fri Feb 24 11:40:20 2012 (r232105) @@ -4,8 +4,8 @@ * $FreeBSD$ */ -#ifndef _ru_RU_KOI8_R_all -#define _ru_RU_KOI8_R_all +#ifndef _ru_RU_KOI8_R_all_ +#define _ru_RU_KOI8_R_all_ #include #include @@ -13,4 +13,4 @@ #include #include -#endif /* !_ru_RU_KOI8_R_all */ +#endif /* !_ru_RU_KOI8_R_all_ */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 12:22:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95F61106566C; Fri, 24 Feb 2012 12:22:30 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F3F28FC08; Fri, 24 Feb 2012 12:22:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OCMUa3058551; Fri, 24 Feb 2012 12:22:30 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OCMU1b058548; Fri, 24 Feb 2012 12:22:30 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202241222.q1OCMU1b058548@svn.freebsd.org> From: Christian Brueffer Date: Fri, 24 Feb 2012 12:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232106 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 12:22:30 -0000 Author: brueffer Date: Fri Feb 24 12:22:29 2012 New Revision: 232106 URL: http://svn.freebsd.org/changeset/base/232106 Log: MFC: r231880,r231915,r231937 Add a manpage for the oce(4) driver. Approved by: re (kib) Added: stable/8/share/man/man4/oce.4 - copied, changed from r231880, head/share/man/man4/oce.4 Modified: stable/8/share/man/man4/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Fri Feb 24 11:40:20 2012 (r232105) +++ stable/8/share/man/man4/Makefile Fri Feb 24 12:22:29 2012 (r232106) @@ -315,6 +315,7 @@ MAN= aac.4 \ ${_nve.4} \ ${_nvram.4} \ ${_nxge.4} \ + oce.4 \ ohci.4 \ orm.4 \ ${_padlock.4} \ Copied and modified: stable/8/share/man/man4/oce.4 (from r231880, head/share/man/man4/oce.4) ============================================================================== --- head/share/man/man4/oce.4 Fri Feb 17 14:02:44 2012 (r231880, copy source) +++ stable/8/share/man/man4/oce.4 Fri Feb 24 12:22:29 2012 (r232106) @@ -36,9 +36,7 @@ .\" .\" $FreeBSD$ .\" - - -.Dd February 14, 2012 +.Dd February 19, 2012 .Dt OCE 4 .Os .Sh NAME @@ -49,64 +47,85 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device pci" .Cd "device oce" .Ed .Pp -To load the driver as a +Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_oce_load="YES" .Ed .Sh DESCRIPTION -Emulex one connect adapters come in various skews and with +Emulex OneConnect adapters come in various skews and with different combinations of NIC, FCoE and iSCSI functions. -oce claims the NIC functions in all these adapters. +The +.Nm +driver claims the NIC functions in all these adapters. .Pp The .Nm driver supports VLAN Hardware offload, TCP checksum offload, TCP segmentation offload (TSO), Large receive offload (LRO), Bonding, Jumbo frames (from 1500 - 9000), Multiple TX queues, -Receive-Side Scaling(RSS) and MSI-X interrupts. +Receive-Side Scaling (RSS) and MSI-X interrupts. .Sh HARDWARE +The .Nm -driver supports the following Emulex network adapters: +driver supports the following network adapters: +.Pp .Bl -bullet -compact .It -BladeEngine 2 +Emulex BladeEngine 2 .It -BladeEngine 3 +Emulex BladeEngine 3 .It -Lancer +Emulex Lancer .El .Sh UPDATING FIRMWARE Adapter firmware updates are persistent. - +.Pp Firmware can be updated by following the steps below: -.nf - 1) Copy the below code to a Makefile - ".KMOD=elxflash - FIRMWS=imagename.ufi:elxflash - .include " - 2) Replace imagename in above with UFI file name. - 3) Copy Makefile and UFI to a directory - 4) Execute make & copy generated elxflash.ko to /lib/modules - 5) sysctl dev.oce..fw_upgrade=elxflash - 6) Reboot the machine. - +.Bl -enum +.It +Copy the below code to a Makefile: +.Pp +.Bd -literal -offset indent +\&.KMOD=elxflash +FIRMWS=imagename.ufi:elxflash +\&.include +.Ed +.It +Replace imagename in above with UFI file name +.It +Copy Makefile and UFI file to a directory +.It +Execute make & copy generated elxflash.ko to +.Pa /lib/modules +.It +sysctl dev.oce..fw_upgrade=elxflash +.It +Reboot the machine +.El +.Pp In case of issues with supplied UFI, flashing fails with one -of the below errors. - 1) "Invalid BE3 firmware image" - 2) "Invalid Cookie. Firmware image corrupted ?" - 3) "cmd to write to flash rom failed." -.fi +of the following errors. +.Pp +.Bl -enum -compact +.It +.Qq Invalid BE3 firmware image +.It +.Qq "Invalid Cookie. Firmware image corrupted ?" +.It +.Qq cmd to write to flash rom failed. +.El .Sh SUPPORT For general information and support, go to the Emulex website at: -.Fa http://www.Emulex.com/ -or E-Mail at -.Fa freebsd-drivers@emulex.com. +.Pa http://www.Emulex.com/ +or E-Mail at +.Pa freebsd-drivers@emulex.com . .Sh SEE ALSO .Xr ifconfig 8 .Sh AUTHORS @@ -114,4 +133,4 @@ or E-Mail at The .Nm driver was written by -.An freebsd-drivers@emulex.com. +.An freebsd-drivers@emulex.com . From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 12:32:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68BB61065674; Fri, 24 Feb 2012 12:32:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 395988FC13; Fri, 24 Feb 2012 12:32:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OCWpYY058896; Fri, 24 Feb 2012 12:32:51 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OCWoaV058893; Fri, 24 Feb 2012 12:32:50 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201202241232.q1OCWoaV058893@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 24 Feb 2012 12:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232107 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 12:32:51 -0000 Author: glebius Date: Fri Feb 24 12:32:50 2012 New Revision: 232107 URL: http://svn.freebsd.org/changeset/base/232107 Log: Merge r230598 by kmacy from head: A flowtable entry can continue referencing an llentry indefinitely if the entry is repeatedly referenced within its timeout window. This change clears the LLE_VALID flag when an llentry is removed from an interface's hash table and adds an extra check to the flowtable code for the LLE_VALID flag in llentry to avoid retaining and using a stale reference. Reviewed by: qingli@ PR: kern/155604 Approved by: re (kib) Modified: stable/8/sys/net/flowtable.c stable/8/sys/net/if_llatbl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/net/flowtable.c ============================================================================== --- stable/8/sys/net/flowtable.c Fri Feb 24 12:22:29 2012 (r232106) +++ stable/8/sys/net/flowtable.c Fri Feb 24 12:32:50 2012 (r232107) @@ -1186,12 +1186,14 @@ keycheck: rt = __DEVOLATILE(struct rtentry *, fle->f_rt); lle = __DEVOLATILE(struct llentry *, fle->f_lle); if ((rt != NULL) + && lle != NULL && fle->f_fhash == hash && flowtable_key_equal(fle, key) && (proto == fle->f_proto) && (fibnum == fle->f_fibnum) && (rt->rt_flags & RTF_UP) - && (rt->rt_ifp != NULL)) { + && (rt->rt_ifp != NULL) + && (lle->la_flags & LLE_VALID)) { fs->ft_hits++; fle->f_uptime = time_uptime; fle->f_flags |= flags; Modified: stable/8/sys/net/if_llatbl.c ============================================================================== --- stable/8/sys/net/if_llatbl.c Fri Feb 24 12:22:29 2012 (r232106) +++ stable/8/sys/net/if_llatbl.c Fri Feb 24 12:32:50 2012 (r232107) @@ -125,6 +125,7 @@ llentry_free(struct llentry *lle) ("%s: la_numheld %d > 0, pkts_droped %zd", __func__, lle->la_numheld, pkts_dropped)); + lle->la_flags &= ~LLE_VALID; LLE_FREE_LOCKED(lle); return (pkts_dropped); From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 12:35:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15D5D106566C; Fri, 24 Feb 2012 12:35:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3AFB8FC0A; Fri, 24 Feb 2012 12:35:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OCZHuk059019; Fri, 24 Feb 2012 12:35:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OCZH2U059017; Fri, 24 Feb 2012 12:35:17 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201202241235.q1OCZH2U059017@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 24 Feb 2012 12:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232108 - head/usr.bin/xargs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 12:35:18 -0000 Author: jilles Date: Fri Feb 24 12:35:17 2012 New Revision: 232108 URL: http://svn.freebsd.org/changeset/base/232108 Log: xargs: If a utility exits with 255 or a signal, write an error message. If a utility called by xargs exits with status 255 or because of a signal, POSIX requires writing an error message. PR: 165155 Submitted by: Matthew Story matthewstory gmail com Modified: head/usr.bin/xargs/xargs.c Modified: head/usr.bin/xargs/xargs.c ============================================================================== --- head/usr.bin/xargs/xargs.c Fri Feb 24 12:32:50 2012 (r232107) +++ head/usr.bin/xargs/xargs.c Fri Feb 24 12:35:17 2012 (r232108) @@ -281,7 +281,7 @@ parse_input(int argc, char *argv[]) case EOF: /* No arguments since last exec. */ if (p == bbp) { - waitchildren(*argv, 1); + waitchildren(*av, 1); exit(rval); } goto arg1; @@ -368,7 +368,7 @@ arg2: } prerun(argc, av); if (ch == EOF || foundeof) { - waitchildren(*argv, 1); + waitchildren(*av, 1); exit(rval); } p = bbp; @@ -608,8 +608,11 @@ waitchildren(const char *name, int waita * If utility signaled or exited with a value of 255, * exit 1-125. */ - if (WIFSIGNALED(status) || WEXITSTATUS(status) == 255) - exit(1); + if (WIFSIGNALED(status)) + errx(1, "%s: terminated with signal %d, aborting", + name, WTERMSIG(status)); + if (WEXITSTATUS(status) == 255) + errx(1, "%s: exited with status 255, aborting", name); if (WEXITSTATUS(status)) rval = 1; } From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 13:20:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18023106566B for ; Fri, 24 Feb 2012 13:20:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (onyx.glenbarber.us [199.48.134.227]) by mx1.freebsd.org (Postfix) with SMTP id A7BED8FC15 for ; Fri, 24 Feb 2012 13:20:07 +0000 (UTC) Received: (qmail 99458 invoked by uid 0); 24 Feb 2012 08:20:06 -0500 Received: from unknown (HELO glenbarber.us) (75.146.225.65) by 0 with SMTP; 24 Feb 2012 08:20:06 -0500 Date: Fri, 24 Feb 2012 08:20:00 -0500 From: Glen Barber To: Christian Brueffer Message-ID: <20120224132000.GA1968@glenbarber.us> References: <201202241222.q1OCMU1b058548@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201202241222.q1OCMU1b058548@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r232106 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 13:20:08 -0000 On Fri, Feb 24, 2012 at 12:22:30PM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Fri Feb 24 12:22:29 2012 > New Revision: 232106 > URL: http://svn.freebsd.org/changeset/base/232106 > > Log: > MFC: r231880,r231915,r231937 > > Add a manpage for the oce(4) driver. > Thanks! From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 14:13:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83935106564A; Fri, 24 Feb 2012 14:13:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DDFD8FC0A; Fri, 24 Feb 2012 14:13:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OED6mC062217; Fri, 24 Feb 2012 14:13:06 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OED6u2062212; Fri, 24 Feb 2012 14:13:06 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202241413.q1OED6u2062212@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 24 Feb 2012 14:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232114 - head/tools/test/netfibs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 14:13:06 -0000 Author: bz Date: Fri Feb 24 14:13:06 2012 New Revision: 232114 URL: http://svn.freebsd.org/changeset/base/232114 Log: Update scripts to work around two sh(1) bugs found in stable/8: 1) _x=$((_x + 1)) does not work while x=$((x + 1)) does. 2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted. Correct typos and improve some details forwarding.sh already had in initiator, esp. related to ipfw accepting if the default is deny. Add an extra stat call to the "delay" function in addition to the touch which together is still a lot faster than sleep 1 but seems to help a lot more to mitigate the unrelated kernel race seen. Sponsored by: Cisco Systems, Inc. Modified: head/tools/test/netfibs/README head/tools/test/netfibs/forwarding.sh head/tools/test/netfibs/initiator.sh head/tools/test/netfibs/reflector.sh Modified: head/tools/test/netfibs/README ============================================================================== --- head/tools/test/netfibs/README Fri Feb 24 13:22:57 2012 (r232113) +++ head/tools/test/netfibs/README Fri Feb 24 14:13:06 2012 (r232114) @@ -35,7 +35,7 @@ initiator.sh and reflector.sh output. A special value of 42 will enable sh(1) xtrace printing. The output format is modeled after Test::Harness Perl as used in - tools/regression/ but not always complaint following the test case name. + tools/regression/ but not always compliant following the test case name. NOTE: at the time of writing reflector.sh can trigger kernel races unrelated to multi-FIB test leading to a panic(9). "delay" calls Modified: head/tools/test/netfibs/forwarding.sh ============================================================================== --- head/tools/test/netfibs/forwarding.sh Fri Feb 24 13:22:57 2012 (r232113) +++ head/tools/test/netfibs/forwarding.sh Fri Feb 24 14:13:06 2012 (r232114) @@ -222,36 +222,36 @@ _reachability_check() reachability_check() { - local _i _rc + local _i rc # Try to reach all control addresses on other nodes. # We need to loop for a while as we cannot expect all to be up # the very same moment. i=1 - _rc=42 - while test ${_rc} -ne 0 -a ${i} -le ${WAITS}; do + rc=42 + while test ${rc} -ne 0 -a ${i} -le ${WAITS}; do print_debug "${i}/${WAITS} trying to ping6 control addresses." - _rc=0 + rc=0 set +e case ${node} in left) _reachability_check ${MIDDLELEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${MIDDLERIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${RIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) ;; middle) _reachability_check ${LEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${RIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) ;; right) _reachability_check ${MIDDLERIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${MIDDLELEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${LEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) ;; esac set -e @@ -390,14 +390,14 @@ test_icmp6() test_ulp_reflect_one() { - local _txt _opts _port _fib + local _txt _opts port fib _txt="$1" _opts="$2" - _port=$3 - _fib=$4 + port=$3 + fib=$4 - print_debug "./reflect -p $((_port + 1 + _fib)) -t ${_txt}" "${_opts}" - ./reflect -p $((_port + 1 + _fib)) -t ${_txt} ${_opts} + print_debug "./reflect -p $((port + 1 + fib)) -t ${_txt}" "${_opts}" + ./reflect -p $((port + 1 + fib)) -t ${_txt} ${_opts} print_debug "reflect '${_txt}' terminated without error." } @@ -463,19 +463,19 @@ nc_send_recv() test_ulp() { - local _maxfibs _msg _addr _port _fib i _txt testno _rc _reply - _maxfibs=$1 + local maxfibs _msg _addr port fib i _txt testno _rc _reply + maxfibs=$1 _msg="$2" _addr=$3 - _port=$4 - _fib=$5 + port=$4 + fib=$5 - printf "1..%d\n" $((${_maxfibs} * 2)) + printf "1..%d\n" $((${maxfibs} * 2)) testno=1 i=0 - while test ${i} -lt ${_maxfibs}; do + while test ${i} -lt ${maxfibs}; do - if test ${i} -eq $((${_maxfibs} - 1)); then + if test ${i} -eq $((${maxfibs} - 1)); then # Last one; signal DONE. _txt="DONE ${_msg}_${i}" else @@ -485,18 +485,18 @@ test_ulp() eval _rc="\${rc_${i}}" # Test TCP. - nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \ - $((${_port} + 1 + _fib)) "" + nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \ + $((${port} + 1 + fib)) "" check_rc $? ${_rc} ${testno} "${_msg}_${i}_tcp" \ - "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}" + "[${_addr}]:$((${port} + 1 + fib)) ${_reply}" testno=$((testno + 1)) sleep 1 # Test UDP. - nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \ - $((${_port} + 1 + _fib)) "-u" + nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \ + $((${port} + 1 + fib)) "-u" check_rc $? ${_rc} ${testno} "${_msg}_${i}_udp" \ - "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}" + "[${_addr}]:$((${port} + 1 + fib)) ${_reply}" sleep 1 i=$((i + 1)) @@ -506,18 +506,18 @@ test_ulp() setup_ipfw_count() { - local i _port _maxfib _p _fib _ofib - _port=$1 - _maxfib=$2 + local i port maxfib _p _fib _ofib + port=$1 + maxfib=$2 _fib=$3 _ofib=$4 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do case ${_ofib} in - -1) _p=$((_port + 1 + i)) ;; - *) _p=$((_port + 1 + _maxfib - 1 - i)) ;; + -1) _p=$((port + 1 + i)) ;; + *) _p=$((port + 1 + maxfib - 1 - i)) ;; esac # Only count ICMP6 echo replies. @@ -532,10 +532,10 @@ setup_ipfw_count() ipfw add $((20000 + i)) count ipv6-icmp from any to any \ icmp6types 128 fib ${i} via ${IFACEFAR} out > /dev/null ipfw add $((20000 + i)) count tcp from any to any \ - dst-port $((${_port} + 1 + i)) fib ${i} \ + dst-port $((${port} + 1 + i)) fib ${i} \ via ${IFACEFAR} out > /dev/null ipfw add $((20000 + i)) count udp from any to any \ - dst-port $((${_port} + 1 + i)) fib ${i} \ + dst-port $((${port} + 1 + i)) fib ${i} \ via ${IFACEFAR} out > /dev/null i=$((i + 1)) @@ -544,7 +544,7 @@ setup_ipfw_count() report_ipfw_count() { - local _fib _o i _rstr _c _req _p _opts + local _fib _o i _rstr _c _req _p _opts base _o="$2" case ${DEBUG} in @@ -553,9 +553,9 @@ report_ipfw_count() esac _rstr="RESULTS " - for _base in 10000 20000; do + for base in 10000 20000; do for _o in i t u; do - case ${_base} in + case ${base} in 10000) _rstr="${_rstr}\nLEFT " ;; 20000) _rstr="${_rstr}\nRIGHT " ;; esac @@ -568,11 +568,11 @@ report_ipfw_count() while test ${i} -lt ${RT_NUMFIBS}; do case "${_o}" in - i) _c=`ipfw show $((${_base} + i)) | \ + i) _c=`ipfw show $((${base} + i)) | \ awk '/ ipv6-icmp / { print $2 }'` ;; - t) _c=`ipfw show $((${_base} + i)) | \ + t) _c=`ipfw show $((${base} + i)) | \ awk '/ tcp / { print $2 }'` ;; - u) _c=`ipfw show $((${_base} + i)) | \ + u) _c=`ipfw show $((${base} + i)) | \ awk '/ udp / { print $2 }'` ;; esac _rstr="${_rstr}${i} ${_c}," @@ -582,7 +582,7 @@ report_ipfw_count() done i=0 while test ${i} -lt ${RT_NUMFIBS}; do - ipfw delete $((${_base} + i)) > /dev/null 2>&1 || true + ipfw delete $((${base} + i)) > /dev/null 2>&1 || true i=$((i + 1)) done done @@ -994,18 +994,18 @@ fwd_fib_symmetric_ipfw() _fwd_fib_asymmetric_results() { - local _n _fib _maxfib i _edge _type _rc + local _n fib maxfib i _edge _type _rc _n="$1" - _fib=$2 - _maxfib=$3 + fib=$2 + maxfib=$3 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do _edge="RIGHT" for _type in "ICMP6" "TCP" "UDP"; do case ${i} in - ${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 + ${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 #print_debug \ # "rc_${_n}_${_edge}_${_type}_${i}=1" ;; @@ -1018,14 +1018,14 @@ _fwd_fib_asymmetric_results() done i=$((i + 1)) done - _fib=$((_maxfib - 1 - _fib)) + fib=$((maxfib - 1 - fib)) i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do _edge="LEFT" for _type in "ICMP6" "TCP" "UDP"; do case ${i} in - ${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 + ${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 #print_debug \ # "rc_${_n}_${_edge}_${_type}_${i}=1" ;; @@ -1073,16 +1073,16 @@ _fwd_fib_asymmetric_left() _fwd_fib_asymmetric_middle_ifconfig() { - local _n _maxfib i + local _n maxfib i _n="$1" - _maxfib=$2 + maxfib=$2 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do ifconfig ${IFACE} fib ${i} - ifconfig ${IFACEFAR} fib $((${_maxfib} - 1 - ${i})) - setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} \ - $((${_maxfib} - 1 - ${i})) + ifconfig ${IFACEFAR} fib $((${maxfib} - 1 - ${i})) + setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} \ + $((${maxfib} - 1 - ${i})) wait_remote_ready "START_${_n}_${i}" ipfw -q zero > /dev/null # Nothing to do for the middle node testing the default. @@ -1095,12 +1095,12 @@ _fwd_fib_asymmetric_middle_ifconfig() _fwd_fib_asymmetric_middle_ipfw() { - local _n _maxfib i j _port + local _n maxfib i j _port _n="$1" - _maxfib=$2 + maxfib=$2 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do _port=$((CTRLPORT + 1 + i)) ipfw add 100 setfib ${i} ipv6-icmp from any to any \ @@ -1110,7 +1110,7 @@ _fwd_fib_asymmetric_middle_ipfw() ipfw add 100 setfib ${i} udp from any to any \ dst-port ${_port} via ${IFACE} in > /dev/null - j=$((${_maxfib} - 1 - ${i})) + j=$((${maxfib} - 1 - ${i})) ipfw add 100 setfib ${j} ipv6-icmp from any to any \ icmp6types 129 via ${IFACEFAR} in > /dev/null ipfw add 100 setfib ${j} tcp from any to any \ @@ -1118,7 +1118,7 @@ _fwd_fib_asymmetric_middle_ipfw() ipfw add 100 setfib ${j} udp from any to any \ src-port ${_port} via ${IFACEFAR} in > /dev/null - setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} ${j} + setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} ${j} wait_remote_ready "START_${_n}_${i}" ipfw -q zero > /dev/null # Nothing to do for the middle node testing the default. Modified: head/tools/test/netfibs/initiator.sh ============================================================================== --- head/tools/test/netfibs/initiator.sh Fri Feb 24 13:22:57 2012 (r232113) +++ head/tools/test/netfibs/initiator.sh Fri Feb 24 14:13:06 2012 (r232114) @@ -219,6 +219,7 @@ send_greeting() # The latter is needed to allow indvidiual less specific later rules # from test cases to just disallow any IPv6 traffic on a matching FIB. ipfw -f flush > /dev/null 2>&1 + ipfw add 65000 permit ip from any to any > /dev/null 2>&1 ipfw add 5 permit ipv6-icmp from any to any icmp6types 135,136 fib 0 \ via ${IFACE} out > /dev/null 2>&1 @@ -255,7 +256,7 @@ EOI PEERLINKLOCAL=${_linklocal} # Swap the zoneid to the local interface scope. - PEERLINKLOCAL="${PEERLINKLOCAL%%\%*}%${IFACE}" + PEERLINKLOCAL=${PEERLINKLOCAL%%\%*}"%${IFACE}" print_debug "Successfully exchanged greeting. Peer at ${PEERLINKLOCAL}" } @@ -510,21 +511,21 @@ testtx_udp6_connected() # testtx_ulp6_connected_blackhole() { - local _fib i _n _o + local fib i _n _o _n="$1" _o="$2" - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 while test ${i} -lt ${RT_NUMFIBS}; do ipfw delete $((100 + i)) > /dev/null 2>&1 || true case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_l=0 eval rc_${i}_a=0 ;; @@ -538,17 +539,17 @@ testtx_ulp6_connected_blackhole() i=$((i + 1)) done - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} case ${DEBUG} in ''|0) ;; *) ipfw show ;; esac - _fib=$((_fib + 1)) + fib=$((fib + 1)) done - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ipfw delete $((100 + _fib)) > /dev/null 2>&1 || true - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ipfw delete $((100 + fib)) > /dev/null 2>&1 || true + fib=$((fib + 1)) done } @@ -584,50 +585,50 @@ testtx_udp6_connected_blackhole() # testtx_ulp6_connected_transfernets() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks and firewall. ipfw delete 10 > /dev/null 2>&1 || true - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias - ipfw add 10 setfib ${_fib} ipv6-icmp from 2001:2:${_fib}::/64 \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias + ipfw add 10 setfib ${fib} ipv6-icmp from 2001:2:${fib}::/64 \ to any ip6 icmp6types 135,136 via ${IFACE} in \ > /dev/null 2>&1 # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Save PEERADDR _p=${PEERADDR} # Run tests. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - PEERADDR=2001:2:${_fib}::2 + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + PEERADDR=2001:2:${fib}::2 - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 while test ${i} -lt ${RT_NUMFIBS}; do eval rc_${i}_l=0 case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_a=0 ;; *) eval rc_${i}_a=1 @@ -636,18 +637,18 @@ testtx_ulp6_connected_transfernets() i=$((i + 1)) done - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} - _fib=$((_fib + 1)) + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} + fib=$((fib + 1)) done # Restore PEERADDR PEERADDR=${_p} # Cleanup transfer networks and firewall. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias + fib=$((fib + 1)) done ipfw delete 10 > /dev/null 2>&1 } @@ -684,46 +685,46 @@ testtx_udp6_connected_transfernets() # testtx_ulp6_connected_ifconfig_transfernets() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Save PEERADDR _p=${PEERADDR} # Run tests. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - PEERADDR=2001:2:${_fib}::2 + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + PEERADDR=2001:2:${fib}::2 - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 while test ${i} -lt ${RT_NUMFIBS}; do eval rc_${i}_l=0 case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_a=0 ;; *) eval rc_${i}_a=1 @@ -732,20 +733,20 @@ testtx_ulp6_connected_ifconfig_transfern i=$((i + 1)) done - ifconfig ${IFACE} fib ${_fib} + ifconfig ${IFACE} fib ${fib} - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} - _fib=$((_fib + 1)) + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} + fib=$((fib + 1)) done # Restore PEERADDR PEERADDR=${_p} # Cleanup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias + fib=$((fib + 1)) done ifconfig ${IFACE} fib 0 } @@ -779,23 +780,23 @@ testtx_udp6_connected_ifconfig_transfern # testtx_ulp6_gateway() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup default gateway and expected error codes. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 || true - setfib -F${_fib} route add -inet6 -net default ${PEERADDR} \ + setfib -F${fib} route add -inet6 -net default ${PEERADDR} \ > /dev/null 2>&1 case "${_o}" in - -i) eval rc_${_fib}_l=0 ;; # ICMPv6 will succeed - *) eval rc_${_fib}_l=1 ;; + -i) eval rc_${fib}_l=0 ;; # ICMPv6 will succeed + *) eval rc_${fib}_l=1 ;; esac - eval rc_${_fib}_a=0 - _fib=$((_fib + 1)) + eval rc_${fib}_a=0 + fib=$((fib + 1)) done # Save PEERADDR @@ -810,11 +811,11 @@ testtx_ulp6_gateway() PEERADDR=${_p} # Cleanup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } @@ -851,38 +852,38 @@ testtx_udp6_gateway() # testtx_ulp6_transfernets_gateways() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks, default routes, and firewall. - _fib=0 + fib=0 ipfw delete 10 > /dev/null 2>&1 || true - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \ > /dev/null 2>&1 - ipfw add 10 setfib ${_fib} ipv6-icmp \ - from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \ + ipfw add 10 setfib ${fib} ipv6-icmp \ + from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \ via ${IFACE} in > /dev/null 2>&1 # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done # Add default route. - setfib -F${_fib} route delete -inet6 -net default \ + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 || true - setfib -F${_fib} route add -inet6 -net default \ - 2001:2:${_fib}::2 > /dev/null 2>&1 - _fib=$((_fib + 1)) + setfib -F${fib} route add -inet6 -net default \ + 2001:2:${fib}::2 > /dev/null 2>&1 + fib=$((fib + 1)) done # Save PEERADDR @@ -908,13 +909,13 @@ testtx_ulp6_transfernets_gateways() PEERADDR=${_p} # Cleanup default routes, transfer networks, and firewall. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done ipfw delete 10 > /dev/null 2>&1 } @@ -954,33 +955,33 @@ testtx_udp6_transfernets_gateways() # testtx_ulp6_transfernets_gateway() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks, default routes, and firewall. - _fib=0 + fib=0 ipfw delete 10 > /dev/null 2>&1 || true - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \ > /dev/null 2>&1 - ipfw add 10 setfib ${_fib} ipv6-icmp \ - from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \ + ipfw add 10 setfib ${fib} ipv6-icmp \ + from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \ via ${IFACE} in > /dev/null 2>&1 # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Save PEERADDR @@ -988,10 +989,10 @@ testtx_ulp6_transfernets_gateway() PEERADDR="2001:2:ff01::2" # Run tests. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 @@ -1001,7 +1002,7 @@ testtx_ulp6_transfernets_gateway() *) eval rc_${i}_l=1 ;; esac case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_a=0 ;; *) eval rc_${i}_a=1 @@ -1011,30 +1012,30 @@ testtx_ulp6_transfernets_gateway() done # Add default route. - setfib -F${_fib} route delete -inet6 -net default \ + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 || true - setfib -F${_fib} route add -inet6 -net default \ - 2001:2:${_fib}::2 > /dev/null 2>&1 + setfib -F${fib} route add -inet6 -net default \ + 2001:2:${fib}::2 > /dev/null 2>&1 - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} # Delete default route again. - setfib -F${_fib} route delete -inet6 -net default \ + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Restore PEERADDR PEERADDR=${_p} # Cleanup default routes, transfer networks, and firewall. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done ipfw delete 10 > /dev/null 2>&1 } @@ -1356,7 +1357,7 @@ testrx_main_setup_rc() testrx_main() { - local _n _o s t _fib _instances _destructive _transfer + local _n _o s t fib _instances _destructive _transfer _n="$1" _o="$2" _instances=$3 @@ -1369,14 +1370,14 @@ testrx_main() for t in ipfw ifconfig; do print_debug "${_n}_${t}" - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do testrx_main_setup_rc "${_n}" "${t}" \ - ${_fib} "${_o}" ${_instances} \ + ${fib} "${_o}" ${_instances} \ ${_destructive} ${_transfer} - _fib=$((_fib + 1)) + fib=$((fib + 1)) done done done @@ -1432,10 +1433,14 @@ testrx_udp6_same_addr_all_fibs_a_time() # # Prereqs. # -kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw +if test `sysctl -n security.jail.jailed` -eq 0; then + kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw -# Reduce the time we wait in case of no reply to 2s. -sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1 + # Reduce the time we wait in case of no reply to 2s. + sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1 +fi +ipfw -f flush > /dev/null 2>&1 || die "please load ipfw in base system" +ipfw add 65000 permit ip from any to any > /dev/null 2>&1 ################################################################################ # @@ -1491,7 +1496,7 @@ for uso in 0 1; do testtx_udp6_transfernets_gateway && sleep 1 done -# Receiver testering. +# Receiver testing. for uso in 0 1; do USE_SOSETFIB=${uso} Modified: head/tools/test/netfibs/reflector.sh ============================================================================== --- head/tools/test/netfibs/reflector.sh Fri Feb 24 13:22:57 2012 (r232113) +++ head/tools/test/netfibs/reflector.sh Fri Feb 24 14:13:06 2012 (r232114) @@ -70,6 +70,7 @@ delay() # sleep 1 is too long. touch /tmp/foo || true + stat /tmp/foo > /dev/null 2>&1 || true } check_rc() @@ -222,7 +223,7 @@ testtx_udp6_connected() # testtx_icmp6_connected_blackhole() { - local _opts _fib + local _opts fib _opts="" case ${DEBUG} in @@ -231,20 +232,20 @@ testtx_icmp6_connected_blackhole() *) _opts="-d" ;; esac - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \ - "-t testtx_icmp6_connected_blackhole${_fib} ${_opts}" + "-t testtx_icmp6_connected_blackhole${fib} ${_opts}" ./reflect -p ${CTRLPORT} -T TCP6 \ - -t testtx_icmp6_connected_blackhole${_fib} ${_opts} + -t testtx_icmp6_connected_blackhole${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } testtx_tcp6_connected_blackhole() { - local _opts _fib + local _opts fib _opts="" case ${DEBUG} in @@ -253,20 +254,20 @@ testtx_tcp6_connected_blackhole() *) _opts="-d" ;; esac - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \ - "-t testtx_tcp6_connected_blackhole${_fib} ${_opts}" + "-t testtx_tcp6_connected_blackhole${fib} ${_opts}" ./reflect -p ${CTRLPORT} -T TCP6 \ - -t testtx_tcp6_connected_blackhole${_fib} ${_opts} + -t testtx_tcp6_connected_blackhole${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } testtx_udp6_connected_blackhole() { - local _opts _fib + local _opts fib _opts="" case ${DEBUG} in @@ -275,14 +276,14 @@ testtx_udp6_connected_blackhole() *) _opts="-d" ;; esac - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do print_debug "./reflect -p ${CTRLPORT} -T UDP6 " \ - "-t testtx_udp6_connected_blackhole${_fib} ${_opts}" + "-t testtx_udp6_connected_blackhole${fib} ${_opts}" ./reflect -p ${CTRLPORT} -T UDP6 \ - -t testtx_udp6_connected_blackhole${_fib} ${_opts} + -t testtx_udp6_connected_blackhole${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } @@ -290,7 +291,7 @@ testtx_udp6_connected_blackhole() # testtx_ulp6_connected_transfernets() { - local _opts _fib _n _o + local _opts fib _n _o _n="$1" _o="$2" @@ -302,28 +303,28 @@ testtx_ulp6_connected_transfernets() esac # Setup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} \ - ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 alias - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} \ + ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 alias + fib=$((fib + 1)) done - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts}" - ./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts} + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts}" + ./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Cleanup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} \ - ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 -alias + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} \ + ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 -alias delay - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } @@ -420,7 +421,7 @@ testtx_udp6_gateway() # testtx_ulp6_transfernets_gateways() { - local _opts _fib _n _o + local _opts fib _n _o *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 15:34:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 159D41065677; Fri, 24 Feb 2012 15:34:37 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 009FE8FC17; Fri, 24 Feb 2012 15:34:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OFYahJ064754; Fri, 24 Feb 2012 15:34:36 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OFYa6W064752; Fri, 24 Feb 2012 15:34:36 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201202241534.q1OFYa6W064752@svn.freebsd.org> From: Colin Percival Date: Fri, 24 Feb 2012 15:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232115 - stable/8/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 15:34:37 -0000 Author: cperciva Date: Fri Feb 24 15:34:36 2012 New Revision: 232115 URL: http://svn.freebsd.org/changeset/base/232115 Log: MFC 230184, 230185: Add XENHVM config file to i386 Approved by: re (kib) Added: stable/8/sys/i386/conf/XENHVM (contents, props changed) - copied, changed from r230184, head/sys/i386/conf/XENHVM Modified: Directory Properties: stable/8/sys/ (props changed) Copied and modified: stable/8/sys/i386/conf/XENHVM (from r230184, head/sys/i386/conf/XENHVM) ============================================================================== --- head/sys/i386/conf/XENHVM Mon Jan 16 02:42:16 2012 (r230184, copy source) +++ stable/8/sys/i386/conf/XENHVM Fri Feb 24 15:34:36 2012 (r232115) @@ -1,5 +1,5 @@ # -# XENHVM -- Xen HVM kernel configuration file for FreeBSD/amd64 +# XENHVM -- Xen HVM kernel configuration file for FreeBSD/i386 # # $FreeBSD$ # From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 15:40:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74666106566B; Fri, 24 Feb 2012 15:40:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.freebsd.org (Postfix) with ESMTP id 075858FC19; Fri, 24 Feb 2012 15:40:46 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1OFeh7X026363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Feb 2012 02:40:45 +1100 Date: Sat, 25 Feb 2012 02:40:43 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jung-uk Kim In-Reply-To: <201202232003.13676.jkim@FreeBSD.org> Message-ID: <20120225023342.V1150@besplex.bde.org> References: <201202231916.q1NJG5Oj019386@svn.freebsd.org> <201202231917.32499.jkim@FreeBSD.org> <4F46D8C4.2030401@FreeBSD.org> <201202232003.13676.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Doug Barton , "src-committers@freebsd.org" Subject: Re: svn commit: r232065 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 15:40:47 -0000 On Thu, 23 Feb 2012, Jung-uk Kim wrote: > On Thursday 23 February 2012 07:24 pm, Doug Barton wrote: >> On 02/23/2012 16:17, Jung-uk Kim wrote: >>> I remember there were some discussions in developers@ that >>> "2009-2012" is more appropriate than "2009, 2010, 2012" or >>> "2009-2010, 2012", if my memory serves. Anyone? >> >> "2009, 2010, 2012" is as synonym for "2009-2010, 2012" and I see it >> both ways. That's not the issue. (However, if it were 2008-2010 >> that is generally preferred vs. listing all 3 years individually.) >> >> The issue is that it's a basic tenet of copyright law that you >> cannot claim copyright in a year that you didn't actually make any >> changes. This makes sense if you think about it ... your rights >> from the last year you changed something don't expire at the end of >> that year, and if you didn't make changes in 2011 you don't have >> any new material that needs protection. Make changes or publish them? What about limited publication? > I am not a lawyer but I do know the date is optional, at least in the > US. I just googled a bit. Some people say "first-last" form is > fine. Some say otherwise. Also, it seems it depends on where they > live. Is there any authoritative answer from the Foundation, I > wonder? > >> For instance: >> >> Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, >> 1994 The Regents of the University of California. All rights >> reserved. > > Yeah, I know that example very well. I've seen that copyright notice > for two decades or so. :-) Did they not work on it in 1981, 1982, 1984, 1985, 1987, 1988, 1990? Seems unlikely :-). Of course, they just didn't publish it. Gaps won't exist now, since there is more pressure to publish and a public repository gives a publication every nanosecond. I look (sic) forward to reading the 2000-4000 copyright, which resembles $(jot 2000 2000). Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 17:26:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 653BC106564A; Fri, 24 Feb 2012 17:26:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50CD28FC13; Fri, 24 Feb 2012 17:26:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OHQ6VZ072385; Fri, 24 Feb 2012 17:26:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OHQ6cQ072383; Fri, 24 Feb 2012 17:26:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201202241726.q1OHQ6cQ072383@svn.freebsd.org> From: John Baldwin Date: Fri, 24 Feb 2012 17:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232116 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 17:26:06 -0000 Author: jhb Date: Fri Feb 24 17:26:06 2012 New Revision: 232116 URL: http://svn.freebsd.org/changeset/base/232116 Log: Adjust the nfs_skip_wcc_data_onerr setting so that it does not block post-op attributes for ENOENT errors now that the name caching logic depends on working post-op attributes. MFC after: 2 weeks Modified: head/sys/nfsclient/nfs_krpc.c Modified: head/sys/nfsclient/nfs_krpc.c ============================================================================== --- head/sys/nfsclient/nfs_krpc.c Fri Feb 24 15:34:36 2012 (r232115) +++ head/sys/nfsclient/nfs_krpc.c Fri Feb 24 17:26:06 2012 (r232116) @@ -603,13 +603,15 @@ tryagain: if (error == ESTALE) nfs_purgecache(vp); /* - * Skip wcc data on NFS errors for now. NetApp filers - * return corrupt postop attrs in the wcc data for NFS - * err EROFS. Not sure if they could return corrupt - * postop attrs for others errors. + * Skip wcc data on non-ENOENT NFS errors for now. + * NetApp filers return corrupt postop attrs in the + * wcc data for NFS err EROFS. Not sure if they could + * return corrupt postop attrs for others errors. + * Blocking ENOENT post-op attributes breaks negative + * name caching, so always allow it through. */ if ((nmp->nm_flag & NFSMNT_NFSV3) && - !nfs_skip_wcc_data_onerr) { + (!nfs_skip_wcc_data_onerr || error == ENOENT)) { *mrp = mrep; *mdp = md; *dposp = dpos; From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 17:27:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 993CA1065673; Fri, 24 Feb 2012 17:27:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.freebsd.org (Postfix) with ESMTP id 2DABF8FC17; Fri, 24 Feb 2012 17:27:37 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1OHRZGY012949 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Feb 2012 04:27:36 +1100 Date: Sat, 25 Feb 2012 04:27:35 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jilles Tjoelker In-Reply-To: <201202241235.q1OCZH2U059017@svn.freebsd.org> Message-ID: <20120225024051.C1150@besplex.bde.org> References: <201202241235.q1OCZH2U059017@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232108 - head/usr.bin/xargs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 17:27:38 -0000 On Fri, 24 Feb 2012, Jilles Tjoelker wrote: > Log: > xargs: If a utility exits with 255 or a signal, write an error message. > > If a utility called by xargs exits with status 255 or because of a signal, > POSIX requires writing an error message. Is an exit status of 255 really possible? I thought that there was magic for the top bit. But testing reminded me that at the level of a single exit(), the magic in the top bit is for signals, and showed that WIFSIGNALED() is broken for signal 127: % #include % % #include % #include % #include % #include % % int % main(void) % { % int status; % % switch (fork()) { % case -1: % default: % wait(&status); % printf("CONTINUED = %d\n", WIFCONTINUED(status)); % printf("EXITED = %d\n", WIFEXITED(status)); % printf("SIGNALED = %d\n", WIFSIGNALED(status)); % printf("STOPPED = %d\n", WIFSTOPPED(status)); % printf("EXITSTATUS = %d\n", WEXITSTATUS(status)); % printf("TERMSIG = %d\n", WTERMSIG(status)); % printf("COREDUMP = %d\n", WCOREDUMP(status)); % printf("STOPSIG = %d\n", WSTOPSIG(status)); % printf("status = %#x\n", status); % exit(0); % case 0: % kill(getpid(), 127); % } % } This prints SIGNALED = 0 and STOPPED = 1, when it should print SIGNALED = 1 and STOPPED = 0. This is because the special _WSTATUS() of 127 is _WSTOPPED and this cannot be distinguished from an actual signal 127. Probably this signal should be disallowed. (The magic in the top bit is just the core dump flag. Signals 128-255 are already disallowed, so they don't give ambiguity.) Utilities are quite broken near here too: - under FreeBSD-~5.2: - bash-1(1) exit status messages, bash-1 builtin kill, kill(1), killall(1), and time(1) don't support signals >= 32, and give cryptic error messages - kill(2) with signal 127 works, but after ktracing processes killed by it, kdump(1) dumps core. - kill(2) with signal 126 works, but bash-1 exits when a sub-process does this. (Bash-1 also exits for kill on a nonexisting process.) After ktrace is run under /bin/sh, kdump dumps core. - kill(2) with signal 32 works, but bash-1 is broken as for signal 126. kdump now doesn't dump core, but prints PSIG(null). - under -current: - utilities still don't support signals >= 32, but give better error messages. - kill(2) with signal 127 works, but bash prints the bogus termination message "Stopped ..." for it. Apparently it us confused by the above bug in WIFSTOPPED()/WIFSIGNALED(). Job control is broken by this, but the breakage is not very noticeable -- the jobs command shows many jobs for the dead processes, and you can clean it out by trying to resume these jobs. - /bin/sh is similarly confused, but prints "Suspended ..." instead of "Stopped ...". - kdump now works. Support for 128 signals was added to the kernel in 1999 in time for FreeBSD-4, so even FreeBSD-5 userland shouldn't be so broken. However, ISTR a PR about problems with specifically signal 127, and thought that is was already disallowed. > Modified: head/usr.bin/xargs/xargs.c > ============================================================================== > --- head/usr.bin/xargs/xargs.c Fri Feb 24 12:32:50 2012 (r232107) > +++ head/usr.bin/xargs/xargs.c Fri Feb 24 12:35:17 2012 (r232108) > @@ -608,8 +608,11 @@ waitchildren(const char *name, int waita > * If utility signaled or exited with a value of 255, > * exit 1-125. > */ This comment didn't match the code before (the code always exited with status 1), and is now further from matching the code. This comment is hard to parse. > - if (WIFSIGNALED(status) || WEXITSTATUS(status) == 255) > - exit(1); > + if (WIFSIGNALED(status)) > + errx(1, "%s: terminated with signal %d, aborting", > + name, WTERMSIG(status)); This misclassifies signal 127 due to the above bug. > + if (WEXITSTATUS(status) == 255) > + errx(1, "%s: exited with status 255, aborting", name); > if (WEXITSTATUS(status)) > rval = 1; Neither WIFSTOPPED() nor WIFEXITED() are tested, so the result of the misclassification is turning signal 127 into a normal exit with status 0. A normal WIFSTOPPED() should not get here, else job control would just break xargs, so the bug can probably be worked around by turning WIFSTOPPED() into WIFSIGNALED() here, or just blindly using WTERMSIG() != 0 to classify signals. The messages have a grammar error (comma splice). > } > The magic for the top bit is when exit statuses are combined with signal statuses and bits are lost by forcing them through an 8-bit filter (perhaps another exit()). Shells report signal n as $? = (0x80 | n). When n is 127, shells are not quite confused enough to turn the status into 0 -- they just turn n into 0, giving status 0x80. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 17:50:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED68E1065679; Fri, 24 Feb 2012 17:50:23 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D823D8FC1A; Fri, 24 Feb 2012 17:50:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OHoN2F074528; Fri, 24 Feb 2012 17:50:23 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OHoNbl074526; Fri, 24 Feb 2012 17:50:23 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201202241750.q1OHoNbl074526@svn.freebsd.org> From: Alan Cox Date: Fri, 24 Feb 2012 17:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232117 - in stable/9/sys: i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 17:50:24 -0000 Author: alc Date: Fri Feb 24 17:50:23 2012 New Revision: 232117 URL: http://svn.freebsd.org/changeset/base/232117 Log: MFC r231904 Close a race due to dropping of the map lock between creating a map entry for a shared mapping and marking the entry for inheritance. Modified: stable/9/sys/kern/sysv_shm.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/kern/sysv_shm.c ============================================================================== --- stable/9/sys/kern/sysv_shm.c Fri Feb 24 17:26:06 2012 (r232116) +++ stable/9/sys/kern/sysv_shm.c Fri Feb 24 17:50:23 2012 (r232117) @@ -413,14 +413,12 @@ kern_shmat(td, shmid, shmaddr, shmflg) vm_object_reference(shmseg->object); rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object, 0, &attach_va, size, (flags & MAP_FIXED) ? VMFS_NO_SPACE : - VMFS_ANY_SPACE, prot, prot, 0); + VMFS_ANY_SPACE, prot, prot, MAP_INHERIT_SHARE); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg->object); error = ENOMEM; goto done2; } - vm_map_inherit(&p->p_vmspace->vm_map, - attach_va, attach_va + size, VM_INHERIT_SHARE); shmmap_s->va = attach_va; shmmap_s->shmid = shmid; From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 17:50:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EB341065677; Fri, 24 Feb 2012 17:50:36 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 602378FC1D; Fri, 24 Feb 2012 17:50:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OHoaUT074575; Fri, 24 Feb 2012 17:50:36 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OHoaol074573; Fri, 24 Feb 2012 17:50:36 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202241750.q1OHoaol074573@svn.freebsd.org> From: Andrew Thompson Date: Fri, 24 Feb 2012 17:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232118 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 17:50:36 -0000 Author: thompsa Date: Fri Feb 24 17:50:36 2012 New Revision: 232118 URL: http://svn.freebsd.org/changeset/base/232118 Log: Only look for a usable MAC address for the bridge ID from ports within our bridge, this allows us to have more than one independent bridge in the same STP domain. PR: kern/164369 Submitted by: Nikos Vassiliadis (earlier version) MFC after: 2 weeks Modified: head/sys/net/bridgestp.c Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Fri Feb 24 17:50:23 2012 (r232117) +++ head/sys/net/bridgestp.c Fri Feb 24 17:50:36 2012 (r232118) @@ -2013,24 +2013,33 @@ bstp_reinit(struct bstp_state *bs) struct bstp_port *bp; struct ifnet *ifp, *mif; u_char *e_addr; + void *bridgeptr; static const u_char llzero[ETHER_ADDR_LEN]; /* 00:00:00:00:00:00 */ BSTP_LOCK_ASSERT(bs); + if (LIST_EMPTY(&bs->bs_bplist)) + goto disablestp; + mif = NULL; + bridgeptr = LIST_FIRST(&bs->bs_bplist)->bp_ifp->if_bridge; + KASSERT(bridgeptr != NULL, ("Invalid bridge pointer")); /* * Search through the Ethernet adapters and find the one with the - * lowest value. The adapter which we take the MAC address from does - * not need to be part of the bridge, it just needs to be a unique - * value. + * lowest value. Make sure the adapter which we take the MAC address + * from is part of this bridge, so we can have more than one independent + * bridges in the same STP domain. */ IFNET_RLOCK_NOSLEEP(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_type != IFT_ETHER) - continue; + continue; /* Not Ethernet */ + + if (ifp->if_bridge != bridgeptr) + continue; /* Not part of our bridge */ if (bstp_addr_cmp(IF_LLADDR(ifp), llzero) == 0) - continue; + continue; /* No mac address set */ if (mif == NULL) { mif = ifp; @@ -2042,21 +2051,8 @@ bstp_reinit(struct bstp_state *bs) } } IFNET_RUNLOCK_NOSLEEP(); - - if (LIST_EMPTY(&bs->bs_bplist) || mif == NULL) { - /* Set the bridge and root id (lower bits) to zero */ - bs->bs_bridge_pv.pv_dbridge_id = - ((uint64_t)bs->bs_bridge_priority) << 48; - bs->bs_bridge_pv.pv_root_id = bs->bs_bridge_pv.pv_dbridge_id; - bs->bs_root_pv = bs->bs_bridge_pv; - /* Disable any remaining ports, they will have no MAC address */ - LIST_FOREACH(bp, &bs->bs_bplist, bp_next) { - bp->bp_infois = BSTP_INFO_DISABLED; - bstp_set_port_role(bp, BSTP_ROLE_DISABLED); - } - callout_stop(&bs->bs_bstpcallout); - return; - } + if (mif == NULL) + goto disablestp; e_addr = IF_LLADDR(mif); bs->bs_bridge_pv.pv_dbridge_id = @@ -2084,6 +2080,20 @@ bstp_reinit(struct bstp_state *bs) bstp_assign_roles(bs); bstp_timer_start(&bs->bs_link_timer, BSTP_LINK_TIMER); + return; + +disablestp: + /* Set the bridge and root id (lower bits) to zero */ + bs->bs_bridge_pv.pv_dbridge_id = + ((uint64_t)bs->bs_bridge_priority) << 48; + bs->bs_bridge_pv.pv_root_id = bs->bs_bridge_pv.pv_dbridge_id; + bs->bs_root_pv = bs->bs_bridge_pv; + /* Disable any remaining ports, they will have no MAC address */ + LIST_FOREACH(bp, &bs->bs_bplist, bp_next) { + bp->bp_infois = BSTP_INFO_DISABLED; + bstp_set_port_role(bp, BSTP_ROLE_DISABLED); + } + callout_stop(&bs->bs_bstpcallout); } static int From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 17:53:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77488106566C; Fri, 24 Feb 2012 17:53:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62EBA8FC13; Fri, 24 Feb 2012 17:53:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OHrOCf074868; Fri, 24 Feb 2012 17:53:24 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OHrO7F074866; Fri, 24 Feb 2012 17:53:24 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202241753.q1OHrO7F074866@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 24 Feb 2012 17:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232119 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 17:53:24 -0000 Author: jkim Date: Fri Feb 24 17:53:24 2012 New Revision: 232119 URL: http://svn.freebsd.org/changeset/base/232119 Log: Fix mdoc style nits. Start new sentences on new lines. Reported by: brueffer Modified: head/share/man/man4/amdtemp.4 Modified: head/share/man/man4/amdtemp.4 ============================================================================== --- head/share/man/man4/amdtemp.4 Fri Feb 24 17:50:36 2012 (r232118) +++ head/share/man/man4/amdtemp.4 Fri Feb 24 17:53:24 2012 (r232119) @@ -80,7 +80,8 @@ tunable: .Bl -tag -width indent .It Va dev.amdtemp.%d.sensor_offset .El -Add the given offset to the temperature of the sensor. Default is 0. +Add the given offset to the temperature of the sensor. +Default is 0. .Sh SEE ALSO .Xr loader 8 , .Xr sysctl 8 @@ -98,10 +99,10 @@ For Family 10h and later processors, .Do (the reported temperature) is a non-physical temperature measured on an arbitrary scale and it does not represent an actual physical -temperature like die or case temperature. Instead, it specifies -the processor temperature relative to the point at which the system -must supply the maximum cooling for the processor's specified maximum -case temperature and maximum thermal power dissipation +temperature like die or case temperature. +Instead, it specifies the processor temperature relative to the point +at which the system must supply the maximum cooling for the processor's +specified maximum case temperature and maximum thermal power dissipation .Dc according to .Rs From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 17:57:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B9F910656E7; Fri, 24 Feb 2012 17:57:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au [211.29.132.197]) by mx1.freebsd.org (Postfix) with ESMTP id 24AFE8FC22; Fri, 24 Feb 2012 17:57:25 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1OHvNao001072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Feb 2012 04:57:24 +1100 Date: Sat, 25 Feb 2012 04:57:23 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin In-Reply-To: <201202232108.q1NL8LeB023212@svn.freebsd.org> Message-ID: <20120225044912.Y2319@besplex.bde.org> References: <201202232108.q1NL8LeB023212@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232072 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 17:57:26 -0000 On Thu, 23 Feb 2012, John Baldwin wrote: > Log: > Pretty-print the advice constants passed to posix_fadvise(2). > Modified: head/usr.bin/kdump/kdump.c > ============================================================================== > --- head/usr.bin/kdump/kdump.c Thu Feb 23 21:07:16 2012 (r232071) > +++ head/usr.bin/kdump/kdump.c Thu Feb 23 21:08:21 2012 (r232072) > @@ -1014,6 +1014,15 @@ ktrsyscall(struct ktr_syscall *ktr, u_in > } > capname(arg); > break; > + case SYS_posix_fadvise: > + print_number(ip,narg,c); > + print_number(ip,narg,c); > + print_number(ip,narg,c); > ... Any chance of prettyprinting the sources too? The (macro) definition was already uglyprinted, but kdump is fairly KNF-conformant (unlike truss), and doesn't use uglyprinting when invoking print_number() except for here. > Modified: head/usr.bin/kdump/mksubr > ============================================================================== > --- head/usr.bin/kdump/mksubr Thu Feb 23 21:07:16 2012 (r232071) > +++ head/usr.bin/kdump/mksubr Thu Feb 23 21:08:21 2012 (r232072) > @@ -340,6 +340,7 @@ auto_or_type "accessmodename" " > auto_switch_type "acltypename" "ACL_TYPE_[A-Z4_]+[[:space:]]+0x[0-9]+" "sys/acl.h" > auto_or_type "capname" "CAP_[A-Z]+[[:space:]]+0x[01248]{16}ULL" "sys/capability.h" > auto_switch_type "extattrctlname" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/extattr.h" > +auto_switch_type "fadvisebehavname" "POSIX_FADV_[A-Z]+[[:space:]]+[0-9]+" "sys/fcntl.h" > auto_or_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" > auto_or_type "flockname" "LOCK_[A-Z]+[[:space:]]+0x[0-9]+" "sys/fcntl.h" > auto_or_type "getfsstatflagsname" "MNT_[A-Z]+[[:space:]]+[1-9][0-9]*" "sys/mount.h" It's hard to avoid uglyprinting here. The regexps alone make it unreadable. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 19:31:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D674106566B; Fri, 24 Feb 2012 19:31:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id D65EA8FC18; Fri, 24 Feb 2012 19:31:31 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1OJVS9w030372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Feb 2012 06:31:29 +1100 Date: Sat, 25 Feb 2012 06:31:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Best In-Reply-To: <20120224112224.GA13109@freebsd.org> Message-ID: <20120225061506.C2626@besplex.bde.org> References: <201202232134.q1NLYEq5024067@svn.freebsd.org> <20120224093807.GA88853@freebsd.org> <4F476FEA.1090004@FreeBSD.org> <20120224112224.GA13109@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r232074 - head/sys/cam/ctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 19:31:32 -0000 On Fri, 24 Feb 2012, Alexander Best wrote: > On Fri Feb 24 12, Dimitry Andric wrote: >> On 2012-02-24 10:38, Alexander Best wrote: >>> which will turn all -Wformat-invalid-specifier and -Wformat-extra-args errors >>> into warnings (because clang tot doesn't support -fformat-extensions)? >> >> It would be better to push our format extensions upstream, I think. >> Though the option should probably be renamed to something else, e.g. >> -ffreebsd-extensions, or such. It is only for format extensions. The idea is that a C compiler that supports warning about unsupported printf formats must warn about uses of format extensions (no matter whose they are) unless instructed not to do so. It seems excessive to have separate flags -fbsd-format-extensions -ffreebsd-format-extensions -fotherbsd-format-extensions -fgnu-format-extensions -flinux-format-extensions ..., so I used a single flag. If -fbsd-format-extensions existed, then it would have only %b as an extension. Anyway, clang already supports -fformat-extensions. The following compiles with this, but fails messily without it: % #include % % void % foo(void) % { % printf("0x%b\n", 1, "\1foo"); % } gcc (FreeBSD-gcc) complains about %#b, but clang doesn't. I don't know if %#b is valid, but it should be. > i'm still confused regarding the actual politics regarding this change. > everytime this comes up i get a different answer. the last one was that since > the special printf format is only used for kernel code, the -fformat-extensions > code within clang base shouldn't be pushed upstream. Is it only the FreeBSD version of clang that has it? Does FreeBSD has any other significant local changes? The flag should be push upstream, but there are likely to always be OS-specific details. For example, if %#b is indeed invalid and someone fixes the kernel to support it, you don't want to have to wait for the upstream sources to be synchronized before using %#b. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 20:06:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C29EE1065670; Fri, 24 Feb 2012 20:06:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A39498FC15; Fri, 24 Feb 2012 20:06:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OK64V9081798; Fri, 24 Feb 2012 20:06:04 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OK643o081794; Fri, 24 Feb 2012 20:06:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202242006.q1OK643o081794@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 24 Feb 2012 20:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232127 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 20:06:04 -0000 Author: bz Date: Fri Feb 24 20:06:04 2012 New Revision: 232127 URL: http://svn.freebsd.org/changeset/base/232127 Log: In selectroute() add a missing fibnum argument to an in6_rtalloc() call in an #if 0 section. In in6_selecthlim() optimize a case where in6p cannot be NULL due to an earlier check. More consistently use u_int instead of int for fibnum function arguments. Sponsored by: Cisco Systems, Inc. MFC after: 3 days Modified: head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_output.c head/sys/netinet6/ip6_var.h Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Fri Feb 24 19:29:50 2012 (r232126) +++ head/sys/netinet6/in6_src.c Fri Feb 24 20:06:04 2012 (r232127) @@ -129,10 +129,10 @@ VNET_DEFINE(int, ip6_prefer_tempaddr) = static int selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, int, int)); + struct rtentry **, int, u_int)); static int in6_selectif __P((struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *ro, struct ifnet **, - struct ifnet *, int)); + struct ifnet *, u_int)); static struct in6_addrpolicy *lookup_addrsel_policy(struct sockaddr_in6 *); @@ -518,7 +518,7 @@ in6_selectsrc(struct sockaddr_in6 *dstso static int selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct route_in6 *ro, - struct ifnet **retifp, struct rtentry **retrt, int norouteok, int fibnum) + struct ifnet **retifp, struct rtentry **retrt, int norouteok, u_int fibnum) { int error = 0; struct ifnet *ifp = NULL; @@ -630,7 +630,7 @@ selectroute(struct sockaddr_in6 *dstsock *satosin6(&ron->ro_dst) = *sin6_next; } if (ron->ro_rt == NULL) { - in6_rtalloc(ron); /* multi path case? */ + in6_rtalloc(ron, fibnum); /* multi path case? */ if (ron->ro_rt == NULL || !(ron->ro_rt->rt_flags & RTF_LLINFO)) { if (ron->ro_rt) { @@ -761,7 +761,7 @@ selectroute(struct sockaddr_in6 *dstsock static int in6_selectif(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct route_in6 *ro, struct ifnet **retifp, - struct ifnet *oifp, int fibnum) + struct ifnet *oifp, u_int fibnum) { int error; struct route_in6 sro; @@ -836,7 +836,7 @@ in6_selectroute(struct sockaddr_in6 *dst int in6_selectroute_fib(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct route_in6 *ro, - struct ifnet **retifp, struct rtentry **retrt, int fibnum) + struct ifnet **retifp, struct rtentry **retrt, u_int fibnum) { return (selectroute(dstsock, opts, mopts, ro, retifp, @@ -867,8 +867,7 @@ in6_selecthlim(struct inpcb *in6p, struc ro6.ro_dst.sin6_family = AF_INET6; ro6.ro_dst.sin6_len = sizeof(struct sockaddr_in6); ro6.ro_dst.sin6_addr = in6p->in6p_faddr; - in6_rtalloc(&ro6, in6p ? in6p->inp_inc.inc_fibnum : - RT_DEFAULT_FIB); + in6_rtalloc(&ro6, in6p->inp_inc.inc_fibnum); if (ro6.ro_rt) { lifp = ro6.ro_rt->rt_ifp; RTFREE(ro6.ro_rt); Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Fri Feb 24 19:29:50 2012 (r232126) +++ head/sys/netinet6/ip6_output.c Fri Feb 24 20:06:04 2012 (r232127) @@ -142,7 +142,7 @@ static int ip6_insertfraghdr __P((struct static int ip6_insert_jumboopt(struct ip6_exthdrs *, u_int32_t); static int ip6_splithdr(struct mbuf *, struct ip6_exthdrs *); static int ip6_getpmtu __P((struct route_in6 *, struct route_in6 *, - struct ifnet *, struct in6_addr *, u_long *, int *, int)); + struct ifnet *, struct in6_addr *, u_long *, int *, u_int)); static int copypktopts(struct ip6_pktopts *, struct ip6_pktopts *, int); @@ -1324,7 +1324,7 @@ ip6_insertfraghdr(struct mbuf *m0, struc static int ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro, struct ifnet *ifp, struct in6_addr *dst, u_long *mtup, - int *alwaysfragp, int fibnum) + int *alwaysfragp, u_int fibnum) { u_int32_t mtu = 0; int alwaysfrag = 0; Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Fri Feb 24 19:29:50 2012 (r232126) +++ head/sys/netinet6/ip6_var.h Fri Feb 24 20:06:04 2012 (r232127) @@ -447,7 +447,7 @@ int in6_selectroute __P((struct sockaddr struct rtentry **)); int in6_selectroute_fib(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, int); + struct rtentry **, u_int); u_int32_t ip6_randomid __P((void)); u_int32_t ip6_randomflowlabel __P((void)); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 20:12:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E10E2106564A; Fri, 24 Feb 2012 20:12:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD4108FC15; Fri, 24 Feb 2012 20:12:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1OKCrHd082048; Fri, 24 Feb 2012 20:12:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1OKCrEu082046; Fri, 24 Feb 2012 20:12:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201202242012.q1OKCrEu082046@svn.freebsd.org> From: John Baldwin Date: Fri, 24 Feb 2012 20:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232128 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 20:12:54 -0000 Author: jhb Date: Fri Feb 24 20:12:53 2012 New Revision: 232128 URL: http://svn.freebsd.org/changeset/base/232128 Log: Fix style in previous commit. Submitted by: bde Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Fri Feb 24 20:06:04 2012 (r232127) +++ head/usr.bin/kdump/kdump.c Fri Feb 24 20:12:53 2012 (r232128) @@ -1015,9 +1015,9 @@ ktrsyscall(struct ktr_syscall *ktr, u_in capname(arg); break; case SYS_posix_fadvise: - print_number(ip,narg,c); - print_number(ip,narg,c); - print_number(ip,narg,c); + print_number(ip, narg, c); + print_number(ip, narg, c); + print_number(ip, narg, c); (void)putchar(','); fadvisebehavname((int)*ip); ip++; From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 20:31:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D3F3106564A; Fri, 24 Feb 2012 20:31:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D34638FC13; Fri, 24 Feb 2012 20:31:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 6D6E346B0A; Fri, 24 Feb 2012 15:31:12 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EDD0DB940; Fri, 24 Feb 2012 15:31:11 -0500 (EST) From: John Baldwin To: Bruce Evans Date: Fri, 24 Feb 2012 15:12:23 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201202232108.q1NL8LeB023212@svn.freebsd.org> <20120225044912.Y2319@besplex.bde.org> In-Reply-To: <20120225044912.Y2319@besplex.bde.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201202241512.23271.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 24 Feb 2012 15:31:12 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232072 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 20:31:13 -0000 On Friday, February 24, 2012 12:57:23 pm Bruce Evans wrote: > On Thu, 23 Feb 2012, John Baldwin wrote: > > > Log: > > Pretty-print the advice constants passed to posix_fadvise(2). > > > Modified: head/usr.bin/kdump/kdump.c > > ============================================================================== > > --- head/usr.bin/kdump/kdump.c Thu Feb 23 21:07:16 2012 (r232071) > > +++ head/usr.bin/kdump/kdump.c Thu Feb 23 21:08:21 2012 (r232072) > > @@ -1014,6 +1014,15 @@ ktrsyscall(struct ktr_syscall *ktr, u_in > > } > > capname(arg); > > break; > > + case SYS_posix_fadvise: > > + print_number(ip,narg,c); > > + print_number(ip,narg,c); > > + print_number(ip,narg,c); > > ... > > Any chance of prettyprinting the sources too? The (macro) definition > was already uglyprinted, but kdump is fairly KNF-conformant (unlike > truss), and doesn't use uglyprinting when invoking print_number() > except for here. Oops, I originally did this on 8 where it still has the wrong style. I'll fix. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 21:01:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77BE6106564A; Fri, 24 Feb 2012 21:01:43 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id E40FB8FC13; Fri, 24 Feb 2012 21:01:42 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id B9645358C33; Fri, 24 Feb 2012 22:01:41 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 9CDBF28470; Fri, 24 Feb 2012 22:01:41 +0100 (CET) Date: Fri, 24 Feb 2012 22:01:41 +0100 From: Jilles Tjoelker To: Bruce Evans Message-ID: <20120224210141.GA3223@stack.nl> References: <201202241235.q1OCZH2U059017@svn.freebsd.org> <20120225024051.C1150@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120225024051.C1150@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232108 - head/usr.bin/xargs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 21:01:43 -0000 On Sat, Feb 25, 2012 at 04:27:35AM +1100, Bruce Evans wrote: > On Fri, 24 Feb 2012, Jilles Tjoelker wrote: > > Log: > > xargs: If a utility exits with 255 or a signal, write an error message. > > If a utility called by xargs exits with status 255 or because of a signal, > > POSIX requires writing an error message. > Is an exit status of 255 really possible? I thought that there was > magic for the top bit. exit() takes 8 bits of exit status which are all returned by wait4(). > But testing reminded me that at the level of a single exit(), the > magic in the top bit is for signals, and showed that WIFSIGNALED() is > broken for signal 127: > [snip] > This prints SIGNALED = 0 and STOPPED = 1, when it should print > SIGNALED = 1 and STOPPED = 0. This is because the special _WSTATUS() > of 127 is _WSTOPPED and this cannot be distinguished from an actual > signal 127. Probably this signal should be disallowed. (The magic > in the top bit is just the core dump flag. Signals 128-255 are > already disallowed, so they don't give ambiguity.) PR kern/19402 describes this problem. Changeset r152973 (November 2005) changed SIGRTMAX so portable programs cannot know about signals 127 and 128 anymore. Programs compiled before that change may use them (but only after r151306 (October 2005)), since it is common to use the first few or the last few realtime signals. Perhaps these signals can now be forbidden by the kernel, or replaced by a harmless value for old binaries. > Utilities are quite broken near here too: > - under -current: > - utilities still don't support signals >= 32, but give better error > messages. kill(1) (both /bin/kill and the 9.x/10.x sh builtin) has passed arbitrary signal numbers to kill(2) for quite a while. > > Modified: head/usr.bin/xargs/xargs.c > > ============================================================================== > > --- head/usr.bin/xargs/xargs.c Fri Feb 24 12:32:50 2012 (r232107) > > +++ head/usr.bin/xargs/xargs.c Fri Feb 24 12:35:17 2012 (r232108) > > @@ -608,8 +608,11 @@ waitchildren(const char *name, int waita > > * If utility signaled or exited with a value of 255, > > * exit 1-125. > > */ > This comment didn't match the code before (the code always exited with > status 1), and is now further from matching the code. > This comment is hard to parse. It seems to repeat a POSIX requirement. I suppose it can go away as it doesn't really say anything the code doesn't say. > > - if (WIFSIGNALED(status) || WEXITSTATUS(status) == 255) > > - exit(1); > > + if (WIFSIGNALED(status)) > > + errx(1, "%s: terminated with signal %d, aborting", > > + name, WTERMSIG(status)); > This misclassifies signal 127 due to the above bug. > > + if (WEXITSTATUS(status) == 255) > > + errx(1, "%s: exited with status 255, aborting", name); > > if (WEXITSTATUS(status)) > > rval = 1; > Neither WIFSTOPPED() nor WIFEXITED() are tested, so the result of the > misclassification is turning signal 127 into a normal exit with status > 0. A normal WIFSTOPPED() should not get here, else job control would > just break xargs, so the bug can probably be worked around by turning > WIFSTOPPED() into WIFSIGNALED() here, or just blindly using WTERMSIG() > != 0 to classify signals. I don't think xargs should work around that bug, particularly not by introducing unspecified behaviour (the value of WTERMSIG(x) when !WIFSIGNALED(x)). > The messages have a grammar error (comma splice). GNU xargs has a semicolon instead of a comma. Is that better? > > } > > > The magic for the top bit is when exit statuses are combined with > signal statuses and bits are lost by forcing them through an 8-bit > filter (perhaps another exit()). Shells report signal n as $? = > (0x80 | n). When n is 127, shells are not quite confused enough to > turn the status into 0 -- they just turn n into 0, giving status 0x80. In fact, POSIX only requires that $? be greater than 128 and kill -l $? return the name of the signal without "SIG". -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 22:10:07 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81EA2106566B; Fri, 24 Feb 2012 22:10:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 12D238FC17; Fri, 24 Feb 2012 22:10:06 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1OMA4QE012054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Feb 2012 09:10:05 +1100 Date: Sat, 25 Feb 2012 09:10:04 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jilles Tjoelker In-Reply-To: <20120224210141.GA3223@stack.nl> Message-ID: <20120225084319.P3207@besplex.bde.org> References: <201202241235.q1OCZH2U059017@svn.freebsd.org> <20120225024051.C1150@besplex.bde.org> <20120224210141.GA3223@stack.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r232108 - head/usr.bin/xargs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 22:10:07 -0000 On Fri, 24 Feb 2012, Jilles Tjoelker wrote: > On Sat, Feb 25, 2012 at 04:27:35AM +1100, Bruce Evans wrote: > ... >> Utilities are quite broken near here too: >> - under -current: >> - utilities still don't support signals >= 32, but give better error >> messages. > > kill(1) (both /bin/kill and the 9.x/10.x sh builtin) has passed > arbitrary signal numbers to kill(2) for quite a while. Apparently I got confused by testing several versions. In -current, the bugs are just that: - bash-4.2 builtin kill doesn't understand signals >= 32, despite supposedly being configured for FreeBSD - bash-4.2 prints confusing termination messages which made me think that /bin/kill didn't work: - for signal 127, it prints "Stopped ..." - for signal 126, it prints "Unknown signal: 126". I didn't notice this was printed by bash(1) and not by kill(1). A bug in builtin kill turned up: with kill(1), both bash and sh print the termination message immediately, with builtin kill neither prints it until a newline is entered. >>> Modified: head/usr.bin/xargs/xargs.c >>> ============================================================================== >>> --- head/usr.bin/xargs/xargs.c Fri Feb 24 12:32:50 2012 (r232107) >>> +++ head/usr.bin/xargs/xargs.c Fri Feb 24 12:35:17 2012 (r232108) >>> @@ -608,8 +608,11 @@ waitchildren(const char *name, int waita >>> * If utility signaled or exited with a value of 255, >>> * exit 1-125. >>> */ > >> This comment didn't match the code before (the code always exited with >> status 1), and is now further from matching the code. > >> This comment is hard to parse. > > It seems to repeat a POSIX requirement. I suppose it can go away as it > doesn't really say anything the code doesn't say. It's harder to parse than I thought :-). FreeBSD man pages are very bad about distinguishing POSIX requirements from what the implementation does (they mostly give the implementation behaviour without saying that). Some source code says "POSIX requires...". >> This misclassifies signal 127 due to the above bug. > >>> + if (WEXITSTATUS(status) == 255) >>> + errx(1, "%s: exited with status 255, aborting", name); >>> if (WEXITSTATUS(status)) >>> rval = 1; > >> Neither WIFSTOPPED() nor WIFEXITED() are tested, so the result of the >> misclassification is turning signal 127 into a normal exit with status >> 0. A normal WIFSTOPPED() should not get here, else job control would >> just break xargs, so the bug can probably be worked around by turning >> WIFSTOPPED() into WIFSIGNALED() here, or just blindly using WTERMSIG() >> != 0 to classify signals. > > I don't think xargs should work around that bug, particularly not by > introducing unspecified behaviour (the value of WTERMSIG(x) when > !WIFSIGNALED(x)). OK. So it needs to be disallowed in the kernel. I wonder how 0177 came to mean stopped. The kernel doesn't use _WSTOPPED, and doesn't seem to use 0177 or 0x7f. >> The messages have a grammar error (comma splice). > > GNU xargs has a semicolon instead of a comma. Is that better? Yes. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 24 23:15:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 502811065675; Fri, 24 Feb 2012 23:15:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEC018FC13; Fri, 24 Feb 2012 23:15:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1ONFL9n088277; Fri, 24 Feb 2012 23:15:21 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1ONFLTm088275; Fri, 24 Feb 2012 23:15:21 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202242315.q1ONFLTm088275@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 24 Feb 2012 23:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232132 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 23:15:22 -0000 Author: jkim Date: Fri Feb 24 23:15:21 2012 New Revision: 232132 URL: http://svn.freebsd.org/changeset/base/232132 Log: Fix a long-standing bug for AcpiOsGetTimer(). time_t is 32-bit on i386 and it needs proper casting before multiplication. MFC after: 3 days Modified: head/sys/dev/acpica/Osd/OsdSchedule.c Modified: head/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdSchedule.c Fri Feb 24 20:42:47 2012 (r232131) +++ head/sys/dev/acpica/Osd/OsdSchedule.c Fri Feb 24 23:15:21 2012 (r232132) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2000 Michael Smith * Copyright (c) 2000 BSDi - * Copyright (c) 2007-2009 Jung-uk Kim + * Copyright (c) 2007-2012 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -248,8 +248,8 @@ AcpiOsGetTimer(void) KASSERT(cold == 0, ("acpi: timer op not yet supported during boot")); binuptime(&bt); - t = ((UINT64)10000000 * (uint32_t)(bt.frac >> 32)) >> 32; - t += bt.sec * 10000000; + t = (uint64_t)bt.sec * 10000000; + t += ((uint64_t)10000000 * (uint32_t)(bt.frac >> 32)) >> 32; return (t); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 00:16:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B9A6106564A; Sat, 25 Feb 2012 00:16:01 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 589D38FC08; Sat, 25 Feb 2012 00:16:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P0G1JH090163; Sat, 25 Feb 2012 00:16:01 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P0G0l2090135; Sat, 25 Feb 2012 00:16:00 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201202250016.q1P0G0l2090135@svn.freebsd.org> From: Martin Matuska Date: Sat, 25 Feb 2012 00:16:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232133 - in vendor/libarchive/dist: . cpio cpio/test libarchive libarchive/test tar tar/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 00:16:01 -0000 Author: mm Date: Sat Feb 25 00:16:00 2012 New Revision: 232133 URL: http://svn.freebsd.org/changeset/base/232133 Log: Update libarchive's vendor dist to latest changes in release branch. Git branch: release Git commit: e2cc36190d7d733b3ac6744ec860d09776c9da02 Obtained from: https://github.com/libarchive/libarchive.git Modified: vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/configure.ac vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/cpio/test/main.c vendor/libarchive/dist/libarchive/archive_options.c vendor/libarchive/dist/libarchive/archive_read.c vendor/libarchive/dist/libarchive/archive_read_data_into_fd.c vendor/libarchive/dist/libarchive/archive_read_disk_posix.c vendor/libarchive/dist/libarchive/archive_read_set_options.c vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_string.c vendor/libarchive/dist/libarchive/archive_windows.c vendor/libarchive/dist/libarchive/archive_windows.h vendor/libarchive/dist/libarchive/archive_write_add_filter_bzip2.c vendor/libarchive/dist/libarchive/archive_write_add_filter_gzip.c vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c vendor/libarchive/dist/libarchive/archive_write_disk_windows.c vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c vendor/libarchive/dist/libarchive/archive_write_set_format_cpio_newc.c vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c vendor/libarchive/dist/libarchive/archive_write_set_format_mtree.c vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c vendor/libarchive/dist/libarchive/archive_write_set_format_ustar.c vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c vendor/libarchive/dist/libarchive/archive_write_set_options.c vendor/libarchive/dist/libarchive/test/main.c vendor/libarchive/dist/libarchive/test/test_archive_read_set_options.c vendor/libarchive/dist/libarchive/test/test_archive_write_set_options.c vendor/libarchive/dist/libarchive/test/test_write_compress_program.c vendor/libarchive/dist/tar/bsdtar.c vendor/libarchive/dist/tar/test/main.c vendor/libarchive/dist/tar/test/test_option_s.c Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/CMakeLists.txt Sat Feb 25 00:16:00 2012 (r232133) @@ -607,6 +607,37 @@ ELSE(LIBXML2_FOUND) ENDIF(LIBXML2_FOUND) # +# Find Libregex +# +FIND_PATH(REGEX_INCLUDE_DIR regex.h) +IF(REGEX_INCLUDE_DIR) + CHECK_FUNCTION_EXISTS_GLIBC(regcomp HAVE_REGCOMP_LIBC) + # + # If libc does not provide regex, find libregex. + # + IF(NOT HAVE_REGCOMP_LIBC) + FIND_LIBRARY(REGEX_LIBRARY regex) + IF(REGEX_LIBRARY) + SET(CMAKE_REQUIRED_LIBRARIES ${REGEX_LIBRARY}) + CHECK_FUNCTION_EXISTS_GLIBC(regcomp HAVE_REGCOMP_LIBREGEX) + IF(HAVE_REGCOMP_LIBREGEX) + LIST(APPEND ADDITIONAL_LIBS ${REGEX_LIBRARY}) + # + # If regex.h is not found, retry looking for regex.h at + # REGEX_INCLUDE_DIR + # + IF(NOT HAVE_REGEX_H) + UNSET(HAVE_REGEX_H CACHE) + INCLUDE_DIRECTORIES(${REGEX_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_INCLUDES ${REGEX_INCLUDE_DIR}) + LA_CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H) + ENDIF(NOT HAVE_REGEX_H) + ENDIF(HAVE_REGCOMP_LIBREGEX) + ENDIF(REGEX_LIBRARY) + ENDIF(NOT HAVE_REGCOMP_LIBC) +ENDIF(REGEX_INCLUDE_DIR) + +# # Check functions # IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/configure.ac Sat Feb 25 00:16:00 2012 (r232133) @@ -322,6 +322,15 @@ if test "x$ac_cv_header_libxml_xmlreader fi fi +AC_ARG_WITH([libregex], + AS_HELP_STRING([--without-libregex], [Don't build support for regex through libregex])) + +if test "x$with_libregex" != "xno"; then + if test "x$ac_cv_header_regex_h" != "xno"; then + AC_CHECK_FUNC(regcomp, , [AC_CHECK_LIB(regex,regcomp)]) + fi +fi + # TODO: Give the user the option of using a pre-existing system # libarchive. This will define HAVE_LIBARCHIVE which will cause # bsdtar_platform.h to use #include <...> for the libarchive headers. Modified: vendor/libarchive/dist/cpio/cpio.c ============================================================================== --- vendor/libarchive/dist/cpio/cpio.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/cpio/cpio.c Sat Feb 25 00:16:00 2012 (r232133) @@ -119,6 +119,7 @@ static void mode_in(struct cpio *); static void mode_list(struct cpio *); static void mode_out(struct cpio *); static void mode_pass(struct cpio *, const char *); +static const char *remove_leading_slash(const char *); static int restore_time(struct cpio *, struct archive_entry *, const char *, int fd); static void usage(void); @@ -155,9 +156,9 @@ main(int argc, char *argv[]) else { #if defined(_WIN32) && !defined(__CYGWIN__) lafe_progname = strrchr(*argv, '\\'); -#else - lafe_progname = strrchr(*argv, '/'); + if (strrchr(*argv, '/') > lafe_progname) #endif + lafe_progname = strrchr(*argv, '/'); if (lafe_progname != NULL) lafe_progname++; else @@ -574,6 +575,49 @@ mode_out(struct cpio *cpio) archive_write_free(cpio->archive); } +static const char * +remove_leading_slash(const char *p) +{ + const char *rp; + + /* Remove leading "//./" or "//?/" or "//?/UNC/" + * (absolute path prefixes used by Windows API) */ + if ((p[0] == '/' || p[0] == '\\') && + (p[1] == '/' || p[1] == '\\') && + (p[2] == '.' || p[2] == '?') && + (p[3] == '/' || p[3] == '\\')) + { + if (p[2] == '?' && + (p[4] == 'U' || p[4] == 'u') && + (p[5] == 'N' || p[5] == 'n') && + (p[6] == 'C' || p[6] == 'c') && + (p[7] == '/' || p[7] == '\\')) + p += 8; + else + p += 4; + } + do { + rp = p; + /* Remove leading drive letter from archives created + * on Windows. */ + if (((p[0] >= 'a' && p[0] <= 'z') || + (p[0] >= 'A' && p[0] <= 'Z')) && + p[1] == ':') { + p += 2; + } + /* Remove leading "/../", "//", etc. */ + while (p[0] == '/' || p[0] == '\\') { + if (p[1] == '.' && p[2] == '.' && + (p[3] == '/' || p[3] == '\\')) { + p += 3; /* Remove "/..", leave "/" + * for next pass. */ + } else + p += 1; /* Remove "/". */ + } + } while (rp != p); + return (p); +} + /* * This is used by both out mode (to copy objects from disk into * an archive) and pass mode (to copy objects from disk to @@ -585,7 +629,6 @@ file_to_archive(struct cpio *cpio, const const char *destpath; struct archive_entry *entry, *spare; size_t len; - const char *p; int r; /* @@ -639,10 +682,7 @@ file_to_archive(struct cpio *cpio, const "Can't allocate path buffer"); } strcpy(cpio->pass_destpath, cpio->destdir); - p = srcpath; - while (p[0] == '/') - ++p; - strcat(cpio->pass_destpath, p); + strcat(cpio->pass_destpath, remove_leading_slash(srcpath)); destpath = cpio->pass_destpath; } if (cpio->option_rename) @@ -1139,12 +1179,24 @@ cpio_rename(const char *name) static char buff[1024]; FILE *t; char *p, *ret; +#if defined(_WIN32) && !defined(__CYGWIN__) + FILE *to; + t = fopen("CONIN$", "r"); + if (t == NULL) + return (name); + to = fopen("CONOUT$", "w"); + if (to == NULL) + return (name); + fprintf(to, "%s (Enter/./(new name))? ", name); + fclose(to); +#else t = fopen("/dev/tty", "r+"); if (t == NULL) return (name); fprintf(t, "%s (Enter/./(new name))? ", name); fflush(t); +#endif p = fgets(buff, sizeof(buff), t); fclose(t); Modified: vendor/libarchive/dist/cpio/test/main.c ============================================================================== --- vendor/libarchive/dist/cpio/test/main.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/cpio/test/main.c Sat Feb 25 00:16:00 2012 (r232133) @@ -2289,7 +2289,15 @@ main(int argc, char **argv) j++; } testprogdir[i] = '\0'; +#if defined(_WIN32) && !defined(__CYGWIN__) + if (testprogdir[0] != '/' && testprogdir[0] != '\\' && + !(((testprogdir[0] >= 'a' && testprogdir[0] <= 'z') || + (testprogdir[0] >= 'A' && testprogdir[0] <= 'Z')) && + testprogdir[1] == ':' && + (testprogdir[2] == '/' || testprogdir[2] == '\\'))) +#else if (testprogdir[0] != '/') +#endif { /* Fixup path for relative directories. */ if ((testprogdir = (char *)realloc(testprogdir, @@ -2298,8 +2306,9 @@ main(int argc, char **argv) fprintf(stderr, "ERROR: Out of memory."); exit(1); } - strcpy(testprogdir + strlen(pwd) + 1, testprogdir); - strcpy(testprogdir, pwd); + memmove(testprogdir + strlen(pwd) + 1, testprogdir, + strlen(testprogdir)); + memcpy(testprogdir, pwd, strlen(pwd)); testprogdir[strlen(pwd)] = '/'; } Modified: vendor/libarchive/dist/libarchive/archive_options.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_options.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_options.c Sat Feb 25 00:16:00 2012 (r232133) @@ -38,6 +38,7 @@ _archive_set_option(struct archive *a, int magic, const char *fn, option_handler use_option) { const char *mp, *op, *vp; + int r; archive_check_magic(a, magic, ARCHIVE_STATE_NEW, fn); @@ -47,10 +48,24 @@ _archive_set_option(struct archive *a, if (op == NULL && vp == NULL) return (ARCHIVE_OK); - if (op == NULL) + if (op == NULL) { + archive_set_error(a, ARCHIVE_ERRNO_MISC, "Empty option"); return (ARCHIVE_FAILED); + } - return use_option(a, mp, op, vp); + r = use_option(a, mp, op, vp); + if (r == ARCHIVE_WARN - 1) { + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown module name: `%s'", mp); + return (ARCHIVE_FAILED); + } + if (r == ARCHIVE_WARN) { + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Undefined option: `%s%s%s%s%s%s'", + vp?"":"!", mp?mp:"", mp?":":"", op, vp?"=":"", vp?vp:""); + return (ARCHIVE_FAILED); + } + return (r); } int @@ -102,6 +117,25 @@ _archive_set_options(struct archive *a, free(data); return (ARCHIVE_FATAL); } + if (r == ARCHIVE_FAILED && mod != NULL) { + free(data); + return (ARCHIVE_FAILED); + } + if (r == ARCHIVE_WARN - 1) { + /* The module name is wrong. */ + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unknown module name: `%s'", mod); + free(data); + return (ARCHIVE_FAILED); + } + if (r == ARCHIVE_WARN) { + /* The option name is wrong. No-one used this. */ + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Undefined option: `%s%s%s'", + mod?mod:"", mod?":":"", opt); + free(data); + return (ARCHIVE_FAILED); + } if (r == ARCHIVE_OK) anyok = 1; else Modified: vendor/libarchive/dist/libarchive/archive_read.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read.c Sat Feb 25 00:16:00 2012 (r232133) @@ -633,7 +633,7 @@ archive_read_data(struct archive *_a, vo } /* Compute the amount of zero padding needed. */ - if (a->read_data_output_offset + s < + if (a->read_data_output_offset + (int64_t)s < a->read_data_offset) { len = s; } else if (a->read_data_output_offset < Modified: vendor/libarchive/dist/libarchive/archive_read_data_into_fd.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_data_into_fd.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read_data_into_fd.c Sat Feb 25 00:16:00 2012 (r232133) @@ -64,7 +64,7 @@ pad_to(struct archive *a, int fd, int ca } while (target_offset > actual_offset) { to_write = nulls_size; - if (target_offset < actual_offset + nulls_size) + if (target_offset < actual_offset + (int64_t)nulls_size) to_write = (size_t)(target_offset - actual_offset); bytes_written = write(fd, nulls, to_write); if (bytes_written < 0) { Modified: vendor/libarchive/dist/libarchive/archive_read_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_posix.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read_disk_posix.c Sat Feb 25 00:16:00 2012 (r232133) @@ -733,7 +733,7 @@ _archive_read_data_block(struct archive t->entry_buff_size = t->current_filesystem->buff_size; buffbytes = t->entry_buff_size; - if (buffbytes > t->current_sparse->length) + if ((int64_t)buffbytes > t->current_sparse->length) buffbytes = t->current_sparse->length; /* Modified: vendor/libarchive/dist/libarchive/archive_read_set_options.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_set_options.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read_set_options.c Sat Feb 25 00:16:00 2012 (r232133) @@ -78,7 +78,7 @@ archive_set_format_option(struct archive struct archive_read *a = (struct archive_read *)_a; struct archive_format_descriptor *format; size_t i; - int r, rv = ARCHIVE_FAILED; + int r, rv = ARCHIVE_WARN; for (i = 0; i < sizeof(a->formats)/sizeof(a->formats[0]); i++) { format = &a->formats[i]; @@ -102,6 +102,10 @@ archive_set_format_option(struct archive if (r == ARCHIVE_OK) rv = ARCHIVE_OK; } + /* If the format name didn't match, return a special code for + * _archive_set_option[s]. */ + if (rv == ARCHIVE_WARN && m != NULL) + rv = ARCHIVE_WARN - 1; return (rv); } @@ -112,7 +116,7 @@ archive_set_filter_option(struct archive struct archive_read *a = (struct archive_read *)_a; struct archive_read_filter *filter; struct archive_read_filter_bidder *bidder; - int r, rv = ARCHIVE_FAILED; + int r, rv = ARCHIVE_WARN; for (filter = a->filter; filter != NULL; filter = filter->upstream) { bidder = filter->bidder; @@ -135,6 +139,10 @@ archive_set_filter_option(struct archive if (r == ARCHIVE_OK) rv = ARCHIVE_OK; } + /* If the filter name didn't match, return a special code for + * _archive_set_option[s]. */ + if (rv == ARCHIVE_WARN && m != NULL) + rv = ARCHIVE_WARN - 1; return (rv); } Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c Sat Feb 25 00:16:00 2012 (r232133) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010-2011 Michihiro NAKAJIMA + * Copyright (c) 2010-2012 Michihiro NAKAJIMA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -478,11 +478,13 @@ archive_read_format_cab_options(struct a else ret = ARCHIVE_FATAL; } - } else - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "cab: unknown keyword ``%s''", key); + return (ret); + } - return (ret); + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ + return (ARCHIVE_WARN); } static int @@ -2066,6 +2068,7 @@ lzx_decode_init(struct lzx_stream *strm, struct lzx_dec *ds; int slot, w_size, w_slot; int base, footer; + int base_inc[18]; if (strm->ds == NULL) { strm->ds = calloc(1, sizeof(*strm->ds)); @@ -2100,13 +2103,15 @@ lzx_decode_init(struct lzx_stream *strm, lzx_huffman_free(&(ds->mt)); } + for (footer = 0; footer < 18; footer++) + base_inc[footer] = 1 << footer; base = footer = 0; for (slot = 0; slot < w_slot; slot++) { int n; if (footer == 0) base = slot; else - base += 1 << footer; + base += base_inc[footer]; if (footer < 17) { footer = -2; for (n = base; n; n >>= 1) @@ -2180,11 +2185,11 @@ lzx_translation(struct lzx_stream *strm, end = b + size - 10; while (b < end && (b = memchr(b, 0xE8, end - b)) != NULL) { size_t i = b - (unsigned char *)p; - long cp, displacement, value; + int32_t cp, displacement, value; cp = offset + i; value = archive_le32dec(&b[1]); - if (value >= -cp && value < (long)ds->translation_size) { + if (value >= -cp && value < (int32_t)ds->translation_size) { if (value >= 0) displacement = value - cp; else @@ -2475,7 +2480,10 @@ lzx_read_blocks(struct lzx_stream *strm, */ /* Skip padding to align following field on * 16-bit boundary. */ - lzx_br_consume_unalined_bits(br); + if (br->cache_avail == 32 || br->cache_avail == 16) + lzx_br_consume(br, 16); + else + lzx_br_consume_unalined_bits(br); /* Preparation to read repeated offsets R0,R1 and R2. */ ds->rbytes_avail = 0; ds->state = ST_RD_R0; Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Sat Feb 25 00:16:00 2012 (r232133) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2003-2007 Tim Kientzle - * Copyright (c) 2010-2011 Michihiro NAKAJIMA + * Copyright (c) 2010-2012 Michihiro NAKAJIMA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -325,7 +325,7 @@ archive_read_format_cpio_options(struct if (strcmp(key, "compat-2x") == 0) { /* Handle filnames as libarchive 2.x */ cpio->init_default_conversion = (val != NULL)?1:0; - ret = ARCHIVE_OK; + return (ARCHIVE_OK); } else if (strcmp(key, "hdrcharset") == 0) { if (val == NULL || val[0] == 0) archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, @@ -339,11 +339,13 @@ archive_read_format_cpio_options(struct else ret = ARCHIVE_FATAL; } - } else - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "cpio: unknown keyword ``%s''", key); + return (ret); + } - return (ret); + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ + return (ARCHIVE_WARN); } static int Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c Sat Feb 25 00:16:00 2012 (r232133) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2011 Michihiro NAKAJIMA + * Copyright (c) 2008-2012 Michihiro NAKAJIMA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -445,11 +445,13 @@ archive_read_format_lha_options(struct a else ret = ARCHIVE_FATAL; } - } else - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "lha: unknown keyword ``%s''", key); + return (ret); + } - return (ret); + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ + return (ARCHIVE_WARN); } static int Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c Sat Feb 25 00:16:00 2012 (r232133) @@ -757,11 +757,13 @@ archive_read_format_rar_options(struct a else ret = ARCHIVE_FATAL; } - } else - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "rar: unknown keyword ``%s''", key); - - return (ret); + return (ret); + } + + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ + return (ARCHIVE_WARN); } static int Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c Sat Feb 25 00:16:00 2012 (r232133) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2003-2007 Tim Kientzle - * Copyright (c) 2011 Michihiro NAKAJIMA + * Copyright (c) 2011-2012 Michihiro NAKAJIMA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -369,7 +369,7 @@ archive_read_format_tar_options(struct a /* Handle UTF-8 filnames as libarchive 2.x */ tar->compat_2x = (val != NULL)?1:0; tar->init_default_conversion = tar->compat_2x; - ret = ARCHIVE_OK; + return (ARCHIVE_OK); } else if (strcmp(key, "hdrcharset") == 0) { if (val == NULL || val[0] == 0) archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, @@ -383,11 +383,13 @@ archive_read_format_tar_options(struct a else ret = ARCHIVE_FATAL; } - } else - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "tar: unknown keyword ``%s''", key); + return (ret); + } - return (ret); + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ + return (ARCHIVE_WARN); } /* utility function- this exists to centralize the logic of tracking Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Sat Feb 25 00:16:00 2012 (r232133) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2004 Tim Kientzle - * Copyright (c) 2011 Michihiro NAKAJIMA + * Copyright (c) 2011-2012 Michihiro NAKAJIMA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -441,7 +441,7 @@ archive_read_format_zip_options(struct a if (strcmp(key, "compat-2x") == 0) { /* Handle filnames as libarchive 2.x */ zip->init_default_conversion = (val != NULL) ? 1 : 0; - ret = ARCHIVE_OK; + return (ARCHIVE_OK); } else if (strcmp(key, "hdrcharset") == 0) { if (val == NULL || val[0] == 0) archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, @@ -456,11 +456,13 @@ archive_read_format_zip_options(struct a } else ret = ARCHIVE_FATAL; } - } else - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "zip: unknown keyword ``%s''", key); + return (ret); + } - return (ret); + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ + return (ARCHIVE_WARN); } static int Modified: vendor/libarchive/dist/libarchive/archive_string.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_string.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_string.c Sat Feb 25 00:16:00 2012 (r232133) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2003-2011 Tim Kientzle - * Copyright (c) 2011 Michihiro NAKAJIMA + * Copyright (c) 2011-2012 Michihiro NAKAJIMA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -849,7 +849,7 @@ archive_string_append_from_wcs(struct ar } } as->length += r; - if (wp == NULL || (wp - wpp) >= nwc) + if (wp == NULL || (wp - wpp) >= (int64_t)nwc) break; /* Get a remaining WCS lenth. */ nwc -= wp - wpp; @@ -2333,7 +2333,7 @@ best_effort_strncat_in_locale(struct arc { size_t remaining; char *outp; - const char *inp; + const uint8_t *inp; size_t avail; int return_value = 0; /* success */ @@ -2357,11 +2357,11 @@ best_effort_strncat_in_locale(struct arc return (-1); remaining = length; - inp = (const char *)_p; + inp = (const uint8_t *)_p; outp = as->s + as->length; avail = as->buffer_length - as->length -1; while (*inp && remaining > 0) { - if (*inp < 0 && (sc->flag & SCONV_TO_UTF8)) { + if (*inp > 127 && (sc->flag & SCONV_TO_UTF8)) { if (avail < UTF8_R_CHAR_SIZE) { as->length = outp - as->s; if (NULL == archive_string_ensure(as, @@ -2381,13 +2381,13 @@ best_effort_strncat_in_locale(struct arc inp++; remaining--; return_value = -1; - } else if (*inp < 0) { + } else if (*inp > 127) { *outp++ = '?'; inp++; remaining--; return_value = -1; } else { - *outp++ = *inp++; + *outp++ = (char)*inp++; remaining--; } } Modified: vendor/libarchive/dist/libarchive/archive_windows.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_windows.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_windows.c Sat Feb 25 00:16:00 2012 (r232133) @@ -48,6 +48,7 @@ #include "archive_platform.h" #include "archive_private.h" +#include "archive_entry.h" #include #include #include @@ -640,6 +641,113 @@ __la_write(int fd, const void *buf, size } /* + * Replace the Windows path separator '\' with '/'. + */ +static int +replace_pathseparator(struct archive_wstring *ws, const wchar_t *wp) +{ + wchar_t *w; + size_t path_length; + + if (wp == NULL) + return(0); + if (wcschr(wp, L'\\') == NULL) + return(0); + path_length = wcslen(wp); + if (archive_wstring_ensure(ws, path_length) == NULL) + return(-1); + archive_wstrncpy(ws, wp, path_length); + for (w = ws->s; *w; w++) { + if (*w == L'\\') + *w = L'/'; + } + return(1); +} + +static int +fix_pathseparator(struct archive_entry *entry) +{ + struct archive_wstring ws; + const wchar_t *wp; + int ret = ARCHIVE_OK; + + archive_string_init(&ws); + wp = archive_entry_pathname_w(entry); + switch (replace_pathseparator(&ws, wp)) { + case 0: /* Not replaced. */ + break; + case 1: /* Replaced. */ + archive_entry_copy_pathname_w(entry, ws.s); + break; + default: + ret = ARCHIVE_FAILED; + } + wp = archive_entry_hardlink_w(entry); + switch (replace_pathseparator(&ws, wp)) { + case 0: /* Not replaced. */ + break; + case 1: /* Replaced. */ + archive_entry_copy_hardlink_w(entry, ws.s); + break; + default: + ret = ARCHIVE_FAILED; + } + wp = archive_entry_symlink_w(entry); + switch (replace_pathseparator(&ws, wp)) { + case 0: /* Not replaced. */ + break; + case 1: /* Replaced. */ + archive_entry_copy_symlink_w(entry, ws.s); + break; + default: + ret = ARCHIVE_FAILED; + } + archive_wstring_free(&ws); + return(ret); +} + +struct archive_entry * +__la_win_entry_in_posix_pathseparator(struct archive_entry *entry) +{ + struct archive_entry *entry_main; + const wchar_t *wp; + int has_backslash = 0; + int ret; + + wp = archive_entry_pathname_w(entry); + if (wp != NULL && wcschr(wp, L'\\') != NULL) + has_backslash = 1; + if (!has_backslash) { + wp = archive_entry_hardlink_w(entry); + if (wp != NULL && wcschr(wp, L'\\') != NULL) + has_backslash = 1; + } + if (!has_backslash) { + wp = archive_entry_symlink_w(entry); + if (wp != NULL && wcschr(wp, L'\\') != NULL) + has_backslash = 1; + } + /* + * If there is no backslach chars, return the original. + */ + if (!has_backslash) + return (entry); + + /* Copy entry so we can modify it as needed. */ + entry_main = archive_entry_clone(entry); + if (entry_main == NULL) + return (NULL); + /* Replace the Windows path-separator '\' with '/'. */ + ret = fix_pathseparator(entry_main); + if (ret < ARCHIVE_WARN) { + archive_entry_free(entry_main); + return (NULL); + } + return (entry_main); +} + + +/* * The following function was modified from PostgreSQL sources and is * subject to the copyright below. */ Modified: vendor/libarchive/dist/libarchive/archive_windows.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_windows.h Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_windows.h Sat Feb 25 00:16:00 2012 (r232133) @@ -261,6 +261,8 @@ extern wchar_t *__la_win_permissive_name extern wchar_t *__la_win_permissive_name_w(const wchar_t *wname); extern void __la_dosmaperr(unsigned long e); #define la_dosmaperr(e) __la_dosmaperr(e) +extern struct archive_entry *__la_win_entry_in_posix_pathseparator( + struct archive_entry *); #endif /* LIBARCHIVE_ARCHIVE_WINDOWS_H_INCLUDED */ Modified: vendor/libarchive/dist/libarchive/archive_write_add_filter_bzip2.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_add_filter_bzip2.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_write_add_filter_bzip2.c Sat Feb 25 00:16:00 2012 (r232133) @@ -208,6 +208,9 @@ archive_compressor_bzip2_options(struct return (ARCHIVE_OK); } + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ return (ARCHIVE_WARN); } Modified: vendor/libarchive/dist/libarchive/archive_write_add_filter_gzip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_add_filter_gzip.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_write_add_filter_gzip.c Sat Feb 25 00:16:00 2012 (r232133) @@ -220,6 +220,10 @@ archive_compressor_gzip_options(struct a data->compression_level = value[0] - '0'; return (ARCHIVE_OK); } + + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ return (ARCHIVE_WARN); } Modified: vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c Sat Feb 25 00:16:00 2012 (r232133) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2009,2010 Michihiro NAKAJIMA * Copyright (c) 2003-2010 Tim Kientzle + * Copyright (c) 2009-2012 Michihiro NAKAJIMA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -365,6 +365,9 @@ archive_compressor_xz_options(struct arc return (ARCHIVE_OK); } + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ return (ARCHIVE_WARN); } Modified: vendor/libarchive/dist/libarchive/archive_write_disk_windows.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Sat Feb 25 00:16:00 2012 (r232133) @@ -1434,7 +1434,7 @@ restore_entry(struct archive_write_disk if (en) { /* Everything failed; give up here. */ - archive_set_error(&a->archive, en, "Can't create '%s'", + archive_set_error(&a->archive, en, "Can't create '%ls'", a->name); return (ARCHIVE_FAILED); } @@ -1844,7 +1844,7 @@ check_symlinks(struct archive_write_disk */ if (disk_unlink(a->name)) { archive_set_error(&a->archive, errno, - "Could not remove symlink %s", + "Could not remove symlink %ls", a->name); pn[0] = c; return (ARCHIVE_FAILED); @@ -1858,7 +1858,7 @@ check_symlinks(struct archive_write_disk */ if (!S_ISLNK(a->mode)) { archive_set_error(&a->archive, 0, - "Removing symlink %s", + "Removing symlink %ls", a->name); } /* Symlink gone. No more problem! */ @@ -1868,15 +1868,15 @@ check_symlinks(struct archive_write_disk /* User asked us to remove problems. */ if (disk_unlink(a->name) != 0) { archive_set_error(&a->archive, 0, - "Cannot remove intervening symlink %s", - a->name); + "Cannot remove intervening " + "symlink %ls", a->name); pn[0] = c; return (ARCHIVE_FAILED); } a->pst = NULL; } else { archive_set_error(&a->archive, 0, - "Cannot extract through symlink %s", + "Cannot extract through symlink %ls", a->name); pn[0] = c; return (ARCHIVE_FAILED); @@ -2147,19 +2147,20 @@ create_dir(struct archive_write_disk *a, return (ARCHIVE_OK); if ((a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE)) { archive_set_error(&a->archive, EEXIST, - "Can't create directory '%s'", path); + "Can't create directory '%ls'", path); return (ARCHIVE_FAILED); } if (disk_unlink(path) != 0) { archive_set_error(&a->archive, errno, - "Can't create directory '%s': " + "Can't create directory '%ls': " "Conflicting file cannot be removed", path); return (ARCHIVE_FAILED); } } else if (errno != ENOENT && errno != ENOTDIR) { /* Stat failed? */ - archive_set_error(&a->archive, errno, "Can't test directory '%s'", path); + archive_set_error(&a->archive, errno, + "Can't test directory '%ls'", path); return (ARCHIVE_FAILED); } else if (slash != NULL) { *slash = '\0'; @@ -2211,7 +2212,7 @@ create_dir(struct archive_write_disk *a, if (file_information(a, path, &st, &st_mode, 0) == 0 && S_ISDIR(st_mode)) return (ARCHIVE_OK); - archive_set_error(&a->archive, errno, "Failed to create dir '%s'", + archive_set_error(&a->archive, errno, "Failed to create dir '%ls'", path); return (ARCHIVE_FAILED); } @@ -2240,7 +2241,7 @@ set_ownership(struct archive_write_disk } archive_set_error(&a->archive, errno, - "Can't set user=%jd/group=%jd for %s", + "Can't set user=%jd/group=%jd for %ls", (intmax_t)a->uid, (intmax_t)a->gid, a->name); return (ARCHIVE_WARN); } Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c Sat Feb 25 00:16:00 2012 (r232133) @@ -413,7 +413,10 @@ _7z_options(struct archive_write *a, con return (ARCHIVE_OK); } - return (ARCHIVE_FAILED); + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ + return (ARCHIVE_WARN); } static int @@ -1587,7 +1590,8 @@ file_init_register_empty(struct _7zip *z zip->empty_list.last = &(zip->empty_list.first); } -#if !defined(HAVE_BZLIB_H) || !defined(BZ_CONFIG_ERROR) || !defined(HAVE_LZMA_H) +#if !defined(HAVE_ZLIB_H) || !defined(HAVE_BZLIB_H) ||\ + !defined(BZ_CONFIG_ERROR) || !defined(HAVE_LZMA_H) static int compression_unsupported_encoder(struct archive *a, struct la_zstream *lastrm, const char *name) Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c Fri Feb 24 23:15:21 2012 (r232132) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c Sat Feb 25 00:16:00 2012 (r232133) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003-2007 Tim Kientzle + * Copyright (c) 2011-2012 Michihiro NAKAJIMA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -147,11 +148,13 @@ archive_write_cpio_options(struct archiv else ret = ARCHIVE_FATAL; } - } else - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "%s: unknown keyword ``%s''", a->format_name, key); + return (ret); + } - return (ret); + /* Note: The "warn" return is just to inform the options + * supervisor that we didn't handle it. It will generate + * a suitable error if no one used this option. */ + return (ARCHIVE_WARN); } /* @@ -278,18 +281,37 @@ write_header(struct archive_write *a, st int64_t ino; char h[76]; struct archive_string_conv *sconv; + struct archive_entry *entry_main; size_t len; cpio = (struct cpio *)a->format_data; ret_final = ARCHIVE_OK; sconv = get_sconv(a); +#if defined(_WIN32) && !defined(__CYGWIN__) + /* Make sure the path separators in pahtname, hardlink and symlink + * are all slash '/', not the Windows path separator '\'. */ + entry_main = __la_win_entry_in_posix_pathseparator(entry); + if (entry_main == NULL) { + archive_set_error(&a->archive, ENOMEM, + "Can't allocate ustar data"); + return(ARCHIVE_FATAL); + } + if (entry != entry_main) + entry = entry_main; + else + entry_main = NULL; +#else + entry_main = NULL; +#endif + ret = archive_entry_pathname_l(entry, &path, &len, sconv); if (ret != 0) { if (errno == ENOMEM) { archive_set_error(&a->archive, ENOMEM, "Can't allocate memory for Pathname"); - return (ARCHIVE_FATAL); + ret_final = ARCHIVE_FATAL; + goto exit_write_header; } archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Can't translate pathname '%s' to %s", @@ -308,11 +330,13 @@ write_header(struct archive_write *a, st if (ino < 0) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 00:35:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCD8E106564A; Sat, 25 Feb 2012 00:35:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1D758FC08; Sat, 25 Feb 2012 00:35:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P0ZJCW090881; Sat, 25 Feb 2012 00:35:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P0ZJSA090878; Sat, 25 Feb 2012 00:35:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202250035.q1P0ZJSA090878@svn.freebsd.org> From: Marius Strobl Date: Sat, 25 Feb 2012 00:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232134 - in stable/9/sys: dev/mii i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 00:35:19 -0000 Author: marius Date: Sat Feb 25 00:35:19 2012 New Revision: 232134 URL: http://svn.freebsd.org/changeset/base/232134 Log: MFC: r231913 - Probe BCM57780. - In case the parent is bge(4), don't set the Jumbo frame settings unless the MAC actually is Jumbo capable as otherwise the PHY might not have the corresponding registers implemented. This is also in line with what the Linux tg3 driver does. PR: 165032 Submitted by: Alexander Milanov Obtained from: OpenBSD Modified: stable/9/sys/dev/mii/brgphy.c stable/9/sys/dev/mii/miidevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/dev/mii/brgphy.c ============================================================================== --- stable/9/sys/dev/mii/brgphy.c Sat Feb 25 00:16:00 2012 (r232133) +++ stable/9/sys/dev/mii/brgphy.c Sat Feb 25 00:35:19 2012 (r232134) @@ -146,6 +146,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(BROADCOM3, BCM5719C), MII_PHY_DESC(BROADCOM3, BCM5720C), MII_PHY_DESC(BROADCOM3, BCM57765), + MII_PHY_DESC(BROADCOM3, BCM57780), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5906), MII_PHY_END }; @@ -225,7 +226,8 @@ brgphy_attach(device_t dev) sc->mii_flags |= MIIF_HAVEFIBER; } break; - } break; + } + break; case MII_OUI_BROADCOM2: switch (sc->mii_mpd_model) { case MII_MODEL_BROADCOM2_BCM5708S: @@ -942,7 +944,8 @@ brgphy_reset(struct mii_softc *sc) if (bge_sc->bge_phy_flags & BGE_PHY_JITTER_BUG) brgphy_fixup_jitter_bug(sc); - brgphy_jumbo_settings(sc, ifp->if_mtu); + if (bge_sc->bge_flags & BGE_FLAG_JUMBO) + brgphy_jumbo_settings(sc, ifp->if_mtu); if ((bge_sc->bge_phy_flags & BGE_PHY_NO_WIRESPEED) == 0) brgphy_ethernet_wirespeed(sc); Modified: stable/9/sys/dev/mii/miidevs ============================================================================== --- stable/9/sys/dev/mii/miidevs Sat Feb 25 00:16:00 2012 (r232133) +++ stable/9/sys/dev/mii/miidevs Sat Feb 25 00:35:19 2012 (r232134) @@ -179,6 +179,7 @@ model BROADCOM2 BCM5784 0x003a BCM5784 model BROADCOM2 BCM5709C 0x003c BCM5709 10/100/1000baseT PHY model BROADCOM2 BCM5761 0x003d BCM5761 10/100/1000baseT PHY model BROADCOM2 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY +model BROADCOM3 BCM57780 0x0019 BCM57780 1000BASE-T media interface model BROADCOM3 BCM5717C 0x0020 BCM5717C 1000BASE-T media interface model BROADCOM3 BCM5719C 0x0022 BCM5719C 1000BASE-T media interface model BROADCOM3 BCM57765 0x0024 BCM57765 1000BASE-T media interface From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 00:35:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 790221065676; Sat, 25 Feb 2012 00:35:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C2498FC0C; Sat, 25 Feb 2012 00:35:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P0ZSw1090923; Sat, 25 Feb 2012 00:35:28 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P0ZSmS090920; Sat, 25 Feb 2012 00:35:28 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202250035.q1P0ZSmS090920@svn.freebsd.org> From: Marius Strobl Date: Sat, 25 Feb 2012 00:35:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232135 - stable/8/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 00:35:29 -0000 Author: marius Date: Sat Feb 25 00:35:28 2012 New Revision: 232135 URL: http://svn.freebsd.org/changeset/base/232135 Log: MFC: r231913 - Probe BCM57780. - In case the parent is bge(4), don't set the Jumbo frame settings unless the MAC actually is Jumbo capable as otherwise the PHY might not have the corresponding registers implemented. This is also in line with what the Linux tg3 driver does. PR: 165032 Submitted by: Alexander Milanov Approved by: re (kib) Obtained from: OpenBSD Modified: stable/8/sys/dev/mii/brgphy.c stable/8/sys/dev/mii/miidevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/mii/brgphy.c ============================================================================== --- stable/8/sys/dev/mii/brgphy.c Sat Feb 25 00:35:19 2012 (r232134) +++ stable/8/sys/dev/mii/brgphy.c Sat Feb 25 00:35:28 2012 (r232135) @@ -145,6 +145,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT2, BCM5719C), MII_PHY_DESC(xxBROADCOM_ALT2, BCM5720C), MII_PHY_DESC(xxBROADCOM_ALT2, BCM57765), + MII_PHY_DESC(xxBROADCOM_ALT2, BCM57780), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; @@ -242,7 +243,8 @@ brgphy_attach(device_t dev) sc->mii_flags |= MIIF_HAVEFIBER; } break; - } break; + } + break; case MII_OUI_xxBROADCOM_ALT1: switch (bsc->mii_model) { case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: @@ -964,7 +966,8 @@ brgphy_reset(struct mii_softc *sc) if (bge_sc->bge_phy_flags & BGE_PHY_JITTER_BUG) brgphy_fixup_jitter_bug(sc); - brgphy_jumbo_settings(sc, ifp->if_mtu); + if (bge_sc->bge_flags & BGE_FLAG_JUMBO) + brgphy_jumbo_settings(sc, ifp->if_mtu); if ((bge_sc->bge_phy_flags & BGE_PHY_NO_WIRESPEED) == 0) brgphy_ethernet_wirespeed(sc); Modified: stable/8/sys/dev/mii/miidevs ============================================================================== --- stable/8/sys/dev/mii/miidevs Sat Feb 25 00:35:19 2012 (r232134) +++ stable/8/sys/dev/mii/miidevs Sat Feb 25 00:35:28 2012 (r232135) @@ -157,6 +157,7 @@ model xxBROADCOM_ALT1 BCM5784 0x003a BCM model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY +model xxBROADCOM_ALT2 BCM57780 0x0019 BCM57780 1000BASE-T media interface model xxBROADCOM_ALT2 BCM5717C 0x0020 BCM5717C 10/100/1000baseTX PHY model xxBROADCOM_ALT2 BCM5719C 0x0022 BCM5719C 10/100/1000baseTX PHY model xxBROADCOM_ALT2 BCM57765 0x0024 BCM57765 10/100/1000baseTX PHY From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 00:35:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA0DD1065678; Sat, 25 Feb 2012 00:35:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F51C8FC15; Sat, 25 Feb 2012 00:35:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P0ZWoj090961; Sat, 25 Feb 2012 00:35:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P0ZW3Z090958; Sat, 25 Feb 2012 00:35:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202250035.q1P0ZW3Z090958@svn.freebsd.org> From: Marius Strobl Date: Sat, 25 Feb 2012 00:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232136 - stable/7/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 00:35:32 -0000 Author: marius Date: Sat Feb 25 00:35:32 2012 New Revision: 232136 URL: http://svn.freebsd.org/changeset/base/232136 Log: MFC: r231913 - Probe BCM57780. - In case the parent is bge(4), don't set the Jumbo frame settings unless the MAC actually is Jumbo capable as otherwise the PHY might not have the corresponding registers implemented. This is also in line with what the Linux tg3 driver does. PR: 165032 Submitted by: Alexander Milanov Obtained from: OpenBSD Modified: stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/miidevs Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Sat Feb 25 00:35:28 2012 (r232135) +++ stable/7/sys/dev/mii/brgphy.c Sat Feb 25 00:35:32 2012 (r232136) @@ -145,6 +145,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT2, BCM5719C), MII_PHY_DESC(xxBROADCOM_ALT2, BCM5720C), MII_PHY_DESC(xxBROADCOM_ALT2, BCM57765), + MII_PHY_DESC(xxBROADCOM_ALT2, BCM57780), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; @@ -242,7 +243,8 @@ brgphy_attach(device_t dev) sc->mii_flags |= MIIF_HAVEFIBER; } break; - } break; + } + break; case MII_OUI_xxBROADCOM_ALT1: switch (bsc->mii_model) { case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: @@ -964,7 +966,8 @@ brgphy_reset(struct mii_softc *sc) if (bge_sc->bge_phy_flags & BGE_PHY_JITTER_BUG) brgphy_fixup_jitter_bug(sc); - brgphy_jumbo_settings(sc, ifp->if_mtu); + if (bge_sc->bge_flags & BGE_FLAG_JUMBO) + brgphy_jumbo_settings(sc, ifp->if_mtu); if ((bge_sc->bge_phy_flags & BGE_PHY_NO_WIRESPEED) == 0) brgphy_ethernet_wirespeed(sc); Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Sat Feb 25 00:35:28 2012 (r232135) +++ stable/7/sys/dev/mii/miidevs Sat Feb 25 00:35:32 2012 (r232136) @@ -152,6 +152,7 @@ model xxBROADCOM_ALT1 BCM5784 0x003a BCM model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY +model xxBROADCOM_ALT2 BCM57780 0x0019 BCM57780 1000BASE-T media interface model xxBROADCOM_ALT2 BCM5717C 0x0020 BCM5717C 10/100/1000baseTX PHY model xxBROADCOM_ALT2 BCM5719C 0x0022 BCM5719C 10/100/1000baseTX PHY model xxBROADCOM_ALT2 BCM57765 0x0024 BCM57765 10/100/1000baseTX PHY From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 00:41:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17D72106566C; Sat, 25 Feb 2012 00:41:36 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B36298FC2E; Sat, 25 Feb 2012 00:41:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P0fZmZ091222; Sat, 25 Feb 2012 00:41:35 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P0fZ8C091219; Sat, 25 Feb 2012 00:41:35 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202250041.q1P0fZ8C091219@svn.freebsd.org> From: Marius Strobl Date: Sat, 25 Feb 2012 00:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232137 - in stable/9/sys: dev/mii i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 00:41:36 -0000 Author: marius Date: Sat Feb 25 00:41:35 2012 New Revision: 232137 URL: http://svn.freebsd.org/changeset/base/232137 Log: MFC: r231914 Probe the National DP83849, which is a dual-port version of the PHYTER. Obtained from: NetBSD Modified: stable/9/sys/dev/mii/miidevs stable/9/sys/dev/mii/nsphyter.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/dev/mii/miidevs ============================================================================== --- stable/9/sys/dev/mii/miidevs Sat Feb 25 00:35:32 2012 (r232136) +++ stable/9/sys/dev/mii/miidevs Sat Feb 25 00:41:35 2012 (r232137) @@ -1,5 +1,5 @@ $FreeBSD$ -/*$NetBSD: miidevs,v 1.104 2011/11/12 11:10:49 sekiya Exp $*/ +/*$NetBSD: miidevs,v 1.105 2011/11/25 23:28:14 jakllsch Exp $*/ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -280,6 +280,7 @@ model xxNATSEMI DP83847 0x0003 DP83847 model xxNATSEMI DP83891 0x0005 DP83891 1000BASE-T media interface model xxNATSEMI DP83861 0x0006 DP83861 1000BASE-T media interface model xxNATSEMI DP83865 0x0007 DP83865 1000BASE-T media interface +model xxNATSEMI DP83849 0x000a DP83849 10/100 media interface /* PMC Sierra PHYs */ model xxPMCSIERRA PM8351 0x0000 PM8351 OctalPHY Gigabit interface Modified: stable/9/sys/dev/mii/nsphyter.c ============================================================================== --- stable/9/sys/dev/mii/nsphyter.c Sat Feb 25 00:35:32 2012 (r232136) +++ stable/9/sys/dev/mii/nsphyter.c Sat Feb 25 00:41:35 2012 (r232137) @@ -58,8 +58,9 @@ __FBSDID("$FreeBSD$"); /* - * driver for National Semiconductor's DP83843 `PHYTER' ethernet 10/100 PHY - * Data Sheet available from www.national.com + * Driver for the National Semiconductor's DP83843, DP83847 and DP83849 + * `PHYTER' Ethernet 10/100 PHYs + * Data Sheets are available from http://www.national.com * * We also support the DP83815 `MacPHYTER' internal PHY since, for our * purposes, they are compatible. @@ -114,6 +115,7 @@ static const struct mii_phydesc nsphyter MII_PHY_DESC(xxNATSEMI, DP83815), MII_PHY_DESC(xxNATSEMI, DP83843), MII_PHY_DESC(xxNATSEMI, DP83847), + MII_PHY_DESC(xxNATSEMI, DP83849), MII_PHY_END }; From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 00:41:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38F45106564A; Sat, 25 Feb 2012 00:41:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DDAF8FC1A; Sat, 25 Feb 2012 00:41:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P0fbWZ091260; Sat, 25 Feb 2012 00:41:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P0fbS3091257; Sat, 25 Feb 2012 00:41:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202250041.q1P0fbS3091257@svn.freebsd.org> From: Marius Strobl Date: Sat, 25 Feb 2012 00:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232138 - in stable/8/sys: dev/mii i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 00:41:38 -0000 Author: marius Date: Sat Feb 25 00:41:37 2012 New Revision: 232138 URL: http://svn.freebsd.org/changeset/base/232138 Log: MFC: r231914 Probe the National DP83849, which is a dual-port version of the PHYTER. Obtained from: NetBSD Approved by: re (kib) Modified: stable/8/sys/dev/mii/miidevs stable/8/sys/dev/mii/nsphyter.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/dev/mii/miidevs ============================================================================== --- stable/8/sys/dev/mii/miidevs Sat Feb 25 00:41:35 2012 (r232137) +++ stable/8/sys/dev/mii/miidevs Sat Feb 25 00:41:37 2012 (r232138) @@ -213,6 +213,7 @@ model NATSEMI DP83847 0x0003 DP83847 10 model NATSEMI DP83891 0x0005 DP83891 10/100/1000 media interface model NATSEMI DP83861 0x0006 DP83861 10/100/1000 media interface model NATSEMI DP83865 0x0007 DP83865 10/100/1000 media interface +model NATSEMI DP83849 0x000a DP83849 10/100 media interface /* Quality Semiconductor PHYs */ model QUALSEMI QS6612 0x0000 QS6612 10/100 media interface Modified: stable/8/sys/dev/mii/nsphyter.c ============================================================================== --- stable/8/sys/dev/mii/nsphyter.c Sat Feb 25 00:41:35 2012 (r232137) +++ stable/8/sys/dev/mii/nsphyter.c Sat Feb 25 00:41:37 2012 (r232138) @@ -58,8 +58,9 @@ __FBSDID("$FreeBSD$"); /* - * driver for National Semiconductor's DP83843 `PHYTER' ethernet 10/100 PHY - * Data Sheet available from www.national.com + * Driver for the National Semiconductor's DP83843, DP83847 and DP83849 + * `PHYTER' Ethernet 10/100 PHYs + * Data Sheets are available from http://www.national.com * * We also support the DP83815 `MacPHYTER' internal PHY since, for our * purposes, they are compatible. @@ -114,6 +115,7 @@ static const struct mii_phydesc nsphyter MII_PHY_DESC(NATSEMI, DP83815), MII_PHY_DESC(NATSEMI, DP83843), MII_PHY_DESC(NATSEMI, DP83847), + MII_PHY_DESC(NATSEMI, DP83849), MII_PHY_END }; From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 00:41:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 806F31065672; Sat, 25 Feb 2012 00:41:39 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 560B98FC08; Sat, 25 Feb 2012 00:41:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P0fdlV091291; Sat, 25 Feb 2012 00:41:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P0fdLa091288; Sat, 25 Feb 2012 00:41:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202250041.q1P0fdLa091288@svn.freebsd.org> From: Marius Strobl Date: Sat, 25 Feb 2012 00:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232139 - stable/7/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 00:41:39 -0000 Author: marius Date: Sat Feb 25 00:41:38 2012 New Revision: 232139 URL: http://svn.freebsd.org/changeset/base/232139 Log: MFC: r231914 Probe the National DP83849, which is a dual-port version of the PHYTER. Obtained from: NetBSD Modified: stable/7/sys/dev/mii/miidevs stable/7/sys/dev/mii/nsphyter.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Sat Feb 25 00:41:37 2012 (r232138) +++ stable/7/sys/dev/mii/miidevs Sat Feb 25 00:41:38 2012 (r232139) @@ -208,6 +208,7 @@ model NATSEMI DP83847 0x0003 DP83847 10 model NATSEMI DP83891 0x0005 DP83891 10/100/1000 media interface model NATSEMI DP83861 0x0006 DP83861 10/100/1000 media interface model NATSEMI DP83865 0x0007 DP83865 10/100/1000 media interface +model NATSEMI DP83849 0x000a DP83849 10/100 media interface /* Quality Semiconductor PHYs */ model QUALSEMI QS6612 0x0000 QS6612 10/100 media interface Modified: stable/7/sys/dev/mii/nsphyter.c ============================================================================== --- stable/7/sys/dev/mii/nsphyter.c Sat Feb 25 00:41:37 2012 (r232138) +++ stable/7/sys/dev/mii/nsphyter.c Sat Feb 25 00:41:38 2012 (r232139) @@ -58,8 +58,9 @@ __FBSDID("$FreeBSD$"); /* - * driver for National Semiconductor's DP83843 `PHYTER' ethernet 10/100 PHY - * Data Sheet available from www.national.com + * Driver for the National Semiconductor's DP83843, DP83847 and DP83849 + * `PHYTER' Ethernet 10/100 PHYs + * Data Sheets are available from http://www.national.com * * We also support the DP83815 `MacPHYTER' internal PHY since, for our * purposes, they are compatible. @@ -114,6 +115,7 @@ static const struct mii_phydesc nsphyter MII_PHY_DESC(NATSEMI, DP83815), MII_PHY_DESC(NATSEMI, DP83843), MII_PHY_DESC(NATSEMI, DP83847), + MII_PHY_DESC(NATSEMI, DP83849), MII_PHY_END }; From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 01:18:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED54106566B; Sat, 25 Feb 2012 01:18:42 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D3938FC14; Sat, 25 Feb 2012 01:18:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P1IgtM092515; Sat, 25 Feb 2012 01:18:42 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P1IgrU092513; Sat, 25 Feb 2012 01:18:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202250118.q1P1IgrU092513@svn.freebsd.org> From: Marius Strobl Date: Sat, 25 Feb 2012 01:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232140 - in stable/9/sys: dev/isp i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 01:18:42 -0000 Author: marius Date: Sat Feb 25 01:18:42 2012 New Revision: 232140 URL: http://svn.freebsd.org/changeset/base/232140 Log: MFC: r231985 Fix memset sizeof Modified: stable/9/sys/dev/isp/isp_freebsd.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.h Sat Feb 25 00:41:38 2012 (r232139) +++ stable/9/sys/dev/isp/isp_freebsd.h Sat Feb 25 01:18:42 2012 (r232140) @@ -486,7 +486,7 @@ default: \ #define XS_SAVE_SENSE(xs, sense_ptr, slen) do { \ (xs)->ccb_h.status |= CAM_AUTOSNS_VALID; \ - memset(&(xs)->sense_data, 0, sizeof(&(xs)->sense_data));\ + memset(&(xs)->sense_data, 0, sizeof((xs)->sense_data)); \ memcpy(&(xs)->sense_data, sense_ptr, imin(XS_SNSLEN(xs),\ slen)); \ if (slen < (xs)->sense_len) \ From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 01:18:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2B96106566C; Sat, 25 Feb 2012 01:18:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9132A8FC08; Sat, 25 Feb 2012 01:18:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P1IvlG092557; Sat, 25 Feb 2012 01:18:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P1IvB2092555; Sat, 25 Feb 2012 01:18:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201202250118.q1P1IvB2092555@svn.freebsd.org> From: Marius Strobl Date: Sat, 25 Feb 2012 01:18:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232141 - in stable/8/sys: dev/isp i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 01:18:57 -0000 Author: marius Date: Sat Feb 25 01:18:57 2012 New Revision: 232141 URL: http://svn.freebsd.org/changeset/base/232141 Log: MFC: r231985 Fix memset sizeof Approved by: re (kib) Modified: stable/8/sys/dev/isp/isp_freebsd.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.h Sat Feb 25 01:18:42 2012 (r232140) +++ stable/8/sys/dev/isp/isp_freebsd.h Sat Feb 25 01:18:57 2012 (r232141) @@ -473,7 +473,7 @@ default: \ #define XS_SAVE_SENSE(xs, sense_ptr, sense_len) \ (xs)->ccb_h.status |= CAM_AUTOSNS_VALID; \ - memset(&(xs)->sense_data, 0, sizeof(&(xs)->sense_data)); \ + memset(&(xs)->sense_data, 0, sizeof((xs)->sense_data)); \ memcpy(&(xs)->sense_data, sense_ptr, imin(XS_SNSLEN(xs), sense_len)) #define XS_SENSE_VALID(xs) (((xs)->ccb_h.status & CAM_AUTOSNS_VALID) != 0) From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 01:20:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D26FE106566C; Sat, 25 Feb 2012 01:20:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18908FC1F; Sat, 25 Feb 2012 01:20:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P1KrkI092662; Sat, 25 Feb 2012 01:20:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P1KrxR092660; Sat, 25 Feb 2012 01:20:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202250120.q1P1KrxR092660@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 25 Feb 2012 01:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232142 - stable/9/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 01:20:53 -0000 Author: kib Date: Sat Feb 25 01:20:53 2012 New Revision: 232142 URL: http://svn.freebsd.org/changeset/base/232142 Log: MFC r232002: Remove wrong comment. Modified: stable/9/sys/vm/vnode_pager.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vnode_pager.h ============================================================================== --- stable/9/sys/vm/vnode_pager.h Sat Feb 25 01:18:57 2012 (r232141) +++ stable/9/sys/vm/vnode_pager.h Sat Feb 25 01:20:53 2012 (r232142) @@ -40,10 +40,6 @@ #ifdef _KERNEL -/* - * XXX Generic routines; currently called by badly written FS code; these - * XXX should go away soon. - */ int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, int reqpage); int vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m, From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 01:33:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA089106564A; Sat, 25 Feb 2012 01:33:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A974E8FC08; Sat, 25 Feb 2012 01:33:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P1XdEa093079; Sat, 25 Feb 2012 01:33:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P1XdO6093077; Sat, 25 Feb 2012 01:33:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202250133.q1P1XdO6093077@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 25 Feb 2012 01:33:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232143 - head/sys/i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 01:33:39 -0000 Author: kib Date: Sat Feb 25 01:33:39 2012 New Revision: 232143 URL: http://svn.freebsd.org/changeset/base/232143 Log: Do not write to the user address directly, use suword(). Reported by: Bengt Ahlgren MFC after: 1 week Modified: head/sys/i386/linux/linux_sysvec.c Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Sat Feb 25 01:20:53 2012 (r232142) +++ head/sys/i386/linux/linux_sysvec.c Sat Feb 25 01:33:39 2012 (r232143) @@ -227,11 +227,11 @@ linux_fixup(register_t **stack_base, str argv = *stack_base; envp = *stack_base + (imgp->args->argc + 1); (*stack_base)--; - **stack_base = (intptr_t)(void *)envp; + suword(*stack_base, (intptr_t)(void *)envp); (*stack_base)--; - **stack_base = (intptr_t)(void *)argv; + suword(*stack_base, (intptr_t)(void *)argv); (*stack_base)--; - **stack_base = imgp->args->argc; + suword(*stack_base, imgp->args->argc); return (0); } @@ -286,7 +286,7 @@ elf_linux_fixup(register_t **stack_base, imgp->auxargs = NULL; (*stack_base)--; - **stack_base = (register_t)imgp->args->argc; + suword(*stack_base, (register_t)imgp->args->argc); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 02:12:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 058ED106566C; Sat, 25 Feb 2012 02:12:18 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E70338FC14; Sat, 25 Feb 2012 02:12:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P2CHvm094433; Sat, 25 Feb 2012 02:12:17 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P2CH7Y094426; Sat, 25 Feb 2012 02:12:17 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201202250212.q1P2CH7Y094426@svn.freebsd.org> From: David Xu Date: Sat, 25 Feb 2012 02:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232144 - in head: lib/libc/gen lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 02:12:18 -0000 Author: davidxu Date: Sat Feb 25 02:12:17 2012 New Revision: 232144 URL: http://svn.freebsd.org/changeset/base/232144 Log: In revision 231989, we pass a 16-bit clock ID into kernel, however according to POSIX document, the clock ID may be dynamically allocated, it unlikely will be in 64K forever. To make it future compatible, we pack all timeout information into a new structure called _umtx_time, and use fourth argument as a size indication, a zero means it is old code using timespec as timeout value, but the new structure also includes flags and a clock ID, so the size argument is different than before, and it is non-zero. With this change, it is possible that a thread can sleep on any supported clock, though current kernel code does not have such a POSIX clock driver system. Modified: head/lib/libc/gen/sem.c head/lib/libc/gen/sem_new.c head/lib/libthr/thread/thr_umtx.c head/sys/kern/kern_umtx.c head/sys/sys/_umtx.h head/sys/sys/umtx.h Modified: head/lib/libc/gen/sem.c ============================================================================== --- head/lib/libc/gen/sem.c Sat Feb 25 01:33:39 2012 (r232143) +++ head/lib/libc/gen/sem.c Sat Feb 25 02:12:17 2012 (r232144) @@ -312,15 +312,24 @@ _libc_sem_unlink_compat(const char *name } static int -_umtx_wait_uint(volatile unsigned *mtx, unsigned id, const struct timespec *timeout) +_umtx_wait_uint(volatile unsigned *mtx, unsigned id, const struct timespec *abstime) { - if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 && - timeout->tv_nsec <= 0))) { - errno = ETIMEDOUT; - return (-1); + struct _umtx_time *tm_p, timeout; + size_t tm_size; + + if (abstime == NULL) { + tm_p = NULL; + tm_size = 0; + } else { + timeout._clockid = CLOCK_REALTIME; + timeout._flags = UMTX_ABSTIME; + timeout._timeout = *abstime; + tm_p = &timeout; + tm_size = sizeof(timeout); } return _umtx_op(__DEVOLATILE(void *, mtx), - UMTX_OP_WAIT_UINT_PRIVATE, id, NULL, __DECONST(void*, timeout)); + UMTX_OP_WAIT_UINT_PRIVATE, id, + (void *)tm_size, __DECONST(void*, tm_p)); } static int @@ -355,7 +364,6 @@ int _libc_sem_timedwait_compat(sem_t * __restrict sem, const struct timespec * __restrict abstime) { - struct timespec ts, ts2; int val, retval; if (sem_check_validity(sem) != 0) @@ -384,13 +392,11 @@ _libc_sem_timedwait_compat(sem_t * __res errno = EINVAL; return (-1); } - clock_gettime(CLOCK_REALTIME, &ts); - TIMESPEC_SUB(&ts2, abstime, &ts); } atomic_add_int(&(*sem)->nwaiters, 1); pthread_cleanup_push(sem_cancel_handler, sem); _pthread_cancel_enter(1); - retval = _umtx_wait_uint(&(*sem)->count, 0, abstime ? &ts2 : NULL); + retval = _umtx_wait_uint(&(*sem)->count, 0, abstime); _pthread_cancel_leave(0); pthread_cleanup_pop(0); atomic_add_int(&(*sem)->nwaiters, -1); Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Sat Feb 25 01:33:39 2012 (r232143) +++ head/lib/libc/gen/sem_new.c Sat Feb 25 02:12:17 2012 (r232144) @@ -339,15 +339,23 @@ usem_wake(struct _usem *sem) } static __inline int -usem_wait(struct _usem *sem, const struct timespec *timeout) +usem_wait(struct _usem *sem, const struct timespec *abstime) { - if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 && - timeout->tv_nsec <= 0))) { - errno = ETIMEDOUT; - return (-1); + struct _umtx_time *tm_p, timeout; + size_t tm_size; + + if (abstime == NULL) { + tm_p = NULL; + tm_size = 0; + } else { + timeout._clockid = CLOCK_REALTIME; + timeout._flags = UMTX_ABSTIME; + timeout._timeout = *abstime; + tm_p = &timeout; + tm_size = sizeof(timeout); } - return _umtx_op(sem, UMTX_OP_SEM_WAIT, 0, NULL, - __DECONST(void*, timeout)); + return _umtx_op(sem, UMTX_OP_SEM_WAIT, 0, + (void *)tm_size, __DECONST(void*, tm_p)); } int @@ -381,7 +389,6 @@ int _sem_timedwait(sem_t * __restrict sem, const struct timespec * __restrict abstime) { - struct timespec ts, ts2; int val, retval; if (sem_check_validity(sem) != 0) @@ -408,11 +415,9 @@ _sem_timedwait(sem_t * __restrict sem, errno = EINVAL; return (-1); } - clock_gettime(CLOCK_REALTIME, &ts); - TIMESPEC_SUB(&ts2, abstime, &ts); } _pthread_cancel_enter(1); - retval = usem_wait(&sem->_kern, abstime ? &ts2 : NULL); + retval = usem_wait(&sem->_kern, abstime); _pthread_cancel_leave(0); } return (retval); Modified: head/lib/libthr/thread/thr_umtx.c ============================================================================== --- head/lib/libthr/thread/thr_umtx.c Sat Feb 25 01:33:39 2012 (r232143) +++ head/lib/libthr/thread/thr_umtx.c Sat Feb 25 02:12:17 2012 (r232144) @@ -109,23 +109,30 @@ __thr_umutex_lock_spin(struct umutex *mt int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, - const struct timespec *ets) + const struct timespec *abstime) { - struct timespec timo, cts; + struct _umtx_time *tm_p, timeout; + size_t tm_size; uint32_t owner; int ret; - clock_gettime(CLOCK_REALTIME, &cts); - TIMESPEC_SUB(&timo, ets, &cts); - - if (timo.tv_sec < 0) - return (ETIMEDOUT); + if (abstime == NULL) { + tm_p = NULL; + tm_size = 0; + } else { + timeout._clockid = CLOCK_REALTIME; + timeout._flags = UMTX_ABSTIME; + timeout._timeout = *abstime; + tm_p = &timeout; + tm_size = sizeof(timeout); + } for (;;) { if ((mtx->m_flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) == 0) { /* wait in kernel */ - ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0, 0, &timo); + ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0, + (void *)tm_size, __DECONST(void *, tm_p)); /* now try to lock it */ owner = mtx->m_owner; @@ -133,18 +140,13 @@ __thr_umutex_timedlock(struct umutex *mt atomic_cmpset_acq_32(&mtx->m_owner, owner, id|owner)) return (0); } else { - ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0, 0, &timo); + ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0, + (void *)tm_size, __DECONST(void *, tm_p)); if (ret == 0) break; } if (ret == ETIMEDOUT) break; - clock_gettime(CLOCK_REALTIME, &cts); - TIMESPEC_SUB(&timo, ets, &cts); - if (timo.tv_sec < 0 || (timo.tv_sec == 0 && timo.tv_nsec == 0)) { - ret = ETIMEDOUT; - break; - } } return (ret); } @@ -200,10 +202,23 @@ int _thr_umtx_timedwait_uint(volatile u_int *mtx, u_int id, int clockid, const struct timespec *abstime, int shared) { + struct _umtx_time *tm_p, timeout; + size_t tm_size; + + if (abstime == NULL) { + tm_p = NULL; + tm_size = 0; + } else { + timeout._clockid = CLOCK_REALTIME; + timeout._flags = UMTX_ABSTIME; + timeout._timeout = *abstime; + tm_p = &timeout; + tm_size = sizeof(timeout); + } + return _umtx_op_err(__DEVOLATILE(void *, mtx), shared ? UMTX_OP_WAIT_UINT : UMTX_OP_WAIT_UINT_PRIVATE, id, - abstime != NULL ? (void *)(uintptr_t)((clockid << 16) | UMTX_WAIT_ABSTIME) : 0, - __DECONST(void *, abstime)); + (void *)tm_size, __DECONST(void *, tm_p)); } int Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sat Feb 25 01:33:39 2012 (r232143) +++ head/sys/kern/kern_umtx.c Sat Feb 25 02:12:17 2012 (r232144) @@ -984,12 +984,11 @@ tstohz(const struct timespec *tsp) */ static int do_wait(struct thread *td, void *addr, u_long id, - struct timespec *timeout, int compat32, int is_private, uint32_t flags) + struct _umtx_time *timeout, int compat32, int is_private) { struct umtx_q *uq; struct timespec ets, cts, tts; u_long tmp; - int clockid = (flags >> 16) & 0xFFFF; int error = 0; uq = td->td_umtxq; @@ -1014,12 +1013,12 @@ do_wait(struct thread *td, void *addr, u umtxq_remove(uq); umtxq_unlock(&uq->uq_key); } else { - kern_clock_gettime(td, clockid, &cts); - if ((flags & UMTX_WAIT_ABSTIME) == 0) { + kern_clock_gettime(td, timeout->_clockid, &cts); + if ((timeout->_flags & UMTX_ABSTIME) == 0) { ets = cts; - timespecadd(&ets, timeout); + timespecadd(&ets, &timeout->_timeout); } else { - ets = *timeout; + ets = timeout->_timeout; } umtxq_lock(&uq->uq_key); for (;;) { @@ -1037,7 +1036,7 @@ do_wait(struct thread *td, void *addr, u if (error != ETIMEDOUT) break; umtxq_unlock(&uq->uq_key); - kern_clock_gettime(td, clockid, &cts); + kern_clock_gettime(td, timeout->_clockid, &cts); umtxq_lock(&uq->uq_key); } umtxq_remove(uq); @@ -2218,10 +2217,9 @@ _do_lock_umutex(struct thread *td, struc */ static int do_lock_umutex(struct thread *td, struct umutex *m, - struct timespec *timeout, int mode) + struct _umtx_time *timeout, int mode) { - struct timespec ts, ts2, ts3; - struct timeval tv; + struct timespec cts, ets, tts; uint32_t flags; int error; @@ -2235,21 +2233,25 @@ do_lock_umutex(struct thread *td, struct if (error == EINTR && mode != _UMUTEX_WAIT) error = ERESTART; } else { - getnanouptime(&ts); - timespecadd(&ts, timeout); - TIMESPEC_TO_TIMEVAL(&tv, timeout); + kern_clock_gettime(td, timeout->_clockid, &cts); + if ((timeout->_flags & UMTX_ABSTIME) == 0) { + ets = cts; + timespecadd(&ets, &timeout->_timeout); + tts = timeout->_timeout; + } else { + ets = timeout->_timeout; + tts = timeout->_timeout; + timespecsub(&tts, &cts); + } for (;;) { - error = _do_lock_umutex(td, m, flags, tvtohz(&tv), mode); + error = _do_lock_umutex(td, m, flags, tstohz(&tts), mode); if (error != ETIMEDOUT) break; - getnanouptime(&ts2); - if (timespeccmp(&ts2, &ts, >=)) { - error = ETIMEDOUT; + kern_clock_gettime(td, timeout->_clockid, &cts); + if (timespeccmp(&cts, &ets, >=)) break; - } - ts3 = ts; - timespecsub(&ts3, &ts2); - TIMESPEC_TO_TIMEVAL(&tv, &ts3); + tts = ets; + timespecsub(&tts, &cts); } /* Timed-locking is not restarted. */ if (error == ERESTART) @@ -2797,10 +2799,9 @@ out: } static int -do_sem_wait(struct thread *td, struct _usem *sem, struct timespec *timeout) +do_sem_wait(struct thread *td, struct _usem *sem, struct _umtx_time *timeout) { struct umtx_q *uq; - struct timeval tv; struct timespec cts, ets, tts; uint32_t flags, count; int error; @@ -2829,27 +2830,32 @@ do_sem_wait(struct thread *td, struct _u umtxq_lock(&uq->uq_key); umtxq_unbusy(&uq->uq_key); - umtxq_unlock(&uq->uq_key); - umtxq_lock(&uq->uq_key); if (timeout == NULL) { error = umtxq_sleep(uq, "usem", 0); } else { - getnanouptime(&ets); - timespecadd(&ets, timeout); - TIMESPEC_TO_TIMEVAL(&tv, timeout); + umtxq_unlock(&uq->uq_key); + kern_clock_gettime(td, timeout->_clockid, &cts); + if ((timeout->_flags & UMTX_ABSTIME) == 0) { + ets = cts; + timespecadd(&ets, &timeout->_timeout); + } else { + ets = timeout->_timeout; + } + umtxq_lock(&uq->uq_key); for (;;) { - error = umtxq_sleep(uq, "usem", tvtohz(&tv)); - if (error != ETIMEDOUT) - break; - getnanouptime(&cts); if (timespeccmp(&cts, &ets, >=)) { error = ETIMEDOUT; break; } tts = ets; timespecsub(&tts, &cts); - TIMESPEC_TO_TIMEVAL(&tv, &tts); + error = umtxq_sleep(uq, "usem", tstohz(&tts)); + if (error != ETIMEDOUT) + break; + umtxq_unlock(&uq->uq_key); + kern_clock_gettime(td, timeout->_clockid, &cts); + umtxq_lock(&uq->uq_key); } } @@ -2923,6 +2929,25 @@ umtx_copyin_timeout(const void *addr, st return (error); } +static inline int +umtx_copyin_umtx_time(const void *addr, size_t size, struct _umtx_time *tp) +{ + int error; + + tp->_clockid = CLOCK_REALTIME; + tp->_flags = 0; + if (size <= sizeof(struct timespec)) + error = copyin(addr, &tp->_timeout, sizeof(struct timespec)); + else + error = copyin(addr, tp, sizeof(struct _umtx_time)); + if (error != 0) + return (error); + if (tp->_timeout.tv_sec < 0 || + tp->_timeout.tv_nsec >= 1000000000 || tp->_timeout.tv_nsec < 0) + return (EINVAL); + return (0); +} + static int __umtx_op_lock_umtx(struct thread *td, struct _umtx_op_args *uap) { @@ -2950,58 +2975,55 @@ __umtx_op_unlock_umtx(struct thread *td, static int __umtx_op_wait(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time timeout, *tm_p; int error; - uint32_t flags; if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time( + uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - flags = (uint32_t)(uintptr_t)uap->uaddr1; - return do_wait(td, uap->obj, uap->val, ts, 0, 0, flags); + return do_wait(td, uap->obj, uap->val, tm_p, 0, 0); } static int __umtx_op_wait_uint(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time timeout, *tm_p; int error; - uint32_t flags; if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time( + uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - flags = (uint32_t)(uintptr_t)uap->uaddr1; - return do_wait(td, uap->obj, uap->val, ts, 1, 0, flags); + return do_wait(td, uap->obj, uap->val, tm_p, 1, 0); } static int __umtx_op_wait_uint_private(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time *tm_p, timeout; int error; - uint32_t flags; if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time( + uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - flags = (uint32_t)(uintptr_t)uap->uaddr1; - return do_wait(td, uap->obj, uap->val, ts, 1, 1, flags); + return do_wait(td, uap->obj, uap->val, tm_p, 1, 1); } static int @@ -3045,19 +3067,20 @@ __umtx_op_wake_private(struct thread *td static int __umtx_op_lock_umutex(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time *tm_p, timeout; int error; /* Allow a null timespec (wait forever). */ if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time( + uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - return do_lock_umutex(td, uap->obj, ts, 0); + return do_lock_umutex(td, uap->obj, tm_p, 0); } static int @@ -3069,19 +3092,20 @@ __umtx_op_trylock_umutex(struct thread * static int __umtx_op_wait_umutex(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time *tm_p, timeout; int error; /* Allow a null timespec (wait forever). */ if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time( + uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - return do_lock_umutex(td, uap->obj, ts, _UMUTEX_WAIT); + return do_lock_umutex(td, uap->obj, tm_p, _UMUTEX_WAIT); } static int @@ -3178,19 +3202,20 @@ __umtx_op_rw_unlock(struct thread *td, s static int __umtx_op_sem_wait(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time *tm_p, timeout; int error; /* Allow a null timespec (wait forever). */ if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time( + uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - return (do_sem_wait(td, uap->obj, ts)); + return (do_sem_wait(td, uap->obj, tm_p)); } static int @@ -3254,6 +3279,12 @@ struct timespec32 { uint32_t tv_nsec; }; +struct umtx_time32 { + struct timespec32 timeout; + uint32_t flags; + uint32_t clockid; +}; + static inline int umtx_copyin_timeout32(void *addr, struct timespec *tsp) { @@ -3274,6 +3305,30 @@ umtx_copyin_timeout32(void *addr, struct return (error); } +static inline int +umtx_copyin_umtx_time32(const void *addr, size_t size, struct _umtx_time *tp) +{ + struct umtx_time32 t32; + int error; + + t32.clockid = CLOCK_REALTIME; + t32.flags = 0; + if (size <= sizeof(struct timespec32)) + error = copyin(addr, &t32.timeout, sizeof(struct timespec32)); + else + error = copyin(addr, &t32, sizeof(struct umtx_time32)); + if (error != 0) + return (error); + if (t32.timeout.tv_sec < 0 || + t32.timeout.tv_nsec >= 1000000000 || t32.timeout.tv_nsec < 0) + return (EINVAL); + tp->_timeout.tv_sec = t32.timeout.tv_sec; + tp->_timeout.tv_nsec = t32.timeout.tv_nsec; + tp->_flags = t32.flags; + tp->_clockid = t32.clockid; + return (0); +} + static int __umtx_op_lock_umtx_compat32(struct thread *td, struct _umtx_op_args *uap) { @@ -3301,56 +3356,57 @@ __umtx_op_unlock_umtx_compat32(struct th static int __umtx_op_wait_compat32(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time *tm_p, timeout; int error; - uint32_t flags; if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time32(uap->uaddr2, + (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - flags = (uint32_t)(uintptr_t)uap->uaddr1; - return do_wait(td, uap->obj, uap->val, ts, 1, 0, flags); + return do_wait(td, uap->obj, uap->val, tm_p, 1, 0); } static int __umtx_op_lock_umutex_compat32(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time *tm_p, timeout; int error; /* Allow a null timespec (wait forever). */ if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time(uap->uaddr2, + (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - return do_lock_umutex(td, uap->obj, ts, 0); + return do_lock_umutex(td, uap->obj, tm_p, 0); } static int __umtx_op_wait_umutex_compat32(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time *tm_p, timeout; int error; /* Allow a null timespec (wait forever). */ if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time32(uap->uaddr2, + (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - return do_lock_umutex(td, uap->obj, ts, _UMUTEX_WAIT); + return do_lock_umutex(td, uap->obj, tm_p, _UMUTEX_WAIT); } static int @@ -3411,38 +3467,38 @@ __umtx_op_rw_wrlock_compat32(struct thre static int __umtx_op_wait_uint_private_compat32(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time *tm_p, timeout; int error; - uint32_t flags; if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time32( + uap->uaddr2, (size_t)uap->uaddr1,&timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - flags = (uint32_t)(uintptr_t)uap->uaddr1; - return do_wait(td, uap->obj, uap->val, ts, 1, 1, flags); + return do_wait(td, uap->obj, uap->val, tm_p, 1, 1); } static int __umtx_op_sem_wait_compat32(struct thread *td, struct _umtx_op_args *uap) { - struct timespec *ts, timeout; + struct _umtx_time *tm_p, timeout; int error; /* Allow a null timespec (wait forever). */ if (uap->uaddr2 == NULL) - ts = NULL; + tm_p = NULL; else { - error = umtx_copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_umtx_time32(uap->uaddr2, + (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); - ts = &timeout; + tm_p = &timeout; } - return (do_sem_wait(td, uap->obj, ts)); + return (do_sem_wait(td, uap->obj, tm_p)); } static int Modified: head/sys/sys/_umtx.h ============================================================================== --- head/sys/sys/_umtx.h Sat Feb 25 01:33:39 2012 (r232143) +++ head/sys/sys/_umtx.h Sat Feb 25 02:12:17 2012 (r232144) @@ -31,6 +31,7 @@ #define _SYS__UMTX_H_ #include +#include struct umtx { volatile unsigned long u_owner; /* Owner of the mutex. */ @@ -64,4 +65,10 @@ struct _usem { __uint32_t _flags; }; +struct _umtx_time { + struct timespec _timeout; + __uint32_t _flags; + __uint32_t _clockid; +}; + #endif /* !_SYS__UMTX_H_ */ Modified: head/sys/sys/umtx.h ============================================================================== --- head/sys/sys/umtx.h Sat Feb 25 01:33:39 2012 (r232143) +++ head/sys/sys/umtx.h Sat Feb 25 02:12:17 2012 (r232144) @@ -87,7 +87,7 @@ #define CVWAIT_ABSTIME 0x02 #define CVWAIT_CLOCKID 0x04 -#define UMTX_WAIT_ABSTIME 0x01 +#define UMTX_ABSTIME 0x01 #define UMTX_CHECK_UNPARKING CVWAIT_CHECK_UNPARKING From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 04:54:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5FF8106564A; Sat, 25 Feb 2012 04:54:51 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3BE48FC08; Sat, 25 Feb 2012 04:54:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P4spMb000493; Sat, 25 Feb 2012 04:54:51 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P4spM4000489; Sat, 25 Feb 2012 04:54:51 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201202250454.q1P4spM4000489@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 25 Feb 2012 04:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232145 - in head/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 04:54:51 -0000 Author: yongari Date: Sat Feb 25 04:54:51 2012 New Revision: 232145 URL: http://svn.freebsd.org/changeset/base/232145 Log: Use correct Config registers for RTL8139 family. Unlike RTL8168 and RTL810x family , RTL8139 has different register map for Config registers. While here, follow the lead of re(4) in WOL configuration. - Disable WOL_UCAST and WOL_MCAST capabilities by default. - Config5 register write does not need to unlock EEPROM access on RTL8139 family but unlocking EEPROM access does not affect its operation and make it consistent with re(4). Reported by: Matt Renzelmann mjr <> cs dot wisc dot edu Modified: head/sys/dev/re/if_re.c head/sys/pci/if_rl.c head/sys/pci/if_rlreg.h Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Sat Feb 25 02:12:17 2012 (r232144) +++ head/sys/dev/re/if_re.c Sat Feb 25 04:54:51 2012 (r232145) @@ -1477,6 +1477,22 @@ re_attach(device_t dev) break; } + if (sc->rl_hwrev->rl_rev == RL_HWREV_8139CPLUS) { + sc->rl_cfg0 = RL_8139_CFG0; + sc->rl_cfg1 = RL_8139_CFG1; + sc->rl_cfg2 = 0; + sc->rl_cfg3 = RL_8139_CFG3; + sc->rl_cfg4 = RL_8139_CFG4; + sc->rl_cfg5 = RL_8139_CFG5; + } else { + sc->rl_cfg0 = RL_CFG0; + sc->rl_cfg1 = RL_CFG1; + sc->rl_cfg2 = RL_CFG2; + sc->rl_cfg3 = RL_CFG3; + sc->rl_cfg4 = RL_CFG4; + sc->rl_cfg5 = RL_CFG5; + } + /* Reset the adapter. */ RL_LOCK(sc); re_reset(sc); @@ -1484,12 +1500,12 @@ re_attach(device_t dev) /* Enable PME. */ CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); - cfg = CSR_READ_1(sc, RL_CFG1); + cfg = CSR_READ_1(sc, sc->rl_cfg1); cfg |= RL_CFG1_PME; - CSR_WRITE_1(sc, RL_CFG1, cfg); - cfg = CSR_READ_1(sc, RL_CFG5); + CSR_WRITE_1(sc, sc->rl_cfg1, cfg); + cfg = CSR_READ_1(sc, sc->rl_cfg5); cfg &= RL_CFG5_PME_STS; - CSR_WRITE_1(sc, RL_CFG5, cfg); + CSR_WRITE_1(sc, sc->rl_cfg5, cfg); CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); if ((sc->rl_flags & RL_FLAG_PAR) != 0) { @@ -2951,32 +2967,32 @@ re_set_jumbo(struct rl_softc *sc, int ju CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_WRITECFG); if (jumbo != 0) { - CSR_WRITE_1(sc, RL_CFG3, CSR_READ_1(sc, RL_CFG3) | + CSR_WRITE_1(sc, sc->rl_cfg3, CSR_READ_1(sc, sc->rl_cfg3) | RL_CFG3_JUMBO_EN0); switch (sc->rl_hwrev->rl_rev) { case RL_HWREV_8168DP: break; case RL_HWREV_8168E: - CSR_WRITE_1(sc, RL_CFG4, CSR_READ_1(sc, RL_CFG4) | - 0x01); + CSR_WRITE_1(sc, sc->rl_cfg4, + CSR_READ_1(sc, sc->rl_cfg4) | 0x01); break; default: - CSR_WRITE_1(sc, RL_CFG4, CSR_READ_1(sc, RL_CFG4) | - RL_CFG4_JUMBO_EN1); + CSR_WRITE_1(sc, sc->rl_cfg4, + CSR_READ_1(sc, sc->rl_cfg4) | RL_CFG4_JUMBO_EN1); } } else { - CSR_WRITE_1(sc, RL_CFG3, CSR_READ_1(sc, RL_CFG3) & + CSR_WRITE_1(sc, sc->rl_cfg3, CSR_READ_1(sc, sc->rl_cfg3) & ~RL_CFG3_JUMBO_EN0); switch (sc->rl_hwrev->rl_rev) { case RL_HWREV_8168DP: break; case RL_HWREV_8168E: - CSR_WRITE_1(sc, RL_CFG4, CSR_READ_1(sc, RL_CFG4) & - ~0x01); + CSR_WRITE_1(sc, sc->rl_cfg4, + CSR_READ_1(sc, sc->rl_cfg4) & ~0x01); break; default: - CSR_WRITE_1(sc, RL_CFG4, CSR_READ_1(sc, RL_CFG4) & - ~RL_CFG4_JUMBO_EN1); + CSR_WRITE_1(sc, sc->rl_cfg4, + CSR_READ_1(sc, sc->rl_cfg4) & ~RL_CFG4_JUMBO_EN1); } } CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); @@ -3089,7 +3105,7 @@ re_init_locked(struct rl_softc *sc) if (sc->rl_hwrev->rl_rev == RL_HWREV_8169_8110SC || sc->rl_hwrev->rl_rev == RL_HWREV_8169_8110SCE) { reg = 0x000fff00; - if ((CSR_READ_1(sc, RL_CFG2) & RL_CFG2_PCI66MHZ) != 0) + if ((CSR_READ_1(sc, sc->rl_cfg2) & RL_CFG2_PCI66MHZ) != 0) reg |= 0x000000ff; if (sc->rl_hwrev->rl_rev == RL_HWREV_8169_8110SCE) reg |= 0x00f00000; @@ -3254,7 +3270,8 @@ re_init_locked(struct rl_softc *sc) if (sc->rl_testmode) return; - CSR_WRITE_1(sc, RL_CFG1, CSR_READ_1(sc, RL_CFG1) | RL_CFG1_DRVLOAD); + CSR_WRITE_1(sc, sc->rl_cfg1, CSR_READ_1(sc, sc->rl_cfg1) | + RL_CFG1_DRVLOAD); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -3787,19 +3804,19 @@ re_setwol(struct rl_softc *sc) CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); /* Enable PME. */ - v = CSR_READ_1(sc, RL_CFG1); + v = CSR_READ_1(sc, sc->rl_cfg1); v &= ~RL_CFG1_PME; if ((ifp->if_capenable & IFCAP_WOL) != 0) v |= RL_CFG1_PME; - CSR_WRITE_1(sc, RL_CFG1, v); + CSR_WRITE_1(sc, sc->rl_cfg1, v); - v = CSR_READ_1(sc, RL_CFG3); + v = CSR_READ_1(sc, sc->rl_cfg3); v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC); if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) v |= RL_CFG3_WOL_MAGIC; - CSR_WRITE_1(sc, RL_CFG3, v); + CSR_WRITE_1(sc, sc->rl_cfg3, v); - v = CSR_READ_1(sc, RL_CFG5); + v = CSR_READ_1(sc, sc->rl_cfg5); v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST | RL_CFG5_WOL_LANWAKE); if ((ifp->if_capenable & IFCAP_WOL_UCAST) != 0) @@ -3808,7 +3825,7 @@ re_setwol(struct rl_softc *sc) v |= RL_CFG5_WOL_MCAST | RL_CFG5_WOL_BCAST; if ((ifp->if_capenable & IFCAP_WOL) != 0) v |= RL_CFG5_WOL_LANWAKE; - CSR_WRITE_1(sc, RL_CFG5, v); + CSR_WRITE_1(sc, sc->rl_cfg5, v); /* Config register write done. */ CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); @@ -3844,17 +3861,17 @@ re_clrwol(struct rl_softc *sc) /* Enable config register write. */ CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); - v = CSR_READ_1(sc, RL_CFG3); + v = CSR_READ_1(sc, sc->rl_cfg3); v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC); - CSR_WRITE_1(sc, RL_CFG3, v); + CSR_WRITE_1(sc, sc->rl_cfg3, v); /* Config register write done. */ CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); - v = CSR_READ_1(sc, RL_CFG5); + v = CSR_READ_1(sc, sc->rl_cfg5); v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST); v &= ~RL_CFG5_WOL_LANWAKE; - CSR_WRITE_1(sc, RL_CFG5, v); + CSR_WRITE_1(sc, sc->rl_cfg5, v); } static void Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Sat Feb 25 02:12:17 2012 (r232144) +++ head/sys/pci/if_rl.c Sat Feb 25 04:54:51 2012 (r232145) @@ -717,6 +717,13 @@ rl_attach(device_t dev) goto fail; } + sc->rl_cfg0 = RL_8139_CFG0; + sc->rl_cfg1 = RL_8139_CFG1; + sc->rl_cfg2 = 0; + sc->rl_cfg3 = RL_8139_CFG3; + sc->rl_cfg4 = RL_8139_CFG4; + sc->rl_cfg5 = RL_8139_CFG5; + /* * Reset the adapter. Only take the lock here as it's needed in * order to call rl_reset(). @@ -818,6 +825,7 @@ rl_attach(device_t dev) } } ifp->if_capenable = ifp->if_capabilities; + ifp->if_capenable &= ~(IFCAP_WOL_UCAST | IFCAP_WOL_MCAST); #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; #endif @@ -1754,7 +1762,7 @@ rl_init_locked(struct rl_softc *sc) sc->rl_flags &= ~RL_FLAG_LINK; mii_mediachg(mii); - CSR_WRITE_1(sc, RL_CFG1, RL_CFG1_DRVLOAD|RL_CFG1_FULLDUPLEX); + CSR_WRITE_1(sc, sc->rl_cfg1, RL_CFG1_DRVLOAD|RL_CFG1_FULLDUPLEX); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -2055,22 +2063,19 @@ rl_setwol(struct rl_softc *sc) CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); /* Enable PME. */ - v = CSR_READ_1(sc, RL_CFG1); + v = CSR_READ_1(sc, sc->rl_cfg1); v &= ~RL_CFG1_PME; if ((ifp->if_capenable & IFCAP_WOL) != 0) v |= RL_CFG1_PME; - CSR_WRITE_1(sc, RL_CFG1, v); + CSR_WRITE_1(sc, sc->rl_cfg1, v); - v = CSR_READ_1(sc, RL_CFG3); + v = CSR_READ_1(sc, sc->rl_cfg3); v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC); if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) v |= RL_CFG3_WOL_MAGIC; - CSR_WRITE_1(sc, RL_CFG3, v); - - /* Config register write done. */ - CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); + CSR_WRITE_1(sc, sc->rl_cfg3, v); - v = CSR_READ_1(sc, RL_CFG5); + v = CSR_READ_1(sc, sc->rl_cfg5); v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST); v &= ~RL_CFG5_WOL_LANWAKE; if ((ifp->if_capenable & IFCAP_WOL_UCAST) != 0) @@ -2079,7 +2084,11 @@ rl_setwol(struct rl_softc *sc) v |= RL_CFG5_WOL_MCAST | RL_CFG5_WOL_BCAST; if ((ifp->if_capenable & IFCAP_WOL) != 0) v |= RL_CFG5_WOL_LANWAKE; - CSR_WRITE_1(sc, RL_CFG5, v); + CSR_WRITE_1(sc, sc->rl_cfg5, v); + + /* Config register write done. */ + CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); + /* Request PME if WOL is requested. */ pmstat = pci_read_config(sc->rl_dev, pmc + PCIR_POWER_STATUS, 2); pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); @@ -2101,15 +2110,15 @@ rl_clrwol(struct rl_softc *sc) /* Enable config register write. */ CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); - v = CSR_READ_1(sc, RL_CFG3); + v = CSR_READ_1(sc, sc->rl_cfg3); v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC); - CSR_WRITE_1(sc, RL_CFG3, v); + CSR_WRITE_1(sc, sc->rl_cfg3, v); /* Config register write done. */ CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); - v = CSR_READ_1(sc, RL_CFG5); + v = CSR_READ_1(sc, sc->rl_cfg5); v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST); v &= ~RL_CFG5_WOL_LANWAKE; - CSR_WRITE_1(sc, RL_CFG5, v); + CSR_WRITE_1(sc, sc->rl_cfg5, v); } Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Sat Feb 25 02:12:17 2012 (r232144) +++ head/sys/pci/if_rlreg.h Sat Feb 25 04:54:51 2012 (r232145) @@ -74,6 +74,14 @@ #define RL_TIMERCNT 0x0048 /* timer count register */ #define RL_MISSEDPKT 0x004C /* missed packet counter */ #define RL_EECMD 0x0050 /* EEPROM command register */ + +/* RTL8139/RTL8139C+ only */ +#define RL_8139_CFG0 0x0051 /* config register #0 */ +#define RL_8139_CFG1 0x0052 /* config register #1 */ +#define RL_8139_CFG3 0x0059 /* config register #3 */ +#define RL_8139_CFG4 0x005A /* config register #4 */ +#define RL_8139_CFG5 0x00D8 /* config register #5 */ + #define RL_CFG0 0x0051 /* config register #0 */ #define RL_CFG1 0x0052 /* config register #1 */ #define RL_CFG2 0x0053 /* config register #2 */ @@ -873,6 +881,12 @@ struct rl_softc { int rl_eewidth; int rl_expcap; int rl_txthresh; + bus_size_t rl_cfg0; + bus_size_t rl_cfg1; + bus_size_t rl_cfg2; + bus_size_t rl_cfg3; + bus_size_t rl_cfg4; + bus_size_t rl_cfg5; struct rl_chain_data rl_cdata; struct rl_list_data rl_ldata; struct callout rl_stat_callout; From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 07:59:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80802106564A; Sat, 25 Feb 2012 07:59:00 +0000 (UTC) (envelope-from deischen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FD238FC15; Sat, 25 Feb 2012 07:59:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P7x009006862; Sat, 25 Feb 2012 07:59:00 GMT (envelope-from deischen@svn.freebsd.org) Received: (from deischen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P7x01v006860; Sat, 25 Feb 2012 07:59:00 GMT (envelope-from deischen@svn.freebsd.org) Message-Id: <201202250759.q1P7x01v006860@svn.freebsd.org> From: Daniel Eischen Date: Sat, 25 Feb 2012 07:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232146 - head/usr.sbin/adduser X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 07:59:00 -0000 Author: deischen Date: Sat Feb 25 07:58:59 2012 New Revision: 232146 URL: http://svn.freebsd.org/changeset/base/232146 Log: When using uidstart in /etc/adduser.conf, get the next available user id and show it in the "Uid [xxx]" prompt. PR: 163863 Submitted by: Moritz Wilhelmy (mw at wzff dot de) MFC after: 2 weeks Modified: head/usr.sbin/adduser/adduser.sh Modified: head/usr.sbin/adduser/adduser.sh ============================================================================== --- head/usr.sbin/adduser/adduser.sh Sat Feb 25 04:54:51 2012 (r232145) +++ head/usr.sbin/adduser/adduser.sh Sat Feb 25 07:58:59 2012 (r232146) @@ -488,6 +488,7 @@ get_uid() { _prompt= if [ -n "$uuid" ]; then + uuid=`get_nextuid $uuid` _prompt="Uid [$uuid]: " else _prompt="Uid (Leave empty for default): " From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 08:01:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E5751065672; Sat, 25 Feb 2012 08:01:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DACF8FC13; Sat, 25 Feb 2012 08:01:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1P81URu006996; Sat, 25 Feb 2012 08:01:30 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1P81Tdx006994; Sat, 25 Feb 2012 08:01:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202250801.q1P81Tdx006994@svn.freebsd.org> From: Adrian Chadd Date: Sat, 25 Feb 2012 08:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232147 - head/sys/dev/wi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 08:01:30 -0000 Author: adrian Date: Sat Feb 25 08:01:29 2012 New Revision: 232147 URL: http://svn.freebsd.org/changeset/base/232147 Log: If an interrupt is received with no vap attached, just fail LINK events. This fixes a NULL pointer dereference which occurs if the vap list is empty but someone brings up the wi0 interface. Modified: head/sys/dev/wi/if_wi.c Modified: head/sys/dev/wi/if_wi.c ============================================================================== --- head/sys/dev/wi/if_wi.c Sat Feb 25 07:58:59 2012 (r232146) +++ head/sys/dev/wi/if_wi.c Sat Feb 25 08:01:29 2012 (r232147) @@ -1511,6 +1511,10 @@ wi_info_intr(struct wi_softc *sc) case WI_INFO_LINK_STAT: wi_read_bap(sc, fid, sizeof(ltbuf), &stat, sizeof(stat)); DPRINTF(("wi_info_intr: LINK_STAT 0x%x\n", le16toh(stat))); + + if (vap == NULL) + goto finish; + switch (le16toh(stat)) { case WI_INFO_LINK_STAT_CONNECTED: if (vap->iv_state == IEEE80211_S_RUN && @@ -1566,6 +1570,7 @@ wi_info_intr(struct wi_softc *sc) le16toh(ltbuf[1]), le16toh(ltbuf[0]))); break; } +finish: CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_INFO); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 10:10:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA033106564A; Sat, 25 Feb 2012 10:10:44 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A54C18FC0A; Sat, 25 Feb 2012 10:10:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PAAiYW011135; Sat, 25 Feb 2012 10:10:44 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PAAiZ5011102; Sat, 25 Feb 2012 10:10:44 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202251010.q1PAAiZ5011102@svn.freebsd.org> From: Christian Brueffer Date: Sat, 25 Feb 2012 10:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232151 - stable/9/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 10:10:44 -0000 Author: brueffer Date: Sat Feb 25 10:10:43 2012 New Revision: 232151 URL: http://svn.freebsd.org/changeset/base/232151 Log: MFC: r231871 Switch the license boilerplates to our standard one. Advantages: - Reduces the number of different license versions in the tree - Eliminates a typo - Removes some incorrect author attributions due to c/p - Removes c/p error potential for future pmc manpages Approved by: jkoshy, gnn, rpaulo, fabient (copyright holders) Modified: stable/9/lib/libpmc/pmc.3 stable/9/lib/libpmc/pmc.atom.3 stable/9/lib/libpmc/pmc.core.3 stable/9/lib/libpmc/pmc.core2.3 stable/9/lib/libpmc/pmc.corei7.3 stable/9/lib/libpmc/pmc.corei7uc.3 stable/9/lib/libpmc/pmc.iaf.3 stable/9/lib/libpmc/pmc.k7.3 stable/9/lib/libpmc/pmc.k8.3 stable/9/lib/libpmc/pmc.mips.3 stable/9/lib/libpmc/pmc.p4.3 stable/9/lib/libpmc/pmc.p5.3 stable/9/lib/libpmc/pmc.p6.3 stable/9/lib/libpmc/pmc.tsc.3 stable/9/lib/libpmc/pmc.ucf.3 stable/9/lib/libpmc/pmc.westmere.3 stable/9/lib/libpmc/pmc.westmereuc.3 stable/9/lib/libpmc/pmc.xscale.3 stable/9/lib/libpmc/pmc_allocate.3 stable/9/lib/libpmc/pmc_attach.3 stable/9/lib/libpmc/pmc_capabilities.3 stable/9/lib/libpmc/pmc_configure_logfile.3 stable/9/lib/libpmc/pmc_disable.3 stable/9/lib/libpmc/pmc_event_names_of_class.3 stable/9/lib/libpmc/pmc_get_driver_stats.3 stable/9/lib/libpmc/pmc_get_msr.3 stable/9/lib/libpmc/pmc_init.3 stable/9/lib/libpmc/pmc_name_of_capability.3 stable/9/lib/libpmc/pmc_read.3 stable/9/lib/libpmc/pmc_set.3 stable/9/lib/libpmc/pmc_start.3 stable/9/lib/libpmc/pmclog.3 Directory Properties: stable/9/lib/libpmc/ (props changed) Modified: stable/9/lib/libpmc/pmc.3 ============================================================================== --- stable/9/lib/libpmc/pmc.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.atom.3 ============================================================================== --- stable/9/lib/libpmc/pmc.atom.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.atom.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.core.3 ============================================================================== --- stable/9/lib/libpmc/pmc.core.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.core.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.core2.3 ============================================================================== --- stable/9/lib/libpmc/pmc.core2.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.core2.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.corei7.3 ============================================================================== --- stable/9/lib/libpmc/pmc.corei7.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.corei7.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.corei7uc.3 ============================================================================== --- stable/9/lib/libpmc/pmc.corei7uc.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.corei7uc.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.iaf.3 ============================================================================== --- stable/9/lib/libpmc/pmc.iaf.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.iaf.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.k7.3 ============================================================================== --- stable/9/lib/libpmc/pmc.k7.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.k7.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.k8.3 ============================================================================== --- stable/9/lib/libpmc/pmc.k8.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.k8.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.mips.3 ============================================================================== --- stable/9/lib/libpmc/pmc.mips.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.mips.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 ``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 George Neville-Neil 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.p4.3 ============================================================================== --- stable/9/lib/libpmc/pmc.p4.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.p4.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.p5.3 ============================================================================== --- stable/9/lib/libpmc/pmc.p5.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.p5.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.p6.3 ============================================================================== --- stable/9/lib/libpmc/pmc.p6.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.p6.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.tsc.3 ============================================================================== --- stable/9/lib/libpmc/pmc.tsc.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.tsc.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.ucf.3 ============================================================================== --- stable/9/lib/libpmc/pmc.ucf.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.ucf.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.westmere.3 ============================================================================== --- stable/9/lib/libpmc/pmc.westmere.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.westmere.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.westmereuc.3 ============================================================================== --- stable/9/lib/libpmc/pmc.westmereuc.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.westmereuc.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc.xscale.3 ============================================================================== --- stable/9/lib/libpmc/pmc.xscale.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc.xscale.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Rui Paulo ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_allocate.3 ============================================================================== --- stable/9/lib/libpmc/pmc_allocate.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_allocate.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_attach.3 ============================================================================== --- stable/9/lib/libpmc/pmc_attach.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_attach.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_capabilities.3 ============================================================================== --- stable/9/lib/libpmc/pmc_capabilities.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_capabilities.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_configure_logfile.3 ============================================================================== --- stable/9/lib/libpmc/pmc_configure_logfile.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_configure_logfile.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_disable.3 ============================================================================== --- stable/9/lib/libpmc/pmc_disable.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_disable.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_event_names_of_class.3 ============================================================================== --- stable/9/lib/libpmc/pmc_event_names_of_class.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_event_names_of_class.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_get_driver_stats.3 ============================================================================== --- stable/9/lib/libpmc/pmc_get_driver_stats.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_get_driver_stats.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_get_msr.3 ============================================================================== --- stable/9/lib/libpmc/pmc_get_msr.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_get_msr.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_init.3 ============================================================================== --- stable/9/lib/libpmc/pmc_init.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_init.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_name_of_capability.3 ============================================================================== --- stable/9/lib/libpmc/pmc_name_of_capability.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_name_of_capability.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_read.3 ============================================================================== --- stable/9/lib/libpmc/pmc_read.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_read.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_set.3 ============================================================================== --- stable/9/lib/libpmc/pmc_set.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_set.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmc_start.3 ============================================================================== --- stable/9/lib/libpmc/pmc_start.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmc_start.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/9/lib/libpmc/pmclog.3 ============================================================================== --- stable/9/lib/libpmc/pmclog.3 Sat Feb 25 09:28:38 2012 (r232150) +++ stable/9/lib/libpmc/pmclog.3 Sat Feb 25 10:10:43 2012 (r232151) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 10:15:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9190B1065670; Sat, 25 Feb 2012 10:15:42 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 674EE8FC0A; Sat, 25 Feb 2012 10:15:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PAFg6c011340; Sat, 25 Feb 2012 10:15:42 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PAFgtZ011336; Sat, 25 Feb 2012 10:15:42 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202251015.q1PAFgtZ011336@svn.freebsd.org> From: Mikolaj Golub Date: Sat, 25 Feb 2012 10:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232152 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 10:15:42 -0000 Author: trociny Date: Sat Feb 25 10:15:41 2012 New Revision: 232152 URL: http://svn.freebsd.org/changeset/base/232152 Log: When detaching an unix domain socket, uipc_detach() checks unp->unp_vnode pointer to detect if there is a vnode associated with (binded to) this socket and does necessary cleanup if there is. The issue is that after forced unmount this check may be too late as the unp_vnode is reclaimed and the reference is stale. To fix this provide a helper function that is called on a socket vnode reclamation to do necessary cleanup. Pointed by: kib Reviewed by: kib MFC after: 2 weeks Modified: head/sys/kern/uipc_usrreq.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Sat Feb 25 10:10:43 2012 (r232151) +++ head/sys/kern/uipc_usrreq.c Sat Feb 25 10:15:41 2012 (r232152) @@ -2300,6 +2300,45 @@ unp_scan(struct mbuf *m0, void (*op)(str } } +/* + * A helper function called by VFS before socket-type vnode reclamation. + * For an active vnode it clears unp_vnode pointer and decrements unp_vnode + * use count. + */ +void +vfs_unp_reclaim(struct vnode *vp) +{ + struct socket *so; + struct unpcb *unp; + int active; + + ASSERT_VOP_ELOCKED(vp, "vfs_unp_reclaim"); + KASSERT(vp->v_type == VSOCK, + ("vfs_unp_reclaim: vp->v_type != VSOCK")); + + active = 0; + UNP_LINK_WLOCK(); + so = vp->v_socket; + if (so == NULL) + goto done; + unp = sotounpcb(so); + if (unp == NULL) + goto done; + UNP_PCB_LOCK(unp); + if (unp->unp_vnode != NULL) { + KASSERT(unp->unp_vnode == vp, + ("vfs_unp_reclaim: vp != unp->unp_vnode")); + vp->v_socket = NULL; + unp->unp_vnode = NULL; + active = 1; + } + UNP_PCB_UNLOCK(unp); +done: + UNP_LINK_WUNLOCK(); + if (active) + vunref(vp); +} + #ifdef DDB static void db_print_indent(int indent) Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Feb 25 10:10:43 2012 (r232151) +++ head/sys/kern/vfs_subr.c Sat Feb 25 10:15:41 2012 (r232152) @@ -2657,6 +2657,8 @@ vgonel(struct vnode *vp) vinactive(vp, td); VI_UNLOCK(vp); } + if (vp->v_type == VSOCK) + vfs_unp_reclaim(vp); /* * Reclaim the vnode. */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sat Feb 25 10:10:43 2012 (r232151) +++ head/sys/sys/vnode.h Sat Feb 25 10:15:41 2012 (r232152) @@ -793,6 +793,8 @@ int vfs_read_dirent(struct vop_readdir_a int vfs_unixify_accmode(accmode_t *accmode); +void vfs_unp_reclaim(struct vnode *vp); + int setfmode(struct thread *td, struct ucred *cred, struct vnode *vp, int mode); int setfown(struct thread *td, struct ucred *cred, struct vnode *vp, uid_t uid, gid_t gid); From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 10:58:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EEA9106564A; Sat, 25 Feb 2012 10:58:04 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 088B88FC16; Sat, 25 Feb 2012 10:58:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PAw3fJ014529; Sat, 25 Feb 2012 10:58:03 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PAw30N014517; Sat, 25 Feb 2012 10:58:03 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201202251058.q1PAw30N014517@svn.freebsd.org> From: Martin Matuska Date: Sat, 25 Feb 2012 10:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232153 - in head: . contrib/libarchive contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/libarchi... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 10:58:04 -0000 Author: mm Date: Sat Feb 25 10:58:02 2012 New Revision: 232153 URL: http://svn.freebsd.org/changeset/base/232153 Log: Update libarchive to 3.0.3 Some of new features: - New readers: RAR, LHA/LZH, CAB reader, 7-Zip - New writers: ISO9660, XAR - Improvements to many formats, especially including ISO9660 and Zip - Stackable write filters to write, e.g., tar.gz.uu in a single pass - Exploit seekable input; new "seekable" Zip reader can exploit the Zip Central Directory when it's available; the old "streamable" Zip reader is still fully supported for cases where seeking is not possible. Full release notes available at: https://github.com/libarchive/libarchive/wiki/ReleaseNotes Added: head/contrib/libarchive/cpio/test/test_option_0.c - copied unchanged from r231200, vendor/libarchive/dist/cpio/test/test_option_0.c head/contrib/libarchive/libarchive/archive_acl.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_acl.c head/contrib/libarchive/libarchive/archive_acl_private.h - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_acl_private.h head/contrib/libarchive/libarchive/archive_crypto.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_crypto.c head/contrib/libarchive/libarchive/archive_crypto_private.h - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_crypto_private.h head/contrib/libarchive/libarchive/archive_entry_acl.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_entry_acl.3 head/contrib/libarchive/libarchive/archive_entry_linkify.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_entry_linkify.3 head/contrib/libarchive/libarchive/archive_entry_locale.h - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_entry_locale.h head/contrib/libarchive/libarchive/archive_entry_paths.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_entry_paths.3 head/contrib/libarchive/libarchive/archive_entry_perms.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_entry_perms.3 head/contrib/libarchive/libarchive/archive_entry_sparse.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_entry_sparse.c head/contrib/libarchive/libarchive/archive_entry_stat.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_entry_stat.3 head/contrib/libarchive/libarchive/archive_entry_time.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_entry_time.3 head/contrib/libarchive/libarchive/archive_options.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_options.c head/contrib/libarchive/libarchive/archive_options_private.h - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_options_private.h head/contrib/libarchive/libarchive/archive_ppmd7.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_ppmd7.c head/contrib/libarchive/libarchive/archive_ppmd7_private.h - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_ppmd7_private.h head/contrib/libarchive/libarchive/archive_ppmd_private.h - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_ppmd_private.h head/contrib/libarchive/libarchive/archive_rb.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_rb.c head/contrib/libarchive/libarchive/archive_rb.h - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_rb.h head/contrib/libarchive/libarchive/archive_read_data.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_data.3 head/contrib/libarchive/libarchive/archive_read_disk_posix.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_read_disk_posix.c head/contrib/libarchive/libarchive/archive_read_extract.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_extract.3 head/contrib/libarchive/libarchive/archive_read_filter.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_filter.3 head/contrib/libarchive/libarchive/archive_read_format.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_format.3 head/contrib/libarchive/libarchive/archive_read_free.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_free.3 head/contrib/libarchive/libarchive/archive_read_header.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_header.3 head/contrib/libarchive/libarchive/archive_read_new.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_new.3 head/contrib/libarchive/libarchive/archive_read_open.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_open.3 head/contrib/libarchive/libarchive/archive_read_set_options.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_set_options.3 head/contrib/libarchive/libarchive/archive_read_set_options.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_read_set_options.c head/contrib/libarchive/libarchive/archive_read_support_filter_all.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_filter_all.c head/contrib/libarchive/libarchive/archive_read_support_filter_bzip2.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_filter_bzip2.c head/contrib/libarchive/libarchive/archive_read_support_filter_compress.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_filter_compress.c head/contrib/libarchive/libarchive/archive_read_support_filter_gzip.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_filter_gzip.c head/contrib/libarchive/libarchive/archive_read_support_filter_none.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_filter_none.c head/contrib/libarchive/libarchive/archive_read_support_filter_program.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_filter_program.c head/contrib/libarchive/libarchive/archive_read_support_filter_rpm.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_filter_rpm.c head/contrib/libarchive/libarchive/archive_read_support_filter_uu.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_filter_uu.c head/contrib/libarchive/libarchive/archive_read_support_filter_xz.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_filter_xz.c head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c head/contrib/libarchive/libarchive/archive_read_support_format_by_code.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_read_support_format_by_code.c head/contrib/libarchive/libarchive/archive_read_support_format_cab.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c head/contrib/libarchive/libarchive/archive_read_support_format_lha.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c head/contrib/libarchive/libarchive/archive_read_support_format_rar.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c head/contrib/libarchive/libarchive/archive_string_composition.h - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_string_composition.h head/contrib/libarchive/libarchive/archive_write_add_filter_bzip2.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_write_add_filter_bzip2.c head/contrib/libarchive/libarchive/archive_write_add_filter_compress.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_add_filter_compress.c head/contrib/libarchive/libarchive/archive_write_add_filter_gzip.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_write_add_filter_gzip.c head/contrib/libarchive/libarchive/archive_write_add_filter_none.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_add_filter_none.c head/contrib/libarchive/libarchive/archive_write_add_filter_program.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_add_filter_program.c head/contrib/libarchive/libarchive/archive_write_add_filter_xz.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c head/contrib/libarchive/libarchive/archive_write_blocksize.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_blocksize.3 head/contrib/libarchive/libarchive/archive_write_data.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_data.3 head/contrib/libarchive/libarchive/archive_write_disk_posix.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/archive_write_filter.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_filter.3 head/contrib/libarchive/libarchive/archive_write_finish_entry.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_finish_entry.3 head/contrib/libarchive/libarchive/archive_write_format.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_format.3 head/contrib/libarchive/libarchive/archive_write_free.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_free.3 head/contrib/libarchive/libarchive/archive_write_header.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_header.3 head/contrib/libarchive/libarchive/archive_write_new.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_new.3 head/contrib/libarchive/libarchive/archive_write_open.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_open.3 head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c head/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c head/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c head/contrib/libarchive/libarchive/archive_write_set_format_xar.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c head/contrib/libarchive/libarchive/archive_write_set_options.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/archive_write_set_options.3 head/contrib/libarchive/libarchive/archive_write_set_options.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/archive_write_set_options.c head/contrib/libarchive/libarchive/libarchive_changes.3 - copied unchanged from r231200, vendor/libarchive/dist/libarchive/libarchive_changes.3 head/contrib/libarchive/libarchive/test/test_acl_nfs4.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_acl_nfs4.c head/contrib/libarchive/libarchive/test/test_acl_pax.tar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_acl_pax.tar.uu head/contrib/libarchive/libarchive/test/test_acl_posix1e.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_acl_posix1e.c head/contrib/libarchive/libarchive/test/test_archive_clear_error.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_clear_error.c head/contrib/libarchive/libarchive/test/test_archive_crypto.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_crypto.c head/contrib/libarchive/libarchive/test/test_archive_read_close_twice.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_close_twice.c head/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_fd.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_close_twice_open_fd.c head/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_filename.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_close_twice_open_filename.c head/contrib/libarchive/libarchive/test/test_archive_read_next_header_empty.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_next_header_empty.c head/contrib/libarchive/libarchive/test/test_archive_read_next_header_raw.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_next_header_raw.c head/contrib/libarchive/libarchive/test/test_archive_read_open2.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_open2.c head/contrib/libarchive/libarchive/test/test_archive_read_set_filter_option.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_set_filter_option.c head/contrib/libarchive/libarchive/test/test_archive_read_set_format_option.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_set_format_option.c head/contrib/libarchive/libarchive/test/test_archive_read_set_option.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_set_option.c head/contrib/libarchive/libarchive/test/test_archive_read_set_options.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_set_options.c head/contrib/libarchive/libarchive/test/test_archive_read_support.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_read_support.c head/contrib/libarchive/libarchive/test/test_archive_set_error.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_set_error.c head/contrib/libarchive/libarchive/test/test_archive_string.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_string.c head/contrib/libarchive/libarchive/test/test_archive_string_conversion.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_string_conversion.c head/contrib/libarchive/libarchive/test/test_archive_string_conversion.txt.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_string_conversion.txt.Z.uu head/contrib/libarchive/libarchive/test/test_archive_write_set_filter_option.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_write_set_filter_option.c head/contrib/libarchive/libarchive/test/test_archive_write_set_format_option.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_write_set_format_option.c head/contrib/libarchive/libarchive/test/test_archive_write_set_option.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_archive_write_set_option.c head/contrib/libarchive/libarchive/test/test_archive_write_set_options.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_archive_write_set_options.c head/contrib/libarchive/libarchive/test/test_compat_lzip.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_lzip.c head/contrib/libarchive/libarchive/test/test_compat_lzip_1.tlz.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_lzip_1.tlz.uu head/contrib/libarchive/libarchive/test/test_compat_lzip_2.tlz.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_lzip_2.tlz.uu head/contrib/libarchive/libarchive/test/test_compat_mac-1.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_mac-1.tar.Z.uu head/contrib/libarchive/libarchive/test/test_compat_mac-2.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_mac-2.tar.Z.uu head/contrib/libarchive/libarchive/test/test_compat_mac.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_compat_mac.c head/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_pax_libarchive_2x.c head/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu head/contrib/libarchive/libarchive/test/test_compat_solaris_pax_sparse.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_solaris_pax_sparse.c head/contrib/libarchive/libarchive/test/test_compat_solaris_pax_sparse_1.pax.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_solaris_pax_sparse_1.pax.Z.uu head/contrib/libarchive/libarchive/test/test_compat_solaris_pax_sparse_2.pax.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_solaris_pax_sparse_2.pax.Z.uu head/contrib/libarchive/libarchive/test/test_compat_zip_3.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_zip_3.zip.uu head/contrib/libarchive/libarchive/test/test_compat_zip_4.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_zip_4.zip.uu head/contrib/libarchive/libarchive/test/test_compat_zip_5.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_zip_5.zip.uu head/contrib/libarchive/libarchive/test/test_compat_zip_6.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_zip_6.zip.uu head/contrib/libarchive/libarchive/test/test_compat_zip_7.xps.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_compat_zip_7.xps.uu head/contrib/libarchive/libarchive/test/test_filter_count.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_filter_count.c head/contrib/libarchive/libarchive/test/test_fuzz.cab.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_fuzz.cab.uu head/contrib/libarchive/libarchive/test/test_fuzz.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_fuzz.lzh.uu head/contrib/libarchive/libarchive/test/test_gnutar_filename_encoding.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_gnutar_filename_encoding.c head/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c head/contrib/libarchive/libarchive/test/test_read_format_7zip.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip.c head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj2_bzip2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj2_bzip2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj2_copy_1.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj2_copy_1.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj2_copy_2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj2_copy_2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj2_copy_lzma.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj2_copy_lzma.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj2_deflate.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj2_deflate.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj2_lzma1_1.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj2_lzma1_1.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj2_lzma1_2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj2_lzma1_2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj2_lzma2_1.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj2_lzma2_1.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj2_lzma2_2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj2_lzma2_2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj_bzip2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj_bzip2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj_copy.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj_copy.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj_deflate.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj_deflate.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj_lzma1.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj_lzma1.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bcj_lzma2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bcj_lzma2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_bzip2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_bzip2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_copy.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_copy.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_copy_2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_copy_2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_deflate.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_deflate.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_delta_lzma1.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta_lzma1.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_delta_lzma2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta_lzma2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_empty_archive.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_empty_archive.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_empty_file.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_empty_file.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_lzma1.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_lzma1.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_lzma1_2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_lzma1_2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_lzma1_lzma2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_lzma1_lzma2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_lzma2.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_lzma2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_ppmd.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_ppmd.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_symbolic_name.7z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_symbolic_name.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_cab.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cab.c head/contrib/libarchive/libarchive/test/test_read_format_cab_1.cab.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cab_1.cab.uu head/contrib/libarchive/libarchive/test/test_read_format_cab_2.cab.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cab_2.cab.uu head/contrib/libarchive/libarchive/test/test_read_format_cab_3.cab.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cab_3.cab.uu head/contrib/libarchive/libarchive/test/test_read_format_cab_filename.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cab_filename.c head/contrib/libarchive/libarchive/test/test_read_format_cab_filename_cp932.cab.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cab_filename_cp932.cab.uu head/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cpio_afio.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_lzip.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_lzip.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_filename.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cpio_filename.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_filename_cp866.cpio.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cpio_filename_cp866.cpio.uu head/contrib/libarchive/libarchive/test/test_read_format_cpio_filename_eucjp.cpio.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cpio_filename_eucjp.cpio.uu head/contrib/libarchive/libarchive/test/test_read_format_cpio_filename_koi8r.cpio.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cpio_filename_koi8r.cpio.uu head/contrib/libarchive/libarchive/test/test_read_format_cpio_filename_utf8_jp.cpio.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cpio_filename_utf8_jp.cpio.uu head/contrib/libarchive/libarchive/test/test_read_format_cpio_filename_utf8_ru.cpio.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_cpio_filename_utf8_ru.cpio.uu head/contrib/libarchive/libarchive/test/test_read_format_gtar_filename.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_gtar_filename.c head/contrib/libarchive/libarchive/test/test_read_format_gtar_filename_cp866.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_gtar_filename_cp866.tar.Z.uu head/contrib/libarchive/libarchive/test/test_read_format_gtar_filename_eucjp.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_gtar_filename_eucjp.tar.Z.uu head/contrib/libarchive/libarchive/test/test_read_format_gtar_filename_koi8r.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_gtar_filename_koi8r.tar.Z.uu head/contrib/libarchive/libarchive/test/test_read_format_iso_joliet_by_nero.iso.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_iso_joliet_by_nero.iso.Z.uu head/contrib/libarchive/libarchive/test/test_read_format_iso_xorriso.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_iso_xorriso.c head/contrib/libarchive/libarchive/test/test_read_format_iso_xorriso.iso.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_iso_xorriso.iso.Z.uu head/contrib/libarchive/libarchive/test/test_read_format_isojoliet_versioned.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_isojoliet_versioned.c head/contrib/libarchive/libarchive/test/test_read_format_lha.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha.c head/contrib/libarchive/libarchive/test/test_read_format_lha_filename.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_filename.c head/contrib/libarchive/libarchive/test/test_read_format_lha_filename_cp932.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_filename_cp932.lzh.uu head/contrib/libarchive/libarchive/test/test_read_format_lha_header0.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_header0.lzh.uu head/contrib/libarchive/libarchive/test/test_read_format_lha_header1.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_header1.lzh.uu head/contrib/libarchive/libarchive/test/test_read_format_lha_header2.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_header2.lzh.uu head/contrib/libarchive/libarchive/test/test_read_format_lha_header3.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_header3.lzh.uu head/contrib/libarchive/libarchive/test/test_read_format_lha_lh0.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_lh0.lzh.uu head/contrib/libarchive/libarchive/test/test_read_format_lha_lh6.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_lh6.lzh.uu head/contrib/libarchive/libarchive/test/test_read_format_lha_lh7.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_lh7.lzh.uu head/contrib/libarchive/libarchive/test/test_read_format_lha_withjunk.lzh.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_lha_withjunk.lzh.uu head/contrib/libarchive/libarchive/test/test_read_format_mtree_nomagic.mtree.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_mtree_nomagic.mtree.uu head/contrib/libarchive/libarchive/test/test_read_format_rar.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar.c head/contrib/libarchive/libarchive/test/test_read_format_rar.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_binary_data.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_binary_data.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_compress_best.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_compress_best.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_compress_normal.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_compress_normal.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_multi_lzss_blocks.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_multi_lzss_blocks.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_noeof.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_noeof.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_ppmd_lzss_conversion.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_ppmd_lzss_conversion.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_sfx.exe.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_sfx.exe.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_subblock.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_subblock.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_unicode.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_unicode.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar_windows.rar.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_rar_windows.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_tar_filename.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_tar_filename.c head/contrib/libarchive/libarchive/test/test_read_format_tar_filename_koi8r.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_tar_filename_koi8r.tar.Z.uu head/contrib/libarchive/libarchive/test/test_read_format_ustar_filename.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_ustar_filename.c head/contrib/libarchive/libarchive/test/test_read_format_ustar_filename_cp866.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_ustar_filename_cp866.tar.Z.uu head/contrib/libarchive/libarchive/test/test_read_format_ustar_filename_eucjp.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_ustar_filename_eucjp.tar.Z.uu head/contrib/libarchive/libarchive/test/test_read_format_ustar_filename_koi8r.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_ustar_filename_koi8r.tar.Z.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_filename.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_filename.c head/contrib/libarchive/libarchive/test/test_read_format_zip_filename_cp866.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_filename_cp866.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_filename_cp932.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_filename_cp932.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_filename_koi8r.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_filename_koi8r.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_filename_utf8_jp.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_filename_utf8_jp.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_filename_utf8_ru.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_filename_utf8_ru.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_filename_utf8_ru2.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_filename_utf8_ru2.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_length_at_end.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_length_at_end.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_symlink.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_symlink.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_ux.zip.uu - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_format_zip_ux.zip.uu head/contrib/libarchive/libarchive/test/test_read_truncated_filter.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_read_truncated_filter.c head/contrib/libarchive/libarchive/test/test_sparse_basic.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_sparse_basic.c head/contrib/libarchive/libarchive/test/test_ustar_filename_encoding.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_ustar_filename_encoding.c head/contrib/libarchive/libarchive/test/test_write_compress_lzip.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_compress_lzip.c head/contrib/libarchive/libarchive/test/test_write_disk_lookup.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_write_disk_lookup.c head/contrib/libarchive/libarchive/test/test_write_format_7zip.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_7zip.c head/contrib/libarchive/libarchive/test/test_write_format_gnutar.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_gnutar.c head/contrib/libarchive/libarchive/test/test_write_format_iso9660.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_iso9660.c head/contrib/libarchive/libarchive/test/test_write_format_iso9660_boot.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_iso9660_boot.c head/contrib/libarchive/libarchive/test/test_write_format_iso9660_empty.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_iso9660_empty.c head/contrib/libarchive/libarchive/test/test_write_format_iso9660_filename.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_iso9660_filename.c head/contrib/libarchive/libarchive/test/test_write_format_iso9660_zisofs.c - copied, changed from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_iso9660_zisofs.c head/contrib/libarchive/libarchive/test/test_write_format_mtree_fflags.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_mtree_fflags.c head/contrib/libarchive/libarchive/test/test_write_format_tar_sparse.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_tar_sparse.c head/contrib/libarchive/libarchive/test/test_write_format_xar.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_xar.c head/contrib/libarchive/libarchive/test/test_write_format_xar_empty.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_write_format_xar_empty.c head/contrib/libarchive/libarchive/test/test_zip_filename_encoding.c - copied unchanged from r231200, vendor/libarchive/dist/libarchive/test/test_zip_filename_encoding.c head/contrib/libarchive/tar/test/test_option_C_upper.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_C_upper.c head/contrib/libarchive/tar/test/test_option_H_upper.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_H_upper.c head/contrib/libarchive/tar/test/test_option_L_upper.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_L_upper.c head/contrib/libarchive/tar/test/test_option_O_upper.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_O_upper.c head/contrib/libarchive/tar/test/test_option_U_upper.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_U_upper.c head/contrib/libarchive/tar/test/test_option_X_upper.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_X_upper.c head/contrib/libarchive/tar/test/test_option_b.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_b.c head/contrib/libarchive/tar/test/test_option_exclude.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_exclude.c head/contrib/libarchive/tar/test/test_option_gid_gname.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_gid_gname.c head/contrib/libarchive/tar/test/test_option_k.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_k.c head/contrib/libarchive/tar/test/test_option_keep_newer_files.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_keep_newer_files.c head/contrib/libarchive/tar/test/test_option_keep_newer_files.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_keep_newer_files.tar.Z.uu head/contrib/libarchive/tar/test/test_option_n.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_n.c head/contrib/libarchive/tar/test/test_option_newer_than.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_newer_than.c head/contrib/libarchive/tar/test/test_option_s.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_s.tar.Z.uu head/contrib/libarchive/tar/test/test_option_uid_uname.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_option_uid_uname.c head/contrib/libarchive/tar/test/test_print_longpath.c - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_print_longpath.c head/contrib/libarchive/tar/test/test_print_longpath.tar.Z.uu - copied unchanged from r231200, vendor/libarchive/dist/tar/test/test_print_longpath.tar.Z.uu Deleted: head/contrib/libarchive/libarchive/archive_hash.h head/contrib/libarchive/libarchive/archive_read_disk.c head/contrib/libarchive/libarchive/archive_read_support_compression_all.c head/contrib/libarchive/libarchive/archive_read_support_compression_bzip2.c head/contrib/libarchive/libarchive/archive_read_support_compression_compress.c head/contrib/libarchive/libarchive/archive_read_support_compression_gzip.c head/contrib/libarchive/libarchive/archive_read_support_compression_none.c head/contrib/libarchive/libarchive/archive_read_support_compression_program.c head/contrib/libarchive/libarchive/archive_read_support_compression_rpm.c head/contrib/libarchive/libarchive/archive_read_support_compression_uu.c head/contrib/libarchive/libarchive/archive_read_support_compression_xz.c head/contrib/libarchive/libarchive/archive_write_disk.c head/contrib/libarchive/libarchive/archive_write_set_compression_bzip2.c head/contrib/libarchive/libarchive/archive_write_set_compression_compress.c head/contrib/libarchive/libarchive/archive_write_set_compression_gzip.c head/contrib/libarchive/libarchive/archive_write_set_compression_none.c head/contrib/libarchive/libarchive/archive_write_set_compression_program.c head/contrib/libarchive/libarchive/archive_write_set_compression_xz.c head/contrib/libarchive/libarchive/test/test_acl_basic.c head/usr.bin/cpio/config_freebsd.h head/usr.bin/tar/config_freebsd.h Modified: head/ObsoleteFiles.inc head/contrib/libarchive/COPYING head/contrib/libarchive/FREEBSD-Xlist head/contrib/libarchive/NEWS head/contrib/libarchive/README head/contrib/libarchive/cpio/bsdcpio.1 head/contrib/libarchive/cpio/cmdline.c head/contrib/libarchive/cpio/cpio.c head/contrib/libarchive/cpio/cpio.h head/contrib/libarchive/cpio/test/main.c head/contrib/libarchive/cpio/test/test.h head/contrib/libarchive/cpio/test/test_0.c head/contrib/libarchive/cpio/test/test_basic.c head/contrib/libarchive/cpio/test/test_format_newc.c head/contrib/libarchive/cpio/test/test_option_c.c head/contrib/libarchive/cpio/test/test_option_t.c head/contrib/libarchive/cpio/test/test_option_u.c head/contrib/libarchive/cpio/test/test_owner_parse.c head/contrib/libarchive/libarchive/archive.h head/contrib/libarchive/libarchive/archive_check_magic.c head/contrib/libarchive/libarchive/archive_crc32.h head/contrib/libarchive/libarchive/archive_entry.3 head/contrib/libarchive/libarchive/archive_entry.c head/contrib/libarchive/libarchive/archive_entry.h head/contrib/libarchive/libarchive/archive_entry_copy_stat.c head/contrib/libarchive/libarchive/archive_entry_link_resolver.c head/contrib/libarchive/libarchive/archive_entry_private.h head/contrib/libarchive/libarchive/archive_entry_stat.c head/contrib/libarchive/libarchive/archive_private.h head/contrib/libarchive/libarchive/archive_read.3 head/contrib/libarchive/libarchive/archive_read.c head/contrib/libarchive/libarchive/archive_read_data_into_fd.c head/contrib/libarchive/libarchive/archive_read_disk.3 head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c head/contrib/libarchive/libarchive/archive_read_disk_private.h head/contrib/libarchive/libarchive/archive_read_disk_set_standard_lookup.c head/contrib/libarchive/libarchive/archive_read_extract.c head/contrib/libarchive/libarchive/archive_read_open_fd.c head/contrib/libarchive/libarchive/archive_read_open_file.c head/contrib/libarchive/libarchive/archive_read_open_filename.c head/contrib/libarchive/libarchive/archive_read_open_memory.c head/contrib/libarchive/libarchive/archive_read_private.h head/contrib/libarchive/libarchive/archive_read_support_format_all.c head/contrib/libarchive/libarchive/archive_read_support_format_ar.c head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c head/contrib/libarchive/libarchive/archive_read_support_format_empty.c head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c head/contrib/libarchive/libarchive/archive_read_support_format_raw.c head/contrib/libarchive/libarchive/archive_read_support_format_tar.c head/contrib/libarchive/libarchive/archive_read_support_format_xar.c head/contrib/libarchive/libarchive/archive_read_support_format_zip.c head/contrib/libarchive/libarchive/archive_string.c head/contrib/libarchive/libarchive/archive_string.h head/contrib/libarchive/libarchive/archive_string_sprintf.c head/contrib/libarchive/libarchive/archive_util.3 head/contrib/libarchive/libarchive/archive_util.c head/contrib/libarchive/libarchive/archive_virtual.c head/contrib/libarchive/libarchive/archive_write.3 head/contrib/libarchive/libarchive/archive_write.c head/contrib/libarchive/libarchive/archive_write_disk.3 head/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c head/contrib/libarchive/libarchive/archive_write_open_filename.c head/contrib/libarchive/libarchive/archive_write_open_memory.c head/contrib/libarchive/libarchive/archive_write_private.h head/contrib/libarchive/libarchive/archive_write_set_format.c head/contrib/libarchive/libarchive/archive_write_set_format_ar.c head/contrib/libarchive/libarchive/archive_write_set_format_by_name.c head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c head/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c head/contrib/libarchive/libarchive/archive_write_set_format_mtree.c head/contrib/libarchive/libarchive/archive_write_set_format_pax.c head/contrib/libarchive/libarchive/archive_write_set_format_shar.c head/contrib/libarchive/libarchive/archive_write_set_format_ustar.c head/contrib/libarchive/libarchive/archive_write_set_format_zip.c head/contrib/libarchive/libarchive/libarchive-formats.5 head/contrib/libarchive/libarchive/libarchive.3 head/contrib/libarchive/libarchive/libarchive_internals.3 head/contrib/libarchive/libarchive/tar.5 head/contrib/libarchive/libarchive/test/main.c head/contrib/libarchive/libarchive/test/read_open_memory.c head/contrib/libarchive/libarchive/test/test.h head/contrib/libarchive/libarchive/test/test_acl_freebsd.c head/contrib/libarchive/libarchive/test/test_acl_pax.c head/contrib/libarchive/libarchive/test/test_archive_api_feature.c head/contrib/libarchive/libarchive/test/test_bad_fd.c head/contrib/libarchive/libarchive/test/test_compat_bzip2.c head/contrib/libarchive/libarchive/test/test_compat_cpio.c head/contrib/libarchive/libarchive/test/test_compat_gtar.c head/contrib/libarchive/libarchive/test/test_compat_gzip.c head/contrib/libarchive/libarchive/test/test_compat_lzma.c head/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c head/contrib/libarchive/libarchive/test/test_compat_tar_hardlink.c head/contrib/libarchive/libarchive/test/test_compat_xz.c head/contrib/libarchive/libarchive/test/test_compat_zip.c head/contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu head/contrib/libarchive/libarchive/test/test_empty_write.c head/contrib/libarchive/libarchive/test/test_entry.c head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c head/contrib/libarchive/libarchive/test/test_fuzz.c head/contrib/libarchive/libarchive/test/test_open_failure.c head/contrib/libarchive/libarchive/test/test_open_fd.c head/contrib/libarchive/libarchive/test/test_open_file.c head/contrib/libarchive/libarchive/test/test_open_filename.c head/contrib/libarchive/libarchive/test/test_pax_filename_encoding.c head/contrib/libarchive/libarchive/test/test_read_compress_program.c head/contrib/libarchive/libarchive/test/test_read_data_large.c head/contrib/libarchive/libarchive/test/test_read_disk.c head/contrib/libarchive/libarchive/test/test_read_disk_entry_from_file.c head/contrib/libarchive/libarchive/test/test_read_extract.c head/contrib/libarchive/libarchive/test/test_read_file_nonexistent.c head/contrib/libarchive/libarchive/test/test_read_format_ar.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_Z.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_be.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_bz2.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_gz.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_lzma.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_xz.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_odc.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4c_Z.c head/contrib/libarchive/libarchive/test/test_read_format_empty.c head/contrib/libarchive/libarchive/test/test_read_format_gtar_gz.c head/contrib/libarchive/libarchive/test/test_read_format_gtar_lzma.c head/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse.c head/contrib/libarchive/libarchive/test/test_read_format_iso_Z.c head/contrib/libarchive/libarchive/test/test_read_format_iso_multi_extent.c head/contrib/libarchive/libarchive/test/test_read_format_isojoliet_bz2.c head/contrib/libarchive/libarchive/test/test_read_format_isojoliet_long.c head/contrib/libarchive/libarchive/test/test_read_format_isojoliet_rr.c head/contrib/libarchive/libarchive/test/test_read_format_isorr_bz2.c head/contrib/libarchive/libarchive/test/test_read_format_isorr_ce.c head/contrib/libarchive/libarchive/test/test_read_format_isorr_new_bz2.c head/contrib/libarchive/libarchive/test/test_read_format_isorr_rr_moved.c head/contrib/libarchive/libarchive/test/test_read_format_isozisofs_bz2.c head/contrib/libarchive/libarchive/test/test_read_format_mtree.c head/contrib/libarchive/libarchive/test/test_read_format_mtree.mtree.uu head/contrib/libarchive/libarchive/test/test_read_format_pax_bz2.c head/contrib/libarchive/libarchive/test/test_read_format_raw.c head/contrib/libarchive/libarchive/test/test_read_format_tar.c head/contrib/libarchive/libarchive/test/test_read_format_tar_empty_filename.c head/contrib/libarchive/libarchive/test/test_read_format_tbz.c head/contrib/libarchive/libarchive/test/test_read_format_tgz.c head/contrib/libarchive/libarchive/test/test_read_format_tlz.c head/contrib/libarchive/libarchive/test/test_read_format_txz.c head/contrib/libarchive/libarchive/test/test_read_format_tz.c head/contrib/libarchive/libarchive/test/test_read_format_xar.c head/contrib/libarchive/libarchive/test/test_read_format_zip.c head/contrib/libarchive/libarchive/test/test_read_format_zip.zip.uu head/contrib/libarchive/libarchive/test/test_read_large.c head/contrib/libarchive/libarchive/test/test_read_pax_truncated.c head/contrib/libarchive/libarchive/test/test_read_position.c head/contrib/libarchive/libarchive/test/test_read_truncated.c head/contrib/libarchive/libarchive/test/test_read_uu.c head/contrib/libarchive/libarchive/test/test_tar_filenames.c head/contrib/libarchive/libarchive/test/test_tar_large.c head/contrib/libarchive/libarchive/test/test_ustar_filenames.c head/contrib/libarchive/libarchive/test/test_write_compress.c head/contrib/libarchive/libarchive/test/test_write_compress_bzip2.c head/contrib/libarchive/libarchive/test/test_write_compress_gzip.c head/contrib/libarchive/libarchive/test/test_write_compress_lzma.c head/contrib/libarchive/libarchive/test/test_write_compress_program.c head/contrib/libarchive/libarchive/test/test_write_compress_xz.c head/contrib/libarchive/libarchive/test/test_write_disk.c head/contrib/libarchive/libarchive/test/test_write_disk_failures.c head/contrib/libarchive/libarchive/test/test_write_disk_hardlink.c head/contrib/libarchive/libarchive/test/test_write_disk_perms.c head/contrib/libarchive/libarchive/test/test_write_disk_secure.c head/contrib/libarchive/libarchive/test/test_write_disk_sparse.c head/contrib/libarchive/libarchive/test/test_write_disk_symlink.c head/contrib/libarchive/libarchive/test/test_write_disk_times.c head/contrib/libarchive/libarchive/test/test_write_format_ar.c head/contrib/libarchive/libarchive/test/test_write_format_cpio.c head/contrib/libarchive/libarchive/test/test_write_format_cpio_empty.c head/contrib/libarchive/libarchive/test/test_write_format_cpio_newc.c head/contrib/libarchive/libarchive/test/test_write_format_cpio_odc.c head/contrib/libarchive/libarchive/test/test_write_format_mtree.c head/contrib/libarchive/libarchive/test/test_write_format_pax.c head/contrib/libarchive/libarchive/test/test_write_format_shar_empty.c head/contrib/libarchive/libarchive/test/test_write_format_tar.c head/contrib/libarchive/libarchive/test/test_write_format_tar_empty.c head/contrib/libarchive/libarchive/test/test_write_format_tar_ustar.c head/contrib/libarchive/libarchive/test/test_write_format_zip.c head/contrib/libarchive/libarchive/test/test_write_format_zip_empty.c head/contrib/libarchive/libarchive/test/test_write_format_zip_no_compression.c head/contrib/libarchive/libarchive/test/test_write_open_memory.c head/contrib/libarchive/libarchive_fe/line_reader.c head/contrib/libarchive/libarchive_fe/matching.c head/contrib/libarchive/libarchive_fe/pathmatch.c head/contrib/libarchive/tar/bsdtar.1 head/contrib/libarchive/tar/bsdtar.c head/contrib/libarchive/tar/bsdtar.h head/contrib/libarchive/tar/bsdtar_platform.h head/contrib/libarchive/tar/cmdline.c head/contrib/libarchive/tar/getdate.c head/contrib/libarchive/tar/read.c head/contrib/libarchive/tar/subst.c head/contrib/libarchive/tar/test/main.c head/contrib/libarchive/tar/test/test.h head/contrib/libarchive/tar/test/test_0.c head/contrib/libarchive/tar/test/test_basic.c head/contrib/libarchive/tar/test/test_option_T_upper.c head/contrib/libarchive/tar/test/test_option_q.c head/contrib/libarchive/tar/test/test_option_r.c head/contrib/libarchive/tar/test/test_option_s.c head/contrib/libarchive/tar/test/test_patterns.c head/contrib/libarchive/tar/test/test_strip_components.c head/contrib/libarchive/tar/test/test_symlink_dir.c head/contrib/libarchive/tar/tree.c head/contrib/libarchive/tar/util.c head/contrib/libarchive/tar/write.c head/lib/libarchive/Makefile head/lib/libarchive/config_freebsd.h head/lib/libarchive/test/Makefile head/usr.bin/ar/ar.c head/usr.bin/cpio/Makefile head/usr.bin/cpio/test/Makefile head/usr.bin/tar/Makefile head/usr.bin/tar/test/Makefile Directory Properties: head/contrib/libarchive/ (props changed) head/contrib/libarchive/cpio/ (props changed) head/contrib/libarchive/libarchive/ (props changed) head/contrib/libarchive/libarchive_fe/ (props changed) head/contrib/libarchive/tar/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Feb 25 10:15:41 2012 (r232152) +++ head/ObsoleteFiles.inc Sat Feb 25 10:58:02 2012 (r232153) @@ -38,6 +38,24 @@ # xargs -n1 | sort | uniq -d; # done +# 20120225: libarchive 3.0.3 +OLD_FILES+=man/man3/archive_read_data_into_buffer.3.gz \ + man/man3/archive_read_support_compression_all.3.gz \ + man/man3/archive_read_support_compression_bzip2.3.gz \ + man/man3/archive_read_support_compression_compress.3.gz \ + man/man3/archive_read_support_compression_gzip.3.gz \ + man/man3/archive_read_support_compression_lzma.3.gz \ + man/man3/archive_read_support_compression_none.3.gz \ + man/man3/archive_read_support_compression_program.3.gz \ + man/man3/archive_read_support_compression_program_signature.3.gz \ + man/man3/archive_read_support_compression_xz.3.gz \ + man/man3/archive_write_set_callbacks.3.gz \ + man/man3/archive_write_set_compression_bzip2.3.gz \ + man/man3/archive_write_set_compression_compress.3.gz \ + man/man3/archive_write_set_compression_gzip.3.gz \ + man/man3/archive_write_set_compression_none.3.gz \ + man/man3/archive_write_set_compression_program.3.gz +OLD_LIBS+=usr/lib/libarchive.so.5 # 20120113: removal of wtmpcvt(1) OLD_FILES+=usr/bin/wtmpcvt OLD_FILES+=usr/share/man/man1/wtmpcvt.1.gz Modified: head/contrib/libarchive/COPYING ============================================================================== --- head/contrib/libarchive/COPYING Sat Feb 25 10:15:41 2012 (r232152) +++ head/contrib/libarchive/COPYING Sat Feb 25 10:58:02 2012 (r232153) @@ -16,8 +16,8 @@ the actual statements in the files are c a 3-clause UC Regents copyright; please read the individual source files for details: libarchive/archive_entry.c - libarchive/archive_read_support_compression_compress.c - libarchive/archive_write_set_compression_compress.c + libarchive/archive_read_support_filter_compress.c + libarchive/archive_write_set_filter_compress.c libarchive/mtree.5 tar/matching.c Modified: head/contrib/libarchive/FREEBSD-Xlist ============================================================================== --- head/contrib/libarchive/FREEBSD-Xlist Sat Feb 25 10:15:41 2012 (r232152) +++ head/contrib/libarchive/FREEBSD-Xlist Sat Feb 25 10:58:02 2012 (r232153) @@ -15,8 +15,10 @@ doc examples libarchive/CMakeLists.txt libarchive/archive_entry_copy_bhfi.c +libarchive/archive_read_disk_windows.c libarchive/archive_windows.c libarchive/archive_windows.h +libarchive/archive_write_disk_windows.c libarchive/config_freebsd.h libarchive/filter_fork_windows.c libarchive/mtree.5 Modified: head/contrib/libarchive/NEWS ============================================================================== --- head/contrib/libarchive/NEWS Sat Feb 25 10:15:41 2012 (r232152) +++ head/contrib/libarchive/NEWS Sat Feb 25 10:58:02 2012 (r232153) @@ -1,27 +1,80 @@ -Feb 05, 2011: Fix issue 134: Improve handling of open failures -Dec 06, 2010: Fix issue 119: Relax ISO verification -Dec 06, 2010: Fix issue 121: mtree parsing -Dec 05, 2010: Fix extraction of GNU tar 'D' directory entries -Dec 05, 2010: Be less demanding in LZMA/XZ compression tests -Jun 30, 2010: libarchive 2.8.4 released -Jun 30, 2010: Improved reliability of hash function detection -Jun 30, 2010: Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minix - -Mar 14, 2010: libarchive 2.8.3 released -Mar 14, 2010: Symlink dereference fix for Linux broke the build there; corrected. - -Mar 14, 2010: libarchive 2.8.2 released -Mar 12, 2010: Fix NULL deference for short self-extracting zip archives. +Jan 10, 2012: Issue 223: Skip atime tests if atime not supported +Jan 09, 2012: Issue 222: Errors saving sparse files to pax archives +Jan 09, 2012: Issue 221: allow archive_*_free(NULL) +Dec 31, 2011: Issue 212: configure script on Solaris +Dec 30, 2011: Issue 218: empty contents extracting Zip files with bsdcpio +Dec 30, 2011: Issue 217: fix compile warning +Dec 30, 2011: Issue 216: truncated filenames in listings +Dec 28, 2011: Issue 210: memory leak on Windows +Dec 28, 2011: Issue 206: fix hardlink tests on Windows 2000 +Dec 27, 2011: Issue 208: Don't hang when using external compression + program on Windows + +Dec 24, 2011: libarchive 3.0.2 released +Dec 23, 2011: Various fixes merged from FreeBSD +Dec 23, 2011: Symlink support in Zip reader and writer +Dec 23, 2011: Robustness fixes to 7Zip reader + +Nov 27, 2011: libarchive 3.0.1b released + +Nov 26, 2011: 7Zip reader +Nov 26, 2011: Small fixes to ISO and Zip to improve robustness with corrupted input +Nov 24, 2011: Improve streaming Zip reader's support for uncompressed entries +Nov 20, 2011: New seeking Zip reader supports SFX Zip archives +Nov 20, 2011: Build fixes on Windows + +Nov 13, 2011: libarchive 3.0.0a released + +Nov 06, 2011: Update shared-library version calculations for libarchive 3.x +Sep 04, 2011: Fix tar -s; follow GNU tar for controlling hardlink/symlink substitutions +Aug 18, 2011: Fix reading ISO images built by NetBSD's mkisofs +Aug 15, 2011: Old archive_read_support_compression_XXX functions are deprecated and + will disappear in libarchive 4.0. +Jun 26, 2011: RAR reader +Jun 16, 2011: Add tar:compat-2x option to emulate broken libarchive 2.x + handling of pax UTF-8 headers +Apr 25, 2011: Refactor read_open() into a collection of single-item setters; + support the old interfaces as wrappers +Apr 12, 2011: Split disk writer into separate POSIX and Windows implementations +Apr 10, 2011: Improvements to character translations on Windows. +Mar 30, 2011: More work to return errors instead of calling abort() +Mar 23, 2011: Add charset option to many writers to control MBCS filenames +Mar 17, 2011: Overhauled support for per-format extension options +Mar 17, 2011: Track character set used for mbcs strings, support + translating to/from user-specified locale +Mar 09, 2011: Recognize mtree files without requiring a signature +Mar 06, 2011: Use iconv to convert to/from Unicode instead of making bad + assumptions about the C90 character set translation functions +Feb 17, 2011: Fixes for AIX, TRU64, and other platforms +Dec 22, 2010: CAB reader +Dec 20, 2010: LHA/LZH reader +Jul 03, 2010: minitar example demonstrates archive_read_disk directory traversal +Jun 29, 2010: Many improvements to ISO reader compatibility +Jun 26, 2010: Use larger buffers when copy files into an archive +Jun 18, 2010: Reimplement Mac OS extensions in libarchive +Jun 09, 2010: archive_read_disk now supports traversals +May 28, 2010: XAR writer +May 16, 2010: Fix ^T handling; don't exit on interrupted reads and writes +May 09, 2010: Improved detection of platform-specific crypto support +May 04, 2010: lzip read and write filters +May 01, 2010: New options: tar --gid --gname --uid --uname +Apr 28, 2010: Use Red-black tree for ISO reader/writer to improve performance +Apr 17, 2010: Minimal writer for legacy GNU tar format Mar 12, 2010: Don't dereference symlinks on Linux when reading ACLs. -Mar 07, 2010: Better detection of SHA2 support for old OpenSSL versions. -Mar 07, 2010: Fix parsing of input files for bsdtar -T. -Mar 07, 2010: Do not leak setup_xattr into the global namespace. - -Mar 06, 2010: libarchive 2.8.1 released Mar 06, 2010: Fix build when an older libarchive is already installed -Mar 03, 2010: Use O_BINARY opening files in bsdtar -Mar 02, 2010: Include missing archive_crc32.h -Mar 01, 2010: Correctly include iconv.h required by libxml2. +Feb 28, 2010: Relax handling of state failures; misuse by clients now generally + results in a sticky ARCHIVE_FATAL rather than a visit to abort() +Feb 25, 2010: ISO writer +Feb 21, 2010: Split many man pages into smaller chunks. +Feb 21, 2010: Performance: Cheat on block sizes when reading archives from disk. +Feb 21, 2010: Use int64_t instead of off_t, dev_t, ino_t, uid_t, and gid_t +Feb 20, 2010: Document new ACL functions. +Feb 19, 2010: Support multiple write filters +Feb 07, 2010: Remove some legacy libarchive 1.x APIs +Feb 04, 2010: Read afio headers +Feb 02, 2010: Archive sparse files compatibly with GNU tar +Feb 01, 2010: Integrate Apple extensions for Mac OS extended attributes into bsdtar +Jan 31, 2010: Support cpio -V Feb 04, 2010: libarchive 2.8.0 released Jan 17, 2010: Fix error handling for 'echo nonexistent | cpio -o' Modified: head/contrib/libarchive/README ============================================================================== --- head/contrib/libarchive/README Sat Feb 25 10:15:41 2012 (r232152) +++ head/contrib/libarchive/README Sat Feb 25 10:58:02 2012 (r232153) @@ -13,8 +13,6 @@ This distribution bundle includes the fo essentially the same functionality * examples: Some small example programs that you may find useful. * examples/minitar: a compact sample demonstrating use of libarchive. - I use this for testing link pollution; it should produce a very - small executable file on most systems. * contrib: Various items sent to me by third parties; please contact the authors with any questions. @@ -51,16 +49,11 @@ The manual pages above are provided in t a number of different formats. You should also read the copious comments in "archive.h" and the -source code for the sample programs for more details. Please let me +source code for the sample programs for more details. Please let us know about any errors or omissions you find. -Currently, the library automatically detects and reads the following: - * gzip compression - * bzip2 compression - * compress/LZW compression - * lzma and xz compression - * GNU tar format (including GNU long filenames, long link names, and - sparse files) +Currently, the library automatically detects and reads the following fomats: + * GNU tar format (including GNU long filenames, long link names, and sparse files) * Solaris 9 extended tar format (including ACLs) * Old V7 tar archives * POSIX ustar @@ -73,22 +66,40 @@ Currently, the library automatically det * ZIP archives (with uncompressed or "deflate" compressed entries) * GNU and BSD 'ar' archives * 'mtree' format - -The library can write: + * Microsoft CAB format + * LHA and LZH archives + * RAR archives + * XAR archives + +The library also detects and handles any of the following before evaluating the archive: + * uuencoded files + * files with RPM wrapper * gzip compression * bzip2 compression * compress/LZW compression - * lzma and xz compression + * lzma, lzip, and xz compression + +The library can create archives in any of the following formats: * POSIX ustar * POSIX pax interchange format * "restricted" pax format, which will create ustar archives except for entries that require pax extensions (for long filenames, ACLs, etc). + * Old GNU tar format * POSIX octet-oriented cpio * SVR4 "newc" cpio * shar archives * ZIP archives (with uncompressed or "deflate" compressed entries) * GNU and BSD 'ar' archives * 'mtree' format + * ISO9660 format + * XAR archives + +When creating archives, the result can be filtered with any of the following: + * uuencode + * gzip compression + * bzip2 compression + * compress/LZW compression + * lzma, lzip, and xz compression Notes about the library architecture: Modified: head/contrib/libarchive/cpio/bsdcpio.1 ============================================================================== --- head/contrib/libarchive/cpio/bsdcpio.1 Sat Feb 25 10:15:41 2012 (r232152) +++ head/contrib/libarchive/cpio/bsdcpio.1 Sat Feb 25 10:58:02 2012 (r232153) @@ -24,8 +24,8 @@ .\" .\" $FreeBSD$ .\" -.Dd September 5, 2010 -.Dt BSDCPIO 1 +.Dd December 21, 2007 +.Dt CPIO 1 .Os .Sh NAME .Nm cpio @@ -59,7 +59,7 @@ is a mode indicator from the following l .Bl -tag -compact -width indent .It Fl i Input. -Read an archive from standard input (unless overriden) and extract the +Read an archive from standard input (unless overridden) and extract the contents to disk or (if the .Fl t option is specified) @@ -69,7 +69,7 @@ one of the patterns will be extracted. .It Fl o Output. Read a list of filenames from standard input and produce a new archive -on standard output (unless overriden) containing the specified items. +on standard output (unless overridden) containing the specified items. .It Fl p Pass-through. Read a list of filenames from standard input and copy the files to the @@ -80,7 +80,7 @@ specified directory. Unless specifically stated otherwise, options are applicable in all operating modes. .Bl -tag -width indent -.It Fl 0 +.It Fl 0 , Fl Fl null Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might contain newlines. .It Fl A @@ -102,8 +102,8 @@ bytes. (o mode only) Use the old POSIX portable character format. Equivalent to -.Fl -format Ar odc . -.It Fl d +.Fl Fl format Ar odc . +.It Fl d , Fl Fl make-directories (i and p modes) Create directories as necessary. .It Fl E Ar file @@ -111,14 +111,14 @@ Create directories as necessary. Read list of file name patterns from .Ar file to list and extract. -.It Fl F Ar file +.It Fl F Ar file , Fl Fl file Ar file Read archive from or write archive to .Ar file . .It Fl f Ar pattern (i mode only) Ignore files that match .Ar pattern . -.It Fl -format Ar format +.It Fl H Ar format , Fl Fl format Ar format (o mode only) Produce the output archive in the specified format. Supported formats include: @@ -145,24 +145,21 @@ for more complete information about the formats currently supported by the underlying .Xr libarchive 3 library. -.It Fl H Ar format -Synonym for -.Fl -format . -.It Fl h , Fl -help +.It Fl h , Fl Fl help Print usage information. .It Fl I Ar file Read archive from .Ar file . -.It Fl i +.It Fl i , Fl Fl extract Input mode. See above for description. -.It Fl -insecure +.It Fl Fl insecure (i and p mode only) Disable security checks during extraction or copying. This allows extraction via symbolic links and path names containing .Sq .. in the name. -.It Fl J +.It Fl J , Fl Fl xz (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz compression is recognized @@ -175,20 +172,20 @@ Synonym for All symbolic links will be followed. Normally, symbolic links are archived and copied as symbolic links. With this option, the target of the link will be archived or copied instead. -.It Fl l +.It Fl l , Fl Fl link (p mode only) Create links from the target directory to the original files, instead of copying. -.It Fl lzma +.It Fl Fl lzma (o mode only) Compress the file with lzma-compatible compression before writing it. In input mode, this option is ignored; lzma compression is recognized automatically on input. -.It Fl m +.It Fl m , Fl Fl preserve-modification-time (i and p modes) Set file modification time on created files to match those in the source. -.It Fl n +.It Fl n , Fl Fl numeric-uid-gid (i mode, only with .Fl t ) Display numeric uid and gid. @@ -197,26 +194,26 @@ By default, displays the user and group names when they are provided in the archive, or looks up the user and group names in the system password database. -.It Fl no-preserve-owner +.It Fl Fl no-preserve-owner (i mode only) Do not attempt to restore file ownership. This is the default when run by non-root users. .It Fl O Ar file Write archive to .Ar file . -.It Fl o +.It Fl o , Fl Fl create Output mode. See above for description. -.It Fl p +.It Fl p , Fl Fl pass-through Pass-through mode. See above for description. -.It Fl preserve-owner +.It Fl Fl preserve-owner (i mode only) Restore file ownership. This is the default when run by the root user. -.It Fl -quiet +.It Fl Fl quiet Suppress unnecessary messages. -.It Fl R Oo user Oc Ns Oo : Oc Ns Oo group Oc +.It Fl R Oo user Oc Ns Oo : Oc Ns Oo group Oc , Fl Fl owner Oo user Oc Ns Oo : Oc Ns Oo group Oc Set the owner and/or group on files in the output. If group is specified with no user (for example, @@ -244,20 +241,24 @@ containing the name of the file and a li If the line read is blank, the file is skipped. If the line contains a single period, the file is processed normally. Otherwise, the line is taken to be the new name of the file. -.It Fl t +.It Fl t , Fl Fl list (i mode only) List the contents of the archive to stdout; do not restore the contents to disk. -.It Fl u +.It Fl u , Fl Fl unconditional (i and p modes) Unconditionally overwrite existing files. Ordinarily, an older file will not overwrite a newer file on disk. -.It Fl v +.It Fl V , Fl Fl dot +Print a dot to stderr for each file as it is processed. +Superseded by +.Fl v . +.It Fl v , Fl Fl verbose Print the name of each file to stderr as it is processed. With .Fl t , provide a detailed listing of each file. -.It Fl -version +.It Fl Fl version Print the program version information and exit. .It Fl y (o mode only) @@ -275,6 +276,8 @@ Compress the archive with gzip-compatibl In input mode, this option is ignored; gzip compression is recognized automatically on input. .El +.Sh EXIT STATUS +.Ex -std .Sh ENVIRONMENT The following environment variables affect the execution of .Nm : @@ -290,8 +293,6 @@ See .Xr environ 7 for more information. .El -.Sh EXIT STATUS -.Ex -std .Sh EXAMPLES The .Nm Modified: head/contrib/libarchive/cpio/cmdline.c ============================================================================== --- head/contrib/libarchive/cpio/cmdline.c Sat Feb 25 10:15:41 2012 (r232152) +++ head/contrib/libarchive/cpio/cmdline.c Sat Feb 25 10:58:02 2012 (r232153) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); /* * Short options for cpio. Please keep this sorted. */ -static const char *short_options = "0AaBC:cdE:F:f:H:hI:iJjLlmnO:opR:rtuvW:yZz"; +static const char *short_options = "0AaBC:cdE:F:f:H:hI:iJjLlmnO:opR:rtuVvW:yZz"; /* * Long options for cpio. Please keep this sorted. @@ -62,6 +62,7 @@ static const struct option { int equivalent; /* Equivalent short option. */ } cpio_longopts[] = { { "create", 0, 'o' }, + { "dot", 0, 'V' }, { "extract", 0, 'i' }, { "file", 1, 'F' }, { "format", 1, 'H' }, @@ -109,7 +110,7 @@ cpio_getopt(struct cpio *cpio) int opt = '?'; int required = 0; - cpio->optarg = NULL; + cpio->argument = NULL; /* First time through, initialize everything. */ if (state == state_start) { @@ -188,7 +189,7 @@ cpio_getopt(struct cpio *cpio) long_prefix = "-W "; /* For clearer errors. */ } else { state = state_next_word; - cpio->optarg = opt_word; + cpio->argument = opt_word; } } } @@ -202,7 +203,7 @@ cpio_getopt(struct cpio *cpio) p = strchr(opt_word, '='); if (p != NULL) { optlength = (size_t)(p - opt_word); - cpio->optarg = (char *)(uintptr_t)(p + 1); + cpio->argument = (char *)(uintptr_t)(p + 1); } else { optlength = strlen(opt_word); } @@ -241,9 +242,9 @@ cpio_getopt(struct cpio *cpio) /* We've found a unique match; does it need an argument? */ if (match->required) { /* Argument required: get next word if necessary. */ - if (cpio->optarg == NULL) { - cpio->optarg = *cpio->argv; - if (cpio->optarg == NULL) { + if (cpio->argument == NULL) { + cpio->argument = *cpio->argv; + if (cpio->argument == NULL) { lafe_warnc(0, "Option %s%s requires an argument", long_prefix, match->name); @@ -254,7 +255,7 @@ cpio_getopt(struct cpio *cpio) } } else { /* Argument forbidden: fail if there is one. */ - if (cpio->optarg != NULL) { + if (cpio->argument != NULL) { lafe_warnc(0, "Option %s%s does not allow an argument", long_prefix, match->name); @@ -340,7 +341,7 @@ owner_parse(const char *spec, int *uid, } else { char *end; errno = 0; - *uid = strtoul(user, &end, 10); + *uid = (int)strtoul(user, &end, 10); if (errno || *end != '\0') { snprintf(errbuff, sizeof(errbuff), "Couldn't lookup user ``%s''", user); @@ -358,7 +359,7 @@ owner_parse(const char *spec, int *uid, } else { char *end; errno = 0; - *gid = strtoul(g, &end, 10); + *gid = (int)strtoul(g, &end, 10); if (errno || *end != '\0') { snprintf(errbuff, sizeof(errbuff), "Couldn't lookup group ``%s''", g); Modified: head/contrib/libarchive/cpio/cpio.c ============================================================================== --- head/contrib/libarchive/cpio/cpio.c Sat Feb 25 10:15:41 2012 (r232152) +++ head/contrib/libarchive/cpio/cpio.c Sat Feb 25 10:58:02 2012 (r232153) @@ -50,9 +50,15 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_GRP_H #include #endif +#ifdef HAVE_LOCALE_H +#include +#endif #ifdef HAVE_PWD_H #include #endif +#ifdef HAVE_SIGNAL_H +#include +#endif #ifdef HAVE_STDARG_H #include #endif @@ -69,9 +75,6 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_SYS_TIME_H -#include -#endif #ifdef HAVE_TIME_H #include #endif @@ -116,6 +119,7 @@ static void mode_in(struct cpio *); static void mode_list(struct cpio *); static void mode_out(struct cpio *); static void mode_pass(struct cpio *, const char *); +static const char *remove_leading_slash(const char *); static int restore_time(struct cpio *, struct archive_entry *, const char *, int fd); static void usage(void); @@ -136,20 +140,34 @@ main(int argc, char *argv[]) cpio->buff = buff; cpio->buff_size = sizeof(buff); +#if defined(HAVE_SIGACTION) && defined(SIGPIPE) + { /* Ignore SIGPIPE signals. */ + struct sigaction sa; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sa.sa_handler = SIG_IGN; + sigaction(SIGPIPE, &sa, NULL); + } +#endif + /* Need lafe_progname before calling lafe_warnc. */ if (*argv == NULL) lafe_progname = "bsdcpio"; else { #if defined(_WIN32) && !defined(__CYGWIN__) lafe_progname = strrchr(*argv, '\\'); -#else - lafe_progname = strrchr(*argv, '/'); + if (strrchr(*argv, '/') > lafe_progname) #endif + lafe_progname = strrchr(*argv, '/'); if (lafe_progname != NULL) lafe_progname++; else lafe_progname = *argv; } +#if HAVE_SETLOCALE + if (setlocale(LC_ALL, "") == NULL) + lafe_warnc(0, "Failed to set default locale"); +#endif cpio->uid_override = -1; cpio->gid_override = -1; @@ -187,9 +205,9 @@ main(int argc, char *argv[]) cpio->bytes_per_block = 5120; break; case 'C': /* NetBSD/OpenBSD */ - cpio->bytes_per_block = atoi(cpio->optarg); + cpio->bytes_per_block = atoi(cpio->argument); if (cpio->bytes_per_block <= 0) - lafe_errc(1, 0, "Invalid blocksize %s", cpio->optarg); + lafe_errc(1, 0, "Invalid blocksize %s", cpio->argument); break; case 'c': /* POSIX 1997 */ cpio->format = "odc"; @@ -199,22 +217,22 @@ main(int argc, char *argv[]) break; case 'E': /* NetBSD/OpenBSD */ lafe_include_from_file(&cpio->matching, - cpio->optarg, cpio->option_null); + cpio->argument, cpio->option_null); break; case 'F': /* NetBSD/OpenBSD/GNU cpio */ - cpio->filename = cpio->optarg; + cpio->filename = cpio->argument; break; case 'f': /* POSIX 1997 */ - lafe_exclude(&cpio->matching, cpio->optarg); + lafe_exclude(&cpio->matching, cpio->argument); break; case 'H': /* GNU cpio (also --format) */ - cpio->format = cpio->optarg; + cpio->format = cpio->argument; break; case 'h': long_help(); break; case 'I': /* NetBSD/OpenBSD */ - cpio->filename = cpio->optarg; + cpio->filename = cpio->argument; break; case 'i': /* POSIX 1997 */ if (cpio->mode != '\0') @@ -251,7 +269,7 @@ main(int argc, char *argv[]) cpio->extract_flags &= ~ARCHIVE_EXTRACT_OWNER; break; case 'O': /* GNU cpio */ - cpio->filename = cpio->optarg; + cpio->filename = cpio->argument; break; case 'o': /* POSIX 1997 */ if (cpio->mode != '\0') @@ -275,7 +293,7 @@ main(int argc, char *argv[]) case 'R': /* GNU cpio, also --owner */ /* TODO: owner_parse should return uname/gname * also; use that to set [ug]name_override. */ - errmsg = owner_parse(cpio->optarg, &uid, &gid); + errmsg = owner_parse(cpio->argument, &uid, &gid); if (errmsg) { lafe_warnc(-1, "%s", errmsg); usage(); @@ -302,6 +320,9 @@ main(int argc, char *argv[]) case 'v': /* POSIX 1997 */ cpio->verbose++; break; + case 'V': /* GNU cpio */ + cpio->dot++; + break; case OPTION_VERSION: /* GNU convention */ version(); break; @@ -345,6 +366,12 @@ main(int argc, char *argv[]) /* -l requires -p */ if (cpio->option_link && cpio->mode != 'p') lafe_errc(1, 0, "Option -l requires -p"); + /* -v overrides -V */ + if (cpio->dot && cpio->verbose) + cpio->dot = 0; + /* -v overrides -V */ + if (cpio->dot && cpio->verbose) + cpio->dot = 0; /* TODO: Flag other nonsensical combinations. */ switch (cpio->mode) { @@ -402,7 +429,7 @@ static const char *long_help_msg = "First option must be a mode specifier:\n" " -i Input -o Output -p Pass\n" "Common Options:\n" - " -v Verbose\n" + " -v Verbose filenames -V one dot per file\n" "Create: %p -o [options] < [list of files] > [archive]\n" " -J,-y,-z,--lzma Compress archive with xz/bzip2/gzip/lzma\n" " --format {odc|newc|ustar} Select archive format\n" @@ -451,7 +478,7 @@ version(void) { fprintf(stdout,"bsdcpio %s -- %s\n", BSDCPIO_VERSION_STRING, - archive_version()); + archive_version_string()); exit(0); } @@ -533,6 +560,8 @@ mode_out(struct cpio *cpio) } r = archive_write_close(cpio->archive); + if (cpio->dot) + fprintf(stderr, "\n"); if (r != ARCHIVE_OK) lafe_errc(1, 0, "%s", archive_error_string(cpio->archive)); @@ -543,7 +572,50 @@ mode_out(struct cpio *cpio) fprintf(stderr, "%lu %s\n", (unsigned long)blocks, blocks == 1 ? "block" : "blocks"); } - archive_write_finish(cpio->archive); + archive_write_free(cpio->archive); +} + +static const char * +remove_leading_slash(const char *p) +{ + const char *rp; + + /* Remove leading "//./" or "//?/" or "//?/UNC/" + * (absolute path prefixes used by Windows API) */ + if ((p[0] == '/' || p[0] == '\\') && + (p[1] == '/' || p[1] == '\\') && + (p[2] == '.' || p[2] == '?') && + (p[3] == '/' || p[3] == '\\')) + { + if (p[2] == '?' && + (p[4] == 'U' || p[4] == 'u') && + (p[5] == 'N' || p[5] == 'n') && + (p[6] == 'C' || p[6] == 'c') && + (p[7] == '/' || p[7] == '\\')) + p += 8; + else + p += 4; + } + do { + rp = p; + /* Remove leading drive letter from archives created + * on Windows. */ + if (((p[0] >= 'a' && p[0] <= 'z') || + (p[0] >= 'A' && p[0] <= 'Z')) && + p[1] == ':') { + p += 2; + } + /* Remove leading "/../", "//", etc. */ + while (p[0] == '/' || p[0] == '\\') { + if (p[1] == '.' && p[2] == '.' && + (p[3] == '/' || p[3] == '\\')) { + p += 3; /* Remove "/..", leave "/" + * for next pass. */ + } else + p += 1; /* Remove "/". */ + } + } while (rp != p); + return (p); } /* @@ -557,7 +629,6 @@ file_to_archive(struct cpio *cpio, const const char *destpath; struct archive_entry *entry, *spare; size_t len; - const char *p; int r; /* @@ -611,10 +682,7 @@ file_to_archive(struct cpio *cpio, const "Can't allocate path buffer"); } strcpy(cpio->pass_destpath, cpio->destdir); - p = srcpath; - while (p[0] == '/') - ++p; - strcat(cpio->pass_destpath, p); + strcat(cpio->pass_destpath, remove_leading_slash(srcpath)); destpath = cpio->pass_destpath; } if (cpio->option_rename) @@ -656,6 +724,8 @@ entry_to_archive(struct cpio *cpio, stru /* Print out the destination name to the user. */ if (cpio->verbose) fprintf(stderr,"%s", destpath); + if (cpio->dot) + fprintf(stderr, "."); /* * Option_link only makes sense in pass mode and for @@ -725,7 +795,7 @@ entry_to_archive(struct cpio *cpio, stru if (r == ARCHIVE_FATAL) exit(1); - if (r >= ARCHIVE_WARN && fd >= 0) { + if (r >= ARCHIVE_WARN && archive_entry_size(entry) > 0 && fd >= 0) { bytes_read = read(fd, cpio->buff, cpio->buff_size); while (bytes_read > 0) { r = archive_write_data(cpio->archive, @@ -825,7 +895,7 @@ mode_in(struct cpio *cpio) a = archive_read_new(); if (a == NULL) lafe_errc(1, 0, "Couldn't allocate archive object"); - archive_read_support_compression_all(a); + archive_read_support_filter_all(a); archive_read_support_format_all(a); if (archive_read_open_file(a, cpio->filename, cpio->bytes_per_block)) @@ -849,7 +919,9 @@ mode_in(struct cpio *cpio) if (destpath == NULL) continue; if (cpio->verbose) - fprintf(stdout, "%s\n", destpath); + fprintf(stderr, "%s\n", destpath); + if (cpio->dot) + fprintf(stderr, "."); if (cpio->uid_override >= 0) archive_entry_set_uid(entry, cpio->uid_override); if (cpio->gid_override >= 0) @@ -859,13 +931,16 @@ mode_in(struct cpio *cpio) fprintf(stderr, "%s: %s\n", archive_entry_pathname(entry), archive_error_string(ext)); - } else if (archive_entry_size(entry) > 0) { + } else if (!archive_entry_size_is_set(entry) + || archive_entry_size(entry) > 0) { r = extract_data(a, ext); if (r != ARCHIVE_OK) cpio->return_value = 1; } } r = archive_read_close(a); + if (cpio->dot) + fprintf(stderr, "\n"); if (r != ARCHIVE_OK) lafe_errc(1, 0, "%s", archive_error_string(a)); r = archive_write_close(ext); @@ -877,8 +952,8 @@ mode_in(struct cpio *cpio) fprintf(stderr, "%lu %s\n", (unsigned long)blocks, blocks == 1 ? "block" : "blocks"); } - archive_read_finish(a); - archive_write_finish(ext); + archive_read_free(a); + archive_write_free(ext); exit(cpio->return_value); } @@ -892,7 +967,7 @@ extract_data(struct archive *ar, struct int r; size_t size; const void *block; - off_t offset; + int64_t offset; for (;;) { r = archive_read_data_block(ar, &block, &size, &offset); @@ -922,7 +997,7 @@ mode_list(struct cpio *cpio) a = archive_read_new(); if (a == NULL) lafe_errc(1, 0, "Couldn't allocate archive object"); - archive_read_support_compression_all(a); + archive_read_support_filter_all(a); archive_read_support_format_all(a); if (archive_read_open_file(a, cpio->filename, cpio->bytes_per_block)) @@ -952,7 +1027,7 @@ mode_list(struct cpio *cpio) fprintf(stderr, "%lu %s\n", (unsigned long)blocks, blocks == 1 ? "block" : "blocks"); } - archive_read_finish(a); + archive_read_free(a); exit(0); } @@ -989,11 +1064,11 @@ list_item_verbose(struct cpio *cpio, str /* Use uname if it's present, else lookup name from uid. */ uname = archive_entry_uname(entry); if (uname == NULL) - uname = lookup_uname(cpio, archive_entry_uid(entry)); + uname = lookup_uname(cpio, (uid_t)archive_entry_uid(entry)); /* Use gname if it's present, else lookup name from gid. */ gname = archive_entry_gname(entry); if (gname == NULL) - gname = lookup_gname(cpio, archive_entry_gid(entry)); + gname = lookup_gname(cpio, (uid_t)archive_entry_gid(entry)); } /* Print device number or file size. */ @@ -1075,6 +1150,8 @@ mode_pass(struct cpio *cpio, const char archive_entry_linkresolver_free(cpio->linkresolver); r = archive_write_close(cpio->archive); + if (cpio->dot) + fprintf(stderr, "\n"); if (r != ARCHIVE_OK) lafe_errc(1, 0, "%s", archive_error_string(cpio->archive)); @@ -1086,7 +1163,7 @@ mode_pass(struct cpio *cpio, const char blocks == 1 ? "block" : "blocks"); } - archive_write_finish(cpio->archive); + archive_write_free(cpio->archive); } /* @@ -1102,12 +1179,24 @@ cpio_rename(const char *name) static char buff[1024]; FILE *t; char *p, *ret; +#if defined(_WIN32) && !defined(__CYGWIN__) + FILE *to; + t = fopen("CONIN$", "r"); + if (t == NULL) + return (name); + to = fopen("CONOUT$", "w"); + if (to == NULL) + return (name); + fprintf(to, "%s (Enter/./(new name))? ", name); + fclose(to); +#else t = fopen("/dev/tty", "r+"); if (t == NULL) return (name); fprintf(t, "%s (Enter/./(new name))? ", name); fflush(t); +#endif p = fgets(buff, sizeof(buff), t); fclose(t); @@ -1260,8 +1349,9 @@ lookup_gname_helper(struct cpio *cpio, c const char * cpio_i64toa(int64_t n0) { - // 2^64 =~ 1.8 * 10^19, so 20 decimal digits suffice. - // We also need 1 byte for '-' and 1 for '\0'. + /* 2^64 =~ 1.8 * 10^19, so 20 decimal digits suffice. + * We also need 1 byte for '-' and 1 for '\0'. + */ static char buff[22]; int64_t n = n0 < 0 ? -n0 : n0; char *p = buff + sizeof(buff); Modified: head/contrib/libarchive/cpio/cpio.h ============================================================================== --- head/contrib/libarchive/cpio/cpio.h Sat Feb 25 10:15:41 2012 (r232152) +++ head/contrib/libarchive/cpio/cpio.h Sat Feb 25 10:58:02 2012 (r232153) @@ -43,18 +43,18 @@ */ struct cpio { /* Option parsing */ - const char *optarg; + const char *argument; /* Options */ const char *filename; - char mode; /* -i -o -p */ - char compress; /* -j, -y, or -z */ + int mode; /* -i -o -p */ + int compress; /* -j, -y, or -z */ const char *format; /* -H format */ int bytes_per_block; /* -b block_size */ int verbose; /* -v */ + int dot; /* -V */ int quiet; /* --quiet */ int extract_flags; /* Flags for extract operation */ - char symlink_mode; /* H or L, per BSD conventions */ const char *compress_program; int option_append; /* -A, only relevant for -o */ int option_atime_restore; /* -a */ Modified: head/contrib/libarchive/cpio/test/main.c ============================================================================== --- head/contrib/libarchive/cpio/test/main.c Sat Feb 25 10:15:41 2012 (r232152) +++ head/contrib/libarchive/cpio/test/main.c Sat Feb 25 10:58:02 2012 (r232153) @@ -24,8 +24,18 @@ */ #include "test.h" +#ifdef HAVE_SYS_TIME_H +#include +#endif #include +#ifdef HAVE_ICONV_H +#include +#endif +#include #include +#ifdef HAVE_SIGNAL_H +#include +#endif #include #include @@ -40,8 +50,10 @@ __FBSDID("$FreeBSD$"); #define KNOWNREF "test_option_f.cpio.uu" #define ENVBASE "BSDCPIO" /* Prefix for environment variables. */ #define PROGRAM "bsdcpio" /* Name of program being tested. */ -#undef LIBRARY /* Not testing a library. */ -#undef EXTRA_DUMP /* How to dump extra data */ +#define PROGRAM_ALIAS "cpio" /* Generic alias for program */ +#undef LIBRARY /* Not testing a library. */ +#undef EXTRA_DUMP /* How to dump extra data */ +#undef EXTRA_ERRNO /* How to dump errno */ /* How to generate extra version info. */ #define EXTRA_VERSION (systemf("%s --version", testprog) ? "" : "") @@ -78,6 +90,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(__BORLANDC__) #define access _access *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 11:03:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24945106564A; Sat, 25 Feb 2012 11:03:14 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 143D38FC13; Sat, 25 Feb 2012 11:03:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PB3Dbl014734; Sat, 25 Feb 2012 11:03:13 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PB3DOm014732; Sat, 25 Feb 2012 11:03:13 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201202251103.q1PB3DOm014732@svn.freebsd.org> From: Martin Matuska Date: Sat, 25 Feb 2012 11:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232154 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 11:03:14 -0000 Author: mm Date: Sat Feb 25 11:03:13 2012 New Revision: 232154 URL: http://svn.freebsd.org/changeset/base/232154 Log: Bump __FreeBSD_version due to libarchive update. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Feb 25 10:58:02 2012 (r232153) +++ head/sys/sys/param.h Sat Feb 25 11:03:13 2012 (r232154) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000008 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000009 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 11:07:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 897A2106566C; Sat, 25 Feb 2012 11:07:33 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FA498FC0C; Sat, 25 Feb 2012 11:07:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PB7Xnq014938; Sat, 25 Feb 2012 11:07:33 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PB7XAv014936; Sat, 25 Feb 2012 11:07:33 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201202251107.q1PB7XAv014936@svn.freebsd.org> From: Martin Matuska Date: Sat, 25 Feb 2012 11:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232155 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 11:07:33 -0000 Author: mm Date: Sat Feb 25 11:07:32 2012 New Revision: 232155 URL: http://svn.freebsd.org/changeset/base/232155 Log: Libarchive 3.0.3 import over Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Sat Feb 25 11:03:13 2012 (r232154) +++ svnadmin/conf/sizelimit.conf Sat Feb 25 11:07:32 2012 (r232155) @@ -29,7 +29,6 @@ jb jeff kmacy lstewart -mm obrien rpaulo rwatson From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 12:06:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 350C01065686; Sat, 25 Feb 2012 12:06:41 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 244C78FC13; Sat, 25 Feb 2012 12:06:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PC6fSl016825; Sat, 25 Feb 2012 12:06:41 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PC6eaF016823; Sat, 25 Feb 2012 12:06:40 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201202251206.q1PC6eaF016823@svn.freebsd.org> From: Maxim Konovalov Date: Sat, 25 Feb 2012 12:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232156 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 12:06:41 -0000 Author: maxim Date: Sat Feb 25 12:06:40 2012 New Revision: 232156 URL: http://svn.freebsd.org/changeset/base/232156 Log: o Reduce chances for integer overflow. o More verbose sysctl description added. MFC after: 2 weeks Sponsored by: Nginx, Inc. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sat Feb 25 11:07:32 2012 (r232155) +++ head/sys/kern/vfs_cache.c Sat Feb 25 12:06:40 2012 (r232156) @@ -369,7 +369,7 @@ sysctl_debug_hashstat_nchash(SYSCTL_HAND maxlength = count; } n_nchash = nchash + 1; - pct = (used * 100 * 100) / n_nchash; + pct = (used * 100) / (n_nchash / 100); error = SYSCTL_OUT(req, &n_nchash, sizeof(n_nchash)); if (error) return (error); @@ -386,7 +386,7 @@ sysctl_debug_hashstat_nchash(SYSCTL_HAND } SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE_INT|CTLFLAG_RD| CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_nchash, "I", - "nchash chain lengths"); + "nchash statistics (number of total/used buckets, maximum chain length, usage percentage)"); #endif /* From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 14:31:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 799B1106566C; Sat, 25 Feb 2012 14:31:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9568FC0C; Sat, 25 Feb 2012 14:31:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PEVQbn021350; Sat, 25 Feb 2012 14:31:26 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PEVQ6s021325; Sat, 25 Feb 2012 14:31:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201202251431.q1PEVQ6s021325@svn.freebsd.org> From: Glen Barber Date: Sat, 25 Feb 2012 14:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232157 - in head: bin/expr lib/libc/sys lib/libmemstat lib/libpmc lib/libusb lib/libutil lib/libvgl sbin/iscontrol share/man/man3 share/man/man4 share/man/man5 share/man/man9 sys/boot/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 14:31:26 -0000 Author: gjb (doc committer) Date: Sat Feb 25 14:31:25 2012 New Revision: 232157 URL: http://svn.freebsd.org/changeset/base/232157 Log: Fix various typos in manual pages. Submitted by: amdmi3 PR: 165431 MFC after: 1 week Modified: head/bin/expr/expr.1 head/lib/libc/sys/cap_enter.2 head/lib/libc/sys/pdfork.2 head/lib/libc/sys/posix_fadvise.2 head/lib/libc/sys/posix_fallocate.2 head/lib/libmemstat/libmemstat.3 head/lib/libpmc/pmc.mips.3 head/lib/libpmc/pmc.westmere.3 head/lib/libusb/libusb.3 head/lib/libutil/kinfo_getproc.3 head/lib/libvgl/vgl.3 head/sbin/iscontrol/iscsi.conf.5 head/share/man/man3/pthread_getthreadid_np.3 head/share/man/man4/acpi_panasonic.4 head/share/man/man4/cxgbe.4 head/share/man/man4/ed.4 head/share/man/man4/mac_lomac.4 head/share/man/man4/umcs.4 head/share/man/man4/vr.4 head/share/man/man5/rc.conf.5 head/share/man/man9/kqueue.9 head/share/man/man9/zone.9 head/sys/boot/forth/menu.4th.8 Modified: head/bin/expr/expr.1 ============================================================================== --- head/bin/expr/expr.1 Sat Feb 25 12:06:40 2012 (r232156) +++ head/bin/expr/expr.1 Sat Feb 25 14:31:25 2012 (r232157) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 9, 2010 +.Dd February 25, 2012 .Dt EXPR 1 .Os .Sh NAME @@ -52,7 +52,7 @@ Several of the operators have special me and must therefore be quoted appropriately. All integer operands are interpreted in base 10 and must consist of only an optional leading minus sign followed by one or more digits (unless -less strict parsing has been enabled for backwards compatibilty with +less strict parsing has been enabled for backwards compatibility with prior versions of .Nm in @@ -284,7 +284,7 @@ An empty operand string is interpreted a .Bl -bullet .It Leading white space and/or a plus sign before an otherwise valid positive -numberic operand are allowed and will be ignored. +numeric operand are allowed and will be ignored. .El .Pp The extended arithmetic range and overflow checks do not conflict with Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libc/sys/cap_enter.2 Sat Feb 25 14:31:25 2012 (r232157) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 11, 2009 +.Dd February 25, 2012 .Dt CAP_ENTER 2 .Os .Sh NAME @@ -68,7 +68,7 @@ appropriately-crafted applications or ap returns a flag indicating whether or not the process is in a capability mode sandbox. .Sh CAVEAT -Creating effecive process sandboxes is a tricky process that involves +Creating effective process sandboxes is a tricky process that involves identifying the least possible rights required by the process and then passing those rights into the process in a safe manner. See the CAVEAT Modified: head/lib/libc/sys/pdfork.2 ============================================================================== --- head/lib/libc/sys/pdfork.2 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libc/sys/pdfork.2 Sat Feb 25 14:31:25 2012 (r232157) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2011 +.Dd February 25, 2012 .Dt PDFORK 2 .Os .Sh NAME @@ -87,7 +87,7 @@ except that it accepts a process descrip rather than a PID. .Pp .Fn pdwait4 -behaves identially to +behaves identically to .Xr wait4 2 , but operates with respect to a process descriptor argument rather than a PID. .Pp Modified: head/lib/libc/sys/posix_fadvise.2 ============================================================================== --- head/lib/libc/sys/posix_fadvise.2 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libc/sys/posix_fadvise.2 Sat Feb 25 14:31:25 2012 (r232157) @@ -28,7 +28,7 @@ .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 26, 2011 +.Dd February 25, 2012 .Dt POSIX_FADVISE 2 .Os .Sh NAME @@ -74,7 +74,7 @@ This currently does nothing as the defau detect sequential behavior. .It Dv POSIX_FADV_WILLNEED Tells the system that the specified data will be accessed in the near future. -The system may initiate an asychronous read of the data if it is not already +The system may initiate an asynchronous read of the data if it is not already present in memory. .It Dv POSIX_FADV_DONTNEED Tells the system that the specified data will not be accessed in the near Modified: head/lib/libc/sys/posix_fallocate.2 ============================================================================== --- head/lib/libc/sys/posix_fallocate.2 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libc/sys/posix_fallocate.2 Sat Feb 25 14:31:25 2012 (r232157) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd April 13, 2011 +.Dd February 25, 2012 .Dt POSIX_FALLOCATE 2 .Os .Sh NAME @@ -48,7 +48,7 @@ to .Fa len in the file referenced by .Fa fd -is guarateed to be allocated upon successful return. +is guaranteed to be allocated upon successful return. That is, if .Fn posix_fallocate returns successfully, subsequent writes to the specified file data Modified: head/lib/libmemstat/libmemstat.3 ============================================================================== --- head/lib/libmemstat/libmemstat.3 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libmemstat/libmemstat.3 Sat Feb 25 14:31:25 2012 (r232157) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2011 +.Dd February 25, 2012 .Dt LIBMEMSTAT 3 .Os .Sh NAME @@ -345,7 +345,7 @@ Return a caller-owned per-CPU pointer fo Set a caller-owned per-CPU pointer for the memory type. .It Fn memstat_get_percpu_caller_uint64 Return a caller-owned per-CPU integer for the memory type. -.It Fn memsttat_set_percpu_caller_uint64 +.It Fn memstat_set_percpu_caller_uint64 Set a caller-owned per-CPU integer for the memory type. .It Fn memstat_get_percpu_free If the memory allocator supports a per-CPU cache, return the number of free Modified: head/lib/libpmc/pmc.mips.3 ============================================================================== --- head/lib/libpmc/pmc.mips.3 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libpmc/pmc.mips.3 Sat Feb 25 14:31:25 2012 (r232157) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2010 +.Dd February 25, 2012 .Dt PMC.MIPS 3 .Os .Sh NAME @@ -166,7 +166,7 @@ This includes all instructions that norm purpose register, but where the destination register was set to r0. .It Li INTEGER_MULDIV_COMPLETED .Pq Event 17, Counter 1 -Integer multipy and divide instructions completed. (MULxx, DIVx, MADDx, MSUBx). +Integer multiply and divide instructions completed. (MULxx, DIVx, MADDx, MSUBx). .It Li RF_STALL .Pq Event 18, Counter 0 Counts the total number of cycles where no instructions are issued Modified: head/lib/libpmc/pmc.westmere.3 ============================================================================== --- head/lib/libpmc/pmc.westmere.3 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libpmc/pmc.westmere.3 Sat Feb 25 14:31:25 2012 (r232157) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 24, 2010 +.Dd February 25, 2012 .Dt PMC.WESTMERE 3 .Os .Sh NAME @@ -643,7 +643,7 @@ Counter 0. .Pq Event 60H , Umask 08H Counts weighted cycles of offcore read requests of any kind. Include L2 prefetch requests. -Ccounter 0. +Counter 0. .It Li CACHE_LOCK_CYCLES.L1D_L2 .Pq Event 63H , Umask 01H Cycle count during which the L1D and L2 are locked. A lock is asserted when Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libusb/libusb.3 Sat Feb 25 14:31:25 2012 (r232157) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2011 +.Dd February 25, 2012 .Dt LIBUSB 3 .Os .Sh NAME @@ -483,7 +483,7 @@ on success and a LIBUSB_ERROR code on fa .Pp .Ft int .Fn libusb_handle_events_locked "libusb_context *ctx" "struct timeval *tv" -Handle any pending events by polling file desciptors, without checking if +Handle any pending events by polling file descriptors, without checking if another thread is already doing so. Must be called with the event lock held. .Pp Modified: head/lib/libutil/kinfo_getproc.3 ============================================================================== --- head/lib/libutil/kinfo_getproc.3 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libutil/kinfo_getproc.3 Sat Feb 25 14:31:25 2012 (r232157) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2009 +.Dd February 25, 2012 .Os .Dt KINFO_GETPROC 3 .Sh NAME @@ -44,7 +44,7 @@ This function is used for obtaining proc The .Ar pid field contains the process identifier. -This should be the a process that you have privilige to access. +This should be a process that you have privilege to access. This function is a wrapper around .Xr sysctl 3 with the Modified: head/lib/libvgl/vgl.3 ============================================================================== --- head/lib/libvgl/vgl.3 Sat Feb 25 12:06:40 2012 (r232156) +++ head/lib/libvgl/vgl.3 Sat Feb 25 14:31:25 2012 (r232157) @@ -26,7 +26,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd November 7, 1999 +.Dd February 25, 2012 .Dt VGL 3 .Os .Sh NAME @@ -386,7 +386,7 @@ Passing an in-memory bitmap to this func The desired virtual screen width may not be achievable because of the video card hardware. In such case the video driver (and -underlaying video BIOS) may choose the next largest values. +underlying video BIOS) may choose the next largest values. Always examine .Va object->VXsize and Modified: head/sbin/iscontrol/iscsi.conf.5 ============================================================================== --- head/sbin/iscontrol/iscsi.conf.5 Sat Feb 25 12:06:40 2012 (r232156) +++ head/sbin/iscontrol/iscsi.conf.5 Sat Feb 25 14:31:25 2012 (r232157) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 5, 2007 +.Dd February 25, 2012 .Dt ISCSI.CONF 5 .Os .Sh NAME @@ -113,7 +113,7 @@ bytes it can receive in an iSCSI PDU, de .It Cm MaxOutstandingR2T is used to calculate/negotiate the .Em tag opening , -can be overriden by the +can be overridden by the .Sy tag option. .It Cm DataPDUInOrder Modified: head/share/man/man3/pthread_getthreadid_np.3 ============================================================================== --- head/share/man/man3/pthread_getthreadid_np.3 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man3/pthread_getthreadid_np.3 Sat Feb 25 14:31:25 2012 (r232157) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2011 +.Dd February 25, 2012 .Dt PTHREAD_GETTHREADID_NP 3 .Os .Sh NAME @@ -42,7 +42,7 @@ The function returns the unique integral ID of the calling thread. Its semantics is similar to the AIX's .Fn pthread_getthreadid_np -functuion. +function. .Sh RETURN VALUES The .Fn pthread_getthreadid_np Modified: head/share/man/man4/acpi_panasonic.4 ============================================================================== --- head/share/man/man4/acpi_panasonic.4 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man4/acpi_panasonic.4 Sat Feb 25 14:31:25 2012 (r232157) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2010 +.Dd February 25, 2012 .Dt ACPI_PANASONIC 4 .Os .Sh NAME @@ -66,7 +66,7 @@ The third and last is to provide a way t sound mute state via .Xr sysctl 8 . .Ss Hotkeys -There are 9 hotkeys available on the supported hardwares: +There are 9 hotkeys available on the supported hardware: .Pp .Bl -tag -compact -offset indent .It Sy Fn+F1 Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man4/cxgbe.4 Sat Feb 25 14:31:25 2012 (r232157) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2011 +.Dd February 25, 2012 .Dt CXGBE 4 .Os .Sh NAME @@ -56,7 +56,7 @@ The .Nm driver provides support for PCI Express Ethernet adapters based on the Chelsio Terminator 4 (T4) ASIC. -The driver supprts Jumbo Frames, Transmit/Receive checksum offload, +The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN tag insertion/extraction, VLAN checksum offload, VLAN TSO, and Receive Side Steering (RSS). Modified: head/share/man/man4/ed.4 ============================================================================== --- head/share/man/man4/ed.4 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man4/ed.4 Sat Feb 25 14:31:25 2012 (r232157) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd February 25, 2012 .Dt ED 4 .Os .Sh NAME @@ -289,7 +289,7 @@ Surecom EtherPerfect EP-427 .It Surecom NE-34 .It -TDK 3000/3400/5670 Fast Etherenet/Modem +TDK 3000/3400/5670 Fast Ethernet/Modem .It TDK LAK-CD031, Grey Cell GCS2000 Ethernet Card .It Modified: head/share/man/man4/mac_lomac.4 ============================================================================== --- head/share/man/man4/mac_lomac.4 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man4/mac_lomac.4 Sat Feb 25 14:31:25 2012 (r232157) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 11, 2002 +.Dd February 25, 2012 .Dt MAC_LOMAC 4 .Os .Sh NAME @@ -63,7 +63,7 @@ which protects the integrity of system o an information flow policy coupled with the subject demotion via floating labels. In LOMAC, all system subjects and objects are assigned integrity labels, made -up of one or more hierarchial grades, depending on the their types. +up of one or more hierarchical grades, depending on the their types. Together, these label elements permit all labels to be placed in a partial order, with information flow protections and demotion decisions based on a dominance operator Modified: head/share/man/man4/umcs.4 ============================================================================== --- head/share/man/man4/umcs.4 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man4/umcs.4 Sat Feb 25 14:31:25 2012 (r232157) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd February 25, 2012 .Dt UMCS 4 .Os .Sh NAME @@ -56,7 +56,7 @@ The driver provides support for various multiport serial adapters based on the MosCom MCS7820 and MCS7840 chips. They are 2- or 4-port adapters with full-featured 16550-compatible UARTs and very flexible baud generators. Also, these chips -support RS422/RS485 and IrDA oprations. +support RS422/RS485 and IrDA operations. .Pp The device is accessed through the .Xr ucom 4 Modified: head/share/man/man4/vr.4 ============================================================================== --- head/share/man/man4/vr.4 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man4/vr.4 Sat Feb 25 14:31:25 2012 (r232157) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2010 +.Dd February 25, 2012 .Dt VR 4 .Os .Sh NAME @@ -94,7 +94,7 @@ or .Ar half-duplex modes. .It 100baseTX -Set 100Mbps (Fast Fthernet) operation. +Set 100Mbps (Fast Ethernet) operation. The .Ar mediaopt option can also be used to select either Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man5/rc.conf.5 Sat Feb 25 14:31:25 2012 (r232157) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2012 +.Dd February 25, 2012 .Dt RC.CONF 5 .Os .Sh NAME @@ -1427,7 +1427,7 @@ Note that ICMPv6 Router Advertisement me accepted even when .Va net.inet6.ip6.forwarding is 1 -.Pq packet fowarding is enabled +.Pq packet forwarding is enabled when .Va net.inet6.ip6.rfc6204w3 is set to 1. Modified: head/share/man/man9/kqueue.9 ============================================================================== --- head/share/man/man9/kqueue.9 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man9/kqueue.9 Sat Feb 25 14:31:25 2012 (r232157) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2011 +.Dd February 25, 2012 .Dt KQUEUE 9 .Os .Sh NAME @@ -294,7 +294,7 @@ locks will be used instead. .Pp The function .Fn knlist_init_mtx -may be used to initalize a +may be used to initialize a .Vt knlist when .Fa lock Modified: head/share/man/man9/zone.9 ============================================================================== --- head/share/man/man9/zone.9 Sat Feb 25 12:06:40 2012 (r232156) +++ head/share/man/man9/zone.9 Sat Feb 25 14:31:25 2012 (r232157) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 9, 2010 +.Dd February 25, 2012 .Dt ZONE 9 .Os .Sh NAME @@ -210,7 +210,7 @@ The .Fn uma_zone_get_cur function returns the approximate current occupancy of the zone. The returned value is approximate because appropriate synchronisation to -determine an exact value is not performend by the implementation. +determine an exact value is not performed by the implementation. This ensures low overhead at the expense of potentially stale data being used in the calculation. .Sh RETURN VALUES Modified: head/sys/boot/forth/menu.4th.8 ============================================================================== --- head/sys/boot/forth/menu.4th.8 Sat Feb 25 12:06:40 2012 (r232156) +++ head/sys/boot/forth/menu.4th.8 Sat Feb 25 14:31:25 2012 (r232157) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Dec 27, 2011 +.Dd February 25, 2012 .Dt MENU.4TH 8 .Os .Sh NAME @@ -90,7 +90,7 @@ causes the menu to be displayed in color use of ANSI bold for numbers appearing to the left of menuitems and the use of special .Dq Li ansi -variables describd below. +variables described below. .It Va autoboot_delay Number of seconds .Ic menu-display From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 15:21:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BC3B1065673; Sat, 25 Feb 2012 15:21:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8A3D8FC16; Sat, 25 Feb 2012 15:21:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PFLhLU022969; Sat, 25 Feb 2012 15:21:43 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PFLh9N022959; Sat, 25 Feb 2012 15:21:43 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201202251521.q1PFLh9N022959@svn.freebsd.org> From: Glen Barber Date: Sat, 25 Feb 2012 15:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232158 - in head: bin/expr lib/libc/sys lib/libpmc sbin/iscontrol share/man/man4 share/man/man5 sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 15:21:45 -0000 Author: gjb (doc committer) Date: Sat Feb 25 15:21:43 2012 New Revision: 232158 URL: http://svn.freebsd.org/changeset/base/232158 Log: Whitespace cleanup: o Wrap sentences on to new lines o Cleanup trailing whitespace Found with: textproc/igor MFC after: 1 week X-MFC-With: r232157 Modified: head/bin/expr/expr.1 head/lib/libc/sys/pdfork.2 head/lib/libpmc/pmc.mips.3 head/sbin/iscontrol/iscsi.conf.5 head/share/man/man4/cxgbe.4 head/share/man/man4/ed.4 head/share/man/man4/umcs.4 head/share/man/man5/rc.conf.5 head/sys/boot/forth/menu.4th.8 Modified: head/bin/expr/expr.1 ============================================================================== --- head/bin/expr/expr.1 Sat Feb 25 14:31:25 2012 (r232157) +++ head/bin/expr/expr.1 Sat Feb 25 15:21:43 2012 (r232158) @@ -176,7 +176,8 @@ option, since this matches the historic .Nm in .Fx . This option makes number parsing less strict and permits leading -white space and an optional leading plus sign. In addition, empty operands +white space and an optional leading plus sign. +In addition, empty operands have an implied value of zero in numeric context. For historical reasons, defining the environment variable .Ev EXPR_COMPAT @@ -300,7 +301,8 @@ standard, the use of string arguments .Va index , or .Va match -produces undefined results. In this version of +produces undefined results. +In this version of .Nm , these arguments are treated just as their respective string values. .Pp Modified: head/lib/libc/sys/pdfork.2 ============================================================================== --- head/lib/libc/sys/pdfork.2 Sat Feb 25 14:31:25 2012 (r232157) +++ head/lib/libc/sys/pdfork.2 Sat Feb 25 15:21:43 2012 (r232158) @@ -101,7 +101,8 @@ queries status of a process descriptor; .Fa st_ctime and .Fa st_mtime -fields are defined. If the owner read, write, and execute bits are set then the +fields are defined. +If the owner read, write, and execute bits are set then the process represented by the process descriptor is still alive. .Pp .Xr poll 2 Modified: head/lib/libpmc/pmc.mips.3 ============================================================================== --- head/lib/libpmc/pmc.mips.3 Sat Feb 25 14:31:25 2012 (r232157) +++ head/lib/libpmc/pmc.mips.3 Sat Feb 25 15:21:43 2012 (r232158) @@ -54,16 +54,16 @@ MIPS programmable PMCs support the follo .Bl -tag -width indent .It Li CYCLE .Pq Event 0, Counter 0/1 -Total number of cycles. +Total number of cycles. The performance counters are clocked by the -top-level gated clock. +top-level gated clock. If the core is built with that clock gater present, none of the counters will increment while the clock is stopped - due to a WAIT instruction. .It Li INSTR_EXECUTED .Pq Event 1, Counter 0/1 Total number of instructions completed. -.It Li BRANCH_COMPLETED +.It Li BRANCH_COMPLETED .Pq Event 2, Counter 0 Total number of branch instructions completed. .It Li BRANCH_MISPRED @@ -85,9 +85,9 @@ If RPS use is disabled, JR $31 will not .Pq Event 5, Counter 0 Counts ITLB accesses that are due to fetches showing up in the instruction fetch stage of the pipeline and which do not use a fixed -mapping or are not in unmapped space. +mapping or are not in unmapped space. If an address is fetched twice from the pipe (as in the case of a -cache miss), that instruction willcount as 2 ITLB accesses. +cache miss), that instruction willcount as 2 ITLB accesses. Since each fetch gets us 2 instructions,there is one access marked per double word. .It Li ITLB_MISS @@ -102,7 +102,8 @@ They are also ignored if there is some f Counts DTLB access including those in unmapped address spaces. .It Li DTLB_MISS .Pq Event 6, Counter 1 -Counts DTLB misses. Back to back misses that result in only one DTLB +Counts DTLB misses. +Back to back misses that result in only one DTLB entry getting refilled are counted as a single miss. .It Li JTLB_IACCESS .Pq Event 7, Counter 0 @@ -119,7 +120,8 @@ Data JTLB accesses. Counts data JTLB accesses that result in no match or a match on an invalid translation. .It Li IC_FETCH .Pq Event 9, Counter 0 -Counts every time the instruction cache is accessed. All replays, +Counts every time the instruction cache is accessed. +All replays, wasted fetches etc. are counted. For example, following a branch, even though the prediction is taken, the fall through access is counted. @@ -179,7 +181,8 @@ when both stalls are active will only be replay traps (other than uTLB) .It Li STORE_COND_COMPLETED .Pq Event 19, Counter 0 -Conditional stores completed. Counts all events, including failed stores. +Conditional stores completed. +Counts all events, including failed stores. .It Li STORE_COND_FAILED .Pq Event 19, Counter 1 Conditional store instruction that did not update memory. @@ -189,7 +192,7 @@ different and the observed operating mod causing some inaccuracy in the measured ratio. .It Li ICACHE_REQUESTS .Pq Event 20, Counter 0 -Note that this only counts PREFs that are actually attempted. +Note that this only counts PREFs that are actually attempted. PREFs to uncached addresses or ones with translation errors are not counted .It Li ICACHE_HIT .Pq Event 20, Counter 1 @@ -214,7 +217,7 @@ Any type of exception taken. Counts cycles where the LSU is in fixup and cannot accept a new instruction from the ALU. Fixups are replays within the LSU that occur when an instruction needs -to re-access the cache or the DTLB. +to re-access the cache or the DTLB. .It Li IFU_CYCLES_STALLED .Pq Event 25, Counter 0 Counts the number of cycles where the fetch unit is not providing a @@ -256,7 +259,7 @@ Cycles where the main pipeline is stalle in the Fill Store Buffer. .It Li DMISS_CYCLES .Pq Event 39, Counter 0 -Data miss is outstanding, but not necessarily stalling the pipeline. +Data miss is outstanding, but not necessarily stalling the pipeline. The difference between this and D$ miss stall cycles can show the gain from non-blocking cache misses. .It Li L2_MISS_CYCLES @@ -282,7 +285,8 @@ Counts all cycles where integer pipeline Count all pipeline bubbles that are a result of multicycle ISPRAM access. Pipeline bubbles are defined as all cycles that IFU doesn't present an -instruction to ALU. The four cycles after a redirect are not counted. +instruction to ALU. +The four cycles after a redirect are not counted. .It Li DSPRAM_STALL_CYCLES .Pq Event 43, Counter 1 Counts stall cycles created by an instruction waiting for access to DSPRAM. @@ -372,10 +376,10 @@ aliases supported by .Lb libpmc and the underlying hardware events used. .Bl -column "branch-mispredicts" "cpu_clk_unhalted.core_p" -.It Em Alias Ta Em Event Ta +.It Em Alias Ta Em Event Ta .It Li instructions Ta Li INSTR_EXECUTED Ta -.It Li branches Ta Li BRANCH_COMPLETED Ta -.It Li branch-mispredicts Ta Li BRANCH_MISPRED Ta +.It Li branches Ta Li BRANCH_COMPLETED Ta +.It Li branch-mispredicts Ta Li BRANCH_MISPRED Ta .El .Sh SEE ALSO .Xr pmc 3 , Modified: head/sbin/iscontrol/iscsi.conf.5 ============================================================================== --- head/sbin/iscontrol/iscsi.conf.5 Sat Feb 25 14:31:25 2012 (r232157) +++ head/sbin/iscontrol/iscsi.conf.5 Sat Feb 25 15:21:43 2012 (r232158) @@ -39,7 +39,7 @@ program. It contains declarations and parameter/key-options. The syntax is very simple, .D1 Li variable = value; -and they can be grouped via a +and they can be grouped via a .Em block declaration: .Bf Li @@ -60,7 +60,7 @@ currently only supported authentication digest either MD5 or SHA. Default is none. .It Cm HeaderDigest -a +a .Em digest is calculated on the header of all iSCSI PDUs, and checked. @@ -141,7 +141,7 @@ to the value specified. .It Cm maxluns overrides the compiled value of .Sy luns , -see +see .Xr iscsi_initiator 4 . This value can only be reduced. .It Cm sockbufsize @@ -185,7 +185,7 @@ myiscsi { # nickname targetaddress = iscsi1 targetname = iqn.1900.com.com:sn.123456 } -chaptest { +chaptest { targetaddress= 10.0.0.1; targetname = iqn.1900.com.com:sn.123456 initiatorname= iqn.2005-01.il.ac.huji.cs:nobody Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Sat Feb 25 14:31:25 2012 (r232157) +++ head/share/man/man4/cxgbe.4 Sat Feb 25 15:21:43 2012 (r232158) @@ -100,28 +100,36 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g -The number of tx queues to use for a 10Gb port. The default is 16 or the number +The number of tx queues to use for a 10Gb port. +The default is 16 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nrxq10g -The number of rx queues to use for a 10Gb port. The default is 8 or the number +The number of rx queues to use for a 10Gb port. +The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.ntxq1g -The number of tx queues to use for a 1Gb port. The default is 4 or the number +The number of tx queues to use for a 1Gb port. +The default is 4 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nrxq1g -The number of rx queues to use for a 1Gb port. The default is 2 or the number +The number of rx queues to use for a 1Gb port. +The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq10g -The number of TOE tx queues to use for a 10Gb port. The default is 8 or the +The number of TOE tx queues to use for a 10Gb port. +The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldrxq10g -The number of TOE rx queues to use for a 10Gb port. The default is 2 or the +The number of TOE rx queues to use for a 10Gb port. +The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq1g -The number of TOE tx queues to use for a 1Gb port. The default is 2 or the +The number of TOE tx queues to use for a 1Gb port. +The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldrxq1g -The number of TOE rx queues to use for a 1Gb port. The default is 1. +The number of TOE rx queues to use for a 1Gb port. +The default is 1. .It Va hw.cxgbe.holdoff_timer_idx_10G .It Va hw.cxgbe.holdoff_timer_idx_1G The timer index value to use to delay interrupts. @@ -149,7 +157,8 @@ ifconfig up). The size, in number of entries, of the descriptor ring used for a tx queue. A buf_ring of the same size is also allocated for additional -software queuing. See +software queuing. +See .Xr ifnet 9 . The default value is 1024. Different cxgbe interfaces can be assigned different values via the Modified: head/share/man/man4/ed.4 ============================================================================== --- head/share/man/man4/ed.4 Sat Feb 25 14:31:25 2012 (r232157) +++ head/share/man/man4/ed.4 Sat Feb 25 15:21:43 2012 (r232158) @@ -423,8 +423,8 @@ packets are received. As a result, it may throw out some good packets which have been received but not yet transferred from the card to main memory. .Pp -The -.Nm +The +.Nm driver is slow by today's standards. .Pp PC Card attachment supports the D-Link DMF650TX LAN/Modem card's Ethernet Modified: head/share/man/man4/umcs.4 ============================================================================== --- head/share/man/man4/umcs.4 Sat Feb 25 14:31:25 2012 (r232157) +++ head/share/man/man4/umcs.4 Sat Feb 25 15:21:43 2012 (r232158) @@ -54,8 +54,10 @@ umcs_load="YES" The .Nm driver provides support for various multiport serial adapters based on the MosCom -MCS7820 and MCS7840 chips. They are 2- or 4-port adapters with full-featured -16550-compatible UARTs and very flexible baud generators. Also, these chips +MCS7820 and MCS7840 chips. +They are 2- or 4-port adapters with full-featured +16550-compatible UARTs and very flexible baud generators. +Also, these chips support RS422/RS485 and IrDA operations. .Pp The device is accessed through the Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Feb 25 14:31:25 2012 (r232157) +++ head/share/man/man5/rc.conf.5 Sat Feb 25 15:21:43 2012 (r232158) @@ -200,7 +200,7 @@ to handle device added, removed or unkno .Pq Vt bool Run .Xr ddb 8 -to install +to install .Xr ddb 4 scripts at boot time. .It Va ddb_config @@ -1273,7 +1273,7 @@ options in this variable, in addition to file. For instance, to configure an .Xr ath 4 -wireless device in station mode with an address obtained +wireless device in station mode with an address obtained via DHCP, using WPA authentication and 802.11b mode, it is possible to use something like: .Bd -literal @@ -1449,7 +1449,8 @@ Aliases should be set by .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n with .Dq Li inet6 -keyword. For example: +keyword. +For example: .Bd -literal ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" @@ -1552,14 +1553,17 @@ If .Dq Li AUTO is specified, it attempts to read a file .Pa /etc/ip6addrctl.conf -first. If this file is found, +first. +If this file is found, .Xr ip6addrctl 8 -reads and installs it. If not found, a policy is automatically set +reads and installs it. +If not found, a policy is automatically set according to .Va ipv6_activate_all_interfaces variable; if the variable is set to .Dq Li YES -the IPv6-preferred one is used. Otherwise IPv4-preferred. +the IPv6-preferred one is used. +Otherwise IPv4-preferred. .Pp The default value of .Va ip6addrctl_enable Modified: head/sys/boot/forth/menu.4th.8 ============================================================================== --- head/sys/boot/forth/menu.4th.8 Sat Feb 25 14:31:25 2012 (r232157) +++ head/sys/boot/forth/menu.4th.8 Sat Feb 25 15:21:43 2012 (r232158) @@ -86,7 +86,8 @@ If set to .Dq Li YES (case-insensitive) or .Dq Li 1 , -causes the menu to be displayed in color wherever possible. This includes the +causes the menu to be displayed in color wherever possible. +This includes the use of ANSI bold for numbers appearing to the left of menuitems and the use of special .Dq Li ansi @@ -117,14 +118,18 @@ for additional information. .It Va menu_timeout_command The command to be executed after .Va autoboot_delay -seconds if a key is not pressed. The default is +seconds if a key is not pressed. +The default is .Ic boot . .It Va loader_menu_timeout_x -Sets the desired column position of the timeout countdown text. Default is 4. +Sets the desired column position of the timeout countdown text. +Default is 4. .It Va loader_menu_timeout_y -Sets the desired row position of the timeout countdown text. Default is 23. +Sets the desired row position of the timeout countdown text. +Default is 23. .It Va loader_menu_title -The text to display centered above the menu. Default is +The text to display centered above the menu. +Default is .Dq Li "Welcome to FreeBSD" . .It Va menu_caption[x] The text to be displayed for the numbered menuitem @@ -132,7 +137,8 @@ The text to be displayed for the numbere .It Va menu_command[x] The command to be executed when the number associated with menuitem .Dq Li x -is pressed. See the list of included FICL words below for some ideas. +is pressed. +See the list of included FICL words below for some ideas. .It Va menu_keycode[x] An optional decimal ASCII keycode to be associated with menuitem .Dq Li x . @@ -201,7 +207,8 @@ menuitem (if configured). .It Va hint.acpi.0.disabled Effects the display of the .Va menu_acpi -menuitem. If set, the menuitem will display +menuitem. +If set, the menuitem will display .Va toggled_text[x] .Va ( toggled_ansi[x] if @@ -225,7 +232,8 @@ and .It Va menu_reboot If set, adds a built-in .Dq Li Reboot -menuitem to the end of the last configured menuitem. If +menuitem to the end of the last configured menuitem. +If .Va menu_options is configured, the .Dq Li Reboot From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 16:02:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56A591065675; Sat, 25 Feb 2012 16:02:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EE408FC1B; Sat, 25 Feb 2012 16:02:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PG2Ccb024224; Sat, 25 Feb 2012 16:02:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PG2Crg024222; Sat, 25 Feb 2012 16:02:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201202251602.q1PG2Crg024222@svn.freebsd.org> From: Glen Barber Date: Sat, 25 Feb 2012 16:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232159 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 16:02:12 -0000 Author: gjb (doc committer) Date: Sat Feb 25 16:02:12 2012 New Revision: 232159 URL: http://svn.freebsd.org/changeset/base/232159 Log: Whitespace cleanup: o Wrap sentences on to new lines o Rewrap lines where possible while trying to keep the diff to a minimum Found with: textproc/igor MFC after: 1 week X-MFC-With: r232157 Modified: head/lib/libpmc/pmc.westmere.3 Modified: head/lib/libpmc/pmc.westmere.3 ============================================================================== --- head/lib/libpmc/pmc.westmere.3 Sat Feb 25 15:21:43 2012 (r232158) +++ head/lib/libpmc/pmc.westmere.3 Sat Feb 25 16:02:12 2012 (r232159) @@ -92,15 +92,17 @@ Configure the Off-core Response bits. .It Li DMND_DATA_RD Counts the number of demand and DCU prefetch data reads of full and partial cachelines as well as demand data page table entry -cacheline reads. Does not count L2 data read prefetches or +cacheline reads. +Does not count L2 data read prefetches or instruction fetches. .It Li DMND_RFO Counts the number of demand and DCU prefetch reads for ownership -(RFO) requests generated by a write to data cacheline. Does not -count L2 RFO. +(RFO) requests generated by a write to data cacheline. +Does not count L2 RFO. .It Li DMND_IFETCH Counts the number of demand and DCU prefetch instruction cacheline -reads. Does not count L2 code read prefetches. +reads. +Does not count L2 code read prefetches. WB Counts the number of writeback (modified to exclusive) transactions. .It Li PF_DATA_RD @@ -181,7 +183,8 @@ All Store buffer stall cycles All store referenced with misaligned address .It Li STORE_BLOCKS.AT_RET .Pq Event 06H , Umask 04H -Counts number of loads delayed with at-Retirement block code. The following +Counts number of loads delayed with at-Retirement block code. +The following loads need to be executed at retirement and wait for all senior stores on the same thread to be drained: load splitting across 4K boundary (page split), load accessing uncacheable (UC or USWC) memory, load lock, and load @@ -225,9 +228,10 @@ ld_lat facility. In conjunction with ld_lat facility .It Li MEM_STORE_RETIRED.DTLB_MISS .Pq Event 0CH , Umask 01H -The event counts the number of retired stores that missed the DTLB. The DTLB -miss is not counted if the store operation causes a fault. Does not counter -prefetches. Counts both primary and secondary misses to the TLB +The event counts the number of retired stores that missed the DTLB. +The DTLB miss is not counted if the store operation causes a fault. +Does not counter prefetches. +Counts both primary and secondary misses to the TLB .It Li UOPS_ISSUED.ANY .Pq Event 0EH , Umask 01H Counts the number of Uops issued by the Register Allocation Table to the @@ -264,9 +268,11 @@ Load instructions retired remote DRAM an Load instructions retired I/O (Precise Event) .It Li FP_COMP_OPS_EXE.X87 .Pq Event 10H , Umask 01H -Counts the number of FP Computational Uops Executed. The number of FADD, +Counts the number of FP Computational Uops Executed. +The number of FADD, FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer -DIVs, and IDIVs. This event does not distinguish an FADD used in the middle +DIVs, and IDIVs. +This event does not distinguish an FADD used in the middle of a transcendental flow from a separate FADD instruction. .It Li FP_COMP_OPS_EXE.MMX .Pq Event 10H , Umask 02H @@ -316,9 +322,9 @@ Counts number of loads dispatched from t the Memory Order Buffer. .It Li LOAD_DISPATCH.RS_DELAYED .Pq Event 13H , Umask 02H -Counts the number of delayed RS dispatches at the stage latch. If an RS -dispatch can not bypass to LB, it has another chance to dispatch from the -one-cycle delayed staging latch before it is written into the LB. +Counts the number of delayed RS dispatches at the stage latch. +If an RS dispatch can not bypass to LB, it has another chance to dispatch +from the one-cycle delayed staging latch before it is written into the LB. .It Li LOAD_DISPATCH.MOB .Pq Event 13H , Umask 04H Counts the number of loads dispatched from the Reservation Station to the @@ -329,13 +335,15 @@ Counts all loads dispatched from the Res .It Li ARITH.CYCLES_DIV_BUSY .Pq Event 14H , Umask 01H Counts the number of cycles the divider is busy executing divide or square -root operations. The divide can be integer, X87 or Streaming SIMD Extensions -(SSE). The square root operation can be either X87 or SSE. +root operations. +The divide can be integer, X87 or Streaming SIMD Extensions (SSE). +The square root operation can be either X87 or SSE. Set 'edge =1, invert=1, cmask=1' to count the number of divides. Count may be incorrect When SMT is on .It Li ARITH.MUL .Pq Event 14H , Umask 02H -Counts the number of multiply operations executed. This includes integer as +Counts the number of multiply operations executed. +This includes integer as well as floating point multiply operations but excludes DPPS mul and MPSAD. Count may be incorrect When SMT is on .It Li INST_QUEUE_WRITES @@ -344,64 +352,72 @@ Counts the number of instructions writte cycle. .It Li INST_DECODED.DEC0 .Pq Event 18H , Umask 01H -Counts number of instructions that require decoder 0 to be decoded. Usually, -this means that the instruction maps to more than 1 uop +Counts number of instructions that require decoder 0 to be decoded. +Usually, this means that the instruction maps to more than 1 uop .It Li TWO_UOP_INSTS_DECODED .Pq Event 19H , Umask 01H An instruction that generates two uops was decoded .It Li INST_QUEUE_WRITE_CYCLES .Pq Event 1EH , Umask 01H This event counts the number of cycles during which instructions are written -to the instruction queue. Dividing this counter by the number of +to the instruction queue. +Dividing this counter by the number of instructions written to the instruction queue (INST_QUEUE_WRITES) yields the -average number of instructions decoded each cycle. If this number is less +average number of instructions decoded each cycle. +If this number is less than four and the pipe stalls, this indicates that the decoder is failing to decode enough instructions per cycle to sustain the 4-wide pipeline. If SSE* instructions that are 6 bytes or longer arrive one after another, -then front end throughput may limit execution speed. In such case, +then front end throughput may limit execution speed. +In such case, .It Li LSD_OVERFLOW .Pq Event 20H , Umask 01H Number of loops that can not stream from the instruction queue. .It Li L2_RQSTS.LD_HIT .Pq Event 24H , Umask 01H -Counts number of loads that hit the L2 cache. L2 loads include both L1D -demand misses as well as L1D prefetches. L2 loads can be rejected for -various reasons. Only non rejected loads are counted. +Counts number of loads that hit the L2 cache. +L2 loads include both L1D demand misses as well as L1D prefetches. +L2 loads can be rejected for various reasons. +Only non rejected loads are counted. .It Li L2_RQSTS.LD_MISS .Pq Event 24H , Umask 02H -Counts the number of loads that miss the L2 cache. L2 loads include both L1D -demand misses as well as L1D prefetches. +Counts the number of loads that miss the L2 cache. +L2 loads include both L1D demand misses as well as L1D prefetches. .It Li L2_RQSTS.LOADS .Pq Event 24H , Umask 03H -Counts all L2 load requests. L2 loads include both L1D demand misses as well -as L1D prefetches. +Counts all L2 load requests. +L2 loads include both L1D demand misses as well as L1D prefetches. .It Li L2_RQSTS.RFO_HIT .Pq Event 24H , Umask 04H -Counts the number of store RFO requests that hit the L2 cache. L2 RFO -requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Counts the number of store RFO requests that hit the L2 cache. +L2 RFO requests include both L1D demand RFO misses as well as L1D RFO +prefetches. Count includes WC memory requests, where the data is not fetched but the permission to write the line is required. .It Li L2_RQSTS.RFO_MISS .Pq Event 24H , Umask 08H -Counts the number of store RFO requests that miss the L2 cache. L2 RFO -requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Counts the number of store RFO requests that miss the L2 cache. +L2 RFO requests include both L1D demand RFO misses as well as L1D RFO +prefetches. .It Li L2_RQSTS.RFOS .Pq Event 24H , Umask 0CH -Counts all L2 store RFO requests. L2 RFO requests include both L1D demand +Counts all L2 store RFO requests. +L2 RFO requests include both L1D demand RFO misses as well as L1D RFO prefetches. .It Li L2_RQSTS.IFETCH_HIT .Pq Event 24H , Umask 10H -Counts number of instruction fetches that hit the L2 cache. L2 instruction -fetches include both L1I demand misses as well as L1I instruction -prefetches. +Counts number of instruction fetches that hit the L2 cache. +L2 instruction fetches include both L1I demand misses as well as L1I +instruction prefetches. .It Li L2_RQSTS.IFETCH_MISS .Pq Event 24H , Umask 20H -Counts number of instruction fetches that miss the L2 cache. L2 instruction -fetches include both L1I demand misses as well as L1I instruction -prefetches. +Counts number of instruction fetches that miss the L2 cache. +L2 instruction fetches include both L1I demand misses as well as L1I +instruction prefetches. .It Li L2_RQSTS.IFETCHES .Pq Event 24H , Umask 30H -Counts all instruction fetches. L2 instruction fetches include both L1I +Counts all instruction fetches. +L2 instruction fetches include both L1I demand misses as well as L1I instruction prefetches. .It Li L2_RQSTS.PREFETCH_HIT .Pq Event 24H , Umask 40H @@ -421,26 +437,30 @@ Counts all L2 requests for both code and .It Li L2_DATA_RQSTS.DEMAND.I_STATE .Pq Event 26H , Umask 01H Counts number of L2 data demand loads where the cache line to be loaded is -in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D -demand misses and L1D prefetches. +in the I (invalid) state, i.e. a cache miss. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.S_STATE .Pq Event 26H , Umask 02H Counts number of L2 data demand loads where the cache line to be loaded is -in the S (shared) state. L2 demand loads are both L1D demand misses and L1D +in the S (shared) state. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.E_STATE .Pq Event 26H , Umask 04H Counts number of L2 data demand loads where the cache line to be loaded is -in the E (exclusive) state. L2 demand loads are both L1D demand misses and +in the E (exclusive) state. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.M_STATE .Pq Event 26H , Umask 08H Counts number of L2 data demand loads where the cache line to be loaded is -in the M (modified) state. L2 demand loads are both L1D demand misses and +in the M (modified) state. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.MESI .Pq Event 26H , Umask 0FH -Counts all L2 data demand requests. L2 demand loads are both L1D demand +Counts all L2 data demand requests. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.PREFETCH.I_STATE .Pq Event 26H , Umask 10H @@ -449,7 +469,8 @@ in the I (invalid) state, i.e. a cache m .It Li L2_DATA_RQSTS.PREFETCH.S_STATE .Pq Event 26H , Umask 20H Counts number of L2 prefetch data loads where the cache line to be loaded is -in the S (shared) state. A prefetch RFO will miss on an S state line, while +in the S (shared) state. +A prefetch RFO will miss on an S state line, while a prefetch read will hit on an S state line. .It Li L2_DATA_RQSTS.PREFETCH.E_STATE .Pq Event 26H , Umask 40H @@ -468,23 +489,27 @@ Counts all L2 data requests. .It Li L2_WRITE.RFO.I_STATE .Pq Event 27H , Umask 01H Counts number of L2 demand store RFO requests where the cache line to be -loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher +loaded is in the I (invalid) state, i.e, a cache miss. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request .It Li L2_WRITE.RFO.S_STATE .Pq Event 27H , Umask 02H Counts number of L2 store RFO requests where the cache line to be loaded is -in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch. +in the S (shared) state. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request. .It Li L2_WRITE.RFO.M_STATE .Pq Event 27H , Umask 08H Counts number of L2 store RFO requests where the cache line to be loaded is -in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. +in the M (modified) state. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request. .It Li L2_WRITE.RFO.HIT .Pq Event 27H , Umask 0EH Counts number of L2 store RFO requests where the cache line to be loaded is -in either the S, E or M states. The L1D prefetcher does not issue a RFO +in either the S, E or M states. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request .It Li L2_WRITE.RFO.MESI @@ -536,21 +561,23 @@ is in the M (modified) state. Counts all L1 writebacks to the L2. .It Li L3_LAT_CACHE.REFERENCE .Pq Event 2EH , Umask 02H -Counts uncore Last Level Cache references. Because cache hierarchy, cache +Counts uncore Last Level Cache references. +Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. See Table A-1. .It Li L3_LAT_CACHE.MISS .Pq Event 2EH , Umask 01H -Counts uncore Last Level Cache misses. Because cache hierarchy, cache sizes +Counts uncore Last Level Cache misses. +Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. See Table A-1. .It Li CPU_CLK_UNHALTED.THREAD_P .Pq Event 3CH , Umask 00H Counts the number of thread cycles while the thread is not in a halt state. -The thread enters the halt state when it is running the HLT instruction. The -core frequency may change from time to time due to power or thermal +The thread enters the halt state when it is running the HLT instruction. +The core frequency may change from time to time due to power or thermal throttling. see Table A-1 .It Li CPU_CLK_UNHALTED.REF_P @@ -569,7 +596,8 @@ Counts cycles of page walk due to misses .It Li DTLB_MISSES.STLB_HIT .Pq Event 49H , Umask 10H Counts the number of DTLB first level misses that hit in the second level -TLB. This event is only relevant if the core contains multiple DTLB levels. +TLB. +This event is only relevant if the core contains multiple DTLB levels. .It Li DTLB_MISSES.LARGE_WALK_COMPLETED .Pq Event 49H , Umask 80H Counts number of completed large page walks due to misses in the STLB. @@ -584,17 +612,22 @@ Counts number of hardware prefetch reque FIFO. .It Li L1D_PREFETCH.MISS .Pq Event 4EH , Umask 02H -Counts number of hardware prefetch requests that miss the L1D. There are two -prefetchers in the L1D. A streamer, which predicts lines sequentially after +Counts number of hardware prefetch requests that miss the L1D. +There are two +prefetchers in the L1D. +A streamer, which predicts lines sequentially after this one should be fetched, and the IP prefetcher that remembers access -patterns for the current instruction. The streamer prefetcher stops on an +patterns for the current instruction. +The streamer prefetcher stops on an L1D hit, while the IP prefetcher does not. .It Li L1D_PREFETCH.TRIGGERS .Pq Event 4EH , Umask 04H Counts number of prefetch requests triggered by the Finite State Machine and -pushed into the prefetch FIFO. Some of the prefetch requests are dropped due +pushed into the prefetch FIFO. +Some of the prefetch requests are dropped due to overwrites or competition between the IP index prefetcher and streamer -prefetcher. The prefetch FIFO contains 4 entries. +prefetcher. +The prefetch FIFO contains 4 entries. .It Li EPT.WALK_CYCLES .Pq Event 4FH , Umask 10H Counts Extended Page walk cycles. @@ -626,31 +659,33 @@ Counts the number of cacheable load lock accepted into the fill buffer. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_DATA .Pq Event 60H , Umask 01H -Counts weighted cycles of offcore demand data read requests. Does not -include L2 prefetch requests. +Counts weighted cycles of offcore demand data read requests. +Does not include L2 prefetch requests. Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_CODE .Pq Event 60H , Umask 02H -Counts weighted cycles of offcore demand code read requests. Does not -include L2 prefetch requests. +Counts weighted cycles of offcore demand code read requests. +Does not include L2 prefetch requests. Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.RFO .Pq Event 60H , Umask 04H -Counts weighted cycles of offcore demand RFO requests. Does not include L2 -prefetch requests. +Counts weighted cycles of offcore demand RFO requests. +Does not include L2 prefetch requests. Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.ANY.READ .Pq Event 60H , Umask 08H -Counts weighted cycles of offcore read requests of any kind. Include L2 -prefetch requests. +Counts weighted cycles of offcore read requests of any kind. +Include L2 prefetch requests. Counter 0. .It Li CACHE_LOCK_CYCLES.L1D_L2 .Pq Event 63H , Umask 01H -Cycle count during which the L1D and L2 are locked. A lock is asserted when +Cycle count during which the L1D and L2 are locked. +A lock is asserted when there is a locked memory access, due to uncacheable memory, a locked operation that spans two cache lines, or a page walk from an uncacheable page table. -Counter 0, 1 only. L1D and L2 locks have a very high performance penalty and +Counter 0, 1 only. +L1D and L2 locks have a very high performance penalty and it is highly recommended to avoid such accesses. .It Li CACHE_LOCK_CYCLES.L1D .Pq Event 63H , Umask 02H @@ -665,9 +700,11 @@ Counts the number of completed I/O trans Counts all instruction fetches that hit the L1 instruction cache. .It Li L1I.MISSES .Pq Event 80H , Umask 02H -Counts all instruction fetches that miss the L1I cache. This includes +Counts all instruction fetches that miss the L1I cache. +This includes instruction cache misses, streaming buffer misses, victim cache misses and -uncacheable fetches. An instruction fetch miss is counted only once and not +uncacheable fetches. +An instruction fetch miss is counted only once and not once for every cycle it is outstanding. .It Li L1I.READS .Pq Event 80H , Umask 03H @@ -747,10 +784,10 @@ Counts all near call branches executed, Counts taken near branches executed, but not necessarily retired. .It Li BR_INST_EXEC.ANY .Pq Event 88H , Umask 7FH -Counts all near executed branches (not necessarily retired). This includes -only instructions and not micro-op branches. Frequent branching is not -necessarily a major performance issue. However frequent branch -mispredictions may be a problem. +Counts all near executed branches (not necessarily retired). +This includes only instructions and not micro-op branches. +Frequent branching is not necessarily a major performance issue. +However frequent branch mispredictions may be a problem. .It Li BR_MISP_EXEC.COND .Pq Event 89H , Umask 01H Counts the number of mispredicted conditional near branch instructions @@ -791,9 +828,10 @@ Counts the number of mispredicted near b executed, but not necessarily retired. .It Li RESOURCE_STALLS.ANY .Pq Event A2H , Umask 01H -Counts the number of Allocator resource related stalls. Includes register -renaming buffer entries, memory buffer entries. In addition to resource -related stalls, this event counts some other events. Includes stalls arising +Counts the number of Allocator resource related stalls. +Includes register renaming buffer entries, memory buffer entries. +In addition to resource related stalls, this event counts some other events. +Includes stalls arising during branch misprediction recovery, such as if retirement of the mispredicted branch is delayed and stalls arising while store buffer is draining from synchronizing operations. @@ -806,7 +844,8 @@ Counts the cycles of stall due to lack o .Pq Event A2H , Umask 04H This event counts the number of cycles when the number of instructions in the pipeline waiting for execution reaches the limit the processor can -handle. A high count of this event indicates that there are long latency +handle. +A high count of this event indicates that there are long latency operations in the pipe (possibly load and store operations that miss the L2 cache, or instructions dependent upon instructions further down the pipeline that have yet to retire. @@ -816,7 +855,8 @@ start execution. .Pq Event A2H , Umask 08H This event counts the number of cycles that a resource related stall will occur due to the number of store instructions reaching the limit of the -pipeline, (i.e. all store buffers are used). The stall ends when a store +pipeline, (i.e. all store buffers are used). +The stall ends when a store instruction commits its data to the cache or memory. .It Li RESOURCE_STALLS.ROB_FULL .Pq Event A2H , Umask 10H @@ -828,7 +868,8 @@ floating-point unit (FPU) control word. .It Li RESOURCE_STALLS.MXCSR .Pq Event A2H , Umask 40H Stalls due to the MXCSR register rename occurring to close to a previous -MXCSR rename. The MXCSR provides control and status for the MMX registers. +MXCSR rename. +The MXCSR provides control and status for the MMX registers. .It Li RESOURCE_STALLS.OTHER .Pq Event A2H , Umask 80H Counts the number of cycles while execution was stalled due to other @@ -839,12 +880,14 @@ Counts the number of instructions decode necessarily executed or retired. .It Li BACLEAR_FORCE_IQ .Pq Event A7H , Umask 01H -Counts number of times a BACLEAR was forced by the Instruction Queue. The IQ -is also responsible for providing conditional branch prediction direction -based on a static scheme and dynamic data provided by the L2 Branch -Prediction Unit. If the conditional branch target is not found in the Target +Counts number of times a BACLEAR was forced by the Instruction Queue. +The IQ is also responsible for providing conditional branch prediction +direction based on a static scheme and dynamic data provided by the L2 +Branch Prediction Unit. +If the conditional branch target is not found in the Target Array and the IQ predicts that the branch is taken, then the IQ will force -the Branch Address Calculator to issue a BACLEAR. Each BACLEAR asserted by +the Branch Address Calculator to issue a BACLEAR. +Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble in the instruction fetch pipeline. .It Li LSD.UOPS @@ -856,22 +899,24 @@ Use cmask=1 and invert to count cycles Counts the number of ITLB flushes .It Li OFFCORE_REQUESTS.DEMAND.READ_DATA .Pq Event B0H , Umask 01H -Counts number of offcore demand data read requests. Does not count L2 -prefetch requests. +Counts number of offcore demand data read requests. +Does not count L2 prefetch requests. .It Li OFFCORE_REQUESTS.DEMAND.READ_CODE .Pq Event B0H , Umask 02H -Counts number of offcore demand code read requests. Does not count L2 -prefetch requests. +Counts number of offcore demand code read requests. +Does not count L2 prefetch requests. .It Li OFFCORE_REQUESTS.DEMAND.RFO .Pq Event B0H , Umask 04H -Counts number of offcore demand RFO requests. Does not count L2 prefetch -requests. +Counts number of offcore demand RFO requests. +Does not count L2 prefetch requests. .It Li OFFCORE_REQUESTS.ANY.READ .Pq Event B0H , Umask 08H -Counts number of offcore read requests. Includes L2 prefetch requests. +Counts number of offcore read requests. +Includes L2 prefetch requests. .It Li OFFCORE_REQUESTS.ANY.RFO .Pq Event 80H , Umask 10H -Counts number of offcore RFO requests. Includes L2 prefetch requests. +Counts number of offcore RFO requests. +Includes L2 prefetch requests. .It Li OFFCORE_REQUESTS.L1D_WRITEBACK .Pq Event B0H , Umask 40H Counts number of L1D writebacks to the uncore. @@ -880,38 +925,42 @@ Counts number of L1D writebacks to the u Counts all offcore requests. .It Li UOPS_EXECUTED.PORT0 .Pq Event B1H , Umask 01H -Counts number of Uops executed that were issued on port 0. Port 0 handles -integer arithmetic, SIMD and FP add Uops. +Counts number of Uops executed that were issued on port 0. +Port 0 handles integer arithmetic, SIMD and FP add Uops. .It Li UOPS_EXECUTED.PORT1 .Pq Event B1H , Umask 02H -Counts number of Uops executed that were issued on port 1. Port 1 handles -integer arithmetic, SIMD, integer shift, FP multiply and FP divide Uops. +Counts number of Uops executed that were issued on port 1. +Port 1 handles integer arithmetic, SIMD, integer shift, FP multiply and +FP divide Uops. .It Li UOPS_EXECUTED.PORT2_CORE .Pq Event B1H , Umask 04H -Counts number of Uops executed that were issued on port 2. Port 2 handles -the load Uops. This is a core count only and can not be collected per +Counts number of Uops executed that were issued on port 2. +Port 2 handles the load Uops. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT3_CORE .Pq Event B1H , Umask 08H -Counts number of Uops executed that were issued on port 3. Port 3 handles -store Uops. This is a core count only and can not be collected per thread. +Counts number of Uops executed that were issued on port 3. +Port 3 handles store Uops. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT4_CORE .Pq Event B1H , Umask 10H -Counts number of Uops executed that where issued on port 4. Port 4 handles -the value to be stored for the store Uops issued on port 3. This is a core -count only and can not be collected per thread. +Counts number of Uops executed that where issued on port 4. +Port 4 handles the value to be stored for the store Uops issued on port 3. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.CORE_ACTIVE_CYCLES_NO_PORT5 .Pq Event B1H , Umask 1FH Counts number of cycles there are one or more uops being executed and were -issued on ports 0-4. This is a core count only and can not be collected per -thread. +issued on ports 0-4. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT5 .Pq Event B1H , Umask 20H Counts number of Uops executed that where issued on port 5. .It Li UOPS_EXECUTED.CORE_ACTIVE_CYCLES .Pq Event B1H , Umask 3FH Counts number of cycles there are one or more uops being executed on any -ports. This is a core count only and can not be collected per thread. +ports. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT015 .Pq Event B1H , Umask 40H Counts number of Uops executed that where issued on port 0, 1, or 5. @@ -924,15 +973,18 @@ Counts number of Uops executed that wher Counts number of cycles the SQ is full to handle off-core requests. .It Li SNOOPQ_REQUESTS_OUTSTANDING.DATA .Pq Event B3H , Umask 01H -Counts weighted cycles of snoopq requests for data. Counter 0 only +Counts weighted cycles of snoopq requests for data. +Counter 0 only Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.INVALIDATE .Pq Event B3H , Umask 02H -Counts weighted cycles of snoopq invalidate requests. Counter 0 only. +Counts weighted cycles of snoopq invalidate requests. +Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.CODE .Pq Event B3H , Umask 04H -Counts weighted cycles of snoopq requests for code. Counter 0 only. +Counts weighted cycles of snoopq requests for code. +Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS.CODE .Pq Event B4H , Umask 01H @@ -970,7 +1022,8 @@ Use MSR 01A7H. See Table A-1 Notes: INST_RETIRED.ANY is counted by a designated fixed counter. INST_RETIRED.ANY_P is counted by a programmable counter and is an -architectural performance event. Event is supported if CPUID.A.EBX[1] = 0. +architectural performance event. +Event is supported if CPUID.A.EBX[1] = 0. Counting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions. .It Li INST_RETIRED.X87 @@ -985,8 +1038,9 @@ Counts the number of retired: MMX instru .It Li UOPS_RETIRED.ANY .Pq Event C2H , Umask 01H Counts the number of micro-ops retired, (macro-fused=1, micro- fused=2, -others=1; maximum count of 8 per cycle). Most instructions are composed of -one or two micro-ops. Some instructions are decoded into longer sequences +others=1; maximum count of 8 per cycle). +Most instructions are composed of one or two micro-ops. +Some instructions are decoded into longer sequences such as repeat instructions, floating point transcendental instructions, and assists. Use cmask=1 and invert to count active cycles or stalled cycles @@ -1006,7 +1060,8 @@ Counts the number of machine clears due .Pq Event C3H , Umask 04H Counts the number of times that a program writes to a code section. Self-modifying code causes a sever penalty in all Intel 64 and IA-32 -processors. The modified cache line is written back to the L2 and L3caches. +processors. +The modified cache line is written back to the L2 and L3caches. .It Li BR_INST_RETIRED.ANY_P .Pq Event C4H , Umask 00H See Table A-1. @@ -1063,23 +1118,25 @@ cache. .It Li MEM_LOAD_RETIRED.OTHER_CORE_L2_HIT_HITM .Pq Event CBH , Umask 08H Counts number of retired loads that hit in a sibling core's L2 (on die -core). Since the L3 is inclusive of all cores on the package, this is an L3 -hit. This counts both clean or modified hits. +core). +Since the L3 is inclusive of all cores on the package, this is an L3 hit. +This counts both clean or modified hits. .It Li MEM_LOAD_RETIRED.L3_MISS .Pq Event CBH , Umask 10H -Counts number of retired loads that miss the L3 cache. The load was -satisfied by a remote socket, local memory or an IOH. +Counts number of retired loads that miss the L3 cache. +The load was satisfied by a remote socket, local memory or an IOH. .It Li MEM_LOAD_RETIRED.HIT_LFB .Pq Event CBH , Umask 40H Counts number of retired loads that miss the L1D and the address is located -in an allocated line fill buffer and will soon be committed to cache. This -is counting secondary L1D misses. +in an allocated line fill buffer and will soon be committed to cache. +This is counting secondary L1D misses. .It Li MEM_LOAD_RETIRED.DTLB_MISS .Pq Event CBH , Umask 80H -Counts the number of retired loads that missed the DTLB. The DTLB miss is -not counted if the load operation causes a fault. This event counts loads -from cacheable memory only. The event does not count loads by software -prefetches. Counts both primary and secondary misses to the TLB. +Counts the number of retired loads that missed the DTLB. +The DTLB miss is not counted if the load operation causes a fault. +This event counts loads from cacheable memory only. +The event does not count loads by software prefetches. +Counts both primary and secondary misses to the TLB. .It Li FP_MMX_TRANS.TO_FP .Pq Event CCH , Umask 01H Counts the first floating-point instruction following any MMX instruction. @@ -1087,15 +1144,15 @@ You can use this event to estimate the p floating-point and MMX technology states. .It Li FP_MMX_TRANS.TO_MMX .Pq Event CCH , Umask 02H -Counts the first MMX instruction following a floating-point instruction. You -can use this event to estimate the penalties for the transitions between +Counts the first MMX instruction following a floating-point instruction. +You can use this event to estimate the penalties for the transitions between floating-point and MMX technology states. .It Li FP_MMX_TRANS.ANY .Pq Event CCH , Umask 03H Counts all transitions from floating point to MMX instructions and from MMX -instructions to floating point instructions. You can use this event to -estimate the penalties for the transitions between floating-point and MMX -technology states. +instructions to floating point instructions. +You can use this event to estimate the penalties for the transitions between +floating-point and MMX technology states. .It Li MACRO_INSTS.DECODED .Pq Event D0H , Umask 01H Counts the number of instructions decoded, (but not necessarily executed or @@ -1105,14 +1162,15 @@ retired). Counts the cycles of decoder stalls. .It Li UOPS_DECODED.MS .Pq Event D1H , Umask 02H -Counts the number of Uops decoded by the Microcode Sequencer, MS. The MS -delivers uops when the instruction is more than 4 uops long or a microcode -assist is occurring. +Counts the number of Uops decoded by the Microcode Sequencer, MS. +The MS delivers uops when the instruction is more than 4 uops long or a +microcode assist is occurring. .It Li UOPS_DECODED.ESP_FOLDING .Pq Event D1H , Umask 04H Counts number of stack pointer (ESP) instructions decoded: push , pop , call , ret, etc. ESP instructions do not generate a Uop to increment or decrement -ESP. Instead, they update an ESP_Offset register that keeps track of the +ESP. +Instead, they update an ESP_Offset register that keeps track of the delta to the current value of the ESP register. .It Li UOPS_DECODED.ESP_SYNC .Pq Event D1H , Umask 08H @@ -1122,7 +1180,8 @@ value of the ESP register. .It Li RAT_STALLS.FLAGS .Pq Event D2H , Umask 01H Counts the number of cycles during which execution stalled due to several -reasons, one of which is a partial flag register stall. A partial register +reasons, one of which is a partial flag register stall. +A partial register stall may occur when two conditions are met: 1) an instruction modifies some, but not all, of the flags in the flag register and 2) the next instruction, which depends on flags, depends on flags that were not modified @@ -1135,28 +1194,34 @@ was partially written by previous instru .It Li RAT_STALLS.ROB_READ_PORT .Pq Event D2H , Umask 04H Counts the number of cycles when ROB read port stalls occurred, which did -not allow new micro-ops to enter the out-of-order pipeline. Note that, at +not allow new micro-ops to enter the out-of-order pipeline. +Note that, at this stage in the pipeline, additional stalls may occur at the same cycle -and prevent the stalled micro-ops from entering the pipe. In such a case, +and prevent the stalled micro-ops from entering the pipe. +In such a case, micro-ops retry entering the execution pipe in the next cycle and the ROB-read port stall is counted again. .It Li RAT_STALLS.SCOREBOARD .Pq Event D2H , Umask 08H Counts the cycles where we stall due to microarchitecturally required -serialization. Microcode scoreboarding stalls. +serialization. +Microcode scoreboarding stalls. .It Li RAT_STALLS.ANY .Pq Event D2H , Umask 0FH Counts all Register Allocation Table stall cycles due to: Cycles when ROB read port stalls occurred, which did not allow new micro-ops to enter the -execution pipe. Cycles when partial register stalls occurred Cycles when +execution pipe. +Cycles when partial register stalls occurred Cycles when flag stalls occurred Cycles floating-point unit (FPU) status word stalls -occurred. To count each of these conditions separately use the events: +occurred. +To count each of these conditions separately use the events: RAT_STALLS.ROB_READ_PORT, RAT_STALLS.PARTIAL, RAT_STALLS.FLAGS, and RAT_STALLS.FPSW. .It Li SEG_RENAME_STALLS .Pq Event D4H , Umask 01H Counts the number of stall cycles due to the lack of renaming resources for -the ES, DS, FS, and GS segment registers. If a segment is renamed but not +the ES, DS, FS, and GS segment registers. +If a segment is renamed but not retired and a second update to the same segment occurs, a stall occurs in the front- end of the pipeline until the renamed segment retires. .It Li ES_REG_RENAMES @@ -1176,16 +1241,18 @@ or return branch. .Pq Event E6H , Umask 01H Counts the number of times the front end is resteered, mainly when the Branch Prediction Unit cannot provide a correct prediction and this is -corrected by the Branch Address Calculator at the front end. This can occur +corrected by the Branch Address Calculator at the front end. +This can occur if the code has many branches such that they cannot be consumed by the BPU. Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble -in the instruction fetch pipeline. The effect on total execution time -depends on the surrounding code. +in the instruction fetch pipeline. +The effect on total execution time depends on the surrounding code. .It Li BACLEAR.BAD_TARGET .Pq Event E6H , Umask 02H Counts number of Branch Address Calculator clears (BACLEAR) asserted due to conditional branch instructions in which there was a target hit but the -direction was wrong. Each BACLEAR asserted by the BAC generates +direction was wrong. +Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble in the instruction fetch pipeline. .It Li BPU_CLEARS.EARLY .Pq Event E8H , Umask 01H @@ -1195,7 +1262,8 @@ The BPU clear leads to 2 cycle bubble in .It Li BPU_CLEARS.LATE .Pq Event E8H , Umask 02H Counts late Branch Prediction Unit clears due to Most Recently Used -conflicts. The PBU clear leads to a 3 cycle bubble in the Front End. +conflicts. +The PBU clear leads to a 3 cycle bubble in the Front End. .It Li THREAD_ACTIVE .Pq Event ECH , Umask 01H Counts cycles threads are active. @@ -1258,12 +1326,13 @@ Counts number of Super Queue LRU hints s Counts the number of SQ lock splits across a cache line. .It Li SQ_FULL_STALL_CYCLES .Pq Event F6H , Umask 01H -Counts cycles the Super Queue is full. Neither of the threads on this core -will be able to access the uncore. +Counts cycles the Super Queue is full. +Neither of the threads on this core will be able to access the uncore. .It Li FP_ASSIST.ALL .Pq Event F7H , Umask 01H Counts the number of floating point operations executed that required -micro-code assist intervention. Assists are required in the following cases: +micro-code assist intervention. +Assists are required in the following cases: SSE instructions, (Denormal input when the DAZ flag is off or Underflow result when the FTZ flag is off): x87 instructions, (NaN or denormal are loaded to a register or used as input from memory, Division by 0 or From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 17:49:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4D6B106564A; Sat, 25 Feb 2012 17:49:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96CDD8FC08; Sat, 25 Feb 2012 17:49:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PHnxgx027527; Sat, 25 Feb 2012 17:49:59 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PHnx9E027525; Sat, 25 Feb 2012 17:49:59 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201202251749.q1PHnx9E027525@svn.freebsd.org> From: Alan Cox Date: Sat, 25 Feb 2012 17:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232160 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 17:49:59 -0000 Author: alc Date: Sat Feb 25 17:49:59 2012 New Revision: 232160 URL: http://svn.freebsd.org/changeset/base/232160 Log: Simplify vmspace_fork()'s control flow by copying immutable data before the vm map locks are acquired. Also, eliminate redundant initialization of the new vm map's timestamp. Reviewed by: kib MFC after: 3 weeks Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Feb 25 16:02:12 2012 (r232159) +++ head/sys/vm/vm_map.c Sat Feb 25 17:49:59 2012 (r232160) @@ -3082,27 +3082,25 @@ struct vmspace * vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_charge) { struct vmspace *vm2; - vm_map_t old_map = &vm1->vm_map; - vm_map_t new_map; - vm_map_entry_t old_entry; - vm_map_entry_t new_entry; + vm_map_t new_map, old_map; + vm_map_entry_t new_entry, old_entry; vm_object_t object; int locked; - vm_map_lock(old_map); - if (old_map->busy) - vm_map_wait_busy(old_map); - new_map = NULL; /* silence gcc */ + old_map = &vm1->vm_map; + /* Copy immutable fields of vm1 to vm2. */ vm2 = vmspace_alloc(old_map->min_offset, old_map->max_offset); if (vm2 == NULL) - goto unlock_and_return; + return (NULL); vm2->vm_taddr = vm1->vm_taddr; vm2->vm_daddr = vm1->vm_daddr; vm2->vm_maxsaddr = vm1->vm_maxsaddr; - new_map = &vm2->vm_map; /* XXX */ + vm_map_lock(old_map); + if (old_map->busy) + vm_map_wait_busy(old_map); + new_map = &vm2->vm_map; locked = vm_map_trylock(new_map); /* trylock to silence WITNESS */ KASSERT(locked, ("vmspace_fork: lock failed")); - new_map->timestamp = 1; old_entry = old_map->header.next; @@ -3223,15 +3221,13 @@ vmspace_fork(struct vmspace *vm1, vm_oof } old_entry = old_entry->next; } -unlock_and_return: /* * Use inlined vm_map_unlock() to postpone handling the deferred * map entries, which cannot be done until both old_map and * new_map locks are released. */ sx_xunlock(&old_map->lock); - if (vm2 != NULL) - sx_xunlock(&new_map->lock); + sx_xunlock(&new_map->lock); vm_map_process_deferred(); return (vm2); From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 18:48:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AAAB106564A; Sat, 25 Feb 2012 18:48:07 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 800118FC13; Sat, 25 Feb 2012 18:48:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PIm7MU029529; Sat, 25 Feb 2012 18:48:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PIm7wX029498; Sat, 25 Feb 2012 18:48:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201202251848.q1PIm7wX029498@svn.freebsd.org> From: Christian Brueffer Date: Sat, 25 Feb 2012 18:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232162 - stable/8/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 18:48:07 -0000 Author: brueffer Date: Sat Feb 25 18:48:06 2012 New Revision: 232162 URL: http://svn.freebsd.org/changeset/base/232162 Log: MFC: r231871 Switch the license boilerplates to our standard one. Advantages: - Reduces the number of different license versions in the tree - Eliminates a typo - Removes some incorrect author attributions due to c/p - Removes c/p error potential for future pmc manpages Approved by: re (kib), jkoshy, gnn, rpaulo, fabient (copyright holders) Modified: stable/8/lib/libpmc/pmc.3 stable/8/lib/libpmc/pmc.atom.3 stable/8/lib/libpmc/pmc.core.3 stable/8/lib/libpmc/pmc.core2.3 stable/8/lib/libpmc/pmc.corei7.3 stable/8/lib/libpmc/pmc.corei7uc.3 stable/8/lib/libpmc/pmc.iaf.3 stable/8/lib/libpmc/pmc.k7.3 stable/8/lib/libpmc/pmc.k8.3 stable/8/lib/libpmc/pmc.p4.3 stable/8/lib/libpmc/pmc.p5.3 stable/8/lib/libpmc/pmc.p6.3 stable/8/lib/libpmc/pmc.tsc.3 stable/8/lib/libpmc/pmc.ucf.3 stable/8/lib/libpmc/pmc.westmere.3 stable/8/lib/libpmc/pmc.westmereuc.3 stable/8/lib/libpmc/pmc_allocate.3 stable/8/lib/libpmc/pmc_attach.3 stable/8/lib/libpmc/pmc_capabilities.3 stable/8/lib/libpmc/pmc_configure_logfile.3 stable/8/lib/libpmc/pmc_disable.3 stable/8/lib/libpmc/pmc_event_names_of_class.3 stable/8/lib/libpmc/pmc_get_driver_stats.3 stable/8/lib/libpmc/pmc_get_msr.3 stable/8/lib/libpmc/pmc_init.3 stable/8/lib/libpmc/pmc_name_of_capability.3 stable/8/lib/libpmc/pmc_read.3 stable/8/lib/libpmc/pmc_set.3 stable/8/lib/libpmc/pmc_start.3 stable/8/lib/libpmc/pmclog.3 Directory Properties: stable/8/lib/libpmc/ (props changed) Modified: stable/8/lib/libpmc/pmc.3 ============================================================================== --- stable/8/lib/libpmc/pmc.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.atom.3 ============================================================================== --- stable/8/lib/libpmc/pmc.atom.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.atom.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.core.3 ============================================================================== --- stable/8/lib/libpmc/pmc.core.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.core.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.core2.3 ============================================================================== --- stable/8/lib/libpmc/pmc.core2.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.core2.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.corei7.3 ============================================================================== --- stable/8/lib/libpmc/pmc.corei7.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.corei7.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.corei7uc.3 ============================================================================== --- stable/8/lib/libpmc/pmc.corei7uc.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.corei7uc.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.iaf.3 ============================================================================== --- stable/8/lib/libpmc/pmc.iaf.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.iaf.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.k7.3 ============================================================================== --- stable/8/lib/libpmc/pmc.k7.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.k7.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.k8.3 ============================================================================== --- stable/8/lib/libpmc/pmc.k8.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.k8.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.p4.3 ============================================================================== --- stable/8/lib/libpmc/pmc.p4.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.p4.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.p5.3 ============================================================================== --- stable/8/lib/libpmc/pmc.p5.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.p5.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.p6.3 ============================================================================== --- stable/8/lib/libpmc/pmc.p6.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.p6.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.tsc.3 ============================================================================== --- stable/8/lib/libpmc/pmc.tsc.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.tsc.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.ucf.3 ============================================================================== --- stable/8/lib/libpmc/pmc.ucf.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.ucf.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.westmere.3 ============================================================================== --- stable/8/lib/libpmc/pmc.westmere.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.westmere.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc.westmereuc.3 ============================================================================== --- stable/8/lib/libpmc/pmc.westmereuc.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc.westmereuc.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_allocate.3 ============================================================================== --- stable/8/lib/libpmc/pmc_allocate.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_allocate.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_attach.3 ============================================================================== --- stable/8/lib/libpmc/pmc_attach.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_attach.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_capabilities.3 ============================================================================== --- stable/8/lib/libpmc/pmc_capabilities.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_capabilities.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_configure_logfile.3 ============================================================================== --- stable/8/lib/libpmc/pmc_configure_logfile.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_configure_logfile.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_disable.3 ============================================================================== --- stable/8/lib/libpmc/pmc_disable.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_disable.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_event_names_of_class.3 ============================================================================== --- stable/8/lib/libpmc/pmc_event_names_of_class.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_event_names_of_class.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_get_driver_stats.3 ============================================================================== --- stable/8/lib/libpmc/pmc_get_driver_stats.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_get_driver_stats.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_get_msr.3 ============================================================================== --- stable/8/lib/libpmc/pmc_get_msr.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_get_msr.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_init.3 ============================================================================== --- stable/8/lib/libpmc/pmc_init.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_init.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_name_of_capability.3 ============================================================================== --- stable/8/lib/libpmc/pmc_name_of_capability.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_name_of_capability.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_read.3 ============================================================================== --- stable/8/lib/libpmc/pmc_read.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_read.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_set.3 ============================================================================== --- stable/8/lib/libpmc/pmc_set.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_set.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmc_start.3 ============================================================================== --- stable/8/lib/libpmc/pmc_start.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmc_start.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" Modified: stable/8/lib/libpmc/pmclog.3 ============================================================================== --- stable/8/lib/libpmc/pmclog.3 Sat Feb 25 18:24:45 2012 (r232161) +++ stable/8/lib/libpmc/pmclog.3 Sat Feb 25 18:48:06 2012 (r232162) @@ -9,17 +9,17 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR 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. .\" .\" $FreeBSD$ .\" From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 19:12:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F462106566C; Sat, 25 Feb 2012 19:12:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE3FE8FC08; Sat, 25 Feb 2012 19:12:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PJCsJa030295; Sat, 25 Feb 2012 19:12:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PJCsOp030292; Sat, 25 Feb 2012 19:12:54 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202251912.q1PJCsOp030292@svn.freebsd.org> From: Adrian Chadd Date: Sat, 25 Feb 2012 19:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232163 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 19:12:55 -0000 Author: adrian Date: Sat Feb 25 19:12:54 2012 New Revision: 232163 URL: http://svn.freebsd.org/changeset/base/232163 Log: Attempt to further fix some of the concurrency/reset issues that occur. * ath_reset() is being called in softclock context, which may have the thing sleep on a lock. To avoid this, since we really _shouldn't_ be sleeping on any locks, break out the no-loss reset path into a tasklet and call that from: + ath_calibrate() + ath_watchdog() This has the added advantage that it'll end up also doing the frame RX cleanup from within the taskqueue context, rather than the softclock context. * Shuffle around the taskqueue_block() call to be before we grab the lock and disable interrupts. The trouble here is that taskqueue_block() doesn't block currently queued (but not yet running) tasks so calling it doesn't guarantee no further tasks (that weren't running on _A_ CPU at the time of this call) will complete. Calling taskqueue_drain() on these tasks won't work because if any _other_ thread calls taskqueue_enqueue() for whatever reason, everything gets very angry and stops working. This slightly changes the race condition enough to let ath_rx_tasklet() run before we try disabling it, and thus quietens the warnings a bit. The (more) true solution will be doing something like the following: * having a taskqueue_blocked mask in ath_softc; * having an interrupt_blocked mask in ath_softc; * only calling taskqueue_drain() on each individual task _after_ the lock has been acquired - that way no further tasklet scheduling is going to occur. * Then once the tasks have been blocked _and_ the interrupt has been disabled, call taskqueue_drain() on each, ensuring that anything that _was_ scheduled or running is removed. The trouble is if something calls taskqueue_enqueue() on a task after taskqueue_blocked() has been called but BEFORE taskqueue_drain() has been called, ta_pending will be set to 1 and taskqueue_drain() will sit there stuck in msleep() until you hard-kill the machine. PR: kern/165382 PR: kern/165220 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Feb 25 18:48:06 2012 (r232162) +++ head/sys/dev/ath/if_ath.c Sat Feb 25 19:12:54 2012 (r232163) @@ -159,6 +159,7 @@ static void ath_beacon_proc(void *, int) static struct ath_buf *ath_beacon_generate(struct ath_softc *, struct ieee80211vap *); static void ath_bstuck_proc(void *, int); +static void ath_reset_proc(void *, int); static void ath_beacon_return(struct ath_softc *, struct ath_buf *); static void ath_beacon_free(struct ath_softc *); static void ath_beacon_config(struct ath_softc *, struct ieee80211vap *); @@ -392,6 +393,7 @@ ath_attach(u_int16_t devid, struct ath_s TASK_INIT(&sc->sc_rxtask, 0, ath_rx_tasklet, sc); TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc); TASK_INIT(&sc->sc_bstucktask,0, ath_bstuck_proc, sc); + TASK_INIT(&sc->sc_resettask,0, ath_reset_proc, sc); /* * Allocate hardware transmit queues: one queue for @@ -1910,9 +1912,6 @@ ath_txrx_stop_locked(struct ath_softc *s ATH_UNLOCK_ASSERT(sc); ATH_PCU_LOCK_ASSERT(sc); - /* Stop any new TX/RX from occuring */ - taskqueue_block(sc->sc_tq); - /* * Sleep until all the pending operations have completed. * @@ -2050,6 +2049,9 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T ATH_PCU_UNLOCK_ASSERT(sc); ATH_UNLOCK_ASSERT(sc); + /* Try to (stop any further TX/RX from occuring */ + taskqueue_block(sc->sc_tq); + ATH_PCU_LOCK(sc); ath_hal_intrset(ah, 0); /* disable interrupts */ ath_txrx_stop_locked(sc); /* Ensure TX/RX is stopped */ @@ -3163,6 +3165,23 @@ ath_beacon_start_adhoc(struct ath_softc } /* + * Reset the hardware, with no loss. + * + * This can't be used for a general case reset. + */ +static void +ath_reset_proc(void *arg, int pending) +{ + struct ath_softc *sc = arg; + struct ifnet *ifp = sc->sc_ifp; + +#if 0 + if_printf(ifp, "%s: resetting\n", __func__); +#endif + ath_reset(ifp, ATH_RESET_NOLOSS); +} + +/* * Reset the hardware after detecting beacons have stopped. */ static void @@ -5387,6 +5406,12 @@ ath_chan_set(struct ath_softc *sc, struc int ret = 0; /* Treat this as an interface reset */ + ATH_PCU_UNLOCK_ASSERT(sc); + ATH_UNLOCK_ASSERT(sc); + + /* (Try to) stop TX/RX from occuring */ + taskqueue_block(sc->sc_tq); + ATH_PCU_LOCK(sc); ath_hal_intrset(ah, 0); /* Stop new RX/TX completion */ ath_txrx_stop_locked(sc); /* Stop pending RX/TX completion */ @@ -5526,18 +5551,10 @@ ath_calibrate(void *arg) DPRINTF(sc, ATH_DEBUG_CALIBRATE, "%s: rfgain change\n", __func__); sc->sc_stats.ast_per_rfgain++; - /* - * Drop lock - we can't hold it across the - * ath_reset() call. Instead, we'll drop - * out here, do a reset, then reschedule - * the callout. - */ - callout_reset(&sc->sc_cal_ch, 1, ath_calibrate, sc); sc->sc_resetcal = 0; sc->sc_doresetcal = AH_TRUE; - ATH_UNLOCK(sc); - ath_reset(ifp, ATH_RESET_NOLOSS); - ATH_LOCK(sc); + taskqueue_enqueue(sc->sc_tq, &sc->sc_resettask); + callout_reset(&sc->sc_cal_ch, 1, ath_calibrate, sc); return; } /* @@ -6187,11 +6204,12 @@ ath_watchdog(void *arg) /* * We can't hold the lock across the ath_reset() call. + * + * And since this routine can't hold a lock and sleep, + * do the reset deferred. */ if (do_reset) { - ATH_UNLOCK(sc); - ath_reset(sc->sc_ifp, ATH_RESET_NOLOSS); - ATH_LOCK(sc); + taskqueue_enqueue(sc->sc_tq, &sc->sc_resettask); } callout_schedule(&sc->sc_wd_ch, hz); Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Feb 25 18:48:06 2012 (r232162) +++ head/sys/dev/ath/if_athvar.h Sat Feb 25 19:12:54 2012 (r232163) @@ -501,6 +501,7 @@ struct ath_softc { struct ath_txq *sc_cabq; /* tx q for cab frames */ struct task sc_bmisstask; /* bmiss int processing */ struct task sc_bstucktask; /* stuck beacon processing */ + struct task sc_resettask; /* interface reset task */ enum { OK, /* no change needed */ UPDATE, /* update pending */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 19:20:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 501CF1065672; Sat, 25 Feb 2012 19:20:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AA7F8FC13; Sat, 25 Feb 2012 19:20:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PJKs8T030555; Sat, 25 Feb 2012 19:20:54 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PJKsfu030553; Sat, 25 Feb 2012 19:20:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201202251920.q1PJKsfu030553@svn.freebsd.org> From: Glen Barber Date: Sat, 25 Feb 2012 19:20:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232164 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 19:20:54 -0000 Author: gjb (doc committer) Date: Sat Feb 25 19:20:53 2012 New Revision: 232164 URL: http://svn.freebsd.org/changeset/base/232164 Log: MFC r232011: Xref the following in wlan(4): - bwn(4) - mwl(4) - run(4) Modified: stable/9/share/man/man4/wlan.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/wlan.4 ============================================================================== --- stable/9/share/man/man4/wlan.4 Sat Feb 25 19:12:54 2012 (r232163) +++ stable/9/share/man/man4/wlan.4 Sat Feb 25 19:20:53 2012 (r232164) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2009 +.Dd February 22, 2012 .Dt WLAN 4 .Os .Sh NAME @@ -174,13 +174,16 @@ may not interoperate. .Xr an 4 , .Xr ath 4 , .Xr bwi 4 , +.Xr bwn 4 , .Xr ipw 4 , .Xr iwi 4 , .Xr iwn 4 , .Xr malo 4 , +.Xr mwl 4 , .Xr netintro 4 , .Xr ral 4 , .Xr rum 4 , +.Xr run 4 , .Xr uath 4 , .Xr upgt 4 , .Xr ural 4 , From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 19:21:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 698A61065783; Sat, 25 Feb 2012 19:21:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5481E8FC13; Sat, 25 Feb 2012 19:21:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PJLOt6030606; Sat, 25 Feb 2012 19:21:24 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PJLO1W030604; Sat, 25 Feb 2012 19:21:24 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201202251921.q1PJLO1W030604@svn.freebsd.org> From: Glen Barber Date: Sat, 25 Feb 2012 19:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232165 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 19:21:24 -0000 Author: gjb (doc committer) Date: Sat Feb 25 19:21:24 2012 New Revision: 232165 URL: http://svn.freebsd.org/changeset/base/232165 Log: MFC r232011: Xref the following in wlan(4): - bwn(4) - mwl(4) - run(4) Approved by: re (kib) Modified: stable/8/share/man/man4/wlan.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/wlan.4 ============================================================================== --- stable/8/share/man/man4/wlan.4 Sat Feb 25 19:20:53 2012 (r232164) +++ stable/8/share/man/man4/wlan.4 Sat Feb 25 19:21:24 2012 (r232165) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2009 +.Dd February 22, 2012 .Dt WLAN 4 .Os .Sh NAME @@ -171,13 +171,16 @@ may not interoperate. .Xr an 4 , .Xr ath 4 , .Xr bwi 4 , +.Xr bwn 4 , .Xr ipw 4 , .Xr iwi 4 , .Xr iwn 4 , .Xr malo 4 , +.Xr mwl 4 , .Xr netintro 4 , .Xr ral 4 , .Xr rum 4 , +.Xr run 4 , .Xr uath 4 , .Xr upgt 4 , .Xr ural 4 , From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 21:06:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6137F1065674; Sat, 25 Feb 2012 21:06:40 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 338F88FC1C; Sat, 25 Feb 2012 21:06:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1PL6er0033884; Sat, 25 Feb 2012 21:06:40 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1PL6eOi033882; Sat, 25 Feb 2012 21:06:40 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201202252106.q1PL6eOi033882@svn.freebsd.org> From: Alan Cox Date: Sat, 25 Feb 2012 21:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232166 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 21:06:40 -0000 Author: alc Date: Sat Feb 25 21:06:39 2012 New Revision: 232166 URL: http://svn.freebsd.org/changeset/base/232166 Log: Simplify vm_mmap()'s control flow. Add a comment describing what vm_mmap_to_errno() does. Reviewed by: kib MFC after: 3 weeks X-MFC after: r232071 Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Feb 25 19:21:24 2012 (r232165) +++ head/sys/vm/vm_mmap.c Sat Feb 25 21:06:39 2012 (r232166) @@ -1447,9 +1447,8 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, { boolean_t fitit; vm_object_t object = NULL; - int rv = KERN_SUCCESS; - int docow, error; struct thread *td = curthread; + int docow, error, rv; boolean_t writecounted; if (size == 0) @@ -1555,31 +1554,35 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, rv = vm_map_fixed(map, object, foff, *addr, size, prot, maxprot, docow); - if (rv != KERN_SUCCESS) { + if (rv == KERN_SUCCESS) { + /* + * If the process has requested that all future mappings + * be wired, then heed this. + */ + if (map->flags & MAP_WIREFUTURE) + vm_map_wire(map, *addr, *addr + size, + VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); + } else { /* - * Lose the object reference. Will destroy the - * object if it's an unnamed anonymous mapping - * or named anonymous without other references. - * * If this mapping was accounted for in the vnode's * writecount, then undo that now. */ if (writecounted) vnode_pager_release_writecount(object, 0, size); + /* + * Lose the object reference. Will destroy the + * object if it's an unnamed anonymous mapping + * or named anonymous without other references. + */ vm_object_deallocate(object); } - - /* - * If the process has requested that all future mappings - * be wired, then heed this. - */ - if ((rv == KERN_SUCCESS) && (map->flags & MAP_WIREFUTURE)) - vm_map_wire(map, *addr, *addr + size, - VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); - return (vm_mmap_to_errno(rv)); } +/* + * Translate a Mach VM return code to zero on success or the appropriate errno + * on failure. + */ int vm_mmap_to_errno(int rv) { From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 23:05:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57A0A106564A; Sat, 25 Feb 2012 23:05:26 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 0182B8FC08; Sat, 25 Feb 2012 23:05:25 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id CF11BB2F; Sun, 26 Feb 2012 00:05:23 +0100 (CET) Date: Sun, 26 Feb 2012 00:04:05 +0100 From: Pawel Jakub Dawidek To: Martin Matuska Message-ID: <20120225230404.GJ1344@garage.freebsd.pl> References: <201202231851.q1NIpOxH018329@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iRjOs3ViPWHdlw/I" Content-Disposition: inline In-Reply-To: <201202231851.q1NIpOxH018329@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232059 - in head: sys/fs/devfs sys/fs/nullfs sys/kern sys/sys usr.sbin/jail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 23:05:26 -0000 --iRjOs3ViPWHdlw/I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 23, 2012 at 06:51:24PM +0000, Martin Matuska wrote: > Author: mm > Date: Thu Feb 23 18:51:24 2012 > New Revision: 232059 > URL: http://svn.freebsd.org/changeset/base/232059 >=20 > Log: > To improve control over the use of mount(8) inside a jail(8), introduce > a new jail parameter node with the following parameters: > =20 > allow.mount.devfs: > allow mounting the devfs filesystem inside a jail > =20 > allow.mount.nullfs: > allow mounting the nullfs filesystem inside a jail > =20 > Both parameters are disabled by default (equals the behavior before > devfs and nullfs in jails). Administrators have to explicitly allow > mounting devfs and nullfs for each jail. The value "-1" of the > devfs_ruleset parameter is removed in favor of the new allow setting. > =20 > Reviewed by: jamie > Suggested by: pjd > MFC after: 2 weeks Thanks. Could you also add such an option for ZFS? It would also be nice to document the fact that when file system is using VFCF_JAIL flag, it should be added to allow.mount. Not sure where would be the best place to document that, though. VFS_INIT(9) would be best, but eventhough it is referenced by VFS(9), it doesn't exist... --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --iRjOs3ViPWHdlw/I Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk9JaOQACgkQForvXbEpPzTP/wCfSuKjdcWKmlDweEa4sJuydyhJ gd4AoISvLixPtudOZgZr/CydmAZ+ZndZ =JGSN -----END PGP SIGNATURE----- --iRjOs3ViPWHdlw/I-- From owner-svn-src-all@FreeBSD.ORG Sat Feb 25 23:33:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B38AA106566B; Sat, 25 Feb 2012 23:33:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by mx1.freebsd.org (Postfix) with ESMTP id 4B11D8FC0A; Sat, 25 Feb 2012 23:33:29 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail12.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1PNXOP5027280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Feb 2012 10:33:26 +1100 Date: Sun, 26 Feb 2012 10:33:23 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Maxim Konovalov In-Reply-To: <201202251206.q1PC6eaF016823@svn.freebsd.org> Message-ID: <20120226093104.F1833@besplex.bde.org> References: <201202251206.q1PC6eaF016823@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232156 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 23:33:29 -0000 On Sat, 25 Feb 2012, Maxim Konovalov wrote: > Log: > o Reduce chances for integer overflow. > o More verbose sysctl description added. > > MFC after: 2 weeks > Sponsored by: Nginx, Inc. > Modified: head/sys/kern/vfs_cache.c > ============================================================================== > --- head/sys/kern/vfs_cache.c Sat Feb 25 11:07:32 2012 (r232155) > +++ head/sys/kern/vfs_cache.c Sat Feb 25 12:06:40 2012 (r232156) > ... > @@ -386,7 +386,7 @@ sysctl_debug_hashstat_nchash(SYSCTL_HAND > } > SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE_INT|CTLFLAG_RD| > CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_nchash, "I", > - "nchash chain lengths"); > + "nchash statistics (number of total/used buckets, maximum chain length, usage percentage)"); > #endif > > /* It is now excessively verbose, and misformats both the source code and the output. This is not the place to write missing man pages. Just "nchash statistics" is almost enough. "nchash chain lengths" was just wrong, since this sysctl only returns a summary of the chain lengths. Its description seems to have been copied from the previous sysctl where the description was correct. This and the previous sysctl are now under DIAGNOSTIC, since they took too long and spammed sysctl -a (although the spam is not usually printed) and complicated the locking. That might have been a mistake for this sysctl, since it only returns 4 integers. The previous sysctl returns the length of each chain, 1 integer at a time. 1 at a time in this sysctl is a poor organization too. Now it is very easy to use an array containing everything to be returned, and return everything using only 1 SYSCTL_OUT() with only 1 error check. Other style bugs in this sysctl: % static int % sysctl_debug_hashstat_nchash(SYSCTL_HANDLER_ARGS) % { % int error; % struct nchashhead *ncpp; % struct namecache *ncp; % int n_nchash; % int count, maxlength, used, pct; These declarations are disordered, with 3 sets of int declarations helping to give external disorder, and pct after `used' to give internal disorder. % % if (!req->oldptr) % return SYSCTL_OUT(req, 0, 4 * sizeof(int)); The magic is 4 better placed in an array with that many elements; return this array. % % n_nchash = nchash + 1; /* nchash is max index, not count */ % used = 0; % maxlength = 0; Initializations are randomly sorted too. % % /* Scan hash tables for applicable entries */ % for (ncpp = nchashtbl; n_nchash > 0; n_nchash--, ncpp++) { % count = 0; % CACHE_RLOCK(); The order of the last 2 statements is gratuitously different than in the previous sysctl. This order is better. % LIST_FOREACH(ncp, ncpp, nc_hash) { % count++; % } % CACHE_RUNLOCK(); The previous sysctl has to unlock to avoid a LOR when it copies out the data. This fine-grained locking seems to just waste time here -- I think all chains can be scanned fast enough. If not, then unlocking every 128'th or similar chain would reduce the lock flapping. The previous sysctl could use an array with 128 elements or similar to reduce the number of copyouts and/or the lock flapping. Moving the locking outside of the loop also gives a non-gratuitously different order for initializing `count'. % if (count) % used++; % if (maxlength < count) % maxlength = count; % } % n_nchash = nchash + 1; % pct = (used * 100 * 100) / n_nchash; Putting these variables in the array takes also reduces style bugs automatically. It loses their descriptive names -- e.g., pct would become array[3] (the 4th and last element copied out). % error = SYSCTL_OUT(req, &n_nchash, sizeof(n_nchash)); % if (error) % return (error); % error = SYSCTL_OUT(req, &used, sizeof(used)); % if (error) % return (error); % error = SYSCTL_OUT(req, &maxlength, sizeof(maxlength)); % if (error) % return (error); % error = SYSCTL_OUT(req, &pct, sizeof(pct)); % if (error) % return (error); The last 9 lines go away using an array. % return (0); % } The comment on the NODE for these 2 sysctls says "Grab an atomic snapshot...", but the unlocking makes both non-atomic. Bruce