From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 00:24:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D865547; Sun, 19 Jan 2014 00:24:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 49AEA1DDF; Sun, 19 Jan 2014 00:24:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0J0O0eh018099; Sun, 19 Jan 2014 00:24:00 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0J0O0fb018098; Sun, 19 Jan 2014 00:24:00 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201401190024.s0J0O0fb018098@svn.freebsd.org> From: Justin Hibbits Date: Sun, 19 Jan 2014 00:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260872 - head/sys/powerpc/powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:24:00 -0000 Author: jhibbits Date: Sun Jan 19 00:23:59 2014 New Revision: 260872 URL: http://svnweb.freebsd.org/changeset/base/260872 Log: There's actually no data in the PMU_GET_VERSION command. Don't send any. This change now allows the PMU to be used on PowerBook5,8. MFC after: 1 week Modified: head/sys/powerpc/powermac/pmu.c Modified: head/sys/powerpc/powermac/pmu.c ============================================================================== --- head/sys/powerpc/powermac/pmu.c Sat Jan 18 23:48:20 2014 (r260871) +++ head/sys/powerpc/powermac/pmu.c Sun Jan 19 00:23:59 2014 (r260872) @@ -378,7 +378,7 @@ pmu_attach(device_t dev) pmu_write_reg(sc, vIER, 0x94); /* make sure VIA interrupts are on */ pmu_send(sc, PMU_SYSTEM_READY, 1, cmd, 16, resp); - pmu_send(sc, PMU_GET_VERSION, 1, cmd, 16, resp); + pmu_send(sc, PMU_GET_VERSION, 0, cmd, 16, resp); /* Initialize child buses (ADB) */ node = ofw_bus_get_node(dev); From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 00:38:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 068B4CEF; Sun, 19 Jan 2014 00:38:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E73421E8F; Sun, 19 Jan 2014 00:38:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0J0cIwr022421; Sun, 19 Jan 2014 00:38:18 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0J0cIWR022420; Sun, 19 Jan 2014 00:38:18 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201401190038.s0J0cIWR022420@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 19 Jan 2014 00:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260874 - head/gnu/lib/libgcc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:38:19 -0000 Author: marcel Date: Sun Jan 19 00:38:18 2014 New Revision: 260874 URL: http://svnweb.freebsd.org/changeset/base/260874 Log: Revision 258428 changed gcc by virtue of having _bswapsi2 _bswapdi2 in libgcc, but this was not propagated to this file. Revision 260844 added them here for ia64 unbeknownst revision 258428. Fix it for all... Pointed out by: pfg Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Sun Jan 19 00:29:43 2014 (r260873) +++ head/gnu/lib/libgcc/Makefile Sun Jan 19 00:38:18 2014 (r260874) @@ -34,9 +34,9 @@ OBJS= # added to below in various ways #--------------------------------------------------------------------------- # -# When upgrading GCC, get the following defintions straight from Makefile.in -# # Library members defined in libgcc2.c. +# When upgrading GCC, obtain the following list from mklibgcc.in +# LIB2FUNCS= _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \ _cmpdi2 _ucmpdi2 \ _enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3 \ @@ -44,7 +44,7 @@ LIB2FUNCS= _muldi3 _negdi2 _lshrdi3 _ash _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab \ _popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \ _powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 \ - _divxc3 _divtc3 + _divxc3 _divtc3 _bswapsi2 _bswapdi2 .if ${COMPILER_TYPE} != "clang" || ${TARGET_CPUARCH} != "arm" LIB2FUNCS+= _clear_cache .endif @@ -145,7 +145,6 @@ LIB1ASMFUNCS = __divxf3 __divdf3 __divsf __divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \ __nonlocal_goto __restore_stack_nonlocal __trampoline \ _fixtfdi _fixunstfdi _floatditf -LIB2FUNCS += _bswapsi2 _bswapdi2 LIB2ADDEH = unwind-ia64.c unwind-sjlj.c unwind-c.c .endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 01:37:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2B3E850 for ; Sun, 19 Jan 2014 01:37:57 +0000 (UTC) Received: from nm50-vm6.bullet.mail.bf1.yahoo.com (nm50-vm6.bullet.mail.bf1.yahoo.com [216.109.115.237]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8110411F8 for ; Sun, 19 Jan 2014 01:37:57 +0000 (UTC) Received: from [98.139.212.151] by nm50.bullet.mail.bf1.yahoo.com with NNFMP; 19 Jan 2014 01:31:19 -0000 Received: from [98.139.211.194] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 19 Jan 2014 01:31:19 -0000 Received: from [127.0.0.1] by smtp203.mail.bf1.yahoo.com with NNFMP; 19 Jan 2014 01:31:19 -0000 X-Yahoo-Newman-Id: 752567.27941.bm@smtp203.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: pcLK_hcVM1l36AABR6rq2VpaQwHXLgbucr3JvZKo3V3ubqz ofk0IP4EOleH9UPDV.GauBKlecrLijL.OCWPh_TacF9A7bR0P9.jlpkGfc.A aEuQZY27O62O1zX.xtSz54pF7kUJN9ra_ctjK1_G7ooCrQNf9pYsevD3VcH1 hkKRGng7cgqtqdJpaewa.DLC1KVWdwcauC20Z5GyNI6U7RXVdSk8msEPU9Ac BajwWo0aFiyycH1XTm_W2rIiocN34NHO54QlRwv9HfqRXZfU6eS52Pcl3PWP Xum2G1UJPQPL3VasCaw94WXxnTYcDvMCpcOspKMMQ8hm9F4F1FYWx5RDAYN_ NNNN9z44jFxNrbiihf9UqWnt3bP1ufp.CdkOiSWbJivScZ9KFLbtjCGo2L_8 g1qsiQegELke.26R_biQnRnV9n._O3ZQ4976KpV9QKoBYU_z4AXSwvqKrWWo EpsJ.jtTHvHv_rKNY1Yi1I2AxbJuzxEQEd.RviEAyZSkryyocaaXVJPgxhsA SrA1pkmw49Ez4HUcUKDh0crLVGHOjiZryP7RWIC8QJyDEVDNYmDJqczX7ry9 gr63HANWf5B7BlJ2RLWQM2czL9KY5UdorxZxJA_kmho2PcWsbBDOEDnaaoW7 Z0.GpTSxLcrlxHZvjBiqHZyscdM0- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.139.211.125]) by smtp203.mail.bf1.yahoo.com with SMTP; 18 Jan 2014 17:31:19 -0800 PST Message-ID: <52DB2AE5.6090501@FreeBSD.org> Date: Sat, 18 Jan 2014 20:31:17 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r260874 - head/gnu/lib/libgcc References: <201401190038.s0J0cIWR022420@svn.freebsd.org> In-Reply-To: <201401190038.s0J0cIWR022420@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:37:57 -0000 Thank you! On 18.01.2014 19:38, Marcel Moolenaar wrote: > Author: marcel > Date: Sun Jan 19 00:38:18 2014 > New Revision: 260874 > URL: http://svnweb.freebsd.org/changeset/base/260874 > > Log: > Revision 258428 changed gcc by virtue of having _bswapsi2 _bswapdi2 in > libgcc, but this was not propagated to this file. Revision 260844 added > them here for ia64 unbeknownst revision 258428. Fix it for all... > > Pointed out by: pfg > > s/Pointed out/Pointedhat/ I will MFC the change after 3 days unless Marcel beats me to it ;). Pedro. From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 04:45:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 342CACDF; Sun, 19 Jan 2014 04:45:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 192511DFB; Sun, 19 Jan 2014 04:45:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0J4jqtW017987; Sun, 19 Jan 2014 04:45:52 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0J4jqPJ017986; Sun, 19 Jan 2014 04:45:52 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201401190445.s0J4jqPJ017986@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 19 Jan 2014 04:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260875 - head/sys/ia64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 04:45:53 -0000 Author: marcel Date: Sun Jan 19 04:45:52 2014 New Revision: 260875 URL: http://svnweb.freebsd.org/changeset/base/260875 Log: Enable vt. This brings VGA-based console and terminal support to ia64 for the very first time. Only 9 years in the making... Note that the vt/vga driver does not actually make sure there's VGA hardware at the standard/legacy VGA I/O port and memory I/O addresses. This can cause machine checks if the H/W does not have a VGA controller. Modified: head/sys/ia64/conf/GENERIC Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Sun Jan 19 00:38:18 2014 (r260874) +++ head/sys/ia64/conf/GENERIC Sun Jan 19 04:45:52 2014 (r260875) @@ -192,7 +192,9 @@ options AH_SUPPORT_AR5416 # Various (pseudo) devices device ether # Ethernet support device faith # IPv6-to-IPv4 relaying (translation) +device firmware # firmware assist module device gif # IPv6 and IPv4 tunneling +device kbdmux # keyboard multiplexer device loop # Network loopback device md # Memory "disks" device puc # Multi I/O cards and multi-channel UARTs @@ -200,7 +202,8 @@ device random # Entropy device device tun # Packet tunnel. device uart # Serial port (UART) device vlan # 802.1Q VLAN support -device firmware # firmware assist module +device vt # Virtual terminals +device vt_vga # VGA terminal device # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 11:21:32 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24A40A25; Sun, 19 Jan 2014 11:21:32 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A27AC14E7; Sun, 19 Jan 2014 11:21:27 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA17062; Sun, 19 Jan 2014 13:21:18 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1W4qRK-0008Ij-0O; Sun, 19 Jan 2014 13:21:18 +0200 Message-ID: <52DBB4F4.2080303@FreeBSD.org> Date: Sun, 19 Jan 2014 13:20:20 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Sergey Kandaurov , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-10@FreeBSD.org Subject: Re: svn commit: r260864 - stable/10/sys/net References: <201401182157.s0ILvcqX059828@svn.freebsd.org> In-Reply-To: <201401182157.s0ILvcqX059828@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 11:21:32 -0000 on 18/01/2014 23:57 Sergey Kandaurov said the following: > Author: pluknet > Date: Sat Jan 18 21:57:38 2014 > New Revision: 260864 > URL: http://svnweb.freebsd.org/changeset/base/260864 > > Log: > MFC r258675: Fix build. Thank you very much! I have completely forgotten about this thing that I originally overlooked and about Gleb's fix for it. This is what I get for delaying my MFCs for too long. > Modified: > stable/10/sys/net/vnet.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/net/vnet.c > ============================================================================== > --- stable/10/sys/net/vnet.c Sat Jan 18 21:47:12 2014 (r260863) > +++ stable/10/sys/net/vnet.c Sat Jan 18 21:57:38 2014 (r260864) > @@ -217,7 +217,7 @@ SDT_PROBE_DEFINE2(vnet, functions, vnet_ > "int", "struct vnet *"); > SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry, > "int", "struct vnet *"); > -SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, entry, > +SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, return, > "int"); > > #ifdef DDB > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 11:51:20 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35A8945E; Sun, 19 Jan 2014 11:51:20 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF30165C; Sun, 19 Jan 2014 11:51:15 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA17330; Sun, 19 Jan 2014 13:51:13 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1W4quH-0008KY-HO; Sun, 19 Jan 2014 13:51:13 +0200 Message-ID: <52DBBBF9.7050108@FreeBSD.org> Date: Sun, 19 Jan 2014 13:50:17 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Sergey Kandaurov , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-9@FreeBSD.org Subject: Re: svn commit: r260862 - stable/9/sys/sys References: <201401182121.s0ILLjkW048120@svn.freebsd.org> In-Reply-To: <201401182121.s0ILLjkW048120@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 11:51:20 -0000 on 18/01/2014 23:21 Sergey Kandaurov said the following: > Author: pluknet > Date: Sat Jan 18 21:21:44 2014 > New Revision: 260862 > URL: http://svnweb.freebsd.org/changeset/base/260862 > > Log: > MFC r250816: > > Protect SDT_PROBE() with do { } while (0) loop. Thanks a lot! > Modified: > stable/9/sys/sys/sdt.h > Directory Properties: > stable/9/sys/ (props changed) > stable/9/sys/sys/ (props changed) > > Modified: stable/9/sys/sys/sdt.h > ============================================================================== > --- stable/9/sys/sys/sdt.h Sat Jan 18 20:54:55 2014 (r260861) > +++ stable/9/sys/sys/sdt.h Sat Jan 18 21:21:44 2014 (r260862) > @@ -136,11 +136,12 @@ SET_DECLARE(sdt_argtypes_set, struct sdt > #define SDT_PROBE_DECLARE(prov, mod, func, name) \ > extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] > > -#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ > +#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \ > if (sdt_##prov##_##mod##_##func##_##name->id) \ > (*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \ > (uintptr_t) arg0, (uintptr_t) arg1, (uintptr_t) arg2, \ > - (uintptr_t) arg3, (uintptr_t) arg4) > + (uintptr_t) arg3, (uintptr_t) arg4); \ > +} while (0) > > #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type) \ > static struct sdt_argtype sdt_##prov##_##mod##_##func##_##name##num[1] \ > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 13:51:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64413411; Sun, 19 Jan 2014 13:51:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4501B1EEB; Sun, 19 Jan 2014 13:51:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JDplt3032210; Sun, 19 Jan 2014 13:51:47 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JDplE2032209; Sun, 19 Jan 2014 13:51:47 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201401191351.s0JDplE2032209@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 19 Jan 2014 13:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260881 - stable/9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 13:51:47 -0000 Author: dumbbell Date: Sun Jan 19 13:51:46 2014 New Revision: 260881 URL: http://svnweb.freebsd.org/changeset/base/260881 Log: MFC r255077: acpi_thermal: Warn about insane _TMP temperature only once A warning is emitted again if the temperature became briefly valid meanwhile. This avoids spamming the user when the sensor is broken. Other values (ie. not _TMP) always raise a warning. Modified: stable/9/sys/dev/acpica/acpi_thermal.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_thermal.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_thermal.c Sun Jan 19 13:48:02 2014 (r260880) +++ stable/9/sys/dev/acpica/acpi_thermal.c Sun Jan 19 13:51:46 2014 (r260881) @@ -111,6 +111,7 @@ struct acpi_tz_softc { struct acpi_tz_zone tz_zone; /*Thermal zone parameters*/ int tz_validchecks; + int tz_insane_tmp_notified; /* passive cooling */ struct proc *tz_cooling_proc; @@ -161,6 +162,8 @@ static driver_t acpi_tz_driver = { sizeof(struct acpi_tz_softc), }; +static char *acpi_tz_tmp_name = "_TMP"; + static devclass_t acpi_tz_devclass; DRIVER_MODULE(acpi_tz, acpi, acpi_tz_driver, acpi_tz_devclass, 0, 0); MODULE_DEPEND(acpi_tz, acpi, 1, 1, 1); @@ -456,12 +459,11 @@ acpi_tz_get_temperature(struct acpi_tz_s { int temp; ACPI_STATUS status; - static char *tmp_name = "_TMP"; ACPI_FUNCTION_NAME ("acpi_tz_get_temperature"); /* Evaluate the thermal zone's _TMP method. */ - status = acpi_GetInteger(sc->tz_handle, tmp_name, &temp); + status = acpi_GetInteger(sc->tz_handle, acpi_tz_tmp_name, &temp); if (ACPI_FAILURE(status)) { ACPI_VPRINT(sc->tz_dev, acpi_device_get_parent_softc(sc->tz_dev), "error fetching current temperature -- %s\n", @@ -470,7 +472,7 @@ acpi_tz_get_temperature(struct acpi_tz_s } /* Check it for validity. */ - acpi_tz_sanity(sc, &temp, tmp_name); + acpi_tz_sanity(sc, &temp, acpi_tz_tmp_name); if (temp == -1) return (FALSE); @@ -696,10 +698,29 @@ static void acpi_tz_sanity(struct acpi_tz_softc *sc, int *val, char *what) { if (*val != -1 && (*val < TZ_ZEROC || *val > TZ_ZEROC + 2000)) { - device_printf(sc->tz_dev, "%s value is absurd, ignored (%d.%dC)\n", - what, TZ_KELVTOC(*val)); + /* + * If the value we are checking is _TMP, warn the user only + * once. This avoids spamming messages if, for instance, the + * sensor is broken and always returns an invalid temperature. + * + * This is only done for _TMP; other values always emit a + * warning. + */ + if (what != acpi_tz_tmp_name || !sc->tz_insane_tmp_notified) { + device_printf(sc->tz_dev, "%s value is absurd, ignored (%d.%dC)\n", + what, TZ_KELVTOC(*val)); + + /* Don't warn the user again if the read value doesn't improve. */ + if (what == acpi_tz_tmp_name) + sc->tz_insane_tmp_notified = 1; + } *val = -1; + return; } + + /* This value is correct. Warn if it's incorrect again. */ + if (what == acpi_tz_tmp_name) + sc->tz_insane_tmp_notified = 0; } /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 16:07:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A45B216; Sun, 19 Jan 2014 16:07:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E834B178E; Sun, 19 Jan 2014 16:07:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JG7SSg084766; Sun, 19 Jan 2014 16:07:28 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JG7SsM084760; Sun, 19 Jan 2014 16:07:28 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201401191607.s0JG7SsM084760@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sun, 19 Jan 2014 16:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260882 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:07:29 -0000 Author: melifaro Date: Sun Jan 19 16:07:27 2014 New Revision: 260882 URL: http://svnweb.freebsd.org/changeset/base/260882 Log: Further rework netinet6 address handling code: * Set ia address/mask values BEFORE attaching to address lists. Inet6 address assignment is not atomic, so the simplest way to do this atomically is to fill in ia before attach. * Validate irfa->ia_addr field before use (we permit ANY sockaddr in old code). * Do some renamings: in6_ifinit -> in6_notify_ifa (interaction with other subsystems is here) in6_setup_ifa -> in6_broadcast_ifa (LLE/Multicast/DaD code) in6_ifaddloop -> nd6_add_ifa_lle in6_ifremloop -> nd6_rem_ifa_lle * Split working with LLE and route announce code for last two. Add temporary in6_newaddrmsg() function to mimic current rtsock behaviour. * Call device SIOCSIFADDR handler IFF we're adding first address. In IPv4 we have to call it on every address change since ARP record is installed by arp_ifinit() which is called by given handler. IPv6 stack, on the opposite is responsible to call nd6_add_ifa_lle() so there is no reason to call SIOCSIFADDR often. Modified: head/sys/netinet/ip_carp.c head/sys/netinet6/in6.c head/sys/netinet6/in6_var.h head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Sun Jan 19 13:51:46 2014 (r260881) +++ head/sys/netinet/ip_carp.c Sun Jan 19 16:07:27 2014 (r260882) @@ -964,7 +964,7 @@ carp_ifa_addroute(struct ifaddr *ifa) case AF_INET6: ifa_add_loopback_route(ifa, (struct sockaddr *)&ifatoia6(ifa)->ia_addr); - in6_ifaddloop(ifa); + nd6_add_ifa_lle(ifatoia6(ifa)); break; #endif } @@ -995,7 +995,7 @@ carp_ifa_delroute(struct ifaddr *ifa) case AF_INET6: ifa_del_loopback_route(ifa, (struct sockaddr *)&ifatoia6(ifa)->ia_addr); - in6_ifremloop(ifa); + nd6_rem_ifa_lle(ifatoia6(ifa)); break; #endif } Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sun Jan 19 13:51:46 2014 (r260881) +++ head/sys/netinet6/in6.c Sun Jan 19 16:07:27 2014 (r260882) @@ -133,8 +133,8 @@ const struct in6_addr in6mask128 = IN6MA const struct sockaddr_in6 sa6_any = { sizeof(sa6_any), AF_INET6, 0, 0, IN6ADDR_ANY_INIT, 0 }; -static int in6_ifinit(struct ifnet *, struct in6_ifaddr *, - struct sockaddr_in6 *, int); +static int in6_notify_ifa(struct ifnet *, struct in6_ifaddr *, + struct in6_aliasreq *, int); static void in6_unlink_ifa(struct in6_ifaddr *, struct ifnet *); int (*faithprefix_p)(struct in6_addr *); @@ -145,44 +145,26 @@ static struct in6_ifaddr *in6_alloc_ifa( struct in6_aliasreq *, int flags); static int in6_update_ifa_internal(struct ifnet *, struct in6_aliasreq *, struct in6_ifaddr *, int, int); -static int in6_setup_ifa(struct ifnet *, struct in6_aliasreq *, +static int in6_broadcast_ifa(struct ifnet *, struct in6_aliasreq *, struct in6_ifaddr *, int); #define ifa2ia6(ifa) ((struct in6_ifaddr *)(ifa)) #define ia62ifa(ia6) (&((ia6)->ia_ifa)) + void -in6_ifaddloop(struct ifaddr *ifa) +in6_newaddrmsg(struct in6_ifaddr *ia, int cmd) { struct sockaddr_dl gateway; struct sockaddr_in6 mask, addr; struct rtentry rt; - struct in6_ifaddr *ia; - struct ifnet *ifp; - struct llentry *ln; - ia = ifa2ia6(ifa); - ifp = ifa->ifa_ifp; - IF_AFDATA_LOCK(ifp); - ifa->ifa_rtrequest = nd6_rtrequest; - ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | - LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); - IF_AFDATA_UNLOCK(ifp); - if (ln != NULL) { - ln->la_expire = 0; /* for IPv6 this means permanent */ - ln->ln_state = ND6_LLINFO_REACHABLE; - /* - * initialize for rtmsg generation - */ - bzero(&gateway, sizeof(gateway)); - gateway.sdl_len = sizeof(gateway); - gateway.sdl_family = AF_LINK; - gateway.sdl_nlen = 0; - gateway.sdl_alen = 6; - memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, - sizeof(ln->ll_addr)); - LLE_WUNLOCK(ln); - } + /* + * initialize for rtmsg generation + */ + bzero(&gateway, sizeof(gateway)); + gateway.sdl_len = sizeof(gateway); + gateway.sdl_family = AF_LINK; bzero(&rt, sizeof(rt)); rt.rt_gateway = (struct sockaddr *)&gateway; @@ -190,42 +172,11 @@ in6_ifaddloop(struct ifaddr *ifa) memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr)); rt_mask(&rt) = (struct sockaddr *)&mask; rt_key(&rt) = (struct sockaddr *)&addr; - rt.rt_flags = RTF_UP | RTF_HOST | RTF_STATIC; + rt.rt_flags = RTF_HOST | RTF_STATIC; + if (cmd == RTM_ADD) + rt.rt_flags |= RTF_UP; /* Announce arrival of local address to all FIBs. */ - rt_newaddrmsg(RTM_ADD, ifa, 0, &rt); -} - -void -in6_ifremloop(struct ifaddr *ifa) -{ - struct sockaddr_dl gateway; - struct sockaddr_in6 mask, addr; - struct rtentry rt0; - struct in6_ifaddr *ia; - struct ifnet *ifp; - - ia = ifa2ia6(ifa); - ifp = ifa->ifa_ifp; - memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr)); - memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); - lltable_prefix_free(AF_INET6, (struct sockaddr *)&addr, - (struct sockaddr *)&mask, LLE_STATIC); - - /* - * initialize for rtmsg generation - */ - bzero(&gateway, sizeof(gateway)); - gateway.sdl_len = sizeof(gateway); - gateway.sdl_family = AF_LINK; - gateway.sdl_nlen = 0; - gateway.sdl_alen = ifp->if_addrlen; - bzero(&rt0, sizeof(rt0)); - rt0.rt_gateway = (struct sockaddr *)&gateway; - rt_mask(&rt0) = (struct sockaddr *)&mask; - rt_key(&rt0) = (struct sockaddr *)&addr; - rt0.rt_flags = RTF_HOST | RTF_STATIC; - /* Announce removal of local address to all FIBs. */ - rt_newaddrmsg(RTM_DELETE, ifa, 0, &rt0); + rt_newaddrmsg(cmd, &ia->ia_ifa, 0, &rt); } int @@ -1031,13 +982,13 @@ in6_update_ifa(struct ifnet *ifp, struct } if (hostIsNew) - error = in6_setup_ifa(ifp, ifra, ia, flags); + error = in6_broadcast_ifa(ifp, ifra, ia, flags); return (error); } /* - * Fill in basic IPv6 address request info + * Fill in basic IPv6 address request info. */ void in6_prepare_ifra(struct in6_aliasreq *ifra, const struct in6_addr *addr, @@ -1078,6 +1029,14 @@ in6_validate_ifra(struct ifnet *ifp, str ifra->ifra_dstaddr.sin6_family != AF_INET6 && ifra->ifra_dstaddr.sin6_family != AF_UNSPEC) return (EAFNOSUPPORT); + + /* + * Validate address + */ + if (ifra->ifra_addr.sin6_len != sizeof(struct sockaddr_in6) || + ifra->ifra_addr.sin6_family != AF_INET6) + return (EINVAL); + /* * validate ifra_prefixmask. don't check sin6_family, netmask * does not carry fields other than sin6_len. @@ -1211,10 +1170,12 @@ in6_alloc_ifa(struct ifnet *ifp, struct ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr; ia->ia_addr.sin6_family = AF_INET6; ia->ia_addr.sin6_len = sizeof(ia->ia_addr); + /* XXX: Can we assign ,sin6_addr and skip the rest? */ + ia->ia_addr = ifra->ifra_addr; ia->ia6_createtime = time_uptime; if ((ifp->if_flags & (IFF_POINTOPOINT | IFF_LOOPBACK)) != 0) { /* - * XXX: some functions expect that ifa_dstaddr is not + * Some functions expect that ifa_dstaddr is not * NULL for p2p interfaces. */ ia->ia_ifa.ifa_dstaddr = @@ -1222,7 +1183,15 @@ in6_alloc_ifa(struct ifnet *ifp, struct } else { ia->ia_ifa.ifa_dstaddr = NULL; } + + /* set prefix mask if any */ ia->ia_ifa.ifa_netmask = (struct sockaddr *)&ia->ia_prefixmask; + if (ifra->ifra_prefixmask.sin6_len != 0) { + ia->ia_prefixmask.sin6_family = AF_INET6; + ia->ia_prefixmask.sin6_len = ifra->ifra_prefixmask.sin6_len; + ia->ia_prefixmask.sin6_addr = ifra->ifra_prefixmask.sin6_addr; + } + ia->ia_ifp = ifp; ifa_ref(&ia->ia_ifa); /* if_addrhead */ IF_ADDR_WLOCK(ifp); @@ -1232,30 +1201,28 @@ in6_alloc_ifa(struct ifnet *ifp, struct ifa_ref(&ia->ia_ifa); /* in6_ifaddrhead */ IN6_IFADDR_WLOCK(); TAILQ_INSERT_TAIL(&V_in6_ifaddrhead, ia, ia_link); - LIST_INSERT_HEAD(IN6ADDR_HASH(&ifra->ifra_addr.sin6_addr), - ia, ia6_hash); + LIST_INSERT_HEAD(IN6ADDR_HASH(&ia->ia_addr.sin6_addr), ia, ia6_hash); IN6_IFADDR_WUNLOCK(); return (ia); } +/* + * Update/configure interface address parameters: + * + * 1) Update lifetime + * 2) Update interface metric ad flags + * 3) Notify other subsystems + */ static int in6_update_ifa_internal(struct ifnet *ifp, struct in6_aliasreq *ifra, struct in6_ifaddr *ia, int hostIsNew, int flags) { - struct sockaddr_in6 *pdst; int error; - char ip6buf[INET6_ADDRSTRLEN]; /* update timestamp */ ia->ia6_updatetime = time_uptime; - /* set prefix mask */ - if (ifra->ifra_prefixmask.sin6_len != 0) { - ia->ia_prefixmask = ifra->ifra_prefixmask; - ia->ia_prefixmask.sin6_family = AF_INET6; - } - /* * Set lifetimes. We do not refer to ia6t_expire and ia6t_preferred * to see if the address is deprecated or invalidated, but initialize @@ -1282,6 +1249,9 @@ in6_update_ifa_internal(struct ifnet *if ia->ia6_lifetime.ia6t_preferred = time_uptime; } + /* Update metric */ + ia->ia_ifa.ifa_metric = ifp->if_metric; + /* * configure address flags. */ @@ -1300,53 +1270,40 @@ in6_update_ifa_internal(struct ifnet *if if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) ia->ia6_flags |= IN6_IFF_TENTATIVE; - /* - * If a new destination address is specified, scrub the old one and - * install the new destination. Note that the interface must be - * p2p or loopback (see the check above.) - */ - pdst = &ifra->ifra_dstaddr; - if (pdst->sin6_family == AF_INET6 && - !IN6_ARE_ADDR_EQUAL(&pdst->sin6_addr, &ia->ia_dstaddr.sin6_addr)) { - if ((ia->ia_flags & IFA_ROUTE) != 0 && - (rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST) != 0)) { - nd6log((LOG_ERR, "in6_update_ifa_internal: failed to " - "remove a route to the old destination: %s\n", - ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr))); - /* proceed anyway... */ - } else - ia->ia_flags &= ~IFA_ROUTE; - ia->ia_dstaddr = *pdst; - } - - /* reset the interface and routing table appropriately. */ - if ((error = in6_ifinit(ifp, ia, &ifra->ifra_addr, hostIsNew)) != 0) { - /* - * XXX: if a change of an existing address failed, keep the entry - * anyway. - */ - } + /* notify other subsystems */ + error = in6_notify_ifa(ifp, ia, ifra, hostIsNew); return (error); } +/* + * Do link-level ifa job: + * 1) Add lle entry for added address + * 2) Notifies routing socket users about new address + * 3) join appropriate multicast group + * 4) start DAD if enabled + */ static int -in6_setup_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra, +in6_broadcast_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra, struct in6_ifaddr *ia, int flags) { struct in6_multi *in6m_sol; int error = 0; /* Add local address to lltable, if necessary (ex. on p2p link). */ - in6_ifaddloop(&(ia->ia_ifa)); + if ((error = nd6_add_ifa_lle(ia)) != 0) { + in6_purgeaddr(&ia->ia_ifa); + ifa_free(&ia->ia_ifa); + return (error); + } /* Join necessary multicast groups. */ in6m_sol = NULL; if ((ifp->if_flags & IFF_MULTICAST) != 0) { error = in6_update_ifa_join_mc(ifp, ifra, ia, flags, &in6m_sol); if (error != 0) { - ifa_free(&ia->ia_ifa); in6_purgeaddr(&ia->ia_ifa); + ifa_free(&ia->ia_ifa); return (error); } } @@ -1571,7 +1528,7 @@ in6_purgeaddr(struct ifaddr *ifa) nd6_dad_stop(ifa); /* Remove local address entry from lltable. */ - in6_ifremloop(ifa); + nd6_rem_ifa_lle(ia); /* Leave multicast groups. */ error = in6_purgeaddr_mc(ifp, ia, ifa0); @@ -1650,29 +1607,33 @@ in6_purgeif(struct ifnet *ifp) } /* - * Initialize an interface's IPv6 address and routing table entry. + * Notifies other other subsystems about address change/arrival: + * 1) Notifies device handler on first IPv6 address assignment + * 2) Handle routing table changes for P2P links and route + * 3) Handle routing table changes for address host route */ static int -in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia, - struct sockaddr_in6 *sin6, int newhost) +in6_notify_ifa(struct ifnet *ifp, struct in6_ifaddr *ia, + struct in6_aliasreq *ifra, int hostIsNew) { int error = 0, plen, ifacount = 0; struct ifaddr *ifa; + struct sockaddr_in6 *pdst; + char ip6buf[INET6_ADDRSTRLEN]; /* * Give the interface a chance to initialize * if this is its first address, - * and to validate the address if necessary. */ - IF_ADDR_RLOCK(ifp); - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family != AF_INET6) - continue; - ifacount++; + if (hostIsNew != 0) { + IF_ADDR_RLOCK(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family != AF_INET6) + continue; + ifacount++; + } + IF_ADDR_RUNLOCK(ifp); } - IF_ADDR_RUNLOCK(ifp); - - ia->ia_addr = *sin6; if (ifacount <= 1 && ifp->if_ioctl) { error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia); @@ -1680,12 +1641,26 @@ in6_ifinit(struct ifnet *ifp, struct in6 return (error); } - ia->ia_ifa.ifa_metric = ifp->if_metric; - - /* we could do in(6)_socktrim here, but just omit it at this moment. */ + /* + * If a new destination address is specified, scrub the old one and + * install the new destination. Note that the interface must be + * p2p or loopback. + */ + pdst = &ifra->ifra_dstaddr; + if (pdst->sin6_family == AF_INET6 && + !IN6_ARE_ADDR_EQUAL(&pdst->sin6_addr, &ia->ia_dstaddr.sin6_addr)) { + if ((ia->ia_flags & IFA_ROUTE) != 0 && + (rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST) != 0)) { + nd6log((LOG_ERR, "in6_update_ifa_internal: failed to " + "remove a route to the old destination: %s\n", + ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr))); + /* proceed anyway... */ + } else + ia->ia_flags &= ~IFA_ROUTE; + ia->ia_dstaddr = *pdst; + } /* - * Special case: * If a new destination address is specified for a point-to-point * interface, install a route to the destination as an interface * direct route. @@ -1696,19 +1671,19 @@ in6_ifinit(struct ifnet *ifp, struct in6 if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 && ia->ia_dstaddr.sin6_family == AF_INET6) { int rtflags = RTF_UP | RTF_HOST; - error = rtinit(&ia->ia_ifa, RTM_ADD, ia->ia_flags | rtflags); - if (error) - return (error); - ia->ia_flags |= IFA_ROUTE; /* * Handle the case for ::1 . */ if (ifp->if_flags & IFF_LOOPBACK) ia->ia_flags |= IFA_RTSELF; + error = rtinit(&ia->ia_ifa, RTM_ADD, ia->ia_flags | rtflags); + if (error) + return (error); + ia->ia_flags |= IFA_ROUTE; } /* - * add a loopback route to self + * add a loopback route to self if not exists */ if (!(ia->ia_flags & IFA_RTSELF) && V_nd6_useloopback) { error = ifa_add_loopback_route((struct ifaddr *)ia, Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Sun Jan 19 13:51:46 2014 (r260881) +++ head/sys/netinet6/in6_var.h Sun Jan 19 16:07:27 2014 (r260882) @@ -822,12 +822,11 @@ int in6_prefix_ioctl(struct socket *, u_ int in6_prefix_add_ifid(int, struct in6_ifaddr *); void in6_prefix_remove_ifid(int, struct in6_ifaddr *); void in6_purgeprefix(struct ifnet *); -void in6_ifremloop(struct ifaddr *); -void in6_ifaddloop(struct ifaddr *); int in6_is_addr_deprecated(struct sockaddr_in6 *); int in6_src_ioctl(u_long, caddr_t); +void in6_newaddrmsg(struct in6_ifaddr *, int); /* * Extended API for IPv6 FIB support. */ Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Jan 19 13:51:46 2014 (r260881) +++ head/sys/netinet6/nd6.c Sun Jan 19 16:07:27 2014 (r260882) @@ -133,6 +133,7 @@ static int regen_tmpaddr(struct in6_ifad static struct llentry *nd6_free(struct llentry *, int); static void nd6_llinfo_timer(void *); static void clear_llinfo_pqueue(struct llentry *); +static void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); static VNET_DEFINE(struct callout, nd6_slowtimo_ch); #define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch) @@ -2177,6 +2178,62 @@ nd6_need_cache(struct ifnet *ifp) } /* + * Add pernament ND6 link-layer record for given + * interface address. + * + * Very similar to IPv4 arp_ifinit(), but: + * 1) IPv6 DAD is performed in different place + * 2) It is called by IPv6 protocol stack in contrast to + * arp_ifinit() which is typically called in SIOCSIFADDR + * driver ioctl handler. + * + */ +int +nd6_add_ifa_lle(struct in6_ifaddr *ia) +{ + struct ifnet *ifp; + struct llentry *ln; + + ifp = ia->ia_ifa.ifa_ifp; + IF_AFDATA_LOCK(ifp); + ia->ia_ifa.ifa_rtrequest = nd6_rtrequest; + ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | + LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); + IF_AFDATA_UNLOCK(ifp); + if (ln != NULL) { + ln->la_expire = 0; /* for IPv6 this means permanent */ + ln->ln_state = ND6_LLINFO_REACHABLE; + LLE_WUNLOCK(ln); + in6_newaddrmsg(ia, RTM_ADD); + return (0); + } + + return (ENOBUFS); +} + +/* + * Removes ALL lle records for interface address prefix. + * XXXME: That's probably not we really want to do, we need + * to remove address record only and keep other records + * until we determine if given prefix is really going + * to be removed. + */ +void +nd6_rem_ifa_lle(struct in6_ifaddr *ia) +{ + struct sockaddr_in6 mask, addr; + struct ifnet *ifp; + + in6_newaddrmsg(ia, RTM_DELETE); + + ifp = ia->ia_ifa.ifa_ifp; + memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr)); + memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); + lltable_prefix_free(AF_INET6, (struct sockaddr *)&addr, + (struct sockaddr *)&mask, LLE_STATIC); +} + +/* * the callers of this function need to be re-worked to drop * the lle lock, drop here for now */ Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Sun Jan 19 13:51:46 2014 (r260881) +++ head/sys/netinet6/nd6.h Sun Jan 19 16:07:27 2014 (r260882) @@ -404,7 +404,6 @@ void nd6_purge(struct ifnet *); void nd6_nud_hint(struct rtentry *, struct in6_addr *, int); int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *); -void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); int nd6_ioctl(u_long, caddr_t, struct ifnet *); struct llentry *nd6_cache_lladdr(struct ifnet *, struct in6_addr *, char *, int, int, int); @@ -416,6 +415,8 @@ int nd6_output_lle(struct ifnet *, struc int nd6_output_flush(struct ifnet *, struct ifnet *, struct mbuf *, struct sockaddr_in6 *, struct route *); int nd6_need_cache(struct ifnet *); +int nd6_add_ifa_lle(struct in6_ifaddr *); +void nd6_rem_ifa_lle(struct in6_ifaddr *); int nd6_storelladdr(struct ifnet *, struct mbuf *, const struct sockaddr *, u_char *, struct llentry **); From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 16:37:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63D43B1A; Sun, 19 Jan 2014 16:37:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 503421978; Sun, 19 Jan 2014 16:37:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JGbwIQ096495; Sun, 19 Jan 2014 16:37:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JGbwOO096494; Sun, 19 Jan 2014 16:37:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401191637.s0JGbwOO096494@svn.freebsd.org> From: Alexander Motin Date: Sun, 19 Jan 2014 16:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260883 - head/sys/geom/multipath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:37:58 -0000 Author: mav Date: Sun Jan 19 16:37:57 2014 New Revision: 260883 URL: http://svnweb.freebsd.org/changeset/base/260883 Log: Removed unneeded and dangerous assignment. It would probably cause NULL refererence panic if compiler not optimize it out. Found with: Clang static analyzer MFC after: 2 weeks Modified: head/sys/geom/multipath/g_multipath.c Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Sun Jan 19 16:07:27 2014 (r260882) +++ head/sys/geom/multipath/g_multipath.c Sun Jan 19 16:37:57 2014 (r260883) @@ -1089,7 +1089,6 @@ g_multipath_ctl_create(struct gctl_req * gctl_error(req, "Device %s already exist", mpname); return; } - sc = gp->softc; memset(&md, 0, sizeof(md)); strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 17:34:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD912784; Sun, 19 Jan 2014 17:34:06 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8DB6B1DEE; Sun, 19 Jan 2014 17:34:06 +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 1B99E25D3A6D; Sun, 19 Jan 2014 17:33:57 +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 EDDCBC22BFA; Sun, 19 Jan 2014 17:33:55 +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 bc4cCRHgIzkG; Sun, 19 Jan 2014 17:33:54 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f07d:fc33:1ad4:1bb6] (unknown [IPv6:fde9:577b:c1a9:4410:f07d:fc33:1ad4:1bb6]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 16212C22BEA; Sun, 19 Jan 2014 17:33:51 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r260882 - in head/sys: netinet netinet6 From: "Bjoern A. Zeeb" In-Reply-To: <201401191607.s0JG7SsM084760@svn.freebsd.org> Date: Sun, 19 Jan 2014 17:33:16 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <7C61BA64-179B-492E-A07A-795BFBA43B8F@FreeBSD.org> References: <201401191607.s0JG7SsM084760@svn.freebsd.org> To: "Alexander V. Chernikov" X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:34:06 -0000 On 19 Jan 2014, at 16:07 , Alexander V. Chernikov = wrote: > Author: melifaro > Date: Sun Jan 19 16:07:27 2014 > New Revision: 260882 > URL: http://svnweb.freebsd.org/changeset/base/260882 >=20 > Log: > Further rework netinet6 address handling code: > * Set ia address/mask values BEFORE attaching to address lists. > Inet6 address assignment is not atomic, so the simplest way to > do this atomically is to fill in ia before attach. > * Validate irfa->ia_addr field before use (we permit ANY sockaddr in = old code). > * Do some renamings: > in6_ifinit -> in6_notify_ifa (interaction with other subsystems is = here) > in6_setup_ifa -> in6_broadcast_ifa (LLE/Multicast/DaD code) Broadcast is a not exactly a good name with IPv6. > in6_ifaddloop -> nd6_add_ifa_lle > in6_ifremloop -> nd6_rem_ifa_lle > * Split working with LLE and route announce code for last two. > Add temporary in6_newaddrmsg() function to mimic current rtsock = behaviour. > * Call device SIOCSIFADDR handler IFF we're adding first address. > In IPv4 we have to call it on every address change since ARP record > is installed by arp_ifinit() which is called by given handler. > IPv6 stack, on the opposite is responsible to call nd6_add_ifa_lle() = so > there is no reason to call SIOCSIFADDR often. >=20 > Modified: > head/sys/netinet/ip_carp.c > head/sys/netinet6/in6.c > head/sys/netinet6/in6_var.h > head/sys/netinet6/nd6.c > head/sys/netinet6/nd6.h =97=20 Bjoern A. Zeeb ????????? ??? ??????? ??????: '??? ??? ???? ?????? ??????? ?? ?? ??????? ??????? ??? ????? ????? ???? ?????? ?? ????? ????', ????????? ?????????, "??? ????? ?? ?????", ?.??? From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 17:45:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 578A69F9; Sun, 19 Jan 2014 17:45:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3812A1E83; Sun, 19 Jan 2014 17:45:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JHjERD022679; Sun, 19 Jan 2014 17:45:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JHjDpo022676; Sun, 19 Jan 2014 17:45:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401191745.s0JHjDpo022676@svn.freebsd.org> From: Warner Losh Date: Sun, 19 Jan 2014 17:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260884 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:45:14 -0000 Author: imp Date: Sun Jan 19 17:45:13 2014 New Revision: 260884 URL: http://svnweb.freebsd.org/changeset/base/260884 Log: Add standard memory controller helper functions. Added: head/sys/arm/at91/at91_smc.c (contents, props changed) head/sys/arm/at91/at91_smc.h (contents, props changed) Modified: head/sys/arm/at91/files.at91 Added: head/sys/arm/at91/at91_smc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_smc.c Sun Jan 19 17:45:13 2014 (r260884) @@ -0,0 +1,91 @@ +/*- + * Copyright (c) 2014 M. Warner Losh. 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 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 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 + +/* + * RD4HW()/WR4HW() read and write at91 hardware register space directly. They + * serve the same purpose as the RD4()/WR4() idiom you see in many drivers, + * except that those translate to bus_space calls, but in this code we need to + * access some devices before bus_space is ready to use. Of course for this to + * work the appropriate static device mappings need to be made in machdep.c. + */ +static inline uint32_t +RD4HW(uint32_t devbase, uint32_t regoff) +{ + + return *(volatile uint32_t *)(AT91_BASE + devbase + regoff); +} + + +static inline void +WR4HW(uint32_t devbase, uint32_t regoff, uint32_t val) +{ + + *(volatile uint32_t *)(AT91_BASE + devbase + regoff) = val; +} + + +void +at91_smc_setup(int id, int cs, const struct at91_smc_init *smc) +{ + // Need a generic way to get this address for all SoCs... Assume 9260 for now... + uint32_t base = AT91SAM9260_SMC_BASE + SMC_CS_OFF(cs); + + WR4HW(base, SMC_SETUP, SMC_SETUP_NCS_RD_SETUP(smc->ncs_rd_setup) | + SMC_SETUP_NRD_SETUP(smc->nrd_setup) | + SMC_SETUP_NCS_WR_SETUP(smc->ncs_wr_setup) | + SMC_SETUP_NWE_SETUP(smc->nwe_setup)); + WR4HW(base, SMC_PULSE, SMC_PULSE_NCS_RD_PULSE(smc->ncs_rd_pulse) | + SMC_PULSE_NRD_PULSE(smc->nrd_pulse) | + SMC_PULSE_NCS_WR_PULSE(smc->ncs_wr_pulse) | + SMC_PULSE_NWE_PULSE(smc->nwe_pulse)); + WR4HW(base, SMC_CYCLE, SMC_CYCLE_NRD_CYCLE(smc->nrd_cycle) | + SMC_CYCLE_NWE_CYCLE(smc->nwe_cycle)); + WR4HW(base, SMC_MODE, smc->mode | SMC_MODE_TDF_CYCLES(smc->tdf_cycles)); +} + +void +at91_ebi_enable(int bank) +{ + + WR4HW(AT91SAM9260_MATRIX_BASE, AT91SAM9260_EBICSA, (1 << bank) | + RD4HW(AT91SAM9260_MATRIX_BASE, AT91SAM9260_EBICSA)); +} + +void +at91_ebi_disable(int bank) +{ + + WR4HW(AT91SAM9260_MATRIX_BASE, AT91SAM9260_EBICSA, ~(1 << bank) & + RD4HW(AT91SAM9260_MATRIX_BASE, AT91SAM9260_EBICSA)); +} Added: head/sys/arm/at91/at91_smc.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_smc.h Sun Jan 19 17:45:13 2014 (r260884) @@ -0,0 +1,116 @@ +/*- + * Copyright (c) 2014 M. Warner Losh. 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 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 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$ */ + +#ifndef ARM_AT91_AT91_SMC_H +#define ARM_AT91_AT91_SMC_H + +/* Registers */ +#define SMC_SETUP 0x00 +#define SMC_PULSE 0x04 +#define SMC_CYCLE 0x08 +#define SMC_MODE 0x0C + +#define SMC_CS_OFF(cs) (0x10 * (cs)) + +/* Setup */ +#define SMC_SETUP_NCS_RD_SETUP(x) ((x) << 24) +#define SMC_SETUP_NRD_SETUP(x) ((x) << 16) +#define SMC_SETUP_NCS_WR_SETUP(x) ((x) << 8) +#define SMC_SETUP_NWE_SETUP(x) (x) + +/* Pulse */ +#define SMC_PULSE_NCS_RD_PULSE(x) ((x) << 24) +#define SMC_PULSE_NRD_PULSE(x) ((x) << 16) +#define SMC_PULSE_NCS_WR_PULSE(x) ((x) << 8) +#define SMC_PULSE_NWE_PULSE(x) (x) + +/* Cycle */ +#define SMC_CYCLE_NRD_CYCLE(x) ((x) << 16) +#define SMC_CYCLE_NWE_CYCLE(x) (x) + +/* Mode */ +#define SMC_MODE_READ (1 << 0) +#define SMC_MODE_WRITE (1 << 1) +#define SMC_MODE_EXNW_DISABLED (0 << 4) +#define SMC_MODE_EXNW_FROZEN_MODE (2 << 4) +#define SMC_MODE_EXNW_READY_MODE (3 << 4) +#define SMC_MODE_BAT (1 << 8) +#define SMC_MODE_DBW_8BIT (0 << 12) +#define SMC_MODE_DBW_16BIT (1 << 12) +#define SMC_MODE_DBW_32_BIT (2 << 12) +#define SMC_MODE_TDF_CYCLES(x) ((x) << 16) +#define SMC_MODE_TDF_MODE (1 << 20) +#define SMC_MODE_PMEN (1 << 24) +#define SMC_PS_4BYTE (0 << 28) +#define SMC_PS_8BYTE (1 << 28) +#define SMC_PS_16BYTE (2 << 28) +#define SMC_PS_32BYTE (3 << 28) + +/* + * structure to ease init. See the SMC chapter in the datasheet for + * the appropriate SoC you are using for details. + */ +struct at91_smc_init +{ + /* Setup register */ + uint8_t ncs_rd_setup; + uint8_t nrd_setup; + uint8_t ncs_wr_setup; + uint8_t nwe_setup; + + /* Pulse register */ + uint8_t ncs_rd_pulse; + uint8_t nrd_pulse; + uint8_t ncs_wr_pulse; + uint8_t nwe_pulse; + + /* Cycle register */ + uint16_t nrd_cycle; + uint16_t nwe_cycle; + + /* Mode register */ + uint8_t mode; /* Combo of READ/WRITE/EXNW fields */ + uint8_t bat; + uint8_t dwb; + uint8_t tdf_cycles; + uint8_t tdf_mode; + uint8_t pmen; + uint8_t ps; +}; + +/* + * Convenience routine to fill in SMC registers for a given chip select. + */ +void at91_smc_setup(int id, int cs, const struct at91_smc_init *smc); + +/* + * Disable/Enable different External Bus Interfaces (EBI) + */ +void at91_ebi_enable(int cs); +void at91_ebi_disable(int cs); + +#endif /* ARM_AT91_AT91_SMC_H */ Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Sun Jan 19 16:37:57 2014 (r260883) +++ head/sys/arm/at91/files.at91 Sun Jan 19 17:45:13 2014 (r260884) @@ -12,6 +12,7 @@ arm/at91/at91_pit.c optional at91sam9 arm/at91/at91_reset.S optional at91sam9 arm/at91/at91_rst.c optional at91sam9 arm/at91/at91_rtc.c optional at91_rtc +arm/at91/at91_smc.c standard arm/at91/at91_spi.c optional at91_spi \ dependency "spibus_if.h" arm/at91/at91_ssc.c optional at91_ssc From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 17:53:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DE0AC56; Sun, 19 Jan 2014 17:53:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 795FC1F09; Sun, 19 Jan 2014 17:53:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JHrq6k026117; Sun, 19 Jan 2014 17:53:52 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JHrqc2026115; Sun, 19 Jan 2014 17:53:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401191753.s0JHrqc2026115@svn.freebsd.org> From: Warner Losh Date: Sun, 19 Jan 2014 17:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260885 - head/sys/dev/nand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:53:52 -0000 Author: imp Date: Sun Jan 19 17:53:51 2014 New Revision: 260885 URL: http://svnweb.freebsd.org/changeset/base/260885 Log: Generalize AT91 NAND support a bit. Be more flexible about ALE and CLE address line assignment. Provide convenince function to set these things. Added: head/sys/dev/nand/nfc_at91.h (contents, props changed) Modified: head/sys/dev/nand/nfc_at91.c Modified: head/sys/dev/nand/nfc_at91.c ============================================================================== --- head/sys/dev/nand/nfc_at91.c Sun Jan 19 17:45:13 2014 (r260884) +++ head/sys/dev/nand/nfc_at91.c Sun Jan 19 17:53:51 2014 (r260885) @@ -54,23 +54,29 @@ __FBSDID("$FreeBSD$"); #include #include "nfc_if.h" +#include +#include + /* * Data cycles are triggered by access to any address within the EBI CS3 region * that has A21 and A22 clear. Command cycles are any access with bit A21 - * asserted. Address cycles are any access with bit A22 asserted. - * - * XXX The atmel docs say that any address bits can be used instead of A21 and - * A22; these values should be configurable. + * asserted. Address cycles are any access with bit A22 asserted. Or vice versa. + * We get these parameters from the nand_param that the board is required to + * call at91_enable_nand, and enable the GPIO lines properly (that will be moved + * into at91_enable_nand when the great GPIO pin renumbering happens). We use + * ale (Address Latch Enable) and cle (Comand Latch Enable) to match the hardware + * names used in NAND. */ #define AT91_NAND_DATA 0 -#define AT91_NAND_COMMAND (1 << 21) -#define AT91_NAND_ADDRESS (1 << 22) struct at91_nand_softc { struct nand_softc nand_sc; struct resource *res; + struct at91_nand_params *nand_param; }; +static struct at91_nand_params nand_param; + static int at91_nand_attach(device_t); static int at91_nand_probe(device_t); static uint8_t at91_nand_read_byte(device_t); @@ -81,6 +87,12 @@ static int at91_nand_send_command(device static int at91_nand_send_address(device_t, uint8_t); static void at91_nand_write_buf(device_t, void *, uint32_t); +void +at91_enable_nand(const struct at91_nand_params *np) +{ + nand_param = *np; +} + static inline u_int8_t dev_read_1(struct at91_nand_softc *sc, bus_size_t offset) { @@ -108,6 +120,14 @@ at91_nand_attach(device_t dev) int err, rid; sc = device_get_softc(dev); + sc->nand_param = &nand_param; + if (sc->nand_param->width != 8 && sc->nand_param->width != 16) { + device_printf(dev, "Bad bus width (%d) defaulting to 8 bits\n", + sc->nand_param->width); + sc->nand_param->width = 8; + } + at91_ebi_enable(sc->nand_param->cs); + rid = 0; sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -128,10 +148,10 @@ at91_nand_send_command(device_t dev, uin { struct at91_nand_softc *sc; - /* nand_debug(NDBG_DRV,"at91_nand_send_command: 0x%02x", command); */ + nand_debug(NDBG_DRV,"at91_nand_send_command: 0x%02x", command); sc = device_get_softc(dev); - dev_write_1(sc, AT91_NAND_COMMAND, command); + dev_write_1(sc, sc->nand_param->cle, command); return (0); } @@ -140,10 +160,10 @@ at91_nand_send_address(device_t dev, uin { struct at91_nand_softc *sc; - /* nand_debug(NDBG_DRV,"at91_nand_send_address: x%02x", addr); */ + nand_debug(NDBG_DRV,"at91_nand_send_address: x%02x", addr); sc = device_get_softc(dev); - dev_write_1(sc, AT91_NAND_ADDRESS, addr); + dev_write_1(sc, sc->nand_param->ale, addr); return (0); } @@ -156,7 +176,7 @@ at91_nand_read_byte(device_t dev) sc = device_get_softc(dev); data = dev_read_1(sc, AT91_NAND_DATA); - /* nand_debug(NDBG_DRV,"at91_nand_read_byte: 0x%02x", data); */ + nand_debug(NDBG_DRV,"at91_nand_read_byte: 0x%02x", data); return (data); } Added: head/sys/dev/nand/nfc_at91.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/nand/nfc_at91.h Sun Jan 19 17:53:51 2014 (r260885) @@ -0,0 +1,50 @@ +/*- + * Copyright (C) 2014 Warner Losh. + * 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. + * + * $FreeBSD$ + */ + +/* + * Atmel at91-family integrated NAND controller driver. + * + * Interface to board setup code to set parameters. + */ + +#ifndef DEV_NAND_NFC_AT91_H +#define DEV_NAND_NFC_AT91_H 1 + +struct at91_nand_params +{ + uint32_t ale; /* Address for ALE (address) NAND cycles */ + uint32_t cle; /* Address for CLE (command) NAND cycles */ + uint32_t width; /* 8 or 16 bits (specify in bits) */ + uint32_t cs; /* Chip Select NAND is connected to */ + uint32_t rnb_pin; /* GPIO pin # for Read/notBusy */ + uint32_t nce_pin; /* GPIO pin # for CE (active low) */ +}; + +void at91_enable_nand(const struct at91_nand_params *); + +#endif /* DEV_NAND_NFC_AT91_H */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 17:59:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FC1EFEC; Sun, 19 Jan 2014 17:59:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6032B1F38; Sun, 19 Jan 2014 17:59:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JHxZ5u026828; Sun, 19 Jan 2014 17:59:35 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JHxYcp026822; Sun, 19 Jan 2014 17:59:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401191759.s0JHxYcp026822@svn.freebsd.org> From: Warner Losh Date: Sun, 19 Jan 2014 17:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260886 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:59:35 -0000 Author: imp Date: Sun Jan 19 17:59:34 2014 New Revision: 260886 URL: http://svnweb.freebsd.org/changeset/base/260886 Log: Connect NAND for the SAM9260EK eval board, as well as the HotE HL-201. # expect more refinement as do more boards. Modified: head/sys/arm/at91/board_hl201.c head/sys/arm/at91/board_sam9260ek.c head/sys/arm/at91/uart_dev_at91usart.c Modified: head/sys/arm/at91/board_hl201.c ============================================================================== --- head/sys/arm/at91/board_hl201.c Sun Jan 19 17:53:51 2014 (r260885) +++ head/sys/arm/at91/board_hl201.c Sun Jan 19 17:59:34 2014 (r260886) @@ -34,6 +34,36 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include + +static struct at91_smc_init nand_smc = { + .ncs_rd_setup = 0, + .nrd_setup = 2, + .ncs_wr_setup = 0, + .nwe_setup = 2, + + .ncs_rd_pulse = 4, + .nrd_pulse = 4, + .ncs_wr_pulse = 4, + .nwe_pulse = 4, + + .nrd_cycle = 7, + .nwe_cycle = 7, + + .mode = SMC_MODE_READ | SMC_MODE_WRITE | SMC_MODE_EXNW_DISABLED, + .tdf_cycles = 3, +}; + +static struct at91_nand_params nand_param = { + .ale = 1u << 21, + .cle = 1u << 22, + .width = 8, + .rnb_pin = AT91_PIN_PC13, /* Note: These pins not confirmed */ + .nce_pin = AT91_PIN_PC14, + .cs = 3, +}; BOARD_INIT long board_init(void) @@ -64,6 +94,27 @@ board_init(void) at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE, AT91C_PIO_PA24, 0); /* ETX3 */ at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE, AT91C_PIO_PA22, 0); /* ETXER */ + /* Setup Static Memory Controller */ + at91_smc_setup(0, 3, &nand_smc); + at91_enable_nand(&nand_param); + + /* + * This assumes + * - RNB is on pin PC13 + * - CE is on pin PC14 + * + * Nothing actually uses RNB right now. + * + * For CE, this currently asserts it during board setup and leaves it + * that way forever. + * + * All this can go away when the gpio pin-renumbering happens... + */ + at91_pio_use_gpio(AT91SAM9G20_PIOC_BASE, AT91C_PIO_PC13 | AT91C_PIO_PC14); + at91_pio_gpio_input(AT91SAM9G20_PIOC_BASE, AT91C_PIO_PC13); /* RNB */ + at91_pio_gpio_output(AT91SAM9G20_PIOC_BASE, AT91C_PIO_PC14, 0); /* nCS */ + at91_pio_gpio_clear(AT91SAM9G20_PIOC_BASE, AT91C_PIO_PC14); /* Assert nCS */ + return (at91_ramsize()); } Modified: head/sys/arm/at91/board_sam9260ek.c ============================================================================== --- head/sys/arm/at91/board_sam9260ek.c Sun Jan 19 17:53:51 2014 (r260885) +++ head/sys/arm/at91/board_sam9260ek.c Sun Jan 19 17:59:34 2014 (r260886) @@ -38,9 +38,39 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include + +static struct at91_smc_init nand_smc = { + .ncs_rd_setup = 0, + .nrd_setup = 1, + .ncs_wr_setup = 0, + .nwe_setup = 1, + + .ncs_rd_pulse = 3, + .nrd_pulse = 3, + .ncs_wr_pulse = 3, + .nwe_pulse = 3, + + .nrd_cycle = 5, + .nwe_cycle = 5, + + .mode = SMC_MODE_READ | SMC_MODE_WRITE | SMC_MODE_EXNW_DISABLED, + .tdf_cycles = 2, +}; + +static struct at91_nand_params nand_param = { + .ale = 1u << 21, + .cle = 1u << 22, + .width = 8, + .rnb_pin = AT91_PIN_PC13, + .nce_pin = AT91_PIN_PC14, + .cs = 3, +}; -BOARD_INIT long -board_init(void) +static void +bi_dbgu(void) { /* @@ -50,6 +80,11 @@ board_init(void) at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB14, 0); /* DTXD */ at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB15, 1); +} + +static void +bi_emac() +{ /* * EMAC @@ -91,7 +126,11 @@ board_init(void) at91_pio_use_periph_b(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA28, 0); /* ECOL */ at91_pio_use_periph_b(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA29, 0); +} +static void +bi_mmc(void) +{ /* * MMC, wired to socket B. @@ -114,11 +153,11 @@ board_init(void) * don't support the dataflash. But if you did, you'd have to * use CS0 and CS1. */ +} - /* - * SPI1 is wired to a audio CODEC that we don't support, so - * give it a pass. - */ +static void +bi_iic(void) +{ /* * TWI. Only one child on the iic bus, which we take care of @@ -128,6 +167,11 @@ board_init(void) at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA23, 1); /* TWCK */ at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA24, 1); +} + +static void +bi_usart0(void) +{ /* * USART0 @@ -148,7 +192,11 @@ board_init(void) at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB26, 1); /* CTS0 */ at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB27, 0); +} +static void +bi_usart1(void) +{ /* * USART1 */ @@ -160,9 +208,54 @@ board_init(void) at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB6, 1); /* RXD1 */ at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB7, 0); +} + +static void +bi_nand(void) +{ + /* Samsung 256MB SLC Flash */ + + /* Setup Static Memory Controller */ + at91_smc_setup(0, 3, &nand_smc); + at91_enable_nand(&nand_param); + + /* + * This assumes + * - RNB is on pin PC13 + * - CE is on pin PC14 + * + * Nothing actually uses RNB right now. + * + * For CE, this currently asserts it during board setup and leaves it + * that way forever. + * + * All this can go away when the gpio pin-renumbering happens... + */ + at91_pio_use_gpio(AT91SAM9260_PIOC_BASE, AT91C_PIO_PC13 | AT91C_PIO_PC14); + at91_pio_gpio_input(AT91SAM9260_PIOC_BASE, AT91C_PIO_PC13); /* RNB */ + at91_pio_gpio_output(AT91SAM9260_PIOC_BASE, AT91C_PIO_PC14, 0); /* nCS */ + at91_pio_gpio_clear(AT91SAM9260_PIOC_BASE, AT91C_PIO_PC14); /* Assert nCS */ +} + +BOARD_INIT long +board_init(void) +{ + bi_dbgu(); + bi_emac(); + bi_mmc(); + + /* + * SPI1 is wired to a audio CODEC that we don't support, so + * give it a pass. + */ + bi_iic(); + bi_usart0(); + bi_usart1(); /* USART2 - USART5 aren't wired up, except via PIO pins, ignore them. */ + bi_nand(); + return (at91_ramsize()); } Modified: head/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_dev_at91usart.c Sun Jan 19 17:53:51 2014 (r260885) +++ head/sys/arm/at91/uart_dev_at91usart.c Sun Jan 19 17:59:34 2014 (r260886) @@ -219,20 +219,6 @@ at91_usart_param(struct uart_bas *bas, i return (0); } -static void -at91_usart_grab(struct uart_bas *bas) -{ - - WR4(bas, USART_IDR, USART_CSR_RXRDY); -} - -static void -at91_usart_ungrab(struct uart_bas *bas) -{ - - WR4(bas, USART_IER, USART_CSR_RXRDY); -} - static struct uart_ops at91_usart_ops = { .probe = at91_usart_probe, .init = at91_usart_init, @@ -240,8 +226,6 @@ static struct uart_ops at91_usart_ops = .putc = at91_usart_putc, .rxready = at91_usart_rxready, .getc = at91_usart_getc, - .grab = at91_usart_grab, - .ungrab = at91_usart_ungrab, }; static int @@ -331,6 +315,8 @@ static int at91_usart_bus_param(struct u static int at91_usart_bus_receive(struct uart_softc *); static int at91_usart_bus_setsig(struct uart_softc *, int); static int at91_usart_bus_transmit(struct uart_softc *); +static void at91_usart_bus_grab(struct uart_softc *); +static void at91_usart_bus_ungrab(struct uart_softc *); static kobj_method_t at91_usart_methods[] = { KOBJMETHOD(uart_probe, at91_usart_bus_probe), @@ -343,6 +329,8 @@ static kobj_method_t at91_usart_methods[ KOBJMETHOD(uart_receive, at91_usart_bus_receive), KOBJMETHOD(uart_setsig, at91_usart_bus_setsig), KOBJMETHOD(uart_transmit, at91_usart_bus_transmit), + KOBJMETHOD(uart_grab, at91_usart_bus_grab), + KOBJMETHOD(uart_ungrab, at91_usart_bus_ungrab), KOBJMETHOD_END }; @@ -815,6 +803,25 @@ at91_usart_bus_ioctl(struct uart_softc * return (EINVAL); } + +static void +at91_usart_bus_grab(struct uart_softc *sc) +{ + + uart_lock(sc->sc_hwmtx); + WR4(&sc->sc_bas, USART_IDR, USART_CSR_RXRDY); + uart_unlock(sc->sc_hwmtx); +} + +static void +at91_usart_bus_ungrab(struct uart_softc *sc) +{ + + uart_lock(sc->sc_hwmtx); + WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); + uart_unlock(sc->sc_hwmtx); +} + struct uart_class at91_usart_class = { "at91_usart", at91_usart_methods, From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 18:09:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D700B643; Sun, 19 Jan 2014 18:09:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AAFE410BB; Sun, 19 Jan 2014 18:09:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JI917m031023; Sun, 19 Jan 2014 18:09:01 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JI91Zp031016; Sun, 19 Jan 2014 18:09:01 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401191809.s0JI91Zp031016@svn.freebsd.org> From: Warner Losh Date: Sun, 19 Jan 2014 18:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260887 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:09:01 -0000 Author: imp Date: Sun Jan 19 18:09:00 2014 New Revision: 260887 URL: http://svnweb.freebsd.org/changeset/base/260887 Log: Add nand device and NANDFS into the mix for those boards that have support for it at the moment. Modified: head/sys/arm/conf/ATMEL head/sys/arm/conf/HL201 head/sys/arm/conf/SAM9260EK Modified: head/sys/arm/conf/ATMEL ============================================================================== --- head/sys/arm/conf/ATMEL Sun Jan 19 17:59:34 2014 (r260886) +++ head/sys/arm/conf/ATMEL Sun Jan 19 18:09:00 2014 (r260887) @@ -175,3 +175,6 @@ device at91_wdt # Atmel AT91 Watchdog T device at91_rtc device at91_ssc #device at91_tc # missing? + +# NAND Flash - Reference design has Samsung 256MB but others possible +device nand # NAND interface on CS3 Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Sun Jan 19 17:59:34 2014 (r260886) +++ head/sys/arm/conf/HL201 Sun Jan 19 18:09:00 2014 (r260887) @@ -37,7 +37,8 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk +options NANDFS # NAND file system #options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server @@ -131,3 +132,5 @@ device pass # Passthrough device (dire #device wlan_amrr # AMRR transmit rate control algorithm options ROOTDEVNAME=\"ufs:da0s1a\" +# NAND Flash - my board as 128MB Samsung part +device nand # NAND interface on CS3 Modified: head/sys/arm/conf/SAM9260EK ============================================================================== --- head/sys/arm/conf/SAM9260EK Sun Jan 19 17:59:34 2014 (r260886) +++ head/sys/arm/conf/SAM9260EK Sun Jan 19 18:09:00 2014 (r260887) @@ -1,4 +1,4 @@ -# Kernel configuration for Ethernut 5 boards +# Kernel configuration for Atmel SAM9260-EK eval board # # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: @@ -37,6 +37,7 @@ options SOFTUPDATES # Enable FFS soft options UFS_DIRHASH # Improve performance on big directories #options UFS_GJOURNAL # Enable gjournal-based UFS journaling #options MD_ROOT # MD is a potential root device +options NANDFS # NAND file system options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager @@ -165,3 +166,6 @@ device umass # Disks/Mass storage - Re # watchdog device at91_wdt # Atmel AT91 Watchdog Timer + +# NAND Flash - Reference design has Samsung 256MB but others possible +device nand # NAND interface on CS3 From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 18:46:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FE4C5D9; Sun, 19 Jan 2014 18:46:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C8391343; Sun, 19 Jan 2014 18:46:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JIkdR0046341; Sun, 19 Jan 2014 18:46:39 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JIkdvw046339; Sun, 19 Jan 2014 18:46:39 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201401191846.s0JIkdvw046339@svn.freebsd.org> From: Ed Maste Date: Sun, 19 Jan 2014 18:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260888 - in head/sys: amd64/conf i386/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:46:39 -0000 Author: emaste Date: Sun Jan 19 18:46:38 2014 New Revision: 260888 URL: http://svnweb.freebsd.org/changeset/base/260888 Log: Add VT kernel configuration to ease testing of vt(9), aka Newcons Added: head/sys/amd64/conf/VT (contents, props changed) head/sys/i386/conf/VT (contents, props changed) Added: head/sys/amd64/conf/VT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/conf/VT Sun Jan 19 18:46:38 2014 (r260888) @@ -0,0 +1,14 @@ +# VT -- kernel config using the vt(9) system console instead of legacy syscons +# +# For more information see https://wiki.freebsd.org/Newcons +# +# $FreeBSD$ + +include GENERIC +ident VT + +nodevice sc +nodevice vga + +device vt +device vt_vga Added: head/sys/i386/conf/VT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/i386/conf/VT Sun Jan 19 18:46:38 2014 (r260888) @@ -0,0 +1,14 @@ +# VT -- kernel config using the vt(9) system console instead of legacy syscons +# +# For more information see https://wiki.freebsd.org/Newcons +# +# $FreeBSD$ + +include GENERIC +ident VT + +nodevice sc +nodevice vga + +device vt +device vt_vga From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 19:36:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42465310; Sun, 19 Jan 2014 19:36:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 12D2C16A9; Sun, 19 Jan 2014 19:36:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JJaCSQ065807; Sun, 19 Jan 2014 19:36:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JJaBEG065794; Sun, 19 Jan 2014 19:36:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401191936.s0JJaBEG065794@svn.freebsd.org> From: Warner Losh Date: Sun, 19 Jan 2014 19:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260889 - in head/sys: arm/s3c2xx0 arm/sa11x0 arm/xilinx mips/adm5120 mips/atheros mips/cavium mips/rt305x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:36:13 -0000 Author: imp Date: Sun Jan 19 19:36:11 2014 New Revision: 260889 URL: http://svnweb.freebsd.org/changeset/base/260889 Log: Introduce grab and ungrab upcalls. When the kernel desires to grab the console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things. Reviewed by: bde (with reservations) Modified: head/sys/arm/s3c2xx0/uart_dev_s3c2410.c head/sys/arm/sa11x0/uart_dev_sa1110.c head/sys/arm/xilinx/uart_dev_cdnc.c head/sys/mips/adm5120/uart_dev_adm5120.c head/sys/mips/atheros/uart_dev_ar933x.c head/sys/mips/cavium/uart_dev_oct16550.c head/sys/mips/rt305x/uart_dev_rt305x.c Modified: head/sys/arm/s3c2xx0/uart_dev_s3c2410.c ============================================================================== --- head/sys/arm/s3c2xx0/uart_dev_s3c2410.c Sun Jan 19 18:46:38 2014 (r260888) +++ head/sys/arm/s3c2xx0/uart_dev_s3c2410.c Sun Jan 19 19:36:11 2014 (r260889) @@ -203,7 +203,6 @@ s3c2410_getc(struct uart_bas *bas, struc return sscom_getc(bas->bst, bas->bsh); } - static int s3c2410_bus_probe(struct uart_softc *sc); static int s3c2410_bus_attach(struct uart_softc *sc); static int s3c2410_bus_flush(struct uart_softc *, int); @@ -214,6 +213,8 @@ static int s3c2410_bus_param(struct uart static int s3c2410_bus_receive(struct uart_softc *); static int s3c2410_bus_setsig(struct uart_softc *, int); static int s3c2410_bus_transmit(struct uart_softc *); +static void s3c2410_bus_grab(struct uart_softc *); +static void s3c2410_bus_ungrab(struct uart_softc *); static kobj_method_t s3c2410_methods[] = { KOBJMETHOD(uart_probe, s3c2410_bus_probe), @@ -226,6 +227,8 @@ static kobj_method_t s3c2410_methods[] = KOBJMETHOD(uart_receive, s3c2410_bus_receive), KOBJMETHOD(uart_setsig, s3c2410_bus_setsig), KOBJMETHOD(uart_transmit, s3c2410_bus_transmit), + KOBJMETHOD(uart_grab, s3c2410_bus_grab), + KOBJMETHOD(uart_ungrab, s3c2410_bus_ungrab), {0, 0 } }; @@ -373,6 +376,25 @@ s3c2410_bus_ioctl(struct uart_softc *sc, return (EINVAL); } + +static void +s3c2410_bus_grab(struct uart_softc *sc) +{ + uintptr_t irq; + + irq = rman_get_start(sc->sc_ires); + arm_mask_irq(get_sub_irq(irq, RX_OFF)); +} + +static void +s3c2410_bus_ungrab(struct uart_softc *sc) +{ + uintptr_t irq; + + irq = rman_get_start(sc->sc_ires); + arm_unmask_irq(get_sub_irq(irq, RX_OFF)); +} + struct uart_class uart_s3c2410_class = { "s3c2410 class", s3c2410_methods, Modified: head/sys/arm/sa11x0/uart_dev_sa1110.c ============================================================================== --- head/sys/arm/sa11x0/uart_dev_sa1110.c Sun Jan 19 18:46:38 2014 (r260888) +++ head/sys/arm/sa11x0/uart_dev_sa1110.c Sun Jan 19 19:36:11 2014 (r260889) @@ -137,6 +137,8 @@ static int sa1110_bus_param(struct uart_ static int sa1110_bus_receive(struct uart_softc *); static int sa1110_bus_setsig(struct uart_softc *, int); static int sa1110_bus_transmit(struct uart_softc *); +static void sa1110_bus_grab(struct uart_softc *); +static void sa1110_bus_ungrab(struct uart_softc *); static kobj_method_t sa1110_methods[] = { KOBJMETHOD(uart_probe, sa1110_bus_probe), @@ -149,6 +151,8 @@ static kobj_method_t sa1110_methods[] = KOBJMETHOD(uart_receive, sa1110_bus_receive), KOBJMETHOD(uart_setsig, sa1110_bus_setsig), KOBJMETHOD(uart_transmit, sa1110_bus_transmit), + KOBJMETHOD(uart_grab, sa1110_bus_grab), + KOBJMETHOD(uart_ungrab, sa1110_bus_ungrab), {0, 0 } }; @@ -164,10 +168,10 @@ sa1110_bus_probe(struct uart_softc *sc) static int sa1110_bus_attach(struct uart_softc *sc) { - bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); + bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); - sc->sc_hwiflow = 0; - uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_RXE | CR3_TXE | CR3_RIE | CR3_TIE); + sc->sc_hwiflow = 0; + uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_RXE | CR3_TXE | CR3_RIE | CR3_TIE); return (0); } static int @@ -273,6 +277,26 @@ sa1110_bus_ioctl(struct uart_softc *sc, return (EINVAL); } +static void +sa1110_bus_grab(struct uart_softc *sc) +{ + + /* Turn off Rx interrupts */ + uart_lock(sc->sc_hwmtx); + uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_TXE | CR3_TIE); + uart_unlock(sc->sc_hwmtx); +} + +static void +sa1110_bus_ungrab(struct uart_softc *sc) +{ + + /* Turn on Rx interrupts */ + uart_lock(sc->sc_hwmtx); + uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_RXE | CR3_TXE | CR3_RIE | CR3_TIE); + uart_unlock(sc->sc_hwmtx); +} + struct uart_class uart_sa1110_class = { "sa1110", sa1110_methods, Modified: head/sys/arm/xilinx/uart_dev_cdnc.c ============================================================================== --- head/sys/arm/xilinx/uart_dev_cdnc.c Sun Jan 19 18:46:38 2014 (r260888) +++ head/sys/arm/xilinx/uart_dev_cdnc.c Sun Jan 19 19:36:11 2014 (r260889) @@ -398,6 +398,8 @@ static int cdnc_uart_bus_param(struct ua static int cdnc_uart_bus_receive(struct uart_softc *); static int cdnc_uart_bus_setsig(struct uart_softc *, int); static int cdnc_uart_bus_transmit(struct uart_softc *); +static void cdnc_uart_bus_grab(struct uart_softc *); +static void cdnc_uart_bus_ungrab(struct uart_softc *); static kobj_method_t cdnc_uart_bus_methods[] = { KOBJMETHOD(uart_probe, cdnc_uart_bus_probe), @@ -410,6 +412,8 @@ static kobj_method_t cdnc_uart_bus_metho KOBJMETHOD(uart_receive, cdnc_uart_bus_receive), KOBJMETHOD(uart_setsig, cdnc_uart_bus_setsig), KOBJMETHOD(uart_transmit, cdnc_uart_bus_transmit), + KOBJMETHOD(uart_grab, cdnc_uart_bus_grab), + KOBJMETHOD(uart_ungrab, cdnc_uart_bus_ungrab), KOBJMETHOD_END }; @@ -675,6 +679,27 @@ cdnc_uart_bus_ioctl(struct uart_softc *s return (error); } +static void +cdnc_uart_bus_grab(struct uart_softc *sc) +{ + + /* Enable interrupts. */ + WR4(&sc->sc_bas, CDNC_UART_IEN_REG, + CDNC_UART_INT_TXOVR | CDNC_UART_INT_RXOVR | + CDNC_UART_INT_DMSI); +} + +static void +cdnc_uart_bus_ungrab(struct uart_softc *sc) +{ + + /* Enable interrupts. */ + WR4(&sc->sc_bas, CDNC_UART_IEN_REG, + CDNC_UART_INT_RXTRIG | CDNC_UART_INT_RXTMOUT | + CDNC_UART_INT_TXOVR | CDNC_UART_INT_RXOVR | + CDNC_UART_INT_DMSI); +} + struct uart_class uart_cdnc_class = { "cdnc_uart", cdnc_uart_bus_methods, Modified: head/sys/mips/adm5120/uart_dev_adm5120.c ============================================================================== --- head/sys/mips/adm5120/uart_dev_adm5120.c Sun Jan 19 18:46:38 2014 (r260888) +++ head/sys/mips/adm5120/uart_dev_adm5120.c Sun Jan 19 19:36:11 2014 (r260889) @@ -149,6 +149,8 @@ static int adm5120_uart_bus_probe(struct static int adm5120_uart_bus_receive(struct uart_softc *); static int adm5120_uart_bus_setsig(struct uart_softc *, int); static int adm5120_uart_bus_transmit(struct uart_softc *); +static void adm5120_uart_bus_grab(struct uart_softc *); +static void adm5120_uart_bus_ungrab(struct uart_softc *); static kobj_method_t adm5120_uart_methods[] = { KOBJMETHOD(uart_attach, adm5120_uart_bus_attach), @@ -162,6 +164,8 @@ static kobj_method_t adm5120_uart_method KOBJMETHOD(uart_receive, adm5120_uart_bus_receive), KOBJMETHOD(uart_setsig, adm5120_uart_bus_setsig), KOBJMETHOD(uart_transmit, adm5120_uart_bus_transmit), + KOBJMETHOD(uart_grab, adm5120_uart_bus_grab), + KOBJMETHOD(uart_ungrab, adm5120_uart_bus_ungrab), { 0, 0 } }; @@ -450,3 +454,26 @@ adm5120_uart_bus_transmit(struct uart_so uart_unlock(sc->sc_hwmtx); return (0); } + +static void +adm5120_uart_bus_grab(struct uart_softc *sc) +{ + + /* Enable interrupts - no RX_INT or RX_TIMEOUT */ + uart_lock(sc->sc_hwmtx); + uart_setreg(&sc->sc_bas, UART_CR_REG, + UART_CR_PORT_EN | UART_CR_MODEM_STATUS_INT_EN); + uart_unlock(sc->sc_hwmtx); +} + +static void +adm5120_uart_bus_ungrab(struct uart_softc *sc) +{ + + /* Enable interrupts */ + uart_lock(sc->sc_hwmtx); + uart_setreg(&sc->sc_bas, UART_CR_REG, + UART_CR_PORT_EN|UART_CR_RX_INT_EN|UART_CR_RX_TIMEOUT_INT_EN| + UART_CR_MODEM_STATUS_INT_EN); + uart_unlock(sc->sc_hwmtx); +} Modified: head/sys/mips/atheros/uart_dev_ar933x.c ============================================================================== --- head/sys/mips/atheros/uart_dev_ar933x.c Sun Jan 19 18:46:38 2014 (r260888) +++ head/sys/mips/atheros/uart_dev_ar933x.c Sun Jan 19 19:36:11 2014 (r260889) @@ -325,6 +325,8 @@ static int ar933x_bus_probe(struct uart_ static int ar933x_bus_receive(struct uart_softc *); static int ar933x_bus_setsig(struct uart_softc *, int); static int ar933x_bus_transmit(struct uart_softc *); +static void ar933x_bus_grab(struct uart_softc *); +static void ar933x_bus_ungrab(struct uart_softc *); static kobj_method_t ar933x_methods[] = { KOBJMETHOD(uart_attach, ar933x_bus_attach), @@ -338,6 +340,8 @@ static kobj_method_t ar933x_methods[] = KOBJMETHOD(uart_receive, ar933x_bus_receive), KOBJMETHOD(uart_setsig, ar933x_bus_setsig), KOBJMETHOD(uart_transmit, ar933x_bus_transmit), + KOBJMETHOD(uart_grab, ar933x_bus_grab), + KOBJMETHOD(uart_ungrab, ar933x_bus_ungrab), { 0, 0 } }; @@ -752,3 +756,31 @@ ar933x_bus_transmit(struct uart_softc *s return (0); } + +static void +ar933x_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + uint32_t reg; + + /* Disable the host interrupt now */ + uart_lock(sc->sc_hwmtx); + reg = ar933x_getreg(bas, AR933X_UART_CS_REG); + reg &= ~AR933X_UART_CS_HOST_INT_EN; + ar933x_setreg(bas, AR933X_UART_CS_REG, reg); + uart_unlock(sc->sc_hwmtx); +} + +static void +ar933x_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + uint32_t reg; + + /* Enable the host interrupt now */ + uart_lock(sc->sc_hwmtx); + reg = ar933x_getreg(bas, AR933X_UART_CS_REG); + reg |= AR933X_UART_CS_HOST_INT_EN; + ar933x_setreg(bas, AR933X_UART_CS_REG, reg); + uart_unlock(sc->sc_hwmtx); +} Modified: head/sys/mips/cavium/uart_dev_oct16550.c ============================================================================== --- head/sys/mips/cavium/uart_dev_oct16550.c Sun Jan 19 18:46:38 2014 (r260888) +++ head/sys/mips/cavium/uart_dev_oct16550.c Sun Jan 19 19:36:11 2014 (r260889) @@ -398,6 +398,8 @@ static int oct16550_bus_probe(struct uar static int oct16550_bus_receive(struct uart_softc *); static int oct16550_bus_setsig(struct uart_softc *, int); static int oct16550_bus_transmit(struct uart_softc *); +static void oct16550_bus_grab(struct uart_softc *); +static void oct16550_bus_ungrab(struct uart_softc *); static kobj_method_t oct16550_methods[] = { KOBJMETHOD(uart_attach, oct16550_bus_attach), @@ -411,6 +413,8 @@ static kobj_method_t oct16550_methods[] KOBJMETHOD(uart_receive, oct16550_bus_receive), KOBJMETHOD(uart_setsig, oct16550_bus_setsig), KOBJMETHOD(uart_transmit, oct16550_bus_transmit), + KOBJMETHOD(uart_grab, oct16550_bus_grab), + KOBJMETHOD(uart_ungrab, oct16550_bus_ungrab), { 0, 0 } }; @@ -810,3 +814,34 @@ oct16550_bus_transmit (struct uart_softc uart_unlock(sc->sc_hwmtx); return (0); } + +static void +oct16550_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* + * turn off all interrupts to enter polling mode. Leave the + * saved mask alone. We'll restore whatever it was in ungrab. + * All pending interupt signals are reset when IER is set to 0. + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +oct16550_bus_ungrab(struct uart_softc *sc) +{ + struct oct16550_softc *oct16550 = (struct oct16550_softc*)sc; + struct uart_bas *bas = &sc->sc_bas; + + /* + * Restore previous interrupt mask + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, oct16550->ier); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: head/sys/mips/rt305x/uart_dev_rt305x.c ============================================================================== --- head/sys/mips/rt305x/uart_dev_rt305x.c Sun Jan 19 18:46:38 2014 (r260888) +++ head/sys/mips/rt305x/uart_dev_rt305x.c Sun Jan 19 19:36:11 2014 (r260889) @@ -195,6 +195,8 @@ static int rt305x_uart_bus_probe(struct static int rt305x_uart_bus_receive(struct uart_softc *); static int rt305x_uart_bus_setsig(struct uart_softc *, int); static int rt305x_uart_bus_transmit(struct uart_softc *); +static void rt305x_uart_bus_grab(struct uart_softc *); +static void rt305x_uart_bus_ungrab(struct uart_softc *); static kobj_method_t rt305x_uart_methods[] = { KOBJMETHOD(uart_attach, rt305x_uart_bus_attach), @@ -208,6 +210,8 @@ static kobj_method_t rt305x_uart_methods KOBJMETHOD(uart_receive, rt305x_uart_bus_receive), KOBJMETHOD(uart_setsig, rt305x_uart_bus_setsig), KOBJMETHOD(uart_transmit, rt305x_uart_bus_transmit), + KOBJMETHOD(uart_grab, rt305x_uart_bus_grab), + KOBJMETHOD(uart_ungrab, rt305x_uart_bus_ungrab), { 0, 0 } }; @@ -278,7 +282,7 @@ rt305x_uart_bus_attach(struct uart_softc uart_setreg(bas, UART_FCR_REG, uart_getreg(bas, UART_FCR_REG) | UART_FCR_FIFOEN | UART_FCR_TXTGR_1 | UART_FCR_RXTGR_1); - uart_barrier(bas); + uart_barrier(bas); /* Enable interrupts */ uart_setreg(bas, UART_IER_REG, UART_IER_EDSSI | UART_IER_ELSI | UART_IER_ERBFI); @@ -505,3 +509,28 @@ rt305x_uart_bus_transmit(struct uart_sof uart_unlock(sc->sc_hwmtx); return (0); } + +static void +rt305x_uart_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* disable interrupts -- XXX not sure which one is RX, so kill them all */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, UART_IER_REG, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +rt305x_uart_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* Enable interrupts */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, UART_IER_REG, + UART_IER_EDSSI | UART_IER_ELSI | UART_IER_ERBFI); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 19:39:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E86A645B; Sun, 19 Jan 2014 19:39:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D366116B6; Sun, 19 Jan 2014 19:39:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JJdFJO066168; Sun, 19 Jan 2014 19:39:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JJdDWM066155; Sun, 19 Jan 2014 19:39:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401191939.s0JJdDWM066155@svn.freebsd.org> From: Warner Losh Date: Sun, 19 Jan 2014 19:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260890 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:39:16 -0000 Author: imp Date: Sun Jan 19 19:39:13 2014 New Revision: 260890 URL: http://svnweb.freebsd.org/changeset/base/260890 Log: Introduce grab and ungrab upcalls. When the kernel desires to grab the console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things. Should have been part of r260889, but waasn't due to command line typo. Reviewed by: bde (with reservations) Modified: head/sys/dev/uart/uart_core.c head/sys/dev/uart/uart_cpu.h head/sys/dev/uart/uart_dev_imx.c head/sys/dev/uart/uart_dev_lpc.c head/sys/dev/uart/uart_dev_ns8250.c head/sys/dev/uart/uart_dev_ns8250.h head/sys/dev/uart/uart_dev_pl011.c head/sys/dev/uart/uart_dev_quicc.c head/sys/dev/uart/uart_dev_sab82532.c head/sys/dev/uart/uart_dev_z8530.c head/sys/dev/uart/uart_if.m Modified: head/sys/dev/uart/uart_core.c ============================================================================== --- head/sys/dev/uart/uart_core.c Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_core.c Sun Jan 19 19:39:13 2014 (r260890) @@ -412,6 +412,13 @@ uart_bus_attach(device_t dev) sc = sc0; /* + * Now that we know the softc for this device, connect the back + * pointer from the sysdev for this device, if any + */ + if (sc->sc_sysdev != NULL) + sc->sc_sysdev->sc = sc; + + /* * Protect ourselves against interrupts while we're not completely * finished attaching and initializing. We don't expect interrupts * until after UART_ATTACH() though. @@ -617,3 +624,23 @@ uart_bus_resume(device_t dev) sc = device_get_softc(dev); return (UART_ATTACH(sc)); } + +void +uart_grab(struct uart_devinfo *di) +{ + + uart_lock(di->hwmtx); + if (di->sc) + UART_GRAB(di->sc); + uart_unlock(di->hwmtx); +} + +void +uart_ungrab(struct uart_devinfo *di) +{ + + uart_lock(di->hwmtx); + if (di->sc) + UART_UNGRAB(di->sc); + uart_unlock(di->hwmtx); +} Modified: head/sys/dev/uart/uart_cpu.h ============================================================================== --- head/sys/dev/uart/uart_cpu.h Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_cpu.h Sun Jan 19 19:39:13 2014 (r260890) @@ -33,6 +33,8 @@ #include #include +struct uart_softc; + /* * Low-level operations for use by console and/or debug port support. */ @@ -43,8 +45,6 @@ struct uart_ops { void (*putc)(struct uart_bas *, int); int (*rxready)(struct uart_bas *); int (*getc)(struct uart_bas *, struct mtx *); - void (*grab)(struct uart_bas *); - void (*ungrab)(struct uart_bas *); }; extern bus_space_tag_t uart_bus_space_io; @@ -53,7 +53,6 @@ extern bus_space_tag_t uart_bus_space_me /* * Console and debug port device info. */ -struct uart_softc; struct uart_devinfo { SLIST_ENTRY(uart_devinfo) next; struct uart_ops *ops; @@ -70,6 +69,7 @@ struct uart_devinfo { int (*detach)(struct uart_softc*); void *cookie; /* Type dependent use. */ struct mtx *hwmtx; + struct uart_softc *sc; /* valid only from start of attach */ }; int uart_cpu_eqres(struct uart_bas *, struct uart_bas *); @@ -137,27 +137,6 @@ uart_putc(struct uart_devinfo *di, int c uart_unlock(di->hwmtx); } -static __inline void -uart_grab(struct uart_devinfo *di) -{ - - uart_lock(di->hwmtx); - if (di->ops->grab) - di->ops->grab(&di->bas); - uart_unlock(di->hwmtx); -} - -static __inline void -uart_ungrab(struct uart_devinfo *di) -{ - - uart_lock(di->hwmtx); - if (di->ops->ungrab) - di->ops->ungrab(&di->bas); - uart_unlock(di->hwmtx); -} - - static __inline int uart_rxready(struct uart_devinfo *di) { @@ -190,4 +169,7 @@ uart_getc(struct uart_devinfo *di) return (di->ops->getc(&di->bas, di->hwmtx)); } +void uart_grab(struct uart_devinfo *di); +void uart_ungrab(struct uart_devinfo *di); + #endif /* _DEV_UART_CPU_H_ */ Modified: head/sys/dev/uart/uart_dev_imx.c ============================================================================== --- head/sys/dev/uart/uart_dev_imx.c Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_dev_imx.c Sun Jan 19 19:39:13 2014 (r260890) @@ -140,6 +140,8 @@ static int imx_uart_bus_probe(struct uar static int imx_uart_bus_receive(struct uart_softc *); static int imx_uart_bus_setsig(struct uart_softc *, int); static int imx_uart_bus_transmit(struct uart_softc *); +static void imx_uart_bus_grab(struct uart_softc *); +static void imx_uart_bus_ungrab(struct uart_softc *); static kobj_method_t imx_uart_methods[] = { KOBJMETHOD(uart_attach, imx_uart_bus_attach), @@ -153,6 +155,8 @@ static kobj_method_t imx_uart_methods[] KOBJMETHOD(uart_receive, imx_uart_bus_receive), KOBJMETHOD(uart_setsig, imx_uart_bus_setsig), KOBJMETHOD(uart_transmit, imx_uart_bus_transmit), + KOBJMETHOD(uart_grab, imx_uart_bus_grab), + KOBJMETHOD(uart_ungrab, imx_uart_bus_ungrab), { 0, 0 } }; @@ -189,12 +193,7 @@ imx_uart_bus_attach(struct uart_softc *s (void)imx_uart_bus_getsig(sc); - /* XXX workaround to have working console on mount prompt */ - if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE){ - DIS(bas, UCR4, DREN); - } else { - ENA(bas, UCR4, DREN); - } + ENA(bas, UCR4, DREN); DIS(bas, UCR1, RRDYEN); DIS(bas, UCR1, IDEN); DIS(bas, UCR3, RXDSEN); @@ -402,13 +401,6 @@ static int imx_uart_bus_setsig(struct uart_softc *sc, int sig) { - /* TODO: implement (?) */ - - /* XXX workaround to have working console on mount prompt */ - /* Enable RX interrupt */ - if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) - if (!IS(&sc->sc_bas, UCR4, DREN)) - ENA(&sc->sc_bas, UCR4, DREN); return (0); } @@ -434,3 +426,25 @@ imx_uart_bus_transmit(struct uart_softc return (0); } + +static void +imx_uart_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + DIS(bas, UCR4, DREN); + uart_unlock(sc->sc_hwmtx); +} + +static void +imx_uart_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + ENA(bas, UCR4, DREN); + uart_unlock(sc->sc_hwmtx); +} Modified: head/sys/dev/uart/uart_dev_lpc.c ============================================================================== --- head/sys/dev/uart/uart_dev_lpc.c Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_dev_lpc.c Sun Jan 19 19:39:13 2014 (r260890) @@ -401,6 +401,8 @@ static int lpc_ns8250_bus_probe(struct u static int lpc_ns8250_bus_receive(struct uart_softc *); static int lpc_ns8250_bus_setsig(struct uart_softc *, int); static int lpc_ns8250_bus_transmit(struct uart_softc *); +static void lpc_ns8250_bus_grab(struct uart_softc *); +static void lpc_ns8250_bus_ungrab(struct uart_softc *); static kobj_method_t lpc_ns8250_methods[] = { KOBJMETHOD(uart_attach, lpc_ns8250_bus_attach), @@ -414,6 +416,8 @@ static kobj_method_t lpc_ns8250_methods[ KOBJMETHOD(uart_receive, lpc_ns8250_bus_receive), KOBJMETHOD(uart_setsig, lpc_ns8250_bus_setsig), KOBJMETHOD(uart_transmit, lpc_ns8250_bus_transmit), + KOBJMETHOD(uart_grab, lpc_ns8250_bus_grab), + KOBJMETHOD(uart_ungrab, lpc_ns8250_bus_ungrab), { 0, 0 } }; @@ -890,3 +894,34 @@ lpc_ns8250_bus_transmit(struct uart_soft uart_unlock(sc->sc_hwmtx); return (0); } + +void +lpc_ns8250_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* + * turn off all interrupts to enter polling mode. Leave the + * saved mask alone. We'll restore whatever it was in ungrab. + * All pending interupt signals are reset when IER is set to 0. + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +void +lpc_ns8250_bus_ungrab(struct uart_softc *sc) +{ + struct lpc_ns8250_softc *lpc_ns8250 = (struct lpc_ns8250_softc*)sc; + struct uart_bas *bas = &sc->sc_bas; + + /* + * Restore previous interrupt mask + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, lpc_ns8250->ier); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_dev_ns8250.c Sun Jan 19 19:39:13 2014 (r260890) @@ -365,6 +365,8 @@ static kobj_method_t ns8250_methods[] = KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_grab, ns8250_bus_grab), + KOBJMETHOD(uart_ungrab, ns8250_bus_ungrab), { 0, 0 } }; @@ -922,3 +924,34 @@ ns8250_bus_transmit(struct uart_softc *s uart_sched_softih(sc, SER_INT_TXIDLE); return (0); } + +void +ns8250_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* + * turn off all interrupts to enter polling mode. Leave the + * saved mask alone. We'll restore whatever it was in ungrab. + * All pending interupt signals are reset when IER is set to 0. + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +void +ns8250_bus_ungrab(struct uart_softc *sc) +{ + struct ns8250_softc *ns8250 = (struct ns8250_softc*)sc; + struct uart_bas *bas = &sc->sc_bas; + + /* + * Restore previous interrupt mask + */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, REG_IER, ns8250->ier); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: head/sys/dev/uart/uart_dev_ns8250.h ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.h Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_dev_ns8250.h Sun Jan 19 19:39:13 2014 (r260890) @@ -56,5 +56,7 @@ int ns8250_bus_probe(struct uart_softc * int ns8250_bus_receive(struct uart_softc *); int ns8250_bus_setsig(struct uart_softc *, int); int ns8250_bus_transmit(struct uart_softc *); +void ns8250_bus_grab(struct uart_softc *); +void ns8250_bus_ungrab(struct uart_softc *); #endif /* _DEV_UART_DEV_NS8250_H_ */ Modified: head/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- head/sys/dev/uart/uart_dev_pl011.c Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_dev_pl011.c Sun Jan 19 19:39:13 2014 (r260890) @@ -242,6 +242,8 @@ static int uart_pl011_bus_probe(struct u static int uart_pl011_bus_receive(struct uart_softc *); static int uart_pl011_bus_setsig(struct uart_softc *, int); static int uart_pl011_bus_transmit(struct uart_softc *); +static void uart_pl011_bus_grab(struct uart_softc *); +static void uart_pl011_bus_ungrab(struct uart_softc *); static kobj_method_t uart_pl011_methods[] = { KOBJMETHOD(uart_attach, uart_pl011_bus_attach), @@ -255,6 +257,9 @@ static kobj_method_t uart_pl011_methods[ KOBJMETHOD(uart_receive, uart_pl011_bus_receive), KOBJMETHOD(uart_setsig, uart_pl011_bus_setsig), KOBJMETHOD(uart_transmit, uart_pl011_bus_transmit), + KOBJMETHOD(uart_grab, uart_pl011_bus_grab), + KOBJMETHOD(uart_ungrab, uart_pl011_bus_ungrab), + { 0, 0 } }; @@ -441,3 +446,27 @@ uart_pl011_bus_transmit(struct uart_soft return (0); } + +static void +uart_pl011_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + __uart_setreg(bas, UART_IMSC, /* Switch to RX polling while grabbed */ + ~UART_RXREADY & __uart_getreg(bas, UART_IMSC)); + uart_unlock(sc->sc_hwmtx); +} + +static void +uart_pl011_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + __uart_setreg(bas, UART_IMSC, /* Switch to RX interrupts while not grabbed */ + UART_RXREADY | __uart_getreg(bas, UART_IMSC)); + uart_unlock(sc->sc_hwmtx); +} Modified: head/sys/dev/uart/uart_dev_quicc.c ============================================================================== --- head/sys/dev/uart/uart_dev_quicc.c Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_dev_quicc.c Sun Jan 19 19:39:13 2014 (r260890) @@ -245,6 +245,8 @@ static int quicc_bus_probe(struct uart_s static int quicc_bus_receive(struct uart_softc *); static int quicc_bus_setsig(struct uart_softc *, int); static int quicc_bus_transmit(struct uart_softc *); +static void quicc_bus_grab(struct uart_softc *); +static void quicc_bus_ungrab(struct uart_softc *); static kobj_method_t quicc_methods[] = { KOBJMETHOD(uart_attach, quicc_bus_attach), @@ -258,6 +260,8 @@ static kobj_method_t quicc_methods[] = { KOBJMETHOD(uart_receive, quicc_bus_receive), KOBJMETHOD(uart_setsig, quicc_bus_setsig), KOBJMETHOD(uart_transmit, quicc_bus_transmit), + KOBJMETHOD(uart_grab, quicc_bus_grab), + KOBJMETHOD(uart_ungrab, quicc_bus_ungrab), { 0, 0 } }; @@ -485,3 +489,34 @@ quicc_bus_transmit(struct uart_softc *sc uart_unlock(sc->sc_hwmtx); return (0); } + +static void +quicc_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas; + uint16_t st, rb; + + /* Disable interrupts on the receive buffer. */ + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + rb = quicc_read2(bas, QUICC_PRAM_SCC_RBASE(bas->chan - 1)); + st = quicc_read2(bas, rb); + quicc_write2(bas, rb, st & ~0x9000); + uart_unlock(sc->sc_hwmtx); +} + +static void +quicc_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas; + uint16_t st, rb; + + /* Enable interrupts on the receive buffer. */ + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + rb = quicc_read2(bas, QUICC_PRAM_SCC_RBASE(bas->chan - 1)); + st = quicc_read2(bas, rb); + quicc_write2(bas, rb, st | 0x9000); + uart_unlock(sc->sc_hwmtx); +} + Modified: head/sys/dev/uart/uart_dev_sab82532.c ============================================================================== --- head/sys/dev/uart/uart_dev_sab82532.c Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_dev_sab82532.c Sun Jan 19 19:39:13 2014 (r260890) @@ -365,6 +365,8 @@ static int sab82532_bus_probe(struct uar static int sab82532_bus_receive(struct uart_softc *); static int sab82532_bus_setsig(struct uart_softc *, int); static int sab82532_bus_transmit(struct uart_softc *); +static void sab82532_bus_grab(struct uart_softc *); +static void sab82532_bus_ungrab(struct uart_softc *); static kobj_method_t sab82532_methods[] = { KOBJMETHOD(uart_attach, sab82532_bus_attach), @@ -378,6 +380,8 @@ static kobj_method_t sab82532_methods[] KOBJMETHOD(uart_receive, sab82532_bus_receive), KOBJMETHOD(uart_setsig, sab82532_bus_setsig), KOBJMETHOD(uart_transmit, sab82532_bus_transmit), + KOBJMETHOD(uart_grab, sab82532_bus_grab), + KOBJMETHOD(uart_ungrab, sab82532_bus_ungrab), { 0, 0 } }; @@ -724,3 +728,32 @@ sab82532_bus_transmit(struct uart_softc uart_unlock(sc->sc_hwmtx); return (0); } + +static void +sab82532_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas; + uint8_t imr0; + + bas = &sc->sc_bas; + imr0 = SAB_IMR0_TIME|SAB_IMR0_CDSC|SAB_IMR0_RFO; /* No TCD or RPF */ + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, SAB_IMR0, 0xff & ~imr0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +sab82532_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas; + uint8_t imr0; + + bas = &sc->sc_bas; + imr0 = SAB_IMR0_TCD|SAB_IMR0_TIME|SAB_IMR0_CDSC|SAB_IMR0_RFO| + SAB_IMR0_RPF; + uart_lock(sc->sc_hwmtx); + uart_setreg(bas, SAB_IMR0, 0xff & ~imr0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: head/sys/dev/uart/uart_dev_z8530.c ============================================================================== --- head/sys/dev/uart/uart_dev_z8530.c Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_dev_z8530.c Sun Jan 19 19:39:13 2014 (r260890) @@ -281,6 +281,8 @@ static int z8530_bus_probe(struct uart_s static int z8530_bus_receive(struct uart_softc *); static int z8530_bus_setsig(struct uart_softc *, int); static int z8530_bus_transmit(struct uart_softc *); +static void z8530_bus_grab(struct uart_softc *); +static void z8530_bus_ungrab(struct uart_softc *); static kobj_method_t z8530_methods[] = { KOBJMETHOD(uart_attach, z8530_bus_attach), @@ -294,6 +296,8 @@ static kobj_method_t z8530_methods[] = { KOBJMETHOD(uart_receive, z8530_bus_receive), KOBJMETHOD(uart_setsig, z8530_bus_setsig), KOBJMETHOD(uart_transmit, z8530_bus_transmit), + KOBJMETHOD(uart_grab, z8530_bus_grab), + KOBJMETHOD(uart_ungrab, z8530_bus_ungrab), { 0, 0 } }; @@ -621,3 +625,27 @@ z8530_bus_transmit(struct uart_softc *sc uart_unlock(sc->sc_hwmtx); return (0); } + +static void +z8530_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + uart_setmreg(bas, WR_IDT, IDT_XIE | IDT_TIE); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +z8530_bus_ungrab(struct uart_softc *sc) +{ + struct uart_bas *bas; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + uart_setmreg(bas, WR_IDT, IDT_XIE | IDT_TIE | IDT_RIA); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} Modified: head/sys/dev/uart/uart_if.m ============================================================================== --- head/sys/dev/uart/uart_if.m Sun Jan 19 19:36:11 2014 (r260889) +++ head/sys/dev/uart/uart_if.m Sun Jan 19 19:39:13 2014 (r260890) @@ -141,3 +141,19 @@ METHOD int setsig { METHOD int transmit { struct uart_softc *this; }; + +# grab() - Up call from the console to the upper layers of the driver when +# the kernel asks to grab the console. This is valid only for console +# drivers. This method is responsible for transitioning the hardware +# from an interrupt driven state to a polled state that works with the +# low-level console interface defined for this device. The kernel +# currently only calls this when it wants to grab input from the +# console. Output can still happen asyncrhonously to these calls. +METHOD void grab { + struct uart_softc *this; +}; + +# ungrab() - Undoes the effects of grab(). +METHOD void ungrab { + struct uart_softc *this; +}; From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 19:49:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ABF4776; Sun, 19 Jan 2014 19:49:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 366EA1762; Sun, 19 Jan 2014 19:49:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JJnPR3069963; Sun, 19 Jan 2014 19:49:25 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JJnPJi069962; Sun, 19 Jan 2014 19:49:25 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401191949.s0JJnPJi069962@svn.freebsd.org> From: Glen Barber Date: Sun, 19 Jan 2014 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 Subject: svn commit: r260891 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:49:25 -0000 Author: gjb Date: Sun Jan 19 19:49:24 2014 New Revision: 260891 URL: http://svnweb.freebsd.org/changeset/base/260891 Log: MFC r259729: Bootstrap etcupdate(8) as part of the release build, similar to what is done for mergemaster(8). This allows etcupdate(8) to work out-of-box after the first upgrade of a system. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/Makefile Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/Makefile ============================================================================== --- stable/9/release/Makefile Sun Jan 19 19:39:13 2014 (r260890) +++ stable/9/release/Makefile Sun Jan 19 19:49:24 2014 (r260891) @@ -103,6 +103,8 @@ base.txz: # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base" + etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ + -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" # Package all components cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} mv ${DISTDIR}/*.txz . From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 20:32:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 822DB2BB; Sun, 19 Jan 2014 20:32:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E2481A68; Sun, 19 Jan 2014 20:32:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JKWLGv088565; Sun, 19 Jan 2014 20:32:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JKWLQg088564; Sun, 19 Jan 2014 20:32:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401192032.s0JKWLQg088564@svn.freebsd.org> From: Warner Losh Date: Sun, 19 Jan 2014 20:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260893 - head/sys/dev/aha X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:32:21 -0000 Author: imp Date: Sun Jan 19 20:32:20 2014 New Revision: 260893 URL: http://svnweb.freebsd.org/changeset/base/260893 Log: Free the dma memory from the dma map before destroying the dma map. Modified: head/sys/dev/aha/aha.c Modified: head/sys/dev/aha/aha.c ============================================================================== --- head/sys/dev/aha/aha.c Sun Jan 19 19:58:44 2014 (r260892) +++ head/sys/dev/aha/aha.c Sun Jan 19 20:32:20 2014 (r260893) @@ -207,9 +207,9 @@ aha_free(struct aha_softc *aha) case 7: bus_dmamap_unload(aha->ccb_dmat, aha->ccb_dmamap); case 6: - bus_dmamap_destroy(aha->ccb_dmat, aha->ccb_dmamap); bus_dmamem_free(aha->ccb_dmat, aha->aha_ccb_array, aha->ccb_dmamap); + bus_dmamap_destroy(aha->ccb_dmat, aha->ccb_dmamap); case 5: bus_dma_tag_destroy(aha->ccb_dmat); case 4: From owner-svn-src-all@FreeBSD.ORG Sun Jan 19 21:02:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CB157E9; Sun, 19 Jan 2014 21:02:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0871D1D38; Sun, 19 Jan 2014 21:02:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0JL2O4u000134; Sun, 19 Jan 2014 21:02:24 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0JL2Opt000133; Sun, 19 Jan 2014 21:02:24 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201401192102.s0JL2Opt000133@svn.freebsd.org> From: Devin Teske Date: Sun, 19 Jan 2014 21:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260894 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:02:25 -0000 Author: dteske Date: Sun Jan 19 21:02:24 2014 New Revision: 260894 URL: http://svnweb.freebsd.org/changeset/base/260894 Log: Optimize f_expand_number(), improving performance. MFC After: 3 days Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 19 20:32:20 2014 (r260893) +++ head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 19 21:02:24 2014 (r260894) @@ -372,14 +372,13 @@ f_expand_number() local __cp __num __bshift __maxinput # Remove any leading non-digits - while :; do - __cp="$__string" - __string="${__cp#[!0-9]}" - [ "$__string" = "$__cp" ] && break - done + __string="${__string#${__string%%[0-9]*}}" + + # Store the numbers (no trailing suffix) + __num="${__string%%[!0-9]*}" # Produce `-1' if string didn't contain any digits - if [ ! "$__string" ]; then + if [ ! "$__num" ]; then if [ "$__var_to_set" ]; then setvar "$__var_to_set" -1 else @@ -388,25 +387,8 @@ f_expand_number() return 1 # 1 = "Given $string contains no digits" fi - # Store the numbers - __num="${__string%%[!0-9]*}" - - # Shortcut - if [ $__num -eq 0 ]; then - if [ "$__var_to_set" ]; then - setvar "$__var_to_set" 0 - else - echo 0 - fi - return $SUCCESS - fi - # Remove all the leading numbers from the string to get at the prefix - while :; do - __cp="$__string" - __string="${__cp#[0-9]}" - [ "$__string" = "$__cp" ] && break - done + __string="${__string#"$__num"}" # # Test for invalid prefix (and determine bitshift length) From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 01:59:26 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 400A544B; Mon, 20 Jan 2014 01:59:26 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 0352C1104; Mon, 20 Jan 2014 01:59:25 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (lstewart-laptop.caia.swin.edu.au [136.186.229.148]) by lauren.room52.net (Postfix) with ESMTPSA id AB1957E924; Mon, 20 Jan 2014 12:51:13 +1100 (EST) Message-ID: <52DC810B.3080103@freebsd.org> Date: Mon, 20 Jan 2014 12:51:07 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: "Alexander V. Chernikov" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r260702 - head/sys/netinet References: <201401161150.s0GBo1c1069638@svn.freebsd.org> In-Reply-To: <201401161150.s0GBo1c1069638@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:59:26 -0000 On 01/16/14 22:50, Alexander V. Chernikov wrote: > Author: melifaro > Date: Thu Jan 16 11:50:00 2014 > New Revision: 260702 > URL: http://svnweb.freebsd.org/changeset/base/260702 > > Log: > Fix ipfw fwd for IPv4 traffic broken by r249894. > > Problem case: > Original lookup returns route with GW set, so gw points to > rte->rt_gateway. > After that we're changing dst and performing lookup another time. > Since fwd host is most probably directly reachable, resulting > rte does not contain rt_gateway, so gw is not set. Finally, we > end with packet transmitted to proper interface but wrong > link-layer address. > > Found by: lstewart > Discussed with: ae,lstewart > MFC after: 2 weeks > Sponsored by: Yandex LLC Thanks again for fixing this Alexander. Is the setfib fix going to hit the tree soon as well? Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 01:59:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FA44582; Mon, 20 Jan 2014 01:59:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C8091107; Mon, 20 Jan 2014 01:59:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0K1xaIY012124; Mon, 20 Jan 2014 01:59:36 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0K1xa5X012123; Mon, 20 Jan 2014 01:59:36 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201401200159.s0K1xa5X012123@svn.freebsd.org> From: Neel Natu Date: Mon, 20 Jan 2014 01:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260898 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:59:36 -0000 Author: neel Date: Mon Jan 20 01:59:35 2014 New Revision: 260898 URL: http://svnweb.freebsd.org/changeset/base/260898 Log: Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient entries for WITNESS to actually work. Reviewed by: jhb@ Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Mon Jan 20 01:35:14 2014 (r260897) +++ head/sys/kern/subr_witness.c Mon Jan 20 01:59:35 2014 (r260898) @@ -132,7 +132,7 @@ __FBSDID("$FreeBSD$"); /* Define this to check for blessed mutexes */ #undef BLESSING -#define WITNESS_COUNT 1024 +#define WITNESS_COUNT 1536 #define WITNESS_CHILDCOUNT (WITNESS_COUNT * 4) #define WITNESS_HASH_SIZE 251 /* Prime, gives load factor < 2 */ #define WITNESS_PENDLIST 1024 From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 02:18:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E445825; Mon, 20 Jan 2014 02:18:06 +0000 (UTC) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 520111207; Mon, 20 Jan 2014 02:18:06 +0000 (UTC) Received: from [10.0.1.3] (c-24-6-115-18.hsd1.ca.comcast.net [24.6.115.18]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id C0F5039844; Sun, 19 Jan 2014 18:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1390184285; bh=8DdlaYynAUjzJk76sitJMl7f3NUce8PqQHJ0PpAZ+l0=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=ay4Z+pMHEij/4Kwk5quQqKi3f4dAioBbbSxclHZW/24zwkgFY77x2dgdCB4eL1T7y jA1H6dGh+omUqdzsloqzBEHwC+y2mi8V9avpJqeQ5CNfD7C3c6h374s4UGCGt2z2zf yYHD+Op3RhupbUeWiQUMH34qn7Ou0CtnCr9Ie/dw= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r260898 - head/sys/kern From: Rui Paulo In-Reply-To: <201401200159.s0K1xa5X012123@svn.freebsd.org> Date: Sun, 19 Jan 2014 18:18:03 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201401200159.s0K1xa5X012123@svn.freebsd.org> To: Neel Natu X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 02:18:06 -0000 On 19 Jan 2014, at 17:59, Neel Natu wrote: > Author: neel > Date: Mon Jan 20 01:59:35 2014 > New Revision: 260898 > URL: http://svnweb.freebsd.org/changeset/base/260898 >=20 > Log: > Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient = entries for > WITNESS to actually work. This value should be automatically tuned... -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 03:31:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49CA07CA; Mon, 20 Jan 2014 03:31:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C3B01933; Mon, 20 Jan 2014 03:31:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0K3VGNo050894; Mon, 20 Jan 2014 03:31:16 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0K3VGon050893; Mon, 20 Jan 2014 03:31:16 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201401200331.s0K3VGon050893@svn.freebsd.org> From: Devin Teske Date: Mon, 20 Jan 2014 03:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260899 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:31:17 -0000 Author: dteske Date: Mon Jan 20 03:31:16 2014 New Revision: 260899 URL: http://svnweb.freebsd.org/changeset/base/260899 Log: Dummy commit (s/__num/__number/) in f_expand_number() to describe that the previous commit here (SVN r260894) was [in-part] from Submitted-by: Christoph Mallon MFC after: 3 days Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Mon Jan 20 01:59:35 2014 (r260898) +++ head/usr.sbin/bsdconfig/share/strings.subr Mon Jan 20 03:31:16 2014 (r260899) @@ -369,16 +369,14 @@ f_shell_unescape() f_expand_number() { local __string="$1" __var_to_set="$2" - local __cp __num __bshift __maxinput + local __cp __number __bshift __maxinput - # Remove any leading non-digits + # Remove any leading non-digits and store numbers (sans suffix) __string="${__string#${__string%%[0-9]*}}" - - # Store the numbers (no trailing suffix) - __num="${__string%%[!0-9]*}" + __number="${__string%%[!0-9]*}" # Produce `-1' if string didn't contain any digits - if [ ! "$__num" ]; then + if [ ! "$__number" ]; then if [ "$__var_to_set" ]; then setvar "$__var_to_set" -1 else @@ -388,7 +386,7 @@ f_expand_number() fi # Remove all the leading numbers from the string to get at the prefix - __string="${__string#"$__num"}" + __string="${__string#"$__number"}" # # Test for invalid prefix (and determine bitshift length) @@ -396,9 +394,9 @@ f_expand_number() case "$__string" in ""|[[:space:]]*) # Shortcut if [ "$__var_to_set" ]; then - setvar "$__var_to_set" $__num + setvar "$__var_to_set" $__number else - echo $__num + echo $__number fi return $SUCCESS ;; [Kk]*) __bshift=10 ;; @@ -419,7 +417,7 @@ f_expand_number() # Determine if the wheels fall off __maxinput=$(( 0x7fffffffffffffff >> $__bshift )) - if [ $__num -gt $__maxinput ]; then + if [ $__number -gt $__maxinput ]; then # Input (before expanding) would exceed 64-bit signed int if [ "$__var_to_set" ]; then setvar "$__var_to_set" -1 @@ -430,11 +428,11 @@ f_expand_number() fi # Shift the number out and produce it - __num=$(( $__num << $__bshift )) + __number=$(( $__number << $__bshift )) if [ "$__var_to_set" ]; then - setvar "$__var_to_set" $__num + setvar "$__var_to_set" $__number else - echo $__num + echo $__number fi } From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 03:39:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1D069E9; Mon, 20 Jan 2014 03:39:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9DFE919A2; Mon, 20 Jan 2014 03:39:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0K3d8aQ051759; Mon, 20 Jan 2014 03:39:08 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0K3d8ga051758; Mon, 20 Jan 2014 03:39:08 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201401200339.s0K3d8ga051758@svn.freebsd.org> From: Devin Teske Date: Mon, 20 Jan 2014 03:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260900 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:39:08 -0000 Author: dteske Date: Mon Jan 20 03:39:08 2014 New Revision: 260900 URL: http://svnweb.freebsd.org/changeset/base/260900 Log: Dummy commit (whitespace changes and style nits) to show previous commit (SVN r260866) was [in-part] Submitted-by: Christoph Mallon ... MFC After: 3 days X-MFC-With: r260866 Modified: head/usr.sbin/bsdinstall/scripts/services Modified: head/usr.sbin/bsdinstall/scripts/services ============================================================================== --- head/usr.sbin/bsdinstall/scripts/services Mon Jan 20 03:31:16 2014 (r260899) +++ head/usr.sbin/bsdinstall/scripts/services Mon Jan 20 03:39:08 2014 (r260900) @@ -29,7 +29,8 @@ : ${DIALOG_OK=0} if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then - eval `sed -e s/YES/on/i -e s/NO/off/i $BSDINSTALL_TMPETC/rc.conf.services` + eval $( sed -e s/YES/on/i -e s/NO/off/i \ + $BSDINSTALL_TMPETC/rc.conf.services ) else # Default service states. Everything is off if not enabled. sshd_enable="on" @@ -38,16 +39,17 @@ fi echo -n > $BSDINSTALL_TMPETC/rc.conf.services exec 3>&1 -DAEMONS=$(dialog --backtitle "FreeBSD Installer" \ +DAEMONS=$( dialog --backtitle "FreeBSD Installer" \ --title "System Configuration" --nocancel --separate-output \ --checklist "Choose the services you would like to be started at boot:" \ 0 0 0 \ sshd "Secure shell daemon" ${sshd_enable:-off} \ moused "PS/2 mouse pointer on console" ${moused_enable:-off} \ ntpd "Synchronize system and network time" ${ntpd_enable:-off} \ - powerd "Adjust CPU frequency dynamically if supported" ${powerd_enable:-off} \ + powerd "Adjust CPU frequency dynamically if supported" \ + ${powerd_enable:-off} \ dumpdev "Enable kernel crash dumps to /var/crash" ${dumpdev:-on} \ -2>&1 1>&3) +2>&1 1>&3 ) exec 3>&- havedump= From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 05:44:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A1546D2; Mon, 20 Jan 2014 05:44:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4BD0112B9; Mon, 20 Jan 2014 05:44:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0K5ikC2000250; Mon, 20 Jan 2014 05:44:46 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0K5ikEV000249; Mon, 20 Jan 2014 05:44:46 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201401200544.s0K5ikEV000249@svn.freebsd.org> From: Hiroki Sato Date: Mon, 20 Jan 2014 05:44:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260901 - stable/10/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 05:44:46 -0000 Author: hrs Date: Mon Jan 20 05:44:45 2014 New Revision: 260901 URL: http://svnweb.freebsd.org/changeset/base/260901 Log: - Fix a bxe(4) entry. This issue is not related to NFSv4, and poor performance is caused by disabling TSO, not the issue itself. - s/&os;-STABLE/&os; &release.current;/ Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Mon Jan 20 03:39:08 2014 (r260900) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Mon Jan 20 05:44:45 2014 (r260901) @@ -193,16 +193,19 @@ boot means interactive. A workaround of this would be to use -SIGINT instead. This bug has been fixed on &os;-CURRENT and will be fixed - in &os;-STABLE. + in &os; &release.current;. - In some NFSv4 environments, &man.bxe.4; with - tso enabled may experience issues with - packet corruption, resulting in poor performance. In some - cases, turning off tso will resolve the - issue. See &man.ifconfig.8; for more information about the - -tso flag. + The &man.bxe.4; driver can cause packet corruption when + TSO (TCP Segmentation Offload) feature is enabled. This + feature is enabled by default and can be disabled by using a + parameter of &man.ifconfig.8;. It can + be specified in &man.rc.conf.5; like the following: + + ifconfig_bxe0="DHCP -tso" + + This bug has been fixed on &os; &release.current;. @@ -220,7 +223,7 @@ boot A regression in &man.pw.8; does not remove a user from groups not specified in the provided group list when the -G flag is used. This is expected to be - corrected in &os;-CURRENT and &os;-STABLE. + corrected in &os;-CURRENT and &os; &release.current;. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 05:57:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A474888; Mon, 20 Jan 2014 05:57:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85C06135B; Mon, 20 Jan 2014 05:57:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0K5vwKO004312; Mon, 20 Jan 2014 05:57:58 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0K5vwXs004311; Mon, 20 Jan 2014 05:57:58 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201401200557.s0K5vwXs004311@svn.freebsd.org> From: Hiroki Sato Date: Mon, 20 Jan 2014 05:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260902 - stable/10/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 05:57:58 -0000 Author: hrs Date: Mon Jan 20 05:57:58 2014 New Revision: 260902 URL: http://svnweb.freebsd.org/changeset/base/260902 Log: Document an ipfw fwd issue. Suggested by: jmg Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Mon Jan 20 05:44:45 2014 (r260901) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Mon Jan 20 05:57:58 2014 (r260902) @@ -225,6 +225,14 @@ boot -G flag is used. This is expected to be corrected in &os;-CURRENT and &os; &release.current;. + + + &man.ipfw.8; fwd action can send + packets to the correct interface with a wrong link-layer + address when the route is updated. This bug has been fixed + on &os;-CURRENT and will be fixed in &os; + &release.current;. + From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 07:09:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 916FBFD5; Mon, 20 Jan 2014 07:09:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7C8781812; Mon, 20 Jan 2014 07:09:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0K79KSx031352; Mon, 20 Jan 2014 07:09:20 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0K79KQs031351; Mon, 20 Jan 2014 07:09:20 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401200709.s0K79KQs031351@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 20 Jan 2014 07:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260903 - head/sys/dev/usb/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:09:20 -0000 Author: hselasky Date: Mon Jan 20 07:09:19 2014 New Revision: 260903 URL: http://svnweb.freebsd.org/changeset/base/260903 Log: Add support for GPS ports to UHSO driver. Submitted by: Lundberg, Johannes MFC after: 1 week Modified: head/sys/dev/usb/net/uhso.c Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Mon Jan 20 05:57:58 2014 (r260902) +++ head/sys/dev/usb/net/uhso.c Mon Jan 20 07:09:19 2014 (r260903) @@ -817,6 +817,8 @@ uhso_probe_iface_auto(struct usb_device UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, port)); case UHSO_PORT_TYPE_DIAG: case UHSO_PORT_TYPE_DIAG2: + case UHSO_PORT_TYPE_GPS: + case UHSO_PORT_TYPE_GPSCTL: case UHSO_PORT_TYPE_CTL: case UHSO_PORT_TYPE_APP: case UHSO_PORT_TYPE_APP2: From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 10:30:22 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19B41FBF; Mon, 20 Jan 2014 10:30:22 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id AEA0A191C; Mon, 20 Jan 2014 10:30:20 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA04353; Mon, 20 Jan 2014 12:30:18 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1W5C7V-000Cop-SJ; Mon, 20 Jan 2014 12:30:17 +0200 Message-ID: <52DCFA81.9070307@FreeBSD.org> Date: Mon, 20 Jan 2014 12:29:21 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Jeff Roberson , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r254544 - head/sys/vm References: <201308192354.r7JNsPD1007503@svn.freebsd.org> In-Reply-To: <201308192354.r7JNsPD1007503@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:30:22 -0000 on 20/08/2013 02:54 Jeff Roberson said the following: > Author: jeff > Date: Mon Aug 19 23:54:24 2013 > New Revision: 254544 > URL: http://svnweb.freebsd.org/changeset/base/254544 > > Log: > - Increase the active lru refresh interval to 10 minutes. This has been > shown to negatively impact some workloads and the goal is only to > eliminate worst case behaviors for very long periods of paging > inactivity. Eventually we should determine a more complex scaling > factor for this feature. > - Rate limit low memory callback handlers to limit thrashing. Set the > default to 10 seconds. I wonder if an impact of this rate limiting change on ZFS ARC behavior has been evaluated... > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/vm/vm_pageout.c > > Modified: head/sys/vm/vm_pageout.c > ============================================================================== > --- head/sys/vm/vm_pageout.c Mon Aug 19 23:02:39 2013 (r254543) > +++ head/sys/vm/vm_pageout.c Mon Aug 19 23:54:24 2013 (r254544) > @@ -159,6 +159,8 @@ static int vm_max_launder = 32; > static int vm_pageout_update_period; > static int defer_swap_pageouts; > static int disable_swap_pageouts; > +static int lowmem_period = 10; > +static int lowmem_ticks; > > #if defined(NO_SWAPPING) > static int vm_swap_enabled = 0; > @@ -179,6 +181,9 @@ SYSCTL_INT(_vm, OID_AUTO, pageout_update > CTLFLAG_RW, &vm_pageout_update_period, 0, > "Maximum active LRU update period"); > > +SYSCTL_INT(_vm, OID_AUTO, lowmem_period, CTLFLAG_RW, &lowmem_period, 0, > + "Low memory callback period"); > + > #if defined(NO_SWAPPING) > SYSCTL_INT(_vm, VM_SWAPPING_ENABLED, swap_enabled, > CTLFLAG_RD, &vm_swap_enabled, 0, "Enable entire process swapout"); > @@ -901,9 +906,10 @@ vm_pageout_scan(struct vm_domain *vmd, i > > /* > * If we need to reclaim memory ask kernel caches to return > - * some. > + * some. We rate limit to avoid thrashing. > */ > - if (pass > 0) { > + if (vmd == &vm_dom[0] && pass > 0 && > + lowmem_ticks + (lowmem_period * hz) < ticks) { > /* > * Decrease registered cache sizes. > */ > @@ -913,6 +919,7 @@ vm_pageout_scan(struct vm_domain *vmd, i > * drained above. > */ > uma_reclaim(); > + lowmem_ticks = ticks; > } > > /* > @@ -1680,10 +1687,11 @@ vm_pageout(void) > > /* > * Set interval in seconds for active scan. We want to visit each > - * page at least once a minute. > + * page at least once every ten minutes. This is to prevent worst > + * case paging behaviors with stale active LRU. > */ > if (vm_pageout_update_period == 0) > - vm_pageout_update_period = 60; > + vm_pageout_update_period = 600; > > /* XXX does not really belong here */ > if (vm_page_max_wired == 0) > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 11:13:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A5564F5; Mon, 20 Jan 2014 11:13:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A1FFA1F95; Mon, 20 Jan 2014 11:13:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KBD5jk026824; Mon, 20 Jan 2014 11:13:05 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KBD5g9026822; Mon, 20 Jan 2014 11:13:05 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201401201113.s0KBD5g9026822@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 20 Jan 2014 11:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260904 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 11:13:06 -0000 Author: des Date: Mon Jan 20 11:13:05 2014 New Revision: 260904 URL: http://svnweb.freebsd.org/changeset/base/260904 Log: Fix format string. Submitted by: Jörg Sonnenberger MFC after: 1 week Modified: head/lib/libfetch/common.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Mon Jan 20 07:09:19 2014 (r260903) +++ head/lib/libfetch/common.c Mon Jan 20 11:13:05 2014 (r260904) @@ -679,7 +679,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX if (getenv("SSL_NO_TLS1") != NULL) ssl_ctx_options |= SSL_OP_NO_TLSv1; if (verbose) - fetch_info("SSL options: %x", ssl_ctx_options); + fetch_info("SSL options: %lx", ssl_ctx_options); SSL_CTX_set_options(ctx, ssl_ctx_options); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 14:37:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C59CD410; Mon, 20 Jan 2014 14:37:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9658F1678; Mon, 20 Jan 2014 14:37:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KEb3wF014299; Mon, 20 Jan 2014 14:37:03 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KEb3Ae014297; Mon, 20 Jan 2014 14:37:03 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201401201437.s0KEb3Ae014297@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 20 Jan 2014 14:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260906 - in stable/10: sbin/kldload share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 14:37:03 -0000 Author: bapt Date: Mon Jan 20 14:37:02 2014 New Revision: 260906 URL: http://svnweb.freebsd.org/changeset/base/260906 Log: MFH: r260483, r260484, r260594, r260595, r260596, r260597 Improve error message shown to the user when trying to load a module that is already loaded or compiled withing the kernel Point the user to dmesg(1) to get informations about why loading a module did fail instead of printing the cryptic "Exec format error" Update the BUGS section of kld(4) according the recent changes in kldload(8) Modified: stable/10/sbin/kldload/kldload.c stable/10/share/man/man4/kld.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/kldload/kldload.c ============================================================================== --- stable/10/sbin/kldload/kldload.c Mon Jan 20 12:11:47 2014 (r260905) +++ stable/10/sbin/kldload/kldload.c Mon Jan 20 14:37:02 2014 (r260906) @@ -181,7 +181,22 @@ main(int argc, char** argv) printf("%s is already " "loaded\n", argv[0]); } else { - warn("can't load %s", argv[0]); + switch (errno) { + case EEXIST: + warnx("can't load %s: module " + "already loaded or " + "in kernel", argv[0]); + break; + case ENOEXEC: + warnx("an error occurred while " + "loading the module. " + "Please check dmesg(8) for " + "more details."); + break; + default: + warn("can't load %s", argv[0]); + break; + } errors++; } } else { Modified: stable/10/share/man/man4/kld.4 ============================================================================== --- stable/10/share/man/man4/kld.4 Mon Jan 20 12:11:47 2014 (r260905) +++ stable/10/share/man/man4/kld.4 Mon Jan 20 14:37:02 2014 (r260906) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 1998 +.Dd January 13, 2014 .Dt KLD 4 .Os .Sh NAME @@ -166,8 +166,8 @@ binary, then fails to execute the entry point. .Pp .Xr kldload 8 -returns the cryptic message -.Sq Li "ENOEXEC (Exec format error)" +points the user to read +.Xr dmesg 8 for any error encountered while loading a module. .Pp When system internal interfaces change, old modules often cannot From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 15:33:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEE8B151; Mon, 20 Jan 2014 15:33:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A068A1B04; Mon, 20 Jan 2014 15:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KFXW94037233; Mon, 20 Jan 2014 15:33:32 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KFXWh6037228; Mon, 20 Jan 2014 15:33:32 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201401201533.s0KFXWh6037228@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 20 Jan 2014 15:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260909 - in stable/9: sbin/kldload share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:33:32 -0000 Author: bapt Date: Mon Jan 20 15:33:31 2014 New Revision: 260909 URL: http://svnweb.freebsd.org/changeset/base/260909 Log: MFH: r260483, r260484, r260594, r260595, r260596, r260597 Improve error message shown to the user when trying to load a module that is already loaded or compiled withing the kernel Point the user to dmesg(1) to get informations about why loading a module did fail instead of printing the cryptic "Exec format error" Update the BUGS section of kld(4) according the recent changes in kldload(8) Modified: stable/9/sbin/kldload/kldload.c stable/9/share/man/man4/kld.4 Directory Properties: stable/9/sbin/ (props changed) stable/9/sbin/kldload/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/sbin/kldload/kldload.c ============================================================================== --- stable/9/sbin/kldload/kldload.c Mon Jan 20 15:00:21 2014 (r260908) +++ stable/9/sbin/kldload/kldload.c Mon Jan 20 15:33:31 2014 (r260909) @@ -181,7 +181,22 @@ main(int argc, char** argv) printf("%s is already " "loaded\n", argv[0]); } else { - warn("can't load %s", argv[0]); + switch (errno) { + case EEXIST: + warnx("can't load %s: module " + "already loaded or " + "in kernel", argv[0]); + break; + case ENOEXEC: + warnx("an error occurred while " + "loading the module. " + "Please check dmesg(8) for " + "more details."); + break; + default: + warn("can't load %s", argv[0]); + break; + } errors++; } } else { Modified: stable/9/share/man/man4/kld.4 ============================================================================== --- stable/9/share/man/man4/kld.4 Mon Jan 20 15:00:21 2014 (r260908) +++ stable/9/share/man/man4/kld.4 Mon Jan 20 15:33:31 2014 (r260909) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 1998 +.Dd January 13, 2014 .Dt KLD 4 .Os .Sh NAME @@ -166,8 +166,8 @@ binary, then fails to execute the entry point. .Pp .Xr kldload 8 -returns the cryptic message -.Sq Li "ENOEXEC (Exec format error)" +points the user to read +.Xr dmesg 8 for any error encountered while loading a module. .Pp When system internal interfaces change, old modules often cannot From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 15:51:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3173A81A; Mon, 20 Jan 2014 15:51:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1190B1D9F; Mon, 20 Jan 2014 15:51:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KFp27T044322; Mon, 20 Jan 2014 15:51:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KFp2VT044319; Mon, 20 Jan 2014 15:51:02 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401201551.s0KFp2VT044319@svn.freebsd.org> From: John Baldwin Date: Mon, 20 Jan 2014 15:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260910 - head/usr.sbin/pciconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:51:03 -0000 Author: jhb Date: Mon Jan 20 15:51:02 2014 New Revision: 260910 URL: http://svnweb.freebsd.org/changeset/base/260910 Log: - Allow PCI devices that are attached to a driver to be identified by their device name instead of just the selector. - Accept an optional device argument to -l to restrict the output to only listing details about a single device. This is mostly useful in conjunction with other flags like -e or -c to allow a user to query details about a single device. MFC after: 1 week Modified: head/usr.sbin/pciconf/pciconf.8 head/usr.sbin/pciconf/pciconf.c Modified: head/usr.sbin/pciconf/pciconf.8 ============================================================================== --- head/usr.sbin/pciconf/pciconf.8 Mon Jan 20 15:33:31 2014 (r260909) +++ head/usr.sbin/pciconf/pciconf.8 Mon Jan 20 15:51:02 2014 (r260910) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 1, 2012 +.Dd January 20, 2014 .Dt PCICONF 8 .Os .Sh NAME @@ -33,13 +33,13 @@ .Nd diagnostic utility for the PCI bus .Sh SYNOPSIS .Nm -.Fl l Op Fl bcev +.Fl l Oo Fl bcev Oc Op Ar device .Nm -.Fl a Ar selector +.Fl a Ar device .Nm -.Fl r Oo Fl b | h Oc Ar selector addr Ns Op : Ns Ar addr2 +.Fl r Oo Fl b | h Oc Ar device addr Ns Op : Ns Ar addr2 .Nm -.Fl w Oo Fl b | h Oc Ar selector addr value +.Fl w Oo Fl b | h Oc Ar device addr value .Sh DESCRIPTION The .Nm @@ -54,7 +54,9 @@ normally only the super-user. .Pp With the .Fl l -option, it lists all devices found by the boot probe in the following format: +option, +.Nm +lists PCI devices in the following format: .Bd -literal foo0@pci0:0:4:0: class=0x010000 card=0x00000000 chip=0x000f1000 rev=0x01 \ hdr=0x00 @@ -65,16 +67,14 @@ hdr=0x00 .Ed .Pp The first column gives the -device name, unit number, and -.Ar selector . -If there is no device configured in the kernel for the +driver name, unit number, and selector . +If there is no driver attached to the .Tn PCI -device in question, the device name will be +device in question, the driver name will be .Dq none . -Unit numbers for unconfigured devices start at zero and are incremented for -each unconfigured device that is encountered. -The -.Ar selector +Unit numbers for detached devices start at zero and are incremented for +each detached device that is encountered. +The selector is in a form which may directly be used for the other forms of the command. The second column is the class code, with the class byte printed as two hex digits, followed by the sub-class and the interface bytes. @@ -182,18 +182,36 @@ option is supplied, will attempt to load the vendor/device information database, and print vendor, device, class and subclass identification strings for each device. .Pp +If the optional +.Ar device +argument is given with the +.Fl l +flag, +.Nm +will only list details about a single device instead of all devices. +.Pp All invocations of .Nm except for .Fl l require a -.Ar selector -of the form +.Ar device . +The device can be identified either by a device name if the device is +attached to a driver or by a selector. +Selectors identify a PCI device by its address in PCI config space and +can take one of the following forms: +.Pp +.Bl -bullet -offset indent -compact +.It .Li pci Ns Va domain Ns \&: Ns Va bus Ns \&: Ns Va device Ns \&: \ -Ns Va function Ns , -.Li pci Ns Va bus Ns \&: Ns Va device Ns \&: Ns Va function Ns , or -.Li pci Ns Va bus Ns \&: Ns Va device Ns . -In case of an abridged form, omitted selector components are assumed to be 0. +Ns Va function Ns +.It +.Li pci Ns Va bus Ns \&: Ns Va device Ns \&: Ns Va function Ns +.It +.Li pci Ns Va bus Ns \&: Ns Va device Ns +.El +.Pp +In the case of an abridged form, omitted selector components are assumed to be 0. An optional leading device name followed by @ and an optional final colon will be ignored; this is so that the first column in the output of .Nm Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Mon Jan 20 15:33:31 2014 (r260909) +++ head/usr.sbin/pciconf/pciconf.c Mon Jan 20 15:51:02 2014 (r260910) @@ -35,6 +35,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -67,8 +68,10 @@ struct pci_vendor_info TAILQ_HEAD(,pci_vendor_info) pci_vendors; +static struct pcisel getsel(const char *str); static void list_bars(int fd, struct pci_conf *p); -static void list_devs(int verbose, int bars, int caps, int errors); +static void list_devs(const char *name, int verbose, int bars, int caps, + int errors); static void list_verbose(struct pci_conf *p); static const char *guess_class(struct pci_conf *p); static const char *guess_subclass(struct pci_conf *p); @@ -83,10 +86,10 @@ static void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n", - "usage: pciconf -l [-bcev]", - " pciconf -a selector", - " pciconf -r [-b | -h] selector addr[:addr2]", - " pciconf -w [-b | -h] selector addr value"); + "usage: pciconf -l [-bcev] [device]", + " pciconf -a device", + " pciconf -r [-b | -h] device addr[:addr2]", + " pciconf -w [-b | -h] device addr value"); exit (1); } @@ -145,14 +148,15 @@ main(int argc, char **argv) } } - if ((listmode && optind != argc) + if ((listmode && optind >= argc + 1) || (writemode && optind + 3 != argc) || (readmode && optind + 2 != argc) || (attachedmode && optind + 1 != argc)) usage(); if (listmode) { - list_devs(verbose, bars, caps, errors); + list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose, + bars, caps, errors); } else if (attachedmode) { chkattached(argv[optind]); } else if (readmode) { @@ -169,11 +173,12 @@ main(int argc, char **argv) } static void -list_devs(int verbose, int bars, int caps, int errors) +list_devs(const char *name, int verbose, int bars, int caps, int errors) { int fd; struct pci_conf_io pc; struct pci_conf conf[255], *p; + struct pci_match_conf patterns[1]; int none_count = 0; if (verbose) @@ -186,6 +191,16 @@ list_devs(int verbose, int bars, int cap bzero(&pc, sizeof(struct pci_conf_io)); pc.match_buf_len = sizeof(conf); pc.matches = conf; + if (name != NULL) { + bzero(&patterns, sizeof(patterns)); + patterns[0].pc_sel = getsel(name); + patterns[0].flags = PCI_GETCONF_MATCH_DOMAIN | + PCI_GETCONF_MATCH_BUS | PCI_GETCONF_MATCH_DEV | + PCI_GETCONF_MATCH_FUNC; + pc.num_patterns = 1; + pc.pat_buf_len = sizeof(patterns); + pc.patterns = patterns; + } do { if (ioctl(fd, PCIOCGETCONF, &pc) == -1) @@ -557,7 +572,61 @@ read_config(int fd, struct pcisel *sel, } static struct pcisel -getsel(const char *str) +getdevice(const char *name) +{ + struct pci_conf_io pc; + struct pci_conf conf[1]; + struct pci_match_conf patterns[1]; + char *cp; + int fd; + + fd = open(_PATH_DEVPCI, O_RDONLY, 0); + if (fd < 0) + err(1, "%s", _PATH_DEVPCI); + + bzero(&pc, sizeof(struct pci_conf_io)); + pc.match_buf_len = sizeof(conf); + pc.matches = conf; + + bzero(&patterns, sizeof(patterns)); + + /* + * The pattern structure requires the unit to be split out from + * the driver name. Walk backwards from the end of the name to + * find the start of the unit. + */ + if (name[0] == '\0') + err(1, "Empty device name"); + cp = strchr(name, '\0'); + assert(cp != NULL && cp != name); + cp--; + while (cp != name && isdigit(cp[-1])) + cp--; + if (cp == name) + errx(1, "Invalid device name"); + if ((size_t)(cp - name) + 1 > sizeof(patterns[0].pd_name)) + errx(1, "Device name i2s too long"); + memcpy(patterns[0].pd_name, name, cp - name); + patterns[0].pd_unit = strtol(cp, &cp, 10); + assert(*cp == '\0'); + patterns[0].flags = PCI_GETCONF_MATCH_NAME | PCI_GETCONF_MATCH_UNIT; + pc.num_patterns = 1; + pc.pat_buf_len = sizeof(patterns); + pc.patterns = patterns; + + if (ioctl(fd, PCIOCGETCONF, &pc) == -1) + err(1, "ioctl(PCIOCGETCONF)"); + if (pc.status != PCI_GETCONF_LAST_DEVICE && + pc.status != PCI_GETCONF_MORE_DEVS) + errx(1, "error returned from PCIOCGETCONF ioctl"); + close(fd); + if (pc.num_matches == 0) + errx(1, "Device not found"); + return (conf[0].pc_sel); +} + +static struct pcisel +parsesel(const char *str) { char *ep = strchr(str, '@'); char *epbase; @@ -595,6 +664,20 @@ getsel(const char *str) return sel; } +static struct pcisel +getsel(const char *str) +{ + + /* + * No device names contain colons and selectors always contain + * at least one colon. + */ + if (strchr(str, ':') == NULL) + return (getdevice(str)); + else + return (parsesel(str)); +} + static void readone(int fd, struct pcisel *sel, long reg, int width) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 17:44:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29AB2DA for ; Mon, 20 Jan 2014 17:44:44 +0000 (UTC) Received: from mail-pd0-x241.google.com (mail-pd0-x241.google.com [IPv6:2607:f8b0:400e:c02::241]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 02B54184A for ; Mon, 20 Jan 2014 17:44:43 +0000 (UTC) Received: by mail-pd0-f193.google.com with SMTP id q10so3532124pdj.4 for ; Mon, 20 Jan 2014 09:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:reply-to:subject:date; bh=Iyk2K6fvYNLbDPkOF2p5SQgAED667GVP56ua58RI4bE=; b=vhyYpQudPQhxe4DmOFYkoQtWtWRC+PWyTsqlUZrkBPME0bLfBzuqR/bemSqpnzNzi6 DR4ieOOSbG1mpZEJgCOi99P99TFxGCq04Z8kHZNid7C75qv6VYQFsEO49BzNj0NQM8XR MCkYqkmT01fnek+8cGAHs/QFC+N9ruw3QHJgkLCJffTzQUoOIF1UcwInkuuD7LJXQPhb 1h/CNLXj3wtaFBtHW2kwET2TCwpJWHeVanBWKRPD4zyOizQ0t/hfNb4BSLUnKYsbgrQ4 HjBIKCidK+17DxNow+dqY3dohJblGswwWOJpzBx+JIq7sAbmjbBuKKS4nne971hLKvYf CDtQ== X-Received: by 10.66.191.131 with SMTP id gy3mr2815126pac.152.1390239883632; Mon, 20 Jan 2014 09:44:43 -0800 (PST) Received: from localhost.localdomain ([124.253.33.120]) by mx.google.com with ESMTPSA id sx8sm7619303pab.5.2014.01.20.09.44.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 20 Jan 2014 09:44:42 -0800 (PST) Message-ID: <52dd608a.e891420a.21da.ffffd6c3@mx.google.com> From: billie06258@gmail.com To: svn-src-all@freebsd.org Subject: RE: LOCAL MAP OPTIMIZATION FOR : mail-archive.com (Less Than $99/Month) Date: Mon, 20 Jan 2014 23:14:43 +0530 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: LORI76557@gmail.com 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 Jan 2014 17:44:44 -0000 Good Morning Sir / Mam Is your business ranking in local maps shown on PAGE 1 of google ? With new google policies they have specifically asked local business owners to optimize their website for local maps rather than JUST organics. Do you know the reason why you are not ranked well on google MAPs or why there is drop in your website rankings? Prime reason for bad rankings for a busniess is lack of local presence and local citations ie getting your business listed on directories like YELP, MANTA & Many more. These websites not just give your business a push but also help you Maintain a good Online Reputation. Why you need to optimize your website for local MAP Listings ? - MAP listings get 10 times more clicks than organic listings - Increased conversions because of real reviews posted on your Google Plus Page - Every year there is 30% increase in searches for local keywords - Increases legitimacy of a Business We will help you get your website ranked well on google for the related keywords in your niche. We specialize in LOCAL SEARCH ENGINE OPTIMIZATION increasing visibility for small businesses by ranking them for geographically-related keywords. Say for eg-: you want to search a plumber in your city, You will be typing in keywords like Plumbers + City Or Plumbers + IN + City. We make sure your website comes in google MAP listings shown on page 1 for each such keyword. Now Google believes in - BE ORIGINAL, HAVE ORIGINAL AND GIVE ORIGINAL which means that google wants to end up that frustrating experience of users who are searching for Service Or Product and seeing the results that are not even close to what they are looking for. Google only wants to give their user original and relevant results. This makes it even more important that we showcase our business in the best possible way and make sure our website in valued high by google. We at TheLOCALIST will make google feel the importance of your business by following their guidelines thus ranking your website higher in serach results. We are presently offering LOCAL OPTIMIZATION to more than 400 websites and they all rank page 1 for all possible keywords !!! Each month your website is submitted to more than 50 citations and social presence is controlled by posting videos and blogs all over the web. Email us back with your website & phone number so we can discuss this further with you. Our Packages start from as low as 99$/month. Thanks For Taking Time To Read Our Email Polly Martin Local SEO Manager ( THE Localist ) Address : 24 ST Suite 32 Downtown Provo Utah ------------------- NOT INTERESTED ? REPLY WITH NOT INTERESTED IN THE SUBJECT LINE From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 17:45:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B740912A; Mon, 20 Jan 2014 17:45:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A28661855; Mon, 20 Jan 2014 17:45:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KHjap4089268; Mon, 20 Jan 2014 17:45:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KHjaZT089267; Mon, 20 Jan 2014 17:45:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401201745.s0KHjaZT089267@svn.freebsd.org> From: Warner Losh Date: Mon, 20 Jan 2014 17:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260911 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:45:36 -0000 Author: imp Date: Mon Jan 20 17:45:36 2014 New Revision: 260911 URL: http://svnweb.freebsd.org/changeset/base/260911 Log: Don't lock in the generic grab just to lock again in the specific grabs. (I committed the wrong version of uart_core.c, which still had this). Pointy hat: imp Modified: head/sys/dev/uart/uart_core.c Modified: head/sys/dev/uart/uart_core.c ============================================================================== --- head/sys/dev/uart/uart_core.c Mon Jan 20 15:51:02 2014 (r260910) +++ head/sys/dev/uart/uart_core.c Mon Jan 20 17:45:36 2014 (r260911) @@ -629,18 +629,14 @@ void uart_grab(struct uart_devinfo *di) { - uart_lock(di->hwmtx); if (di->sc) UART_GRAB(di->sc); - uart_unlock(di->hwmtx); } void uart_ungrab(struct uart_devinfo *di) { - uart_lock(di->hwmtx); if (di->sc) UART_UNGRAB(di->sc); - uart_unlock(di->hwmtx); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 17:55:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA7825D8; Mon, 20 Jan 2014 17:55:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 96E6B192B; Mon, 20 Jan 2014 17:55:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KHtMjg093631; Mon, 20 Jan 2014 17:55:22 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KHtMh6093630; Mon, 20 Jan 2014 17:55:22 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401201755.s0KHtMh6093630@svn.freebsd.org> From: John Baldwin Date: Mon, 20 Jan 2014 17:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260912 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:55:22 -0000 Author: jhb Date: Mon Jan 20 17:55:22 2014 New Revision: 260912 URL: http://svnweb.freebsd.org/changeset/base/260912 Log: - Only check the ivars for direct descendants. - A couple of whitespace fixes. Modified: head/sys/x86/x86/nexus.c Modified: head/sys/x86/x86/nexus.c ============================================================================== --- head/sys/x86/x86/nexus.c Mon Jan 20 17:45:36 2014 (r260911) +++ head/sys/x86/x86/nexus.c Mon Jan 20 17:55:22 2014 (r260912) @@ -368,12 +368,13 @@ nexus_alloc_resource(device_t bus, devic int needactivate = flags & RF_ACTIVE; /* - * If this is an allocation of the "default" range for a given RID, and - * we know what the resources for this device are (ie. they aren't maintained - * by a child bus), then work out the start/end values. + * If this is an allocation of the "default" range for a given + * RID, and we know what the resources for this device are + * (ie. they aren't maintained by a child bus), then work out + * the start/end values. */ if ((start == 0UL) && (end == ~0UL) && (count == 1)) { - if (ndev == NULL) + if (device_get_parent(child) != bus || ndev == NULL) return(NULL); rle = resource_list_find(&ndev->nx_resources, type, *rid); if (rle == NULL) @@ -492,6 +493,7 @@ static int nexus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { + if (rman_get_flags(r) & RF_ACTIVE) { int error = bus_deactivate_resource(child, type, rid, r); if (error) From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 18:15:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55986DCC; Mon, 20 Jan 2014 18:15:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 40EA51AC7; Mon, 20 Jan 2014 18:15:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KIF74S003079; Mon, 20 Jan 2014 18:15:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KIF6MO003070; Mon, 20 Jan 2014 18:15:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201401201815.s0KIF6MO003070@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 20 Jan 2014 18:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260913 - in head: include lib/libc/gen libexec/getty X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:15:07 -0000 Author: nwhitehorn Date: Mon Jan 20 18:15:06 2014 New Revision: 260913 URL: http://svnweb.freebsd.org/changeset/base/260913 Log: Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Comments and suggestions by: grehan, dteske, jilles MFC after: 1 month Modified: head/include/ttyent.h head/lib/libc/gen/getttyent.c head/libexec/getty/ttys.5 Modified: head/include/ttyent.h ============================================================================== --- head/include/ttyent.h Mon Jan 20 17:55:22 2014 (r260912) +++ head/include/ttyent.h Mon Jan 20 18:15:06 2014 (r260913) @@ -37,6 +37,7 @@ #define _TTYS_OFF "off" #define _TTYS_ON "on" +#define _TTYS_ONIFCONSOLE "onifconsole" #define _TTYS_SECURE "secure" #define _TTYS_INSECURE "insecure" #define _TTYS_WINDOW "window" Modified: head/lib/libc/gen/getttyent.c ============================================================================== --- head/lib/libc/gen/getttyent.c Mon Jan 20 17:55:22 2014 (r260912) +++ head/lib/libc/gen/getttyent.c Mon Jan 20 18:15:06 2014 (r260913) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + static char zapchar; static FILE *tf; static size_t lbsize; @@ -64,6 +67,36 @@ getttynam(const char *tty) return (t); } +static int +auto_tty_status(const char *ty_name) +{ + size_t len; + char *buf, *cons, *nextcons; + + /* Check if this is an enabled kernel console line */ + buf = NULL; + if (sysctlbyname("kern.console", NULL, &len, NULL, 0) == -1) + return (0); /* Errors mean don't enable */ + buf = malloc(len); + if (sysctlbyname("kern.console", buf, &len, NULL, 0) == -1) + goto done; + + if ((cons = strchr(buf, '/')) == NULL) + goto done; + *cons = '\0'; + nextcons = buf; + while ((cons = strsep(&nextcons, ",")) != NULL && strlen(cons) != 0) { + if (strcmp(cons, ty_name) == 0) { + free(buf); + return (TTY_ON); + } + } + +done: + free(buf); + return (0); +} + struct ttyent * getttyent(void) { @@ -126,6 +159,8 @@ getttyent(void) tty.ty_status &= ~TTY_ON; else if (scmp(_TTYS_ON)) tty.ty_status |= TTY_ON; + else if (scmp(_TTYS_ONIFCONSOLE)) + tty.ty_status |= auto_tty_status(tty.ty_name); else if (scmp(_TTYS_SECURE)) tty.ty_status |= TTY_SECURE; else if (scmp(_TTYS_INSECURE)) Modified: head/libexec/getty/ttys.5 ============================================================================== --- head/libexec/getty/ttys.5 Mon Jan 20 17:55:22 2014 (r260912) +++ head/libexec/getty/ttys.5 Mon Jan 20 18:15:06 2014 (r260913) @@ -102,8 +102,11 @@ ttys as a group. .Pp As flag values, the strings ``on'' and ``off'' specify that .Xr init 8 -should (should not) execute the command given in the second field, -while ``secure'' (if ``on'' is also specified) allows users with a +should (should not) execute the command given in the second field. +``onifconsole'' will cause this line to be enabled if and only if it is +an active kernel console device (it is equivalent to ``on'' in this +case). +The flag ``secure'' (if the console is enabled) allows users with a uid of 0 to login on this line. The flag ``dialin'' indicates that a tty entry describes a dialin From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 18:37:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E119BF7; Mon, 20 Jan 2014 18:37:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A57F1D8E; Mon, 20 Jan 2014 18:37:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KIbZfc012461; Mon, 20 Jan 2014 18:37:35 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KIbZGY012460; Mon, 20 Jan 2014 18:37:35 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201401201837.s0KIbZGY012460@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 20 Jan 2014 18:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260914 - head/sys/ia64/ia64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:37:35 -0000 Author: marcel Date: Mon Jan 20 18:37:35 2014 New Revision: 260914 URL: http://svnweb.freebsd.org/changeset/base/260914 Log: In pmap_set_pte(), make sure to enforce ordering by inserting a memory fence. Under system load, the CPU has been found to change the order by which the stores are made visible. When the tag is made visible before the other TLB values, other CPUs may use the invalid TLB values and do bad things. While here (i.e. not a fix) don't return errors from pmap_remove_vhpt() to callers of pmap_remove_pte(). Those callers don't check the return value and as such don't do what is needed to keep a consistent state. More importantly, pmap_remove_vhpt() can't really have an error without it indicating something unintended. Using KASSERT is therefore better. PR: 182999, 183227 Modified: head/sys/ia64/ia64/pmap.c Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Mon Jan 20 18:15:06 2014 (r260913) +++ head/sys/ia64/ia64/pmap.c Mon Jan 20 18:37:35 2014 (r260914) @@ -1303,6 +1303,8 @@ pmap_set_pte(struct ia64_lpte *pte, vm_o pte->itir = PAGE_SHIFT << 2; + ia64_mf(); + pte->tag = ia64_ttag(va); } @@ -1321,8 +1323,8 @@ pmap_remove_pte(pmap_t pmap, struct ia64 * First remove from the VHPT. */ error = pmap_remove_vhpt(va); - if (error) - return (error); + KASSERT(error == 0, ("%s: pmap_remove_vhpt returned %d", + __func__, error)); pmap_invalidate_page(va); From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 18:47:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 623277AE; Mon, 20 Jan 2014 18:47:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 433851EA8; Mon, 20 Jan 2014 18:47:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KIlvs2016666; Mon, 20 Jan 2014 18:47:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KIlv0k016665; Mon, 20 Jan 2014 18:47:57 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401201847.s0KIlv0k016665@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 20 Jan 2014 18:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260915 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:47:57 -0000 Author: glebius Date: Mon Jan 20 18:47:56 2014 New Revision: 260915 URL: http://svnweb.freebsd.org/changeset/base/260915 Log: ANSIfy declarations. Ok'ed by: alc Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Mon Jan 20 18:37:35 2014 (r260914) +++ head/sys/vm/vnode_pager.c Mon Jan 20 18:47:56 2014 (r260915) @@ -244,8 +244,7 @@ retry: * The object must be locked. */ static void -vnode_pager_dealloc(object) - vm_object_t object; +vnode_pager_dealloc(vm_object_t object) { struct vnode *vp; int refs; @@ -280,11 +279,8 @@ vnode_pager_dealloc(object) } static boolean_t -vnode_pager_haspage(object, pindex, before, after) - vm_object_t object; - vm_pindex_t pindex; - int *before; - int *after; +vnode_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, + int *after) { struct vnode *vp = object->handle; daddr_t bn; @@ -363,9 +359,7 @@ vnode_pager_haspage(object, pindex, befo * operation (possibly at object termination time), so we must be careful. */ void -vnode_pager_setsize(vp, nsize) - struct vnode *vp; - vm_ooffset_t nsize; +vnode_pager_setsize(struct vnode *vp, vm_ooffset_t nsize) { vm_object_t object; vm_page_t m; @@ -490,9 +484,7 @@ vnode_pager_addr(struct vnode *vp, vm_oo * small block filesystem vnode pager input */ static int -vnode_pager_input_smlfs(object, m) - vm_object_t object; - vm_page_t m; +vnode_pager_input_smlfs(vm_object_t object, vm_page_t m) { struct vnode *vp; struct bufobj *bo; @@ -584,9 +576,7 @@ vnode_pager_input_smlfs(object, m) * old style vnode pager input routine */ static int -vnode_pager_input_old(object, m) - vm_object_t object; - vm_page_t m; +vnode_pager_input_old(vm_object_t object, vm_page_t m) { struct uio auio; struct iovec aiov; @@ -659,11 +649,7 @@ vnode_pager_input_old(object, m) * backing vp's VOP_GETPAGES. */ static int -vnode_pager_getpages(object, m, count, reqpage) - vm_object_t object; - vm_page_t *m; - int count; - int reqpage; +vnode_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) { int rtval; struct vnode *vp; @@ -683,11 +669,8 @@ vnode_pager_getpages(object, m, count, r * own vnodes if they fail to implement VOP_GETPAGES. */ int -vnode_pager_generic_getpages(vp, m, bytecount, reqpage) - struct vnode *vp; - vm_page_t *m; - int bytecount; - int reqpage; +vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int bytecount, + int reqpage) { vm_object_t object; vm_offset_t kva; @@ -1024,12 +1007,8 @@ vnode_pager_generic_getpages(vp, m, byte * backing vp's VOP_PUTPAGES. */ static void -vnode_pager_putpages(object, m, count, sync, rtvals) - vm_object_t object; - vm_page_t *m; - int count; - boolean_t sync; - int *rtvals; +vnode_pager_putpages(vm_object_t object, vm_page_t *m, int count, + boolean_t sync, int *rtvals) { int rtval; struct vnode *vp; From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 19:37:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E348F81; Mon, 20 Jan 2014 19:37:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85A3812EE; Mon, 20 Jan 2014 19:37:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KJbgS4036907; Mon, 20 Jan 2014 19:37:42 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KJbcoM036886; Mon, 20 Jan 2014 19:37:38 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401201937.s0KJbcoM036886@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 20 Jan 2014 19:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260918 - in stable/10/contrib/gcc: . cp doc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:37:42 -0000 Author: pfg Date: Mon Jan 20 19:37:38 2014 New Revision: 260918 URL: http://svnweb.freebsd.org/changeset/base/260918 Log: MFC r260014, r260099: gcc: Add support for label attributes and "unavailable" attribute. Apple GCC has extensions to support for both label attributes and an "unavailable" attribute. These are critical for objc but are also useful in regular C/C++. Obtained from: Apple GCC 4.2 - 5531 Added: stable/10/contrib/gcc/ChangeLog.apple - copied unchanged from r260014, head/contrib/gcc/ChangeLog.apple stable/10/contrib/gcc/cp/ChangeLog.apple - copied unchanged from r260014, head/contrib/gcc/cp/ChangeLog.apple Modified: stable/10/contrib/gcc/c-common.c stable/10/contrib/gcc/c-decl.c stable/10/contrib/gcc/c-parser.c stable/10/contrib/gcc/c-tree.h stable/10/contrib/gcc/c-typeck.c stable/10/contrib/gcc/cp/cp-gimplify.c stable/10/contrib/gcc/cp/cp-tree.def stable/10/contrib/gcc/cp/cp-tree.h stable/10/contrib/gcc/cp/decl.c stable/10/contrib/gcc/cp/dump.c stable/10/contrib/gcc/cp/init.c stable/10/contrib/gcc/cp/parser.c stable/10/contrib/gcc/cp/pt.c stable/10/contrib/gcc/cp/semantics.c stable/10/contrib/gcc/doc/extend.texi stable/10/contrib/gcc/dwarf2out.c stable/10/contrib/gcc/emit-rtl.c stable/10/contrib/gcc/final.c stable/10/contrib/gcc/print-rtl.c stable/10/contrib/gcc/print-tree.c stable/10/contrib/gcc/rtl.def stable/10/contrib/gcc/rtl.h stable/10/contrib/gcc/stmt.c stable/10/contrib/gcc/toplev.c stable/10/contrib/gcc/toplev.h stable/10/contrib/gcc/tree-cfg.c stable/10/contrib/gcc/tree.h Directory Properties: stable/10/ (props changed) Copied: stable/10/contrib/gcc/ChangeLog.apple (from r260014, head/contrib/gcc/ChangeLog.apple) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/gcc/ChangeLog.apple Mon Jan 20 19:37:38 2014 (r260918, copy of r260014, head/contrib/gcc/ChangeLog.apple) @@ -0,0 +1,51 @@ +006-02-15 Fariborz Jahanian + + Radar 4445586 + * c-common.def (DO_STMT): Takes an extra argument. + +/* APPLE LOCAL merge marger */ +/* Stuff under is in fsf mainline, but not in the 4.2 branch */ + +2007-08-02 Geoffrey Keating + + Radar 3274130, 5295549 + * c-parser.c (c_parser_while_statement): Handle attributes. + (c_parser_do_statement): Handle attributes. + (c_parser_for_statement): Handle attributes. + * c-common.c (handle_unused_attribute): Warn if a statement + is marked as unused. + * c-tree.h (c_finish_loop): Add extra parameter. + * c-typeck.c (c_finish_loop): Handle attributes. + * doc/extend.texi (Attribute Syntax): Document statement attributes. + (Label Attributes): Explain how they apply to statements. + * tree-cfg.c (cleanup_dead_labels): Preserve labels with + user-specified alignment or attributes. + * stmt.c (expand_label): Update and correct documentation. + + * c-common.c (handle_aligned_attribute): Handle LABEL_DECL. + * rtl.def (CODE_LABEL): Add 8th operand. + * rtl.h (LABEL_ALIGN_LOG): New. + (LABEL_MAX_SKIP): New. + (SET_LABEL_ALIGN): New. + * emit-rtl.c (gen_label_rtx): Adjust. + * print-rtl.c (print_rtx): Print LABEL_ALIGN_LOG. + * stmt.c (label_rtx): Set CODE_LABEL's alignment from DECL_ALIGN. + (expand_label): Update documentation. + * final.c (struct label_alignment): Delete. + (label_align): Delete. + (min_labelno): Delete. + (max_labelno): Delete. + (LABEL_TO_ALIGNMENT): Delete. + (LABEL_TO_MAX_SKIP): Delete. + (label_to_alignment): Adjust for LABEL_ALIGN_LOG. + (align_fuzz): Likewise. + (compute_alignments): Likewise. + (shorten_branches): Remove code to set up label_align. + Adjust for LABEL_ALIGN_LOG. + (final_scan_insn): Adjust for LABEL_ALIGN_LOG. + * doc/extend.texi (C Extensions): Add 'Label Attributes' to menu. + (Attribute Syntax): Move label content to Label Attributes. + (Function Attributes): Mention label attributes. + (Variable Attributes): Mention label attributes. + (Type Attributes): Mention label attributes. + (Label Attributes): New. Modified: stable/10/contrib/gcc/c-common.c ============================================================================== --- stable/10/contrib/gcc/c-common.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/c-common.c Mon Jan 20 19:37:38 2014 (r260918) @@ -541,6 +541,9 @@ static tree handle_pure_attribute (tree static tree handle_novops_attribute (tree *, tree, tree, int, bool *); static tree handle_deprecated_attribute (tree *, tree, tree, int, bool *); +/* APPLE LOCAL begin "unavailable" attribute (Radar 2809697) --ilr */ +static tree handle_unavailable_attribute (tree *, tree, tree, int, bool *); +/* APPLE LOCAL end "unavailable" attribute --ilr */ static tree handle_vector_size_attribute (tree *, tree, tree, int, bool *); static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *); @@ -626,6 +629,10 @@ const struct attribute_spec c_common_att handle_novops_attribute }, { "deprecated", 0, 0, false, false, false, handle_deprecated_attribute }, + /* APPLE LOCAL begin "unavailable" attribute (Radar 2809697) --ilr */ + { "unavailable", 0, 0, false, false, false, + handle_unavailable_attribute }, + /* APPLE LOCAL end "unavailable" attribute --ilr */ { "vector_size", 1, 1, false, true, false, handle_vector_size_attribute }, { "visibility", 1, 1, false, false, false, @@ -4394,7 +4401,10 @@ handle_unused_attribute (tree *node, tre if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL - || TREE_CODE (decl) == LABEL_DECL +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + || (TREE_CODE (decl) == LABEL_DECL + && ! DECL_ARTIFICIAL (decl)) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ || TREE_CODE (decl) == TYPE_DECL) TREE_USED (decl) = 1; else @@ -4842,7 +4852,10 @@ handle_aligned_attribute (tree *node, tr TYPE_USER_ALIGN (*type) = 1; } else if (! VAR_OR_FUNCTION_DECL_P (decl) - && TREE_CODE (decl) != FIELD_DECL) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + && TREE_CODE (decl) != FIELD_DECL + && TREE_CODE (decl) != LABEL_DECL) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { error ("alignment may not be specified for %q+D", decl); *no_add_attrs = true; @@ -5345,6 +5358,69 @@ handle_deprecated_attribute (tree *node, return NULL_TREE; } +/* APPLE LOCAL begin "unavailable" attribute (Radar 2809697) --ilr */ +/* Handle a "unavailable" attribute; arguments as in + struct attribute_spec.handler. */ + +static tree +handle_unavailable_attribute (tree *node, tree name, + tree args ATTRIBUTE_UNUSED, + int flags ATTRIBUTE_UNUSED, + bool *no_add_attrs) +{ + tree type = NULL_TREE; + int warn = 0; + const char *what = NULL; + + if (DECL_P (*node)) + { + tree decl = *node; + type = TREE_TYPE (decl); + + if (TREE_CODE (decl) == TYPE_DECL + || TREE_CODE (decl) == PARM_DECL + || TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == FIELD_DECL) + /* Removed radar 3803157 - objc attribute */ + { + TREE_UNAVAILABLE (decl) = 1; + } + else + warn = 1; + } + else if (TYPE_P (*node)) + { + if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + *node = build_variant_type_copy (*node); + TREE_UNAVAILABLE (*node) = 1; + type = *node; + } + else + warn = 1; + + if (warn) + { + *no_add_attrs = true; + if (type && TYPE_NAME (type)) + { + if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) + what = IDENTIFIER_POINTER (TYPE_NAME (*node)); + else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL + && DECL_NAME (TYPE_NAME (type))) + what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); + } + if (what) + warning (0, "`%s' attribute ignored for `%s'", + IDENTIFIER_POINTER (name), what); + else + warning (0, "`%s' attribute ignored", IDENTIFIER_POINTER (name)); + } + + return NULL_TREE; +} +/* APPLE LOCAL end "unavailable" attribute --ilr */ + /* Handle a "vector_size" attribute; arguments as in struct attribute_spec.handler. */ Modified: stable/10/contrib/gcc/c-decl.c ============================================================================== --- stable/10/contrib/gcc/c-decl.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/c-decl.c Mon Jan 20 19:37:38 2014 (r260918) @@ -453,10 +453,17 @@ add_stmt (tree t) with __attribute__((deprecated)). An object declared as __attribute__((deprecated)) suppresses warnings of uses of other deprecated items. */ +/* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ +/* Also add an __attribute__((unavailable)). An object declared as + __attribute__((unavailable)) suppresses any reports of being + declared with unavailable or deprecated items. */ +/* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ enum deprecated_states { DEPRECATED_NORMAL, DEPRECATED_SUPPRESS + /* APPLE LOCAL "unavailable" attribute (radar 2809697) */ + , DEPRECATED_UNAVAILABLE_SUPPRESS }; static enum deprecated_states deprecated_state = DEPRECATED_NORMAL; @@ -1709,6 +1716,12 @@ merge_decls (tree newdecl, tree olddecl, if (TREE_DEPRECATED (newdecl)) TREE_DEPRECATED (olddecl) = 1; + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + /* Merge unavailableness. */ + if (TREE_UNAVAILABLE (newdecl)) + TREE_UNAVAILABLE (olddecl) = 1; + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ + /* Keep source location of definition rather than declaration and of prototype rather than non-prototype unless that prototype is built-in. */ @@ -3222,8 +3235,36 @@ start_decl (struct c_declarator *declara /* An object declared as __attribute__((deprecated)) suppresses warnings of uses of other deprecated items. */ + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + /* An object declared as __attribute__((unavailable)) suppresses + any reports of being declared with unavailable or deprecated + items. An object declared as __attribute__((deprecated)) + suppresses warnings of uses of other deprecated items. */ +#ifdef A_LESS_INEFFICENT_WAY /* which I really don't want to do! */ if (lookup_attribute ("deprecated", attributes)) deprecated_state = DEPRECATED_SUPPRESS; + else if (lookup_attribute ("unavailable", attributes)) + deprecated_state = DEPRECATED_UNAVAILABLE_SUPPRESS; +#else /* a more efficient way doing what lookup_attribute would do */ + tree a; + + for (a = attributes; a; a = TREE_CHAIN (a)) + { + tree name = TREE_PURPOSE (a); + if (TREE_CODE (name) == IDENTIFIER_NODE) + if (is_attribute_p ("deprecated", name)) + { + deprecated_state = DEPRECATED_SUPPRESS; + break; + } + if (is_attribute_p ("unavailable", name)) + { + deprecated_state = DEPRECATED_UNAVAILABLE_SUPPRESS; + break; + } + } +#endif + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ decl = grokdeclarator (declarator, declspecs, NORMAL, initialized, NULL); @@ -4087,6 +4128,11 @@ grokdeclarator (const struct c_declarato /* If this looks like a function definition, make it one, even if it occurs where parms are expected. Then store_parm_decls will reject it and not use it as a parm. */ + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + if (declspecs->unavailable_p) + error_unavailable_use (declspecs->type); + else + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ if (decl_context == NORMAL && !funcdef_flag && current_scope->parm_flag) decl_context = PARM; @@ -7267,6 +7313,8 @@ build_null_declspecs (void) ret->tag_defined_p = false; ret->explicit_signed_p = false; ret->deprecated_p = false; + /* APPLE LOCAL "unavailable" attribute (radar 2809697) */ + ret->unavailable_p = false; ret->default_int_p = false; ret->long_p = false; ret->long_long_p = false; @@ -7330,6 +7378,11 @@ declspecs_add_type (struct c_declspecs * if (TREE_DEPRECATED (type)) specs->deprecated_p = true; + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + if (TREE_UNAVAILABLE (type)) + specs->unavailable_p = true; + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ + /* Handle type specifier keywords. */ if (TREE_CODE (type) == IDENTIFIER_NODE && C_IS_RESERVED_WORD (type)) { Modified: stable/10/contrib/gcc/c-parser.c ============================================================================== --- stable/10/contrib/gcc/c-parser.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/c-parser.c Mon Jan 20 19:37:38 2014 (r260918) @@ -3940,16 +3940,25 @@ c_parser_switch_statement (c_parser *par /* Parse a while statement (C90 6.6.5, C99 6.8.5). while-statement: - while (expression) statement + APPLE LOCAL begin for-fsf-4_4 3274130 5295549 + while attributes (expression) statement + + The use of attributes is a GNU extension. + APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ static void c_parser_while_statement (c_parser *parser) { - tree block, cond, body, save_break, save_cont; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree block, cond, body, save_break, save_cont, attrs; +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ location_t loc; gcc_assert (c_parser_next_token_is_keyword (parser, RID_WHILE)); c_parser_consume_token (parser); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + attrs = c_parser_attributes (parser); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ block = c_begin_compound_stmt (flag_isoc99); loc = c_parser_peek_token (parser)->location; cond = c_parser_paren_condition (parser); @@ -3958,7 +3967,10 @@ c_parser_while_statement (c_parser *pars save_cont = c_cont_label; c_cont_label = NULL_TREE; body = c_parser_c99_block_statement (parser); - c_finish_loop (loc, cond, NULL, body, c_break_label, c_cont_label, true); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + c_finish_loop (loc, cond, NULL, body, c_break_label, c_cont_label, attrs, + true); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (c_end_compound_stmt (block, flag_isoc99)); c_break_label = save_break; c_cont_label = save_cont; @@ -3967,16 +3979,25 @@ c_parser_while_statement (c_parser *pars /* Parse a do statement (C90 6.6.5, C99 6.8.5). do-statement: - do statement while ( expression ) ; + APPLE LOCAL begin for-fsf-4_4 3274130 5295549 + do attributes statement while ( expression ) ; + + The use of attributes is a GNU extension. + APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ static void c_parser_do_statement (c_parser *parser) { - tree block, cond, body, save_break, save_cont, new_break, new_cont; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree block, cond, body, save_break, save_cont, new_break, new_cont, attrs; +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ location_t loc; gcc_assert (c_parser_next_token_is_keyword (parser, RID_DO)); c_parser_consume_token (parser); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + attrs = c_parser_attributes (parser); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ block = c_begin_compound_stmt (flag_isoc99); loc = c_parser_peek_token (parser)->location; save_break = c_break_label; @@ -3992,18 +4013,26 @@ c_parser_do_statement (c_parser *parser) cond = c_parser_paren_condition (parser); if (!c_parser_require (parser, CPP_SEMICOLON, "expected %<;%>")) c_parser_skip_to_end_of_block_or_statement (parser); - c_finish_loop (loc, cond, NULL, body, new_break, new_cont, false); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + c_finish_loop (loc, cond, NULL, body, new_break, new_cont, attrs, false); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (c_end_compound_stmt (block, flag_isoc99)); } /* Parse a for statement (C90 6.6.5, C99 6.8.5). for-statement: - for ( expression[opt] ; expression[opt] ; expression[opt] ) statement - for ( nested-declaration expression[opt] ; expression[opt] ) statement + APPLE LOCAL begin for-fsf-4_4 3274130 5295549 + for attributes ( expression[opt] ; expression[opt] ; expression[opt] ) \ + statement + for attributes ( nested-declaration expression[opt] ; expression[opt] ) \ + statement The form with a declaration is new in C99. + The use of attributes is a GNU extension. + + APPLE LOCAL end for-fsf-4_4 3274130 5295549 ??? In accordance with the old parser, the declaration may be a nested function, which is then rejected in check_for_loop_decls, but does it make any sense for this to be included in the grammar? @@ -4015,11 +4044,16 @@ c_parser_do_statement (c_parser *parser) static void c_parser_for_statement (c_parser *parser) { - tree block, cond, incr, save_break, save_cont, body; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree block, cond, incr, save_break, save_cont, body, attrs; +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ location_t loc; gcc_assert (c_parser_next_token_is_keyword (parser, RID_FOR)); loc = c_parser_peek_token (parser)->location; c_parser_consume_token (parser); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + attrs = c_parser_attributes (parser); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ block = c_begin_compound_stmt (flag_isoc99); if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) { @@ -4094,7 +4128,10 @@ c_parser_for_statement (c_parser *parser save_cont = c_cont_label; c_cont_label = NULL_TREE; body = c_parser_c99_block_statement (parser); - c_finish_loop (loc, cond, incr, body, c_break_label, c_cont_label, true); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + c_finish_loop (loc, cond, incr, body, c_break_label, c_cont_label, attrs, + true); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (c_end_compound_stmt (block, flag_isoc99)); c_break_label = save_break; c_cont_label = save_cont; Modified: stable/10/contrib/gcc/c-tree.h ============================================================================== --- stable/10/contrib/gcc/c-tree.h Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/c-tree.h Mon Jan 20 19:37:38 2014 (r260918) @@ -257,6 +257,10 @@ struct c_declspecs { BOOL_BITFIELD explicit_signed_p : 1; /* Whether the specifiers include a deprecated typedef. */ BOOL_BITFIELD deprecated_p : 1; + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + /* Whether the specifiers include a unavailable typedef. */ + BOOL_BITFIELD unavailable_p : 1; + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ /* Whether the type defaulted to "int" because there were no type specifiers. */ BOOL_BITFIELD default_int_p; @@ -573,7 +577,10 @@ extern int c_types_compatible_p (tree, t extern tree c_begin_compound_stmt (bool); extern tree c_end_compound_stmt (tree, bool); extern void c_finish_if_stmt (location_t, tree, tree, tree, bool); -extern void c_finish_loop (location_t, tree, tree, tree, tree, tree, bool); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +extern void c_finish_loop (location_t, tree, tree, tree, tree, tree, tree, + bool); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ extern tree c_begin_stmt_expr (void); extern tree c_finish_stmt_expr (tree); extern tree c_process_expr_stmt (tree); Modified: stable/10/contrib/gcc/c-typeck.c ============================================================================== --- stable/10/contrib/gcc/c-typeck.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/c-typeck.c Mon Jan 20 19:37:38 2014 (r260918) @@ -1849,6 +1849,11 @@ build_component_ref (tree datum, tree co if (TREE_DEPRECATED (subdatum)) warn_deprecated_use (subdatum); + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + if (TREE_UNAVAILABLE (subdatum)) + error_unavailable_use (subdatum); + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ + datum = ref; field = TREE_CHAIN (field); @@ -2090,6 +2095,11 @@ build_external_ref (tree id, int fun, lo if (TREE_DEPRECATED (ref)) warn_deprecated_use (ref); + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + if (TREE_UNAVAILABLE (ref)) + error_unavailable_use (ref); + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ + if (!skip_evaluation) assemble_external (ref); TREE_USED (ref) = 1; @@ -7247,15 +7257,22 @@ c_finish_if_stmt (location_t if_locus, t add_stmt (stmt); } -/* Emit a general-purpose loop construct. START_LOCUS is the location of - the beginning of the loop. COND is the loop condition. COND_IS_FIRST - is false for DO loops. INCR is the FOR increment expression. BODY is - the statement controlled by the loop. BLAB is the break label. CLAB is - the continue label. Everything is allowed to be NULL. */ +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +/* Emit a general-purpose loop construct. START_LOCUS is the location + of the beginning of the loop. COND is the loop condition. + COND_IS_FIRST is false for DO loops. INCR is the FOR increment + expression. BODY is the statement controlled by the loop. BLAB is + the break label. CLAB is the continue label. ATTRS is the + attributes associated with the loop, which at present are + associated with the topmost label. Everything is allowed to be + NULL. */ +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ void c_finish_loop (location_t start_locus, tree cond, tree incr, tree body, - tree blab, tree clab, bool cond_is_first) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree blab, tree clab, tree attrs, bool cond_is_first) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { tree entry = NULL, exit = NULL, t; Copied: stable/10/contrib/gcc/cp/ChangeLog.apple (from r260014, head/contrib/gcc/cp/ChangeLog.apple) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/gcc/cp/ChangeLog.apple Mon Jan 20 19:37:38 2014 (r260918, copy of r260014, head/contrib/gcc/cp/ChangeLog.apple) @@ -0,0 +1,31 @@ +2006-02-15 Fariborz Jahanian + + Radar 4445586 + * semantics.c (begin_do_stmt): DO_STMT nodes take an + extra argument to build. + + # APPLE LOCAL begin for-fsf-4_4 3274130 5295549 +2007-08-03 Geoffrey Keating + + Radar 5295549 + * parser.c (cp_parser_iteration_statement): Handle attributes. + * semantics.c (begin_for_stmt): Put attributes in built tree. + (begin_while_stmt): Put attributes in built tree. + (begin_do_stmt): Put attributes in built tree. + * pt.c (tsubst_expr): Handle attributes for FOR_STMT, WHILE_STMT, + DO_STMT. + * cp-gimplify.c (gimplify_cp_loop): Handle attributes. + (gimplify_for_stmt): Pass attributes to gimplify_cp_loop. + (gimplify_while_stmt): Pass attributes to gimplify_cp_loop. + (gimplify_do_stmt): Pass attributes to gimplify_cp_loop. + * dump.c (cp_dump_tree): Dump attributes for FOR_STMT, WHILE_STMT, + DO_STMT. + * cp-tree.h (begin_while_stmt): Update prototype. + (begin_do_stmt): Likewise. + (begin_for_stmt): Likewise. + * cp-tree.def (FOR_STMT): Add extra parameter. + (WHILE_STMT): Likewise. + (DO_STMT): Likewise. + * init.c (build_vec_init): Update for change to begin_for_stmt. + + # APPLE LOCAL end for-fsf-4_4 3274130 5295549 Modified: stable/10/contrib/gcc/cp/cp-gimplify.c ============================================================================== --- stable/10/contrib/gcc/cp/cp-gimplify.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/cp/cp-gimplify.c Mon Jan 20 19:37:38 2014 (r260918) @@ -188,7 +188,10 @@ gimplify_if_stmt (tree *stmt_p) loop body as in do-while loops. */ static tree -gimplify_cp_loop (tree cond, tree body, tree incr, bool cond_is_first) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +gimplify_cp_loop (tree cond, tree body, tree incr, tree attrs, + bool cond_is_first, tree inner_foreach) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { tree top, entry, exit, cont_block, break_block, stmt_list, t; location_t stmt_locus; @@ -223,6 +226,12 @@ gimplify_cp_loop (tree cond, tree body, out of the loop, or to the top of it. If there's no exit condition, then we just build a jump back to the top. */ exit = build_and_jump (&LABEL_EXPR_LABEL (top)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + + /* Add the attributes to the 'top' label. */ + decl_attributes (&LABEL_EXPR_LABEL (top), attrs, 0); + +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ if (cond && !integer_nonzerop (cond)) { t = build_bc_goto (bc_break); @@ -270,8 +279,11 @@ gimplify_for_stmt (tree *stmt_p, tree *p if (FOR_INIT_STMT (stmt)) gimplify_and_add (FOR_INIT_STMT (stmt), pre_p); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ *stmt_p = gimplify_cp_loop (FOR_COND (stmt), FOR_BODY (stmt), - FOR_EXPR (stmt), 1); + FOR_EXPR (stmt), FOR_ATTRIBUTES (stmt), 1, + NULL_TREE); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ } /* Gimplify a WHILE_STMT node. */ @@ -280,8 +292,11 @@ static void gimplify_while_stmt (tree *stmt_p) { tree stmt = *stmt_p; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ *stmt_p = gimplify_cp_loop (WHILE_COND (stmt), WHILE_BODY (stmt), - NULL_TREE, 1); + NULL_TREE, WHILE_ATTRIBUTES (stmt), 1, + NULL_TREE); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ } /* Gimplify a DO_STMT node. */ @@ -290,8 +305,11 @@ static void gimplify_do_stmt (tree *stmt_p) { tree stmt = *stmt_p; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ *stmt_p = gimplify_cp_loop (DO_COND (stmt), DO_BODY (stmt), - NULL_TREE, 0); + NULL_TREE, DO_ATTRIBUTES (stmt), 0, + DO_FOREACH (stmt)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ } /* Genericize a SWITCH_STMT by turning it into a SWITCH_EXPR. */ Modified: stable/10/contrib/gcc/cp/cp-tree.def ============================================================================== --- stable/10/contrib/gcc/cp/cp-tree.def Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/cp/cp-tree.def Mon Jan 20 19:37:38 2014 (r260918) @@ -281,18 +281,23 @@ DEFTREECODE (CLEANUP_STMT, "cleanup_stmt and COND_EXPR for the benefit of templates. */ DEFTREECODE (IF_STMT, "if_stmt", tcc_statement, 3) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ /* Used to represent a `for' statement. The operands are - FOR_INIT_STMT, FOR_COND, FOR_EXPR, and FOR_BODY, respectively. */ -DEFTREECODE (FOR_STMT, "for_stmt", tcc_statement, 4) + FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY and FOR_ATTRIBUTES + respectively. */ +DEFTREECODE (FOR_STMT, "for_stmt", tcc_statement, 5) /* Used to represent a 'while' statement. The operands are WHILE_COND - and WHILE_BODY, respectively. */ -DEFTREECODE (WHILE_STMT, "while_stmt", tcc_statement, 2) + WHILE_BODY, and WHILE_ATTRIBUTES respectively. */ +DEFTREECODE (WHILE_STMT, "while_stmt", tcc_statement, 3) -/* Used to represent a 'do' statement. The operands are DO_BODY and - DO_COND, respectively. */ -DEFTREECODE (DO_STMT, "do_stmt", tcc_statement, 2) +/* APPLE LOCAL begin radar 4445586 */ +/* Used to represent a 'do' statement. The operands are DO_BODY, + DO_COND, DO_ATTRIBUTES, and DO_FOREACH respectively. */ +DEFTREECODE (DO_STMT, "do_stmt", tcc_statement, 4) +/* APPLE LOCAL end radar 4445586 */ +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* Used to represent a 'break' statement. */ DEFTREECODE (BREAK_STMT, "break_stmt", tcc_statement, 0) Modified: stable/10/contrib/gcc/cp/cp-tree.h ============================================================================== --- stable/10/contrib/gcc/cp/cp-tree.h Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/cp/cp-tree.h Mon Jan 20 19:37:38 2014 (r260918) @@ -3080,12 +3080,24 @@ extern void decl_shadowed_for_var_insert while statement and the body of the while statement, respectively. */ #define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0) #define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +#define WHILE_ATTRIBUTES(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 2) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* DO_STMT accessors. These give access to the condition of the do statement and the body of the do statement, respectively. */ #define DO_COND(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 0) #define DO_BODY(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 1) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +#define DO_ATTRIBUTES(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 2) +/* APPLE LOCAL begin C* language */ +/* Used as a flag to indicate synthesized inner do-while loop of a + foreach statement. Used for generation of break/continue statement + of the loop. */ +#define DO_FOREACH(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 3) +/* APPLE LOCAL end C* language */ +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* FOR_STMT accessors. These give access to the init statement, condition, update expression, and body of the for statement, respectively. */ @@ -3093,7 +3105,10 @@ extern void decl_shadowed_for_var_insert #define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1) #define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2) #define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +#define FOR_ATTRIBUTES(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 4) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ #define SWITCH_STMT_COND(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 0) #define SWITCH_STMT_BODY(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 1) #define SWITCH_STMT_TYPE(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 2) @@ -4258,14 +4273,20 @@ extern tree finish_then_clause (tree); extern void begin_else_clause (tree); extern void finish_else_clause (tree); extern void finish_if_stmt (tree); -extern tree begin_while_stmt (void); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +extern tree begin_while_stmt (tree); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ extern void finish_while_stmt_cond (tree, tree); extern void finish_while_stmt (tree); -extern tree begin_do_stmt (void); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +extern tree begin_do_stmt (tree); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ extern void finish_do_body (tree); extern void finish_do_stmt (tree, tree); extern tree finish_return_stmt (tree); -extern tree begin_for_stmt (void); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +extern tree begin_for_stmt (tree); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ extern void finish_for_init_stmt (tree); extern void finish_for_cond (tree, tree); extern void finish_for_expr (tree, tree); Modified: stable/10/contrib/gcc/cp/decl.c ============================================================================== --- stable/10/contrib/gcc/cp/decl.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/cp/decl.c Mon Jan 20 19:37:38 2014 (r260918) @@ -232,10 +232,17 @@ int function_depth; with __attribute__((deprecated)). An object declared as __attribute__((deprecated)) suppresses warnings of uses of other deprecated items. */ +/* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ +/* An object declared as __attribute__((unavailable)) suppresses + any reports of being declared with unavailable or deprecated + items. */ +/* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ enum deprecated_states { DEPRECATED_NORMAL, DEPRECATED_SUPPRESS + /* APPLE LOCAL "unavailable" attribute (radar 2809697) */ + , DEPRECATED_UNAVAILABLE_SUPPRESS }; static enum deprecated_states deprecated_state = DEPRECATED_NORMAL; @@ -3836,14 +3843,40 @@ start_decl (const cp_declarator *declara tree decl; tree type, tem; tree context; + /* APPLE LOCAL "unavailable" attribute (radar 2809697) */ + tree a; bool was_public; *pushed_scope_p = NULL_TREE; - /* An object declared as __attribute__((deprecated)) suppresses - warnings of uses of other deprecated items. */ + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + /* An object declared as __attribute__((unavailable)) suppresses + any reports of being declared with unavailable or deprecated + items. An object declared as __attribute__((deprecated)) + suppresses warnings of uses of other deprecated items. */ +#ifdef A_LESS_INEFFICENT_WAY /* which I really don't want to do! */ if (lookup_attribute ("deprecated", attributes)) deprecated_state = DEPRECATED_SUPPRESS; + else if (lookup_attribute ("unavailable", attributes)) + deprecated_state = DEPRECATED_UNAVAILABLE_SUPPRESS; +#else /* a more efficient way doing what lookup_attribute would do */ + for (a = attributes; a; a = TREE_CHAIN (a)) + { + tree name = TREE_PURPOSE (a); + if (TREE_CODE (name) == IDENTIFIER_NODE) + if (is_attribute_p ("deprecated", name)) + { + deprecated_state = DEPRECATED_SUPPRESS; + break; + } + if (is_attribute_p ("unavailable", name)) + { + deprecated_state = DEPRECATED_UNAVAILABLE_SUPPRESS; + break; + } + } +#endif + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ attributes = chainon (attributes, prefix_attributes); @@ -7274,6 +7307,19 @@ grokdeclarator (const cp_declarator *dec type = NULL_TREE; type_was_error_mark_node = true; } + + /* APPLE LOCAL begin unavailable attribute (radar 2809697) --bowdidge */ + /* If the entire declaration is itself tagged as unavailable then + suppress reports of unavailable/deprecated items. If the + entire declaration is tagged as only deprecated we still + report unavailable uses. */ + if (type && TREE_DEPRECATED (type) && TREE_UNAVAILABLE (type)) + { + if (deprecated_state != DEPRECATED_UNAVAILABLE_SUPPRESS) + warn_deprecated_use (type); + } + else + /* APPLE LOCAL end unavailable attribute (radar 2809697) --bowdidge */ /* If the entire declaration is itself tagged as deprecated then suppress reports of deprecated items. */ if (type && TREE_DEPRECATED (type) Modified: stable/10/contrib/gcc/cp/dump.c ============================================================================== --- stable/10/contrib/gcc/cp/dump.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/cp/dump.c Mon Jan 20 19:37:38 2014 (r260918) @@ -433,6 +433,9 @@ cp_dump_tree (void* dump_info, tree t) dump_stmt (di, t); dump_child ("body", DO_BODY (t)); dump_child ("cond", DO_COND (t)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + dump_child ("attrs", DO_ATTRIBUTES (t)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ break; case FOR_STMT: @@ -441,6 +444,9 @@ cp_dump_tree (void* dump_info, tree t) dump_child ("cond", FOR_COND (t)); dump_child ("expr", FOR_EXPR (t)); dump_child ("body", FOR_BODY (t)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + dump_child ("attrs", FOR_ATTRIBUTES (t)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ break; case SWITCH_STMT: @@ -453,6 +459,9 @@ cp_dump_tree (void* dump_info, tree t) dump_stmt (di, t); dump_child ("cond", WHILE_COND (t)); dump_child ("body", WHILE_BODY (t)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + dump_child ("attrs", WHILE_ATTRIBUTES (t)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ break; case STMT_EXPR: Modified: stable/10/contrib/gcc/cp/init.c ============================================================================== --- stable/10/contrib/gcc/cp/init.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/cp/init.c Mon Jan 20 19:37:38 2014 (r260918) @@ -2563,7 +2563,9 @@ build_vec_init (tree base, tree maxindex tree elt_init; tree to; - for_stmt = begin_for_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + for_stmt = begin_for_stmt (NULL_TREE); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ finish_for_init_stmt (for_stmt); finish_for_cond (build2 (NE_EXPR, boolean_type_node, iterator, build_int_cst (TREE_TYPE (iterator), -1)), Modified: stable/10/contrib/gcc/cp/parser.c ============================================================================== --- stable/10/contrib/gcc/cp/parser.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/cp/parser.c Mon Jan 20 19:37:38 2014 (r260918) @@ -6787,6 +6787,16 @@ cp_parser_condition (cp_parser* parser) for ( for-init-statement condition [opt] ; expression [opt] ) statement + APPLE LOCAL begin for-fsf-4_4 3274130 5295549 + GNU extension: + + while attributes [opt] ( condition ) statement + do attributes [opt] statement while ( expression ) ; + for attributes [opt] + ( for-init-statement condition [opt] ; expression [opt] ) + statement + + APPLE LOCAL end for-fsf-4_4 3274130 5295549 Returns the new WHILE_STMT, DO_STMT, or FOR_STMT. */ static tree @@ -6794,10 +6804,14 @@ cp_parser_iteration_statement (cp_parser { cp_token *token; enum rid keyword; - tree statement; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree statement, attributes; +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ unsigned char in_statement; - /* Peek at the next token. */ +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + /* Get the keyword at the start of the loop. */ +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ token = cp_parser_require (parser, CPP_KEYWORD, "iteration-statement"); if (!token) return error_mark_node; @@ -6806,6 +6820,11 @@ cp_parser_iteration_statement (cp_parser statement. */ in_statement = parser->in_statement; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + /* Parse the attributes, if any. */ + attributes = cp_parser_attributes_opt (parser); + +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* See what kind of keyword it is. */ keyword = token->keyword; switch (keyword) @@ -6815,7 +6834,9 @@ cp_parser_iteration_statement (cp_parser tree condition; /* Begin the while-statement. */ - statement = begin_while_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + statement = begin_while_stmt (attributes); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* Look for the `('. */ cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); /* Parse the condition. */ @@ -6837,7 +6858,9 @@ cp_parser_iteration_statement (cp_parser tree expression; /* Begin the do-statement. */ - statement = begin_do_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + statement = begin_do_stmt (attributes); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* Parse the body of the do-statement. */ parser->in_statement = IN_ITERATION_STMT; cp_parser_implicitly_scoped_statement (parser, NULL); @@ -6864,7 +6887,9 @@ cp_parser_iteration_statement (cp_parser tree expression = NULL_TREE; /* Begin the for-statement. */ - statement = begin_for_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + statement = begin_for_stmt (attributes); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* Look for the `('. */ cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); /* Parse the initialization. */ Modified: stable/10/contrib/gcc/cp/pt.c ============================================================================== --- stable/10/contrib/gcc/cp/pt.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/cp/pt.c Mon Jan 20 19:37:38 2014 (r260918) @@ -8593,8 +8593,11 @@ tsubst_expr (tree t, tree args, tsubst_f } case FOR_STMT: - stmt = begin_for_stmt (); - RECUR (FOR_INIT_STMT (t)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tmp = RECUR (FOR_ATTRIBUTES (t)); + stmt = begin_for_stmt (tmp); + RECUR (FOR_INIT_STMT (t)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ finish_for_init_stmt (stmt); tmp = RECUR (FOR_COND (t)); finish_for_cond (tmp, stmt); @@ -8605,7 +8608,10 @@ tsubst_expr (tree t, tree args, tsubst_f break; case WHILE_STMT: - stmt = begin_while_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tmp = RECUR (WHILE_ATTRIBUTES (t)); + stmt = begin_while_stmt (tmp); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ tmp = RECUR (WHILE_COND (t)); finish_while_stmt_cond (tmp, stmt); RECUR (WHILE_BODY (t)); @@ -8613,7 +8619,10 @@ tsubst_expr (tree t, tree args, tsubst_f break; case DO_STMT: - stmt = begin_do_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tmp = RECUR (DO_ATTRIBUTES (t)); + stmt = begin_do_stmt (tmp); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ RECUR (DO_BODY (t)); finish_do_body (stmt); tmp = RECUR (DO_COND (t)); Modified: stable/10/contrib/gcc/cp/semantics.c ============================================================================== --- stable/10/contrib/gcc/cp/semantics.c Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/cp/semantics.c Mon Jan 20 19:37:38 2014 (r260918) @@ -704,10 +704,14 @@ finish_if_stmt (tree if_stmt) appropriate. */ tree -begin_while_stmt (void) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +begin_while_stmt (tree attribs) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { tree r; - r = build_stmt (WHILE_STMT, NULL_TREE, NULL_TREE); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + r = build_stmt (WHILE_STMT, NULL_TREE, NULL_TREE, attribs); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (r); WHILE_BODY (r) = do_pushlevel (sk_block); begin_cond (&WHILE_COND (r)); @@ -737,9 +741,14 @@ finish_while_stmt (tree while_stmt) appropriate. */ tree -begin_do_stmt (void) -{ - tree r = build_stmt (DO_STMT, NULL_TREE, NULL_TREE); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +begin_do_stmt (tree attribs) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ +{ + /* APPLE LOCAL radar 4445586 */ +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree r = build_stmt (DO_STMT, NULL_TREE, NULL_TREE, attribs, NULL_TREE); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (r); DO_BODY (r) = push_stmt_list (); return r; @@ -803,12 +812,17 @@ finish_return_stmt (tree expr) /* Begin a for-statement. Returns a new FOR_STMT if appropriate. */ tree -begin_for_stmt (void) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +begin_for_stmt (tree attribs) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { tree r; r = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, - NULL_TREE, NULL_TREE); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + NULL_TREE, NULL_TREE, attribs); + +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ if (flag_new_for_scope > 0) TREE_CHAIN (r) = do_pushlevel (sk_for); Modified: stable/10/contrib/gcc/doc/extend.texi ============================================================================== --- stable/10/contrib/gcc/doc/extend.texi Mon Jan 20 18:59:07 2014 (r260917) +++ stable/10/contrib/gcc/doc/extend.texi Mon Jan 20 19:37:38 2014 (r260918) @@ -58,6 +58,9 @@ extensions, accepted by GCC in C89 mode * Character Escapes:: @samp{\e} stands for the character @key{ESC}. * Variable Attributes:: Specifying attributes of variables. * Type Attributes:: Specifying attributes of types. +@c APPLE LOCAL begin for-fsf-4_4 3274130 5295549 +* Label Attributes:: Specifying attributes of labels and statements. +@c APPLE LOCAL end for-fsf-4_4 3274130 5295549 * Alignment:: Inquiring about the alignment of a type or variable. * Inline:: Defining inline functions (as fast as macros). * Extended Asm:: Assembler instructions with C expressions as operands. @@ -1587,8 +1590,11 @@ attributes are currently defined for fun @code{gnu_inline} and @code{externally_visible}. Several other attributes are defined for functions on particular target systems. Other *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 19:38:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E778162; Mon, 20 Jan 2014 19:38:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 079B212FA; Mon, 20 Jan 2014 19:38:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KJcKYF037038; Mon, 20 Jan 2014 19:38:20 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KJcHpk037015; Mon, 20 Jan 2014 19:38:17 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401201938.s0KJcHpk037015@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 20 Jan 2014 19:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260919 - in stable/9/contrib/gcc: . cp doc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:38:21 -0000 Author: pfg Date: Mon Jan 20 19:38:16 2014 New Revision: 260919 URL: http://svnweb.freebsd.org/changeset/base/260919 Log: MFC r260014, r260099: gcc: Add support for label attributes and "unavailable" attribute. Apple GCC has extensions to support for both label attributes and an "unavailable" attribute. These are critical for objc but are also useful in regular C/C++. Obtained from: Apple GCC 4.2 - 5531 Added: stable/9/contrib/gcc/ChangeLog.apple - copied unchanged from r260014, head/contrib/gcc/ChangeLog.apple stable/9/contrib/gcc/cp/ChangeLog.apple - copied unchanged from r260014, head/contrib/gcc/cp/ChangeLog.apple Modified: stable/9/contrib/gcc/c-common.c stable/9/contrib/gcc/c-decl.c stable/9/contrib/gcc/c-parser.c stable/9/contrib/gcc/c-tree.h stable/9/contrib/gcc/c-typeck.c stable/9/contrib/gcc/cp/cp-gimplify.c stable/9/contrib/gcc/cp/cp-tree.def stable/9/contrib/gcc/cp/cp-tree.h stable/9/contrib/gcc/cp/decl.c stable/9/contrib/gcc/cp/dump.c stable/9/contrib/gcc/cp/init.c stable/9/contrib/gcc/cp/parser.c stable/9/contrib/gcc/cp/pt.c stable/9/contrib/gcc/cp/semantics.c stable/9/contrib/gcc/doc/extend.texi stable/9/contrib/gcc/dwarf2out.c stable/9/contrib/gcc/emit-rtl.c stable/9/contrib/gcc/final.c stable/9/contrib/gcc/print-rtl.c stable/9/contrib/gcc/print-tree.c stable/9/contrib/gcc/rtl.def stable/9/contrib/gcc/rtl.h stable/9/contrib/gcc/stmt.c stable/9/contrib/gcc/toplev.c stable/9/contrib/gcc/toplev.h stable/9/contrib/gcc/tree-cfg.c stable/9/contrib/gcc/tree.h Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Copied: stable/9/contrib/gcc/ChangeLog.apple (from r260014, head/contrib/gcc/ChangeLog.apple) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/gcc/ChangeLog.apple Mon Jan 20 19:38:16 2014 (r260919, copy of r260014, head/contrib/gcc/ChangeLog.apple) @@ -0,0 +1,51 @@ +006-02-15 Fariborz Jahanian + + Radar 4445586 + * c-common.def (DO_STMT): Takes an extra argument. + +/* APPLE LOCAL merge marger */ +/* Stuff under is in fsf mainline, but not in the 4.2 branch */ + +2007-08-02 Geoffrey Keating + + Radar 3274130, 5295549 + * c-parser.c (c_parser_while_statement): Handle attributes. + (c_parser_do_statement): Handle attributes. + (c_parser_for_statement): Handle attributes. + * c-common.c (handle_unused_attribute): Warn if a statement + is marked as unused. + * c-tree.h (c_finish_loop): Add extra parameter. + * c-typeck.c (c_finish_loop): Handle attributes. + * doc/extend.texi (Attribute Syntax): Document statement attributes. + (Label Attributes): Explain how they apply to statements. + * tree-cfg.c (cleanup_dead_labels): Preserve labels with + user-specified alignment or attributes. + * stmt.c (expand_label): Update and correct documentation. + + * c-common.c (handle_aligned_attribute): Handle LABEL_DECL. + * rtl.def (CODE_LABEL): Add 8th operand. + * rtl.h (LABEL_ALIGN_LOG): New. + (LABEL_MAX_SKIP): New. + (SET_LABEL_ALIGN): New. + * emit-rtl.c (gen_label_rtx): Adjust. + * print-rtl.c (print_rtx): Print LABEL_ALIGN_LOG. + * stmt.c (label_rtx): Set CODE_LABEL's alignment from DECL_ALIGN. + (expand_label): Update documentation. + * final.c (struct label_alignment): Delete. + (label_align): Delete. + (min_labelno): Delete. + (max_labelno): Delete. + (LABEL_TO_ALIGNMENT): Delete. + (LABEL_TO_MAX_SKIP): Delete. + (label_to_alignment): Adjust for LABEL_ALIGN_LOG. + (align_fuzz): Likewise. + (compute_alignments): Likewise. + (shorten_branches): Remove code to set up label_align. + Adjust for LABEL_ALIGN_LOG. + (final_scan_insn): Adjust for LABEL_ALIGN_LOG. + * doc/extend.texi (C Extensions): Add 'Label Attributes' to menu. + (Attribute Syntax): Move label content to Label Attributes. + (Function Attributes): Mention label attributes. + (Variable Attributes): Mention label attributes. + (Type Attributes): Mention label attributes. + (Label Attributes): New. Modified: stable/9/contrib/gcc/c-common.c ============================================================================== --- stable/9/contrib/gcc/c-common.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/c-common.c Mon Jan 20 19:38:16 2014 (r260919) @@ -541,6 +541,9 @@ static tree handle_pure_attribute (tree static tree handle_novops_attribute (tree *, tree, tree, int, bool *); static tree handle_deprecated_attribute (tree *, tree, tree, int, bool *); +/* APPLE LOCAL begin "unavailable" attribute (Radar 2809697) --ilr */ +static tree handle_unavailable_attribute (tree *, tree, tree, int, bool *); +/* APPLE LOCAL end "unavailable" attribute --ilr */ static tree handle_vector_size_attribute (tree *, tree, tree, int, bool *); static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *); @@ -626,6 +629,10 @@ const struct attribute_spec c_common_att handle_novops_attribute }, { "deprecated", 0, 0, false, false, false, handle_deprecated_attribute }, + /* APPLE LOCAL begin "unavailable" attribute (Radar 2809697) --ilr */ + { "unavailable", 0, 0, false, false, false, + handle_unavailable_attribute }, + /* APPLE LOCAL end "unavailable" attribute --ilr */ { "vector_size", 1, 1, false, true, false, handle_vector_size_attribute }, { "visibility", 1, 1, false, false, false, @@ -4394,7 +4401,10 @@ handle_unused_attribute (tree *node, tre if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL - || TREE_CODE (decl) == LABEL_DECL +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + || (TREE_CODE (decl) == LABEL_DECL + && ! DECL_ARTIFICIAL (decl)) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ || TREE_CODE (decl) == TYPE_DECL) TREE_USED (decl) = 1; else @@ -4842,7 +4852,10 @@ handle_aligned_attribute (tree *node, tr TYPE_USER_ALIGN (*type) = 1; } else if (! VAR_OR_FUNCTION_DECL_P (decl) - && TREE_CODE (decl) != FIELD_DECL) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + && TREE_CODE (decl) != FIELD_DECL + && TREE_CODE (decl) != LABEL_DECL) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { error ("alignment may not be specified for %q+D", decl); *no_add_attrs = true; @@ -5345,6 +5358,69 @@ handle_deprecated_attribute (tree *node, return NULL_TREE; } +/* APPLE LOCAL begin "unavailable" attribute (Radar 2809697) --ilr */ +/* Handle a "unavailable" attribute; arguments as in + struct attribute_spec.handler. */ + +static tree +handle_unavailable_attribute (tree *node, tree name, + tree args ATTRIBUTE_UNUSED, + int flags ATTRIBUTE_UNUSED, + bool *no_add_attrs) +{ + tree type = NULL_TREE; + int warn = 0; + const char *what = NULL; + + if (DECL_P (*node)) + { + tree decl = *node; + type = TREE_TYPE (decl); + + if (TREE_CODE (decl) == TYPE_DECL + || TREE_CODE (decl) == PARM_DECL + || TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == FIELD_DECL) + /* Removed radar 3803157 - objc attribute */ + { + TREE_UNAVAILABLE (decl) = 1; + } + else + warn = 1; + } + else if (TYPE_P (*node)) + { + if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + *node = build_variant_type_copy (*node); + TREE_UNAVAILABLE (*node) = 1; + type = *node; + } + else + warn = 1; + + if (warn) + { + *no_add_attrs = true; + if (type && TYPE_NAME (type)) + { + if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) + what = IDENTIFIER_POINTER (TYPE_NAME (*node)); + else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL + && DECL_NAME (TYPE_NAME (type))) + what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); + } + if (what) + warning (0, "`%s' attribute ignored for `%s'", + IDENTIFIER_POINTER (name), what); + else + warning (0, "`%s' attribute ignored", IDENTIFIER_POINTER (name)); + } + + return NULL_TREE; +} +/* APPLE LOCAL end "unavailable" attribute --ilr */ + /* Handle a "vector_size" attribute; arguments as in struct attribute_spec.handler. */ Modified: stable/9/contrib/gcc/c-decl.c ============================================================================== --- stable/9/contrib/gcc/c-decl.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/c-decl.c Mon Jan 20 19:38:16 2014 (r260919) @@ -453,10 +453,17 @@ add_stmt (tree t) with __attribute__((deprecated)). An object declared as __attribute__((deprecated)) suppresses warnings of uses of other deprecated items. */ +/* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ +/* Also add an __attribute__((unavailable)). An object declared as + __attribute__((unavailable)) suppresses any reports of being + declared with unavailable or deprecated items. */ +/* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ enum deprecated_states { DEPRECATED_NORMAL, DEPRECATED_SUPPRESS + /* APPLE LOCAL "unavailable" attribute (radar 2809697) */ + , DEPRECATED_UNAVAILABLE_SUPPRESS }; static enum deprecated_states deprecated_state = DEPRECATED_NORMAL; @@ -1709,6 +1716,12 @@ merge_decls (tree newdecl, tree olddecl, if (TREE_DEPRECATED (newdecl)) TREE_DEPRECATED (olddecl) = 1; + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + /* Merge unavailableness. */ + if (TREE_UNAVAILABLE (newdecl)) + TREE_UNAVAILABLE (olddecl) = 1; + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ + /* Keep source location of definition rather than declaration and of prototype rather than non-prototype unless that prototype is built-in. */ @@ -3222,8 +3235,36 @@ start_decl (struct c_declarator *declara /* An object declared as __attribute__((deprecated)) suppresses warnings of uses of other deprecated items. */ + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + /* An object declared as __attribute__((unavailable)) suppresses + any reports of being declared with unavailable or deprecated + items. An object declared as __attribute__((deprecated)) + suppresses warnings of uses of other deprecated items. */ +#ifdef A_LESS_INEFFICENT_WAY /* which I really don't want to do! */ if (lookup_attribute ("deprecated", attributes)) deprecated_state = DEPRECATED_SUPPRESS; + else if (lookup_attribute ("unavailable", attributes)) + deprecated_state = DEPRECATED_UNAVAILABLE_SUPPRESS; +#else /* a more efficient way doing what lookup_attribute would do */ + tree a; + + for (a = attributes; a; a = TREE_CHAIN (a)) + { + tree name = TREE_PURPOSE (a); + if (TREE_CODE (name) == IDENTIFIER_NODE) + if (is_attribute_p ("deprecated", name)) + { + deprecated_state = DEPRECATED_SUPPRESS; + break; + } + if (is_attribute_p ("unavailable", name)) + { + deprecated_state = DEPRECATED_UNAVAILABLE_SUPPRESS; + break; + } + } +#endif + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ decl = grokdeclarator (declarator, declspecs, NORMAL, initialized, NULL); @@ -4087,6 +4128,11 @@ grokdeclarator (const struct c_declarato /* If this looks like a function definition, make it one, even if it occurs where parms are expected. Then store_parm_decls will reject it and not use it as a parm. */ + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + if (declspecs->unavailable_p) + error_unavailable_use (declspecs->type); + else + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ if (decl_context == NORMAL && !funcdef_flag && current_scope->parm_flag) decl_context = PARM; @@ -7267,6 +7313,8 @@ build_null_declspecs (void) ret->tag_defined_p = false; ret->explicit_signed_p = false; ret->deprecated_p = false; + /* APPLE LOCAL "unavailable" attribute (radar 2809697) */ + ret->unavailable_p = false; ret->default_int_p = false; ret->long_p = false; ret->long_long_p = false; @@ -7330,6 +7378,11 @@ declspecs_add_type (struct c_declspecs * if (TREE_DEPRECATED (type)) specs->deprecated_p = true; + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + if (TREE_UNAVAILABLE (type)) + specs->unavailable_p = true; + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ + /* Handle type specifier keywords. */ if (TREE_CODE (type) == IDENTIFIER_NODE && C_IS_RESERVED_WORD (type)) { Modified: stable/9/contrib/gcc/c-parser.c ============================================================================== --- stable/9/contrib/gcc/c-parser.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/c-parser.c Mon Jan 20 19:38:16 2014 (r260919) @@ -3940,16 +3940,25 @@ c_parser_switch_statement (c_parser *par /* Parse a while statement (C90 6.6.5, C99 6.8.5). while-statement: - while (expression) statement + APPLE LOCAL begin for-fsf-4_4 3274130 5295549 + while attributes (expression) statement + + The use of attributes is a GNU extension. + APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ static void c_parser_while_statement (c_parser *parser) { - tree block, cond, body, save_break, save_cont; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree block, cond, body, save_break, save_cont, attrs; +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ location_t loc; gcc_assert (c_parser_next_token_is_keyword (parser, RID_WHILE)); c_parser_consume_token (parser); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + attrs = c_parser_attributes (parser); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ block = c_begin_compound_stmt (flag_isoc99); loc = c_parser_peek_token (parser)->location; cond = c_parser_paren_condition (parser); @@ -3958,7 +3967,10 @@ c_parser_while_statement (c_parser *pars save_cont = c_cont_label; c_cont_label = NULL_TREE; body = c_parser_c99_block_statement (parser); - c_finish_loop (loc, cond, NULL, body, c_break_label, c_cont_label, true); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + c_finish_loop (loc, cond, NULL, body, c_break_label, c_cont_label, attrs, + true); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (c_end_compound_stmt (block, flag_isoc99)); c_break_label = save_break; c_cont_label = save_cont; @@ -3967,16 +3979,25 @@ c_parser_while_statement (c_parser *pars /* Parse a do statement (C90 6.6.5, C99 6.8.5). do-statement: - do statement while ( expression ) ; + APPLE LOCAL begin for-fsf-4_4 3274130 5295549 + do attributes statement while ( expression ) ; + + The use of attributes is a GNU extension. + APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ static void c_parser_do_statement (c_parser *parser) { - tree block, cond, body, save_break, save_cont, new_break, new_cont; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree block, cond, body, save_break, save_cont, new_break, new_cont, attrs; +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ location_t loc; gcc_assert (c_parser_next_token_is_keyword (parser, RID_DO)); c_parser_consume_token (parser); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + attrs = c_parser_attributes (parser); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ block = c_begin_compound_stmt (flag_isoc99); loc = c_parser_peek_token (parser)->location; save_break = c_break_label; @@ -3992,18 +4013,26 @@ c_parser_do_statement (c_parser *parser) cond = c_parser_paren_condition (parser); if (!c_parser_require (parser, CPP_SEMICOLON, "expected %<;%>")) c_parser_skip_to_end_of_block_or_statement (parser); - c_finish_loop (loc, cond, NULL, body, new_break, new_cont, false); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + c_finish_loop (loc, cond, NULL, body, new_break, new_cont, attrs, false); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (c_end_compound_stmt (block, flag_isoc99)); } /* Parse a for statement (C90 6.6.5, C99 6.8.5). for-statement: - for ( expression[opt] ; expression[opt] ; expression[opt] ) statement - for ( nested-declaration expression[opt] ; expression[opt] ) statement + APPLE LOCAL begin for-fsf-4_4 3274130 5295549 + for attributes ( expression[opt] ; expression[opt] ; expression[opt] ) \ + statement + for attributes ( nested-declaration expression[opt] ; expression[opt] ) \ + statement The form with a declaration is new in C99. + The use of attributes is a GNU extension. + + APPLE LOCAL end for-fsf-4_4 3274130 5295549 ??? In accordance with the old parser, the declaration may be a nested function, which is then rejected in check_for_loop_decls, but does it make any sense for this to be included in the grammar? @@ -4015,11 +4044,16 @@ c_parser_do_statement (c_parser *parser) static void c_parser_for_statement (c_parser *parser) { - tree block, cond, incr, save_break, save_cont, body; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree block, cond, incr, save_break, save_cont, body, attrs; +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ location_t loc; gcc_assert (c_parser_next_token_is_keyword (parser, RID_FOR)); loc = c_parser_peek_token (parser)->location; c_parser_consume_token (parser); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + attrs = c_parser_attributes (parser); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ block = c_begin_compound_stmt (flag_isoc99); if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) { @@ -4094,7 +4128,10 @@ c_parser_for_statement (c_parser *parser save_cont = c_cont_label; c_cont_label = NULL_TREE; body = c_parser_c99_block_statement (parser); - c_finish_loop (loc, cond, incr, body, c_break_label, c_cont_label, true); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + c_finish_loop (loc, cond, incr, body, c_break_label, c_cont_label, attrs, + true); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (c_end_compound_stmt (block, flag_isoc99)); c_break_label = save_break; c_cont_label = save_cont; Modified: stable/9/contrib/gcc/c-tree.h ============================================================================== --- stable/9/contrib/gcc/c-tree.h Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/c-tree.h Mon Jan 20 19:38:16 2014 (r260919) @@ -257,6 +257,10 @@ struct c_declspecs { BOOL_BITFIELD explicit_signed_p : 1; /* Whether the specifiers include a deprecated typedef. */ BOOL_BITFIELD deprecated_p : 1; + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + /* Whether the specifiers include a unavailable typedef. */ + BOOL_BITFIELD unavailable_p : 1; + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ /* Whether the type defaulted to "int" because there were no type specifiers. */ BOOL_BITFIELD default_int_p; @@ -573,7 +577,10 @@ extern int c_types_compatible_p (tree, t extern tree c_begin_compound_stmt (bool); extern tree c_end_compound_stmt (tree, bool); extern void c_finish_if_stmt (location_t, tree, tree, tree, bool); -extern void c_finish_loop (location_t, tree, tree, tree, tree, tree, bool); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +extern void c_finish_loop (location_t, tree, tree, tree, tree, tree, tree, + bool); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ extern tree c_begin_stmt_expr (void); extern tree c_finish_stmt_expr (tree); extern tree c_process_expr_stmt (tree); Modified: stable/9/contrib/gcc/c-typeck.c ============================================================================== --- stable/9/contrib/gcc/c-typeck.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/c-typeck.c Mon Jan 20 19:38:16 2014 (r260919) @@ -1849,6 +1849,11 @@ build_component_ref (tree datum, tree co if (TREE_DEPRECATED (subdatum)) warn_deprecated_use (subdatum); + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + if (TREE_UNAVAILABLE (subdatum)) + error_unavailable_use (subdatum); + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ + datum = ref; field = TREE_CHAIN (field); @@ -2090,6 +2095,11 @@ build_external_ref (tree id, int fun, lo if (TREE_DEPRECATED (ref)) warn_deprecated_use (ref); + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + if (TREE_UNAVAILABLE (ref)) + error_unavailable_use (ref); + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ + if (!skip_evaluation) assemble_external (ref); TREE_USED (ref) = 1; @@ -7247,15 +7257,22 @@ c_finish_if_stmt (location_t if_locus, t add_stmt (stmt); } -/* Emit a general-purpose loop construct. START_LOCUS is the location of - the beginning of the loop. COND is the loop condition. COND_IS_FIRST - is false for DO loops. INCR is the FOR increment expression. BODY is - the statement controlled by the loop. BLAB is the break label. CLAB is - the continue label. Everything is allowed to be NULL. */ +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +/* Emit a general-purpose loop construct. START_LOCUS is the location + of the beginning of the loop. COND is the loop condition. + COND_IS_FIRST is false for DO loops. INCR is the FOR increment + expression. BODY is the statement controlled by the loop. BLAB is + the break label. CLAB is the continue label. ATTRS is the + attributes associated with the loop, which at present are + associated with the topmost label. Everything is allowed to be + NULL. */ +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ void c_finish_loop (location_t start_locus, tree cond, tree incr, tree body, - tree blab, tree clab, bool cond_is_first) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree blab, tree clab, tree attrs, bool cond_is_first) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { tree entry = NULL, exit = NULL, t; Copied: stable/9/contrib/gcc/cp/ChangeLog.apple (from r260014, head/contrib/gcc/cp/ChangeLog.apple) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/gcc/cp/ChangeLog.apple Mon Jan 20 19:38:16 2014 (r260919, copy of r260014, head/contrib/gcc/cp/ChangeLog.apple) @@ -0,0 +1,31 @@ +2006-02-15 Fariborz Jahanian + + Radar 4445586 + * semantics.c (begin_do_stmt): DO_STMT nodes take an + extra argument to build. + + # APPLE LOCAL begin for-fsf-4_4 3274130 5295549 +2007-08-03 Geoffrey Keating + + Radar 5295549 + * parser.c (cp_parser_iteration_statement): Handle attributes. + * semantics.c (begin_for_stmt): Put attributes in built tree. + (begin_while_stmt): Put attributes in built tree. + (begin_do_stmt): Put attributes in built tree. + * pt.c (tsubst_expr): Handle attributes for FOR_STMT, WHILE_STMT, + DO_STMT. + * cp-gimplify.c (gimplify_cp_loop): Handle attributes. + (gimplify_for_stmt): Pass attributes to gimplify_cp_loop. + (gimplify_while_stmt): Pass attributes to gimplify_cp_loop. + (gimplify_do_stmt): Pass attributes to gimplify_cp_loop. + * dump.c (cp_dump_tree): Dump attributes for FOR_STMT, WHILE_STMT, + DO_STMT. + * cp-tree.h (begin_while_stmt): Update prototype. + (begin_do_stmt): Likewise. + (begin_for_stmt): Likewise. + * cp-tree.def (FOR_STMT): Add extra parameter. + (WHILE_STMT): Likewise. + (DO_STMT): Likewise. + * init.c (build_vec_init): Update for change to begin_for_stmt. + + # APPLE LOCAL end for-fsf-4_4 3274130 5295549 Modified: stable/9/contrib/gcc/cp/cp-gimplify.c ============================================================================== --- stable/9/contrib/gcc/cp/cp-gimplify.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/cp/cp-gimplify.c Mon Jan 20 19:38:16 2014 (r260919) @@ -188,7 +188,10 @@ gimplify_if_stmt (tree *stmt_p) loop body as in do-while loops. */ static tree -gimplify_cp_loop (tree cond, tree body, tree incr, bool cond_is_first) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +gimplify_cp_loop (tree cond, tree body, tree incr, tree attrs, + bool cond_is_first, tree inner_foreach) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { tree top, entry, exit, cont_block, break_block, stmt_list, t; location_t stmt_locus; @@ -223,6 +226,12 @@ gimplify_cp_loop (tree cond, tree body, out of the loop, or to the top of it. If there's no exit condition, then we just build a jump back to the top. */ exit = build_and_jump (&LABEL_EXPR_LABEL (top)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + + /* Add the attributes to the 'top' label. */ + decl_attributes (&LABEL_EXPR_LABEL (top), attrs, 0); + +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ if (cond && !integer_nonzerop (cond)) { t = build_bc_goto (bc_break); @@ -270,8 +279,11 @@ gimplify_for_stmt (tree *stmt_p, tree *p if (FOR_INIT_STMT (stmt)) gimplify_and_add (FOR_INIT_STMT (stmt), pre_p); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ *stmt_p = gimplify_cp_loop (FOR_COND (stmt), FOR_BODY (stmt), - FOR_EXPR (stmt), 1); + FOR_EXPR (stmt), FOR_ATTRIBUTES (stmt), 1, + NULL_TREE); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ } /* Gimplify a WHILE_STMT node. */ @@ -280,8 +292,11 @@ static void gimplify_while_stmt (tree *stmt_p) { tree stmt = *stmt_p; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ *stmt_p = gimplify_cp_loop (WHILE_COND (stmt), WHILE_BODY (stmt), - NULL_TREE, 1); + NULL_TREE, WHILE_ATTRIBUTES (stmt), 1, + NULL_TREE); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ } /* Gimplify a DO_STMT node. */ @@ -290,8 +305,11 @@ static void gimplify_do_stmt (tree *stmt_p) { tree stmt = *stmt_p; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ *stmt_p = gimplify_cp_loop (DO_COND (stmt), DO_BODY (stmt), - NULL_TREE, 0); + NULL_TREE, DO_ATTRIBUTES (stmt), 0, + DO_FOREACH (stmt)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ } /* Genericize a SWITCH_STMT by turning it into a SWITCH_EXPR. */ Modified: stable/9/contrib/gcc/cp/cp-tree.def ============================================================================== --- stable/9/contrib/gcc/cp/cp-tree.def Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/cp/cp-tree.def Mon Jan 20 19:38:16 2014 (r260919) @@ -281,18 +281,23 @@ DEFTREECODE (CLEANUP_STMT, "cleanup_stmt and COND_EXPR for the benefit of templates. */ DEFTREECODE (IF_STMT, "if_stmt", tcc_statement, 3) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ /* Used to represent a `for' statement. The operands are - FOR_INIT_STMT, FOR_COND, FOR_EXPR, and FOR_BODY, respectively. */ -DEFTREECODE (FOR_STMT, "for_stmt", tcc_statement, 4) + FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY and FOR_ATTRIBUTES + respectively. */ +DEFTREECODE (FOR_STMT, "for_stmt", tcc_statement, 5) /* Used to represent a 'while' statement. The operands are WHILE_COND - and WHILE_BODY, respectively. */ -DEFTREECODE (WHILE_STMT, "while_stmt", tcc_statement, 2) + WHILE_BODY, and WHILE_ATTRIBUTES respectively. */ +DEFTREECODE (WHILE_STMT, "while_stmt", tcc_statement, 3) -/* Used to represent a 'do' statement. The operands are DO_BODY and - DO_COND, respectively. */ -DEFTREECODE (DO_STMT, "do_stmt", tcc_statement, 2) +/* APPLE LOCAL begin radar 4445586 */ +/* Used to represent a 'do' statement. The operands are DO_BODY, + DO_COND, DO_ATTRIBUTES, and DO_FOREACH respectively. */ +DEFTREECODE (DO_STMT, "do_stmt", tcc_statement, 4) +/* APPLE LOCAL end radar 4445586 */ +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* Used to represent a 'break' statement. */ DEFTREECODE (BREAK_STMT, "break_stmt", tcc_statement, 0) Modified: stable/9/contrib/gcc/cp/cp-tree.h ============================================================================== --- stable/9/contrib/gcc/cp/cp-tree.h Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/cp/cp-tree.h Mon Jan 20 19:38:16 2014 (r260919) @@ -3080,12 +3080,24 @@ extern void decl_shadowed_for_var_insert while statement and the body of the while statement, respectively. */ #define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0) #define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +#define WHILE_ATTRIBUTES(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 2) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* DO_STMT accessors. These give access to the condition of the do statement and the body of the do statement, respectively. */ #define DO_COND(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 0) #define DO_BODY(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 1) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +#define DO_ATTRIBUTES(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 2) +/* APPLE LOCAL begin C* language */ +/* Used as a flag to indicate synthesized inner do-while loop of a + foreach statement. Used for generation of break/continue statement + of the loop. */ +#define DO_FOREACH(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 3) +/* APPLE LOCAL end C* language */ +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* FOR_STMT accessors. These give access to the init statement, condition, update expression, and body of the for statement, respectively. */ @@ -3093,7 +3105,10 @@ extern void decl_shadowed_for_var_insert #define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1) #define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2) #define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +#define FOR_ATTRIBUTES(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 4) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ #define SWITCH_STMT_COND(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 0) #define SWITCH_STMT_BODY(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 1) #define SWITCH_STMT_TYPE(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 2) @@ -4258,14 +4273,20 @@ extern tree finish_then_clause (tree); extern void begin_else_clause (tree); extern void finish_else_clause (tree); extern void finish_if_stmt (tree); -extern tree begin_while_stmt (void); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +extern tree begin_while_stmt (tree); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ extern void finish_while_stmt_cond (tree, tree); extern void finish_while_stmt (tree); -extern tree begin_do_stmt (void); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +extern tree begin_do_stmt (tree); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ extern void finish_do_body (tree); extern void finish_do_stmt (tree, tree); extern tree finish_return_stmt (tree); -extern tree begin_for_stmt (void); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +extern tree begin_for_stmt (tree); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ extern void finish_for_init_stmt (tree); extern void finish_for_cond (tree, tree); extern void finish_for_expr (tree, tree); Modified: stable/9/contrib/gcc/cp/decl.c ============================================================================== --- stable/9/contrib/gcc/cp/decl.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/cp/decl.c Mon Jan 20 19:38:16 2014 (r260919) @@ -232,10 +232,17 @@ int function_depth; with __attribute__((deprecated)). An object declared as __attribute__((deprecated)) suppresses warnings of uses of other deprecated items. */ +/* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ +/* An object declared as __attribute__((unavailable)) suppresses + any reports of being declared with unavailable or deprecated + items. */ +/* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ enum deprecated_states { DEPRECATED_NORMAL, DEPRECATED_SUPPRESS + /* APPLE LOCAL "unavailable" attribute (radar 2809697) */ + , DEPRECATED_UNAVAILABLE_SUPPRESS }; static enum deprecated_states deprecated_state = DEPRECATED_NORMAL; @@ -3836,14 +3843,40 @@ start_decl (const cp_declarator *declara tree decl; tree type, tem; tree context; + /* APPLE LOCAL "unavailable" attribute (radar 2809697) */ + tree a; bool was_public; *pushed_scope_p = NULL_TREE; - /* An object declared as __attribute__((deprecated)) suppresses - warnings of uses of other deprecated items. */ + /* APPLE LOCAL begin "unavailable" attribute (radar 2809697) */ + /* An object declared as __attribute__((unavailable)) suppresses + any reports of being declared with unavailable or deprecated + items. An object declared as __attribute__((deprecated)) + suppresses warnings of uses of other deprecated items. */ +#ifdef A_LESS_INEFFICENT_WAY /* which I really don't want to do! */ if (lookup_attribute ("deprecated", attributes)) deprecated_state = DEPRECATED_SUPPRESS; + else if (lookup_attribute ("unavailable", attributes)) + deprecated_state = DEPRECATED_UNAVAILABLE_SUPPRESS; +#else /* a more efficient way doing what lookup_attribute would do */ + for (a = attributes; a; a = TREE_CHAIN (a)) + { + tree name = TREE_PURPOSE (a); + if (TREE_CODE (name) == IDENTIFIER_NODE) + if (is_attribute_p ("deprecated", name)) + { + deprecated_state = DEPRECATED_SUPPRESS; + break; + } + if (is_attribute_p ("unavailable", name)) + { + deprecated_state = DEPRECATED_UNAVAILABLE_SUPPRESS; + break; + } + } +#endif + /* APPLE LOCAL end "unavailable" attribute (radar 2809697) */ attributes = chainon (attributes, prefix_attributes); @@ -7274,6 +7307,19 @@ grokdeclarator (const cp_declarator *dec type = NULL_TREE; type_was_error_mark_node = true; } + + /* APPLE LOCAL begin unavailable attribute (radar 2809697) --bowdidge */ + /* If the entire declaration is itself tagged as unavailable then + suppress reports of unavailable/deprecated items. If the + entire declaration is tagged as only deprecated we still + report unavailable uses. */ + if (type && TREE_DEPRECATED (type) && TREE_UNAVAILABLE (type)) + { + if (deprecated_state != DEPRECATED_UNAVAILABLE_SUPPRESS) + warn_deprecated_use (type); + } + else + /* APPLE LOCAL end unavailable attribute (radar 2809697) --bowdidge */ /* If the entire declaration is itself tagged as deprecated then suppress reports of deprecated items. */ if (type && TREE_DEPRECATED (type) Modified: stable/9/contrib/gcc/cp/dump.c ============================================================================== --- stable/9/contrib/gcc/cp/dump.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/cp/dump.c Mon Jan 20 19:38:16 2014 (r260919) @@ -433,6 +433,9 @@ cp_dump_tree (void* dump_info, tree t) dump_stmt (di, t); dump_child ("body", DO_BODY (t)); dump_child ("cond", DO_COND (t)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + dump_child ("attrs", DO_ATTRIBUTES (t)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ break; case FOR_STMT: @@ -441,6 +444,9 @@ cp_dump_tree (void* dump_info, tree t) dump_child ("cond", FOR_COND (t)); dump_child ("expr", FOR_EXPR (t)); dump_child ("body", FOR_BODY (t)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + dump_child ("attrs", FOR_ATTRIBUTES (t)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ break; case SWITCH_STMT: @@ -453,6 +459,9 @@ cp_dump_tree (void* dump_info, tree t) dump_stmt (di, t); dump_child ("cond", WHILE_COND (t)); dump_child ("body", WHILE_BODY (t)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + dump_child ("attrs", WHILE_ATTRIBUTES (t)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ break; case STMT_EXPR: Modified: stable/9/contrib/gcc/cp/init.c ============================================================================== --- stable/9/contrib/gcc/cp/init.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/cp/init.c Mon Jan 20 19:38:16 2014 (r260919) @@ -2563,7 +2563,9 @@ build_vec_init (tree base, tree maxindex tree elt_init; tree to; - for_stmt = begin_for_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + for_stmt = begin_for_stmt (NULL_TREE); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ finish_for_init_stmt (for_stmt); finish_for_cond (build2 (NE_EXPR, boolean_type_node, iterator, build_int_cst (TREE_TYPE (iterator), -1)), Modified: stable/9/contrib/gcc/cp/parser.c ============================================================================== --- stable/9/contrib/gcc/cp/parser.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/cp/parser.c Mon Jan 20 19:38:16 2014 (r260919) @@ -6787,6 +6787,16 @@ cp_parser_condition (cp_parser* parser) for ( for-init-statement condition [opt] ; expression [opt] ) statement + APPLE LOCAL begin for-fsf-4_4 3274130 5295549 + GNU extension: + + while attributes [opt] ( condition ) statement + do attributes [opt] statement while ( expression ) ; + for attributes [opt] + ( for-init-statement condition [opt] ; expression [opt] ) + statement + + APPLE LOCAL end for-fsf-4_4 3274130 5295549 Returns the new WHILE_STMT, DO_STMT, or FOR_STMT. */ static tree @@ -6794,10 +6804,14 @@ cp_parser_iteration_statement (cp_parser { cp_token *token; enum rid keyword; - tree statement; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree statement, attributes; +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ unsigned char in_statement; - /* Peek at the next token. */ +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + /* Get the keyword at the start of the loop. */ +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ token = cp_parser_require (parser, CPP_KEYWORD, "iteration-statement"); if (!token) return error_mark_node; @@ -6806,6 +6820,11 @@ cp_parser_iteration_statement (cp_parser statement. */ in_statement = parser->in_statement; +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + /* Parse the attributes, if any. */ + attributes = cp_parser_attributes_opt (parser); + +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* See what kind of keyword it is. */ keyword = token->keyword; switch (keyword) @@ -6815,7 +6834,9 @@ cp_parser_iteration_statement (cp_parser tree condition; /* Begin the while-statement. */ - statement = begin_while_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + statement = begin_while_stmt (attributes); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* Look for the `('. */ cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); /* Parse the condition. */ @@ -6837,7 +6858,9 @@ cp_parser_iteration_statement (cp_parser tree expression; /* Begin the do-statement. */ - statement = begin_do_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + statement = begin_do_stmt (attributes); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* Parse the body of the do-statement. */ parser->in_statement = IN_ITERATION_STMT; cp_parser_implicitly_scoped_statement (parser, NULL); @@ -6864,7 +6887,9 @@ cp_parser_iteration_statement (cp_parser tree expression = NULL_TREE; /* Begin the for-statement. */ - statement = begin_for_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + statement = begin_for_stmt (attributes); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ /* Look for the `('. */ cp_parser_require (parser, CPP_OPEN_PAREN, "`('"); /* Parse the initialization. */ Modified: stable/9/contrib/gcc/cp/pt.c ============================================================================== --- stable/9/contrib/gcc/cp/pt.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/cp/pt.c Mon Jan 20 19:38:16 2014 (r260919) @@ -8593,8 +8593,11 @@ tsubst_expr (tree t, tree args, tsubst_f } case FOR_STMT: - stmt = begin_for_stmt (); - RECUR (FOR_INIT_STMT (t)); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tmp = RECUR (FOR_ATTRIBUTES (t)); + stmt = begin_for_stmt (tmp); + RECUR (FOR_INIT_STMT (t)); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ finish_for_init_stmt (stmt); tmp = RECUR (FOR_COND (t)); finish_for_cond (tmp, stmt); @@ -8605,7 +8608,10 @@ tsubst_expr (tree t, tree args, tsubst_f break; case WHILE_STMT: - stmt = begin_while_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tmp = RECUR (WHILE_ATTRIBUTES (t)); + stmt = begin_while_stmt (tmp); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ tmp = RECUR (WHILE_COND (t)); finish_while_stmt_cond (tmp, stmt); RECUR (WHILE_BODY (t)); @@ -8613,7 +8619,10 @@ tsubst_expr (tree t, tree args, tsubst_f break; case DO_STMT: - stmt = begin_do_stmt (); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tmp = RECUR (DO_ATTRIBUTES (t)); + stmt = begin_do_stmt (tmp); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ RECUR (DO_BODY (t)); finish_do_body (stmt); tmp = RECUR (DO_COND (t)); Modified: stable/9/contrib/gcc/cp/semantics.c ============================================================================== --- stable/9/contrib/gcc/cp/semantics.c Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/cp/semantics.c Mon Jan 20 19:38:16 2014 (r260919) @@ -704,10 +704,14 @@ finish_if_stmt (tree if_stmt) appropriate. */ tree -begin_while_stmt (void) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +begin_while_stmt (tree attribs) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { tree r; - r = build_stmt (WHILE_STMT, NULL_TREE, NULL_TREE); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + r = build_stmt (WHILE_STMT, NULL_TREE, NULL_TREE, attribs); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (r); WHILE_BODY (r) = do_pushlevel (sk_block); begin_cond (&WHILE_COND (r)); @@ -737,9 +741,14 @@ finish_while_stmt (tree while_stmt) appropriate. */ tree -begin_do_stmt (void) -{ - tree r = build_stmt (DO_STMT, NULL_TREE, NULL_TREE); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +begin_do_stmt (tree attribs) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ +{ + /* APPLE LOCAL radar 4445586 */ +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + tree r = build_stmt (DO_STMT, NULL_TREE, NULL_TREE, attribs, NULL_TREE); +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ add_stmt (r); DO_BODY (r) = push_stmt_list (); return r; @@ -803,12 +812,17 @@ finish_return_stmt (tree expr) /* Begin a for-statement. Returns a new FOR_STMT if appropriate. */ tree -begin_for_stmt (void) +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ +begin_for_stmt (tree attribs) +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ { tree r; r = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, - NULL_TREE, NULL_TREE); +/* APPLE LOCAL begin for-fsf-4_4 3274130 5295549 */ \ + NULL_TREE, NULL_TREE, attribs); + +/* APPLE LOCAL end for-fsf-4_4 3274130 5295549 */ \ if (flag_new_for_scope > 0) TREE_CHAIN (r) = do_pushlevel (sk_for); Modified: stable/9/contrib/gcc/doc/extend.texi ============================================================================== --- stable/9/contrib/gcc/doc/extend.texi Mon Jan 20 19:37:38 2014 (r260918) +++ stable/9/contrib/gcc/doc/extend.texi Mon Jan 20 19:38:16 2014 (r260919) @@ -58,6 +58,9 @@ extensions, accepted by GCC in C89 mode * Character Escapes:: @samp{\e} stands for the character @key{ESC}. * Variable Attributes:: Specifying attributes of variables. * Type Attributes:: Specifying attributes of types. +@c APPLE LOCAL begin for-fsf-4_4 3274130 5295549 +* Label Attributes:: Specifying attributes of labels and statements. +@c APPLE LOCAL end for-fsf-4_4 3274130 5295549 * Alignment:: Inquiring about the alignment of a type or variable. * Inline:: Defining inline functions (as fast as macros). * Extended Asm:: Assembler instructions with C expressions as operands. @@ -1587,8 +1590,11 @@ attributes are currently defined for fun @code{gnu_inline} and @code{externally_visible}. Several other attributes are defined for functions on particular target systems. Other *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 19:57:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 466A09A1; Mon, 20 Jan 2014 19:57:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 195C214CC; Mon, 20 Jan 2014 19:57:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KJvUai044741; Mon, 20 Jan 2014 19:57:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KJvUOr044740; Mon, 20 Jan 2014 19:57:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401201957.s0KJvUOr044740@svn.freebsd.org> From: Warner Losh Date: Mon, 20 Jan 2014 19:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260921 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:57:31 -0000 Author: imp Date: Mon Jan 20 19:57:30 2014 New Revision: 260921 URL: http://svnweb.freebsd.org/changeset/base/260921 Log: We need nand now that the boards reference it. Modified: head/sys/arm/conf/NOTES Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Mon Jan 20 19:38:44 2014 (r260920) +++ head/sys/arm/conf/NOTES Mon Jan 20 19:57:30 2014 (r260921) @@ -60,6 +60,7 @@ device at91_board_sam9g20ek device at91_board_sam9x25ek device at91_board_tsc4370 device at91rm9200 +device nand device board_ln2410sbc nooptions SMP From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 20:06:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0761EA4; Mon, 20 Jan 2014 20:06:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BFB7A15C3; Mon, 20 Jan 2014 20:06:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KK6DWZ048950; Mon, 20 Jan 2014 20:06:13 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KK6DiX048949; Mon, 20 Jan 2014 20:06:13 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202006.s0KK6DiX048949@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 20:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260922 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:06:14 -0000 Author: gjb Date: Mon Jan 20 20:06:13 2014 New Revision: 260922 URL: http://svnweb.freebsd.org/changeset/base/260922 Log: Sync with (local) changes against releng/10.0/release/doc/ that were needed to fix 10.0-RELEASE release notes. This corresponds to r43586 through r43593 of the doc/ repository. There are no corresponding changes to the src/ repository tracking these. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 19:57:30 2014 (r260921) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 20:06:13 2014 (r260922) @@ -27,6 +27,7 @@ 2011 2012 2013 + 2014 The &os; Documentation Project @@ -128,11 +129,6 @@ The maximum amount of memory the &os; kernel can address has been increased from 1TB to 4TB. - A new &man.cpuset.2; API has been added - for thread to CPU binding and CPU resource grouping and - assignment. The &man.cpuset.1; userland utility has been added - to allow manipulation of processor sets. - The &man.ddb.4; kernel debugger now has an output capture facility. Input and output from &man.ddb.4; can now be captured to a memory buffer for later inspection using &man.sysctl.8; or @@ -146,37 +142,6 @@ utility. More details can be found in the &man.ddb.4; manual page. - The kernel now supports a new textdump format of kernel - dumps. A textdump provides higher-level information via - mechanically generated/extracted debugging output, rather than a - simple memory dump. This facility can be used to generate brief - kernel bug reports that are rich in debugging information, but - are not dependent on kernel symbol tables or precisely - synchronized source code. More information can be found in the - &man.textdump.4; manual page. - - Kernel support for M:N threading has been removed. While - the KSE (Kernel Scheduled Entities) project was quite successful - in bringing threading to FreeBSD, the M:N approach taken by the - KSE library was never developed to its full potential. - Backwards compatibility for applications using KSE threading - will be provided via &man.libmap.conf.5; for dynamically linked - binaries. The &os; Project greatly appreciates the work of - &a.julian;, &a.deischen;, and &a.davidxu; on KSE support. - - The &os; kernel now exports information about certain kernel - features via the kern.features sysctl tree. - The &man.feature.present.3; library call provides a convenient - interface for user applications to test the presence of - features. - - The &os; kernel now has support for large - memory page mappings (superpages). - - The ULE - scheduler is now the default process scheduler - in GENERIC kernels. - Support was added for the new Intel on-CPU Bull Mountain random number generator, found on IvyBridge and supposedly later CPUs, @@ -246,6 +211,7 @@ hv_vmbus_load="YES" Al + Hardware Support - The &man.cmx.4; driver, a driver for Omnikey CardMan 4040 - PCMCIA smartcard readers, has been added. - - The &man.syscons.4; driver now supports Colemak keyboard layout. - - The &man.uslcom.4; driver, a driver for Silicon - Laboratories CP2101/CP2102-based USB serial adapters, has been - imported from OpenBSD. - Multimedia Support @@ -287,29 +245,8 @@ hv_vmbus_load="YES" Al Network Interface Support - The &man.ale.4; driver has been added to provide support - for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers. - - The &man.em.4; driver has been split into two drivers - with some common parts. The &man.em.4; driver will continue - to support adapters up to the 82575, as well as new - client/desktop adapters. A new &man.igb.4; driver - will support new server adapters. - - The &man.jme.4; driver has been added to provide support - for PCIe network adapters based on JMicron JMC250 Gigabit - Ethernet and JMC260 Fast Ethernet controllers. - - The &man.malo.4; driver has been added to provide - support for Marvell Libertas 88W8335 based PCI network - adapters. - The firmware for the &man.mxge.4; driver has been - updated from 1.4.25 to 1.4.29. - - The &man.sf.4; driver has been overhauled to improve its - performance and to add support for checksum offloading. It - should also work on all architectures. + 1.4.55. The &man.re.4; driver has been overhauled to fix a number of issues. This driver now has Wake On LAN (WOL) @@ -417,7 +354,7 @@ hv_vmbus_load="YES" Al ZFS - &man.bsdinstall.8; now supports installing + &man.bsdinstall.8; now supports installing ZFS on the root file system. It includes a single configuration menu that allows you to select all of the required details, including which drives to use, what ZFS RAID level to use (taking into consideration @@ -503,6 +440,9 @@ hv_vmbus_load="YES" Al &man.make.1; has been replaced with the "Portable" BSD make tool (bmake) from NetBSD. + Support for usernames up to 32 + characters. + The &man.adduser.8; utility now supports a option to set the mode of a new user's home directory. @@ -565,9 +505,6 @@ hv_vmbus_load="YES" Al were received (this is the same behavior as &man.ping.8;). It returned a non-zero value before this change. - The &man.procstat.1; utility has been added to display - detailed information about processes. - The &man.realpath.1; utility now supports a flag to suppress warnings; it now also accepts multiple paths on its command line. @@ -634,10 +571,7 @@ hv_vmbus_load="YES" Al to 6.1.5. awk has been updated from 1 May - 2007 release to the 23 October 2007 release. - - bzip2 has been updated from 1.0.4 - to 1.0.5. + 2007 release to the 20121220 release. CVS has been removed from the base system, but is still available from ports From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 20:28:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0A5CB0A; Mon, 20 Jan 2014 20:28:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A72C1759; Mon, 20 Jan 2014 20:28:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KKS49G057370; Mon, 20 Jan 2014 20:28:04 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KKS45o057369; Mon, 20 Jan 2014 20:28:04 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202028.s0KKS45o057369@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 20:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260923 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:28:04 -0000 Author: gjb Date: Mon Jan 20 20:28:04 2014 New Revision: 260923 URL: http://svnweb.freebsd.org/changeset/base/260923 Log: Fix formatting, indentation, line length in preparation of upcoming changes to this file. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 20:06:13 2014 (r260922) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 20:28:04 2014 (r260923) @@ -1,12 +1,11 @@ %release; ]>
-&os; &release.current; Release Notes - + &os; &release.current; Release Notes The &os; Project @@ -28,7 +27,8 @@ 2012 2013 2014 - The &os; Documentation Project + The &os; Documentation + Project @@ -41,13 +41,13 @@ - The release notes for &os; &release.current; contain a summary - of the changes made to the &os; base system on the - &release.branch; development line. - This document lists applicable security advisories that were issued since - the last release, as well as significant changes to the &os; - kernel and userland. - Some brief remarks on upgrading are also presented. + The release notes for &os; &release.current; contain + a summary of the changes made to the &os; base system on the + &release.branch; development line. This document lists + applicable security advisories that were issued since the last + release, as well as significant changes to the &os; kernel and + userland. Some brief remarks on upgrading are also + presented. @@ -55,30 +55,32 @@ Introduction This document contains the release notes for &os; - &release.current;. It - describes recently added, changed, or deleted features of &os;. - It also provides some notes on upgrading - from previous versions of &os;. - - The &release.type; distribution to which these release notes - apply represents the latest point along the &release.branch; development - branch since &release.branch; was created. Information regarding pre-built, binary - &release.type; distributions along this branch - can be found at &release.url;. - - The &release.type; distribution to which these release notes - apply represents a point along the &release.branch; development - branch between &release.prev; and the future &release.next;. - Information regarding - pre-built, binary &release.type; distributions along this branch - can be found at &release.url;. - - This distribution of &os; &release.current; is a - &release.type; distribution. It can be found at &release.url; or any of its mirrors. More - information on obtaining this (or other) &release.type; - distributions of &os; can be found in the Obtaining - &os; appendix to the &os; - Handbook. + &release.current;. It describes recently added, changed, or + deleted features of &os;. It also provides some notes on + upgrading from previous versions of &os;. + + The &release.type; distribution to which + these release notes apply represents the latest point along the + &release.branch; development branch since &release.branch; was + created. Information regarding pre-built, binary &release.type; + distributions along this branch can be found at &release.url;. + + The &release.type; distribution to + which these release notes apply represents a point along the + &release.branch; development branch between &release.prev; and the + future &release.next;. Information regarding pre-built, binary + &release.type; distributions along this branch can be found at + &release.url;. + + This distribution of &os; + &release.current; is a &release.type; distribution. It can be + found at &release.url; or + any of its mirrors. More information on obtaining this (or other) + &release.type; distributions of &os; can be found in the Obtaining + &os; appendix to the &os; Handbook. All users are encouraged to consult the release errata before installing &os;. The errata document is updated with @@ -87,101 +89,109 @@ information on known bugs, security advisories, and corrections to documentation. An up-to-date copy of the errata for &os; &release.current; can be found on the &os; Web site. - What's New - This section describes - the most user-visible new or changed features in &os; - since &release.prev;. - In general, changes described here are unique to the &release.branch; - branch unless specifically marked as &merged; features. - - - Typical release note items - document recent security advisories issued after - &release.prev;, - new drivers or hardware support, new commands or options, - major bug fixes, or contributed software upgrades. They may also - list changes to major ports/packages or release engineering - practices. Clearly the release notes cannot list every single - change made to &os; between releases; this document focuses - primarily on security advisories, user-visible changes, and major - architectural improvements. + This section describes the most user-visible new or changed + features in &os; since &release.prev;. In general, changes + described here are unique to the &release.branch; branch unless + specifically marked as &merged; features. + + Typical release note items document recent security advisories + issued after &release.prev;, new drivers or hardware support, new + commands or options, major bug fixes, or contributed software + upgrades. They may also list changes to major ports/packages or + release engineering practices. Clearly the release notes cannot + list every single change made to &os; between releases; this + document focuses primarily on security advisories, user-visible + changes, and major architectural improvements. Security Advisories - + No advisories. Kernel Changes - The use of unmapped VMIO buffers eliminates the need to perform - TLB shootdown for mapping on buffer creation and reuse, greatly reducing the - amount of IPIs for shootdown on big-SMP machines and eliminating up to 25-30% + The use of unmapped VMIO buffers + eliminates the need to perform TLB shootdown for mapping on + buffer creation and reuse, greatly reducing the amount of IPIs + for shootdown on big-SMP machines and eliminating up to 25-30% of the system time on i/o intensive workloads. - The maximum amount of memory the &os; kernel - can address has been increased from 1TB to 4TB. - - The &man.ddb.4; kernel debugger now has an output capture - facility. Input and output from &man.ddb.4; can now be captured - to a memory buffer for later inspection using &man.sysctl.8; or - a textdump. The new capture command controls - this feature. - - The &man.ddb.4; debugger now supports a simple scripting - facility, which supports a set of named scripts consisting of a - set of &man.ddb.4; commands. These commands can be managed from - within &man.ddb.4; or with the use of the new &man.ddb.8; - utility. More details can be found in the &man.ddb.4; manual - page. + The maximum amount of memory + the &os; kernel can address has been increased from 1TB to + 4TB. + + The &man.ddb.4; kernel debugger now has an + output capture facility. Input and output from &man.ddb.4; can + now be captured to a memory buffer for later inspection using + &man.sysctl.8; or a textdump. The new + capture command controls this feature. + + The &man.ddb.4; debugger now supports a simple + scripting facility, which supports a set of named scripts + consisting of a set of &man.ddb.4; commands. These commands can + be managed from within &man.ddb.4; or with the use of the new + &man.ddb.8; utility. More details can be found in the + &man.ddb.4; manual page. Support was added for - the new Intel on-CPU Bull Mountain random number - generator, found on IvyBridge and supposedly later CPUs, - accessible with RDRAND instruction. + the new Intel on-CPU Bull Mountain random number generator, + found on IvyBridge and supposedly later CPUs, accessible with + RDRAND instruction. Virtualization support - The BSD Hypervisor, &man.bhyve.8; is included - with &os;. &man.bhyve.8; requires Intel CPUs with VT-x and Extended Page Table (EPT) - support. These features are on all Nehalem models and beyond - (e.g. Nehalem and newer), but not on the lower-end Atom CPUs. - - &man.virtio.4; support has been added. &man.virtio.4; is the - name for the paravirtualization interface developed for the Linux KVM, but - since adopted to other virtual machine hypervisors (with the notable exception of Xen). - This work brings in a BSD-licensed clean-room implementation of the virtio kernel drivers - for disk IO (&man.virtio_blk.4; and &man.virtio_scsi.4;), network IO (&man.vtnet.4;), - memory ballooning (&man.virtio_balloon.4;), and PCI. - Tested with on Qemu/KVM, VirtualBox, and &man.bhyve.4;. - - Paravirtualized drivers which - support Microsoft Hyper-V have been imported and made - part of the amd64 GENERIC kernel. For i386, these drivers are not part of - GENERIC, so the following lines must be added to - /boot/loader.conf to load these drivers: - hv_ata_pci_disengage_load="YES" + + The BSD Hypervisor, + &man.bhyve.8; is included with &os;. &man.bhyve.8; requires + Intel CPUs with VT-x and Extended Page Table (EPT) support. + These features are on all Nehalem models and beyond (e.g. + Nehalem and newer), but not on the lower-end Atom CPUs. + + &man.virtio.4; support has been added. + &man.virtio.4; is the name for the paravirtualization + interface developed for the Linux KVM, but since adopted to + other virtual machine hypervisors (with the notable exception + of Xen). This work brings in a BSD-licensed clean-room + implementation of the virtio kernel drivers for disk IO + (&man.virtio_blk.4; and &man.virtio_scsi.4;), network IO + (&man.vtnet.4;), memory ballooning (&man.virtio_balloon.4;), + and PCI. Tested with on Qemu/KVM, VirtualBox, and + &man.bhyve.4;. + + Paravirtualized + drivers which support Microsoft Hyper-V have been imported and + made part of the amd64 GENERIC kernel. For i386, these + drivers are not part of GENERIC, so the following lines must + be added to /boot/loader.conf to load + these drivers: + + hv_ata_pci_disengage_load="YES" hv_netsvc_load="YES" hv_utils_load="YES" -hv_vmbus_load="YES" Alternatively, the Hyper-V drivers can be added to the i386 - kernel by adding device hyperv to the kernel config, and then - recompiling the kernel. Please refer to: - FreeBSD and Microsoft Windows Server Hyper-V support - for full instructions on how to set up Hyper-V support under FreeBSD. +hv_vmbus_load="YES" + + Alternatively, the Hyper-V drivers can be added to the + i386 kernel by adding device hyperv to the + kernel config, and then recompiling the kernel. Please refer + to: FreeBSD + and Microsoft Windows Server Hyper-V support for full + instructions on how to set up Hyper-V support under + FreeBSD. The &man.vmx.4; driver has been added. - &man.vmx.4; is a VMware VMXNET3 ethernet driver ported from - OpenBSD. + &man.vmx.4; is a VMware VMXNET3 ethernet driver ported from + OpenBSD. - Xen PVHVM virtualization is now - part of the GENERIC kernel. + Xen PVHVM + virtualization is now part of the GENERIC kernel. @@ -189,25 +199,30 @@ hv_vmbus_load="YES" Al ARM support Raspberry PI support has been added. - Refer to these setup instructions - and quick start - guide. - - The default ABI on ARM is now the ARM EABI. This brings a number of - improvements and allows future support for VFP and Thumb-2. - - ARM support has been greatly improved, including support - for ARMv6 and ARMv7, SMP and thread-local storage (TLS). - Additionally support for some newer SoC like the MV78x60 and OMAP4 was added. - See this announcement - for further details. - - Superpages support on ARM has been added. Superpages support - provides improved performance and scalability by allowing TLB - translations to dynamically cover large physical memory regions. - All ARMv6 and ARMv7-based platforms can take advantage of this feature. - See this page - for further details. + Refer to these setup + instructions and quick + start guide. + + The default ABI on ARM is now the ARM + EABI. This brings a number of improvements and allows future + support for VFP and Thumb-2. + + ARM support has been greatly improved, + including support for ARMv6 and ARMv7, SMP and thread-local + storage (TLS). Additionally support for some newer SoC like + the MV78x60 and OMAP4 was added. See this + announcement for further details. + + Superpages support on ARM has been + added. Superpages support provides improved performance and + scalability by allowing TLB translations to dynamically cover + large physical memory regions. All ARMv6 and ARMv7-based + platforms can take advantage of this feature. See this + page for further details. @@ -215,17 +230,17 @@ hv_vmbus_load="YES" Al Boot Loader Changes - The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real + The BTX kernel used by the + boot loader has been changed to invoke BIOS routines from real mode. This change makes it possible to boot &os; from USB devices. - A new gptboot boot loader has - been added to support booting from a GPT labeled disk. A - new boot command has been added to - &man.gpt.8;, which makes a GPT disk bootable by writing the - required bits of the boot loader, creating a new boot - partition if required. + A new gptboot boot loader + has been added to support booting from a GPT labeled disk. + A new boot command has been added to + &man.gpt.8;, which makes a GPT disk bootable by writing the + required bits of the boot loader, creating a new boot + partition if required. --> @@ -236,10 +251,10 @@ hv_vmbus_load="YES" Al Multimedia Support - Support for version 2.0 of the USB Audio reference design - has been added. New devices should support higher bandwidth, - increased sampling frequency and wider dynamic range. - + Support for version 2.0 of the USB + Audio reference design has been added. New devices should + support higher bandwidth, increased sampling frequency and + wider dynamic range. @@ -256,188 +271,204 @@ hv_vmbus_load="YES" Al number of outstanding issues. It also now works on all architectures. - The &man.wpi.4; driver has - been updated to include a number of stability fixes. - - The &man.cxgbe.4; driver has been updated to support - 40G/10G Ethernet NICs based on Chelsio's Terminator 5 (T5) ASIC. - - The iw_cxgbe driver has been added. This is an - experimental iWARP/RDMA driver - (kernel verbs only) for Chelsio's T4 and T5 based cards. - - The Open Fabrics Enterprise Distribution (OFED) and - OFED Infiniband core has been - updated to the same version as supplied by Linux version 3.7 - - The Mellanox Infiniband driver has been updated to firmware - version 2.30.3200 for ConnectX3 NICs. Support has been added for ConnectX3 VPI NICs, where - each port can be used as Infiniband 56 GB/s or Ethernet 40 GB/s. Support has been added - for dynamically loading kernel modules for Infiniband core (ibcore) and - IP over Infiniband (ipoib). - - &man.netmap.4; has been added. &man.netmap.4; is a framework for - high-performance direct-to-hardware packet IO, offering low latency and high PPS - rates to userland applications while bypassing any kernel-side packet processing. - With &man.netmap.4; it is trivially possible to fully saturate a 10 Gbps network interface with - minimal packet sizes. For more information, see: - Netmap Project. - + The &man.wpi.4; driver + has been updated to include a number of stability + fixes. + + The &man.cxgbe.4; driver has been + updated to support 40G/10G Ethernet NICs based on Chelsio's + Terminator 5 (T5) ASIC. + + The iw_cxgbe driver has been added. + This is an experimental iWARP/RDMA driver (kernel verbs + only) for Chelsio's T4 and T5 based cards. + + The Open Fabrics Enterprise + Distribution (OFED) and OFED Infiniband core has been + updated to the same version as supplied by Linux version + 3.7 + + The Mellanox Infiniband driver has + been updated to firmware version 2.30.3200 for ConnectX3 + NICs. Support has been added for ConnectX3 VPI NICs, where + each port can be used as Infiniband 56 GB/s or Ethernet 40 + GB/s. Support has been added for dynamically loading kernel + modules for Infiniband core (ibcore) and IP over Infiniband + (ipoib). + + &man.netmap.4; has been added. + &man.netmap.4; is a framework for high-performance + direct-to-hardware packet IO, offering low latency and high + PPS rates to userland applications while bypassing any + kernel-side packet processing. With &man.netmap.4; it is + trivially possible to fully saturate a 10 Gbps network + interface with minimal packet sizes. For more information, + see: Netmap + Project. Network Protocols - &man.carp.4; has been rewritten to make addresses - more sane from the viewpoint of routing daemons such as - quagga/zebra. It also brings support for a single redundant - address on the subnet (carpdev), switching state with - &man.ifconfig.8;, better locking and using modern kernel - interfaces to allocate multicast memberships. - Configuration of the CARP protocol via &man.ifconfig.8; has changed, as well as format - of CARP events submitted to &man.devd.8; has changed. See &man.carp.4; - for more information. The arpbalance feature of &man.carp.4; is currently - not supported anymore. - - The &man.pf.4; firewall now supports fine-grain locking - and better utilization on multi-cpu machines resulting in - significant improvements in performance. - - Support for up to 65536 routing tables has been - introduced. - - Support for setting/matching differentiated services - codepoints (DSCP) in IP header has been added to - &man.ipfw.8;. - + &man.carp.4; has been rewritten to make + addresses more sane from the viewpoint of routing daemons such + as quagga/zebra. It also brings support for a single redundant + address on the subnet (carpdev), switching state with + &man.ifconfig.8;, better locking and using modern kernel + interfaces to allocate multicast memberships. Configuration + of the CARP protocol via &man.ifconfig.8; has changed, as well + as format of CARP events submitted to &man.devd.8; has + changed. See &man.carp.4; for more information. The arpbalance + feature of &man.carp.4; is currently not supported + anymore. + + The &man.pf.4; firewall now supports + fine-grain locking and better utilization on multi-cpu + machines resulting in significant improvements in + performance. + + Support for up to 65536 routing tables + has been introduced. + + Support for setting/matching + differentiated services codepoints (DSCP) in IP header has + been added to &man.ipfw.8;. Disks and Storage - The &man.aac.4; driver now supports volumes larger than - 2TB in size. + The &man.aac.4; driver now supports volumes + larger than 2TB in size. The &man.ata.4; driver now supports a spindown command for - disks; after a configurable amount of time, if no requests - have been received for a disk, the disk will be spun down - until the next request. The &man.atacontrol.8; utility now - supports a spindown command to configure - this feature. - - The &man.hptrr.4; driver has been updated to version 1.2 - from Highpoint. - - &man.nvme.4; has been added and provides NVM Express support. - NVM Express is an optimized register interface, command set and feature set of - PCI Express (PCIe)-based Solid-State Drives (SSDs). For more information, - see nvmexpress.org. - + disks; after a configurable amount of time, if no requests + have been received for a disk, the disk will be spun down + until the next request. The &man.atacontrol.8; utility now + supports a spindown command to configure + this feature. + + The &man.hptrr.4; driver has been updated to + version 1.2 from Highpoint. + + &man.nvme.4; has been added and provides + NVM Express support. NVM Express is an optimized register + interface, command set and feature set of PCI Express + (PCIe)-based Solid-State Drives (SSDs). For more information, + see nvmexpress.org. File Systems - A new kernel-based iSCSI target and initiator has been - added + A new kernel-based iSCSI target and + initiator has been added - UFS filesystems can now be enlarged with &man.growfs.8; while - mounted read-write. This is especially useful for virtual - machines, allowing the addition of more harddrive space without - interruption of service. - - A state of the art FUSE implementation is now part of the - base system. It allows the use of nearly all fusefs file - systems + UFS filesystems can now be enlarged with + &man.growfs.8; while mounted read-write. This is especially + useful for virtual machines, allowing the addition of more + harddrive space without interruption of service. + + A state of the art FUSE implementation + is now part of the base system. It allows the use of nearly + all fusefs file systems ZFS - &man.bsdinstall.8; now supports installing - ZFS on the root file system. It includes a single configuration menu - that allows you to select all of the required details, including - which drives to use, what ZFS RAID level to use (taking into consideration - the selected number of drives), GPT or MBR, GELI encryption, forcing 4K sectors, - pool name, etc. - - TRIM support has been added for - ZFS. - - Support for the high performance LZ4 compression algorithm - has been added to ZFS. LZ4 is usually faster and can achieve a - higher compression ratio than LZJB, the default compression - algorithm - - Support for L2ARC compression has been added to ZFS. - - The zio nop-write improvement from Illumos - was imported into &os;. To reduce I/O, nop-write skips overwriting - data if the checksum (cryptographically secure) of new data - matches the checksum of existing data. It also saves space if - snapshots are in use. This improvement only works only on - datasets with enabled compression, disabled deduplication and - sha256 checksums. - - ZFS will now compare the checksums of incoming writes to - the checksum of the existing on-disk data and avoid issuing any - write I/O for data that has not changed. This will reduce I/O - as well as space usage because if the old block is referenced - by a snapshot, both copies of the block are kept even though - both contain the same data. - + &man.bsdinstall.8; now supports + installing ZFS on the root file system. It includes + a single configuration menu that allows you to select all of + the required details, including which drives to use, what + ZFS RAID level to use (taking into consideration the + selected number of drives), GPT or MBR, GELI encryption, + forcing 4K sectors, pool name, etc. + + TRIM support has been added for + ZFS. + + Support for the high performance LZ4 + compression algorithm has been added to ZFS. LZ4 is usually + faster and can achieve a higher compression ratio than LZJB, + the default compression algorithm + + Support for L2ARC compression has been + added to ZFS. + + The zio nop-write improvement from + Illumos was imported into &os;. To reduce I/O, nop-write + skips overwriting data if the checksum (cryptographically + secure) of new data matches the checksum of existing data. + It also saves space if snapshots are in use. This + improvement only works only on datasets with enabled + compression, disabled deduplication and sha256 + checksums. + + ZFS will now compare the checksums of incoming writes to + the checksum of the existing on-disk data and avoid issuing + any write I/O for data that has not changed. This will + reduce I/O as well as space usage because if the old block + is referenced by a snapshot, both copies of the block are + kept even though both contain the same data. - - Userland Changes - On platforms where &man.clang.1; is the default - system compiler, (such as i386, amd64, arm) GCC and GNU libstdc++ are no - longer built by default. &man.clang.1; and libc++ from LLVM are used on - these platforms by instead. GCC 4.2.1 and libstdc++ are still built - and used by default on pc98 and all other platforms where &man.clang.1; - is not the default system compiler. - - - &man.clang.1; and llvm have been updated to - version 3.3 release. Please refer to - - Clang 3.3 Release Notes. - - BIND has been replaced by &man.unbound.8; for - local dns resolution in the base system. With this change, nslookup - and dig are no longer a part of the base system. Users should - instead use &man.host.1; and &man.drill.1; Alternatively, - nslookup and dig can be obtained by installing the - dns/bind-tools port. - - sysinstall has been removed from the base system. - Auxiliary libraries and tools used by sysinstall such as libdisk, libftpio, - and sade have also been removed. sysinstall has been replaced by - &man.bsdinstall.8; and &man.bsdconfig.8;. - - &man.freebsd-version.1; has been added. This tool - makes a best effort to determine the version and patch level of - the installed kernel and userland. - - GNU patch has been removed from the base system, and replaced - by a BSD-licensed &man.patch.1; program. - - GNU sort has been removed from the base system, and replaced - by a BSD-licensed &man.sort.1; program. + On platforms where &man.clang.1; is the + default system compiler, (such as i386, amd64, arm) GCC and GNU + libstdc++ are no longer built by default. &man.clang.1; and + libc++ from LLVM are used on these platforms by instead. GCC + 4.2.1 and libstdc++ are still built and used by default on pc98 + and all other platforms where &man.clang.1; is not the default + system compiler. + + &man.clang.1; and llvm have been updated + to version 3.3 release. Please refer to + Clang 3.3 Release Notes. + + BIND has been replaced by + &man.unbound.8; for local dns resolution in the base system. + With this change, nslookup and dig are no longer a part of the + base system. Users should instead use &man.host.1; and + &man.drill.1; Alternatively, nslookup and dig can be obtained by + installing the dns/bind-tools port. + + sysinstall has been removed from the base + system. Auxiliary libraries and tools used by sysinstall such + as libdisk, libftpio, and sade have also been removed. + sysinstall has been replaced by &man.bsdinstall.8; and + &man.bsdconfig.8;. + + &man.freebsd-version.1; has been added. + This tool makes a best effort to determine the version and patch + level of the installed kernel and userland. + + GNU patch has been removed from the base + system, and replaced by a BSD-licensed &man.patch.1; + program. + + GNU sort has been removed from the base + system, and replaced by a BSD-licensed &man.sort.1; + program. Berkely yacc (byacc) has been imported - from invisible island. - This brings bison compatibilities to &man.yacc.1; while preserving full - backwards compatibility with previous version of &man.yacc.1;. + from invisible + island. This brings bison compatibilities to + &man.yacc.1; while preserving full backwards compatibility with + previous version of &man.yacc.1;. - &man.lex.1; has been replaced by flex 2.5.37 + &man.lex.1; has been replaced by flex + 2.5.37 - &man.make.1; has been replaced with the + &man.make.1; has been replaced with the "Portable" BSD make tool (bmake) from NetBSD. Support for usernames up to 32 @@ -454,10 +485,10 @@ hv_vmbus_load="YES" Al BSD-licensed versions of &man.bc.1; and &man.dc.1; have replaced their GNU counterparts. - &man.chflags.1; now supports a flag for - verbose output and a flag to ignore errors - with the same semantics as (for example) - &man.chmod.1;. + &man.chflags.1; now supports + a flag for verbose output and + a flag to ignore errors with the same + semantics as (for example) &man.chmod.1;. For compatibility with other implementations, &man.cp.1; now supports a flag, which is equivalent to @@ -469,12 +500,13 @@ hv_vmbus_load="YES" Al gcpio. The &man.env.1; program now supports - which will completely unset the given variable - name by removing it from the environment, - instead of just setting it to a null value. + name which will completely + unset the given variable name by + removing it from the environment, instead of just setting it to + a null value. - The &man.fdopendir.3; library function has been added. + The &man.fdopendir.3; library function has been + added. The &man.fetch.3; library now support HTTP 1.1 If-Modified-Since behavior. The &man.fetch.1; program now @@ -509,10 +541,10 @@ hv_vmbus_load="YES" Al a flag to suppress warnings; it now also accepts multiple paths on its command line. - &man.sh.1; has many bug fixes, some new features, and will now - refuse to parse some invalid scripts. Additionally, it now - has filename completion and defaults to the "emacs" editing - mode. + &man.sh.1; has many bug fixes, some new features, and will + now refuse to parse some invalid scripts. Additionally, it now + has filename completion and defaults to the "emacs" + editing mode. The &man.split.1; utility now supports a flag to split a file into a certain number of chunks. @@ -540,8 +572,8 @@ hv_vmbus_load="YES" Al &man.top.1; now supports a flag to provide per-CPU usage statistics. - &man.zdump.8; is now working properly on 64 bit architectures. - + &man.zdump.8; is now working properly on 64 bit + architectures. &man.traceroute.8; now has the ability to print the AS number for each hop with the new switch; a @@ -555,102 +587,106 @@ hv_vmbus_load="YES" Al <filename>/etc/rc.d</filename> Scripts - - +   Contributed Software - &man.jemalloc.3; has been updated to 3.4.0. - See this link. - for more details. + &man.jemalloc.3; has been updated to + 3.4.0. See this + link for more details. - AMD has been updated from 6.0.10 - to 6.1.5. + AMD has been + updated from 6.0.10 to 6.1.5. - awk has been updated from 1 May + awk has been + updated from 1 May 2007 release to the 20121220 release. - CVS has been removed from the - base system, but is still available from ports + CVS has been + removed from the base system, but is still available from + ports - Subversion has been imported into the base system and - is installed as svnlite. svnlite - should only be used for checking out &os; source and committing, and does not - replace the full Subversion port. + Subversion has been imported into the base + system and is installed as svnlite. + svnlite should only be used for + checking out &os; source and committing, and does not replace + the full Subversion port. - file has been updated to 5.11. + file has been + updated to 5.11. - hostapd has been - updated from 0.5.8 to 0.5.10. + hostapd has + been updated from 0.5.8 to 0.5.10. - IPFilter has been updated to 5.1.2. + IPFilter has been updated to + 5.1.2. - less has been updated to - v458. + less has been + updated to v458. - ncurses has been updated from - to 5.7-20081102. + ncurses has been updated from to + 5.7-20081102. - OpenSSH has been updated - to 6.4. + OpenSSH has been + updated to 6.4. - OpenPAM has been updated to - the Micrampelis release. + OpenPAM has + been updated to the Micrampelis release. - sendmail has been updated from - 8.14.1 to 8.14.7. + sendmail has been + updated from 8.14.1 to 8.14.7. The timezone database has been updated from the tzdata2008h release to the tzdata2009m release. - The stdtime part of libc, &man.zdump.8; and &man.zic.8; - have been updated from the tzcode2004a + The stdtime part of libc, &man.zdump.8; and &man.zic.8; have + been updated from the tzcode2004a release to the tzcode2009h release. - If you have upgraded from source or via the &man.freebsd-update.8;, - then please run &man.tzsetup.8; to install a new /etc/localtime. - + If you have upgraded from source or via the + &man.freebsd-update.8;, then please run &man.tzsetup.8; to + install a new /etc/localtime. - WPA Supplicant has been - updated to 2.0. + WPA Supplicant + has been updated to 2.0. xz has been updated from snapshot as of 12 April 2010 to 5.0.0. - &man.nvi.1; has been updated to 2.1.2. - - &man.nvi.1; supports wide character locales. + &man.nvi.1; has been updated + to 2.1.2. + &man.nvi.1; supports wide character + locales. Ports/Packages Collection Infrastructure - The pkg_add, pkg_create, pkg_delete, pkg_info, - pkg_updating, and pkg_version utilities have been removed. - &man.pkg.7; must now be used to install binary packages. &man.pkg.7; - is the next generation &os; package manager, also referred to as "pkgng". - + The pkg_add, pkg_create, pkg_delete, + pkg_info, pkg_updating, and pkg_version utilities have been + removed. &man.pkg.7; must now be used to install binary + packages. &man.pkg.7; is the next generation &os; package + manager, also referred to as "pkgng". Release Engineering and Integration - The supported version of - the GNOME desktop environment - (x11/gnome2) has been - updated from 2.20.1 to 2.22. - + The supported version of the + GNOME desktop environment + (x11/gnome2) has been updated from 2.20.1 + to 2.22. Documentation - - +   @@ -671,9 +707,8 @@ hv_vmbus_load="YES" Al /usr/src/UPDATING. - Upgrading &os; should only be attempted after - backing up all data and configuration - files. + Upgrading &os; should only be attempted after backing up + all data and configuration files.
From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 20:33:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76234E64; Mon, 20 Jan 2014 20:33:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 61BC0180B; Mon, 20 Jan 2014 20:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KKXf3r060789; Mon, 20 Jan 2014 20:33:41 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KKXf3E060788; Mon, 20 Jan 2014 20:33:41 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201401202033.s0KKXf3E060788@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 20 Jan 2014 20:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260924 - stable/10/usr.bin/script X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:33:41 -0000 Author: trociny Date: Mon Jan 20 20:33:40 2014 New Revision: 260924 URL: http://svnweb.freebsd.org/changeset/base/260924 Log: MFC r260833: Bring back r226403, the fix for bin/161526, which was (accidentally?) reverted in r238896. PR: bin/161526 Reported by: Karli.Sjoberg slu.se Modified: stable/10/usr.bin/script/script.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/script/script.c ============================================================================== --- stable/10/usr.bin/script/script.c Mon Jan 20 20:28:04 2014 (r260923) +++ stable/10/usr.bin/script/script.c Mon Jan 20 20:33:40 2014 (r260924) @@ -235,12 +235,15 @@ main(int argc, char *argv[]) FD_SET(master, &rfd); if (readstdin) FD_SET(STDIN_FILENO, &rfd); - if ((!readstdin && ttyflg) || flushtime > 0) { - tv.tv_sec = !readstdin && ttyflg ? 1 : - flushtime - (tvec - start); + if (!readstdin && ttyflg) { + tv.tv_sec = 1; tv.tv_usec = 0; tvp = &tv; readstdin = 1; + } else if (flushtime > 0) { + tv.tv_sec = flushtime - (tvec - start); + tv.tv_usec = 0; + tvp = &tv; } else { tvp = NULL; } From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 20:34:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 956C61F2; Mon, 20 Jan 2014 20:34:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 80DAF182B; Mon, 20 Jan 2014 20:34:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KKYV4D060999; Mon, 20 Jan 2014 20:34:31 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KKYVlF060998; Mon, 20 Jan 2014 20:34:31 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201401202034.s0KKYVlF060998@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 20 Jan 2014 20:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260925 - stable/9/usr.bin/script X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:34:31 -0000 Author: trociny Date: Mon Jan 20 20:34:31 2014 New Revision: 260925 URL: http://svnweb.freebsd.org/changeset/base/260925 Log: MFC r260833: Bring back r226403, the fix for bin/161526, which was (accidentally?) reverted in r238896. PR: bin/161526 Reported by: Karli.Sjoberg slu.se Modified: stable/9/usr.bin/script/script.c Directory Properties: stable/9/usr.bin/script/ (props changed) Modified: stable/9/usr.bin/script/script.c ============================================================================== --- stable/9/usr.bin/script/script.c Mon Jan 20 20:33:40 2014 (r260924) +++ stable/9/usr.bin/script/script.c Mon Jan 20 20:34:31 2014 (r260925) @@ -235,12 +235,15 @@ main(int argc, char *argv[]) FD_SET(master, &rfd); if (readstdin) FD_SET(STDIN_FILENO, &rfd); - if ((!readstdin && ttyflg) || flushtime > 0) { - tv.tv_sec = !readstdin && ttyflg ? 1 : - flushtime - (tvec - start); + if (!readstdin && ttyflg) { + tv.tv_sec = 1; tv.tv_usec = 0; tvp = &tv; readstdin = 1; + } else if (flushtime > 0) { + tv.tv_sec = flushtime - (tvec - start); + tv.tv_usec = 0; + tvp = &tv; } else { tvp = NULL; } From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 20:50:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D5F2CD5; Mon, 20 Jan 2014 20:50:26 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 21C6B199D; Mon, 20 Jan 2014 20:50:26 +0000 (UTC) Received: from pippin.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F1F33B958; Mon, 20 Jan 2014 15:50:24 -0500 (EST) From: John Baldwin To: Rui Paulo Subject: Re: svn commit: r260898 - head/sys/kern Date: Mon, 20 Jan 2014 11:32:29 -0500 Message-ID: <1536225.gsjt6oXMt2@pippin.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/11.0-CURRENT; KDE/4.10.5; amd64; ; ) In-Reply-To: References: <201401200159.s0K1xa5X012123@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 20 Jan 2014 15:50:25 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:50:26 -0000 On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > On 19 Jan 2014, at 17:59, Neel Natu wrote: > > Author: neel > > Date: Mon Jan 20 01:59:35 2014 > > New Revision: 260898 > > URL: http://svnweb.freebsd.org/changeset/base/260898 > > > > Log: > > Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient entries > > for > > WITNESS to actually work. > > This value should be automatically tuned... How do you propose to do so? This is the count of locks initialized before witness' own SYSINIT is executed and the array it sizes is allocated statically at compile time. This used to not be a static array, but an intrusive list embedded in locks themselves, but we decided to shave a pointer off of each lock that was only used for that and to use a statically sized table instead. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 20:56:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9789A432; Mon, 20 Jan 2014 20:56:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6993E19F1; Mon, 20 Jan 2014 20:56:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KKuBnO069440; Mon, 20 Jan 2014 20:56:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KKuAbH069433; Mon, 20 Jan 2014 20:56:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401202056.s0KKuAbH069433@svn.freebsd.org> From: John Baldwin Date: Mon, 20 Jan 2014 20:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260926 - in head: sys/dev/pci sys/sys usr.sbin/pciconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:56:11 -0000 Author: jhb Date: Mon Jan 20 20:56:09 2014 New Revision: 260926 URL: http://svnweb.freebsd.org/changeset/base/260926 Log: Add support for displaying VPD for PCI devices via pciconf. - Store the length of each read-only VPD value since not all values are guaranteed to be ASCII values (though most are). - Add a new pciio ioctl to fetch VPD for a single PCI device. The values are returned as a list of variable length records, one for the device name and each keyword. - Add a new -V flag to pciconf's list mode which displays VPD data for each device. MFC after: 1 week Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pci_user.c head/sys/dev/pci/pcivar.h head/sys/sys/pciio.h head/usr.sbin/pciconf/pciconf.8 head/usr.sbin/pciconf/pciconf.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Mon Jan 20 20:34:31 2014 (r260925) +++ head/sys/dev/pci/pci.c Mon Jan 20 20:56:09 2014 (r260926) @@ -985,7 +985,7 @@ pci_read_vpd(device_t pcib, pcicfgregs * state = -2; break; } - dflen = byte2; + cfg->vpd.vpd_ros[off].len = dflen = byte2; if (dflen == 0 && strncmp(cfg->vpd.vpd_ros[off].keyword, "RV", 2) == 0) { @@ -1179,6 +1179,17 @@ pci_get_vpd_readonly_method(device_t dev return (ENXIO); } +struct pcicfg_vpd * +pci_fetch_vpd_list(device_t dev) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + pcicfgregs *cfg = &dinfo->cfg; + + if (!cfg->vpd.vpd_cached && cfg->vpd.vpd_reg != 0) + pci_read_vpd(device_get_parent(device_get_parent(dev)), cfg); + return (&cfg->vpd); +} + /* * Find the requested HyperTransport capability and return the offset * in configuration space via the pointer provided. The function Modified: head/sys/dev/pci/pci_user.c ============================================================================== --- head/sys/dev/pci/pci_user.c Mon Jan 20 20:34:31 2014 (r260925) +++ head/sys/dev/pci/pci_user.c Mon Jan 20 20:56:09 2014 (r260926) @@ -407,6 +407,89 @@ pci_conf_match_old32(struct pci_match_co #endif /* PRE7_COMPAT */ static int +pci_list_vpd(device_t dev, struct pci_list_vpd_io *lvio) +{ + struct pci_vpd_element vpd_element, *vpd_user; + struct pcicfg_vpd *vpd; + size_t len; + int error, i; + + vpd = pci_fetch_vpd_list(dev); + if (vpd->vpd_reg == 0 || vpd->vpd_ident == NULL) + return (ENXIO); + + /* + * Calculate the amount of space needed in the data buffer. An + * identifier element is always present followed by the read-only + * and read-write keywords. + */ + len = sizeof(struct pci_vpd_element) + strlen(vpd->vpd_ident); + for (i = 0; i < vpd->vpd_rocnt; i++) + len += sizeof(struct pci_vpd_element) + vpd->vpd_ros[i].len; + for (i = 0; i < vpd->vpd_wcnt; i++) + len += sizeof(struct pci_vpd_element) + vpd->vpd_w[i].len; + + if (lvio->plvi_len == 0) { + lvio->plvi_len = len; + return (0); + } + if (lvio->plvi_len < len) { + lvio->plvi_len = len; + return (ENOMEM); + } + + /* + * Copyout the identifier string followed by each keyword and + * value. + */ + vpd_user = lvio->plvi_data; + vpd_element.pve_keyword[0] = '\0'; + vpd_element.pve_keyword[1] = '\0'; + vpd_element.pve_flags = PVE_FLAG_IDENT; + vpd_element.pve_datalen = strlen(vpd->vpd_ident); + error = copyout(&vpd_element, vpd_user, sizeof(vpd_element)); + if (error) + return (error); + error = copyout(vpd->vpd_ident, vpd_user->pve_data, + strlen(vpd->vpd_ident)); + if (error) + return (error); + vpd_user = PVE_NEXT(vpd_user); + vpd_element.pve_flags = 0; + for (i = 0; i < vpd->vpd_rocnt; i++) { + vpd_element.pve_keyword[0] = vpd->vpd_ros[i].keyword[0]; + vpd_element.pve_keyword[1] = vpd->vpd_ros[i].keyword[1]; + vpd_element.pve_datalen = vpd->vpd_ros[i].len; + error = copyout(&vpd_element, vpd_user, sizeof(vpd_element)); + if (error) + return (error); + error = copyout(vpd->vpd_ros[i].value, vpd_user->pve_data, + vpd->vpd_ros[i].len); + if (error) + return (error); + vpd_user = PVE_NEXT(vpd_user); + } + vpd_element.pve_flags = PVE_FLAG_RW; + for (i = 0; i < vpd->vpd_wcnt; i++) { + vpd_element.pve_keyword[0] = vpd->vpd_w[i].keyword[0]; + vpd_element.pve_keyword[1] = vpd->vpd_w[i].keyword[1]; + vpd_element.pve_datalen = vpd->vpd_w[i].len; + error = copyout(&vpd_element, vpd_user, sizeof(vpd_element)); + if (error) + return (error); + error = copyout(vpd->vpd_w[i].value, vpd_user->pve_data, + vpd->vpd_w[i].len); + if (error) + return (error); + vpd_user = PVE_NEXT(vpd_user); + } + KASSERT((char *)vpd_user - (char *)lvio->plvi_data == len, + ("length mismatch")); + lvio->plvi_len = len; + return (0); +} + +static int pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { device_t pcidev, brdev; @@ -417,6 +500,7 @@ pci_ioctl(struct cdev *dev, u_long cmd, struct pci_devinfo *dinfo; struct pci_io *io; struct pci_bar_io *bio; + struct pci_list_vpd_io *lvio; struct pci_match_conf *pattern_buf; struct pci_map *pm; size_t confsz, iolen, pbufsz; @@ -433,19 +517,29 @@ pci_ioctl(struct cdev *dev, u_long cmd, struct pci_match_conf_old *pattern_buf_old = NULL; io_old = NULL; +#endif - if (!(flag & FWRITE) && cmd != PCIOCGETBAR && - cmd != PCIOCGETCONF && cmd != PCIOCGETCONF_OLD) - return EPERM; -#else - if (!(flag & FWRITE) && cmd != PCIOCGETBAR && cmd != PCIOCGETCONF) - return EPERM; + if (!(flag & FWRITE)) { + switch (cmd) { +#ifdef PRE7_COMPAT +#ifdef COMPAT_FREEBSD32 + case PCIOCGETCONF_OLD32: +#endif + case PCIOCGETCONF_OLD: #endif + case PCIOCGETCONF: + case PCIOCGETBAR: + case PCIOCLISTVPD: + break; + default: + return (EPERM); + } + } - switch(cmd) { + switch (cmd) { #ifdef PRE7_COMPAT #ifdef COMPAT_FREEBSD32 - case PCIOCGETCONF_OLD32: + case PCIOCGETCONF_OLD32: cio32 = (struct pci_conf_io32 *)data; cio = malloc(sizeof(struct pci_conf_io), M_TEMP, M_WAITOK); cio->pat_buf_len = cio32->pat_buf_len; @@ -466,7 +560,7 @@ pci_ioctl(struct cdev *dev, u_long cmd, cio = (struct pci_conf_io *)data; } - switch(cmd) { + switch (cmd) { #ifdef PRE7_COMPAT #ifdef COMPAT_FREEBSD32 case PCIOCGETCONF_OLD32: @@ -912,6 +1006,22 @@ getconfexit: else error = ENODEV; break; + case PCIOCLISTVPD: + lvio = (struct pci_list_vpd_io *)data; + + /* + * Assume that the user-level bus number is + * in fact the physical PCI bus number. + */ + pcidev = pci_find_dbsf(lvio->plvi_sel.pc_domain, + lvio->plvi_sel.pc_bus, lvio->plvi_sel.pc_dev, + lvio->plvi_sel.pc_func); + if (pcidev == NULL) { + error = ENODEV; + break; + } + error = pci_list_vpd(pcidev, lvio); + break; default: error = ENOTTY; break; Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Mon Jan 20 20:34:31 2014 (r260925) +++ head/sys/dev/pci/pcivar.h Mon Jan 20 20:56:09 2014 (r260926) @@ -57,6 +57,7 @@ struct pci_map { struct vpd_readonly { char keyword[2]; char *value; + int len; }; struct vpd_write { @@ -525,6 +526,7 @@ extern uint32_t pci_generation; struct pci_map *pci_find_bar(device_t dev, int reg); int pci_bar_enabled(device_t dev, struct pci_map *pm); +struct pcicfg_vpd *pci_fetch_vpd_list(device_t dev); #define VGA_PCI_BIOS_SHADOW_ADDR 0xC0000 #define VGA_PCI_BIOS_SHADOW_SIZE 131072 Modified: head/sys/sys/pciio.h ============================================================================== --- head/sys/sys/pciio.h Mon Jan 20 20:34:31 2014 (r260925) +++ head/sys/sys/pciio.h Mon Jan 20 20:56:09 2014 (r260926) @@ -116,10 +116,31 @@ struct pci_bar_io { uint64_t pbi_length; /* length of BAR */ }; +struct pci_vpd_element { + char pve_keyword[2]; + uint8_t pve_flags; + uint8_t pve_datalen; + uint8_t pve_data[0]; +}; + +#define PVE_FLAG_IDENT 0x01 /* Element is the string identifier */ +#define PVE_FLAG_RW 0x02 /* Element is read/write */ + +#define PVE_NEXT(pve) \ + ((struct pci_vpd_element *)((char *)(pve) + \ + sizeof(struct pci_vpd_element) + (pve)->pve_datalen)) + +struct pci_list_vpd_io { + struct pcisel plvi_sel; /* device to operate on */ + size_t plvi_len; /* size of the data area */ + struct pci_vpd_element *plvi_data; +}; + #define PCIOCGETCONF _IOWR('p', 5, struct pci_conf_io) #define PCIOCREAD _IOWR('p', 2, struct pci_io) #define PCIOCWRITE _IOWR('p', 3, struct pci_io) #define PCIOCATTACHED _IOWR('p', 4, struct pci_io) #define PCIOCGETBAR _IOWR('p', 6, struct pci_bar_io) +#define PCIOCLISTVPD _IOWR('p', 7, struct pci_list_vpd_io) #endif /* !_SYS_PCIIO_H_ */ Modified: head/usr.sbin/pciconf/pciconf.8 ============================================================================== --- head/usr.sbin/pciconf/pciconf.8 Mon Jan 20 20:34:31 2014 (r260925) +++ head/usr.sbin/pciconf/pciconf.8 Mon Jan 20 20:56:09 2014 (r260926) @@ -33,7 +33,7 @@ .Nd diagnostic utility for the PCI bus .Sh SYNOPSIS .Nm -.Fl l Oo Fl bcev Oc Op Ar device +.Fl l Oo Fl bcevV Oc Op Ar device .Nm .Fl a Ar device .Nm @@ -182,6 +182,28 @@ option is supplied, will attempt to load the vendor/device information database, and print vendor, device, class and subclass identification strings for each device. .Pp +If the +.Fl V +option is supplied, +.Nm +will list any vital product data +.Pq VPD +provided by each device. +Each VPD keyword is enumerated via a line in the following format: +.Bd -literal + VPD ro PN = '110114640C0 ' +.Ed +.Pp +The first string after the +.Dq Li VPD +prefix indicates if the keyword is read-only +.Dq ro +or read-write +.Dq rw . +The second string provides the keyword name. +The text after the the equals sign lists the value of the keyword which is +usually an ASCII string. +.Pp If the optional .Ar device argument is given with the Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Mon Jan 20 20:34:31 2014 (r260925) +++ head/usr.sbin/pciconf/pciconf.c Mon Jan 20 20:56:09 2014 (r260926) @@ -71,8 +71,9 @@ TAILQ_HEAD(,pci_vendor_info) pci_vendors static struct pcisel getsel(const char *str); static void list_bars(int fd, struct pci_conf *p); static void list_devs(const char *name, int verbose, int bars, int caps, - int errors); + int errors, int vpd); static void list_verbose(struct pci_conf *p); +static void list_vpd(int fd, struct pci_conf *p); static const char *guess_class(struct pci_conf *p); static const char *guess_subclass(struct pci_conf *p); static int load_vendors(void); @@ -86,7 +87,7 @@ static void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n", - "usage: pciconf -l [-bcev] [device]", + "usage: pciconf -l [-bcevV] [device]", " pciconf -a device", " pciconf -r [-b | -h] device addr[:addr2]", " pciconf -w [-b | -h] device addr value"); @@ -98,13 +99,13 @@ main(int argc, char **argv) { int c; int listmode, readmode, writemode, attachedmode; - int bars, caps, errors, verbose; + int bars, caps, errors, verbose, vpd; int byte, isshort; listmode = readmode = writemode = attachedmode = 0; - bars = caps = errors = verbose = byte = isshort = 0; + bars = caps = errors = verbose = vpd = byte = isshort = 0; - while ((c = getopt(argc, argv, "abcehlrwv")) != -1) { + while ((c = getopt(argc, argv, "abcehlrwvV")) != -1) { switch(c) { case 'a': attachedmode = 1; @@ -143,6 +144,10 @@ main(int argc, char **argv) verbose = 1; break; + case 'V': + vpd = 1; + break; + default: usage(); } @@ -156,7 +161,7 @@ main(int argc, char **argv) if (listmode) { list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose, - bars, caps, errors); + bars, caps, errors, vpd); } else if (attachedmode) { chkattached(argv[optind]); } else if (readmode) { @@ -173,7 +178,8 @@ main(int argc, char **argv) } static void -list_devs(const char *name, int verbose, int bars, int caps, int errors) +list_devs(const char *name, int verbose, int bars, int caps, int errors, + int vpd) { int fd; struct pci_conf_io pc; @@ -246,6 +252,8 @@ list_devs(const char *name, int verbose, list_caps(fd, p); if (errors) list_errors(fd, p); + if (vpd) + list_vpd(fd, p); } } while (pc.status == PCI_GETCONF_MORE_DEVS); @@ -339,6 +347,63 @@ list_verbose(struct pci_conf *p) printf(" subclass = %s\n", dp); } +static void +list_vpd(int fd, struct pci_conf *p) +{ + struct pci_list_vpd_io list; + struct pci_vpd_element *vpd, *end; + + list.plvi_sel = p->pc_sel; + list.plvi_len = 0; + list.plvi_data = NULL; + if (ioctl(fd, PCIOCLISTVPD, &list) < 0 || list.plvi_len == 0) + return; + + list.plvi_data = malloc(list.plvi_len); + if (ioctl(fd, PCIOCLISTVPD, &list) < 0) { + free(list.plvi_data); + return; + } + + vpd = list.plvi_data; + end = (struct pci_vpd_element *)((char *)vpd + list.plvi_len); + for (; vpd < end; vpd = PVE_NEXT(vpd)) { + if (vpd->pve_flags == PVE_FLAG_IDENT) { + printf(" VPD ident = '%.*s'\n", + (int)vpd->pve_datalen, vpd->pve_data); + continue; + } + + /* Ignore the checksum keyword. */ + if (!(vpd->pve_flags & PVE_FLAG_RW) && + memcmp(vpd->pve_keyword, "RV", 2) == 0) + continue; + + /* Ignore remaining read-write space. */ + if (vpd->pve_flags & PVE_FLAG_RW && + memcmp(vpd->pve_keyword, "RW", 2) == 0) + continue; + + /* Handle extended capability keyword. */ + if (!(vpd->pve_flags & PVE_FLAG_RW) && + memcmp(vpd->pve_keyword, "CP", 2) == 0) { + printf(" VPD ro CP = ID %02x in map 0x%x[0x%x]\n", + (unsigned int)vpd->pve_data[0], + PCIR_BAR((unsigned int)vpd->pve_data[1]), + (unsigned int)vpd->pve_data[3] << 8 | + (unsigned int)vpd->pve_data[2]); + continue; + } + + /* Remaining keywords should all have ASCII values. */ + printf(" VPD %s %c%c = '%.*s'\n", + vpd->pve_flags & PVE_FLAG_RW ? "rw" : "ro", + vpd->pve_keyword[0], vpd->pve_keyword[1], + (int)vpd->pve_datalen, vpd->pve_data); + } + free(list.plvi_data); +} + /* * This is a direct cut-and-paste from the table in sys/dev/pci/pci.c. */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:21:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 824A1C77; Mon, 20 Jan 2014 21:21:23 +0000 (UTC) Received: from felyko.com (felyko.com [174.136.100.2]) by mx1.freebsd.org (Postfix) with ESMTP id 645F21D0C; Mon, 20 Jan 2014 21:21:23 +0000 (UTC) Received: from rui-macbook-pro.apple.com (unknown [17.193.13.39]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 6896A39828; Mon, 20 Jan 2014 13:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1390252877; bh=gZBSuVqUnJoVmRb+VkwgShwQBS1w4E5DXa4eWtFEdhk=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=Id9h1S1JrMDAtODIpFbYjlBQL5oKLicV/Oi8JCoKb3YZbcDrgDZE2oB/7UBJhf9Wo 4qIOLfaoPDeeUaMpsSVabeDFEwZfAv2kBpCiv7db+fq7H9rRcTCVvGSlSC1uHnNhsx 7VHCBPNKEtUx8/vV/J3w7KqdoRFUxhYVWxV631qQ= Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1864\)) Subject: Re: svn commit: r260898 - head/sys/kern From: Rui Paulo In-Reply-To: <1536225.gsjt6oXMt2@pippin.baldwin.cx> Date: Mon, 20 Jan 2014 13:21:13 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <71438498-A67C-4C7D-8C8B-4A9C199AC1B1@felyko.com> References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1864) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:21:23 -0000 On 20 Jan 2014, at 08:32, John Baldwin wrote: > On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: >> On 19 Jan 2014, at 17:59, Neel Natu wrote: >>> Author: neel >>> Date: Mon Jan 20 01:59:35 2014 >>> New Revision: 260898 >>> URL: http://svnweb.freebsd.org/changeset/base/260898 >>>=20 >>> Log: >>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient = entries >>> for >>> WITNESS to actually work. >>=20 >> This value should be automatically tuned... >=20 > How do you propose to do so? This is the count of locks initialized = before=20 > witness' own SYSINIT is executed and the array it sizes is allocated=20= > statically at compile time. Witness is never used (witness_cold) until witness_initialise() is = called, right? > This used to not be a static array, but an > intrusive list embedded in locks themselves, but we decided to shave a > pointer off of each lock that was only used for that and to use a = statically=20 > sized table instead. Why don=92t we start with a static value (say 1024) and then = reinitialise and copy array if it doesn=92t fit instead of crashing the = kernel? -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:50:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A7A6492; Mon, 20 Jan 2014 21:50:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6AEE81F07; Mon, 20 Jan 2014 21:50:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLo1mb099799; Mon, 20 Jan 2014 21:50:01 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLo1wF099798; Mon, 20 Jan 2014 21:50:01 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202150.s0KLo1wF099798@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 21:50:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260928 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:50:01 -0000 Author: gjb Date: Mon Jan 20 21:50:00 2014 New Revision: 260928 URL: http://svnweb.freebsd.org/changeset/base/260928 Log: Remove entries that: - exist in a release [1] - do not have a corresponding revision class [1] This is done to make ensure for 11.0-RELEASE, we do not end up with entries from older releases, like happened with 10.0-R. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:49:59 2014 (r260927) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:50:00 2014 (r260928) @@ -104,132 +104,28 @@ Kernel Changes - The use of unmapped VMIO buffers - eliminates the need to perform TLB shootdown for mapping on - buffer creation and reuse, greatly reducing the amount of IPIs - for shootdown on big-SMP machines and eliminating up to 25-30% - of the system time on i/o intensive workloads. - - The maximum amount of memory - the &os; kernel can address has been increased from 1TB to - 4TB. - - The &man.ddb.4; kernel debugger now has an - output capture facility. Input and output from &man.ddb.4; can - now be captured to a memory buffer for later inspection using - &man.sysctl.8; or a textdump. The new - capture command controls this feature. - - The &man.ddb.4; debugger now supports a simple - scripting facility, which supports a set of named scripts - consisting of a set of &man.ddb.4; commands. These commands can - be managed from within &man.ddb.4; or with the use of the new - &man.ddb.8; utility. More details can be found in the - &man.ddb.4; manual page. - - Support was added for - the new Intel on-CPU Bull Mountain random number generator, - found on IvyBridge and supposedly later CPUs, accessible with - RDRAND instruction. +   Virtualization support - The BSD Hypervisor, - &man.bhyve.8; is included with &os;. &man.bhyve.8; requires - Intel CPUs with VT-x and Extended Page Table (EPT) support. - These features are on all Nehalem models and beyond (e.g. - Nehalem and newer), but not on the lower-end Atom CPUs. - - &man.virtio.4; support has been added. - &man.virtio.4; is the name for the paravirtualization - interface developed for the Linux KVM, but since adopted to - other virtual machine hypervisors (with the notable exception - of Xen). This work brings in a BSD-licensed clean-room - implementation of the virtio kernel drivers for disk IO - (&man.virtio_blk.4; and &man.virtio_scsi.4;), network IO - (&man.vtnet.4;), memory ballooning (&man.virtio_balloon.4;), - and PCI. Tested with on Qemu/KVM, VirtualBox, and - &man.bhyve.4;. - - Paravirtualized - drivers which support Microsoft Hyper-V have been imported and - made part of the amd64 GENERIC kernel. For i386, these - drivers are not part of GENERIC, so the following lines must - be added to /boot/loader.conf to load - these drivers: - - hv_ata_pci_disengage_load="YES" -hv_netsvc_load="YES" -hv_utils_load="YES" -hv_vmbus_load="YES" - - Alternatively, the Hyper-V drivers can be added to the - i386 kernel by adding device hyperv to the - kernel config, and then recompiling the kernel. Please refer - to: FreeBSD - and Microsoft Windows Server Hyper-V support for full - instructions on how to set up Hyper-V support under - FreeBSD. - - The &man.vmx.4; driver has been added. - &man.vmx.4; is a VMware VMXNET3 ethernet driver ported from - OpenBSD. - - Xen PVHVM - virtualization is now part of the GENERIC kernel. +   ARM support - Raspberry PI support has been added. - Refer to these setup - instructions and quick - start guide. - - The default ABI on ARM is now the ARM - EABI. This brings a number of improvements and allows future - support for VFP and Thumb-2. - - ARM support has been greatly improved, - including support for ARMv6 and ARMv7, SMP and thread-local - storage (TLS). Additionally support for some newer SoC like - the MV78x60 and OMAP4 was added. See this - announcement for further details. - - Superpages support on ARM has been - added. Superpages support provides improved performance and - scalability by allowing TLB translations to dynamically cover - large physical memory regions. All ARMv6 and ARMv7-based - platforms can take advantage of this feature. See this - page for further details. +   - Hardware Support @@ -237,168 +133,42 @@ hv_vmbus_load="YES" Multimedia Support - Support for version 2.0 of the USB - Audio reference design has been added. New devices should - support higher bandwidth, increased sampling frequency and - wider dynamic range. +   + Network Interface Support - The firmware for the &man.mxge.4; driver has been - 1.4.55. +   - The &man.re.4; driver has been overhauled to fix a - number of issues. This driver now has Wake On LAN (WOL) - support. - - The &man.vr.4; driver has been overhauled to fix a - number of outstanding issues. It also now works on all - architectures. - - The &man.wpi.4; driver - has been updated to include a number of stability - fixes. - - The &man.cxgbe.4; driver has been - updated to support 40G/10G Ethernet NICs based on Chelsio's - Terminator 5 (T5) ASIC. - - The iw_cxgbe driver has been added. - This is an experimental iWARP/RDMA driver (kernel verbs - only) for Chelsio's T4 and T5 based cards. - - The Open Fabrics Enterprise - Distribution (OFED) and OFED Infiniband core has been - updated to the same version as supplied by Linux version - 3.7 - - The Mellanox Infiniband driver has - been updated to firmware version 2.30.3200 for ConnectX3 - NICs. Support has been added for ConnectX3 VPI NICs, where - each port can be used as Infiniband 56 GB/s or Ethernet 40 - GB/s. Support has been added for dynamically loading kernel - modules for Infiniband core (ibcore) and IP over Infiniband - (ipoib). - - &man.netmap.4; has been added. - &man.netmap.4; is a framework for high-performance - direct-to-hardware packet IO, offering low latency and high - PPS rates to userland applications while bypassing any - kernel-side packet processing. With &man.netmap.4; it is - trivially possible to fully saturate a 10 Gbps network - interface with minimal packet sizes. For more information, - see: Netmap - Project. Network Protocols - &man.carp.4; has been rewritten to make - addresses more sane from the viewpoint of routing daemons such - as quagga/zebra. It also brings support for a single redundant - address on the subnet (carpdev), switching state with - &man.ifconfig.8;, better locking and using modern kernel - interfaces to allocate multicast memberships. Configuration - of the CARP protocol via &man.ifconfig.8; has changed, as well - as format of CARP events submitted to &man.devd.8; has - changed. See &man.carp.4; for more information. The arpbalance - feature of &man.carp.4; is currently not supported - anymore. - - The &man.pf.4; firewall now supports - fine-grain locking and better utilization on multi-cpu - machines resulting in significant improvements in - performance. - - Support for up to 65536 routing tables - has been introduced. - - Support for setting/matching - differentiated services codepoints (DSCP) in IP header has - been added to &man.ipfw.8;. +   + Disks and Storage - The &man.aac.4; driver now supports volumes - larger than 2TB in size. +   - The &man.ata.4; driver now supports a spindown command for - disks; after a configurable amount of time, if no requests - have been received for a disk, the disk will be spun down - until the next request. The &man.atacontrol.8; utility now - supports a spindown command to configure - this feature. - - The &man.hptrr.4; driver has been updated to - version 1.2 from Highpoint. - - &man.nvme.4; has been added and provides - NVM Express support. NVM Express is an optimized register - interface, command set and feature set of PCI Express - (PCIe)-based Solid-State Drives (SSDs). For more information, - see nvmexpress.org. File Systems - A new kernel-based iSCSI target and - initiator has been added. - - UFS filesystems can now be enlarged with - &man.growfs.8; while mounted read-write. This is especially - useful for virtual machines, allowing the addition of more - harddrive space without interruption of service. - - A state of the art FUSE implementation - is now part of the base system. It allows the use of nearly - all fusefs file systems. +   ZFS - &man.bsdinstall.8; now supports - installing ZFS on the root file system. It includes - a single configuration menu that allows you to select all of - the required details, including which drives to use, what - ZFS RAID level to use (taking into consideration the - selected number of drives), GPT or MBR, GELI encryption, - forcing 4K sectors, pool name, etc. - - TRIM support has been added for - ZFS. - - Support for the high performance LZ4 - compression algorithm has been added to ZFS. LZ4 is usually - faster and can achieve a higher compression ratio than LZJB, - the default compression algorithm. - - Support for L2ARC compression has been - added to ZFS. - - The zio nop-write improvement from - Illumos was imported into &os;. To reduce I/O, nop-write - skips overwriting data if the checksum (cryptographically - secure) of new data matches the checksum of existing data. - It also saves space if snapshots are in use. This - improvement only works only on datasets with enabled - compression, disabled deduplication and sha256 - checksums. - - ZFS will now compare the checksums of incoming writes to - the checksum of the existing on-disk data and avoid issuing - any write I/O for data that has not changed. This will - reduce I/O as well as space usage because if the old block - is referenced by a snapshot, both copies of the block are - kept even though both contain the same data. +   + From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:49:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90BD2491; Mon, 20 Jan 2014 21:49:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7C8531F05; Mon, 20 Jan 2014 21:49:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLnxQ6099690; Mon, 20 Jan 2014 21:49:59 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLnxwQ099689; Mon, 20 Jan 2014 21:49:59 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202149.s0KLnxwQ099689@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 21:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260927 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:49:59 -0000 Author: gjb Date: Mon Jan 20 21:49:59 2014 New Revision: 260927 URL: http://svnweb.freebsd.org/changeset/base/260927 Log: Trim copyright years. Add missing punctuation. Use in place of literal quotes. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 20:56:09 2014 (r260926) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:49:59 2014 (r260927) @@ -12,20 +12,6 @@ $FreeBSD$ - 2000 - 2001 - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - 2009 - 2010 - 2011 - 2012 - 2013 2014 The &os; Documentation Project @@ -365,7 +351,7 @@ hv_vmbus_load="YES" File Systems A new kernel-based iSCSI target and - initiator has been added + initiator has been added. UFS filesystems can now be enlarged with &man.growfs.8; while mounted read-write. This is especially @@ -374,7 +360,7 @@ hv_vmbus_load="YES" A state of the art FUSE implementation is now part of the base system. It allows the use of nearly - all fusefs file systems + all fusefs file systems. ZFS @@ -393,7 +379,7 @@ hv_vmbus_load="YES" Support for the high performance LZ4 compression algorithm has been added to ZFS. LZ4 is usually faster and can achieve a higher compression ratio than LZJB, - the default compression algorithm + the default compression algorithm. Support for L2ARC compression has been added to ZFS. @@ -469,7 +455,7 @@ hv_vmbus_load="YES" 2.5.37 &man.make.1; has been replaced with the - "Portable" BSD make tool (bmake) from NetBSD. + Portable BSD make tool (bmake) from NetBSD. Support for usernames up to 32 characters. @@ -608,7 +594,7 @@ hv_vmbus_load="YES" CVS has been removed from the base system, but is still available from - ports + ports. Subversion has been imported into the base system and is installed as svnlite. @@ -671,7 +657,7 @@ hv_vmbus_load="YES" pkg_info, pkg_updating, and pkg_version utilities have been removed. &man.pkg.7; must now be used to install binary packages. &man.pkg.7; is the next generation &os; package - manager, also referred to as "pkgng". + manager, also referred to as pkgng. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:50:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 670F9493; Mon, 20 Jan 2014 21:50:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 51E3B1F08; Mon, 20 Jan 2014 21:50:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLo3Nx099856; Mon, 20 Jan 2014 21:50:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLo3dv099855; Mon, 20 Jan 2014 21:50:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202150.s0KLo3dv099855@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 21:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260929 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:50:03 -0000 Author: gjb Date: Mon Jan 20 21:50:02 2014 New Revision: 260929 URL: http://svnweb.freebsd.org/changeset/base/260929 Log: Final sweep to remove items that now exist in a release. While here, clean up spacing between closing para tags and closing sectN tags. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:50:00 2014 (r260928) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:50:02 2014 (r260929) @@ -110,21 +110,18 @@ Virtualization support   - ARM support   - Boot Loader Changes   - @@ -134,14 +131,12 @@ Multimedia Support   - Network Interface Support   - @@ -149,14 +144,12 @@ Network Protocols   - Disks and Storage   - @@ -168,7 +161,6 @@ ZFS   - @@ -176,169 +168,7 @@ Userland Changes - On platforms where &man.clang.1; is the - default system compiler, (such as i386, amd64, arm) GCC and GNU - libstdc++ are no longer built by default. &man.clang.1; and - libc++ from LLVM are used on these platforms by instead. GCC - 4.2.1 and libstdc++ are still built and used by default on pc98 - and all other platforms where &man.clang.1; is not the default - system compiler. - - &man.clang.1; and llvm have been updated - to version 3.3 release. Please refer to - Clang 3.3 Release Notes. - - BIND has been replaced by - &man.unbound.8; for local dns resolution in the base system. - With this change, nslookup and dig are no longer a part of the - base system. Users should instead use &man.host.1; and - &man.drill.1; Alternatively, nslookup and dig can be obtained by - installing the dns/bind-tools port. - - sysinstall has been removed from the base - system. Auxiliary libraries and tools used by sysinstall such - as libdisk, libftpio, and sade have also been removed. - sysinstall has been replaced by &man.bsdinstall.8; and - &man.bsdconfig.8;. - - &man.freebsd-version.1; has been added. - This tool makes a best effort to determine the version and patch - level of the installed kernel and userland. - - GNU patch has been removed from the base - system, and replaced by a BSD-licensed &man.patch.1; - program. - - GNU sort has been removed from the base - system, and replaced by a BSD-licensed &man.sort.1; - program. - - Berkely yacc (byacc) has been imported - from invisible - island. This brings bison compatibilities to - &man.yacc.1; while preserving full backwards compatibility with - previous version of &man.yacc.1;. - - &man.lex.1; has been replaced by flex - 2.5.37 - - &man.make.1; has been replaced with the - Portable BSD make tool (bmake) from NetBSD. - - Support for usernames up to 32 - characters. - - The &man.adduser.8; utility now supports - a option to set the mode of a new user's - home directory. - - BSD-licensed versions of &man.ar.1; and &man.ranlib.1;, - based on libarchive, have replaced the GNU - Binutils versions of these utilities. - - BSD-licensed versions of &man.bc.1; and &man.dc.1; have - replaced their GNU counterparts. - - &man.chflags.1; now supports - a flag for verbose output and - a flag to ignore errors with the same - semantics as (for example) &man.chmod.1;. - - For compatibility with other implementations, &man.cp.1; now - supports a flag, which is equivalent to - specifying the flags. - - BSD-licensed version of &man.cpio.1; based on - libarchive, has replaced the GNU cpio. - Note that the GNU cpio is still installed as - gcpio. - - The &man.env.1; program now supports which will completely - unset the given variable name by - removing it from the environment, instead of just setting it to - a null value. - - The &man.fdopendir.3; library function has been - added. - - The &man.fetch.3; library now support HTTP 1.1 - If-Modified-Since behavior. The &man.fetch.1; program now - supports - which will only download the specified HTTP URL if the content - is newer than filename. - - &man.find.1; has been enhanced by the addition of a number - of primaries that were present in GNU find but not &os; - &man.find.1;. - - &man.kgdb.1; now supports a new add-kld - command to make it easier to debug crash dumps with kernel - modules. - - The &man.ls.1; program now supports a - option to specify a date format string to be used with the long - format () output. - - &man.nc.1; now supports a switch to - disable the use of TCP options. - - &man.nc.1;'s switch has been deprecated. - It will be removed in a future release. - - The &man.ping6.8; utility now returns 2 - when the packet transmission was successful but no responses - were received (this is the same behavior as &man.ping.8;). - It returned a non-zero value before this change. - - The &man.realpath.1; utility now supports - a flag to suppress warnings; it now also - accepts multiple paths on its command line. - - &man.sh.1; has many bug fixes, some new features, and will - now refuse to parse some invalid scripts. Additionally, it now - has filename completion and defaults to the "emacs" - editing mode. - - The &man.split.1; utility now supports a - flag to split a file into a certain number of chunks. - - The &man.tar.1; utility now supports a - flag to enable &man.compress.1;-style - compression/decompression. - - The &man.tar.1; utility now supports a - flag to ignore user/group names - on create and extract. - - The &man.tar.1; utility now supports an - flag to sparsify files on extraction. - - The &man.tar.1; utility now supports a - flag to substitute filenames based on the specified regular - expression. - - The &man.tcgetsid.3; library function has been added to - return the process group ID for the session leader for the - controlling terminal. It is defined in IEEE Std 1003.1-2001 - (POSIX). - - &man.top.1; now supports a flag to - provide per-CPU usage statistics. - - &man.zdump.8; is now working properly on 64 bit - architectures. - - &man.traceroute.8; now has the ability to print the AS - number for each hop with the new switch; a - new option allows selecting a particular - WHOIS server. - - &man.traceroute6.8; now supports a flag - to send probe packets with no upper-layer protocol, rather than - the usual UDP probe packets. +   <filename>/etc/rc.d</filename> Scripts @@ -350,93 +180,19 @@ Contributed Software - &man.jemalloc.3; has been updated to - 3.4.0. See this - link for more details. - - AMD has been - updated from 6.0.10 to 6.1.5. - - awk has been - updated from 1 May - 2007 release to the 20121220 release. - - CVS has been - removed from the base system, but is still available from - ports. - - Subversion has been imported into the base - system and is installed as svnlite. - svnlite should only be used for - checking out &os; source and committing, and does not replace - the full Subversion port. - - file has been - updated to 5.11. - - hostapd has - been updated from 0.5.8 to 0.5.10. - - IPFilter has been updated to - 5.1.2. - - less has been - updated to v458. - - ncurses has been updated from to - 5.7-20081102. - - OpenSSH has been - updated to 6.4. - - OpenPAM has - been updated to the Micrampelis release. - - sendmail has been - updated from 8.14.1 to 8.14.7. - - The timezone database has been updated from - the tzdata2008h release to - the tzdata2009m release. - - The stdtime part of libc, &man.zdump.8; and &man.zic.8; have - been updated from the tzcode2004a - release to the tzcode2009h release. - If you have upgraded from source or via the - &man.freebsd-update.8;, then please run &man.tzsetup.8; to - install a new /etc/localtime. - - WPA Supplicant - has been updated to 2.0. - - xz has been updated - from snapshot as of 12 April 2010 to 5.0.0. - - &man.nvi.1; has been updated - to 2.1.2. - - &man.nvi.1; supports wide character - locales. +   Ports/Packages Collection Infrastructure - The pkg_add, pkg_create, pkg_delete, - pkg_info, pkg_updating, and pkg_version utilities have been - removed. &man.pkg.7; must now be used to install binary - packages. &man.pkg.7; is the next generation &os; package - manager, also referred to as pkgng. +   Release Engineering and Integration - The supported version of the - GNOME desktop environment - (x11/gnome2) has been updated from 2.20.1 - to 2.22. +   From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:50:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97825A21; Mon, 20 Jan 2014 21:50:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F8C41F1E; Mon, 20 Jan 2014 21:50:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLoWRu002288; Mon, 20 Jan 2014 21:50:32 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLoVjp002282; Mon, 20 Jan 2014 21:50:31 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401202150.s0KLoVjp002282@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 20 Jan 2014 21:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260932 - stable/10/contrib/gcc/cp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:50:32 -0000 Author: pfg Date: Mon Jan 20 21:50:31 2014 New Revision: 260932 URL: http://svnweb.freebsd.org/changeset/base/260932 Log: MFC r260332; gcc: backport some fixes from llvm-gcc llvm-gcc backported some patches from gcc trunk: http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00662.html http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00019.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00240.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00493.html The first two were always GPL2. The last two were added after the GPL3 transition, but were written by aaw@google.com and Rafael Espíndola got permission to relicense them under the GPL2 for inclusion in llvm-gcc. This fixes GCC-PR c++/31749 Obtained from: llvm-gcc (rev. 75463; GPLv2) Modified: stable/10/contrib/gcc/cp/ChangeLog.gcc43 stable/10/contrib/gcc/cp/decl.c stable/10/contrib/gcc/cp/name-lookup.c stable/10/contrib/gcc/cp/parser.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- stable/10/contrib/gcc/cp/ChangeLog.gcc43 Mon Jan 20 21:50:06 2014 (r260931) +++ stable/10/contrib/gcc/cp/ChangeLog.gcc43 Mon Jan 20 21:50:31 2014 (r260932) @@ -7,6 +7,17 @@ * typeck.c (cxx_alignof_expr): When alignof is used on a plain FUNCTION_DECL, return its alignment. +2007-07-01 Ollie Wild (r126177) + + * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden. + (select_decl): Remove function. + (unqualified_namespace_lookup): Populate binding by calling + ambiguous_decl. Remove select_decl call. + (lookup_qualified_name): Remove select_decl call. + * decl.c (lookup_and_check_tag): Check for ambiguous references. + * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error + generation when name lookup is ambiguous. + 2007-06-28 Geoffrey Keating (r126088) * decl2.c (determine_visibility): Implement @@ -29,6 +40,11 @@ * typeck.c (build_binary_op): Include types in error. +2007-05-22 Ollie Wild (r124963) + + * name-lookup.c (ambiguous_decl): Adds check for hidden types. + (unqualified_namespace_lookup): Adds check for hidden types. + 2007-05-18 Geoffrey Keating (r124839) * mangle.c (write_real_cst): Use 'unsigned long' for %lx. Modified: stable/10/contrib/gcc/cp/decl.c ============================================================================== --- stable/10/contrib/gcc/cp/decl.c Mon Jan 20 21:50:06 2014 (r260931) +++ stable/10/contrib/gcc/cp/decl.c Mon Jan 20 21:50:31 2014 (r260932) @@ -9784,6 +9784,12 @@ lookup_and_check_tag (enum tag_types tag | DECL_SELF_REFERENCE_P (decl)); return t; } + else if (decl && TREE_CODE (decl) == TREE_LIST) + { + error ("reference to %qD is ambiguous", name); + print_candidates (decl); + return error_mark_node; + } else return NULL_TREE; } Modified: stable/10/contrib/gcc/cp/name-lookup.c ============================================================================== --- stable/10/contrib/gcc/cp/name-lookup.c Mon Jan 20 21:50:06 2014 (r260931) +++ stable/10/contrib/gcc/cp/name-lookup.c Mon Jan 20 21:50:31 2014 (r260932) @@ -42,7 +42,6 @@ struct scope_binding { #define EMPTY_SCOPE_BINDING { NULL_TREE, NULL_TREE } static cxx_scope *innermost_nonclass_level (void); -static tree select_decl (const struct scope_binding *, int); static cxx_binding *binding_for_name (cxx_scope *, tree); static tree lookup_name_innermost_nonclass_level (tree); static tree push_overloaded_decl (tree, int, bool); @@ -2100,6 +2099,22 @@ do_nonmember_using_decl (tree scope, tre return; } + /* LLVM LOCAL begin mainline */ + /* Shift the old and new bindings around so we're comparing class and + enumeration names to each other. */ + if (oldval && DECL_IMPLICIT_TYPEDEF_P (oldval)) + { + oldtype = oldval; + oldval = NULL_TREE; + } + + if (decls.value && DECL_IMPLICIT_TYPEDEF_P (decls.value)) + { + decls.type = decls.value; + decls.value = NULL_TREE; + } + /* LLVM LOCAL end mainline */ + /* It is impossible to overload a built-in function; any explicit declaration eliminates the built-in declaration. So, if OLDVAL is a built-in, then we can just pretend it isn't there. */ @@ -2109,95 +2124,112 @@ do_nonmember_using_decl (tree scope, tre && !DECL_HIDDEN_FRIEND_P (oldval)) oldval = NULL_TREE; - /* Check for using functions. */ - if (decls.value && is_overloaded_fn (decls.value)) + /* LLVM LOCAL begin mainline */ + if (decls.value) { - tree tmp, tmp1; - - if (oldval && !is_overloaded_fn (oldval)) - { - if (!DECL_IMPLICIT_TYPEDEF_P (oldval)) - error ("%qD is already declared in this scope", name); - oldval = NULL_TREE; - } - - *newval = oldval; - for (tmp = decls.value; tmp; tmp = OVL_NEXT (tmp)) + /* Check for using functions. */ + if (is_overloaded_fn (decls.value)) { - tree new_fn = OVL_CURRENT (tmp); + tree tmp, tmp1; - /* [namespace.udecl] + if (oldval && !is_overloaded_fn (oldval)) + { + error ("%qD is already declared in this scope", name); + oldval = NULL_TREE; + } - If a function declaration in namespace scope or block - scope has the same name and the same parameter types as a - function introduced by a using declaration the program is - ill-formed. */ - for (tmp1 = oldval; tmp1; tmp1 = OVL_NEXT (tmp1)) + *newval = oldval; + for (tmp = decls.value; tmp; tmp = OVL_NEXT (tmp)) { - tree old_fn = OVL_CURRENT (tmp1); + tree new_fn = OVL_CURRENT (tmp); - if (new_fn == old_fn) - /* The function already exists in the current namespace. */ - break; - else if (OVL_USED (tmp1)) - continue; /* this is a using decl */ - else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (new_fn)), - TYPE_ARG_TYPES (TREE_TYPE (old_fn)))) + /* [namespace.udecl] + + If a function declaration in namespace scope or block + scope has the same name and the same parameter types as a + function introduced by a using declaration the program is + ill-formed. */ + for (tmp1 = oldval; tmp1; tmp1 = OVL_NEXT (tmp1)) { - gcc_assert (!DECL_ANTICIPATED (old_fn) - || DECL_HIDDEN_FRIEND_P (old_fn)); + tree old_fn = OVL_CURRENT (tmp1); - /* There was already a non-using declaration in - this scope with the same parameter types. If both - are the same extern "C" functions, that's ok. */ - if (decls_match (new_fn, old_fn)) + if (new_fn == old_fn) + /* The function already exists in the current namespace. */ break; - else + else if (OVL_USED (tmp1)) + continue; /* this is a using decl */ + else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (new_fn)), + TYPE_ARG_TYPES (TREE_TYPE (old_fn)))) { - error ("%qD is already declared in this scope", name); - break; + gcc_assert (!DECL_ANTICIPATED (old_fn) + || DECL_HIDDEN_FRIEND_P (old_fn)); + + /* There was already a non-using declaration in + this scope with the same parameter types. If both + are the same extern "C" functions, that's ok. */ + if (decls_match (new_fn, old_fn)) + break; + else + { + error ("%qD is already declared in this scope", name); + break; + } } } - } - /* If we broke out of the loop, there's no reason to add - this function to the using declarations for this - scope. */ - if (tmp1) - continue; - - /* If we are adding to an existing OVERLOAD, then we no - longer know the type of the set of functions. */ - if (*newval && TREE_CODE (*newval) == OVERLOAD) - TREE_TYPE (*newval) = unknown_type_node; - /* Add this new function to the set. */ - *newval = build_overload (OVL_CURRENT (tmp), *newval); - /* If there is only one function, then we use its type. (A - using-declaration naming a single function can be used in - contexts where overload resolution cannot be - performed.) */ - if (TREE_CODE (*newval) != OVERLOAD) - { - *newval = ovl_cons (*newval, NULL_TREE); - TREE_TYPE (*newval) = TREE_TYPE (OVL_CURRENT (tmp)); + /* If we broke out of the loop, there's no reason to add + this function to the using declarations for this + scope. */ + if (tmp1) + continue; + + /* If we are adding to an existing OVERLOAD, then we no + longer know the type of the set of functions. */ + if (*newval && TREE_CODE (*newval) == OVERLOAD) + TREE_TYPE (*newval) = unknown_type_node; + /* Add this new function to the set. */ + *newval = build_overload (OVL_CURRENT (tmp), *newval); + /* If there is only one function, then we use its type. (A + using-declaration naming a single function can be used in + contexts where overload resolution cannot be + performed.) */ + if (TREE_CODE (*newval) != OVERLOAD) + { + *newval = ovl_cons (*newval, NULL_TREE); + TREE_TYPE (*newval) = TREE_TYPE (OVL_CURRENT (tmp)); + } + OVL_USED (*newval) = 1; } - OVL_USED (*newval) = 1; + } + else + { + *newval = decls.value; + if (oldval && !decls_match (*newval, oldval)) + error ("%qD is already declared in this scope", name); } } else + *newval = oldval; + + if (decls.type && TREE_CODE (decls.type) == TREE_LIST) { - *newval = decls.value; - if (oldval && !decls_match (*newval, oldval)) - error ("%qD is already declared in this scope", name); + error ("reference to %qD is ambiguous", name); + print_candidates (decls.type); } - - *newtype = decls.type; - if (oldtype && *newtype && !same_type_p (oldtype, *newtype)) + else { - error ("using declaration %qD introduced ambiguous type %qT", - name, oldtype); - return; + *newtype = decls.type; + if (oldtype && *newtype && !decls_match (oldtype, *newtype)) + error ("%qD is already declared in this scope", name); } + + /* If *newval is empty, shift any class or enumeration name down. */ + if (!*newval) + { + *newval = *newtype; + *newtype = NULL_TREE; + } + /* LLVM LOCAL end mainline */ } /* Process a using-declaration at function scope. */ @@ -3491,43 +3523,63 @@ merge_functions (tree s1, tree s2) XXX In what way should I treat extern declarations? XXX I don't want to repeat the entire duplicate_decls here */ +/* LLVM LOCAL begin mainline */ static void -ambiguous_decl (tree name, struct scope_binding *old, cxx_binding *new, - int flags) +ambiguous_decl (struct scope_binding *old, cxx_binding *new, int flags) { tree val, type; gcc_assert (old != NULL); + + /* Copy the type. */ + type = new->type; + if (LOOKUP_NAMESPACES_ONLY (flags) + || (type && hidden_name_p (type) && !(flags & LOOKUP_HIDDEN))) + type = NULL_TREE; + /* Copy the value. */ val = new->value; if (val) - switch (TREE_CODE (val)) - { - case TEMPLATE_DECL: - /* If we expect types or namespaces, and not templates, - or this is not a template class. */ - if ((LOOKUP_QUALIFIERS_ONLY (flags) - && !DECL_CLASS_TEMPLATE_P (val)) - || hidden_name_p (val)) - val = NULL_TREE; - break; - case TYPE_DECL: - if (LOOKUP_NAMESPACES_ONLY (flags) || hidden_name_p (val)) - val = NULL_TREE; - break; - case NAMESPACE_DECL: - if (LOOKUP_TYPES_ONLY (flags)) - val = NULL_TREE; - break; - case FUNCTION_DECL: - /* Ignore built-in functions that are still anticipated. */ - if (LOOKUP_QUALIFIERS_ONLY (flags) || hidden_name_p (val)) - val = NULL_TREE; - break; - default: - if (LOOKUP_QUALIFIERS_ONLY (flags)) - val = NULL_TREE; - } + { + if (hidden_name_p (val) && !(flags & LOOKUP_HIDDEN)) + val = NULL_TREE; + else + switch (TREE_CODE (val)) + { + case TEMPLATE_DECL: + /* If we expect types or namespaces, and not templates, + or this is not a template class. */ + if ((LOOKUP_QUALIFIERS_ONLY (flags) + && !DECL_CLASS_TEMPLATE_P (val))) + val = NULL_TREE; + break; + case TYPE_DECL: + if (LOOKUP_NAMESPACES_ONLY (flags) + || (type && (flags & LOOKUP_PREFER_TYPES))) + val = NULL_TREE; + break; + case NAMESPACE_DECL: + if (LOOKUP_TYPES_ONLY (flags)) + val = NULL_TREE; + break; + case FUNCTION_DECL: + /* Ignore built-in functions that are still anticipated. */ + if (LOOKUP_QUALIFIERS_ONLY (flags)) + val = NULL_TREE; + break; + default: + if (LOOKUP_QUALIFIERS_ONLY (flags)) + val = NULL_TREE; + } + } + + /* If val is hidden, shift down any class or enumeration name. */ + if (!val) + { + val = type; + type = NULL_TREE; + } +/* LLVM LOCAL end mainline */ if (!old->value) old->value = val; else if (val && val != old->value) @@ -3537,25 +3589,21 @@ ambiguous_decl (tree name, struct scope_ else { old->value = tree_cons (NULL_TREE, old->value, - build_tree_list (NULL_TREE, new->value)); + build_tree_list (NULL_TREE, val)); TREE_TYPE (old->value) = error_mark_node; } } - /* ... and copy the type. */ - type = new->type; - if (LOOKUP_NAMESPACES_ONLY (flags)) - type = NULL_TREE; + + /* LLVM LOCAL begin mainline */ if (!old->type) old->type = type; else if (type && old->type != type) { - if (flags & LOOKUP_COMPLAIN) - { - error ("%qD denotes an ambiguous type",name); - error ("%J first type here", TYPE_MAIN_DECL (old->type)); - error ("%J other type here", TYPE_MAIN_DECL (type)); - } + old->type = tree_cons (NULL_TREE, old->type, + build_tree_list (NULL_TREE, type)); + TREE_TYPE (old->type) = error_mark_node; } + /* LLVM LOCAL end mainline */ } /* Return the declarations that are members of the namespace NS. */ @@ -3644,36 +3692,6 @@ remove_hidden_names (tree fns) return fns; } -/* Select the right _DECL from multiple choices. */ - -static tree -select_decl (const struct scope_binding *binding, int flags) -{ - tree val; - val = binding->value; - - timevar_push (TV_NAME_LOOKUP); - if (LOOKUP_NAMESPACES_ONLY (flags)) - { - /* We are not interested in types. */ - if (val && (TREE_CODE (val) == NAMESPACE_DECL - || TREE_CODE (val) == TREE_LIST)) - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val); - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, NULL_TREE); - } - - /* If looking for a type, or if there is no non-type binding, select - the value binding. */ - if (binding->type && (!val || (flags & LOOKUP_PREFER_TYPES))) - val = binding->type; - /* Don't return non-types if we really prefer types. */ - else if (val && LOOKUP_TYPES_ONLY (flags) - && ! DECL_DECLARES_TYPE_P (val)) - val = NULL_TREE; - - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val); -} - /* Unscoped lookup of a global: iterate over current namespaces, considering using-directives. */ @@ -3685,22 +3703,18 @@ unqualified_namespace_lookup (tree name, tree siter; struct cp_binding_level *level; tree val = NULL_TREE; - struct scope_binding binding = EMPTY_SCOPE_BINDING; timevar_push (TV_NAME_LOOKUP); for (; !val; scope = CP_DECL_CONTEXT (scope)) { + struct scope_binding binding = EMPTY_SCOPE_BINDING; cxx_binding *b = cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name); if (b) - { - if (b->value - && ((flags & LOOKUP_HIDDEN) || !hidden_name_p (b->value))) - binding.value = b->value; - binding.type = b->type; - } + /* LLVM LOCAL mainline */ + ambiguous_decl (&binding, b, flags); /* Add all _DECLs seen through local using-directives. */ for (level = current_binding_level; @@ -3725,7 +3739,7 @@ unqualified_namespace_lookup (tree name, siter = CP_DECL_CONTEXT (siter); } - val = select_decl (&binding, flags); + val = binding.value; if (scope == global_namespace) break; } @@ -3755,7 +3769,7 @@ lookup_qualified_name (tree scope, tree if (is_type_p) flags |= LOOKUP_PREFER_TYPES; if (qualified_lookup_using_namespace (name, scope, &binding, flags)) - t = select_decl (&binding, flags); + t = binding.value; } else if (is_aggr_type (scope, complain)) t = lookup_member (scope, name, 2, is_type_p); @@ -3788,7 +3802,8 @@ lookup_using_namespace (tree name, struc cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (used), name); /* Resolve ambiguities. */ if (val1) - ambiguous_decl (name, val, val1, flags); + /* LLVM LOCAL mainline */ + ambiguous_decl (val, val1, flags); } POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val->value != error_mark_node); } @@ -3817,7 +3832,8 @@ qualified_lookup_using_namespace (tree n cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name); seen = tree_cons (scope, NULL_TREE, seen); if (binding) - ambiguous_decl (name, result, binding, flags); + /* LLVM LOCAL mainline */ + ambiguous_decl (result, binding, flags); /* Consider strong using directives always, and non-strong ones if we haven't found a binding yet. ??? Shouldn't we consider Modified: stable/10/contrib/gcc/cp/parser.c ============================================================================== --- stable/10/contrib/gcc/cp/parser.c Mon Jan 20 21:50:06 2014 (r260931) +++ stable/10/contrib/gcc/cp/parser.c Mon Jan 20 21:50:31 2014 (r260932) @@ -10337,13 +10337,19 @@ cp_parser_elaborated_type_specifier (cp_ if (parser->scope) { tree decl; + tree ambiguous_decls; decl = cp_parser_lookup_name (parser, identifier, tag_type, /*is_template=*/false, /*is_namespace=*/false, /*check_dependency=*/true, - /*ambiguous_decls=*/NULL); + &ambiguous_decls); + + /* If the lookup was ambiguous, an error will already have been + issued. */ + if (ambiguous_decls) + return error_mark_node; /* If we are parsing friend declaration, DECL may be a TEMPLATE_DECL tree node here. However, we need to check From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:50:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 308015C7; Mon, 20 Jan 2014 21:50:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1CD8F1F0B; Mon, 20 Jan 2014 21:50:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLo6rt099958; Mon, 20 Jan 2014 21:50:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLo6YB099957; Mon, 20 Jan 2014 21:50:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202150.s0KLo6YB099957@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 21:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260931 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:50:07 -0000 Author: gjb Date: Mon Jan 20 21:50:06 2014 New Revision: 260931 URL: http://svnweb.freebsd.org/changeset/base/260931 Log: Document r260921, nand(4) enabled by default for arm. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:50:04 2014 (r260930) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:50:06 2014 (r260931) @@ -115,7 +115,8 @@ ARM support -   + The &man.nand.4; device is enabled for + ARM devices by default. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:50:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81E8054F; Mon, 20 Jan 2014 21:50:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 384B51F09; Mon, 20 Jan 2014 21:50:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLo5wg099910; Mon, 20 Jan 2014 21:50:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLo5SB099908; Mon, 20 Jan 2014 21:50:05 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202150.s0KLo5SB099908@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 21:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260930 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:50:05 -0000 Author: gjb Date: Mon Jan 20 21:50:04 2014 New Revision: 260930 URL: http://svnweb.freebsd.org/changeset/base/260930 Log: Document r260926, support for displaying VPD for PCI devices via pciconf(8). Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:50:02 2014 (r260929) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:50:04 2014 (r260930) @@ -168,7 +168,8 @@ Userland Changes -   + Support for displaying VPD for PCI devices + via &man.pciconf.8; has been added. <filename>/etc/rc.d</filename> Scripts From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:52:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3431CC2C; Mon, 20 Jan 2014 21:52:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5E11F94; Mon, 20 Jan 2014 21:52:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLq1Rc003286; Mon, 20 Jan 2014 21:52:01 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLq0rM003279; Mon, 20 Jan 2014 21:52:00 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401202152.s0KLq0rM003279@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 20 Jan 2014 21:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260933 - stable/9/contrib/gcc/cp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:52:01 -0000 Author: pfg Date: Mon Jan 20 21:52:00 2014 New Revision: 260933 URL: http://svnweb.freebsd.org/changeset/base/260933 Log: MFC r260332; gcc: backport some fixes from llvm-gcc llvm-gcc backported some patches from gcc trunk: http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00662.html http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00019.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00240.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00493.html The first two were always GPL2. The last two were added after the GPL3 transition, but were written by aaw@google.com and Rafael Espíndola got permission to relicense them under the GPL2 for inclusion in llvm-gcc. This fixes GCC-PR c++/31749 Obtained from: llvm-gcc (rev. 75463; GPLv2) Modified: stable/9/contrib/gcc/cp/decl.c stable/9/contrib/gcc/cp/name-lookup.c stable/9/contrib/gcc/cp/parser.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/cp/decl.c ============================================================================== --- stable/9/contrib/gcc/cp/decl.c Mon Jan 20 21:50:31 2014 (r260932) +++ stable/9/contrib/gcc/cp/decl.c Mon Jan 20 21:52:00 2014 (r260933) @@ -9784,6 +9784,12 @@ lookup_and_check_tag (enum tag_types tag | DECL_SELF_REFERENCE_P (decl)); return t; } + else if (decl && TREE_CODE (decl) == TREE_LIST) + { + error ("reference to %qD is ambiguous", name); + print_candidates (decl); + return error_mark_node; + } else return NULL_TREE; } Modified: stable/9/contrib/gcc/cp/name-lookup.c ============================================================================== --- stable/9/contrib/gcc/cp/name-lookup.c Mon Jan 20 21:50:31 2014 (r260932) +++ stable/9/contrib/gcc/cp/name-lookup.c Mon Jan 20 21:52:00 2014 (r260933) @@ -42,7 +42,6 @@ struct scope_binding { #define EMPTY_SCOPE_BINDING { NULL_TREE, NULL_TREE } static cxx_scope *innermost_nonclass_level (void); -static tree select_decl (const struct scope_binding *, int); static cxx_binding *binding_for_name (cxx_scope *, tree); static tree lookup_name_innermost_nonclass_level (tree); static tree push_overloaded_decl (tree, int, bool); @@ -2082,6 +2081,22 @@ do_nonmember_using_decl (tree scope, tre return; } + /* LLVM LOCAL begin mainline */ + /* Shift the old and new bindings around so we're comparing class and + enumeration names to each other. */ + if (oldval && DECL_IMPLICIT_TYPEDEF_P (oldval)) + { + oldtype = oldval; + oldval = NULL_TREE; + } + + if (decls.value && DECL_IMPLICIT_TYPEDEF_P (decls.value)) + { + decls.type = decls.value; + decls.value = NULL_TREE; + } + /* LLVM LOCAL end mainline */ + /* It is impossible to overload a built-in function; any explicit declaration eliminates the built-in declaration. So, if OLDVAL is a built-in, then we can just pretend it isn't there. */ @@ -2091,95 +2106,112 @@ do_nonmember_using_decl (tree scope, tre && !DECL_HIDDEN_FRIEND_P (oldval)) oldval = NULL_TREE; - /* Check for using functions. */ - if (decls.value && is_overloaded_fn (decls.value)) + /* LLVM LOCAL begin mainline */ + if (decls.value) { - tree tmp, tmp1; - - if (oldval && !is_overloaded_fn (oldval)) - { - if (!DECL_IMPLICIT_TYPEDEF_P (oldval)) - error ("%qD is already declared in this scope", name); - oldval = NULL_TREE; - } - - *newval = oldval; - for (tmp = decls.value; tmp; tmp = OVL_NEXT (tmp)) + /* Check for using functions. */ + if (is_overloaded_fn (decls.value)) { - tree new_fn = OVL_CURRENT (tmp); + tree tmp, tmp1; - /* [namespace.udecl] + if (oldval && !is_overloaded_fn (oldval)) + { + error ("%qD is already declared in this scope", name); + oldval = NULL_TREE; + } - If a function declaration in namespace scope or block - scope has the same name and the same parameter types as a - function introduced by a using declaration the program is - ill-formed. */ - for (tmp1 = oldval; tmp1; tmp1 = OVL_NEXT (tmp1)) + *newval = oldval; + for (tmp = decls.value; tmp; tmp = OVL_NEXT (tmp)) { - tree old_fn = OVL_CURRENT (tmp1); + tree new_fn = OVL_CURRENT (tmp); - if (new_fn == old_fn) - /* The function already exists in the current namespace. */ - break; - else if (OVL_USED (tmp1)) - continue; /* this is a using decl */ - else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (new_fn)), - TYPE_ARG_TYPES (TREE_TYPE (old_fn)))) + /* [namespace.udecl] + + If a function declaration in namespace scope or block + scope has the same name and the same parameter types as a + function introduced by a using declaration the program is + ill-formed. */ + for (tmp1 = oldval; tmp1; tmp1 = OVL_NEXT (tmp1)) { - gcc_assert (!DECL_ANTICIPATED (old_fn) - || DECL_HIDDEN_FRIEND_P (old_fn)); + tree old_fn = OVL_CURRENT (tmp1); - /* There was already a non-using declaration in - this scope with the same parameter types. If both - are the same extern "C" functions, that's ok. */ - if (decls_match (new_fn, old_fn)) + if (new_fn == old_fn) + /* The function already exists in the current namespace. */ break; - else + else if (OVL_USED (tmp1)) + continue; /* this is a using decl */ + else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (new_fn)), + TYPE_ARG_TYPES (TREE_TYPE (old_fn)))) { - error ("%qD is already declared in this scope", name); - break; + gcc_assert (!DECL_ANTICIPATED (old_fn) + || DECL_HIDDEN_FRIEND_P (old_fn)); + + /* There was already a non-using declaration in + this scope with the same parameter types. If both + are the same extern "C" functions, that's ok. */ + if (decls_match (new_fn, old_fn)) + break; + else + { + error ("%qD is already declared in this scope", name); + break; + } } } - } - /* If we broke out of the loop, there's no reason to add - this function to the using declarations for this - scope. */ - if (tmp1) - continue; - - /* If we are adding to an existing OVERLOAD, then we no - longer know the type of the set of functions. */ - if (*newval && TREE_CODE (*newval) == OVERLOAD) - TREE_TYPE (*newval) = unknown_type_node; - /* Add this new function to the set. */ - *newval = build_overload (OVL_CURRENT (tmp), *newval); - /* If there is only one function, then we use its type. (A - using-declaration naming a single function can be used in - contexts where overload resolution cannot be - performed.) */ - if (TREE_CODE (*newval) != OVERLOAD) - { - *newval = ovl_cons (*newval, NULL_TREE); - TREE_TYPE (*newval) = TREE_TYPE (OVL_CURRENT (tmp)); + /* If we broke out of the loop, there's no reason to add + this function to the using declarations for this + scope. */ + if (tmp1) + continue; + + /* If we are adding to an existing OVERLOAD, then we no + longer know the type of the set of functions. */ + if (*newval && TREE_CODE (*newval) == OVERLOAD) + TREE_TYPE (*newval) = unknown_type_node; + /* Add this new function to the set. */ + *newval = build_overload (OVL_CURRENT (tmp), *newval); + /* If there is only one function, then we use its type. (A + using-declaration naming a single function can be used in + contexts where overload resolution cannot be + performed.) */ + if (TREE_CODE (*newval) != OVERLOAD) + { + *newval = ovl_cons (*newval, NULL_TREE); + TREE_TYPE (*newval) = TREE_TYPE (OVL_CURRENT (tmp)); + } + OVL_USED (*newval) = 1; } - OVL_USED (*newval) = 1; + } + else + { + *newval = decls.value; + if (oldval && !decls_match (*newval, oldval)) + error ("%qD is already declared in this scope", name); } } else + *newval = oldval; + + if (decls.type && TREE_CODE (decls.type) == TREE_LIST) { - *newval = decls.value; - if (oldval && !decls_match (*newval, oldval)) - error ("%qD is already declared in this scope", name); + error ("reference to %qD is ambiguous", name); + print_candidates (decls.type); } - - *newtype = decls.type; - if (oldtype && *newtype && !same_type_p (oldtype, *newtype)) + else { - error ("using declaration %qD introduced ambiguous type %qT", - name, oldtype); - return; + *newtype = decls.type; + if (oldtype && *newtype && !decls_match (oldtype, *newtype)) + error ("%qD is already declared in this scope", name); } + + /* If *newval is empty, shift any class or enumeration name down. */ + if (!*newval) + { + *newval = *newtype; + *newtype = NULL_TREE; + } + /* LLVM LOCAL end mainline */ } /* Process a using-declaration at function scope. */ @@ -3477,43 +3509,63 @@ merge_functions (tree s1, tree s2) XXX In what way should I treat extern declarations? XXX I don't want to repeat the entire duplicate_decls here */ +/* LLVM LOCAL begin mainline */ static void -ambiguous_decl (tree name, struct scope_binding *old, cxx_binding *new, - int flags) +ambiguous_decl (struct scope_binding *old, cxx_binding *new, int flags) { tree val, type; gcc_assert (old != NULL); + + /* Copy the type. */ + type = new->type; + if (LOOKUP_NAMESPACES_ONLY (flags) + || (type && hidden_name_p (type) && !(flags & LOOKUP_HIDDEN))) + type = NULL_TREE; + /* Copy the value. */ val = new->value; if (val) - switch (TREE_CODE (val)) - { - case TEMPLATE_DECL: - /* If we expect types or namespaces, and not templates, - or this is not a template class. */ - if ((LOOKUP_QUALIFIERS_ONLY (flags) - && !DECL_CLASS_TEMPLATE_P (val)) - || hidden_name_p (val)) - val = NULL_TREE; - break; - case TYPE_DECL: - if (LOOKUP_NAMESPACES_ONLY (flags) || hidden_name_p (val)) - val = NULL_TREE; - break; - case NAMESPACE_DECL: - if (LOOKUP_TYPES_ONLY (flags)) - val = NULL_TREE; - break; - case FUNCTION_DECL: - /* Ignore built-in functions that are still anticipated. */ - if (LOOKUP_QUALIFIERS_ONLY (flags) || hidden_name_p (val)) - val = NULL_TREE; - break; - default: - if (LOOKUP_QUALIFIERS_ONLY (flags)) - val = NULL_TREE; - } + { + if (hidden_name_p (val) && !(flags & LOOKUP_HIDDEN)) + val = NULL_TREE; + else + switch (TREE_CODE (val)) + { + case TEMPLATE_DECL: + /* If we expect types or namespaces, and not templates, + or this is not a template class. */ + if ((LOOKUP_QUALIFIERS_ONLY (flags) + && !DECL_CLASS_TEMPLATE_P (val))) + val = NULL_TREE; + break; + case TYPE_DECL: + if (LOOKUP_NAMESPACES_ONLY (flags) + || (type && (flags & LOOKUP_PREFER_TYPES))) + val = NULL_TREE; + break; + case NAMESPACE_DECL: + if (LOOKUP_TYPES_ONLY (flags)) + val = NULL_TREE; + break; + case FUNCTION_DECL: + /* Ignore built-in functions that are still anticipated. */ + if (LOOKUP_QUALIFIERS_ONLY (flags)) + val = NULL_TREE; + break; + default: + if (LOOKUP_QUALIFIERS_ONLY (flags)) + val = NULL_TREE; + } + } + + /* If val is hidden, shift down any class or enumeration name. */ + if (!val) + { + val = type; + type = NULL_TREE; + } +/* LLVM LOCAL end mainline */ if (!old->value) old->value = val; else if (val && val != old->value) @@ -3523,25 +3575,21 @@ ambiguous_decl (tree name, struct scope_ else { old->value = tree_cons (NULL_TREE, old->value, - build_tree_list (NULL_TREE, new->value)); + build_tree_list (NULL_TREE, val)); TREE_TYPE (old->value) = error_mark_node; } } - /* ... and copy the type. */ - type = new->type; - if (LOOKUP_NAMESPACES_ONLY (flags)) - type = NULL_TREE; + + /* LLVM LOCAL begin mainline */ if (!old->type) old->type = type; else if (type && old->type != type) { - if (flags & LOOKUP_COMPLAIN) - { - error ("%qD denotes an ambiguous type",name); - error ("%J first type here", TYPE_MAIN_DECL (old->type)); - error ("%J other type here", TYPE_MAIN_DECL (type)); - } + old->type = tree_cons (NULL_TREE, old->type, + build_tree_list (NULL_TREE, type)); + TREE_TYPE (old->type) = error_mark_node; } + /* LLVM LOCAL end mainline */ } /* Return the declarations that are members of the namespace NS. */ @@ -3630,36 +3678,6 @@ remove_hidden_names (tree fns) return fns; } -/* Select the right _DECL from multiple choices. */ - -static tree -select_decl (const struct scope_binding *binding, int flags) -{ - tree val; - val = binding->value; - - timevar_push (TV_NAME_LOOKUP); - if (LOOKUP_NAMESPACES_ONLY (flags)) - { - /* We are not interested in types. */ - if (val && (TREE_CODE (val) == NAMESPACE_DECL - || TREE_CODE (val) == TREE_LIST)) - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val); - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, NULL_TREE); - } - - /* If looking for a type, or if there is no non-type binding, select - the value binding. */ - if (binding->type && (!val || (flags & LOOKUP_PREFER_TYPES))) - val = binding->type; - /* Don't return non-types if we really prefer types. */ - else if (val && LOOKUP_TYPES_ONLY (flags) - && ! DECL_DECLARES_TYPE_P (val)) - val = NULL_TREE; - - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val); -} - /* Unscoped lookup of a global: iterate over current namespaces, considering using-directives. */ @@ -3671,22 +3689,18 @@ unqualified_namespace_lookup (tree name, tree siter; struct cp_binding_level *level; tree val = NULL_TREE; - struct scope_binding binding = EMPTY_SCOPE_BINDING; timevar_push (TV_NAME_LOOKUP); for (; !val; scope = CP_DECL_CONTEXT (scope)) { + struct scope_binding binding = EMPTY_SCOPE_BINDING; cxx_binding *b = cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name); if (b) - { - if (b->value - && ((flags & LOOKUP_HIDDEN) || !hidden_name_p (b->value))) - binding.value = b->value; - binding.type = b->type; - } + /* LLVM LOCAL mainline */ + ambiguous_decl (&binding, b, flags); /* Add all _DECLs seen through local using-directives. */ for (level = current_binding_level; @@ -3711,7 +3725,7 @@ unqualified_namespace_lookup (tree name, siter = CP_DECL_CONTEXT (siter); } - val = select_decl (&binding, flags); + val = binding.value; if (scope == global_namespace) break; } @@ -3741,7 +3755,7 @@ lookup_qualified_name (tree scope, tree if (is_type_p) flags |= LOOKUP_PREFER_TYPES; if (qualified_lookup_using_namespace (name, scope, &binding, flags)) - t = select_decl (&binding, flags); + t = binding.value; } else if (is_aggr_type (scope, complain)) t = lookup_member (scope, name, 2, is_type_p); @@ -3774,7 +3788,8 @@ lookup_using_namespace (tree name, struc cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (used), name); /* Resolve ambiguities. */ if (val1) - ambiguous_decl (name, val, val1, flags); + /* LLVM LOCAL mainline */ + ambiguous_decl (val, val1, flags); } POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val->value != error_mark_node); } @@ -3803,7 +3818,8 @@ qualified_lookup_using_namespace (tree n cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name); seen = tree_cons (scope, NULL_TREE, seen); if (binding) - ambiguous_decl (name, result, binding, flags); + /* LLVM LOCAL mainline */ + ambiguous_decl (result, binding, flags); /* Consider strong using directives always, and non-strong ones if we haven't found a binding yet. ??? Shouldn't we consider Modified: stable/9/contrib/gcc/cp/parser.c ============================================================================== --- stable/9/contrib/gcc/cp/parser.c Mon Jan 20 21:50:31 2014 (r260932) +++ stable/9/contrib/gcc/cp/parser.c Mon Jan 20 21:52:00 2014 (r260933) @@ -10337,13 +10337,19 @@ cp_parser_elaborated_type_specifier (cp_ if (parser->scope) { tree decl; + tree ambiguous_decls; decl = cp_parser_lookup_name (parser, identifier, tag_type, /*is_template=*/false, /*is_namespace=*/false, /*check_dependency=*/true, - /*ambiguous_decls=*/NULL); + &ambiguous_decls); + + /* If the lookup was ambiguous, an error will already have been + issued. */ + if (ambiguous_decls) + return error_mark_node; /* If we are parsing friend declaration, DECL may be a TEMPLATE_DECL tree node here. However, we need to check From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:54:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B11A4D78; Mon, 20 Jan 2014 21:54:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3CE1FA2; Mon, 20 Jan 2014 21:54:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLs63B003938; Mon, 20 Jan 2014 21:54:06 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLs6gg003936; Mon, 20 Jan 2014 21:54:06 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201401202154.s0KLs6gg003936@svn.freebsd.org> From: Andreas Tobler Date: Mon, 20 Jan 2014 21:54:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260934 - head/sys/powerpc/powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:54:06 -0000 Author: andreast Date: Mon Jan 20 21:54:05 2014 New Revision: 260934 URL: http://svnweb.freebsd.org/changeset/base/260934 Log: Fix the resource information for the i2s-a node on certain G5 PowerMacs. This is the first step needed to get the snapper codec working on those machines. The second step is to enable the corresponding I2S device and its clock. Tested on machines where the snapper codec was already working, a G4 PowerBook and a PowerMac9,1 with a Shasta based macio. The PowerMac7,2/7,3 with a K2 based macio can now also play sound. MFC after: 1 month Modified: head/sys/powerpc/powermac/macio.c head/sys/powerpc/powermac/maciovar.h Modified: head/sys/powerpc/powermac/macio.c ============================================================================== --- head/sys/powerpc/powermac/macio.c Mon Jan 20 21:52:00 2014 (r260933) +++ head/sys/powerpc/powermac/macio.c Mon Jan 20 21:54:05 2014 (r260934) @@ -236,13 +236,45 @@ macio_add_intr(phandle_t devnode, struct static void macio_add_reg(phandle_t devnode, struct macio_devinfo *dinfo) { - struct macio_reg *reg; - int i, nreg; + struct macio_reg *reg, *regp; + phandle_t child; + char buf[8]; + int i, layout_id = 0, nreg, res; nreg = OF_getprop_alloc(devnode, "reg", sizeof(*reg), (void **)®); if (nreg == -1) return; + /* + * Some G5's have broken properties in the i2s-a area. If so we try + * to fix it. Right now we know of two different cases, one for + * sound layout-id 36 and the other one for sound layout-id 76. + * What is missing is the base address for the memory addresses. + * We take them from the parent node (i2s) and use the size + * information from the child. + */ + + if (reg[0].mr_base == 0) { + child = OF_child(devnode); + while (child != 0) { + res = OF_getprop(child, "name", buf, sizeof(buf)); + if (res > 0 && strcmp(buf, "sound") == 0) + break; + child = OF_peer(child); + } + + res = OF_getprop(child, "layout-id", &layout_id, + sizeof(layout_id)); + + if (res > 0 && (layout_id == 36 || layout_id == 76)) { + res = OF_getprop_alloc(OF_parent(devnode), "reg", + sizeof(*regp), (void **)®p); + reg[0] = regp[0]; + reg[1].mr_base = regp[1].mr_base; + reg[2].mr_base = regp[1].mr_base + reg[1].mr_size; + } + } + for (i = 0; i < nreg; i++) { resource_list_add(&dinfo->mdi_resources, SYS_RES_MEMORY, i, reg[i].mr_base, reg[i].mr_base + reg[i].mr_size, @@ -284,6 +316,7 @@ macio_attach(device_t dev) phandle_t subchild; device_t cdev; u_int reg[3]; + char compat[32]; int error, quirks; sc = device_get_softc(dev); @@ -297,6 +330,9 @@ macio_attach(device_t dev) return (ENXIO); } + /* Used later to see if we have to enable the I2S part. */ + OF_getprop(root, "compatible", compat, sizeof(compat)); + sc->sc_base = reg[2]; sc->sc_size = MACIO_REG_SIZE; @@ -378,6 +414,21 @@ macio_attach(device_t dev) bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); } + + /* + * Make sure the I2S0 and the I2S0_CLK are enabled. + * On certain G5's they are not. + */ + if ((strcmp(ofw_bus_get_name(cdev), "i2s") == 0) && + (strcmp(compat, "K2-Keylargo") == 0)) { + + uint32_t fcr1; + + fcr1 = bus_read_4(sc->sc_memr, KEYLARGO_FCR1); + fcr1 |= FCR1_I2S0_CLK_ENABLE | FCR1_I2S0_ENABLE; + bus_write_4(sc->sc_memr, KEYLARGO_FCR1, fcr1); + } + } return (bus_generic_attach(dev)); Modified: head/sys/powerpc/powermac/maciovar.h ============================================================================== --- head/sys/powerpc/powermac/maciovar.h Mon Jan 20 21:52:00 2014 (r260933) +++ head/sys/powerpc/powermac/maciovar.h Mon Jan 20 21:54:05 2014 (r260934) @@ -48,6 +48,9 @@ #define FCR_ENET_ENABLE 0x60000000 #define FCR_ENET_RESET 0x80000000 +#define FCR1_I2S0_CLK_ENABLE 0x00001000 +#define FCR1_I2S0_ENABLE 0x00002000 + /* Used only by macio_enable_wireless() for now. */ #define KEYLARGO_GPIO_BASE 0x6a #define KEYLARGO_EXTINT_GPIO_REG_BASE 0x58 From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:58:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4443EE6; Mon, 20 Jan 2014 21:58:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AF7FA1FC1; Mon, 20 Jan 2014 21:58:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLwKBm004716; Mon, 20 Jan 2014 21:58:20 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLwKTc004715; Mon, 20 Jan 2014 21:58:20 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401202158.s0KLwKTc004715@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 20 Jan 2014 21:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260935 - stable/10/contrib/gcc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:58:20 -0000 Author: pfg Date: Mon Jan 20 21:58:20 2014 New Revision: 260935 URL: http://svnweb.freebsd.org/changeset/base/260935 Log: MFC r259531; gcc: point to our address for bug reports. As recommended by the FSF in gcc/version.c : "If you distribute a modified version of GCC, please change this to refer to a document giving instructions for reporting bugs to you, not us." Modified: stable/10/contrib/gcc/version.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/version.c ============================================================================== --- stable/10/contrib/gcc/version.c Mon Jan 20 21:54:05 2014 (r260934) +++ stable/10/contrib/gcc/version.c Mon Jan 20 21:58:20 2014 (r260935) @@ -18,7 +18,7 @@ forward us bugs reported to you, if you determine that they are not bugs in your modifications.) */ -const char bug_report_url[] = ""; +const char bug_report_url[] = ""; /* The complete version string, assembled from several pieces. BASEVER, DATESTAMP, and DEVPHASE are defined by the Makefile. */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 21:58:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4516470; Mon, 20 Jan 2014 21:58:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30E031FC2; Mon, 20 Jan 2014 21:58:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KLwUmM004771; Mon, 20 Jan 2014 21:58:30 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KLwUSl004770; Mon, 20 Jan 2014 21:58:30 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202158.s0KLwUSl004770@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 21:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260936 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:58:30 -0000 Author: gjb Date: Mon Jan 20 21:58:29 2014 New Revision: 260936 URL: http://svnweb.freebsd.org/changeset/base/260936 Log: Document r260913, onifconsole ttys(5) flag. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:58:20 2014 (r260935) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:58:29 2014 (r260936) @@ -172,6 +172,12 @@ Support for displaying VPD for PCI devices via &man.pciconf.8; has been added. + A new flag, onifconsole has + been added to /etc/ttys. This allows the + system to provide a login prompt via serial console if the + device is an active kernel console, otherwise it is equivalent + to off. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 22:08:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17831357; Mon, 20 Jan 2014 22:08:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 034C510A8; Mon, 20 Jan 2014 22:08:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KM8BSa009005; Mon, 20 Jan 2014 22:08:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KM8BRx009004; Mon, 20 Jan 2014 22:08:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202208.s0KM8BRx009004@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 22:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260938 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:08:12 -0000 Author: gjb Date: Mon Jan 20 22:08:11 2014 New Revision: 260938 URL: http://svnweb.freebsd.org/changeset/base/260938 Log: Document r260903. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 22:08:09 2014 (r260937) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 22:08:11 2014 (r260938) @@ -117,6 +117,9 @@ The &man.nand.4; device is enabled for ARM devices by default. + + Support for GPS ports has been added to + &man.uhso.4;. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 22:08:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20F10356; Mon, 20 Jan 2014 22:08:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0D04610A7; Mon, 20 Jan 2014 22:08:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KM89qv008966; Mon, 20 Jan 2014 22:08:09 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KM89ec008965; Mon, 20 Jan 2014 22:08:09 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202208.s0KM89ec008965@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 22:08:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260937 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:08:10 -0000 Author: gjb Date: Mon Jan 20 22:08:09 2014 New Revision: 260937 URL: http://svnweb.freebsd.org/changeset/base/260937 Log: Document r260910. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 21:58:29 2014 (r260936) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 22:08:09 2014 (r260937) @@ -178,6 +178,13 @@ device is an active kernel console, otherwise it is equivalent to off. + Allow &man.pciconf.8; to identify PCI + devices that are attached to a driver to be identified by their + device name instead of just the selector. Additionally, an + optional device argument to the -l flag + to restrict the output to only listing details about a single + device. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 22:18:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0705C7B6; Mon, 20 Jan 2014 22:18:54 +0000 (UTC) Received: from mail-qe0-x229.google.com (mail-qe0-x229.google.com [IPv6:2607:f8b0:400d:c02::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6AB131164; Mon, 20 Jan 2014 22:18:53 +0000 (UTC) Received: by mail-qe0-f41.google.com with SMTP id gc15so3624425qeb.28 for ; Mon, 20 Jan 2014 14:18:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=qQ0+wOFJ8wgWCr7GnFVqzbdzHeQmkFDZjeeMdDutkpE=; b=pNJ9O5eWtUs/2tJqBBNnPDIJu27NWmU3/tPT0ZeJH3yu1BRWvX7potvUqCRDt9lzPh qdq5JNKdtfXzGdLz8/uEZFlgPIHwTwU89FaQeuubE474Zd4Psk+Tozm2KMuIcujqYWAh ICASQH7NbWEzVUcpAGUtDd5phbF00tduASymRfOW2TU4gcRBDWgXVzg/SpkXXOvNUhS+ VA0WZLEr/95Ct8wh3vrzdJbpbN6awtCLklVNiXdItxRUaSEskO/YfKtKySarIlqu/XP9 5xeEtAnkoTBX3mN4uWSvJqaOnNM5ax0O1+1i6UEm1QbmpSkNUQ+KRIGqZ2wOvH/xqLWS dSng== X-Received: by 10.140.33.198 with SMTP id j64mr30094338qgj.14.1390256332572; Mon, 20 Jan 2014 14:18:52 -0800 (PST) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPSA id r7sm1317807qgr.17.2014.01.20.14.18.51 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Mon, 20 Jan 2014 14:18:51 -0800 (PST) Date: Mon, 20 Jan 2014 17:18:44 -0500 From: Alexander Kabaev To: John Baldwin Subject: Re: svn commit: r260898 - head/sys/kern Message-ID: <20140120171844.69e065fb@kan.dyndns.org> In-Reply-To: <1536225.gsjt6oXMt2@pippin.baldwin.cx> References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/4Nq8uq1Kwyltm5a_lSUxb8g"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo , Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:18:54 -0000 --Sig_/4Nq8uq1Kwyltm5a_lSUxb8g Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 20 Jan 2014 11:32:29 -0500 John Baldwin wrote: > On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > > On 19 Jan 2014, at 17:59, Neel Natu wrote: > > > Author: neel > > > Date: Mon Jan 20 01:59:35 2014 > > > New Revision: 260898 > > > URL: http://svnweb.freebsd.org/changeset/base/260898 > > >=20 > > > Log: > > > Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient > > > entries for > > > WITNESS to actually work. > >=20 > > This value should be automatically tuned... >=20 > How do you propose to do so? This is the count of locks initialized > before witness' own SYSINIT is executed and the array it sizes is > allocated statically at compile time. This used to not be a static > array, but an intrusive list embedded in locks themselves, but we > decided to shave a pointer off of each lock that was only used for > that and to use a statically sized table instead. >=20 > --=20 > John Baldwin As + * MAXCPU, as evidently most recent overflows reported were caused by jacking MAXCPU up from its default value?=20 --=20 Alexander Kabaev --Sig_/4Nq8uq1Kwyltm5a_lSUxb8g Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iD8DBQFS3aDKQ6z1jMm+XZYRAp+IAKDIHTjvWXE/8tNIgf40M0GEy3dq7gCg03vv p13tn1pl50ZOMn2FcSunO/E= =7LMU -----END PGP SIGNATURE----- --Sig_/4Nq8uq1Kwyltm5a_lSUxb8g-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 22:25:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 305B2971; Mon, 20 Jan 2014 22:25:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C78C11F7; Mon, 20 Jan 2014 22:25:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KMPo1a016522; Mon, 20 Jan 2014 22:25:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KMPolR016521; Mon, 20 Jan 2014 22:25:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202225.s0KMPolR016521@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 22:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260939 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:25:51 -0000 Author: gjb Date: Mon Jan 20 22:25:50 2014 New Revision: 260939 URL: http://svnweb.freebsd.org/changeset/base/260939 Log: Document r260888. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 22:08:11 2014 (r260938) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 22:25:50 2014 (r260939) @@ -104,7 +104,9 @@ Kernel Changes -   + Add a VT kernel + configuration file, which enables the new vt + console driver. Virtualization support From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 22:32:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36CE9B23; Mon, 20 Jan 2014 22:32:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 225A11287; Mon, 20 Jan 2014 22:32:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KMWOtI019900; Mon, 20 Jan 2014 22:32:24 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KMWNXC019899; Mon, 20 Jan 2014 22:32:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202232.s0KMWNXC019899@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 22:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260940 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:32:24 -0000 Author: gjb Date: Mon Jan 20 22:32:23 2014 New Revision: 260940 URL: http://svnweb.freebsd.org/changeset/base/260940 Log: Add UPDATING entry for 10.0-RELEASE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/UPDATING Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Mon Jan 20 22:25:50 2014 (r260939) +++ stable/10/UPDATING Mon Jan 20 22:32:23 2014 (r260940) @@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140120: + 10.0-RELEASE. + 20131216: The behavior of gss_pseudo_random() for the krb5 mechanism has changed, for applications requesting a longer random string From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 22:54:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30E742D4; Mon, 20 Jan 2014 22:54:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1D5791444; Mon, 20 Jan 2014 22:54:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KMsBJU027917; Mon, 20 Jan 2014 22:54:11 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KMsBAx027916; Mon, 20 Jan 2014 22:54:11 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201401202254.s0KMsBAx027916@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 20 Jan 2014 22:54:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260942 - head/usr.sbin/pkg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:54:12 -0000 Author: bapt Date: Mon Jan 20 22:54:11 2014 New Revision: 260942 URL: http://svnweb.freebsd.org/changeset/base/260942 Log: Implicit include of sys/queue.h instead of relying on gelf.h/libelf.h to bring it Newer version of gelf.h and libelf.h does not include sys/queue.h anymore Submitted by: kaiw MFC after: 3 days Modified: head/usr.sbin/pkg/config.c Modified: head/usr.sbin/pkg/config.c ============================================================================== --- head/usr.sbin/pkg/config.c Mon Jan 20 22:54:06 2014 (r260941) +++ head/usr.sbin/pkg/config.c Mon Jan 20 22:54:11 2014 (r260942) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:08:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABD9885B; Mon, 20 Jan 2014 23:08:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9796E154E; Mon, 20 Jan 2014 23:08:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KN8VDC032743; Mon, 20 Jan 2014 23:08:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KN8VbM032742; Mon, 20 Jan 2014 23:08:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202308.s0KN8VbM032742@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260943 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:08:31 -0000 Author: gjb Date: Mon Jan 20 23:08:31 2014 New Revision: 260943 URL: http://svnweb.freebsd.org/changeset/base/260943 Log: Document r260847. Reword entry for r260888. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 22:54:11 2014 (r260942) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:08:31 2014 (r260943) @@ -104,9 +104,12 @@ Kernel Changes - Add a VT kernel - configuration file, which enables the new vt - console driver. + The VT kernel + configuration file has been added, which enables the new + vt console driver. + + The &man.virtio_random.4; driver has been + added to harvest entropy from the host system. Virtualization support From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:08:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A18685C; Mon, 20 Jan 2014 23:08:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA53E154F; Mon, 20 Jan 2014 23:08:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KN8Xtk032785; Mon, 20 Jan 2014 23:08:33 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KN8XPi032784; Mon, 20 Jan 2014 23:08:33 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202308.s0KN8XPi032784@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260944 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:08:34 -0000 Author: gjb Date: Mon Jan 20 23:08:33 2014 New Revision: 260944 URL: http://svnweb.freebsd.org/changeset/base/260944 Log: Document r260594. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:08:31 2014 (r260943) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:08:33 2014 (r260944) @@ -193,6 +193,11 @@ to restrict the output to only listing details about a single device. + When unable to load a kernel module with + &man.kldload.8;, a message informing to view output of + &man.dmesg.8; is now printed, opposed to the previous output + Exec format error.. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:12:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5B08D44; Mon, 20 Jan 2014 23:12:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FFFF15E4; Mon, 20 Jan 2014 23:12:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNCAmQ036092; Mon, 20 Jan 2014 23:12:10 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNCAe2036091; Mon, 20 Jan 2014 23:12:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202312.s0KNCAe2036091@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260945 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:12:10 -0000 Author: gjb Date: Mon Jan 20 23:12:10 2014 New Revision: 260945 URL: http://svnweb.freebsd.org/changeset/base/260945 Log: Move r260847 to 'kernel-virtualization'. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:08:33 2014 (r260944) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:12:10 2014 (r260945) @@ -108,13 +108,11 @@ configuration file has been added, which enables the new vt console driver. - The &man.virtio_random.4; driver has been - added to harvest entropy from the host system. - Virtualization support -   + The &man.virtio_random.4; driver has + been added to harvest entropy from the host system. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:12:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A82B6D47; Mon, 20 Jan 2014 23:12:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 94B7715E9; Mon, 20 Jan 2014 23:12:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNCC7r036131; Mon, 20 Jan 2014 23:12:12 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNCCl4036130; Mon, 20 Jan 2014 23:12:12 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202312.s0KNCCl4036130@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260946 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:12:12 -0000 Author: gjb Date: Mon Jan 20 23:12:12 2014 New Revision: 260946 URL: http://svnweb.freebsd.org/changeset/base/260946 Log: Document r260583. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:12:10 2014 (r260945) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:12:12 2014 (r260946) @@ -113,6 +113,9 @@ The &man.virtio_random.4; driver has been added to harvest entropy from the host system. + + Unmapped IO support has been added to + &man.virtio_scsi.4;. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:23:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D8C9513; Mon, 20 Jan 2014 23:23:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2971716B9; Mon, 20 Jan 2014 23:23:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNNUSj040352; Mon, 20 Jan 2014 23:23:30 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNNU0g040351; Mon, 20 Jan 2014 23:23:30 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201401202323.s0KNNU0g040351@svn.freebsd.org> From: Warren Block Date: Mon, 20 Jan 2014 23:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260947 - stable/10/bin/df X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:23:30 -0000 Author: wblock (doc committer) Date: Mon Jan 20 23:23:29 2014 New Revision: 260947 URL: http://svnweb.freebsd.org/changeset/base/260947 Log: MFC r260782: -h and -H options backwards in manual page. Modified: stable/10/bin/df/df.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/df/df.1 ============================================================================== --- stable/10/bin/df/df.1 Mon Jan 20 23:12:12 2014 (r260946) +++ stable/10/bin/df/df.1 Mon Jan 20 23:23:29 2014 (r260947) @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd January 24, 2013 +.Dd January 16, 2014 .Dt DF 1 .Os .Sh NAME @@ -83,13 +83,13 @@ Use 1073741824 byte (1 Gibibyte) blocks This overrides any .Ev BLOCKSIZE specification from the environment. -.It Fl H +.It Fl h .Dq Human-readable output. Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and Pebibyte (based on powers of 1024) in order to reduce the number of digits to four or fewer. -.It Fl h +.It Fl H .Dq Human-readable output. Use unit suffixes: Byte, Kilobyte, Megabyte, From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:25:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44A58929; Mon, 20 Jan 2014 23:25:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3056A1706; Mon, 20 Jan 2014 23:25:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNPraH040771; Mon, 20 Jan 2014 23:25:53 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNPrOw040770; Mon, 20 Jan 2014 23:25:53 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201401202325.s0KNPrOw040770@svn.freebsd.org> From: Warren Block Date: Mon, 20 Jan 2014 23:25:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260948 - stable/9/bin/df X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:25:53 -0000 Author: wblock (doc committer) Date: Mon Jan 20 23:25:52 2014 New Revision: 260948 URL: http://svnweb.freebsd.org/changeset/base/260948 Log: MFC r260782: -h and -H options backwards in manual page. Modified: stable/9/bin/df/df.1 Directory Properties: stable/9/bin/df/ (props changed) Modified: stable/9/bin/df/df.1 ============================================================================== --- stable/9/bin/df/df.1 Mon Jan 20 23:23:29 2014 (r260947) +++ stable/9/bin/df/df.1 Mon Jan 20 23:25:52 2014 (r260948) @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd January 24, 2013 +.Dd January 16, 2014 .Dt DF 1 .Os .Sh NAME @@ -83,13 +83,13 @@ Use 1073741824 byte (1 Gibibyte) blocks This overrides any .Ev BLOCKSIZE specification from the environment. -.It Fl H +.It Fl h .Dq Human-readable output. Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and Pebibyte (based on powers of 1024) in order to reduce the number of digits to four or fewer. -.It Fl h +.It Fl H .Dq Human-readable output. Use unit suffixes: Byte, Kilobyte, Megabyte, From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:27:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B576A6E; Mon, 20 Jan 2014 23:27:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D7221715; Mon, 20 Jan 2014 23:27:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNR6gY040976; Mon, 20 Jan 2014 23:27:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNR6SN040974; Mon, 20 Jan 2014 23:27:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401202327.s0KNR6SN040974@svn.freebsd.org> From: Alexander Motin Date: Mon, 20 Jan 2014 23:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260949 - in head/sys/boot: i386/libi386 pc98/libpc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:27:06 -0000 Author: mav Date: Mon Jan 20 23:27:05 2014 New Revision: 260949 URL: http://svnweb.freebsd.org/changeset/base/260949 Log: Make comconsole options set before its activation to be remembered. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/boot/i386/libi386/comconsole.c head/sys/boot/pc98/libpc98/comconsole.c Modified: head/sys/boot/i386/libi386/comconsole.c ============================================================================== --- head/sys/boot/i386/libi386/comconsole.c Mon Jan 20 23:25:52 2014 (r260948) +++ head/sys/boot/i386/libi386/comconsole.c Mon Jan 20 23:27:05 2014 (r260949) @@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int f return (CMD_ERROR); } - if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && - comc_curspeed != speed) + if (comc_curspeed != speed) comc_setup(speed, comc_port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -200,8 +199,7 @@ comc_port_set(struct env_var *ev, int fl return (CMD_ERROR); } - if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && - comc_port != port) + if (comc_port != port) comc_setup(comc_curspeed, port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -309,6 +307,8 @@ comc_setup(int speed, int port) unsetenv("hw.uart.console"); comc_curspeed = speed; comc_port = port; + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0) + return; outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT); outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff); Modified: head/sys/boot/pc98/libpc98/comconsole.c ============================================================================== --- head/sys/boot/pc98/libpc98/comconsole.c Mon Jan 20 23:25:52 2014 (r260948) +++ head/sys/boot/pc98/libpc98/comconsole.c Mon Jan 20 23:27:05 2014 (r260949) @@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int f return (CMD_ERROR); } - if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && - comc_curspeed != speed) + if (comc_curspeed != speed) comc_setup(speed, comc_port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -200,8 +199,7 @@ comc_port_set(struct env_var *ev, int fl return (CMD_ERROR); } - if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && - comc_port != port) + if (comc_port != port) comc_setup(comc_curspeed, port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -309,6 +307,8 @@ comc_setup(int speed, int port) unsetenv("hw.uart.console"); comc_curspeed = speed; comc_port = port; + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0) + return; outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT); outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff); From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:31:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7528DB5; Mon, 20 Jan 2014 23:31:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9413317B1; Mon, 20 Jan 2014 23:31:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNVKII044041; Mon, 20 Jan 2014 23:31:20 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNVKdW044040; Mon, 20 Jan 2014 23:31:20 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202331.s0KNVKdW044040@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260952 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:31:20 -0000 Author: gjb Date: Mon Jan 20 23:31:20 2014 New Revision: 260952 URL: http://svnweb.freebsd.org/changeset/base/260952 Log: Document r260532. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:31:18 2014 (r260951) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:31:20 2014 (r260952) @@ -108,6 +108,16 @@ configuration file has been added, which enables the new vt console driver. + Support for Posted Interrupt + Processing is enabled if supported by the CPU. + This feature can be disabled with: + + &prompt.root; sysctl hw.vmm.vmx.use_apic_pir=0 + + Additionally, to persist this setting across reboots, add + hw.vmm.vmx.use_apic_pir=0 to + /etc/sysctl.conf. + Virtualization support From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:31:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5EDEDB3; Mon, 20 Jan 2014 23:31:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B26AB17AF; Mon, 20 Jan 2014 23:31:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNVGeE043964; Mon, 20 Jan 2014 23:31:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNVGIj043963; Mon, 20 Jan 2014 23:31:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202331.s0KNVGIj043963@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260950 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:31:16 -0000 Author: gjb Date: Mon Jan 20 23:31:16 2014 New Revision: 260950 URL: http://svnweb.freebsd.org/changeset/base/260950 Log: Document r260582. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:27:05 2014 (r260949) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:31:16 2014 (r260950) @@ -116,6 +116,9 @@ Unmapped IO support has been added to &man.virtio_scsi.4;. + + Unmapped IO support has been added to + &man.virtio_blk.4;. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:31:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE26ADB4; Mon, 20 Jan 2014 23:31:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A9DED17B0; Mon, 20 Jan 2014 23:31:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNVI10044005; Mon, 20 Jan 2014 23:31:18 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNVIQX044004; Mon, 20 Jan 2014 23:31:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202331.s0KNVIQX044004@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260951 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:31:18 -0000 Author: gjb Date: Mon Jan 20 23:31:18 2014 New Revision: 260951 URL: http://svnweb.freebsd.org/changeset/base/260951 Log: Document r260552. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:31:16 2014 (r260950) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:31:18 2014 (r260951) @@ -149,7 +149,9 @@ Network Interface Support -   + Firmware for &intel; + Centrino™ Wireless-N 105 devices has been added + to the base system. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:36:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 620263B0; Mon, 20 Jan 2014 23:36:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E7FB1819; Mon, 20 Jan 2014 23:36:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNaHPK044985; Mon, 20 Jan 2014 23:36:17 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNaHH9044984; Mon, 20 Jan 2014 23:36:17 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201401202336.s0KNaHH9044984@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 20 Jan 2014 23:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260953 - head/sys/dev/vt/hw/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:36:17 -0000 Author: ray Date: Mon Jan 20 23:36:16 2014 New Revision: 260953 URL: http://svnweb.freebsd.org/changeset/base/260953 Log: Style(9) fix. No functional changes. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/hw/fb/vt_fb.c Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Mon Jan 20 23:31:20 2014 (r260952) +++ head/sys/dev/vt/hw/fb/vt_fb.c Mon Jan 20 23:36:16 2014 (r260953) @@ -69,8 +69,9 @@ vt_fb_ioctl(struct vt_device *vd, u_long return (info->fb_ioctl(info->fb_cdev, cmd, data, 0, td)); } -static int vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, - vm_paddr_t *paddr, int prot, vm_memattr_t *memattr) +static int +vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr, + int prot, vm_memattr_t *memattr) { struct fb_info *info; From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:50:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A9A3C1B; Mon, 20 Jan 2014 23:50:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3747B18EB; Mon, 20 Jan 2014 23:50:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNoVkd050157; Mon, 20 Jan 2014 23:50:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNoVN6050156; Mon, 20 Jan 2014 23:50:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202350.s0KNoVN6050156@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260954 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:50:31 -0000 Author: gjb Date: Mon Jan 20 23:50:30 2014 New Revision: 260954 URL: http://svnweb.freebsd.org/changeset/base/260954 Log: Document r260448. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:36:16 2014 (r260953) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:50:30 2014 (r260954) @@ -162,6 +162,10 @@ Firmware for &intel; Centrino™ Wireless-N 105 devices has been added to the base system. + + Support for the &intel; + Centrino™ Wireless-N 135 chipset has been + added. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:50:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39454C1C; Mon, 20 Jan 2014 23:50:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 25B9F18EC; Mon, 20 Jan 2014 23:50:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNoXO7050194; Mon, 20 Jan 2014 23:50:33 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNoXhq050193; Mon, 20 Jan 2014 23:50:33 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202350.s0KNoXhq050193@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260955 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:50:33 -0000 Author: gjb Date: Mon Jan 20 23:50:32 2014 New Revision: 260955 URL: http://svnweb.freebsd.org/changeset/base/260955 Log: Move r260532 to kernel-virtualization. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:50:30 2014 (r260954) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:50:32 2014 (r260955) @@ -108,16 +108,6 @@ configuration file has been added, which enables the new vt console driver. - Support for Posted Interrupt - Processing is enabled if supported by the CPU. - This feature can be disabled with: - - &prompt.root; sysctl hw.vmm.vmx.use_apic_pir=0 - - Additionally, to persist this setting across reboots, add - hw.vmm.vmx.use_apic_pir=0 to - /etc/sysctl.conf. - Virtualization support @@ -129,6 +119,16 @@ Unmapped IO support has been added to &man.virtio_blk.4;. + + Support for Posted Interrupt + Processing is enabled if supported by the CPU. + This feature can be disabled with: + + &prompt.root; sysctl hw.vmm.vmx.use_apic_pir=0 + + Additionally, to persist this setting across reboots, add + hw.vmm.vmx.use_apic_pir=0 to + /etc/sysctl.conf. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:50:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27208C1D; Mon, 20 Jan 2014 23:50:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 136FB18ED; Mon, 20 Jan 2014 23:50:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNoYkN050229; Mon, 20 Jan 2014 23:50:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNoYUv050228; Mon, 20 Jan 2014 23:50:34 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202350.s0KNoYUv050228@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260956 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:50:35 -0000 Author: gjb Date: Mon Jan 20 23:50:34 2014 New Revision: 260956 URL: http://svnweb.freebsd.org/changeset/base/260956 Log: Document r260410. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:50:32 2014 (r260955) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:50:34 2014 (r260956) @@ -129,6 +129,17 @@ Additionally, to persist this setting across reboots, add hw.vmm.vmx.use_apic_pir=0 to /etc/sysctl.conf. + + Support for the Virtual Interrupt + Delivery feature of &intel; VT-x is enabled if + supported by the CPU. This feature can be disabled + with: + + &prompt.root; sysctl hw.vmm.vmx.use_apic_vid=0 + + Additionally, to persist this setting across reboots, add + hw.vmm.vmx.use_apic_vid=0 to + /etc/sysctl.conf. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:52:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F591FF6; Mon, 20 Jan 2014 23:52:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7C0321965; Mon, 20 Jan 2014 23:52:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNqTwU052502; Mon, 20 Jan 2014 23:52:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNqTkZ052501; Mon, 20 Jan 2014 23:52:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202352.s0KNqTkZ052501@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260957 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:52:29 -0000 Author: gjb Date: Mon Jan 20 23:52:28 2014 New Revision: 260957 URL: http://svnweb.freebsd.org/changeset/base/260957 Log: Move r260903, misplaced. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:50:34 2014 (r260956) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:52:28 2014 (r260957) @@ -104,6 +104,9 @@ Kernel Changes + Support for GPS ports has been added to + &man.uhso.4;. + The VT kernel configuration file has been added, which enables the new vt console driver. @@ -147,9 +150,6 @@ The &man.nand.4; device is enabled for ARM devices by default. - - Support for GPS ports has been added to - &man.uhso.4;. From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:56:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B35B1338; Mon, 20 Jan 2014 23:56:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E9BD1986; Mon, 20 Jan 2014 23:56:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNun2Q053213; Mon, 20 Jan 2014 23:56:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNunlP053212; Mon, 20 Jan 2014 23:56:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401202356.s0KNunlP053212@svn.freebsd.org> From: Alexander Motin Date: Mon, 20 Jan 2014 23:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260958 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:56:49 -0000 Author: mav Date: Mon Jan 20 23:56:49 2014 New Revision: 260958 URL: http://svnweb.freebsd.org/changeset/base/260958 Log: MFC r260407: Allow delete_method sysctl to be set to "DISABLE". Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Mon Jan 20 23:52:28 2014 (r260957) +++ stable/10/sys/cam/scsi/scsi_da.c Mon Jan 20 23:56:49 2014 (r260958) @@ -1959,7 +1959,7 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS char buf[16]; const char *p; struct da_softc *softc; - int i, error, value; + int i, error, methods, value; softc = (struct da_softc *)arg1; @@ -1972,8 +1972,9 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS error = sysctl_handle_string(oidp, buf, sizeof(buf), req); if (error != 0 || req->newptr == NULL) return (error); + methods = softc->delete_available | (1 << DA_DELETE_DISABLE); for (i = 0; i <= DA_DELETE_MAX; i++) { - if (!(softc->delete_available & (1 << i)) || + if (!(methods & (1 << i)) || strcmp(buf, da_delete_method_names[i]) != 0) continue; dadeletemethodset(softc, i); From owner-svn-src-all@FreeBSD.ORG Mon Jan 20 23:59:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B50D8586; Mon, 20 Jan 2014 23:59:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A151E19AB; Mon, 20 Jan 2014 23:59:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KNxWfn053600; Mon, 20 Jan 2014 23:59:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KNxWOa053599; Mon, 20 Jan 2014 23:59:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401202359.s0KNxWOa053599@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Jan 2014 23:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260959 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:59:32 -0000 Author: gjb Date: Mon Jan 20 23:59:32 2014 New Revision: 260959 URL: http://svnweb.freebsd.org/changeset/base/260959 Log: Reformat to fix a nit in the rendered output. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:56:49 2014 (r260958) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 23:59:32 2014 (r260959) @@ -124,23 +124,18 @@ &man.virtio_blk.4;. Support for Posted Interrupt - Processing is enabled if supported by the CPU. - This feature can be disabled with: - - &prompt.root; sysctl hw.vmm.vmx.use_apic_pir=0 - - Additionally, to persist this setting across reboots, add + Processing is enabled if supported by the CPU. This + feature can be disabled by running sysctl + hw.vmm.vmx.use_apic_pir=0. Additionally, to + persist this setting across reboots, add hw.vmm.vmx.use_apic_pir=0 to /etc/sysctl.conf. Support for the Virtual Interrupt Delivery feature of &intel; VT-x is enabled if - supported by the CPU. This feature can be disabled - with: - - &prompt.root; sysctl hw.vmm.vmx.use_apic_vid=0 - - Additionally, to persist this setting across reboots, add + supported by the CPU. This feature can be disabled by running + sysctl hw.vmm.vmx.use_apic_vid=0. + Additionally, to persist this setting across reboots, add hw.vmm.vmx.use_apic_vid=0 to /etc/sysctl.conf. From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 00:14:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01C1AD7C; Tue, 21 Jan 2014 00:14:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E1A701AE6; Tue, 21 Jan 2014 00:14:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L0E6e6062830; Tue, 21 Jan 2014 00:14:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L0E6IS062829; Tue, 21 Jan 2014 00:14:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401210014.s0L0E6IS062829@svn.freebsd.org> From: Alexander Motin Date: Tue, 21 Jan 2014 00:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260960 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:14:07 -0000 Author: mav Date: Tue Jan 21 00:14:06 2014 New Revision: 260960 URL: http://svnweb.freebsd.org/changeset/base/260960 Log: MFC r254970 (by ken): If a drive returns ASC/ASCQ 0x04,0x11 "Logical unit not ready, notify (enable spinup) required", instead of doing the normal retries, poll for a change in status. We will poll every half second for a minute for the status to change. Hitachi drives (and likely other SAS drives) return that ASC/ASCQ when they are waiting to spin up. What it means is that they are waiting for the SAS expander to send them the SAS NOTIFY (ENABLE SPINUP) primitive. That primitive is the mechanism expanders/enclosures use to sequence drive spinup to avoid overloading power supplies. Modified: stable/9/sys/cam/scsi/scsi_all.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_all.c Mon Jan 20 23:59:32 2014 (r260959) +++ stable/9/sys/cam/scsi/scsi_all.c Tue Jan 21 00:14:06 2014 (r260960) @@ -1118,7 +1118,7 @@ static struct asc_table_entry asc_table[ { SST(0x04, 0x10, SS_RDEF, /* XXX TBD */ "Logical unit not ready, auxiliary memory not accessible") }, /* DT WRO AEB VF */ - { SST(0x04, 0x11, SS_RDEF, /* XXX TBD */ + { SST(0x04, 0x11, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EBUSY, "Logical unit not ready, notify (enable spinup) required") }, /* M V */ { SST(0x04, 0x12, SS_RDEF, /* XXX TBD */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 00:16:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35F0D117; Tue, 21 Jan 2014 00:16:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2018E1B09; Tue, 21 Jan 2014 00:16:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L0GghH063313; Tue, 21 Jan 2014 00:16:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L0Gfww063309; Tue, 21 Jan 2014 00:16:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401210016.s0L0Gfww063309@svn.freebsd.org> From: Alexander Motin Date: Tue, 21 Jan 2014 00:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260961 - in stable/9: sbin/camcontrol sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:16:42 -0000 Author: mav Date: Tue Jan 21 00:16:41 2014 New Revision: 260961 URL: http://svnweb.freebsd.org/changeset/base/260961 Log: MFC r255307 (by bryanv): Add camcontrol support for the SCSI sanitize command Modified: stable/9/sbin/camcontrol/camcontrol.8 stable/9/sbin/camcontrol/camcontrol.c stable/9/sys/cam/scsi/scsi_da.c stable/9/sys/cam/scsi/scsi_da.h Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/camcontrol/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.8 Tue Jan 21 00:14:06 2014 (r260960) +++ stable/9/sbin/camcontrol/camcontrol.8 Tue Jan 21 00:16:41 2014 (r260961) @@ -207,6 +207,19 @@ .Op Fl w .Op Fl y .Nm +.Ic sanitize +.Op device id +.Op generic args +.Aq Fl a Ar overwrite | block | crypto | exitfailure +.Op Fl c Ar passes +.Op Fl I +.Op Fl P Ar pattern +.Op Fl q +.Op Fl U +.Op Fl r +.Op Fl w +.Op Fl y +.Nm .Ic idle .Op device id .Op generic args @@ -1088,6 +1101,116 @@ The user will not be asked about the timeout if a timeout is specified on the command line. .El +.It Ic sanitize +Issue the +.Tn SCSI +SANITIZE command to the named device. +.Pp +.Em WARNING! WARNING! WARNING! +.Pp +ALL data in the cache and on the disk will be destroyed or made inaccessible. +Recovery of the data is not possible. +Use extreme caution when issuing this command. +.Pp +The +.Sq sanitize +subcommand takes several arguments that modify its default behavior. +The +.Fl q +and +.Fl y +arguments can be useful for scripts. +.Bl -tag -width 6n +.It Fl a Ar operation +Specify the sanitize operation to perform. +.Bl -tag -width 16n +.It overwrite +Perform an overwrite operation by writing a user supplied +data pattern to the device one or more times. +The pattern is given by the +.Fl P +argument. +The number of times is given by the +.Fl c +argument. +.It block +Perform a block erase operation. +All the device's blocks are set to a vendor defined +value, typically zero. +.It crypto +Perform a cryptographic erase operation. +The encryption keys are changed to prevent the decryption +of the data. +.It exitfailure +Exits a previously failed sanitize operation. +A failed sanitize operation can only be exited if it was +run in the unrestricted completion mode, as provided by the +.Fl U +argument. +.El +.It Fl c Ar passes +The number of passes when performing an +.Sq overwrite +operation. +Valid values are between 1 and 31. The default is 1. +.It Fl I +When performing an +.Sq overwrite +operation, the pattern is inverted between consecutive passes. +.It Fl P Ar pattern +Path to the file containing the pattern to use when +performing an +.Sq overwrite +operation. +The pattern is repeated as needed to fill each block. +.It Fl q +Be quiet, do not print any status messages. +This option will not disable +the questions, however. +To disable questions, use the +.Fl y +argument, below. +.It Fl U +Perform the sanitize in the unrestricted completion mode. +If the operation fails, it can later be exited with the +.Sq exitfailure +operation. +.It Fl r +Run in +.Dq report only +mode. +This will report status on a sanitize that is already running on the drive. +.It Fl w +Issue a non-immediate sanitize command. +By default, +.Nm +issues the SANITIZE command with the immediate bit set. +This tells the +device to immediately return the sanitize command, before +the sanitize has actually completed. +Then, +.Nm +gathers +.Tn SCSI +sense information from the device every second to determine how far along +in the sanitize process it is. +If the +.Fl w +argument is specified, +.Nm +will issue a non-immediate sanitize command, and will be unable to print any +information to let the user know what percentage of the disk has been +sanitized. +.It Fl y +Do not ask any questions. +By default, +.Nm +will ask the user if he/she really wants to sanitize the disk in question, +and also if the default sanitize command timeout is acceptable. +The user +will not be asked about the timeout if a timeout is specified on the +command line. +.El .It Ic idle Put ATA device into IDLE state. Optional parameter .Pq Fl t Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Tue Jan 21 00:14:06 2014 (r260960) +++ stable/9/sbin/camcontrol/camcontrol.c Tue Jan 21 00:16:41 2014 (r260961) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -93,7 +94,8 @@ typedef enum { CAM_CMD_SMP_MANINFO = 0x0000001b, CAM_CMD_DOWNLOAD_FW = 0x0000001c, CAM_CMD_SECURITY = 0x0000001d, - CAM_CMD_HPA = 0x0000001e + CAM_CMD_HPA = 0x0000001e, + CAM_CMD_SANITIZE = 0x0000001f, } cam_cmdmask; typedef enum { @@ -209,6 +211,7 @@ static struct camcontrol_opts option_tab {"rate", CAM_CMD_RATE, CAM_ARG_NONE, negotiate_opts}, {"debug", CAM_CMD_DEBUG, CAM_ARG_NONE, "IPTSXcp"}, {"format", CAM_CMD_FORMAT, CAM_ARG_NONE, "qrwy"}, + {"sanitize", CAM_CMD_SANITIZE, CAM_ARG_NONE, "a:c:IP:qrUwy"}, {"idle", CAM_CMD_IDLE, CAM_ARG_NONE, "t:"}, {"standby", CAM_CMD_STANDBY, CAM_ARG_NONE, "t:"}, {"sleep", CAM_CMD_SLEEP, CAM_ARG_NONE, ""}, @@ -301,6 +304,8 @@ static int ratecontrol(struct cam_device int timeout, int argc, char **argv, char *combinedopt); static int scsiformat(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); +static int scsisanitize(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout); static int scsireportluns(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); static int scsireadcapacity(struct cam_device *device, int argc, char **argv, @@ -5537,6 +5542,402 @@ scsiformat_bailout: } static int +scsisanitize(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout) +{ + union ccb *ccb; + u_int8_t action = 0; + int c; + int ycount = 0, quiet = 0; + int error = 0, retval = 0; + int use_timeout = 10800 * 1000; + int immediate = 1; + int invert = 0; + int passes = 0; + int ause = 0; + int fd = -1; + const char *pattern = NULL; + u_int8_t *data_ptr = NULL; + u_int32_t dxfer_len = 0; + u_int8_t byte2 = 0; + int num_warnings = 0; + int reportonly = 0; + + ccb = cam_getccb(device); + + if (ccb == NULL) { + warnx("scsisanitize: error allocating ccb"); + return(1); + } + + bzero(&(&ccb->ccb_h)[1], + sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch(c) { + case 'a': + if (strcasecmp(optarg, "overwrite") == 0) + action = SSZ_SERVICE_ACTION_OVERWRITE; + else if (strcasecmp(optarg, "block") == 0) + action = SSZ_SERVICE_ACTION_BLOCK_ERASE; + else if (strcasecmp(optarg, "crypto") == 0) + action = SSZ_SERVICE_ACTION_CRYPTO_ERASE; + else if (strcasecmp(optarg, "exitfailure") == 0) + action = SSZ_SERVICE_ACTION_EXIT_MODE_FAILURE; + else { + warnx("invalid service operation \"%s\"", + optarg); + error = 1; + goto scsisanitize_bailout; + } + break; + case 'c': + passes = strtol(optarg, NULL, 0); + if (passes < 1 || passes > 31) { + warnx("invalid passes value %d", passes); + error = 1; + goto scsisanitize_bailout; + } + break; + case 'I': + invert = 1; + break; + case 'P': + pattern = optarg; + break; + case 'q': + quiet++; + break; + case 'U': + ause = 1; + break; + case 'r': + reportonly = 1; + break; + case 'w': + immediate = 0; + break; + case 'y': + ycount++; + break; + } + } + + if (reportonly) + goto doreport; + + if (action == 0) { + warnx("an action is required"); + error = 1; + goto scsisanitize_bailout; + } else if (action == SSZ_SERVICE_ACTION_OVERWRITE) { + struct scsi_sanitize_parameter_list *pl; + struct stat sb; + ssize_t sz, amt; + + if (pattern == NULL) { + warnx("overwrite action requires -P argument"); + error = 1; + goto scsisanitize_bailout; + } + fd = open(pattern, O_RDONLY); + if (fd < 0) { + warn("cannot open pattern file %s", pattern); + error = 1; + goto scsisanitize_bailout; + } + if (fstat(fd, &sb) < 0) { + warn("cannot stat pattern file %s", pattern); + error = 1; + goto scsisanitize_bailout; + } + sz = sb.st_size; + if (sz > SSZPL_MAX_PATTERN_LENGTH) { + warnx("pattern file size exceeds maximum value %d", + SSZPL_MAX_PATTERN_LENGTH); + error = 1; + goto scsisanitize_bailout; + } + dxfer_len = sizeof(*pl) + sz; + data_ptr = calloc(1, dxfer_len); + if (data_ptr == NULL) { + warnx("cannot allocate parameter list buffer"); + error = 1; + goto scsisanitize_bailout; + } + + amt = read(fd, data_ptr + sizeof(*pl), sz); + if (amt < 0) { + warn("cannot read pattern file"); + error = 1; + goto scsisanitize_bailout; + } else if (amt != sz) { + warnx("short pattern file read"); + error = 1; + goto scsisanitize_bailout; + } + + pl = (struct scsi_sanitize_parameter_list *)data_ptr; + if (passes == 0) + pl->byte1 = 1; + else + pl->byte1 = passes; + if (invert != 0) + pl->byte1 |= SSZPL_INVERT; + scsi_ulto2b(sz, pl->length); + } else { + const char *arg; + + if (passes != 0) + arg = "-c"; + else if (invert != 0) + arg = "-I"; + else if (pattern != NULL) + arg = "-P"; + else + arg = NULL; + if (arg != NULL) { + warnx("%s argument only valid with overwrite " + "operation", arg); + error = 1; + goto scsisanitize_bailout; + } + } + + if (quiet == 0) { + fprintf(stdout, "You are about to REMOVE ALL DATA from the " + "following device:\n"); + + error = scsidoinquiry(device, argc, argv, combinedopt, + retry_count, timeout); + + if (error != 0) { + warnx("scsisanitize: error sending inquiry"); + goto scsisanitize_bailout; + } + } + + if (ycount == 0) { + if (!get_confirmation()) { + error = 1; + goto scsisanitize_bailout; + } + } + + if (timeout != 0) + use_timeout = timeout; + + if (quiet == 0) { + fprintf(stdout, "Current sanitize timeout is %d seconds\n", + use_timeout / 1000); + } + + /* + * If the user hasn't disabled questions and didn't specify a + * timeout on the command line, ask them if they want the current + * timeout. + */ + if ((ycount == 0) + && (timeout == 0)) { + char str[1024]; + int new_timeout = 0; + + fprintf(stdout, "Enter new timeout in seconds or press\n" + "return to keep the current timeout [%d] ", + use_timeout / 1000); + + if (fgets(str, sizeof(str), stdin) != NULL) { + if (str[0] != '\0') + new_timeout = atoi(str); + } + + if (new_timeout != 0) { + use_timeout = new_timeout * 1000; + fprintf(stdout, "Using new timeout value %d\n", + use_timeout / 1000); + } + } + + byte2 = action; + if (ause != 0) + byte2 |= SSZ_UNRESTRICTED_EXIT; + if (immediate != 0) + byte2 |= SSZ_IMMED; + + scsi_sanitize(&ccb->csio, + /* retries */ retry_count, + /* cbfcnp */ NULL, + /* tag_action */ MSG_SIMPLE_Q_TAG, + /* byte2 */ byte2, + /* control */ 0, + /* data_ptr */ data_ptr, + /* dxfer_len */ dxfer_len, + /* sense_len */ SSD_FULL_SIZE, + /* timeout */ use_timeout); + + /* Disable freezing the device queue */ + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + if (arglist & CAM_ARG_ERR_RECOVER) + ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; + + if (((retval = cam_send_ccb(device, ccb)) < 0) + || ((immediate == 0) + && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP))) { + const char errstr[] = "error sending sanitize command"; + + if (retval < 0) + warn(errstr); + else + warnx(errstr); + + if (arglist & CAM_ARG_VERBOSE) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + error = 1; + goto scsisanitize_bailout; + } + + /* + * If we ran in non-immediate mode, we already checked for errors + * above and printed out any necessary information. If we're in + * immediate mode, we need to loop through and get status + * information periodically. + */ + if (immediate == 0) { + if (quiet == 0) { + fprintf(stdout, "Sanitize Complete\n"); + } + goto scsisanitize_bailout; + } + +doreport: + do { + cam_status status; + + bzero(&(&ccb->ccb_h)[1], + sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + + /* + * There's really no need to do error recovery or + * retries here, since we're just going to sit in a + * loop and wait for the device to finish sanitizing. + */ + scsi_test_unit_ready(&ccb->csio, + /* retries */ 0, + /* cbfcnp */ NULL, + /* tag_action */ MSG_SIMPLE_Q_TAG, + /* sense_len */ SSD_FULL_SIZE, + /* timeout */ 5000); + + /* Disable freezing the device queue */ + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + retval = cam_send_ccb(device, ccb); + + /* + * If we get an error from the ioctl, bail out. SCSI + * errors are expected. + */ + if (retval < 0) { + warn("error sending CAMIOCOMMAND ioctl"); + if (arglist & CAM_ARG_VERBOSE) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + error = 1; + goto scsisanitize_bailout; + } + + status = ccb->ccb_h.status & CAM_STATUS_MASK; + + if ((status != CAM_REQ_CMP) + && (status == CAM_SCSI_STATUS_ERROR) + && ((ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0)) { + struct scsi_sense_data *sense; + int error_code, sense_key, asc, ascq; + + sense = &ccb->csio.sense_data; + scsi_extract_sense_len(sense, ccb->csio.sense_len - + ccb->csio.sense_resid, &error_code, &sense_key, + &asc, &ascq, /*show_errors*/ 1); + + /* + * According to the SCSI-3 spec, a drive that is in the + * middle of a sanitize should return NOT READY with an + * ASC of "logical unit not ready, sanitize in + * progress". The sense key specific bytes will then + * be a progress indicator. + */ + if ((sense_key == SSD_KEY_NOT_READY) + && (asc == 0x04) && (ascq == 0x1b)) { + uint8_t sks[3]; + + if ((scsi_get_sks(sense, ccb->csio.sense_len - + ccb->csio.sense_resid, sks) == 0) + && (quiet == 0)) { + int val; + u_int64_t percentage; + + val = scsi_2btoul(&sks[1]); + percentage = 10000 * val; + + fprintf(stdout, + "\rSanitizing: %ju.%02u %% " + "(%d/%d) done", + (uintmax_t)(percentage / + (0x10000 * 100)), + (unsigned)((percentage / + 0x10000) % 100), + val, 0x10000); + fflush(stdout); + } else if ((quiet == 0) + && (++num_warnings <= 1)) { + warnx("Unexpected SCSI Sense Key " + "Specific value returned " + "during sanitize:"); + scsi_sense_print(device, &ccb->csio, + stderr); + warnx("Unable to print status " + "information, but sanitze will " + "proceed."); + warnx("will exit when sanitize is " + "complete"); + } + sleep(1); + } else { + warnx("Unexpected SCSI error during sanitize"); + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + error = 1; + goto scsisanitize_bailout; + } + + } else if (status != CAM_REQ_CMP) { + warnx("Unexpected CAM status %#x", status); + if (arglist & CAM_ARG_VERBOSE) + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + error = 1; + goto scsisanitize_bailout; + } + } while((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP); + + if (quiet == 0) + fprintf(stdout, "\nSanitize Complete\n"); + +scsisanitize_bailout: + if (fd >= 0) + close(fd); + if (data_ptr != NULL) + free(data_ptr); + cam_freeccb(ccb); + + return(error); +} + +static int scsireportluns(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout) { @@ -7360,6 +7761,10 @@ usage(int printlong) " [-q][-R syncrate][-v][-T ]\n" " [-U][-W bus_width]\n" " camcontrol format [dev_id][generic args][-q][-r][-w][-y]\n" +" camcontrol sanitize [dev_id][generic args]\n" +" [-a overwrite|block|crypto|exitfailure]\n" +" [-c passes][-I][-P pattern][-q][-U][-r][-w]\n" +" [-y]\n" " camcontrol idle [dev_id][generic args][-t time]\n" " camcontrol standby [dev_id][generic args][-t time]\n" " camcontrol sleep [dev_id][generic args]\n" @@ -7402,6 +7807,7 @@ usage(int printlong) "tags report or set the number of transaction slots for a device\n" "negotiate report or set device negotiation parameters\n" "format send the SCSI FORMAT UNIT command to the named device\n" +"sanitize send the SCSI SANITIZE command to the named device\n" "idle send the ATA IDLE command to the named device\n" "standby send the ATA STANDBY command to the named device\n" "sleep send the ATA SLEEP command to the named device\n" @@ -7497,6 +7903,16 @@ usage(int printlong) "-r run in report only mode\n" "-w don't send immediate format command\n" "-y don't ask any questions\n" +"sanitize arguments:\n" +"-a operation operation mode: overwrite, block, crypto or exitfailure\n" +"-c passes overwrite passes to perform (1 to 31)\n" +"-I invert overwrite pattern after each pass\n" +"-P pattern path to overwrite pattern file\n" +"-q be quiet, don't print status messages\n" +"-r run in report only mode\n" +"-U run operation in unrestricted completion exit mode\n" +"-w don't send immediate sanitize command\n" +"-y don't ask any questions\n" "idle/standby arguments:\n" "-t number of seconds before respective state.\n" "fwdownload arguments:\n" @@ -7859,6 +8275,10 @@ main(int argc, char **argv) arglist & CAM_ARG_VERBOSE, retry_count, timeout, get_disk_type(cam_dev)); break; + case CAM_CMD_SANITIZE: + error = scsisanitize(cam_dev, argc, argv, + combinedopt, retry_count, timeout); + break; #endif /* MINIMALISTIC */ case CAM_CMD_USAGE: usage(1); Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Jan 21 00:14:06 2014 (r260960) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Jan 21 00:16:41 2014 (r260961) @@ -3841,4 +3841,31 @@ scsi_format_unit(struct ccb_scsiio *csio timeout); } +void +scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int8_t tag_action, u_int8_t byte2, u_int16_t control, + u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, + u_int32_t timeout) +{ + struct scsi_sanitize *scsi_cmd; + + scsi_cmd = (struct scsi_sanitize *)&csio->cdb_io.cdb_bytes; + scsi_cmd->opcode = SANITIZE; + scsi_cmd->byte2 = byte2; + scsi_cmd->control = control; + scsi_ulto2b(dxfer_len, scsi_cmd->length); + + cam_fill_csio(csio, + retries, + cbfcnp, + /*flags*/ (dxfer_len > 0) ? CAM_DIR_OUT : CAM_DIR_NONE, + tag_action, + data_ptr, + dxfer_len, + sense_len, + sizeof(*scsi_cmd), + timeout); +} + #endif /* _KERNEL */ Modified: stable/9/sys/cam/scsi/scsi_da.h ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.h Tue Jan 21 00:14:06 2014 (r260960) +++ stable/9/sys/cam/scsi/scsi_da.h Tue Jan 21 00:16:41 2014 (r260961) @@ -116,6 +116,31 @@ struct scsi_read_defect_data_10 u_int8_t control; }; +struct scsi_sanitize +{ + u_int8_t opcode; + u_int8_t byte2; +#define SSZ_SERVICE_ACTION_OVERWRITE 0x01 +#define SSZ_SERVICE_ACTION_BLOCK_ERASE 0x02 +#define SSZ_SERVICE_ACTION_CRYPTO_ERASE 0x03 +#define SSZ_SERVICE_ACTION_EXIT_MODE_FAILURE 0x1F +#define SSZ_UNRESTRICTED_EXIT 0x20 +#define SSZ_IMMED 0x80 + u_int8_t reserved[5]; + u_int8_t length[2]; + u_int8_t control; +}; + +struct scsi_sanitize_parameter_list +{ + u_int8_t byte1; +#define SSZPL_INVERT 0x80 + u_int8_t reserved; + u_int8_t length[2]; + /* Variable length initialization pattern. */ +#define SSZPL_MAX_PATTERN_LENGTH 65535 +}; + struct scsi_read_defect_data_12 { u_int8_t opcode; @@ -156,6 +181,7 @@ struct scsi_read_defect_data_12 #define WRITE_AND_VERIFY 0x2e #define VERIFY 0x2f #define READ_DEFECT_DATA_10 0x37 +#define SANITIZE 0x48 #define READ_DEFECT_DATA_12 0xb7 struct format_defect_list_header @@ -508,6 +534,12 @@ void scsi_format_unit(struct ccb_scsiio u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, u_int32_t timeout); +void scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int8_t tag_action, u_int8_t byte2, u_int16_t control, + u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, + u_int32_t timeout); + #endif /* !_KERNEL */ __END_DECLS From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 00:22:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62BD343F; Tue, 21 Jan 2014 00:22:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 34D5B1CA2; Tue, 21 Jan 2014 00:22:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L0M9iH066828; Tue, 21 Jan 2014 00:22:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L0M9aI066826; Tue, 21 Jan 2014 00:22:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401210022.s0L0M9aI066826@svn.freebsd.org> From: Alexander Motin Date: Tue, 21 Jan 2014 00:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260962 - stable/9/sys/cam/ata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:22:09 -0000 Author: mav Date: Tue Jan 21 00:22:08 2014 New Revision: 260962 URL: http://svnweb.freebsd.org/changeset/base/260962 Log: MFC r256836: Remove hard limit on number of BIOs handled with one ATA TRIM request. Modified: stable/9/sys/cam/ata/ata_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Tue Jan 21 00:16:41 2014 (r260961) +++ stable/9/sys/cam/ata/ata_da.c Tue Jan 21 00:22:08 2014 (r260962) @@ -124,10 +124,9 @@ struct disk_params { #define TRIM_MAX_BLOCKS 8 #define TRIM_MAX_RANGES (TRIM_MAX_BLOCKS * ATA_DSM_BLK_RANGES) -#define TRIM_MAX_BIOS (TRIM_MAX_RANGES * 4) struct trim_request { uint8_t data[TRIM_MAX_RANGES * ATA_DSM_RANGE_SIZE]; - struct bio *bps[TRIM_MAX_BIOS]; + TAILQ_HEAD(, bio) bps; }; struct ada_softc { @@ -1424,10 +1423,11 @@ adastart(struct cam_periph *periph, unio struct trim_request *req = &softc->trim_req; struct bio *bp1; uint64_t lastlba = (uint64_t)-1; - int bps = 0, c, lastcount = 0, off, ranges = 0; + int c, lastcount = 0, off, ranges = 0; softc->trim_running = 1; bzero(req, sizeof(*req)); + TAILQ_INIT(&req->bps); bp1 = bp; do { uint64_t lba = bp1->bio_pblkno; @@ -1470,10 +1470,9 @@ adastart(struct cam_periph *periph, unio */ } lastlba = lba; - req->bps[bps++] = bp1; + TAILQ_INSERT_TAIL(&req->bps, bp1, bio_queue); bp1 = bioq_first(&softc->trim_queue); - if (bps >= TRIM_MAX_BIOS || - bp1 == NULL || + if (bp1 == NULL || bp1->bio_bcount / softc->params.secsize > (softc->trim_max_ranges - ranges) * ATA_DSM_RANGE_MAX) @@ -1762,23 +1761,22 @@ adadone(struct cam_periph *periph, union if (softc->outstanding_cmds == 0) softc->flags |= ADA_FLAG_WENT_IDLE; if (state == ADA_CCB_TRIM) { - struct trim_request *req = - (struct trim_request *)ataio->data_ptr; - int i; - - for (i = 1; i < TRIM_MAX_BIOS && req->bps[i]; i++) { - struct bio *bp1 = req->bps[i]; + TAILQ_HEAD(, bio) queue; + struct bio *bp1; - bp1->bio_error = bp->bio_error; - if (bp->bio_flags & BIO_ERROR) { + TAILQ_INIT(&queue); + TAILQ_CONCAT(&queue, &softc->trim_req.bps, bio_queue); + softc->trim_running = 0; + while ((bp1 = TAILQ_FIRST(&queue)) != NULL) { + TAILQ_REMOVE(&queue, bp1, bio_queue); + bp1->bio_error = error; + if (error != 0) { bp1->bio_flags |= BIO_ERROR; bp1->bio_resid = bp1->bio_bcount; } else bp1->bio_resid = 0; biodone(bp1); } - softc->trim_running = 0; - biodone(bp); adaschedule(periph); } else biodone(bp); From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 00:25:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C6E5758; Tue, 21 Jan 2014 00:25:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 386B61CCA; Tue, 21 Jan 2014 00:25:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L0Pp9b067587; Tue, 21 Jan 2014 00:25:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L0PpCE067586; Tue, 21 Jan 2014 00:25:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401210025.s0L0PpCE067586@svn.freebsd.org> From: Alexander Motin Date: Tue, 21 Jan 2014 00:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260963 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:25:51 -0000 Author: mav Date: Tue Jan 21 00:25:50 2014 New Revision: 260963 URL: http://svnweb.freebsd.org/changeset/base/260963 Log: MFC r256895: Fix memory and references leak due to unfreed path. Modified: stable/9/sys/cam/cam_periph.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Tue Jan 21 00:22:08 2014 (r260962) +++ stable/9/sys/cam/cam_periph.c Tue Jan 21 00:25:50 2014 (r260963) @@ -1786,9 +1786,11 @@ cam_periph_error(union ccb *ccb, cam_fla scan_ccb->ccb_h.func_code = XPT_SCAN_TGT; scan_ccb->crcn.flags = 0; xpt_rescan(scan_ccb); - } else + } else { xpt_print(newpath, "Can't allocate CCB to rescan target\n"); + xpt_free_path(newpath); + } } } From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 00:27:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3859089F; Tue, 21 Jan 2014 00:27:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2457C1CD8; Tue, 21 Jan 2014 00:27:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L0RoFN068025; Tue, 21 Jan 2014 00:27:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L0RoLM068024; Tue, 21 Jan 2014 00:27:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401210027.s0L0RoLM068024@svn.freebsd.org> From: Alexander Motin Date: Tue, 21 Jan 2014 00:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260964 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:27:50 -0000 Author: mav Date: Tue Jan 21 00:27:49 2014 New Revision: 260964 URL: http://svnweb.freebsd.org/changeset/base/260964 Log: MFC r256995: Remove 128KB bzero() call done for every block I/O data buffer. Modified: stable/9/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_backend_block.c Tue Jan 21 00:25:50 2014 (r260963) +++ stable/9/sys/cam/ctl/ctl_backend_block.c Tue Jan 21 00:27:49 2014 (r260964) @@ -1618,18 +1618,6 @@ ctl_be_block_open(struct ctl_be_block_so } static int -ctl_be_block_mem_ctor(void *mem, int size, void *arg, int flags) -{ - return (0); -} - -static void -ctl_be_block_mem_dtor(void *mem, int size, void *arg) -{ - bzero(mem, size); -} - -static int ctl_be_block_create(struct ctl_be_block_softc *softc, struct ctl_lun_req *req) { struct ctl_be_block_lun *be_lun; @@ -1656,8 +1644,7 @@ ctl_be_block_create(struct ctl_be_block_ mtx_init(&be_lun->lock, be_lun->lunname, NULL, MTX_DEF); be_lun->lun_zone = uma_zcreate(be_lun->lunname, MAXPHYS, - ctl_be_block_mem_ctor, ctl_be_block_mem_dtor, NULL, NULL, - /*align*/ 0, /*flags*/0); + NULL, NULL, NULL, NULL, /*align*/ 0, /*flags*/0); if (be_lun->lun_zone == NULL) { snprintf(req->error_str, sizeof(req->error_str), From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 00:31:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0763BF3; Tue, 21 Jan 2014 00:31:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D0F641D64; Tue, 21 Jan 2014 00:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L0VVDR071723; Tue, 21 Jan 2014 00:31:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L0VV5i071709; Tue, 21 Jan 2014 00:31:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401210031.s0L0VV5i071709@svn.freebsd.org> From: Alexander Motin Date: Tue, 21 Jan 2014 00:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260965 - in stable/9/sys/cam: ata scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:31:32 -0000 Author: mav Date: Tue Jan 21 00:31:31 2014 New Revision: 260965 URL: http://svnweb.freebsd.org/changeset/base/260965 Log: MFC r257054: Some microoptimizations for da and ada drivers: - Replace ordered_tag_count counter with single flag; - From da remove outstanding_cmds counter, duplicating pending_ccbs list; - From da_softc remove unused links field. Modified: stable/9/sys/cam/ata/ata_da.c stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Tue Jan 21 00:27:49 2014 (r260964) +++ stable/9/sys/cam/ata/ata_da.c Tue Jan 21 00:31:31 2014 (r260965) @@ -81,7 +81,7 @@ typedef enum { ADA_FLAG_CAN_NCQ = 0x0008, ADA_FLAG_CAN_DMA = 0x0010, ADA_FLAG_NEED_OTAG = 0x0020, - ADA_FLAG_WENT_IDLE = 0x0040, + ADA_FLAG_WAS_OTAG = 0x0040, ADA_FLAG_CAN_TRIM = 0x0080, ADA_FLAG_OPEN = 0x0100, ADA_FLAG_SCTX_INIT = 0x0200, @@ -132,12 +132,12 @@ struct trim_request { struct ada_softc { struct bio_queue_head bio_queue; struct bio_queue_head trim_queue; + int outstanding_cmds; /* Number of active commands */ + int refcount; /* Active xpt_action() calls */ ada_state state; - ada_flags flags; + ada_flags flags; ada_quirks quirks; int sort_io_queue; - int ordered_tag_count; - int outstanding_cmds; int trim_max_ranges; int trim_running; int read_ahead; @@ -1504,7 +1504,7 @@ adastart(struct cam_periph *periph, unio if ((bp->bio_flags & BIO_ORDERED) != 0 || (softc->flags & ADA_FLAG_NEED_OTAG) != 0) { softc->flags &= ~ADA_FLAG_NEED_OTAG; - softc->ordered_tag_count++; + softc->flags |= ADA_FLAG_WAS_OTAG; tag_code = 0; } else { tag_code = 1; @@ -1759,7 +1759,7 @@ adadone(struct cam_periph *periph, union } softc->outstanding_cmds--; if (softc->outstanding_cmds == 0) - softc->flags |= ADA_FLAG_WENT_IDLE; + softc->flags |= ADA_FLAG_WAS_OTAG; if (state == ADA_CCB_TRIM) { TAILQ_HEAD(, bio) queue; struct bio *bp1; @@ -1923,14 +1923,11 @@ adasendorderedtag(void *arg) struct ada_softc *softc = arg; if (ada_send_ordered) { - if ((softc->ordered_tag_count == 0) - && ((softc->flags & ADA_FLAG_WENT_IDLE) == 0)) { - softc->flags |= ADA_FLAG_NEED_OTAG; + if (softc->outstanding_cmds > 0) { + if ((softc->flags & ADA_FLAG_WAS_OTAG) == 0) + softc->flags |= ADA_FLAG_NEED_OTAG; + softc->flags &= ~ADA_FLAG_WAS_OTAG; } - if (softc->outstanding_cmds > 0) - softc->flags &= ~ADA_FLAG_WENT_IDLE; - - softc->ordered_tag_count = 0; } /* Queue us up again */ callout_reset(&softc->sendordered_c, Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Jan 21 00:27:49 2014 (r260964) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Jan 21 00:31:31 2014 (r260965) @@ -84,7 +84,7 @@ typedef enum { DA_FLAG_PACK_LOCKED = 0x004, DA_FLAG_PACK_REMOVABLE = 0x008, DA_FLAG_NEED_OTAG = 0x020, - DA_FLAG_WENT_IDLE = 0x040, + DA_FLAG_WAS_OTAG = 0x040, DA_FLAG_RETRY_UA = 0x080, DA_FLAG_OPEN = 0x100, DA_FLAG_SCTX_INIT = 0x200, @@ -199,19 +199,17 @@ struct da_softc { struct bio_queue_head bio_queue; struct bio_queue_head delete_queue; struct bio_queue_head delete_run_queue; - SLIST_ENTRY(da_softc) links; LIST_HEAD(, ccb_hdr) pending_ccbs; + int tur; /* TEST UNIT READY should be sent */ + int refcount; /* Active xpt_action() calls */ da_state state; da_flags flags; da_quirks quirks; int sort_io_queue; int minimum_cmd_size; int error_inject; - int ordered_tag_count; - int outstanding_cmds; int trim_max_ranges; int delete_running; - int tur; int delete_available; /* Delete methods possibly available */ uint32_t unmap_max_ranges; uint32_t unmap_max_lba; @@ -2266,7 +2264,7 @@ skipstate: if ((bp->bio_flags & BIO_ORDERED) != 0 || (softc->flags & DA_FLAG_NEED_OTAG) != 0) { softc->flags &= ~DA_FLAG_NEED_OTAG; - softc->ordered_tag_count++; + softc->flags |= DA_FLAG_WAS_OTAG; tag_code = MSG_ORDERED_Q_TAG; } else { tag_code = MSG_SIMPLE_Q_TAG; @@ -2318,13 +2316,8 @@ skipstate: start_ccb->ccb_h.ccb_state = DA_CCB_BUFFER_IO; out: - /* - * Block out any asynchronous callbacks - * while we touch the pending ccb list. - */ LIST_INSERT_HEAD(&softc->pending_ccbs, &start_ccb->ccb_h, periph_links.le); - softc->outstanding_cmds++; /* We expect a unit attention from this device */ if ((softc->flags & DA_FLAG_RETRY_UA) != 0) { @@ -2980,14 +2973,9 @@ dadone(struct cam_periph *periph, union } } - /* - * Block out any asynchronous callbacks - * while we touch the pending ccb list. - */ LIST_REMOVE(&done_ccb->ccb_h, periph_links.le); - softc->outstanding_cmds--; - if (softc->outstanding_cmds == 0) - softc->flags |= DA_FLAG_WENT_IDLE; + if (LIST_EMPTY(&softc->pending_ccbs)) + softc->flags |= DA_FLAG_WAS_OTAG; if (state == DA_CCB_DELETE) { while ((bp1 = bioq_takefirst(&softc->delete_run_queue)) @@ -3572,7 +3560,7 @@ damediapoll(void *arg) struct cam_periph *periph = arg; struct da_softc *softc = periph->softc; - if (!softc->tur && softc->outstanding_cmds == 0) { + if (!softc->tur && LIST_EMPTY(&softc->pending_ccbs)) { if (cam_periph_acquire(periph) == CAM_REQ_CMP) { softc->tur = 1; daschedule(periph); @@ -3739,14 +3727,11 @@ dasendorderedtag(void *arg) struct da_softc *softc = arg; if (da_send_ordered) { - if ((softc->ordered_tag_count == 0) - && ((softc->flags & DA_FLAG_WENT_IDLE) == 0)) { - softc->flags |= DA_FLAG_NEED_OTAG; + if (!LIST_EMPTY(&softc->pending_ccbs)) { + if ((softc->flags & DA_FLAG_WAS_OTAG) == 0) + softc->flags |= DA_FLAG_NEED_OTAG; + softc->flags &= ~DA_FLAG_WAS_OTAG; } - if (softc->outstanding_cmds > 0) - softc->flags &= ~DA_FLAG_WENT_IDLE; - - softc->ordered_tag_count = 0; } /* Queue us up again */ callout_reset(&softc->sendordered_c, From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 00:34:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFA29EF2; Tue, 21 Jan 2014 00:34:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB8B51D7F; Tue, 21 Jan 2014 00:34:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L0YbHh072547; Tue, 21 Jan 2014 00:34:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L0YbLl072546; Tue, 21 Jan 2014 00:34:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401210034.s0L0YbLl072546@svn.freebsd.org> From: Alexander Motin Date: Tue, 21 Jan 2014 00:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260966 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:34:37 -0000 Author: mav Date: Tue Jan 21 00:34:37 2014 New Revision: 260966 URL: http://svnweb.freebsd.org/changeset/base/260966 Log: MFC r260407: Allow delete_method sysctl to be set to "DISABLE". Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Jan 21 00:31:31 2014 (r260965) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Jan 21 00:34:37 2014 (r260966) @@ -1968,7 +1968,7 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS char buf[16]; const char *p; struct da_softc *softc; - int i, error, value; + int i, error, methods, value; softc = (struct da_softc *)arg1; @@ -1981,8 +1981,9 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS error = sysctl_handle_string(oidp, buf, sizeof(buf), req); if (error != 0 || req->newptr == NULL) return (error); + methods = softc->delete_available | (1 << DA_DELETE_DISABLE); for (i = 0; i <= DA_DELETE_MAX; i++) { - if (!(softc->delete_available & (1 << i)) || + if (!(methods & (1 << i)) || strcmp(buf, da_delete_method_names[i]) != 0) continue; dadeletemethodset(softc, i); From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 01:12:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BF62768; Tue, 21 Jan 2014 01:12:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 27ACA1087; Tue, 21 Jan 2014 01:12:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L1CnmP089636; Tue, 21 Jan 2014 01:12:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L1Cn6K089635; Tue, 21 Jan 2014 01:12:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401210112.s0L1Cn6K089635@svn.freebsd.org> From: Glen Barber Date: Tue, 21 Jan 2014 01:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260967 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:12:49 -0000 Author: gjb Date: Tue Jan 21 01:12:48 2014 New Revision: 260967 URL: http://svnweb.freebsd.org/changeset/base/260967 Log: Document r260445. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 00:34:37 2014 (r260966) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 01:12:48 2014 (r260967) @@ -234,7 +234,8 @@ Contributed Software -   + &man.byacc.1; has been updated to version + 20140101. From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 01:12:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 319A7769; Tue, 21 Jan 2014 01:12:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E4A51088; Tue, 21 Jan 2014 01:12:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L1Co5j089678; Tue, 21 Jan 2014 01:12:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L1CoLe089677; Tue, 21 Jan 2014 01:12:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401210112.s0L1CoLe089677@svn.freebsd.org> From: Glen Barber Date: Tue, 21 Jan 2014 01:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260968 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:12:51 -0000 Author: gjb Date: Tue Jan 21 01:12:50 2014 New Revision: 260968 URL: http://svnweb.freebsd.org/changeset/base/260968 Log: Document r259626. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 01:12:48 2014 (r260967) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 01:12:50 2014 (r260968) @@ -236,6 +236,9 @@ &man.byacc.1; has been updated to version 20140101. + + Timezone data files have been updated to + version 2013i. From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 01:12:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E99276A; Tue, 21 Jan 2014 01:12:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0ABCC1089; Tue, 21 Jan 2014 01:12:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L1Cqou089715; Tue, 21 Jan 2014 01:12:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L1CqOL089714; Tue, 21 Jan 2014 01:12:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401210112.s0L1CqOL089714@svn.freebsd.org> From: Glen Barber Date: Tue, 21 Jan 2014 01:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260969 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:12:53 -0000 Author: gjb Date: Tue Jan 21 01:12:52 2014 New Revision: 260969 URL: http://svnweb.freebsd.org/changeset/base/260969 Log: Document r258884. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 01:12:50 2014 (r260968) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 01:12:52 2014 (r260969) @@ -239,6 +239,9 @@ Timezone data files have been updated to version 2013i. + + &man.lldb.1; has been updated to upstream + snapshot version r196259. From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 01:12:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0975D83D; Tue, 21 Jan 2014 01:12:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EAAB8108A; Tue, 21 Jan 2014 01:12:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L1Csht089754; Tue, 21 Jan 2014 01:12:54 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L1CsMs089753; Tue, 21 Jan 2014 01:12:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401210112.s0L1CsMs089753@svn.freebsd.org> From: Glen Barber Date: Tue, 21 Jan 2014 01:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260970 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:12:55 -0000 Author: gjb Date: Tue Jan 21 01:12:54 2014 New Revision: 260970 URL: http://svnweb.freebsd.org/changeset/base/260970 Log: Document r258838. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 01:12:52 2014 (r260969) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 01:12:54 2014 (r260970) @@ -224,6 +224,10 @@ &man.dmesg.8; is now printed, opposed to the previous output Exec format error.. + The &man.casperd.8; daemon has been added, + which provides access to functionality that is not available in + the capability mode sandbox. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 01:21:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58E412B9; Tue, 21 Jan 2014 01:21:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 459A31151; Tue, 21 Jan 2014 01:21:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L1LLIJ094006; Tue, 21 Jan 2014 01:21:21 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L1LLTq094005; Tue, 21 Jan 2014 01:21:21 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401210121.s0L1LLTq094005@svn.freebsd.org> From: Glen Barber Date: Tue, 21 Jan 2014 01:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260971 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:21:21 -0000 Author: gjb Date: Tue Jan 21 01:21:20 2014 New Revision: 260971 URL: http://svnweb.freebsd.org/changeset/base/260971 Log: Document r258830. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 01:12:54 2014 (r260970) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jan 21 01:21:20 2014 (r260971) @@ -172,6 +172,10 @@ Support for the &intel; Centrino™ Wireless-N 135 chipset has been added. + + Support for Broadcom chipsets + BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 has + been added to &man.bge.4;. From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 03:01:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD947F32; Tue, 21 Jan 2014 03:01:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 99F801812; Tue, 21 Jan 2014 03:01:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L31ZDI033250; Tue, 21 Jan 2014 03:01:35 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L31Yi3033245; Tue, 21 Jan 2014 03:01:34 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201401210301.s0L31Yi3033245@svn.freebsd.org> From: Neel Natu Date: Tue, 21 Jan 2014 03:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260972 - in head/sys/amd64/vmm: . io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:01:35 -0000 Author: neel Date: Tue Jan 21 03:01:34 2014 New Revision: 260972 URL: http://svnweb.freebsd.org/changeset/base/260972 Log: There is no need to initialize the IOMMU if no passthru devices have been configured for bhyve to use. Suggested by: grehan@ Modified: head/sys/amd64/vmm/io/iommu.c head/sys/amd64/vmm/io/ppt.c head/sys/amd64/vmm/io/ppt.h head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/io/iommu.c ============================================================================== --- head/sys/amd64/vmm/io/iommu.c Tue Jan 21 01:21:20 2014 (r260971) +++ head/sys/amd64/vmm/io/iommu.c Tue Jan 21 03:01:34 2014 (r260972) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -43,7 +44,13 @@ __FBSDID("$FreeBSD$"); #include "vmm_mem.h" #include "iommu.h" -static boolean_t iommu_avail; +SYSCTL_DECL(_hw_vmm); +SYSCTL_NODE(_hw_vmm, OID_AUTO, iommu, CTLFLAG_RW, 0, "bhyve iommu parameters"); + +static int iommu_avail; +SYSCTL_INT(_hw_vmm_iommu, OID_AUTO, initialized, CTLFLAG_RD, &iommu_avail, + 0, "bhyve iommu initialized?"); + static struct iommu_ops *ops; static void *host_domain; @@ -160,7 +167,7 @@ iommu_init(void) if (error) return; - iommu_avail = TRUE; + iommu_avail = 1; /* * Create a domain for the devices owned by the host Modified: head/sys/amd64/vmm/io/ppt.c ============================================================================== --- head/sys/amd64/vmm/io/ppt.c Tue Jan 21 01:21:20 2014 (r260971) +++ head/sys/amd64/vmm/io/ppt.c Tue Jan 21 03:01:34 2014 (r260972) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -100,7 +101,12 @@ static struct pptdev { } msix; } pptdevs[64]; +SYSCTL_DECL(_hw_vmm); +SYSCTL_NODE(_hw_vmm, OID_AUTO, ppt, CTLFLAG_RW, 0, "bhyve passthru devices"); + static int num_pptdevs; +SYSCTL_INT(_hw_vmm_ppt, OID_AUTO, devices, CTLFLAG_RD, &num_pptdevs, 0, + "number of pci passthru devices"); static int ppt_probe(device_t dev) @@ -282,7 +288,14 @@ ppt_teardown_msix(struct pptdev *ppt) } int -ppt_num_devices(struct vm *vm) +ppt_avail_devices(void) +{ + + return (num_pptdevs); +} + +int +ppt_assigned_devices(struct vm *vm) { int i, num; Modified: head/sys/amd64/vmm/io/ppt.h ============================================================================== --- head/sys/amd64/vmm/io/ppt.h Tue Jan 21 01:21:20 2014 (r260971) +++ head/sys/amd64/vmm/io/ppt.h Tue Jan 21 03:01:34 2014 (r260972) @@ -36,10 +36,16 @@ int ppt_setup_msi(struct vm *vm, int vcp uint64_t addr, uint64_t msg, int numvec); int ppt_setup_msix(struct vm *vm, int vcpu, int bus, int slot, int func, int idx, uint64_t addr, uint64_t msg, uint32_t vector_control); -int ppt_num_devices(struct vm *vm); +int ppt_assigned_devices(struct vm *vm); boolean_t ppt_is_mmio(struct vm *vm, vm_paddr_t gpa); /* + * Returns the number of devices sequestered by the ppt driver for assignment + * to virtual machines. + */ +int ppt_avail_devices(void); + +/* * The following functions should never be called directly. * Use 'vm_assign_pptdev()' and 'vm_unassign_pptdev()' instead. */ Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Tue Jan 21 01:21:20 2014 (r260971) +++ head/sys/amd64/vmm/vmm.c Tue Jan 21 03:01:34 2014 (r260972) @@ -266,7 +266,8 @@ vmm_handler(module_t mod, int what, void switch (what) { case MOD_LOAD: vmmdev_init(); - iommu_init(); + if (ppt_avail_devices() > 0) + iommu_init(); error = vmm_init(); if (error == 0) vmm_initialized = 1; @@ -604,7 +605,7 @@ vm_unassign_pptdev(struct vm *vm, int bu if (error) return (error); - if (ppt_num_devices(vm) == 0) { + if (ppt_assigned_devices(vm) == 0) { vm_iommu_unmap(vm); vm_gpa_unwire(vm); } @@ -624,7 +625,7 @@ vm_assign_pptdev(struct vm *vm, int bus, * * We need to do this before the first pci passthru device is attached. */ - if (ppt_num_devices(vm) == 0) { + if (ppt_assigned_devices(vm) == 0) { KASSERT(vm->iommu == NULL, ("vm_assign_pptdev: iommu must be NULL")); maxaddr = vmm_mem_maxaddr(); From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 03:14:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC15D540; Tue, 21 Jan 2014 03:14:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC5CB1922; Tue, 21 Jan 2014 03:14:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L3EKQq038104; Tue, 21 Jan 2014 03:14:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L3EJct038099; Tue, 21 Jan 2014 03:14:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401210314.s0L3EJct038099@svn.freebsd.org> From: John Baldwin Date: Tue, 21 Jan 2014 03:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260973 - in head/sys/x86: include pci x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:14:20 -0000 Author: jhb Date: Tue Jan 21 03:14:19 2014 New Revision: 260973 URL: http://svnweb.freebsd.org/changeset/base/260973 Log: - Reuse legacy_pcib_(read|write)_config() methods in the QPI pcib driver. - Reuse legacy_pcib_alloc_msi{,x}() methods in the QPI and mptable pcib drivers. Modified: head/sys/x86/include/legacyvar.h head/sys/x86/pci/pci_bus.c head/sys/x86/pci/qpi.c head/sys/x86/x86/mptable_pci.c Modified: head/sys/x86/include/legacyvar.h ============================================================================== --- head/sys/x86/include/legacyvar.h Tue Jan 21 03:01:34 2014 (r260972) +++ head/sys/x86/include/legacyvar.h Tue Jan 21 03:14:19 2014 (r260973) @@ -57,6 +57,9 @@ int legacy_pcib_write_ivar(device_t dev, uintptr_t value); struct resource *legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); +int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, + int maxcount, int *irqs); +int legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq); int legacy_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data); Modified: head/sys/x86/pci/pci_bus.c ============================================================================== --- head/sys/x86/pci/pci_bus.c Tue Jan 21 03:01:34 2014 (r260972) +++ head/sys/x86/pci/pci_bus.c Tue Jan 21 03:14:19 2014 (r260973) @@ -92,7 +92,7 @@ legacy_pcib_route_interrupt(device_t pci /* Pass MSI requests up to the nexus. */ -static int +int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) { @@ -103,7 +103,7 @@ legacy_pcib_alloc_msi(device_t pcib, dev irqs)); } -static int +int legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) { device_t bus; Modified: head/sys/x86/pci/qpi.c ============================================================================== --- head/sys/x86/pci/qpi.c Tue Jan 21 03:01:34 2014 (r260972) +++ head/sys/x86/pci/qpi.c Tue Jan 21 03:14:19 2014 (r260973) @@ -45,8 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include +#include #include #include @@ -237,42 +238,6 @@ qpi_pcib_read_ivar(device_t dev, device_ } } -static uint32_t -qpi_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func, - u_int reg, int bytes) -{ - - return (pci_cfgregread(bus, slot, func, reg, bytes)); -} - -static void -qpi_pcib_write_config(device_t dev, u_int bus, u_int slot, u_int func, - u_int reg, uint32_t data, int bytes) -{ - - pci_cfgregwrite(bus, slot, func, reg, data, bytes); -} - -static int -qpi_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, - int *irqs) -{ - device_t bus; - - bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount, - irqs)); -} - -static int -qpi_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) -{ - device_t bus; - - bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); -} - static int qpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data) @@ -302,11 +267,11 @@ static device_method_t qpi_pcib_methods[ /* pcib interface */ DEVMETHOD(pcib_maxslots, pcib_maxslots), - DEVMETHOD(pcib_read_config, qpi_pcib_read_config), - DEVMETHOD(pcib_write_config, qpi_pcib_write_config), - DEVMETHOD(pcib_alloc_msi, qpi_pcib_alloc_msi), + DEVMETHOD(pcib_read_config, legacy_pcib_read_config), + DEVMETHOD(pcib_write_config, legacy_pcib_write_config), + DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), - DEVMETHOD(pcib_alloc_msix, qpi_pcib_alloc_msix), + DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), DEVMETHOD(pcib_map_msi, qpi_pcib_map_msi), Modified: head/sys/x86/x86/mptable_pci.c ============================================================================== --- head/sys/x86/x86/mptable_pci.c Tue Jan 21 03:01:34 2014 (r260972) +++ head/sys/x86/x86/mptable_pci.c Tue Jan 21 03:14:19 2014 (r260973) @@ -76,27 +76,6 @@ mptable_hostb_attach(device_t dev) return (bus_generic_attach(dev)); } -/* Pass MSI requests up to the nexus. */ -static int -mptable_hostb_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, - int *irqs) -{ - device_t bus; - - bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount, - irqs)); -} - -static int -mptable_hostb_alloc_msix(device_t pcib, device_t dev, int *irq) -{ - device_t bus; - - bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); -} - #ifdef NEW_PCIB static int mptable_is_isa_range(u_long start, u_long end) @@ -200,9 +179,9 @@ static device_method_t mptable_hostb_met DEVMETHOD(pcib_read_config, legacy_pcib_read_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config), DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt), - DEVMETHOD(pcib_alloc_msi, mptable_hostb_alloc_msi), + DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), - DEVMETHOD(pcib_alloc_msix, mptable_hostb_alloc_msix), + DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), DEVMETHOD(pcib_map_msi, legacy_pcib_map_msi), From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 03:24:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 211AB865; Tue, 21 Jan 2014 03:24:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0D89519E5; Tue, 21 Jan 2014 03:24:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L3OqoR042063; Tue, 21 Jan 2014 03:24:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L3OqHa042062; Tue, 21 Jan 2014 03:24:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401210324.s0L3OqHa042062@svn.freebsd.org> From: John Baldwin Date: Tue, 21 Jan 2014 03:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260974 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:24:53 -0000 Author: jhb Date: Tue Jan 21 03:24:52 2014 New Revision: 260974 URL: http://svnweb.freebsd.org/changeset/base/260974 Log: Fix a typo. Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue Jan 21 03:14:19 2014 (r260973) +++ head/sys/kern/vfs_bio.c Tue Jan 21 03:24:52 2014 (r260974) @@ -715,7 +715,7 @@ kern_vfs_bio_buffer_alloc(caddr_t v, lon } /* - * Ideal allocation size for the transient bio submap if 10% + * Ideal allocation size for the transient bio submap is 10% * of the maximal space buffer map. This roughly corresponds * to the amount of the buffer mapped for typical UFS load. * From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 03:27:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E0AA9BC; Tue, 21 Jan 2014 03:27:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 384F219F8; Tue, 21 Jan 2014 03:27:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L3Rm8A042400; Tue, 21 Jan 2014 03:27:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L3RlZi042399; Tue, 21 Jan 2014 03:27:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401210327.s0L3RlZi042399@svn.freebsd.org> From: John Baldwin Date: Tue, 21 Jan 2014 03:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260975 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:27:48 -0000 Author: jhb Date: Tue Jan 21 03:27:47 2014 New Revision: 260975 URL: http://svnweb.freebsd.org/changeset/base/260975 Log: Fix a couple of typos. Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Tue Jan 21 03:24:52 2014 (r260974) +++ head/sys/vm/vm_pageout.c Tue Jan 21 03:27:47 2014 (r260975) @@ -1121,7 +1121,7 @@ vm_pageout_scan(struct vm_domain *vmd, i } else if ((m->flags & PG_WINATCFLS) == 0 && pass < 2) { /* * Dirty pages need to be paged out, but flushing - * a page is extremely expensive verses freeing + * a page is extremely expensive versus freeing * a clean page. Rather then artificially limiting * the number of pages we can flush, we instead give * dirty pages extra priority on the inactive queue @@ -1183,7 +1183,7 @@ vm_pageout_scan(struct vm_domain *vmd, i * to be freed and dirty pages to be moved to the end * of the queue. Since dirty pages are also moved to * the end of the queue once-cleaned, this gives - * way too large a weighting to defering the freeing + * way too large a weighting to deferring the freeing * of dirty pages. * * We can't wait forever for the vnode lock, we might From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 05:54:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD4685B6; Tue, 21 Jan 2014 05:54:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A97D01438; Tue, 21 Jan 2014 05:54:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L5sEgn099275; Tue, 21 Jan 2014 05:54:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L5sELX099274; Tue, 21 Jan 2014 05:54:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401210554.s0L5sELX099274@svn.freebsd.org> From: Glen Barber Date: Tue, 21 Jan 2014 05:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260976 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 05:54:14 -0000 Author: gjb Date: Tue Jan 21 05:54:14 2014 New Revision: 260976 URL: http://svnweb.freebsd.org/changeset/base/260976 Log: Add 10.0-RELEASE. Sponsored by: The FreeBSD Foundation Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Tue Jan 21 03:27:47 2014 (r260975) +++ head/share/misc/bsd-family-tree Tue Jan 21 05:54:14 2014 (r260976) @@ -291,7 +291,11 @@ FreeBSD 5.2 | | | | | | | FreeBSD 10 -current | NetBSD -current OpenBSD -current | | | | | | - v v v v v + | v v v v + | + *--FreeBSD + | 10.0 + v Time ---------------- @@ -605,6 +609,7 @@ NetBSD 6.1.2 2013-09-30 [NBD] Mac OS X 10.9 2013-10-22 [APL] OpenBSD 5.4 2013-11-01 [OBD] DragonFly 3.6.0 2013-11-25 [DFB] +FreeBSD 10.0 2014-01-20 [FBD] Bibliography ------------------------ From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 05:56:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B46A0707; Tue, 21 Jan 2014 05:56:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A12911449; Tue, 21 Jan 2014 05:56:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L5uZpZ099628; Tue, 21 Jan 2014 05:56:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L5uZ74099627; Tue, 21 Jan 2014 05:56:35 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401210556.s0L5uZ74099627@svn.freebsd.org> From: Glen Barber Date: Tue, 21 Jan 2014 05:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260977 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 05:56:35 -0000 Author: gjb Date: Tue Jan 21 05:56:35 2014 New Revision: 260977 URL: http://svnweb.freebsd.org/changeset/base/260977 Log: Add 11.0-CURRENT. Sponsored by: The FreeBSD Foundation Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Tue Jan 21 05:54:14 2014 (r260976) +++ head/share/misc/bsd-family-tree Tue Jan 21 05:56:35 2014 (r260977) @@ -289,12 +289,15 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | | -FreeBSD 10 -current | NetBSD -current OpenBSD -current | + | | NetBSD -current OpenBSD -current | | | | | | | v v v v | *--FreeBSD | 10.0 + | + | +FreeBSD 11 -current v Time From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 08:24:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A8755F1; Tue, 21 Jan 2014 08:24:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA118101F; Tue, 21 Jan 2014 08:24:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L8OC4F058542; Tue, 21 Jan 2014 08:24:12 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L8OC83058541; Tue, 21 Jan 2014 08:24:12 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401210824.s0L8OC83058541@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 21 Jan 2014 08:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260978 - head/usr.sbin/usbdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:24:13 -0000 Author: hselasky Date: Tue Jan 21 08:24:12 2014 New Revision: 260978 URL: http://svnweb.freebsd.org/changeset/base/260978 Log: Add check for "hw.usb.no_pf" sysctl value. Submitted by: Warren Block MFC after: 1 week Modified: head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Tue Jan 21 05:56:35 2014 (r260977) +++ head/usr.sbin/usbdump/usbdump.c Tue Jan 21 08:24:12 2014 (r260978) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -780,6 +781,23 @@ usage(void) exit(EX_USAGE); } +static void +check_usb_pf_sysctl(void) +{ + int error; + int no_pf_val = 0; + size_t no_pf_len = sizeof(int); + + /* check "hw.usb.no_pf" sysctl for 8- and 9- stable */ + + error = sysctlbyname("hw.usb.no_pf", &no_pf_val, + &no_pf_len, NULL, 0); + if (error == 0 && no_pf_val != 0) { + warnx("The USB packet filter might be disabled."); + warnx("See the \"hw.usb.no_pf\" sysctl for more information."); + } +} + int main(int argc, char *argv[]) { @@ -872,6 +890,8 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } + check_usb_pf_sysctl(); + p->fd = fd = open("/dev/bpf", O_RDONLY); if (p->fd < 0) err(EXIT_FAILURE, "Could not open BPF device"); From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 09:01:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D83A2350; Tue, 21 Jan 2014 09:01:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C4BED152E; Tue, 21 Jan 2014 09:01:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L918mR072461; Tue, 21 Jan 2014 09:01:08 GMT (envelope-from jgh@svn.freebsd.org) Received: (from jgh@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L918fY072459; Tue, 21 Jan 2014 09:01:08 GMT (envelope-from jgh@svn.freebsd.org) Message-Id: <201401210901.s0L918fY072459@svn.freebsd.org> From: Jason Helfman Date: Tue, 21 Jan 2014 09:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260979 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:01:08 -0000 Author: jgh (doc,ports committer) Date: Tue Jan 21 09:01:08 2014 New Revision: 260979 URL: http://svnweb.freebsd.org/changeset/base/260979 Log: add myself to committers-doc.dot Approved by: bcr (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Tue Jan 21 08:24:12 2014 (r260978) +++ head/share/misc/committers-doc.dot Tue Jan 21 09:01:08 2014 (r260979) @@ -68,6 +68,7 @@ gavin [label="Gavin Atkinson\ngavin@Free gjb [label="Glen Barber\ngjb@FreeBSD.org\n2010/09/01"] hrs [label="Hiroki Sato\nhrs@FreeBSD.org\n2000/07/06"] issyl0 [label="Isabell Long\nissyl0@FreeBSD.org\n2012/04/25"] +jgh [label="Jason Helfman\njgh@FreeBSD.org\n2014/01/20"] jkois [label="Johann Kois\njkois@FreeBSD.org\n2004/11/11"] joel [label="Joel Dahl\njoel@FreeBSD.org\n2005/04/05"] keramida [label="Giorgos Keramidas\nkeramida@FreeBSD.org\n2001/10/12"] @@ -97,6 +98,7 @@ bcr -> wblock bcr -> eadler bcr -> dru bcr -> crees +bcr -> jgh blackend -> ale @@ -163,10 +165,13 @@ nik -> keramida remko -> jkois remko -> rene +remko -> jgh simon -> josef simon -> remko trhodes -> danger trhodes -> jcamou + +wblock -> jgh } From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 09:19:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31C33D10; Tue, 21 Jan 2014 09:19:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C92416B9; Tue, 21 Jan 2014 09:19:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L9JTdw079363; Tue, 21 Jan 2014 09:19:29 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L9JT9l079358; Tue, 21 Jan 2014 09:19:29 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201401210919.s0L9JT9l079358@svn.freebsd.org> From: Dmitry Morozovsky Date: Tue, 21 Jan 2014 09:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260980 - in stable/10/sys: geom/part sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:19:30 -0000 Author: marck (doc committer) Date: Tue Jan 21 09:19:28 2014 New Revision: 260980 URL: http://svnweb.freebsd.org/changeset/base/260980 Log: MFC r259925-259926: Add GPT UUID for VMware vSAN meta-data partition. Approved by: ae Modified: stable/10/sys/geom/part/g_part.c stable/10/sys/geom/part/g_part.h stable/10/sys/geom/part/g_part_gpt.c stable/10/sys/sys/gpt.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/part/g_part.c ============================================================================== --- stable/10/sys/geom/part/g_part.c Tue Jan 21 09:01:08 2014 (r260979) +++ stable/10/sys/geom/part/g_part.c Tue Jan 21 09:19:28 2014 (r260980) @@ -107,6 +107,7 @@ struct g_part_alias_list { { "vmware-vmfs", G_PART_ALIAS_VMFS }, { "vmware-vmkdiag", G_PART_ALIAS_VMKDIAG }, { "vmware-reserved", G_PART_ALIAS_VMRESERVED }, + { "vmware-vsanhdr", G_PART_ALIAS_VMVSANHDR }, }; SYSCTL_DECL(_kern_geom); Modified: stable/10/sys/geom/part/g_part.h ============================================================================== --- stable/10/sys/geom/part/g_part.h Tue Jan 21 09:01:08 2014 (r260979) +++ stable/10/sys/geom/part/g_part.h Tue Jan 21 09:19:28 2014 (r260980) @@ -74,6 +74,7 @@ enum g_part_alias { G_PART_ALIAS_VMFS, /* A VMware VMFS partition entry */ G_PART_ALIAS_VMKDIAG, /* A VMware vmkDiagnostic partition entry */ G_PART_ALIAS_VMRESERVED, /* A VMware reserved partition entry */ + G_PART_ALIAS_VMVSANHDR, /* A VMware vSAN header partition entry */ /* Keep the following last */ G_PART_ALIAS_COUNT }; Modified: stable/10/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/10/sys/geom/part/g_part_gpt.c Tue Jan 21 09:01:08 2014 (r260979) +++ stable/10/sys/geom/part/g_part_gpt.c Tue Jan 21 09:19:28 2014 (r260980) @@ -167,6 +167,7 @@ static struct uuid gpt_uuid_linux_swap = static struct uuid gpt_uuid_vmfs = GPT_ENT_TYPE_VMFS; static struct uuid gpt_uuid_vmkdiag = GPT_ENT_TYPE_VMKDIAG; static struct uuid gpt_uuid_vmreserved = GPT_ENT_TYPE_VMRESERVED; +static struct uuid gpt_uuid_vmvsanhdr = GPT_ENT_TYPE_VMVSANHDR; static struct uuid gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; static struct uuid gpt_uuid_ms_reserved = GPT_ENT_TYPE_MS_RESERVED; static struct uuid gpt_uuid_ms_ldm_data = GPT_ENT_TYPE_MS_LDM_DATA; @@ -208,6 +209,7 @@ static struct g_part_uuid_alias { { &gpt_uuid_vmfs, G_PART_ALIAS_VMFS, 0 }, { &gpt_uuid_vmkdiag, G_PART_ALIAS_VMKDIAG, 0 }, { &gpt_uuid_vmreserved, G_PART_ALIAS_VMRESERVED, 0 }, + { &gpt_uuid_vmvsanhdr, G_PART_ALIAS_VMVSANHDR, 0 }, { &gpt_uuid_mbr, G_PART_ALIAS_MBR, 0 }, { &gpt_uuid_ms_basic_data, G_PART_ALIAS_MS_BASIC_DATA, 0x0b }, { &gpt_uuid_ms_ldm_data, G_PART_ALIAS_MS_LDM_DATA, 0 }, Modified: stable/10/sys/sys/gpt.h ============================================================================== --- stable/10/sys/sys/gpt.h Tue Jan 21 09:01:08 2014 (r260979) +++ stable/10/sys/sys/gpt.h Tue Jan 21 09:19:28 2014 (r260980) @@ -128,6 +128,8 @@ struct gpt_ent { {0x9d275380,0x40ad,0x11db,0xbf,0x97,{0x00,0x0c,0x29,0x11,0xd1,0xb8}} #define GPT_ENT_TYPE_VMRESERVED \ {0x9198effc,0x31c0,0x11db,0x8f,0x78,{0x00,0x0c,0x29,0x11,0xd1,0xb8}} +#define GPT_ENT_TYPE_VMVSANHDR \ + {0x381cfccc,0x7288,0x11e0,0x92,0xee,{0x00,0x0c,0x29,0x11,0xd0,0xb2}} #define GPT_ENT_TYPE_APPLE_BOOT \ {0x426F6F74,0x0000,0x11aa,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 09:20:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBB51E67; Tue, 21 Jan 2014 09:20:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B7F5F16CE; Tue, 21 Jan 2014 09:20:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L9KkL9081479; Tue, 21 Jan 2014 09:20:46 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L9KjK6081475; Tue, 21 Jan 2014 09:20:45 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201401210920.s0L9KjK6081475@svn.freebsd.org> From: Dmitry Morozovsky Date: Tue, 21 Jan 2014 09:20:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260981 - in stable/9/sys: geom/part sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:20:47 -0000 Author: marck (doc committer) Date: Tue Jan 21 09:20:45 2014 New Revision: 260981 URL: http://svnweb.freebsd.org/changeset/base/260981 Log: MFC r259925-259926: Add GPT UUID for VMware vSAN meta-data partition. Approved by: ae Modified: stable/9/sys/geom/part/g_part.c stable/9/sys/geom/part/g_part.h stable/9/sys/geom/part/g_part_gpt.c stable/9/sys/sys/gpt.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/geom/part/g_part.c ============================================================================== --- stable/9/sys/geom/part/g_part.c Tue Jan 21 09:19:28 2014 (r260980) +++ stable/9/sys/geom/part/g_part.c Tue Jan 21 09:20:45 2014 (r260981) @@ -108,6 +108,7 @@ struct g_part_alias_list { { "vmware-vmfs", G_PART_ALIAS_VMFS }, { "vmware-vmkdiag", G_PART_ALIAS_VMKDIAG }, { "vmware-reserved", G_PART_ALIAS_VMRESERVED }, + { "vmware-vsanhdr", G_PART_ALIAS_VMVSANHDR }, }; SYSCTL_DECL(_kern_geom); Modified: stable/9/sys/geom/part/g_part.h ============================================================================== --- stable/9/sys/geom/part/g_part.h Tue Jan 21 09:19:28 2014 (r260980) +++ stable/9/sys/geom/part/g_part.h Tue Jan 21 09:20:45 2014 (r260981) @@ -74,6 +74,7 @@ enum g_part_alias { G_PART_ALIAS_VMFS, /* A VMware VMFS partition entry */ G_PART_ALIAS_VMKDIAG, /* A VMware vmkDiagnostic partition entry */ G_PART_ALIAS_VMRESERVED, /* A VMware reserved partition entry */ + G_PART_ALIAS_VMVSANHDR, /* A VMware vSAN header partition entry */ /* Keep the following last */ G_PART_ALIAS_COUNT }; Modified: stable/9/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/9/sys/geom/part/g_part_gpt.c Tue Jan 21 09:19:28 2014 (r260980) +++ stable/9/sys/geom/part/g_part_gpt.c Tue Jan 21 09:20:45 2014 (r260981) @@ -167,6 +167,7 @@ static struct uuid gpt_uuid_linux_swap = static struct uuid gpt_uuid_vmfs = GPT_ENT_TYPE_VMFS; static struct uuid gpt_uuid_vmkdiag = GPT_ENT_TYPE_VMKDIAG; static struct uuid gpt_uuid_vmreserved = GPT_ENT_TYPE_VMRESERVED; +static struct uuid gpt_uuid_vmvsanhdr = GPT_ENT_TYPE_VMVSANHDR; static struct uuid gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; static struct uuid gpt_uuid_ms_reserved = GPT_ENT_TYPE_MS_RESERVED; static struct uuid gpt_uuid_ms_ldm_data = GPT_ENT_TYPE_MS_LDM_DATA; @@ -208,6 +209,7 @@ static struct g_part_uuid_alias { { &gpt_uuid_vmfs, G_PART_ALIAS_VMFS, 0 }, { &gpt_uuid_vmkdiag, G_PART_ALIAS_VMKDIAG, 0 }, { &gpt_uuid_vmreserved, G_PART_ALIAS_VMRESERVED, 0 }, + { &gpt_uuid_vmvsanhdr, G_PART_ALIAS_VMVSANHDR, 0 }, { &gpt_uuid_mbr, G_PART_ALIAS_MBR, 0 }, { &gpt_uuid_ms_basic_data, G_PART_ALIAS_MS_BASIC_DATA, 0x0b }, { &gpt_uuid_ms_ldm_data, G_PART_ALIAS_MS_LDM_DATA, 0 }, Modified: stable/9/sys/sys/gpt.h ============================================================================== --- stable/9/sys/sys/gpt.h Tue Jan 21 09:19:28 2014 (r260980) +++ stable/9/sys/sys/gpt.h Tue Jan 21 09:20:45 2014 (r260981) @@ -128,6 +128,8 @@ struct gpt_ent { {0x9d275380,0x40ad,0x11db,0xbf,0x97,{0x00,0x0c,0x29,0x11,0xd1,0xb8}} #define GPT_ENT_TYPE_VMRESERVED \ {0x9198effc,0x31c0,0x11db,0x8f,0x78,{0x00,0x0c,0x29,0x11,0xd1,0xb8}} +#define GPT_ENT_TYPE_VMVSANHDR \ + {0x381cfccc,0x7288,0x11e0,0x92,0xee,{0x00,0x0c,0x29,0x11,0xd0,0xb2}} #define GPT_ENT_TYPE_APPLE_BOOT \ {0x426F6F74,0x0000,0x11aa,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 09:22:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C2BDFA4; Tue, 21 Jan 2014 09:22:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 278A9172C; Tue, 21 Jan 2014 09:22:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0L9M262082384; Tue, 21 Jan 2014 09:22:02 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0L9M1uh082377; Tue, 21 Jan 2014 09:22:01 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201401210922.s0L9M1uh082377@svn.freebsd.org> From: Dmitry Morozovsky Date: Tue, 21 Jan 2014 09:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r260982 - in stable/8/sys: geom/part sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:22:02 -0000 Author: marck (doc committer) Date: Tue Jan 21 09:22:00 2014 New Revision: 260982 URL: http://svnweb.freebsd.org/changeset/base/260982 Log: MFC r259925-259926 (with appropriate changes to g_part_uuid_alias struct): Add GPT UUID for VMware vSAN meta-data partition. Approved by: ae Modified: stable/8/sys/geom/part/g_part.c stable/8/sys/geom/part/g_part.h stable/8/sys/geom/part/g_part_gpt.c stable/8/sys/sys/gpt.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/sys/geom/part/g_part.c ============================================================================== --- stable/8/sys/geom/part/g_part.c Tue Jan 21 09:20:45 2014 (r260981) +++ stable/8/sys/geom/part/g_part.c Tue Jan 21 09:22:00 2014 (r260982) @@ -106,6 +106,7 @@ struct g_part_alias_list { { "vmware-vmfs", G_PART_ALIAS_VMFS }, { "vmware-vmkdiag", G_PART_ALIAS_VMKDIAG }, { "vmware-reserved", G_PART_ALIAS_VMRESERVED }, + { "vmware-vsanhdr", G_PART_ALIAS_VMVSANHDR }, }; SYSCTL_DECL(_kern_geom); Modified: stable/8/sys/geom/part/g_part.h ============================================================================== --- stable/8/sys/geom/part/g_part.h Tue Jan 21 09:20:45 2014 (r260981) +++ stable/8/sys/geom/part/g_part.h Tue Jan 21 09:22:00 2014 (r260982) @@ -72,6 +72,7 @@ enum g_part_alias { G_PART_ALIAS_VMFS, /* A VMware VMFS partition entry */ G_PART_ALIAS_VMKDIAG, /* A VMware vmkDiagnostic partition entry */ G_PART_ALIAS_VMRESERVED, /* A VMware reserved partition entry */ + G_PART_ALIAS_VMVSANHDR, /* A VMware vSAN header partition entry */ /* Keep the following last */ G_PART_ALIAS_COUNT }; Modified: stable/8/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/8/sys/geom/part/g_part_gpt.c Tue Jan 21 09:20:45 2014 (r260981) +++ stable/8/sys/geom/part/g_part_gpt.c Tue Jan 21 09:22:00 2014 (r260982) @@ -162,6 +162,7 @@ static struct uuid gpt_uuid_linux_swap = static struct uuid gpt_uuid_vmfs = GPT_ENT_TYPE_VMFS; static struct uuid gpt_uuid_vmkdiag = GPT_ENT_TYPE_VMKDIAG; static struct uuid gpt_uuid_vmreserved = GPT_ENT_TYPE_VMRESERVED; +static struct uuid gpt_uuid_vmvsanhdr = GPT_ENT_TYPE_VMVSANHDR; static struct uuid gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; static struct uuid gpt_uuid_ms_reserved = GPT_ENT_TYPE_MS_RESERVED; static struct uuid gpt_uuid_ms_ldm_data = GPT_ENT_TYPE_MS_LDM_DATA; @@ -201,6 +202,7 @@ static struct g_part_uuid_alias { { &gpt_uuid_vmfs, G_PART_ALIAS_VMFS }, { &gpt_uuid_vmkdiag, G_PART_ALIAS_VMKDIAG }, { &gpt_uuid_vmreserved, G_PART_ALIAS_VMRESERVED }, + { &gpt_uuid_vmvsanhdr, G_PART_ALIAS_VMVSANHDR }, { &gpt_uuid_mbr, G_PART_ALIAS_MBR }, { &gpt_uuid_ms_basic_data, G_PART_ALIAS_MS_BASIC_DATA }, { &gpt_uuid_ms_ldm_data, G_PART_ALIAS_MS_LDM_DATA }, Modified: stable/8/sys/sys/gpt.h ============================================================================== --- stable/8/sys/sys/gpt.h Tue Jan 21 09:20:45 2014 (r260981) +++ stable/8/sys/sys/gpt.h Tue Jan 21 09:22:00 2014 (r260982) @@ -126,6 +126,8 @@ struct gpt_ent { {0x9d275380,0x40ad,0x11db,0xbf,0x97,{0x00,0x0c,0x29,0x11,0xd1,0xb8}} #define GPT_ENT_TYPE_VMRESERVED \ {0x9198effc,0x31c0,0x11db,0x8f,0x78,{0x00,0x0c,0x29,0x11,0xd1,0xb8}} +#define GPT_ENT_TYPE_VMVSANHDR \ + {0x381cfccc,0x7288,0x11e0,0x92,0xee,{0x00,0x0c,0x29,0x11,0xd0,0xb2}} #define GPT_ENT_TYPE_APPLE_BOOT \ {0x426F6F74,0x0000,0x11aa,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 10:35:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C240E317; Tue, 21 Jan 2014 10:35:14 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F7241DDF; Tue, 21 Jan 2014 10:35:14 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1W5YQ7-0005mw-Iz; Tue, 21 Jan 2014 11:18:59 +0100 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Glen Barber" Subject: Re: svn commit: r260939 - head/release/doc/en_US.ISO8859-1/relnotes References: <201401202225.s0KMPolR016521@svn.freebsd.org> Date: Tue, 21 Jan 2014 11:17:27 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201401202225.s0KMPolR016521@svn.freebsd.org> User-Agent: Opera Mail/12.16 (Win32) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: 0.8 X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.1 X-Scan-Signature: 8b3222cd26cce149ddb9ffa05c4da76e X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:35:14 -0000 On Mon, 20 Jan 2014 23:25:50 +0100, Glen Barber wrote: > Author: gjb > Date: Mon Jan 20 22:25:50 2014 > New Revision: 260939 > URL: http://svnweb.freebsd.org/changeset/base/260939 > > Log: > Document r260888. > Sponsored by: The FreeBSD Foundation > > Modified: > head/release/doc/en_US.ISO8859-1/relnotes/article.xml > > Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml > ============================================================================== > --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 > 22:08:11 2014 (r260938) > +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 > 22:25:50 2014 (r260939) > @@ -104,7 +104,9 @@ > > Kernel Changes > -   > + Add a VT kernel > + configuration file, which enables the new vt > + console driver. > > Virtualization support Isn't this configuration file temporary to increase testing instead of something which stays for a future release? http://svnweb.freebsd.org/base?view=revision&revision=260888 Regards, Ronald. From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 13:23:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A96AAC0; Tue, 21 Jan 2014 13:23:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 768591CD2; Tue, 21 Jan 2014 13:23:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LDNJAN076392; Tue, 21 Jan 2014 13:23:19 GMT (envelope-from grembo@svn.freebsd.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LDNJg2076391; Tue, 21 Jan 2014 13:23:19 GMT (envelope-from grembo@svn.freebsd.org) Message-Id: <201401211323.s0LDNJg2076391@svn.freebsd.org> From: Michael Gmelin Date: Tue, 21 Jan 2014 13:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260983 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 13:23:19 -0000 Author: grembo (ports committer) Date: Tue Jan 21 13:23:18 2014 New Revision: 260983 URL: http://svnweb.freebsd.org/changeset/base/260983 Log: Add grembo as a ports committer Approved by: flo (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Jan 21 09:22:00 2014 (r260982) +++ head/share/misc/committers-ports.dot Tue Jan 21 13:23:18 2014 (r260983) @@ -105,6 +105,7 @@ gerald [label="Gerald Pfeifer\ngerald@Fr gjb [label="Glen Barber\ngjb@FreeBSD.org\n2012/06/19"] glarkin [label="Greg Larkin\nglarkin@FreeBSD.org\n2008/07/17"] glewis [label="Greg Lewis\nglewis@FreeBSD.org\n2002/04/08"] +grembo [label="Michael Gmelin\ngrembo@FreeBSD.org\n2014/01/21"] gnn [label="George Neville-Neil\ngnn@FreeBSD.org\n2013/09/04"] hq [label="Herve Quiroz\nhq@FreeBSD.org\n2004/08/05"] ijliao [label="Ying-Chieh Liao\nijliao@FreeBSD.org\n2001/01/20"] From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 15:58:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EFF1C15; Tue, 21 Jan 2014 15:58:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0A4461B6C; Tue, 21 Jan 2014 15:58:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LFvxm8034875; Tue, 21 Jan 2014 15:57:59 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LFvxSa034874; Tue, 21 Jan 2014 15:57:59 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401211557.s0LFvxSa034874@svn.freebsd.org> From: Glen Barber Date: Tue, 21 Jan 2014 15:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260984 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:58:00 -0000 Author: gjb Date: Tue Jan 21 15:57:59 2014 New Revision: 260984 URL: http://svnweb.freebsd.org/changeset/base/260984 Log: 10.0-RELEASE is out, so call stable/10 -STABLE again. Reminded by: David Wolfskill Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Tue Jan 21 13:23:18 2014 (r260983) +++ stable/10/sys/conf/newvers.sh Tue Jan 21 15:57:59 2014 (r260984) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 16:02:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9B16E30; Tue, 21 Jan 2014 16:02:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A15441CED; Tue, 21 Jan 2014 16:02:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LG2W6h038196; Tue, 21 Jan 2014 16:02:32 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LG2WCI038193; Tue, 21 Jan 2014 16:02:32 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401211602.s0LG2WCI038193@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 21 Jan 2014 16:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r260985 - stable/8/contrib/gcc/cp X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:02:32 -0000 Author: pfg Date: Tue Jan 21 16:02:31 2014 New Revision: 260985 URL: http://svnweb.freebsd.org/changeset/base/260985 Log: MFC r260332; gcc: backport some fixes from llvm-gcc llvm-gcc backported some patches from gcc trunk: http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00662.html http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00019.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00240.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00493.html The first two were always GPL2. The last two were added after the GPL3 transition, but were written by aaw@google.com and Rafael Espíndola got permission to relicense them under the GPL2 for inclusion in llvm-gcc. This fixes GCC-PR c++/31749 Obtained from: llvm-gcc (rev. 75463; GPLv2) Modified: stable/8/contrib/gcc/cp/decl.c stable/8/contrib/gcc/cp/name-lookup.c stable/8/contrib/gcc/cp/parser.c Directory Properties: stable/8/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/gcc/ (props changed) Modified: stable/8/contrib/gcc/cp/decl.c ============================================================================== --- stable/8/contrib/gcc/cp/decl.c Tue Jan 21 15:57:59 2014 (r260984) +++ stable/8/contrib/gcc/cp/decl.c Tue Jan 21 16:02:31 2014 (r260985) @@ -9726,6 +9726,12 @@ lookup_and_check_tag (enum tag_types tag | DECL_SELF_REFERENCE_P (decl)); return t; } + else if (decl && TREE_CODE (decl) == TREE_LIST) + { + error ("reference to %qD is ambiguous", name); + print_candidates (decl); + return error_mark_node; + } else return NULL_TREE; } Modified: stable/8/contrib/gcc/cp/name-lookup.c ============================================================================== --- stable/8/contrib/gcc/cp/name-lookup.c Tue Jan 21 15:57:59 2014 (r260984) +++ stable/8/contrib/gcc/cp/name-lookup.c Tue Jan 21 16:02:31 2014 (r260985) @@ -42,7 +42,6 @@ struct scope_binding { #define EMPTY_SCOPE_BINDING { NULL_TREE, NULL_TREE } static cxx_scope *innermost_nonclass_level (void); -static tree select_decl (const struct scope_binding *, int); static cxx_binding *binding_for_name (cxx_scope *, tree); static tree lookup_name_innermost_nonclass_level (tree); static tree push_overloaded_decl (tree, int, bool); @@ -2082,6 +2081,22 @@ do_nonmember_using_decl (tree scope, tre return; } + /* LLVM LOCAL begin mainline */ + /* Shift the old and new bindings around so we're comparing class and + enumeration names to each other. */ + if (oldval && DECL_IMPLICIT_TYPEDEF_P (oldval)) + { + oldtype = oldval; + oldval = NULL_TREE; + } + + if (decls.value && DECL_IMPLICIT_TYPEDEF_P (decls.value)) + { + decls.type = decls.value; + decls.value = NULL_TREE; + } + /* LLVM LOCAL end mainline */ + /* It is impossible to overload a built-in function; any explicit declaration eliminates the built-in declaration. So, if OLDVAL is a built-in, then we can just pretend it isn't there. */ @@ -2091,95 +2106,112 @@ do_nonmember_using_decl (tree scope, tre && !DECL_HIDDEN_FRIEND_P (oldval)) oldval = NULL_TREE; - /* Check for using functions. */ - if (decls.value && is_overloaded_fn (decls.value)) + /* LLVM LOCAL begin mainline */ + if (decls.value) { - tree tmp, tmp1; - - if (oldval && !is_overloaded_fn (oldval)) - { - if (!DECL_IMPLICIT_TYPEDEF_P (oldval)) - error ("%qD is already declared in this scope", name); - oldval = NULL_TREE; - } - - *newval = oldval; - for (tmp = decls.value; tmp; tmp = OVL_NEXT (tmp)) + /* Check for using functions. */ + if (is_overloaded_fn (decls.value)) { - tree new_fn = OVL_CURRENT (tmp); + tree tmp, tmp1; - /* [namespace.udecl] + if (oldval && !is_overloaded_fn (oldval)) + { + error ("%qD is already declared in this scope", name); + oldval = NULL_TREE; + } - If a function declaration in namespace scope or block - scope has the same name and the same parameter types as a - function introduced by a using declaration the program is - ill-formed. */ - for (tmp1 = oldval; tmp1; tmp1 = OVL_NEXT (tmp1)) + *newval = oldval; + for (tmp = decls.value; tmp; tmp = OVL_NEXT (tmp)) { - tree old_fn = OVL_CURRENT (tmp1); + tree new_fn = OVL_CURRENT (tmp); - if (new_fn == old_fn) - /* The function already exists in the current namespace. */ - break; - else if (OVL_USED (tmp1)) - continue; /* this is a using decl */ - else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (new_fn)), - TYPE_ARG_TYPES (TREE_TYPE (old_fn)))) + /* [namespace.udecl] + + If a function declaration in namespace scope or block + scope has the same name and the same parameter types as a + function introduced by a using declaration the program is + ill-formed. */ + for (tmp1 = oldval; tmp1; tmp1 = OVL_NEXT (tmp1)) { - gcc_assert (!DECL_ANTICIPATED (old_fn) - || DECL_HIDDEN_FRIEND_P (old_fn)); + tree old_fn = OVL_CURRENT (tmp1); - /* There was already a non-using declaration in - this scope with the same parameter types. If both - are the same extern "C" functions, that's ok. */ - if (decls_match (new_fn, old_fn)) + if (new_fn == old_fn) + /* The function already exists in the current namespace. */ break; - else + else if (OVL_USED (tmp1)) + continue; /* this is a using decl */ + else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (new_fn)), + TYPE_ARG_TYPES (TREE_TYPE (old_fn)))) { - error ("%qD is already declared in this scope", name); - break; + gcc_assert (!DECL_ANTICIPATED (old_fn) + || DECL_HIDDEN_FRIEND_P (old_fn)); + + /* There was already a non-using declaration in + this scope with the same parameter types. If both + are the same extern "C" functions, that's ok. */ + if (decls_match (new_fn, old_fn)) + break; + else + { + error ("%qD is already declared in this scope", name); + break; + } } } - } - /* If we broke out of the loop, there's no reason to add - this function to the using declarations for this - scope. */ - if (tmp1) - continue; - - /* If we are adding to an existing OVERLOAD, then we no - longer know the type of the set of functions. */ - if (*newval && TREE_CODE (*newval) == OVERLOAD) - TREE_TYPE (*newval) = unknown_type_node; - /* Add this new function to the set. */ - *newval = build_overload (OVL_CURRENT (tmp), *newval); - /* If there is only one function, then we use its type. (A - using-declaration naming a single function can be used in - contexts where overload resolution cannot be - performed.) */ - if (TREE_CODE (*newval) != OVERLOAD) - { - *newval = ovl_cons (*newval, NULL_TREE); - TREE_TYPE (*newval) = TREE_TYPE (OVL_CURRENT (tmp)); + /* If we broke out of the loop, there's no reason to add + this function to the using declarations for this + scope. */ + if (tmp1) + continue; + + /* If we are adding to an existing OVERLOAD, then we no + longer know the type of the set of functions. */ + if (*newval && TREE_CODE (*newval) == OVERLOAD) + TREE_TYPE (*newval) = unknown_type_node; + /* Add this new function to the set. */ + *newval = build_overload (OVL_CURRENT (tmp), *newval); + /* If there is only one function, then we use its type. (A + using-declaration naming a single function can be used in + contexts where overload resolution cannot be + performed.) */ + if (TREE_CODE (*newval) != OVERLOAD) + { + *newval = ovl_cons (*newval, NULL_TREE); + TREE_TYPE (*newval) = TREE_TYPE (OVL_CURRENT (tmp)); + } + OVL_USED (*newval) = 1; } - OVL_USED (*newval) = 1; + } + else + { + *newval = decls.value; + if (oldval && !decls_match (*newval, oldval)) + error ("%qD is already declared in this scope", name); } } else + *newval = oldval; + + if (decls.type && TREE_CODE (decls.type) == TREE_LIST) { - *newval = decls.value; - if (oldval && !decls_match (*newval, oldval)) - error ("%qD is already declared in this scope", name); + error ("reference to %qD is ambiguous", name); + print_candidates (decls.type); } - - *newtype = decls.type; - if (oldtype && *newtype && !same_type_p (oldtype, *newtype)) + else { - error ("using declaration %qD introduced ambiguous type %qT", - name, oldtype); - return; + *newtype = decls.type; + if (oldtype && *newtype && !decls_match (oldtype, *newtype)) + error ("%qD is already declared in this scope", name); } + + /* If *newval is empty, shift any class or enumeration name down. */ + if (!*newval) + { + *newval = *newtype; + *newtype = NULL_TREE; + } + /* LLVM LOCAL end mainline */ } /* Process a using-declaration at function scope. */ @@ -3477,43 +3509,63 @@ merge_functions (tree s1, tree s2) XXX In what way should I treat extern declarations? XXX I don't want to repeat the entire duplicate_decls here */ +/* LLVM LOCAL begin mainline */ static void -ambiguous_decl (tree name, struct scope_binding *old, cxx_binding *new, - int flags) +ambiguous_decl (struct scope_binding *old, cxx_binding *new, int flags) { tree val, type; gcc_assert (old != NULL); + + /* Copy the type. */ + type = new->type; + if (LOOKUP_NAMESPACES_ONLY (flags) + || (type && hidden_name_p (type) && !(flags & LOOKUP_HIDDEN))) + type = NULL_TREE; + /* Copy the value. */ val = new->value; if (val) - switch (TREE_CODE (val)) - { - case TEMPLATE_DECL: - /* If we expect types or namespaces, and not templates, - or this is not a template class. */ - if ((LOOKUP_QUALIFIERS_ONLY (flags) - && !DECL_CLASS_TEMPLATE_P (val)) - || hidden_name_p (val)) - val = NULL_TREE; - break; - case TYPE_DECL: - if (LOOKUP_NAMESPACES_ONLY (flags) || hidden_name_p (val)) - val = NULL_TREE; - break; - case NAMESPACE_DECL: - if (LOOKUP_TYPES_ONLY (flags)) - val = NULL_TREE; - break; - case FUNCTION_DECL: - /* Ignore built-in functions that are still anticipated. */ - if (LOOKUP_QUALIFIERS_ONLY (flags) || hidden_name_p (val)) - val = NULL_TREE; - break; - default: - if (LOOKUP_QUALIFIERS_ONLY (flags)) - val = NULL_TREE; - } + { + if (hidden_name_p (val) && !(flags & LOOKUP_HIDDEN)) + val = NULL_TREE; + else + switch (TREE_CODE (val)) + { + case TEMPLATE_DECL: + /* If we expect types or namespaces, and not templates, + or this is not a template class. */ + if ((LOOKUP_QUALIFIERS_ONLY (flags) + && !DECL_CLASS_TEMPLATE_P (val))) + val = NULL_TREE; + break; + case TYPE_DECL: + if (LOOKUP_NAMESPACES_ONLY (flags) + || (type && (flags & LOOKUP_PREFER_TYPES))) + val = NULL_TREE; + break; + case NAMESPACE_DECL: + if (LOOKUP_TYPES_ONLY (flags)) + val = NULL_TREE; + break; + case FUNCTION_DECL: + /* Ignore built-in functions that are still anticipated. */ + if (LOOKUP_QUALIFIERS_ONLY (flags)) + val = NULL_TREE; + break; + default: + if (LOOKUP_QUALIFIERS_ONLY (flags)) + val = NULL_TREE; + } + } + + /* If val is hidden, shift down any class or enumeration name. */ + if (!val) + { + val = type; + type = NULL_TREE; + } +/* LLVM LOCAL end mainline */ if (!old->value) old->value = val; else if (val && val != old->value) @@ -3523,25 +3575,21 @@ ambiguous_decl (tree name, struct scope_ else { old->value = tree_cons (NULL_TREE, old->value, - build_tree_list (NULL_TREE, new->value)); + build_tree_list (NULL_TREE, val)); TREE_TYPE (old->value) = error_mark_node; } } - /* ... and copy the type. */ - type = new->type; - if (LOOKUP_NAMESPACES_ONLY (flags)) - type = NULL_TREE; + + /* LLVM LOCAL begin mainline */ if (!old->type) old->type = type; else if (type && old->type != type) { - if (flags & LOOKUP_COMPLAIN) - { - error ("%qD denotes an ambiguous type",name); - error ("%J first type here", TYPE_MAIN_DECL (old->type)); - error ("%J other type here", TYPE_MAIN_DECL (type)); - } + old->type = tree_cons (NULL_TREE, old->type, + build_tree_list (NULL_TREE, type)); + TREE_TYPE (old->type) = error_mark_node; } + /* LLVM LOCAL end mainline */ } /* Return the declarations that are members of the namespace NS. */ @@ -3630,36 +3678,6 @@ remove_hidden_names (tree fns) return fns; } -/* Select the right _DECL from multiple choices. */ - -static tree -select_decl (const struct scope_binding *binding, int flags) -{ - tree val; - val = binding->value; - - timevar_push (TV_NAME_LOOKUP); - if (LOOKUP_NAMESPACES_ONLY (flags)) - { - /* We are not interested in types. */ - if (val && (TREE_CODE (val) == NAMESPACE_DECL - || TREE_CODE (val) == TREE_LIST)) - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val); - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, NULL_TREE); - } - - /* If looking for a type, or if there is no non-type binding, select - the value binding. */ - if (binding->type && (!val || (flags & LOOKUP_PREFER_TYPES))) - val = binding->type; - /* Don't return non-types if we really prefer types. */ - else if (val && LOOKUP_TYPES_ONLY (flags) - && ! DECL_DECLARES_TYPE_P (val)) - val = NULL_TREE; - - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val); -} - /* Unscoped lookup of a global: iterate over current namespaces, considering using-directives. */ @@ -3671,22 +3689,18 @@ unqualified_namespace_lookup (tree name, tree siter; struct cp_binding_level *level; tree val = NULL_TREE; - struct scope_binding binding = EMPTY_SCOPE_BINDING; timevar_push (TV_NAME_LOOKUP); for (; !val; scope = CP_DECL_CONTEXT (scope)) { + struct scope_binding binding = EMPTY_SCOPE_BINDING; cxx_binding *b = cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name); if (b) - { - if (b->value - && ((flags & LOOKUP_HIDDEN) || !hidden_name_p (b->value))) - binding.value = b->value; - binding.type = b->type; - } + /* LLVM LOCAL mainline */ + ambiguous_decl (&binding, b, flags); /* Add all _DECLs seen through local using-directives. */ for (level = current_binding_level; @@ -3711,7 +3725,7 @@ unqualified_namespace_lookup (tree name, siter = CP_DECL_CONTEXT (siter); } - val = select_decl (&binding, flags); + val = binding.value; if (scope == global_namespace) break; } @@ -3741,7 +3755,7 @@ lookup_qualified_name (tree scope, tree if (is_type_p) flags |= LOOKUP_PREFER_TYPES; if (qualified_lookup_using_namespace (name, scope, &binding, flags)) - t = select_decl (&binding, flags); + t = binding.value; } else if (is_aggr_type (scope, complain)) t = lookup_member (scope, name, 2, is_type_p); @@ -3774,7 +3788,8 @@ lookup_using_namespace (tree name, struc cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (used), name); /* Resolve ambiguities. */ if (val1) - ambiguous_decl (name, val, val1, flags); + /* LLVM LOCAL mainline */ + ambiguous_decl (val, val1, flags); } POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val->value != error_mark_node); } @@ -3803,7 +3818,8 @@ qualified_lookup_using_namespace (tree n cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name); seen = tree_cons (scope, NULL_TREE, seen); if (binding) - ambiguous_decl (name, result, binding, flags); + /* LLVM LOCAL mainline */ + ambiguous_decl (result, binding, flags); /* Consider strong using directives always, and non-strong ones if we haven't found a binding yet. ??? Shouldn't we consider Modified: stable/8/contrib/gcc/cp/parser.c ============================================================================== --- stable/8/contrib/gcc/cp/parser.c Tue Jan 21 15:57:59 2014 (r260984) +++ stable/8/contrib/gcc/cp/parser.c Tue Jan 21 16:02:31 2014 (r260985) @@ -10312,13 +10312,19 @@ cp_parser_elaborated_type_specifier (cp_ if (parser->scope) { tree decl; + tree ambiguous_decls; decl = cp_parser_lookup_name (parser, identifier, tag_type, /*is_template=*/false, /*is_namespace=*/false, /*check_dependency=*/true, - /*ambiguous_decls=*/NULL); + &ambiguous_decls); + + /* If the lookup was ambiguous, an error will already have been + issued. */ + if (ambiguous_decls) + return error_mark_node; /* If we are parsing friend declaration, DECL may be a TEMPLATE_DECL tree node here. However, we need to check From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 16:49:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08B88A9F; Tue, 21 Jan 2014 16:49:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8BA910B6; Tue, 21 Jan 2014 16:49:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LGnsXA054524; Tue, 21 Jan 2014 16:49:54 GMT (envelope-from harti@svn.freebsd.org) Received: (from harti@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LGnscn054523; Tue, 21 Jan 2014 16:49:54 GMT (envelope-from harti@svn.freebsd.org) Message-Id: <201401211649.s0LGnscn054523@svn.freebsd.org> From: Hartmut Brandt Date: Tue, 21 Jan 2014 16:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260986 - head/contrib/bsnmp/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:49:55 -0000 Author: harti Date: Tue Jan 21 16:49:54 2014 New Revision: 260986 URL: http://svnweb.freebsd.org/changeset/base/260986 Log: Fix a problem with OBJECT IDENTIFIER encoding: need to check the second subid to be less than 40, not the first when the first subid is 0 or 1. Modified: head/contrib/bsnmp/lib/asn1.c Modified: head/contrib/bsnmp/lib/asn1.c ============================================================================== --- head/contrib/bsnmp/lib/asn1.c Tue Jan 21 16:02:31 2014 (r260985) +++ head/contrib/bsnmp/lib/asn1.c Tue Jan 21 16:49:54 2014 (r260986) @@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const s err = ASN_ERR_RANGE; } if (oid->subs[0] > 2 || - (oid->subs[0] < 2 && oid->subs[0] >= 40)) { + (oid->subs[0] < 2 && oid->subs[1] >= 40)) { asn_error(NULL, "oid out of range (%u,%u)", oid->subs[0], oid->subs[1]); err = ASN_ERR_RANGE; From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 17:26:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07790537; Tue, 21 Jan 2014 17:26:26 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CEF3713D3; Tue, 21 Jan 2014 17:26:25 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BBCCBB96B; Tue, 21 Jan 2014 12:26:24 -0500 (EST) From: John Baldwin To: Rui Paulo Subject: Re: svn commit: r260898 - head/sys/kern Date: Tue, 21 Jan 2014 11:24:33 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> <71438498-A67C-4C7D-8C8B-4A9C199AC1B1@felyko.com> In-Reply-To: <71438498-A67C-4C7D-8C8B-4A9C199AC1B1@felyko.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Message-Id: <201401211124.33327.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 21 Jan 2014 12:26:24 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:26:26 -0000 On Monday, January 20, 2014 4:21:13 pm Rui Paulo wrote: > On 20 Jan 2014, at 08:32, John Baldwin wrote: >=20 > > On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > >> On 19 Jan 2014, at 17:59, Neel Natu wrote: > >>> Author: neel > >>> Date: Mon Jan 20 01:59:35 2014 > >>> New Revision: 260898 > >>> URL: http://svnweb.freebsd.org/changeset/base/260898 > >>>=20 > >>> Log: > >>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient entri= es > >>> for > >>> WITNESS to actually work. > >>=20 > >> This value should be automatically tuned... > >=20 > > How do you propose to do so? This is the count of locks initialized be= fore=20 > > witness' own SYSINIT is executed and the array it sizes is allocated=20 > > statically at compile time. >=20 > Witness is never used (witness_cold) until witness_initialise() is called= , right? Yes, but we'd like to make sure that any locks initialized before then are tracked by witness after that point. > > This used to not be a static array, but an > > intrusive list embedded in locks themselves, but we decided to shave a > > pointer off of each lock that was only used for that and to use a stati= cally=20 > > sized table instead. >=20 > Why don=92t we start with a static value (say 1024) and then reinitialise= and > copy array if it doesn=92t fit instead of crashing the kernel? Where do we get the memory for the new array? If we could malloc it, we wouldn't have a static one. If we could malloc, we would also call witness_initialize() (that is what it is waiting for, the chance to call malloc() for 'struct witness' objects). Hmm, looking at the witness code though, this doesn't result in panics (the one that was bumped here). The pending list panics if it is exhausted, but if WITNESS_COUNT is exhausted witness just turns itself off. We could make the pending list also just turn witness off rather than panic'ing if the pending list panic issue is a dire one. =2D-=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 17:26:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 602AC53A; Tue, 21 Jan 2014 17:26:28 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 32EFE13D5; Tue, 21 Jan 2014 17:26:28 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1F0D5B945; Tue, 21 Jan 2014 12:26:27 -0500 (EST) From: John Baldwin To: Alexander Kabaev Subject: Re: svn commit: r260898 - head/sys/kern Date: Tue, 21 Jan 2014 11:26:18 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> <20140120171844.69e065fb@kan.dyndns.org> In-Reply-To: <20140120171844.69e065fb@kan.dyndns.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201401211126.18930.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 21 Jan 2014 12:26:27 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo , Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:26:28 -0000 On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote: > On Mon, 20 Jan 2014 11:32:29 -0500 > John Baldwin wrote: > > > On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > > > On 19 Jan 2014, at 17:59, Neel Natu wrote: > > > > Author: neel > > > > Date: Mon Jan 20 01:59:35 2014 > > > > New Revision: 260898 > > > > URL: http://svnweb.freebsd.org/changeset/base/260898 > > > > > > > > Log: > > > > Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient > > > > entries for > > > > WITNESS to actually work. > > > > > > This value should be automatically tuned... > > > > How do you propose to do so? This is the count of locks initialized > > before witness' own SYSINIT is executed and the array it sizes is > > allocated statically at compile time. This used to not be a static > > array, but an intrusive list embedded in locks themselves, but we > > decided to shave a pointer off of each lock that was only used for > > that and to use a statically sized table instead. > > > > -- > > John Baldwin > > As + * MAXCPU, as evidently most recent > overflows reported were caused by jacking MAXCPU up from its default > value? If raising MAXCPU changes the number of unique lock names used, then the locks are named incorrectly. We don't use the 'pid' in the name for PROC_LOCK precisely so that WITNESS will treat them all the same so that if if it learns a lock order for pid 37 it enforces the same lock order for pid 38. Device locks should follow a similar rule. They should generally not include the device name (and in some cases they really shouldn't even have the driver name). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 17:26:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF6A7536; Tue, 21 Jan 2014 17:26:23 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4F1713D2; Tue, 21 Jan 2014 17:26:23 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AF2D4B945; Tue, 21 Jan 2014 12:26:21 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r260926 - in head: sys/dev/pci sys/sys usr.sbin/pciconf Date: Tue, 21 Jan 2014 11:00:25 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401202056.s0KKuAbH069433@svn.freebsd.org> In-Reply-To: <201401202056.s0KKuAbH069433@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201401211100.25712.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 21 Jan 2014 12:26:21 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:26:23 -0000 On Monday, January 20, 2014 3:56:10 pm John Baldwin wrote: > Author: jhb > Date: Mon Jan 20 20:56:09 2014 > New Revision: 260926 > URL: http://svnweb.freebsd.org/changeset/base/260926 > > Log: > Add support for displaying VPD for PCI devices via pciconf. > - Store the length of each read-only VPD value since not all values are > guaranteed to be ASCII values (though most are). > - Add a new pciio ioctl to fetch VPD for a single PCI device. The values > are returned as a list of variable length records, one for the device > name and each keyword. > - Add a new -V flag to pciconf's list mode which displays VPD data for > each device. > > MFC after: 1 week Sample output: t4nex0@pci0:4:0:4: class=0x020000 card=0x00001425 chip=0x44011425 rev=0x00 hdr=0x00 VPD ident = 'T420-LL-CR ' VPD ro PN = '110114640C0 ' VPD ro EC = '01234567890123 ' VPD ro SN = 'PT06120042 ' VPD ro NA = '000743123340' VPD ro V0 = '0909FFFF' VPD ro V1 = '48000810180109111948484848484847' ... -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 17:49:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B63D4F1; Tue, 21 Jan 2014 17:49:51 +0000 (UTC) Received: from forward7l.mail.yandex.net (forward7l.mail.yandex.net [IPv6:2a02:6b8:0:1819::7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B008D167E; Tue, 21 Jan 2014 17:49:50 +0000 (UTC) Received: from smtp4h.mail.yandex.net (smtp4h.mail.yandex.net [84.201.186.21]) by forward7l.mail.yandex.net (Yandex) with ESMTP id E0E77BC0CF6; Tue, 21 Jan 2014 21:49:46 +0400 (MSK) Received: from smtp4h.mail.yandex.net (localhost [127.0.0.1]) by smtp4h.mail.yandex.net (Yandex) with ESMTP id 556352C1285; Tue, 21 Jan 2014 21:49:46 +0400 (MSK) Received: from unknown (unknown [77.66.224.37]) by smtp4h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id r8DkRvT6tz-njOqvs0V; Tue, 21 Jan 2014 21:49:45 +0400 (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (Client certificate not present) X-Yandex-Uniq: 2d7ae4d3-b78b-48df-98da-ebe46f4a2d0a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1390326585; bh=vw6kthvL2RHvCgkaonTem0xPFjRc8ktJQgyYxezAiso=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=D4U/kIdj0q7/pGXDFTvpQkplFPVdMKJ2kguk2Gnc4ETcTMWKl76xqN0ptTbColaUA L40CwE9cBzXyAxDFIeYBgRDsvov6IKhTmBXZwGy8LbPJsNgz/laWGihN/mnCdcb5eM evNXMQnOqBz3JEauZcVNgIZBKnxUPVNkhN5ydCPU= Authentication-Results: smtp4h.mail.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <52DEB336.1040306@yandex.ru> Date: Tue, 21 Jan 2014 21:49:42 +0400 From: Ruslan Makhmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org Subject: Re: svn commit: r260926 - in head: sys/dev/pci sys/sys usr.sbin/pciconf References: <201401202056.s0KKuAbH069433@svn.freebsd.org> <201401211100.25712.jhb@freebsd.org> In-Reply-To: <201401211100.25712.jhb@freebsd.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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:49:51 -0000 John Baldwin wrote on 21.01.2014 20:00: > On Monday, January 20, 2014 3:56:10 pm John Baldwin wrote: >> Author: jhb >> Date: Mon Jan 20 20:56:09 2014 >> New Revision: 260926 >> URL: http://svnweb.freebsd.org/changeset/base/260926 >> >> Log: >> Add support for displaying VPD for PCI devices via pciconf. >> - Store the length of each read-only VPD value since not all values are >> guaranteed to be ASCII values (though most are). >> - Add a new pciio ioctl to fetch VPD for a single PCI device. The values >> are returned as a list of variable length records, one for the device >> name and each keyword. >> - Add a new -V flag to pciconf's list mode which displays VPD data for >> each device. >> >> MFC after: 1 week > > Sample output: > > t4nex0@pci0:4:0:4: class=0x020000 card=0x00001425 chip=0x44011425 > rev=0x00 hdr=0x00 > VPD ident = 'T420-LL-CR ' > VPD ro PN = '110114640C0 ' > VPD ro EC = '01234567890123 ' > VPD ro SN = 'PT06120042 ' > VPD ro NA = '000743123340' > VPD ro V0 = '0909FFFF' > VPD ro V1 = '48000810180109111948484848484847' > ... That's great. So why not to strip whitespace in the output? -- Regards, Ruslan T.O.S. Of Reality From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 18:57:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D10E8281; Tue, 21 Jan 2014 18:57:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD2B61D5D; Tue, 21 Jan 2014 18:57:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LIvncY007100; Tue, 21 Jan 2014 18:57:49 GMT (envelope-from demon@svn.freebsd.org) Received: (from demon@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LIvnL9007099; Tue, 21 Jan 2014 18:57:49 GMT (envelope-from demon@svn.freebsd.org) Message-Id: <201401211857.s0LIvnL9007099@svn.freebsd.org> From: Dmitry Sivachenko Date: Tue, 21 Jan 2014 18:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260987 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:57:49 -0000 Author: demon (ports committer) Date: Tue Jan 21 18:57:49 2014 New Revision: 260987 URL: http://svnweb.freebsd.org/changeset/base/260987 Log: Do not exit with non-zero return code if sysctl.conf or sysctl.conf.local files are absent. Approved by: delphij Modified: head/etc/rc.d/sysctl Modified: head/etc/rc.d/sysctl ============================================================================== --- head/etc/rc.d/sysctl Tue Jan 21 16:49:54 2014 (r260986) +++ head/etc/rc.d/sysctl Tue Jan 21 18:57:49 2014 (r260987) @@ -27,7 +27,9 @@ sysctl_start() esac for _f in /etc/sysctl.conf /etc/sysctl.conf.local; do - [ -r ${_f} ] && ${command} ${command_args} ${_f} > /dev/null + if [ -r ${_f} ]; then + ${command} ${command_args} ${_f} > /dev/null + fi done } From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 19:03:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91DA345C; Tue, 21 Jan 2014 19:03:15 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64ACF1E0E; Tue, 21 Jan 2014 19:03:15 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4BAD2B945; Tue, 21 Jan 2014 14:03:13 -0500 (EST) From: John Baldwin To: Ruslan Makhmatkhanov Subject: Re: svn commit: r260926 - in head: sys/dev/pci sys/sys usr.sbin/pciconf Date: Tue, 21 Jan 2014 13:19:01 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401202056.s0KKuAbH069433@svn.freebsd.org> <201401211100.25712.jhb@freebsd.org> <52DEB336.1040306@yandex.ru> In-Reply-To: <52DEB336.1040306@yandex.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201401211319.02050.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 21 Jan 2014 14:03:13 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:03:15 -0000 On Tuesday, January 21, 2014 12:49:42 pm Ruslan Makhmatkhanov wrote: > John Baldwin wrote on 21.01.2014 20:00: > > On Monday, January 20, 2014 3:56:10 pm John Baldwin wrote: > >> Author: jhb > >> Date: Mon Jan 20 20:56:09 2014 > >> New Revision: 260926 > >> URL: http://svnweb.freebsd.org/changeset/base/260926 > >> > >> Log: > >> Add support for displaying VPD for PCI devices via pciconf. > >> - Store the length of each read-only VPD value since not all values are > >> guaranteed to be ASCII values (though most are). > >> - Add a new pciio ioctl to fetch VPD for a single PCI device. The values > >> are returned as a list of variable length records, one for the device > >> name and each keyword. > >> - Add a new -V flag to pciconf's list mode which displays VPD data for > >> each device. > >> > >> MFC after: 1 week > > > > Sample output: > > > > t4nex0@pci0:4:0:4: class=0x020000 card=0x00001425 chip=0x44011425 > > rev=0x00 hdr=0x00 > > VPD ident = 'T420-LL-CR ' > > VPD ro PN = '110114640C0 ' > > VPD ro EC = '01234567890123 ' > > VPD ro SN = 'PT06120042 ' > > VPD ro NA = '000743123340' > > VPD ro V0 = '0909FFFF' > > VPD ro V1 = '48000810180109111948484848484847' > > ... > > That's great. So why not to strip whitespace in the output? I suppose it could trim trailing whitespace. The format of these fields is very loose (just ASCII), so I wanted to display the raw value in case there were cases where it might be significant. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 19:06:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA381CB9; Tue, 21 Jan 2014 19:06:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A45E01E98; Tue, 21 Jan 2014 19:06:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LJ6VQH011090; Tue, 21 Jan 2014 19:06:31 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LJ6TnI011079; Tue, 21 Jan 2014 19:06:29 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401211906.s0LJ6TnI011079@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 21 Jan 2014 19:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260988 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:06:31 -0000 Author: pfg Date: Tue Jan 21 19:06:29 2014 New Revision: 260988 URL: http://svnweb.freebsd.org/changeset/base/260988 Log: ext2fs: Translate the EXT4_EXTENTS and EXT4_INDEX to the inode flags. r260545 cleared the inode flags to fix corruption problems but we still need to pass some EXT4 flags for the ext4 read-only mode. None of these attributes has an equivalent in FreeBSD and are uninteresting for the system utilities so they should be innaccessible in ext2_getattrib(). Note: we also use EXT4_HUGE_FILE but we use it directly from the dinode structure so it is not necessary to translate it, Suggested by: bde MFC after: 3 days Modified: head/sys/fs/ext2fs/ext2_bmap.c head/sys/fs/ext2fs/ext2_dinode.h head/sys/fs/ext2fs/ext2_htree.c head/sys/fs/ext2fs/ext2_inode_cnv.c head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_subr.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/inode.h Modified: head/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- head/sys/fs/ext2fs/ext2_bmap.c Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_bmap.c Tue Jan 21 19:06:29 2014 (r260988) @@ -74,7 +74,7 @@ ext2_bmap(struct vop_bmap_args *ap) if (ap->a_bnp == NULL) return (0); - if (VTOI(ap->a_vp)->i_flags & EXT4_EXTENTS) + if (VTOI(ap->a_vp)->i_flags & E4_EXTENTS) error = ext4_bmapext(ap->a_vp, ap->a_bn, &blkno, ap->a_runp, ap->a_runb); else Modified: head/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- head/sys/fs/ext2fs/ext2_dinode.h Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_dinode.h Tue Jan 21 19:06:29 2014 (r260988) @@ -50,22 +50,24 @@ /* * Inode flags - * The current implementation uses only EXT2_IMMUTABLE and EXT2_APPEND flags + * The system supports EXT2_IMMUTABLE, EXT2_APPEND and EXT2_NODUMP flags. + * The current implementation also uses EXT4_INDEX, EXT4_EXTENTS and + * EXT4_HUGE_FILE with some restrictions, imposed the lack of write + * support. */ #define EXT2_SECRM 0x00000001 /* Secure deletion */ #define EXT2_UNRM 0x00000002 /* Undelete */ #define EXT2_COMPR 0x00000004 /* Compress file */ #define EXT2_SYNC 0x00000008 /* Synchronous updates */ #define EXT2_IMMUTABLE 0x00000010 /* Immutable file */ -#define EXT2_APPEND 0x00000020 /* writes to file may only append */ -#define EXT2_NODUMP 0x00000040 /* do not dump file */ -#define EXT2_NOATIME 0x00000080 /* do not update atime */ - -#define EXT4_INDEX 0x00001000 /* hash-indexed directory */ +#define EXT2_APPEND 0x00000020 /* Writes to file may only append */ +#define EXT2_NODUMP 0x00000040 /* Do not dump file */ +#define EXT2_NOATIME 0x00000080 /* Do not update atime */ +#define EXT4_INDEX 0x00001000 /* Hash-indexed directory */ #define EXT4_IMAGIC 0x00002000 /* AFS directory */ -#define EXT4_JOURNAL_DATA 0x00004000 /* file data should be journaled */ -#define EXT4_NOTAIL 0x00008000 /* file tail should not be merged */ -#define EXT4_DIRSYNC 0x00010000 /* dirsync behaviour */ +#define EXT4_JOURNAL_DATA 0x00004000 /* File data should be journaled */ +#define EXT4_NOTAIL 0x00008000 /* File tail should not be merged */ +#define EXT4_DIRSYNC 0x00010000 /* Dirsync behaviour */ #define EXT4_TOPDIR 0x00020000 /* Top of directory hierarchies*/ #define EXT4_HUGE_FILE 0x00040000 /* Set to each huge file */ #define EXT4_EXTENTS 0x00080000 /* Inode uses extents */ Modified: head/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- head/sys/fs/ext2fs/ext2_htree.c Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_htree.c Tue Jan 21 19:06:29 2014 (r260988) @@ -91,7 +91,7 @@ ext2_htree_has_idx(struct inode *ip) { #ifdef EXT2FS_HTREE if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && - ip->i_flags & EXT4_INDEX) + ip->i_flags & E4_INDEX) return (1); else #endif @@ -656,7 +656,7 @@ ext2_htree_create_index(struct vnode *vp ((char *)ep + ep->e2d_reclen); ep->e2d_reclen = buf1 + blksize - (char *)ep; - dp->i_flags |= EXT4_INDEX; + dp->i_flags |= E4_INDEX; /* * Initialize index root. Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode_cnv.c Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_inode_cnv.c Tue Jan 21 19:06:29 2014 (r260988) @@ -108,6 +108,8 @@ ext2_ei2i(struct ext2fs_dinode *ei, stru ip->i_flags |= (ei->e2di_flags & EXT2_APPEND) ? SF_APPEND : 0; ip->i_flags |= (ei->e2di_flags & EXT2_IMMUTABLE) ? SF_IMMUTABLE : 0; ip->i_flags |= (ei->e2di_flags & EXT2_NODUMP) ? UF_NODUMP : 0; + ip->i_flags |= (ei->e2di_flags & EXT4_INDEX) ? E4_INDEX : 0; + ip->i_flags |= (ei->e2di_flags & EXT4_EXTENTS) ? E4_EXTENTS : 0; ip->i_blocks = ei->e2di_nblock; if (E2DI_HAS_HUGE_FILE(ip)) { ip->i_blocks |= (uint64_t)ei->e2di_nblock_high << 32; Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_lookup.c Tue Jan 21 19:06:29 2014 (r260988) @@ -888,8 +888,9 @@ ext2_direnter(struct inode *ip, struct v if (ext2_htree_has_idx(dp)) { error = ext2_htree_add_entry(dvp, &newdir, cnp); if (error) { - dp->i_flags &= ~EXT4_INDEX; + /* XXX: These seem to be set in the wrong place. */ dp->i_flags |= IN_CHANGE | IN_UPDATE; + dp->i_flags &= ~E4_INDEX; } return (error); } Modified: head/sys/fs/ext2fs/ext2_subr.c ============================================================================== --- head/sys/fs/ext2fs/ext2_subr.c Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_subr.c Tue Jan 21 19:06:29 2014 (r260988) @@ -82,10 +82,10 @@ ext2_blkatoff(struct vnode *vp, off_t of *bpp = NULL; /* - * The EXT4_EXTENTS requires special treatment, otherwise we can - * fall back to the normal path. + * E4_EXTENTS requires special treatment otherwise we can fall + * back to the normal path. */ - if (!(ip->i_flags & EXT4_EXTENTS)) + if (!(ip->i_flags & E4_EXTENTS)) goto normal; memset(&path, 0, sizeof(path)); @@ -110,7 +110,7 @@ ext2_blkatoff(struct vnode *vp, off_t of if (res) *res = (char *)bp->b_data + blkoff(fs, offset); /* - * If EXT4_EXTENTS is enabled we would get a wrong offset so + * If E4_EXTENTS is enabled we would get a wrong offset so * reset b_offset here. */ bp->b_offset = lbn * bsize; Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_vfsops.c Tue Jan 21 19:06:29 2014 (r260988) @@ -964,10 +964,10 @@ ext2_vget(struct mount *mp, ino_t ino, i * blocks are zeroed out - ext2_balloc depends on this * although for regular files and directories only * - * If EXT4_EXTENTS flag is enabled, unused blocks aren't - * zeroed out because we could corrupt the extent tree. + * If E4_EXTENTS is enabled, unused blocks are not zeroed + * out because we could corrupt the extent tree. */ - if (!(ip->i_flags & EXT4_EXTENTS) && + if (!(ip->i_flags & E4_EXTENTS) && (S_ISDIR(ip->i_mode) || S_ISREG(ip->i_mode))) { used_blocks = (ip->i_size+fs->e2fs_bsize-1) / fs->e2fs_bsize; for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++) Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_vnops.c Tue Jan 21 19:06:29 2014 (r260988) @@ -344,6 +344,8 @@ ext2_getattr(struct vop_getattr_args *ap vap->va_birthtime.tv_nsec = ip->i_birthnsec; } vap->va_flags = ip->i_flags; + /* E4_* flags are private to the driver */ + vap->va_flags &= !(E4_INDEX | E4_EXTENTS); vap->va_gen = ip->i_gen; vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize; vap->va_bytes = dbtob((u_quad_t)ip->i_blocks); @@ -1615,7 +1617,7 @@ ext2_read(struct vop_read_args *ap) ip = VTOI(vp); /*EXT4_EXT_LOCK(ip);*/ - if (ip->i_flags & EXT4_EXTENTS) + if (ip->i_flags & E4_EXTENTS) error = ext4_ext_read(ap); else error = ext2_ind_read(ap); Modified: head/sys/fs/ext2fs/inode.h ============================================================================== --- head/sys/fs/ext2fs/inode.h Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/inode.h Tue Jan 21 19:06:29 2014 (r260988) @@ -153,6 +153,13 @@ struct inode { #define IN_LAZYACCESS 0x0100 /* Process IN_ACCESS after the suspension finished */ +/* + * These are translation flags for some attributes that Ext4 + * passes as inode flags but that we cannot pass directly. + */ +#define E4_INDEX 0x01000000 +#define E4_EXTENTS 0x02000000 + #define i_devvp i_ump->um_devvp #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 22:19:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14A1F7FF for ; Tue, 21 Jan 2014 22:19:24 +0000 (UTC) Received: from nm12.bullet.mail.ne1.yahoo.com (nm12.bullet.mail.ne1.yahoo.com [98.138.90.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CA45A1F3E for ; Tue, 21 Jan 2014 22:19:23 +0000 (UTC) Received: from [98.138.100.113] by nm12.bullet.mail.ne1.yahoo.com with NNFMP; 21 Jan 2014 22:12:47 -0000 Received: from [98.138.226.30] by tm104.bullet.mail.ne1.yahoo.com with NNFMP; 21 Jan 2014 22:12:47 -0000 Received: from [127.0.0.1] by smtp201.mail.ne1.yahoo.com with NNFMP; 21 Jan 2014 22:12:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1390342367; bh=KOuUm53kP3Puz8ZdtUDpr12kdspuUjH/L+//5B4jw4U=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=qSEgH79AyABODl0cpBNHO51rN8hX+J83xN145y3Sv6VE9jEEKfo1UBvZRZ2m9+08OW82xVkGcBk9wDrH9mziPNnGQVYjqRp9hlYGm/oIHakVZzbv7wCM/yI0+qrI8lxBB5yYHZRKAgOzwIgiv3b8XWU3/VHOFJ3oRbOqxv2FY/c= X-Yahoo-Newman-Id: 188643.44889.bm@smtp201.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: xXqMqGYVM1nh3rQl2NHZPCRXZc1Im._RZvUgoWGXFZ2bkD_ hRnER1WMP6wFz.dX.AfnDzV9jYELmPb0Nj0I7Z_s2cYVFW5sAWAtINwCXqB2 KZk_2D5HYTeyN5KxRcH20iqDvtlIme.YYzr8w1TTog3sFnmQ4RHOk_157Ys2 93joSt3gdOAdo6S1GYbKapSO23UqrYe_EJW6MGTNEQvs4Nvn0uxJBtG1p6xk rdFZIeyehHXnHTFCkn8e_ClGpoJmyehbbfDH34T83f09wg0Slc35Np9vTI7b XfWq75L5YVN3frmkuFJd8T4.M0T8QBleFxGc4s5VBOfOaa_nfIxtndMjYUQu VRfr1fHVNQoxlpVZTYAUDoL_WKLfFMXuutzYYOvgCUXr.r0qXBvB2CoH2eBL k5irTOpBaTxIrrFI4bRZT2DVyitywcEBaMYHcXPN.KlVMA8wHcKlNCiYtcQb cpumICoDfZth082ZUXbYNNW.RezoEZGx3Na8Lh95V8Mdd1jbJz2MG09ePdKv EdLSw4b8pxg5Fe9FPDdUeh0IBaowJmKY6f5crpL5DQwuriH07qsYnGQFNUyN fpqMH X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- X-Rocket-Received: from [192.168.5.229] (scott4long@64.134.151.138 with plain [63.250.193.228]) by smtp201.mail.ne1.yahoo.com with SMTP; 21 Jan 2014 14:12:47 -0800 PST Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r260898 - head/sys/kern From: Scott Long In-Reply-To: <201401211126.18930.jhb@freebsd.org> Date: Tue, 21 Jan 2014 15:12:30 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> <20140120171844.69e065fb@kan.dyndns.org> <201401211126.18930.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1827) Cc: src-committers@freebsd.org, Neel Natu , svn-src-all@freebsd.org, Rui Paulo , svn-src-head@freebsd.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:19:24 -0000 On Jan 21, 2014, at 9:26 AM, John Baldwin wrote: > On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote: >> On Mon, 20 Jan 2014 11:32:29 -0500 >> John Baldwin wrote: >>=20 >>> On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: >>>> On 19 Jan 2014, at 17:59, Neel Natu wrote: >>>>> Author: neel >>>>> Date: Mon Jan 20 01:59:35 2014 >>>>> New Revision: 260898 >>>>> URL: http://svnweb.freebsd.org/changeset/base/260898 >>>>>=20 >>>>> Log: >>>>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient >>>>> entries for >>>>> WITNESS to actually work. >>>>=20 >>>> This value should be automatically tuned... >>>=20 >>> How do you propose to do so? This is the count of locks initialized >>> before witness' own SYSINIT is executed and the array it sizes is >>> allocated statically at compile time. This used to not be a static >>> array, but an intrusive list embedded in locks themselves, but we >>> decided to shave a pointer off of each lock that was only used for >>> that and to use a statically sized table instead. >>>=20 >>> --=20 >>> John Baldwin >>=20 >> As + * MAXCPU, as evidently most recent >> overflows reported were caused by jacking MAXCPU up from its default >> value?=20 >=20 > If raising MAXCPU changes the number of unique lock names used, then = the > locks are named incorrectly. We don't use the 'pid' in the name for > PROC_LOCK precisely so that WITNESS will treat them all the same so > that if if it learns a lock order for pid 37 it enforces the same lock > order for pid 38. Device locks should follow a similar rule. They > should generally not include the device name (and in some cases they > really shouldn't even have the driver name). Why shouldn=92t they have a driver and device name? Wouldn=92t it help = identify possible deadlocks from driver instances calling into each other? Scott From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 23:15:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DFBC310; Tue, 21 Jan 2014 23:15:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A1B21376; Tue, 21 Jan 2014 23:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LNFOEm010294; Tue, 21 Jan 2014 23:15:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LNFOEX010293; Tue, 21 Jan 2014 23:15:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401212315.s0LNFOEX010293@svn.freebsd.org> From: Alexander Motin Date: Tue, 21 Jan 2014 23:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260996 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:15:24 -0000 Author: mav Date: Tue Jan 21 23:15:23 2014 New Revision: 260996 URL: http://svnweb.freebsd.org/changeset/base/260996 Log: Fix memory and references leak due to unfreed path in case we can't allocate bus scan CCB. MFC after: 2 weeks Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Jan 21 21:30:44 2014 (r260995) +++ head/sys/cam/cam_xpt.c Tue Jan 21 23:15:23 2014 (r260996) @@ -3919,9 +3919,11 @@ xpt_bus_register(struct cam_sim *sim, de scan_ccb->ccb_h.func_code = XPT_SCAN_BUS; scan_ccb->crcn.flags = 0; xpt_rescan(scan_ccb); - } else + } else { xpt_print(path, "Can't allocate CCB to scan bus\n"); + xpt_free_path(path); + } } else xpt_free_path(path); } else From owner-svn-src-all@FreeBSD.ORG Tue Jan 21 23:45:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B056AF1E; Tue, 21 Jan 2014 23:45:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9CB7A164F; Tue, 21 Jan 2014 23:45:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LNjVCD034250; Tue, 21 Jan 2014 23:45:31 GMT (envelope-from tychon@svn.freebsd.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LNjVVO034249; Tue, 21 Jan 2014 23:45:31 GMT (envelope-from tychon@svn.freebsd.org) Message-Id: <201401212345.s0LNjVVO034249@svn.freebsd.org> From: Tycho Nightingale Date: Tue, 21 Jan 2014 23:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260997 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:45:31 -0000 Author: tychon Date: Tue Jan 21 23:45:31 2014 New Revision: 260997 URL: http://svnweb.freebsd.org/changeset/base/260997 Log: Add myself to the src-committers list. Approved by: neel (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Tue Jan 21 23:15:23 2014 (r260996) +++ head/share/misc/committers-src.dot Tue Jan 21 23:45:31 2014 (r260997) @@ -286,6 +286,7 @@ trasz [label="Edward Tomasz Napierala\nt trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/05/28"] trociny [label="Mikolaj Golub\ntrociny@FreeBSD.org\n2011/03/10"] tuexen [label="Michael Tuexen\ntuexen@FreeBSD.org\n2009/06/06"] +tychon [label="Tycho Nightingale\ntychon@FreeBSD.org\n2014/01/21"] ume [label="Hajimu UMEMOTO\nume@FreeBSD.org\n2000/02/26"] uqs [label="Ulrich Spoerlein\nuqs@FreeBSD.org\n2010/01/28"] vanhu [label="Yvan Vanhullebus\nvanhu@FreeBSD.org\n2008/07/21"] From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 01:35:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DDF1E14; Wed, 22 Jan 2014 01:35:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 193E71E64; Wed, 22 Jan 2014 01:35:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M1ZUZr077613; Wed, 22 Jan 2014 01:35:30 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M1ZUUY077612; Wed, 22 Jan 2014 01:35:30 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401220135.s0M1ZUUY077612@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 22 Jan 2014 01:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260998 - stable/10/gnu/lib/libgcc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:35:31 -0000 Author: pfg Date: Wed Jan 22 01:35:30 2014 New Revision: 260998 URL: http://svnweb.freebsd.org/changeset/base/260998 Log: MFC r260874: gcc: fix libgcc by adding the bswap builtins for all platforms. This change was missing from r258428 which attempted to add the bswap builtins to gcc. The change is also missing from the patch in gnu/155309. Found by: marcel Modified: stable/10/gnu/lib/libgcc/Makefile Modified: stable/10/gnu/lib/libgcc/Makefile ============================================================================== --- stable/10/gnu/lib/libgcc/Makefile Tue Jan 21 23:45:31 2014 (r260997) +++ stable/10/gnu/lib/libgcc/Makefile Wed Jan 22 01:35:30 2014 (r260998) @@ -34,9 +34,9 @@ OBJS= # added to below in various ways #--------------------------------------------------------------------------- # -# When upgrading GCC, get the following defintions straight from Makefile.in -# # Library members defined in libgcc2.c. +# When upgrading GCC, obtain the following list from mklibgcc.in +# LIB2FUNCS= _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \ _cmpdi2 _ucmpdi2 \ _enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3 \ @@ -44,7 +44,7 @@ LIB2FUNCS= _muldi3 _negdi2 _lshrdi3 _ash _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab \ _popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \ _powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 \ - _divxc3 _divtc3 + _divxc3 _divtc3 _bswapsi2 _bswapdi2 .if ${COMPILER_TYPE} != "clang" || ${TARGET_CPUARCH} != "arm" LIB2FUNCS+= _clear_cache .endif From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 01:56:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DD68376; Wed, 22 Jan 2014 01:56:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 49F511FA4; Wed, 22 Jan 2014 01:56:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M1uol3085369; Wed, 22 Jan 2014 01:56:50 GMT (envelope-from tychon@svn.freebsd.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M1uoPB085368; Wed, 22 Jan 2014 01:56:50 GMT (envelope-from tychon@svn.freebsd.org) Message-Id: <201401220156.s0M1uoPB085368@svn.freebsd.org> From: Tycho Nightingale Date: Wed, 22 Jan 2014 01:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260999 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:56:50 -0000 Author: tychon Date: Wed Jan 22 01:56:49 2014 New Revision: 260999 URL: http://svnweb.freebsd.org/changeset/base/260999 Log: Increase the block-layer backend maximum number of requests to match the AHCI command queue depth. This allows a slew of commands issued by a Linux guest to be absorbed without error. Approved by: grehan (co-mentor) Modified: head/usr.sbin/bhyve/block_if.c Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Wed Jan 22 01:35:30 2014 (r260998) +++ head/usr.sbin/bhyve/block_if.c Wed Jan 22 01:56:49 2014 (r260999) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #define BLOCKIF_SIG 0xb109b109 -#define BLOCKIF_MAXREQ 16 +#define BLOCKIF_MAXREQ 32 enum blockop { BOP_READ, From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 01:57:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D48B4BA; Wed, 22 Jan 2014 01:57:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 797091FAF; Wed, 22 Jan 2014 01:57:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M1vrOv085516; Wed, 22 Jan 2014 01:57:53 GMT (envelope-from tychon@svn.freebsd.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M1vrqt085515; Wed, 22 Jan 2014 01:57:53 GMT (envelope-from tychon@svn.freebsd.org) Message-Id: <201401220157.s0M1vrqt085515@svn.freebsd.org> From: Tycho Nightingale Date: Wed, 22 Jan 2014 01:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261000 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:57:53 -0000 Author: tychon Date: Wed Jan 22 01:57:52 2014 New Revision: 261000 URL: http://svnweb.freebsd.org/changeset/base/261000 Log: Fix issue with stale fields from a recycled request pulled off the freelist. Approved by: grehan (co-mentor) Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Wed Jan 22 01:56:49 2014 (r260999) +++ head/usr.sbin/bhyve/pci_ahci.c Wed Jan 22 01:57:52 2014 (r261000) @@ -497,6 +497,8 @@ ahci_handle_flush(struct ahci_port *p, i aior->cfis = cfis; aior->slot = slot; aior->len = 0; + aior->done = 0; + aior->prdtl = 0; breq = &aior->io_req; err = blockif_flush(p->bctx, breq); From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 04:03:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22425780; Wed, 22 Jan 2014 04:03:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E94F1979; Wed, 22 Jan 2014 04:03:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M43BHw036094; Wed, 22 Jan 2014 04:03:11 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M43B9M036090; Wed, 22 Jan 2014 04:03:11 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201401220403.s0M43B9M036090@svn.freebsd.org> From: Neel Natu Date: Wed, 22 Jan 2014 04:03:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261001 - in head/sys/amd64/vmm: . intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 04:03:12 -0000 Author: neel Date: Wed Jan 22 04:03:11 2014 New Revision: 261001 URL: http://svnweb.freebsd.org/changeset/base/261001 Log: Handle a VM-exit due to a NMI properly by vectoring to the host's NMI handler via a software interrupt. This is safe to do because the logical processor is already cognizant of the NMI and further NMIs are blocked until the host's NMI handler executes "iret". Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm_stat.c head/sys/amd64/vmm/vmm_stat.h Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Wed Jan 22 01:57:52 2014 (r261000) +++ head/sys/amd64/vmm/intel/vmx.c Wed Jan 22 04:03:11 2014 (r261001) @@ -1491,6 +1491,7 @@ vmx_exit_process(struct vmx *vmx, int vc bool retu; CTASSERT((PINBASED_CTLS_ONE_SETTING & PINBASED_VIRTUAL_NMI) != 0); + CTASSERT((PINBASED_CTLS_ONE_SETTING & PINBASED_NMI_EXITING) != 0); handled = 0; vmxctx = &vmx->ctx[vcpu]; @@ -1643,9 +1644,11 @@ vmx_exit_process(struct vmx *vmx, int vc handled = vmx_handle_cpuid(vmx->vm, vcpu, vmxctx); break; case EXIT_REASON_EXCEPTION: + vmm_stat_incr(vmx->vm, vcpu, VMEXIT_EXCEPTION, 1); intr_info = vmcs_read(VMCS_EXIT_INTR_INFO); KASSERT((intr_info & VMCS_INTR_VALID) != 0, ("VM exit interruption info invalid: %#x", intr_info)); + /* * If Virtual NMIs control is 1 and the VM-exit is due to a * fault encountered during the execution of IRET then we must @@ -1658,6 +1661,21 @@ vmx_exit_process(struct vmx *vmx, int vc (intr_info & 0xff) != IDT_DF && (intr_info & EXIT_QUAL_NMIUDTI) != 0) vmx_restore_nmi_blocking(vmx, vcpu); + + /* + * If the NMI-exiting VM execution control is set to '1' + * then an NMI in non-root operation causes a VM-exit. + * NMI blocking is in effect for this logical processor so + * it is sufficient to simply vector to the NMI handler via + * a software interrupt. + */ + if ((intr_info & VMCS_INTR_T_MASK) == VMCS_INTR_T_NMI) { + KASSERT((intr_info & 0xff) == IDT_NMI, ("VM exit due " + "to NMI has invalid vector: %#x", intr_info)); + VCPU_CTR0(vmx->vm, vcpu, "Vectoring to NMI handler"); + __asm __volatile("int $2"); + return (1); + } break; case EXIT_REASON_EPT_FAULT: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_EPT_FAULT, 1); @@ -1728,6 +1746,8 @@ vmx_exit_process(struct vmx *vmx, int vc */ vmexit->exitcode = VM_EXITCODE_VMX; vmexit->u.vmx.status = VM_SUCCESS; + vmexit->u.vmx.inst_type = 0; + vmexit->u.vmx.inst_error = 0; } else { /* * The exitcode and collateral have been populated. Modified: head/sys/amd64/vmm/vmm_stat.c ============================================================================== --- head/sys/amd64/vmm/vmm_stat.c Wed Jan 22 01:57:52 2014 (r261000) +++ head/sys/amd64/vmm/vmm_stat.c Wed Jan 22 04:03:11 2014 (r261001) @@ -151,3 +151,4 @@ VMM_STAT(VMEXIT_UNKNOWN, "number of vm e VMM_STAT(VMEXIT_ASTPENDING, "number of times astpending at exit"); VMM_STAT(VMEXIT_USERSPACE, "number of vm exits handled in userspace"); VMM_STAT(VMEXIT_RENDEZVOUS, "number of times rendezvous pending at exit"); +VMM_STAT(VMEXIT_EXCEPTION, "number of vm exits due to exceptions"); Modified: head/sys/amd64/vmm/vmm_stat.h ============================================================================== --- head/sys/amd64/vmm/vmm_stat.h Wed Jan 22 01:57:52 2014 (r261000) +++ head/sys/amd64/vmm/vmm_stat.h Wed Jan 22 04:03:11 2014 (r261001) @@ -121,4 +121,5 @@ VMM_STAT_DECLARE(VMEXIT_UNKNOWN); VMM_STAT_DECLARE(VMEXIT_ASTPENDING); VMM_STAT_DECLARE(VMEXIT_USERSPACE); VMM_STAT_DECLARE(VMEXIT_RENDEZVOUS); +VMM_STAT_DECLARE(VMEXIT_EXCEPTION); #endif From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 06:27:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11704FC; Wed, 22 Jan 2014 06:27:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F097D1330; Wed, 22 Jan 2014 06:27:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M6R2jl088826; Wed, 22 Jan 2014 06:27:02 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M6R2d0088825; Wed, 22 Jan 2014 06:27:02 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201401220627.s0M6R2d0088825@svn.freebsd.org> From: Justin Hibbits Date: Wed, 22 Jan 2014 06:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261002 - stable/10/usr.bin/elfdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 06:27:03 -0000 Author: jhibbits Date: Wed Jan 22 06:27:02 2014 New Revision: 261002 URL: http://svnweb.freebsd.org/changeset/base/261002 Log: MFC r260621 Add missing EM_PPC64 to e_machine header display. Modified: stable/10/usr.bin/elfdump/elfdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/elfdump/elfdump.c ============================================================================== --- stable/10/usr.bin/elfdump/elfdump.c Wed Jan 22 04:03:11 2014 (r261001) +++ stable/10/usr.bin/elfdump/elfdump.c Wed Jan 22 06:27:02 2014 (r261002) @@ -255,6 +255,7 @@ e_machines(u_int mach) case EM_860: return "EM_860"; case EM_MIPS: return "EM_MIPS"; case EM_PPC: return "EM_PPC"; + case EM_PPC64: return "EM_PPC64"; case EM_ARM: return "EM_ARM"; case EM_ALPHA: return "EM_ALPHA (legacy)"; case EM_SPARCV9:return "EM_SPARCV9"; From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 07:22:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 932C3BFF; Wed, 22 Jan 2014 07:22:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F7541791; Wed, 22 Jan 2014 07:22:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M7MhZK011412; Wed, 22 Jan 2014 07:22:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M7MhxT011410; Wed, 22 Jan 2014 07:22:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401220722.s0M7MhxT011410@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 22 Jan 2014 07:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261003 - in head/sys/dev/usb: . quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:22:43 -0000 Author: hselasky Date: Wed Jan 22 07:22:42 2014 New Revision: 261003 URL: http://svnweb.freebsd.org/changeset/base/261003 Log: Add new quirk. PR: usb/185968 MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Wed Jan 22 06:27:02 2014 (r261002) +++ head/sys/dev/usb/quirk/usb_quirk.c Wed Jan 22 07:22:42 2014 (r261003) @@ -286,6 +286,7 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(NETCHIP, CLIK_40, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_INQUIRY), + USB_QUIRK(NETCHIP, POCKETBOOK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(NIKON, D300, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(OLYMPUS, C1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Jan 22 06:27:02 2014 (r261002) +++ head/sys/dev/usb/usbdevs Wed Jan 22 07:22:42 2014 (r261003) @@ -3115,6 +3115,7 @@ product NETCHIP TURBOCONNECT 0x1080 Turb product NETCHIP CLIK_40 0xa140 USB Clik! 40 product NETCHIP GADGETZERO 0xa4a0 Linux Gadget Zero product NETCHIP ETHERNETGADGET 0xa4a2 Linux Ethernet/RNDIS gadget on pxa210/25x/26x +product NETCHIP POCKETBOOK 0xa4a5 PocketBook /* Netgear products */ product NETGEAR EA101 0x1001 Ethernet From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 07:32:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95999F66; Wed, 22 Jan 2014 07:32:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 81590186A; Wed, 22 Jan 2014 07:32:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M7WuKU015068; Wed, 22 Jan 2014 07:32:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M7WuJL015067; Wed, 22 Jan 2014 07:32:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401220732.s0M7WuJL015067@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 22 Jan 2014 07:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261004 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:32:56 -0000 Author: hselasky Date: Wed Jan 22 07:32:55 2014 New Revision: 261004 URL: http://svnweb.freebsd.org/changeset/base/261004 Log: Wait a bit more before we free any EHCI DMA descriptors. Some USB controllers need more time than others. MFC after: 1 week Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Wed Jan 22 07:22:42 2014 (r261003) +++ head/sys/dev/usb/controller/ehci.c Wed Jan 22 07:32:55 2014 (r261004) @@ -3781,7 +3781,7 @@ ehci_get_dma_delay(struct usb_device *ud * Wait until the hardware has finished any possible use of * the transfer descriptor(s) and QH */ - *pus = (188); /* microseconds */ + *pus = (1125); /* microseconds */ } static void From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 07:48:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 876F6370; Wed, 22 Jan 2014 07:48:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 59C28194C; Wed, 22 Jan 2014 07:48:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M7meW5019377; Wed, 22 Jan 2014 07:48:40 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M7md9R019374; Wed, 22 Jan 2014 07:48:39 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401220748.s0M7md9R019374@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 22 Jan 2014 07:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261005 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:48:40 -0000 Author: hselasky Date: Wed Jan 22 07:48:39 2014 New Revision: 261005 URL: http://svnweb.freebsd.org/changeset/base/261005 Log: Ensure that the DMA delay does not get rounded down to zero ticks when a timeout value of a single tick is given. With FreeBSD-10 and newer the current system time is used as a starting point, and the minimum callout time of a single tick will be guaranteed. This patch mostly affect the DMA delay timeouts, which are typically in the range from 0.125 to 2ms. MFC after: 1 week Modified: head/sys/dev/usb/usb_freebsd.h head/sys/dev/usb/usb_freebsd_loader.h head/sys/dev/usb/usb_transfer.c Modified: head/sys/dev/usb/usb_freebsd.h ============================================================================== --- head/sys/dev/usb/usb_freebsd.h Wed Jan 22 07:32:55 2014 (r261004) +++ head/sys/dev/usb/usb_freebsd.h Wed Jan 22 07:48:39 2014 (r261005) @@ -50,6 +50,13 @@ #define USB_HAVE_FIXED_CONFIG 0 #define USB_HAVE_FIXED_PORT 0 +/* define zero ticks callout value */ +#if (__FreeBSD_version >= 1000029) +#define USB_CALLOUT_ZERO_TICKS 0 +#else +#define USB_CALLOUT_ZERO_TICKS 1 +#endif + #define USB_TD_GET_PROC(td) (td)->td_proc #define USB_PROC_GET_GID(td) (td)->p_pgid Modified: head/sys/dev/usb/usb_freebsd_loader.h ============================================================================== --- head/sys/dev/usb/usb_freebsd_loader.h Wed Jan 22 07:32:55 2014 (r261004) +++ head/sys/dev/usb/usb_freebsd_loader.h Wed Jan 22 07:48:39 2014 (r261005) @@ -50,6 +50,8 @@ #define USB_HAVE_FIXED_CONFIG 0 #define USB_HAVE_FIXED_PORT 0 +#define USB_CALLOUT_ZERO_TICKS 1 + #define USB_TD_GET_PROC(td) (td)->td_proc #define USB_PROC_GET_GID(td) (td)->p_pgid Modified: head/sys/dev/usb/usb_transfer.c ============================================================================== --- head/sys/dev/usb/usb_transfer.c Wed Jan 22 07:32:55 2014 (r261004) +++ head/sys/dev/usb/usb_transfer.c Wed Jan 22 07:48:39 2014 (r261005) @@ -2723,7 +2723,7 @@ usbd_transfer_timeout_ms(struct usb_xfer /* defer delay */ usb_callout_reset(&xfer->timeout_handle, - USB_MS_TO_TICKS(ms), cb, xfer); + USB_MS_TO_TICKS(ms) + USB_CALLOUT_ZERO_TICKS, cb, xfer); } /*------------------------------------------------------------------------* From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 08:02:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A3D5E7D; Wed, 22 Jan 2014 08:02:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3CD601AFA; Wed, 22 Jan 2014 08:02:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M828iB026876; Wed, 22 Jan 2014 08:02:08 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M828gM026875; Wed, 22 Jan 2014 08:02:08 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201401220802.s0M828gM026875@svn.freebsd.org> From: Adrian Chadd Date: Wed, 22 Jan 2014 08:02:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261006 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:02:08 -0000 Author: adrian Date: Wed Jan 22 08:02:07 2014 New Revision: 261006 URL: http://svnweb.freebsd.org/changeset/base/261006 Log: Use the correct bitshift operators for the GPIO definitions. Submitted by: Daan Vreeken MFC after: 1 week Modified: head/sys/mips/atheros/ar724xreg.h Modified: head/sys/mips/atheros/ar724xreg.h ============================================================================== --- head/sys/mips/atheros/ar724xreg.h Wed Jan 22 07:48:39 2014 (r261005) +++ head/sys/mips/atheros/ar724xreg.h Wed Jan 22 08:02:07 2014 (r261006) @@ -87,22 +87,22 @@ #define AR724X_PCI_INTR_MASK 0x180f0050 #define AR724X_PCI_INTR_DEV0 (1 << 14) -#define AR724X_GPIO_FUNC_GE0_MII_CLK_EN (1 >> 19) -#define AR724X_GPIO_FUNC_SPI_EN (1 >> 18) -#define AR724X_GPIO_FUNC_SPI_CS_EN2 (1 >> 14) -#define AR724X_GPIO_FUNC_SPI_CS_EN1 (1 >> 13) -#define AR724X_GPIO_FUNC_CLK_OBS5_EN (1 >> 12) -#define AR724X_GPIO_FUNC_CLK_OBS4_EN (1 >> 11) -#define AR724X_GPIO_FUNC_CLK_OBS3_EN (1 >> 10) -#define AR724X_GPIO_FUNC_CLK_OBS2_EN (1 >> 9) -#define AR724X_GPIO_FUNC_CLK_OBS1_EN (1 >> 8) -#define AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN (1 >> 7) -#define AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN (1 >> 6) -#define AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN (1 >> 5) -#define AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN (1 >> 4) -#define AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN (1 >> 3) -#define AR724X_GPIO_FUNC_UART_RTS_CTS_EN (1 >> 2) -#define AR724X_GPIO_FUNC_UART_EN (1 >> 1) -#define AR724X_GPIO_FUNC_JTAG_DISABLE (1 >> 0) +#define AR724X_GPIO_FUNC_GE0_MII_CLK_EN (1 << 19) +#define AR724X_GPIO_FUNC_SPI_EN (1 << 18) +#define AR724X_GPIO_FUNC_SPI_CS_EN2 (1 << 14) +#define AR724X_GPIO_FUNC_SPI_CS_EN1 (1 << 13) +#define AR724X_GPIO_FUNC_CLK_OBS5_EN (1 << 12) +#define AR724X_GPIO_FUNC_CLK_OBS4_EN (1 << 11) +#define AR724X_GPIO_FUNC_CLK_OBS3_EN (1 << 10) +#define AR724X_GPIO_FUNC_CLK_OBS2_EN (1 << 9) +#define AR724X_GPIO_FUNC_CLK_OBS1_EN (1 << 8) +#define AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN (1 << 7) +#define AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN (1 << 6) +#define AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN (1 << 5) +#define AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN (1 << 4) +#define AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN (1 << 3) +#define AR724X_GPIO_FUNC_UART_RTS_CTS_EN (1 << 2) +#define AR724X_GPIO_FUNC_UART_EN (1 << 1) +#define AR724X_GPIO_FUNC_JTAG_DISABLE (1 << 0) #endif From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 08:04:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3801127; Wed, 22 Jan 2014 08:04:46 +0000 (UTC) Received: from Prakkezator.VEHosting.nl (Prakkezator6.VEHosting.nl [IPv6:2001:1af8:2100:b020::142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7B5C31B2A; Wed, 22 Jan 2014 08:04:46 +0000 (UTC) Received: from [192.168.72.13] (124-54.bbned.dsl.internl.net [92.254.54.124]) (authenticated bits=0) by Prakkezator.VEHosting.nl (8.14.2/8.14.2) with ESMTP id s0M845xT045177; Wed, 22 Jan 2014 09:04:05 +0100 (CET) (envelope-from Daan@vitsch.nl) From: Daan Vreeken Organization: Daan - Vitsch Electronics To: svn-src-all@freebsd.org Subject: Re: svn commit: r261006 - head/sys/mips/atheros Date: Wed, 22 Jan 2014 09:04:41 +0100 User-Agent: KMail/1.9.10 References: <1390377796-2609078393.debd558c7e@bliksem.vehosting.nl> <201401220802.s0M828gM026875@svn.freebsd.org> In-Reply-To: <201401220802.s0M828gM026875@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201401220904.41396.Daan@vitsch.nl> x-ve-auth-version: mi-1.1.7 2011-02-21 - Copyright (c) 2008, 2011 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on Prakkezator.VEHosting.nl Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:04:47 -0000 Hi Adrian, On Wednesday 22 January 2014 09:02:08 Adrian Chadd wrote: > Author: adrian > Date: Wed Jan 22 08:02:07 2014 > New Revision: 261006 > URL: http://svnweb.freebsd.org/changeset/base/261006 > > Log: > Use the correct bitshift operators for the GPIO definitions. > > Submitted by: Daan Vreeken > MFC after: 1 week ... Thanks for the quick commit! Regards, -- Ing. Daan Vreeken Vitsch Electronics http://Vitsch.nl/ http://VitschVPN.nl/ tel: +31-(0)40-7113051 KvK nr: 17174380 -- Machines en netwerken op afstand beheren? Vitsch VPN oplossing! Kijk voor meer informatie op: http://www.VitschVPN.nl/ From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 09:22:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD09D10E; Wed, 22 Jan 2014 09:22:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C867E1275; Wed, 22 Jan 2014 09:22:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M9MdJW058925; Wed, 22 Jan 2014 09:22:39 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M9MdK8058924; Wed, 22 Jan 2014 09:22:39 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401220922.s0M9MdK8058924@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 09:22:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261009 - stable/10/sys/netgraph X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:22:40 -0000 Author: glebius Date: Wed Jan 22 09:22:39 2014 New Revision: 261009 URL: http://svnweb.freebsd.org/changeset/base/261009 Log: Merge 260225: Fix circular math macro. PR: 146082 Modified: stable/10/sys/netgraph/ng_l2tp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netgraph/ng_l2tp.c ============================================================================== --- stable/10/sys/netgraph/ng_l2tp.c Wed Jan 22 08:33:32 2014 (r261008) +++ stable/10/sys/netgraph/ng_l2tp.c Wed Jan 22 09:22:39 2014 (r261009) @@ -98,7 +98,7 @@ static MALLOC_DEFINE(M_NETGRAPH_L2TP, "n #define L2TP_ENABLE_DSEQ 1 /* enable data seq # */ /* Compare sequence numbers using circular math */ -#define L2TP_SEQ_DIFF(x, y) ((int)((int16_t)(x) - (int16_t)(y))) +#define L2TP_SEQ_DIFF(x, y) ((int16_t)((x) - (y))) #define SESSHASHSIZE 0x0020 #define SESSHASH(x) (((x) ^ ((x) >> 8)) & (SESSHASHSIZE - 1)) From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 09:23:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6557320; Wed, 22 Jan 2014 09:23:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C1E381281; Wed, 22 Jan 2014 09:23:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M9NUbu059163; Wed, 22 Jan 2014 09:23:30 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M9NUvH059162; Wed, 22 Jan 2014 09:23:30 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401220923.s0M9NUvH059162@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 09:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261010 - stable/9/sys/netgraph X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:23:30 -0000 Author: glebius Date: Wed Jan 22 09:23:30 2014 New Revision: 261010 URL: http://svnweb.freebsd.org/changeset/base/261010 Log: Merge 260225: Fix circular math macro. PR: 146082 Modified: stable/9/sys/netgraph/ng_l2tp.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netgraph/ng_l2tp.c ============================================================================== --- stable/9/sys/netgraph/ng_l2tp.c Wed Jan 22 09:22:39 2014 (r261009) +++ stable/9/sys/netgraph/ng_l2tp.c Wed Jan 22 09:23:30 2014 (r261010) @@ -98,7 +98,7 @@ static MALLOC_DEFINE(M_NETGRAPH_L2TP, "n #define L2TP_ENABLE_DSEQ 1 /* enable data seq # */ /* Compare sequence numbers using circular math */ -#define L2TP_SEQ_DIFF(x, y) ((int)((int16_t)(x) - (int16_t)(y))) +#define L2TP_SEQ_DIFF(x, y) ((int16_t)((x) - (y))) #define SESSHASHSIZE 0x0020 #define SESSHASH(x) (((x) ^ ((x) >> 8)) & (SESSHASHSIZE - 1)) From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 09:57:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1892FD51; Wed, 22 Jan 2014 09:57:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EBB1E1567; Wed, 22 Jan 2014 09:57:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M9vQQW070901; Wed, 22 Jan 2014 09:57:26 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M9vQfY070899; Wed, 22 Jan 2014 09:57:26 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401220957.s0M9vQfY070899@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 22 Jan 2014 09:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261014 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:57:27 -0000 Author: hselasky Date: Wed Jan 22 09:57:26 2014 New Revision: 261014 URL: http://svnweb.freebsd.org/changeset/base/261014 Log: - Fix some non-portable code with regard to endianness. Don't use memmove(). - Fix a range check for maximum transmit length. - Fix read from missing field when transmitting data. MFC after: 2 weeks Modified: head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runvar.h Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Jan 22 09:30:36 2014 (r261013) +++ head/sys/dev/usb/wlan/if_run.c Wed Jan 22 09:57:26 2014 (r261014) @@ -1356,11 +1356,22 @@ run_efuse_read(struct run_softc *sc, uin uint16_t reg; int error, ntries; + switch (count) { + case 1: + *val = 0xff; /* address not found */ + break; + case 2: + *val = 0xffff; /* address not found */ + addr *= 2; + break; + default: + *val = 0xffff; /* address not found */ + return (USB_ERR_INVAL); + } + if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) return (error); - if (count == 2) - addr *= 2; /*- * Read one 16-byte block into registers EFUSE_DATA[0-3]: * DATA0: F E D C @@ -1381,21 +1392,21 @@ run_efuse_read(struct run_softc *sc, uin if (ntries == 100) return (ETIMEDOUT); - if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) { - *val = 0xffff; /* address not found */ + if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) return (0); - } + /* determine to which 32-bit register our 16-bit word belongs */ reg = RT3070_EFUSE_DATA3 - (addr & 0xc); if ((error = run_read(sc, reg, &tmp)) != 0) return (error); - if (count == 2) - *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; - else { - tmp >>= (8 *(addr & 0x3)); - memmove(val, &tmp, sizeof(*val)); - } + /* get correct bytes */ + *val = (uint16_t)(tmp >> (8 * (addr & 0x3))); + + /* mask for byte read, if any */ + if (count == 1) + *val &= 0xff; + return (0); } @@ -3083,10 +3094,9 @@ tr_setup: STAILQ_REMOVE_HEAD(&pq->tx_qh, next); m = data->m; - size = (sc->mac_ver == 0x5592) ? - RUN_MAX_TXSZ + sizeof(uint32_t) : RUN_MAX_TXSZ; - if ((m->m_pkthdr.len + - sizeof(data->desc) + 3 + 8) > size) { + size = (sc->mac_ver == 0x5592) ? + sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc); + if ((m->m_pkthdr.len + size + 3 + 8) > RUN_MAX_TXSZ) { DPRINTF("data overflow, %u bytes\n", m->m_pkthdr.len); @@ -3098,8 +3108,6 @@ tr_setup: } pc = usbd_xfer_get_frame(xfer, 0); - size = (sc->mac_ver == 0x5592) ? - sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc); usbd_copy_in(pc, 0, &data->desc, size); usbd_m_copy_in(pc, size, m, 0, m->m_pkthdr.len); size += m->m_pkthdr.len; Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Wed Jan 22 09:30:36 2014 (r261013) +++ head/sys/dev/usb/wlan/if_runvar.h Wed Jan 22 09:57:26 2014 (r261014) @@ -89,6 +89,7 @@ struct run_tx_data { uint32_t align[0]; /* dummy field */ uint8_t desc[sizeof(struct rt2870_txd) + sizeof(struct rt2860_txwi)]; + uint8_t desc_extra[4]; /* used by v5592 */ uint8_t ridx; }; STAILQ_HEAD(run_tx_data_head, run_tx_data); From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 09:59:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43A03EC4; Wed, 22 Jan 2014 09:59:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2E9AE157B; Wed, 22 Jan 2014 09:59:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0M9xohq071199; Wed, 22 Jan 2014 09:59:50 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0M9xoux071198; Wed, 22 Jan 2014 09:59:50 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401220959.s0M9xoux071198@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 09:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261015 - stable/10/share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:59:50 -0000 Author: glebius Date: Wed Jan 22 09:59:49 2014 New Revision: 261015 URL: http://svnweb.freebsd.org/changeset/base/261015 Log: Merge 257643: Document RB_FOREACH_SAFE() and RB_FOREACH_REVERSE_SAFE(). Modified: stable/10/share/man/man3/tree.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man3/tree.3 ============================================================================== --- stable/10/share/man/man3/tree.3 Wed Jan 22 09:57:26 2014 (r261014) +++ stable/10/share/man/man3/tree.3 Wed Jan 22 09:59:49 2014 (r261015) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 27, 2007 +.Dd November 4, 2013 .Dt TREE 3 .Os .Sh NAME @@ -70,7 +70,9 @@ .Nm RB_RIGHT , .Nm RB_PARENT , .Nm RB_FOREACH , +.Nm RB_FOREACH_SAFE , .Nm RB_FOREACH_REVERSE , +.Nm RB_FOREACH_REVERSE_SAFE , .Nm RB_INIT , .Nm RB_INSERT , .Nm RB_REMOVE @@ -135,7 +137,9 @@ .Ft "struct TYPE *" .Fn RB_PARENT "struct TYPE *elm" "RB_ENTRY NAME" .Fn RB_FOREACH VARNAME NAME "RB_HEAD *head" +.Fn RB_FOREACH_SAFE "VARNAME" "NAME" "RB_HEAD *head" "TEMP_VARNAME" .Fn RB_FOREACH_REVERSE VARNAME NAME "RB_HEAD *head" +.Fn RB_FOREACH_REVERSE_SAFE "VARNAME" "NAME" "RB_HEAD *head" "TEMP_VARNAME" .Ft void .Fn RB_INIT "RB_HEAD *head" .Ft "struct TYPE *" @@ -454,6 +458,18 @@ macro: .Fn RB_FOREACH np NAME head .Ed .Pp +The macros +.Fn RB_FOREACH_SAFE +and +.Fn RB_FOREACH_REVERSE_SAFE +traverse the tree referenced by head +in a forward or reverse direction respectively, +assigning each element in turn to np. +However, unlike their unsafe counterparts, +they permit both the removal of np +as well as freeing it from within the loop safely +without interfering with the traversal. +.Pp The .Fn RB_EMPTY macro should be used to check whether a red-black tree is empty. From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 10:01:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCED26B; Wed, 22 Jan 2014 10:01:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B914C158D; Wed, 22 Jan 2014 10:01:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MA1Dtv072108; Wed, 22 Jan 2014 10:01:13 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MA1DY3072107; Wed, 22 Jan 2014 10:01:13 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221001.s0MA1DY3072107@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 10:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261016 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:01:13 -0000 Author: glebius Date: Wed Jan 22 10:01:13 2014 New Revision: 261016 URL: http://svnweb.freebsd.org/changeset/base/261016 Log: Merge r257686: Add required kernel option. Modified: stable/10/share/man/man4/natm.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/natm.4 ============================================================================== --- stable/10/share/man/man4/natm.4 Wed Jan 22 09:59:49 2014 (r261015) +++ stable/10/share/man/man4/natm.4 Wed Jan 22 10:01:13 2014 (r261016) @@ -14,6 +14,7 @@ ATM software comes with a which provides socket level access to AAL0 and AAL5 virtual circuits. To enable this protocol layer, add .Dl options NATM +.Dl device atm to your kernel configuration file and re-make the kernel (do not forget to do .Dq make clean ) . From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 10:08:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54CEB366; Wed, 22 Jan 2014 10:08:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 26DF81627; Wed, 22 Jan 2014 10:08:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MA8Ykj075482; Wed, 22 Jan 2014 10:08:34 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MA8XJ6075479; Wed, 22 Jan 2014 10:08:33 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221008.s0MA8XJ6075479@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 10:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261017 - in stable/10: share/man/man4 sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:08:34 -0000 Author: glebius Date: Wed Jan 22 10:08:33 2014 New Revision: 261017 URL: http://svnweb.freebsd.org/changeset/base/261017 Log: Merge r257846: Make TCP_KEEP* socket options readable. At least PostgreSQL wants to read the values. Modified: stable/10/share/man/man4/tcp.4 stable/10/sys/netinet/tcp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/tcp.4 ============================================================================== --- stable/10/share/man/man4/tcp.4 Wed Jan 22 10:01:13 2014 (r261016) +++ stable/10/share/man/man4/tcp.4 Wed Jan 22 10:08:33 2014 (r261017) @@ -38,7 +38,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd March 7, 2012 +.Dd November 8, 2013 .Dt TCP 4 .Os .Sh NAME @@ -48,6 +48,7 @@ .In sys/types.h .In sys/socket.h .In netinet/in.h +.In netinet/tcp.h .Ft int .Fn socket AF_INET SOCK_STREAM 0 .Sh DESCRIPTION @@ -147,7 +148,7 @@ See .Xr mod_cc 4 for details. .It Dv TCP_KEEPINIT -This write-only +This .Xr setsockopt 2 option accepts a per-socket timeout argument of .Vt "u_int" @@ -160,7 +161,7 @@ in the .Sx MIB Variables section further down. .It Dv TCP_KEEPIDLE -This write-only +This .Xr setsockopt 2 option accepts an argument of .Vt "u_int" @@ -176,7 +177,7 @@ in the .Sx MIB Variables section further down. .It Dv TCP_KEEPINTVL -This write-only +This .Xr setsockopt 2 option accepts an argument of .Vt "u_int" @@ -191,7 +192,7 @@ in the .Sx MIB Variables section further down. .It Dv TCP_KEEPCNT -This write-only +This .Xr setsockopt 2 option accepts an argument of .Vt "u_int" Modified: stable/10/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/10/sys/netinet/tcp_usrreq.c Wed Jan 22 10:01:13 2014 (r261016) +++ stable/10/sys/netinet/tcp_usrreq.c Wed Jan 22 10:08:33 2014 (r261017) @@ -1584,6 +1584,27 @@ unlock_and_done: INP_WUNLOCK(inp); error = sooptcopyout(sopt, buf, TCP_CA_NAME_MAX); break; + case TCP_KEEPIDLE: + case TCP_KEEPINTVL: + case TCP_KEEPINIT: + case TCP_KEEPCNT: + switch (sopt->sopt_name) { + case TCP_KEEPIDLE: + ui = tp->t_keepidle / hz; + break; + case TCP_KEEPINTVL: + ui = tp->t_keepintvl / hz; + break; + case TCP_KEEPINIT: + ui = tp->t_keepinit / hz; + break; + case TCP_KEEPCNT: + ui = tp->t_keepcnt; + break; + } + INP_WUNLOCK(inp); + error = sooptcopyout(sopt, &ui, sizeof(ui)); + break; default: INP_WUNLOCK(inp); error = ENOPROTOOPT; From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 10:18:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD7CE7DB; Wed, 22 Jan 2014 10:18:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BC7F11715; Wed, 22 Jan 2014 10:18:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MAIQ10079496; Wed, 22 Jan 2014 10:18:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MAIQPh079493; Wed, 22 Jan 2014 10:18:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221018.s0MAIQPh079493@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 10:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261018 - in stable/10/sys: net netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:18:26 -0000 Author: glebius Date: Wed Jan 22 10:18:25 2014 New Revision: 261018 URL: http://svnweb.freebsd.org/changeset/base/261018 Log: Merge several fixlets from head: r257619: Remove unused PFTM_UNTIL_PACKET const. r257620: Code logic of handling PFTM_PURGE into pf_find_state(). r258475: Don't compare unsigned <= 0. r258477: Fix off by ones when scanning source nodes hash. Modified: stable/10/sys/net/pfvar.h stable/10/sys/netpfil/pf/pf.c stable/10/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/pfvar.h ============================================================================== --- stable/10/sys/net/pfvar.h Wed Jan 22 10:08:33 2014 (r261017) +++ stable/10/sys/net/pfvar.h Wed Jan 22 10:18:25 2014 (r261018) @@ -78,8 +78,7 @@ enum { PFTM_TCP_FIRST_PACKET, PFTM_TCP_O PFTM_OTHER_FIRST_PACKET, PFTM_OTHER_SINGLE, PFTM_OTHER_MULTIPLE, PFTM_FRAG, PFTM_INTERVAL, PFTM_ADAPTIVE_START, PFTM_ADAPTIVE_END, PFTM_SRC_NODE, - PFTM_TS_DIFF, PFTM_MAX, PFTM_PURGE, PFTM_UNLINKED, - PFTM_UNTIL_PACKET }; + PFTM_TS_DIFF, PFTM_MAX, PFTM_PURGE, PFTM_UNLINKED }; /* PFTM default values */ #define PFTM_TCP_FIRST_PACKET_VAL 120 /* First TCP packet */ Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Wed Jan 22 10:08:33 2014 (r261017) +++ stable/10/sys/netpfil/pf/pf.c Wed Jan 22 10:18:25 2014 (r261018) @@ -310,7 +310,7 @@ VNET_DEFINE(struct pf_limit, pf_limits[P #define STATE_LOOKUP(i, k, d, s, pd) \ do { \ (s) = pf_find_state((i), (k), (d)); \ - if ((s) == NULL || (s)->timeout == PFTM_PURGE) \ + if ((s) == NULL) \ return (PF_DROP); \ if (PACKET_LOOPED(pd)) \ return (PF_PASS); \ @@ -1222,11 +1222,11 @@ pf_find_state(struct pfi_kif *kif, struc if (s->kif == V_pfi_all || s->kif == kif) { PF_STATE_LOCK(s); PF_HASHROW_UNLOCK(kh); - if (s->timeout == PFTM_UNLINKED) { + if (s->timeout >= PFTM_MAX) { /* - * State is being processed - * by pf_unlink_state() in - * an other thread. + * State is either being processed by + * pf_unlink_state() in an other thread, or + * is scheduled for immediate expiry. */ PF_STATE_UNLOCK(s); return (NULL); @@ -1427,8 +1427,6 @@ pf_state_expires(const struct pf_state * /* handle all PFTM_* > PFTM_MAX here */ if (state->timeout == PFTM_PURGE) return (time_uptime); - if (state->timeout == PFTM_UNTIL_PACKET) - return (0); KASSERT(state->timeout != PFTM_UNLINKED, ("pf_state_expires: timeout == PFTM_UNLINKED")); KASSERT((state->timeout < PFTM_MAX), @@ -1465,7 +1463,7 @@ pf_purge_expired_src_nodes() for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH_SAFE(cur, &sh->nodes, entry, next) - if (cur->states <= 0 && cur->expire <= time_uptime) { + if (cur->states == 0 && cur->expire <= time_uptime) { if (cur->rule.ptr != NULL) cur->rule.ptr->src_nodes--; LIST_REMOVE(cur, entry); @@ -1486,7 +1484,7 @@ pf_src_tree_remove_state(struct pf_state if (s->src_node != NULL) { if (s->src.tcp_est) --s->src_node->conn; - if (--s->src_node->states <= 0) { + if (--s->src_node->states == 0) { timeout = s->rule.ptr->timeout[PFTM_SRC_NODE]; if (!timeout) timeout = @@ -1495,7 +1493,7 @@ pf_src_tree_remove_state(struct pf_state } } if (s->nat_src_node != s->src_node && s->nat_src_node != NULL) { - if (--s->nat_src_node->states <= 0) { + if (--s->nat_src_node->states == 0) { timeout = s->rule.ptr->timeout[PFTM_SRC_NODE]; if (!timeout) timeout = Modified: stable/10/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/10/sys/netpfil/pf/pf_ioctl.c Wed Jan 22 10:08:33 2014 (r261017) +++ stable/10/sys/netpfil/pf/pf_ioctl.c Wed Jan 22 10:18:25 2014 (r261018) @@ -1682,8 +1682,7 @@ relock_DIOCKILLSTATES: struct pfioc_state *ps = (struct pfioc_state *)addr; struct pfsync_state *sp = &ps->state; - if (sp->timeout >= PFTM_MAX && - sp->timeout != PFTM_UNTIL_PACKET) { + if (sp->timeout >= PFTM_MAX) { error = EINVAL; break; } @@ -3078,7 +3077,7 @@ DIOCCHANGEADDR_error: uint32_t i, nr = 0; if (psn->psn_len == 0) { - for (i = 0, sh = V_pf_srchash; i < V_pf_srchashmask; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH(n, &sh->nodes, entry) @@ -3090,7 +3089,7 @@ DIOCCHANGEADDR_error: } p = pstore = malloc(psn->psn_len, M_TEMP, M_WAITOK); - for (i = 0, sh = V_pf_srchash; i < V_pf_srchashmask; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH(n, &sh->nodes, entry) { @@ -3382,7 +3381,7 @@ pf_clear_srcnodes(struct pf_src_node *n) if (n == NULL) { struct pf_srchash *sh; - for (i = 0, sh = V_pf_srchash; i < V_pf_srchashmask; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH(n, &sh->nodes, entry) { From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 10:29:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9BFEB90; Wed, 22 Jan 2014 10:29:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB8BE181D; Wed, 22 Jan 2014 10:29:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MATGoq083356; Wed, 22 Jan 2014 10:29:16 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MATGjn083352; Wed, 22 Jan 2014 10:29:16 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221029.s0MATGjn083352@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 10:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261019 - in stable/10/sys: net netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:29:16 -0000 Author: glebius Date: Wed Jan 22 10:29:15 2014 New Revision: 261019 URL: http://svnweb.freebsd.org/changeset/base/261019 Log: Merge r258478, r258479, r258480, r259719: fixes related to mass source nodes removal. PR: 176763 Modified: stable/10/sys/net/pfvar.h stable/10/sys/netpfil/pf/pf.c stable/10/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/pfvar.h ============================================================================== --- stable/10/sys/net/pfvar.h Wed Jan 22 10:18:25 2014 (r261018) +++ stable/10/sys/net/pfvar.h Wed Jan 22 10:29:15 2014 (r261019) @@ -1643,8 +1643,9 @@ struct pf_ifspeed { #define DIOCGIFSPEED _IOWR('D', 92, struct pf_ifspeed) #ifdef _KERNEL +LIST_HEAD(pf_src_node_list, pf_src_node); struct pf_srchash { - LIST_HEAD(, pf_src_node) nodes; + struct pf_src_node_list nodes; struct mtx lock; }; @@ -1750,8 +1751,11 @@ pf_release_state(struct pf_state *s) extern struct pf_state *pf_find_state_byid(uint64_t, uint32_t); extern struct pf_state *pf_find_state_all(struct pf_state_key_cmp *, u_int, int *); -struct pf_src_node *pf_find_src_node(struct pf_addr *, struct pf_rule *, - sa_family_t, int); +extern struct pf_src_node *pf_find_src_node(struct pf_addr *, + struct pf_rule *, sa_family_t, int); +extern void pf_unlink_src_node(struct pf_src_node *); +extern void pf_unlink_src_node_locked(struct pf_src_node *); +extern u_int pf_free_src_nodes(struct pf_src_node_list *); extern void pf_print_state(struct pf_state *); extern void pf_print_flags(u_int8_t); extern u_int16_t pf_cksum_fixup(u_int16_t, u_int16_t, u_int16_t, Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Wed Jan 22 10:18:25 2014 (r261018) +++ stable/10/sys/netpfil/pf/pf.c Wed Jan 22 10:29:15 2014 (r261019) @@ -673,20 +673,53 @@ pf_insert_src_node(struct pf_src_node ** return (0); } -static void -pf_remove_src_node(struct pf_src_node *src) +void +pf_unlink_src_node_locked(struct pf_src_node *src) { +#ifdef INVARIANTS struct pf_srchash *sh; sh = &V_pf_srchash[pf_hashsrc(&src->addr, src->af)]; - PF_HASHROW_LOCK(sh); + PF_HASHROW_ASSERT(sh); +#endif LIST_REMOVE(src, entry); - PF_HASHROW_UNLOCK(sh); - + if (src->rule.ptr) + src->rule.ptr->src_nodes--; V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS]++; V_pf_status.src_nodes--; +} - uma_zfree(V_pf_sources_z, src); +void +pf_unlink_src_node(struct pf_src_node *src) +{ + struct pf_srchash *sh; + + sh = &V_pf_srchash[pf_hashsrc(&src->addr, src->af)]; + PF_HASHROW_LOCK(sh); + pf_unlink_src_node_locked(src); + PF_HASHROW_UNLOCK(sh); +} + +static void +pf_free_src_node(struct pf_src_node *sn) +{ + + KASSERT(sn->states == 0, ("%s: %p has refs", __func__, sn)); + uma_zfree(V_pf_sources_z, sn); +} + +u_int +pf_free_src_nodes(struct pf_src_node_list *head) +{ + struct pf_src_node *sn, *tmp; + u_int count = 0; + + LIST_FOREACH_SAFE(sn, head, entry, tmp) { + pf_free_src_node(sn); + count++; + } + + return (count); } /* Data storage structures initialization. */ @@ -1456,24 +1489,24 @@ pf_state_expires(const struct pf_state * void pf_purge_expired_src_nodes() { + struct pf_src_node_list freelist; struct pf_srchash *sh; struct pf_src_node *cur, *next; int i; + LIST_INIT(&freelist); for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH_SAFE(cur, &sh->nodes, entry, next) if (cur->states == 0 && cur->expire <= time_uptime) { - if (cur->rule.ptr != NULL) - cur->rule.ptr->src_nodes--; - LIST_REMOVE(cur, entry); - V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS]++; - V_pf_status.src_nodes--; - uma_zfree(V_pf_sources_z, cur); + pf_unlink_src_node_locked(cur); + LIST_INSERT_HEAD(&freelist, cur, entry); } else if (cur->rule.ptr != NULL) cur->rule.ptr->rule_flag |= PFRULE_REFS; PF_HASHROW_UNLOCK(sh); } + + pf_free_src_nodes(&freelist); } static void @@ -3609,11 +3642,15 @@ csfailed: if (nk != NULL) uma_zfree(V_pf_state_key_z, nk); - if (sn != NULL && sn->states == 0 && sn->expire == 0) - pf_remove_src_node(sn); + if (sn != NULL && sn->states == 0 && sn->expire == 0) { + pf_unlink_src_node(sn); + pf_free_src_node(sn); + } - if (nsn != sn && nsn != NULL && nsn->states == 0 && nsn->expire == 0) - pf_remove_src_node(nsn); + if (nsn != sn && nsn != NULL && nsn->states == 0 && nsn->expire == 0) { + pf_unlink_src_node(nsn); + pf_free_src_node(nsn); + } return (PF_DROP); } Modified: stable/10/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/10/sys/netpfil/pf/pf_ioctl.c Wed Jan 22 10:18:25 2014 (r261018) +++ stable/10/sys/netpfil/pf/pf_ioctl.c Wed Jan 22 10:29:15 2014 (r261019) @@ -151,6 +151,7 @@ struct cdev *pf_dev; static void pf_clear_states(void); static int pf_clear_tables(void); static void pf_clear_srcnodes(struct pf_src_node *); +static void pf_kill_srcnodes(struct pfioc_src_node_kill *); static void pf_tbladdr_copyout(struct pf_addr_wrap *); /* @@ -3139,45 +3140,9 @@ DIOCCHANGEADDR_error: break; } - case DIOCKILLSRCNODES: { - struct pfioc_src_node_kill *psnk = - (struct pfioc_src_node_kill *)addr; - struct pf_srchash *sh; - struct pf_src_node *sn; - u_int i, killed = 0; - - for (i = 0, sh = V_pf_srchash; i < V_pf_srchashmask; - i++, sh++) { - /* - * XXXGL: we don't ever acquire sources hash lock - * but if we ever do, the below call to pf_clear_srcnodes() - * would lead to a LOR. - */ - PF_HASHROW_LOCK(sh); - LIST_FOREACH(sn, &sh->nodes, entry) - if (PF_MATCHA(psnk->psnk_src.neg, - &psnk->psnk_src.addr.v.a.addr, - &psnk->psnk_src.addr.v.a.mask, - &sn->addr, sn->af) && - PF_MATCHA(psnk->psnk_dst.neg, - &psnk->psnk_dst.addr.v.a.addr, - &psnk->psnk_dst.addr.v.a.mask, - &sn->raddr, sn->af)) { - /* Handle state to src_node linkage */ - if (sn->states != 0) - pf_clear_srcnodes(sn); - sn->expire = 1; - killed++; - } - PF_HASHROW_UNLOCK(sh); - } - - if (killed > 0) - pf_purge_expired_src_nodes(); - - psnk->psnk_killed = killed; + case DIOCKILLSRCNODES: + pf_kill_srcnodes((struct pfioc_src_node_kill *)addr); break; - } case DIOCSETHOSTID: { u_int32_t *hostid = (u_int32_t *)addr; @@ -3396,6 +3361,59 @@ pf_clear_srcnodes(struct pf_src_node *n) n->states = 0; } } + +static void +pf_kill_srcnodes(struct pfioc_src_node_kill *psnk) +{ + struct pf_src_node_list kill; + + LIST_INIT(&kill); + for (int i = 0; i <= V_pf_srchashmask; i++) { + struct pf_srchash *sh = &V_pf_srchash[i]; + struct pf_src_node *sn, *tmp; + + PF_HASHROW_LOCK(sh); + LIST_FOREACH_SAFE(sn, &sh->nodes, entry, tmp) + if (PF_MATCHA(psnk->psnk_src.neg, + &psnk->psnk_src.addr.v.a.addr, + &psnk->psnk_src.addr.v.a.mask, + &sn->addr, sn->af) && + PF_MATCHA(psnk->psnk_dst.neg, + &psnk->psnk_dst.addr.v.a.addr, + &psnk->psnk_dst.addr.v.a.mask, + &sn->raddr, sn->af)) { + pf_unlink_src_node_locked(sn); + LIST_INSERT_HEAD(&kill, sn, entry); + sn->expire = 1; + } + PF_HASHROW_UNLOCK(sh); + } + + for (int i = 0; i <= V_pf_hashmask; i++) { + struct pf_idhash *ih = &V_pf_idhash[i]; + struct pf_state *s; + + PF_HASHROW_LOCK(ih); + LIST_FOREACH(s, &ih->states, entry) { + if (s->src_node && s->src_node->expire == 1) { +#ifdef INVARIANTS + s->src_node->states--; +#endif + s->src_node = NULL; + } + if (s->nat_src_node && s->nat_src_node->expire == 1) { +#ifdef INVARIANTS + s->nat_src_node->states--; +#endif + s->nat_src_node = NULL; + } + } + PF_HASHROW_UNLOCK(ih); + } + + psnk->psnk_killed = pf_free_src_nodes(&kill); +} + /* * XXX - Check for version missmatch!!! */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 10:31:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D666DB2; Wed, 22 Jan 2014 10:31:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 280F8189F; Wed, 22 Jan 2014 10:31:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MAVvAa086322; Wed, 22 Jan 2014 10:31:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MAVugn086320; Wed, 22 Jan 2014 10:31:56 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221031.s0MAVugn086320@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 10:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261020 - in stable/10: lib/libnetgraph share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:31:57 -0000 Author: glebius Date: Wed Jan 22 10:31:56 2014 New Revision: 261020 URL: http://svnweb.freebsd.org/changeset/base/261020 Log: Merge r258702: Fix some misinformation in netgraph manual pages. Modified: stable/10/lib/libnetgraph/netgraph.3 stable/10/share/man/man4/netgraph.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libnetgraph/netgraph.3 ============================================================================== --- stable/10/lib/libnetgraph/netgraph.3 Wed Jan 22 10:29:15 2014 (r261019) +++ stable/10/lib/libnetgraph/netgraph.3 Wed Jan 22 10:31:56 2014 (r261020) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: netgraph.3,v 1.7 1999/01/25 07:14:06 archie Exp $ .\" -.Dd January 27, 2004 +.Dd November 25, 2013 .Dt NETGRAPH 3 .Os .Sh NAME @@ -57,7 +57,7 @@ .Sh LIBRARY .Lb libnetgraph .Sh SYNOPSIS -.In netgraph.h +.In netgraph/netgraph.h .Ft int .Fn NgMkSockNode "const char *name" "int *csp" "int *dsp" .Ft int Modified: stable/10/share/man/man4/netgraph.4 ============================================================================== --- stable/10/share/man/man4/netgraph.4 Wed Jan 22 10:29:15 2014 (r261019) +++ stable/10/share/man/man4/netgraph.4 Wed Jan 22 10:31:56 2014 (r261020) @@ -36,7 +36,7 @@ .\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $ .\" $FreeBSD$ .\" -.Dd May 25, 2008 +.Dd November 25, 2013 .Dt NETGRAPH 4 .Os .Sh NAME @@ -292,7 +292,7 @@ unless specifically declared to be a rea (See .Dv NGM_READONLY in -.In ng_message.h . ) +.In netgraph/ng_message.h . ) .Pp While this mode of operation results in good performance, it has a few implications for node @@ -840,26 +840,27 @@ and should be used as a starting point f .Ss Netgraph Message Structure Control messages have the following structure: .Bd -literal -#define NG_CMDSTRSIZ 32 /* Max command string (including nul) */ +#define NG_CMDSTRSIZ 32 /* Max command string (including null) */ struct ng_mesg { struct ng_msghdr { u_char version; /* Must equal NG_VERSION */ - u_char spare; /* Pad to 2 bytes */ - u_short arglen; /* Length of cmd/resp data */ - u_long flags; /* Message status flags */ - u_long token; /* Reply should have the same token */ - u_long typecookie; /* Node type understanding this message */ - u_long cmd; /* Command identifier */ - u_char cmdstr[NG_CMDSTRSIZ]; /* Cmd string (for debug) */ + u_char spare; /* Pad to 4 bytes */ + uint16_t spare2; + uint32_t arglen; /* Length of cmd/resp data */ + uint32_t cmd; /* Command identifier */ + uint32_t flags; /* Message status flags */ + uint32_t token; /* Reply should have the same token */ + uint32_t typecookie; /* Node type understanding this message */ + u_char cmdstr[NG_CMDSTRSIZ]; /* cmd string + \0 */ } header; - char data[0]; /* Start of cmd/resp data */ + char data[]; /* placeholder for actual data */ }; -#define NG_ABI_VERSION 5 /* Netgraph kernel ABI version */ -#define NG_VERSION 4 /* Netgraph message version */ -#define NGF_ORIG 0x0000 /* Command */ -#define NGF_RESP 0x0001 /* Response */ +#define NG_ABI_VERSION 12 /* Netgraph kernel ABI version */ +#define NG_VERSION 8 /* Netgraph message version */ +#define NGF_ORIG 0x00000000 /* The msg is the original request */ +#define NGF_RESP 0x00000001 /* The message is a response */ .Ed .Pp Control messages have the fixed header shown above, followed by a @@ -1296,7 +1297,7 @@ Used in conjunction with either .Xr ppp 8 or the -.Pa net/mpd +.Pa net/mpd5 port. .It BRIDGE This node, together with the Ethernet nodes, allows a very flexible From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 10:35:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F34F11A; Wed, 22 Jan 2014 10:35:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 19A0B18E5; Wed, 22 Jan 2014 10:35:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MAZUmB086816; Wed, 22 Jan 2014 10:35:30 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MAZUCh086815; Wed, 22 Jan 2014 10:35:30 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221035.s0MAZUCh086815@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 10:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261021 - stable/10/usr.sbin/ndiscvt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:35:31 -0000 Author: glebius Date: Wed Jan 22 10:35:30 2014 New Revision: 261021 URL: http://svnweb.freebsd.org/changeset/base/261021 Log: Merge r259855: We have in base iconv. PR: 185135 Modified: stable/10/usr.sbin/ndiscvt/ndisgen.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ndiscvt/ndisgen.sh ============================================================================== --- stable/10/usr.sbin/ndiscvt/ndisgen.sh Wed Jan 22 10:31:56 2014 (r261020) +++ stable/10/usr.sbin/ndiscvt/ndisgen.sh Wed Jan 22 10:35:30 2014 (r261021) @@ -493,7 +493,7 @@ convert_driver () { return } -ICONVPATH=/usr/local/bin/iconv +ICONVPATH=/usr/bin/iconv NDISCVT=/usr/sbin/ndiscvt STUBPATH=/usr/share/misc STUBFILE=windrv_stub.c From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 10:38:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC4C1481; Wed, 22 Jan 2014 10:38:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B7731191F; Wed, 22 Jan 2014 10:38:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MAc16K087111; Wed, 22 Jan 2014 10:38:01 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MAc1lf087110; Wed, 22 Jan 2014 10:38:01 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221038.s0MAc1lf087110@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 10:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261022 - stable/10/sys/netgraph X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:38:01 -0000 Author: glebius Date: Wed Jan 22 10:38:01 2014 New Revision: 261022 URL: http://svnweb.freebsd.org/changeset/base/261022 Log: Merge r260046: Fix the parse type for NGM_LISTTYPES. Modified: stable/10/sys/netgraph/ng_base.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netgraph/ng_base.c ============================================================================== --- stable/10/sys/netgraph/ng_base.c Wed Jan 22 10:35:30 2014 (r261021) +++ stable/10/sys/netgraph/ng_base.c Wed Jan 22 10:38:01 2014 (r261022) @@ -468,7 +468,7 @@ static const struct ng_parse_type ng_gen &ng_generic_linkinfo_array_type_info }; -DEFINE_PARSE_STRUCT_TYPE(typelist, TYPELIST, (&ng_generic_nodeinfoarray_type)); +DEFINE_PARSE_STRUCT_TYPE(typelist, TYPELIST, (&ng_generic_typeinfoarray_type)); DEFINE_PARSE_STRUCT_TYPE(hooklist, HOOKLIST, (&ng_generic_nodeinfo_type, &ng_generic_linkinfo_array_type)); DEFINE_PARSE_STRUCT_TYPE(listnodes, LISTNODES, @@ -544,7 +544,7 @@ static const struct ng_cmdlist ng_generi NGM_LISTTYPES, "listtypes", NULL, - &ng_generic_typeinfo_type + &ng_generic_typelist_type }, { NGM_GENERIC_COOKIE, From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 10:45:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 291FC8D5; Wed, 22 Jan 2014 10:45:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14BC619F2; Wed, 22 Jan 2014 10:45:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MAjGR1090587; Wed, 22 Jan 2014 10:45:16 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MAjG9w090586; Wed, 22 Jan 2014 10:45:16 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221045.s0MAjG9w090586@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 10:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261023 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:45:17 -0000 Author: glebius Date: Wed Jan 22 10:45:16 2014 New Revision: 261023 URL: http://svnweb.freebsd.org/changeset/base/261023 Log: Merge r260377: fix panic on pf_get_translation() failure. PR: 182557 Modified: stable/10/sys/netpfil/pf/pf_lb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf_lb.c ============================================================================== --- stable/10/sys/netpfil/pf/pf_lb.c Wed Jan 22 10:38:01 2014 (r261022) +++ stable/10/sys/netpfil/pf/pf_lb.c Wed Jan 22 10:45:16 2014 (r261023) @@ -663,6 +663,7 @@ notrans: uma_zfree(V_pf_state_key_z, *nkp); uma_zfree(V_pf_state_key_z, *skp); *skp = *nkp = NULL; + *sn = NULL; return (NULL); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 10:57:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77717DE9; Wed, 22 Jan 2014 10:57:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 63B141AFA; Wed, 22 Jan 2014 10:57:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MAvhqd094588; Wed, 22 Jan 2014 10:57:43 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MAvhll094587; Wed, 22 Jan 2014 10:57:43 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221057.s0MAvhll094587@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 10:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261024 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:57:43 -0000 Author: glebius Date: Wed Jan 22 10:57:42 2014 New Revision: 261024 URL: http://svnweb.freebsd.org/changeset/base/261024 Log: Fix fallout from r241923. Calculate length of payload in pim_input() properly. While here, remove extra variable and incorrect condition before m_pullup(). Reported by: Olivier Cochard-Labbé Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_mroute.c Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Wed Jan 22 10:45:16 2014 (r261023) +++ head/sys/netinet/ip_mroute.c Wed Jan 22 10:57:42 2014 (r261024) @@ -2557,14 +2557,13 @@ pim_encapcheck(const struct mbuf *m, int * is passed to if_simloop(). */ void -pim_input(struct mbuf *m, int off) +pim_input(struct mbuf *m, int iphlen) { struct ip *ip = mtod(m, struct ip *); struct pim *pim; int minlen; - int datalen = ntohs(ip->ip_len); + int datalen = ntohs(ip->ip_len) - iphlen; int ip_tos; - int iphlen = off; /* Keep statistics */ PIMSTAT_INC(pims_rcv_total_msgs); @@ -2594,8 +2593,7 @@ pim_input(struct mbuf *m, int off) * Get the IP and PIM headers in contiguous memory, and * possibly the PIM REGISTER header. */ - if ((m->m_flags & M_EXT || m->m_len < minlen) && - (m = m_pullup(m, minlen)) == 0) { + if (m->m_len < minlen && (m = m_pullup(m, minlen)) == 0) { CTR1(KTR_IPMF, "%s: m_pullup() failed", __func__); return; } From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 14:11:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FBEFD5; Wed, 22 Jan 2014 14:11:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C0D91CC8; Wed, 22 Jan 2014 14:11:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MEBfgo071352; Wed, 22 Jan 2014 14:11:41 GMT (envelope-from skreuzer@svn.freebsd.org) Received: (from skreuzer@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MEBfle071351; Wed, 22 Jan 2014 14:11:41 GMT (envelope-from skreuzer@svn.freebsd.org) Message-Id: <201401221411.s0MEBfle071351@svn.freebsd.org> From: Steven Kreuzer Date: Wed, 22 Jan 2014 14:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261026 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 14:11:41 -0000 Author: skreuzer (doc,ports committer) Date: Wed Jan 22 14:11:40 2014 New Revision: 261026 URL: http://svnweb.freebsd.org/changeset/base/261026 Log: add myself to committers-doc.dot Approved by: hrs (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Wed Jan 22 13:43:54 2014 (r261025) +++ head/share/misc/committers-doc.dot Wed Jan 22 14:11:40 2014 (r261026) @@ -84,6 +84,7 @@ remko [label="Remko Lodder\nremko@FreeBS rene [label="Rene Ladan\nrene@FreeBSD.org\n2008/11/03"] ryusuke [label="Ryusuke Suzuki\nryusuke@FreeBSD.org\n2009/12/21"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2003/07/20"] +skreuzer [label="Steven Kreuzer\skreuzer@FreeBSD.org\n2014/01/15"] taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/03/25"] wblock [label="Warren Block\nwblock@FreeBSD.org\n2011/09/12"] @@ -128,6 +129,7 @@ gjb -> crees hrs -> ryusuke hrs -> dru +hrs -> skreuzer jesusr -> jcamou From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 14:22:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AD79401; Wed, 22 Jan 2014 14:22:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 36F2D1D9E; Wed, 22 Jan 2014 14:22:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MEMjZh075488; Wed, 22 Jan 2014 14:22:45 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MEMjro075487; Wed, 22 Jan 2014 14:22:45 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201401221422.s0MEMjro075487@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 22 Jan 2014 14:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261027 - head/etc/defaults X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 14:22:45 -0000 Author: bapt Date: Wed Jan 22 14:22:44 2014 New Revision: 261027 URL: http://svnweb.freebsd.org/changeset/base/261027 Log: Remove pkg_* related info from periodic.conf Reported by: Robin Brocks MFC after: 3 days Modified: head/etc/defaults/periodic.conf Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Wed Jan 22 14:11:40 2014 (r261026) +++ head/etc/defaults/periodic.conf Wed Jan 22 14:22:44 2014 (r261027) @@ -140,10 +140,6 @@ daily_status_mail_rejects_shorten="NO" # 480.status-ntpd daily_status_ntpd_enable="NO" # Check NTP status -# 490.status-pkg-changes -daily_status_pkg_changes_enable="NO" # Show package changes -pkg_info="pkg_info" # Use this program - # 500.queuerun daily_queuerun_enable="YES" # Run mail queue daily_submit_queuerun="YES" # Also submit queue @@ -183,11 +179,6 @@ weekly_catman_enable="NO" # Preformat weekly_noid_enable="NO" # Find unowned files weekly_noid_dirs="/" # Look here -# 400.status-pkg -weekly_status_pkg_enable="NO" # Find out-of-date pkgs -pkg_version=pkg_version # Use this program -pkg_version_index=/usr/ports/INDEX-11 # Use this index file - # 450.status-security weekly_status_security_enable="YES" # Security check # See also "Security options" above for more options From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 15:44:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74266ECD; Wed, 22 Jan 2014 15:44:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 45EED1567; Wed, 22 Jan 2014 15:44:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MFidep073071; Wed, 22 Jan 2014 15:44:39 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MFidkr073070; Wed, 22 Jan 2014 15:44:39 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221544.s0MFidkr073070@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 15:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261028 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:44:39 -0000 Author: glebius Date: Wed Jan 22 15:44:38 2014 New Revision: 261028 URL: http://svnweb.freebsd.org/changeset/base/261028 Log: Fix resource leak and simplify code for DIOCCHANGEADDR. CID: 1007035 Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Wed Jan 22 14:22:44 2014 (r261027) +++ head/sys/netpfil/pf/pf_ioctl.c Wed Jan 22 15:44:38 2014 (r261028) @@ -2281,6 +2281,7 @@ DIOCGETSTATES_full: bcopy(&pca->addr, newpa, sizeof(struct pf_pooladdr)); if (newpa->ifname[0]) kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK); + newpa->kif = NULL; } #define ERROUT(x) { error = (x); goto DIOCCHANGEADDR_error; } @@ -2298,8 +2299,8 @@ DIOCGETSTATES_full: if (newpa->ifname[0]) { newpa->kif = pfi_kif_attach(kif, newpa->ifname); pfi_kif_ref(newpa->kif); - } else - newpa->kif = NULL; + kif = NULL; + } switch (newpa->addr.type) { case PF_ADDR_DYNIFTL: @@ -2313,32 +2314,24 @@ DIOCGETSTATES_full: error = ENOMEM; break; } - if (error) { - if (newpa->kif) - pfi_kif_unref(newpa->kif); - PF_RULES_WUNLOCK(); - free(newpa, M_PFRULE); - break; - } + if (error) + goto DIOCCHANGEADDR_error; } - if (pca->action == PF_CHANGE_ADD_HEAD) + switch (pca->action) { + case PF_CHANGE_ADD_HEAD: oldpa = TAILQ_FIRST(&pool->list); - else if (pca->action == PF_CHANGE_ADD_TAIL) + break; + case PF_CHANGE_ADD_TAIL: oldpa = TAILQ_LAST(&pool->list, pf_palist); - else { - int i = 0; - + break; + default: oldpa = TAILQ_FIRST(&pool->list); - while ((oldpa != NULL) && (i < pca->nr)) { + for (int i = 0; oldpa && i < pca->nr; i++) oldpa = TAILQ_NEXT(oldpa, entries); - i++; - } - if (oldpa == NULL) { - PF_RULES_WUNLOCK(); - error = EINVAL; - break; - } + + if (oldpa == NULL) + ERROUT(EINVAL); } if (pca->action == PF_CHANGE_REMOVE) { @@ -2366,13 +2359,14 @@ DIOCGETSTATES_full: } pool->cur = TAILQ_FIRST(&pool->list); - PF_ACPY(&pool->counter, &pool->cur->addr.v.a.addr, - pca->af); + PF_ACPY(&pool->counter, &pool->cur->addr.v.a.addr, pca->af); PF_RULES_WUNLOCK(); break; #undef ERROUT DIOCCHANGEADDR_error: + if (newpa->kif) + pfi_kif_unref(newpa->kif); PF_RULES_WUNLOCK(); if (newpa != NULL) free(newpa, M_PFRULE); From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 15:58:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EDCF5E5; Wed, 22 Jan 2014 15:58:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8501681; Wed, 22 Jan 2014 15:58:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MFwiEt008233; Wed, 22 Jan 2014 15:58:44 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MFwijA008232; Wed, 22 Jan 2014 15:58:44 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401221558.s0MFwijA008232@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 22 Jan 2014 15:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261029 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:58:44 -0000 Author: glebius Date: Wed Jan 22 15:58:43 2014 New Revision: 261029 URL: http://svnweb.freebsd.org/changeset/base/261029 Log: Remove NULL pointer dereference. CID: 1009118 Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Wed Jan 22 15:44:38 2014 (r261028) +++ head/sys/netpfil/pf/pf.c Wed Jan 22 15:58:43 2014 (r261029) @@ -5493,7 +5493,6 @@ pf_route(struct mbuf **m, struct pf_rule PF_STATE_UNLOCK(s); rt = rtalloc1_fib(sintosa(&dst), 0, 0, M_GETFIB(m0)); if (rt == NULL) { - RTFREE_LOCKED(rt); KMOD_IPSTAT_INC(ips_noroute); error = EHOSTUNREACH; goto bad; From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 16:50:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C295911; Wed, 22 Jan 2014 16:50:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 180121B01; Wed, 22 Jan 2014 16:50:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MGoI7Y029743; Wed, 22 Jan 2014 16:50:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MGoIkK029738; Wed, 22 Jan 2014 16:50:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401221650.s0MGoIkK029738@svn.freebsd.org> From: John Baldwin Date: Wed, 22 Jan 2014 16:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261030 - head/usr.sbin/services_mkdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:50:19 -0000 Author: jhb Date: Wed Jan 22 16:50:18 2014 New Revision: 261030 URL: http://svnweb.freebsd.org/changeset/base/261030 Log: Similar to cap_mkdb(1), add endianness support to services_mkdb(1) to support cross-builds once this is invoked during releases. Modified: head/usr.sbin/services_mkdb/extern.h head/usr.sbin/services_mkdb/services_mkdb.8 head/usr.sbin/services_mkdb/services_mkdb.c Modified: head/usr.sbin/services_mkdb/extern.h ============================================================================== --- head/usr.sbin/services_mkdb/extern.h Wed Jan 22 15:58:43 2014 (r261029) +++ head/usr.sbin/services_mkdb/extern.h Wed Jan 22 16:50:18 2014 (r261030) @@ -29,6 +29,6 @@ * $FreeBSD$ */ -extern const HASHINFO hinfo; +extern HASHINFO hinfo; void uniq(const char *); Modified: head/usr.sbin/services_mkdb/services_mkdb.8 ============================================================================== --- head/usr.sbin/services_mkdb/services_mkdb.8 Wed Jan 22 15:58:43 2014 (r261029) +++ head/usr.sbin/services_mkdb/services_mkdb.8 Wed Jan 22 16:50:18 2014 (r261030) @@ -37,6 +37,7 @@ .Nd generate the services database .Sh SYNOPSIS .Nm +.Op Fl b | l .Op Fl q .Op Fl o Ar database .Op Ar file @@ -61,6 +62,10 @@ The file must be in the correct format ( .Pp The options are as follows: .Bl -tag -width indent +.It Fl b +Use big-endian byte order for database metadata. +.It Fl l +Use little-endian byte order for database metadata. .It Fl o Ar database Put the output databases in the named file. .It Fl q @@ -70,6 +75,13 @@ Print the services file to stdout, omitt .El .Pp The databases are used by the C library services routines (see +.Pp +The +.Fl b +and +.Fl l +flags are mutually exclusive. +The default byte ordering is the current host order. .Xr getservent 3 ) . .Sh FILES .Bl -tag -width ".Pa /var/db/services.db.tmp" -compact Modified: head/usr.sbin/services_mkdb/services_mkdb.c ============================================================================== --- head/usr.sbin/services_mkdb/services_mkdb.c Wed Jan 22 15:58:43 2014 (r261029) +++ head/usr.sbin/services_mkdb/services_mkdb.c Wed Jan 22 16:50:18 2014 (r261030) @@ -67,7 +67,7 @@ static const char *getprotostr(StringLis static const char *mkaliases(StringList *, char *, size_t); static void usage(void); -const HASHINFO hinfo = { +HASHINFO hinfo = { .bsize = 256, .ffactor = 4, .nelem = 32768, @@ -87,14 +87,21 @@ main(int argc, char *argv[]) int warndup = 1; int unique = 0; int otherflag = 0; + int byteorder = 0; size_t cnt = 0; StringList *sl, ***svc; size_t port, proto; setprogname(argv[0]); - while ((ch = getopt(argc, argv, "qo:u")) != -1) + while ((ch = getopt(argc, argv, "blo:qu")) != -1) switch (ch) { + case 'b': + case 'l': + if (byteorder != 0) + usage(); + byteorder = ch == 'b' ? 4321 : 1234; + break; case 'q': otherflag = 1; warndup = 0; @@ -119,6 +126,9 @@ main(int argc, char *argv[]) if (argc == 1) fname = argv[0]; + /* Set byte order. */ + hinfo.lorder = byteorder; + if (unique) uniq(fname); @@ -423,7 +433,8 @@ out: static void usage(void) { - (void)fprintf(stderr, "Usage:\t%s [-q] [-o ] []\n" + (void)fprintf(stderr, + "Usage:\t%s [-b | -l] [-q] [-o ] []\n" "\t%s -u []\n", getprogname(), getprogname()); exit(1); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 16:59:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BC0DD89; Wed, 22 Jan 2014 16:59:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A2161CCD; Wed, 22 Jan 2014 16:59:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MGxsE6056046; Wed, 22 Jan 2014 16:59:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MGxrc7056036; Wed, 22 Jan 2014 16:59:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401221659.s0MGxrc7056036@svn.freebsd.org> From: John Baldwin Date: Wed, 22 Jan 2014 16:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:59:54 -0000 Author: jhb Date: Wed Jan 22 16:59:53 2014 New Revision: 261031 URL: http://svnweb.freebsd.org/changeset/base/261031 Log: Generate /var/db/services.db during 'make distribution' so that it is present during new installs. Update etcupdate and mergemaster to ignore the generated file. Tested by: gjb (release build) MFC after: 1 month Modified: head/Makefile.inc1 head/etc/Makefile head/usr.sbin/etcupdate/etcupdate.sh head/usr.sbin/mergemaster/mergemaster.sh Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jan 22 16:50:18 2014 (r261030) +++ head/Makefile.inc1 Wed Jan 22 16:59:53 2014 (r261031) @@ -771,7 +771,7 @@ _nmtree_itools= nmtree ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep id install ${_install-info} \ ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \ - rm sed sh sysctl test true uname wc ${_zoneinfo} + rm sed services_mkdb sh sysctl test true uname wc ${_zoneinfo} # # distributeworld Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed Jan 22 16:50:18 2014 (r261030) +++ head/etc/Makefile Wed Jan 22 16:59:53 2014 (r261031) @@ -198,6 +198,8 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ + services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.db \ + ${DESTDIR}/etc/services; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${BIN2} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ Modified: head/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.sh Wed Jan 22 16:50:18 2014 (r261030) +++ head/usr.sbin/etcupdate/etcupdate.sh Wed Jan 22 16:59:53 2014 (r261031) @@ -213,7 +213,8 @@ build_tree() # Purge auto-generated files. Only the source files need to # be updated after which these files are regenerated. - rm -f $1/etc/*.db $1/etc/passwd >&3 2>&1 || return 1 + rm -f $1/etc/*.db $1/etc/passwd $1/var/db/services.db >&3 2>&1 || \ + return 1 # Remove empty files. These just clutter the output of 'diff'. find $1 -type f -size 0 -delete >&3 2>&1 || return 1 Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Wed Jan 22 16:50:18 2014 (r261030) +++ head/usr.sbin/mergemaster/mergemaster.sh Wed Jan 22 16:59:53 2014 (r261031) @@ -699,7 +699,8 @@ case "${RERUN}" in # or spwd.db. Instead, we want to compare the text versions, and run *_mkdb. # Prompt the user to do so below, as needed. # - rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd + rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd \ + ${TEMPROOT}/var/db/services.db # We only need to compare things like freebsd.cf once find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 17:15:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E7AB3D7; Wed, 22 Jan 2014 17:15:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 39CD71E30; Wed, 22 Jan 2014 17:15:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MHFIV3064345; Wed, 22 Jan 2014 17:15:18 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MHFHQp064343; Wed, 22 Jan 2014 17:15:17 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201401221715.s0MHFHQp064343@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 22 Jan 2014 17:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261032 - head/sbin/kldstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:15:18 -0000 Author: bapt Date: Wed Jan 22 17:15:17 2014 New Revision: 261032 URL: http://svnweb.freebsd.org/changeset/base/261032 Log: Add quiet support for kldstat -n PR: bin/180014 Submitted by: Olivier Cochard-Labbé MFC after: 1 week Modified: head/sbin/kldstat/kldstat.8 head/sbin/kldstat/kldstat.c Modified: head/sbin/kldstat/kldstat.8 ============================================================================== --- head/sbin/kldstat/kldstat.8 Wed Jan 22 16:59:53 2014 (r261031) +++ head/sbin/kldstat/kldstat.8 Wed Jan 22 17:15:17 2014 (r261032) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 23, 2005 +.Dd January 22, 2014 .Dt KLDSTAT 8 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nd display status of dynamic kernel linker .Sh SYNOPSIS .Nm +.Op Fl q .Op Fl v .Op Fl i Ar id .Op Fl n Ar filename Modified: head/sbin/kldstat/kldstat.c ============================================================================== --- head/sbin/kldstat/kldstat.c Wed Jan 22 16:59:53 2014 (r261031) +++ head/sbin/kldstat/kldstat.c Wed Jan 22 17:15:17 2014 (r261032) @@ -78,7 +78,7 @@ printfile(int fileid, int verbose) static void usage(void) { - fprintf(stderr, "usage: kldstat [-v] [-i id] [-n filename]\n"); + fprintf(stderr, "usage: kldstat [-q] [-v] [-i id] [-n filename]\n"); fprintf(stderr, " kldstat [-q] [-m modname]\n"); exit(1); } @@ -146,8 +146,13 @@ main(int argc, char** argv) } if (filename != NULL) { - if ((fileid = kldfind(filename)) < 0) - err(1, "can't find file %s", filename); + if ((fileid = kldfind(filename)) < 0) { + if (!quiet) + warn("can't find file %s", filename); + return 1; + } else if (quiet) { + return 0; + } } printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' '); From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 17:20:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46C35724; Wed, 22 Jan 2014 17:20:29 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 197FB1EB0; Wed, 22 Jan 2014 17:20:29 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6E8DFB945; Wed, 22 Jan 2014 12:20:25 -0500 (EST) From: John Baldwin To: Scott Long Subject: Re: svn commit: r260898 - head/sys/kern Date: Wed, 22 Jan 2014 11:33:21 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <201401211126.18930.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Message-Id: <201401221133.22142.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 22 Jan 2014 12:20:25 -0500 (EST) Cc: src-committers@freebsd.org, Neel Natu , svn-src-all@freebsd.org, Rui Paulo , svn-src-head@freebsd.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:20:29 -0000 On Tuesday, January 21, 2014 5:12:30 pm Scott Long wrote: >=20 > On Jan 21, 2014, at 9:26 AM, John Baldwin wrote: >=20 > > On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote: > >> On Mon, 20 Jan 2014 11:32:29 -0500 > >> John Baldwin wrote: > >>=20 > >>> On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > >>>> On 19 Jan 2014, at 17:59, Neel Natu wrote: > >>>>> Author: neel > >>>>> Date: Mon Jan 20 01:59:35 2014 > >>>>> New Revision: 260898 > >>>>> URL: http://svnweb.freebsd.org/changeset/base/260898 > >>>>>=20 > >>>>> Log: > >>>>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient > >>>>> entries for > >>>>> WITNESS to actually work. > >>>>=20 > >>>> This value should be automatically tuned... > >>>=20 > >>> How do you propose to do so? This is the count of locks initialized > >>> before witness' own SYSINIT is executed and the array it sizes is > >>> allocated statically at compile time. This used to not be a static > >>> array, but an intrusive list embedded in locks themselves, but we > >>> decided to shave a pointer off of each lock that was only used for > >>> that and to use a statically sized table instead. > >>>=20 > >>> --=20 > >>> John Baldwin > >>=20 > >> As + * MAXCPU, as evidently most recent > >> overflows reported were caused by jacking MAXCPU up from its default > >> value?=20 > >=20 > > If raising MAXCPU changes the number of unique lock names used, then the > > locks are named incorrectly. We don't use the 'pid' in the name for > > PROC_LOCK precisely so that WITNESS will treat them all the same so > > that if if it learns a lock order for pid 37 it enforces the same lock > > order for pid 38. Device locks should follow a similar rule. They > > should generally not include the device name (and in some cases they > > really shouldn't even have the driver name). >=20 > Why shouldn=92t they have a driver and device name? Wouldn=92t it help i= dentify > possible deadlocks from driver instances calling into each other? It prevents that. Let's say you have twe0 and twe1 and you use 'twe0 I/O' and 'twe1 I/O' for the locks. If you lock 'twe1 I/O' after 'twe0 I/O' WITNESS will happily just create a new known lock order and not complain. It will only complain if later during the same uptime you later acquire 'twe0 I/O' after 'twe1 I/O'. If instead you name the lock 'twe I/O', then the first time you try to acquire a second 'twe I/O' lock, WITNESS will complain (and in general drivers shouldn't be calling into each other, so we want them to complain the first time). This is why we have the MTX_NETWORK_LOCK hack for driver transmit ring locks, so that WITNESS uses a single set of lock order relationships between transmit ring locks and other locks. =2D-=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 17:50:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5109F1C3; Wed, 22 Jan 2014 17:50:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D5E51161; Wed, 22 Jan 2014 17:50:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MHoiEo088367; Wed, 22 Jan 2014 17:50:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MHoi9V088366; Wed, 22 Jan 2014 17:50:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401221750.s0MHoi9V088366@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 22 Jan 2014 17:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261033 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:50:44 -0000 Author: hselasky Date: Wed Jan 22 17:50:43 2014 New Revision: 261033 URL: http://svnweb.freebsd.org/changeset/base/261033 Log: We are using the old callout API and should also add one extra tick in the FreeBSD 10 case. Suggested by: mav @ MFC after: 1 week Modified: head/sys/dev/usb/usb_freebsd.h Modified: head/sys/dev/usb/usb_freebsd.h ============================================================================== --- head/sys/dev/usb/usb_freebsd.h Wed Jan 22 17:15:17 2014 (r261032) +++ head/sys/dev/usb/usb_freebsd.h Wed Jan 22 17:50:43 2014 (r261033) @@ -51,11 +51,7 @@ #define USB_HAVE_FIXED_PORT 0 /* define zero ticks callout value */ -#if (__FreeBSD_version >= 1000029) -#define USB_CALLOUT_ZERO_TICKS 0 -#else #define USB_CALLOUT_ZERO_TICKS 1 -#endif #define USB_TD_GET_PROC(td) (td)->td_proc #define USB_PROC_GET_GID(td) (td)->p_pgid From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 18:14:56 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 128D8DCB; Wed, 22 Jan 2014 18:14:56 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD6ED1396; Wed, 22 Jan 2014 18:14:55 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s0MIEhM7061593 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Jan 2014 10:14:44 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s0MIEhMl061592; Wed, 22 Jan 2014 10:14:43 -0800 (PST) (envelope-from jmg) Date: Wed, 22 Jan 2014 10:14:43 -0800 From: John-Mark Gurney To: Scott Long Subject: Re: svn commit: r260898 - head/sys/kern Message-ID: <20140122181443.GU75135@funkthat.com> References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> <20140120171844.69e065fb@kan.dyndns.org> <201401211126.18930.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 22 Jan 2014 10:14:44 -0800 (PST) Cc: src-committers@FreeBSD.org, Neel Natu , John Baldwin , svn-src-all@FreeBSD.org, Rui Paulo , svn-src-head@FreeBSD.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:14:56 -0000 Scott Long wrote this message on Tue, Jan 21, 2014 at 15:12 -0700: > On Jan 21, 2014, at 9:26 AM, John Baldwin wrote: > > > On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote: > >> On Mon, 20 Jan 2014 11:32:29 -0500 > >> John Baldwin wrote: > >> > >>> On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > >>>> On 19 Jan 2014, at 17:59, Neel Natu wrote: > >>>>> Author: neel > >>>>> Date: Mon Jan 20 01:59:35 2014 > >>>>> New Revision: 260898 > >>>>> URL: http://svnweb.freebsd.org/changeset/base/260898 > >>>>> > >>>>> Log: > >>>>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient > >>>>> entries for > >>>>> WITNESS to actually work. > >>>> > >>>> This value should be automatically tuned... > >>> > >>> How do you propose to do so? This is the count of locks initialized > >>> before witness' own SYSINIT is executed and the array it sizes is > >>> allocated statically at compile time. This used to not be a static > >>> array, but an intrusive list embedded in locks themselves, but we > >>> decided to shave a pointer off of each lock that was only used for > >>> that and to use a statically sized table instead. > >>> > >>> -- > >>> John Baldwin > >> > >> As + * MAXCPU, as evidently most recent > >> overflows reported were caused by jacking MAXCPU up from its default > >> value? > > > > If raising MAXCPU changes the number of unique lock names used, then the > > locks are named incorrectly. We don't use the 'pid' in the name for > > PROC_LOCK precisely so that WITNESS will treat them all the same so > > that if if it learns a lock order for pid 37 it enforces the same lock > > order for pid 38. Device locks should follow a similar rule. They > > should generally not include the device name (and in some cases they > > really shouldn't even have the driver name). > > Why shouldn?t they have a driver and device name? Wouldn?t it help identify > possible deadlocks from driver instances calling into each other? Locks have a name and a type. The type is used for witness, but if it is NULL, the name is used. So you could if you wanted, create a common type, and then put driver/device name in name, but the passed in strings to both name and type have to be stable storage (only the pointer is stored), so you can't use a stack variable to construct it. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 19:06:52 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B3A6D5F; Wed, 22 Jan 2014 19:06:52 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 16D47187F; Wed, 22 Jan 2014 19:06:51 +0000 (UTC) Received: from Alfreds-MacBook-Pro.local (unknown [50.204.88.5]) by elvis.mu.org (Postfix) with ESMTPSA id CCB4F1A3C4D; Wed, 22 Jan 2014 11:06:42 -0800 (PST) Message-ID: <52E016BF.80102@freebsd.org> Date: Wed, 22 Jan 2014 11:06:39 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John-Mark Gurney , Scott Long Subject: Re: svn commit: r260898 - head/sys/kern References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> <20140120171844.69e065fb@kan.dyndns.org> <201401211126.18930.jhb@freebsd.org> <20140122181443.GU75135@funkthat.com> In-Reply-To: <20140122181443.GU75135@funkthat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, Neel Natu , John Baldwin , svn-src-all@FreeBSD.org, Rui Paulo , svn-src-head@FreeBSD.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:06:52 -0000 On 1/22/14, 10:14 AM, John-Mark Gurney wrote: > Scott Long wrote this message on Tue, Jan 21, 2014 at 15:12 -0700: >> On Jan 21, 2014, at 9:26 AM, John Baldwin wrote: >> >>> On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote: >>>> On Mon, 20 Jan 2014 11:32:29 -0500 >>>> John Baldwin wrote: >>>> >>>>> On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: >>>>>> On 19 Jan 2014, at 17:59, Neel Natu wrote: >>>>>>> Author: neel >>>>>>> Date: Mon Jan 20 01:59:35 2014 >>>>>>> New Revision: 260898 >>>>>>> URL: http://svnweb.freebsd.org/changeset/base/260898 >>>>>>> >>>>>>> Log: >>>>>>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient >>>>>>> entries for >>>>>>> WITNESS to actually work. >>>>>> This value should be automatically tuned... >>>>> How do you propose to do so? This is the count of locks initialized >>>>> before witness' own SYSINIT is executed and the array it sizes is >>>>> allocated statically at compile time. This used to not be a static >>>>> array, but an intrusive list embedded in locks themselves, but we >>>>> decided to shave a pointer off of each lock that was only used for >>>>> that and to use a statically sized table instead. >>>>> >>>>> -- >>>>> John Baldwin >>>> As + * MAXCPU, as evidently most recent >>>> overflows reported were caused by jacking MAXCPU up from its default >>>> value? >>> If raising MAXCPU changes the number of unique lock names used, then the >>> locks are named incorrectly. We don't use the 'pid' in the name for >>> PROC_LOCK precisely so that WITNESS will treat them all the same so >>> that if if it learns a lock order for pid 37 it enforces the same lock >>> order for pid 38. Device locks should follow a similar rule. They >>> should generally not include the device name (and in some cases they >>> really shouldn't even have the driver name). >> Why shouldn?t they have a driver and device name? Wouldn?t it help identify >> possible deadlocks from driver instances calling into each other? > Locks have a name and a type. The type is used for witness, but if it > is NULL, the name is used. So you could if you wanted, create a common > type, and then put driver/device name in name, but the passed in strings > to both name and type have to be stable storage (only the pointer is > stored), so you can't use a stack variable to construct it. > Hmm, what if locks had a pointer to a 2 element char * array, the first being the name, the second the type. That would keep the size of the lock down and most locks could share a common tuple of name/type in each subsystem. This would allow us to get rid of the pending static list. effectively: struct lock_object { char *lo_name; /* Individual lock name. */ u_int lo_flags; u_int lo_data; /* General class specific data. */ struct witness *lo_witness; /* Data for witness. */ }; would change to: struct lock_object { char **lo_name_type; /* Individual lock name[0]/type[1]. */ u_int lo_flags; u_int lo_data; /* General class specific data. */ struct witness *lo_witness; /* Data for witness. */ }; This may be somewhat disruptive, I haven't played with how it would actually change driver/etc/code. -Alfred From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 19:09:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B70FF69; Wed, 22 Jan 2014 19:09:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EA1918A6; Wed, 22 Jan 2014 19:09:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MJ9gOK018779; Wed, 22 Jan 2014 19:09:42 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MJ9fAn018776; Wed, 22 Jan 2014 19:09:41 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401221909.s0MJ9fAn018776@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 22 Jan 2014 19:09:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261034 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:09:42 -0000 Author: pfg Date: Wed Jan 22 19:09:41 2014 New Revision: 261034 URL: http://svnweb.freebsd.org/changeset/base/261034 Log: ext2fs: fix logic error in the previous change. Use the bitwise negation instead of bogus boolean negation and move the flag manipulation with the assignment. Fix some grammatical errors introduced in the same change. Reported by: bde MFC after: 3 days Modified: head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_subr.c head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Wed Jan 22 17:50:43 2014 (r261033) +++ head/sys/fs/ext2fs/ext2_lookup.c Wed Jan 22 19:09:41 2014 (r261034) @@ -888,9 +888,9 @@ ext2_direnter(struct inode *ip, struct v if (ext2_htree_has_idx(dp)) { error = ext2_htree_add_entry(dvp, &newdir, cnp); if (error) { - /* XXX: These seem to be set in the wrong place. */ - dp->i_flags |= IN_CHANGE | IN_UPDATE; + /* XXX: These are set in the wrong place. */ dp->i_flags &= ~E4_INDEX; + dp->i_flags |= IN_CHANGE | IN_UPDATE; } return (error); } Modified: head/sys/fs/ext2fs/ext2_subr.c ============================================================================== --- head/sys/fs/ext2fs/ext2_subr.c Wed Jan 22 17:50:43 2014 (r261033) +++ head/sys/fs/ext2fs/ext2_subr.c Wed Jan 22 19:09:41 2014 (r261034) @@ -82,7 +82,7 @@ ext2_blkatoff(struct vnode *vp, off_t of *bpp = NULL; /* - * E4_EXTENTS requires special treatment otherwise we can fall + * E4_EXTENTS requires special treatment as we can otherwise fall * back to the normal path. */ if (!(ip->i_flags & E4_EXTENTS)) Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Wed Jan 22 17:50:43 2014 (r261033) +++ head/sys/fs/ext2fs/ext2_vnops.c Wed Jan 22 19:09:41 2014 (r261034) @@ -343,9 +343,8 @@ ext2_getattr(struct vop_getattr_args *ap vap->va_birthtime.tv_sec = ip->i_birthtime; vap->va_birthtime.tv_nsec = ip->i_birthnsec; } - vap->va_flags = ip->i_flags; - /* E4_* flags are private to the driver */ - vap->va_flags &= !(E4_INDEX | E4_EXTENTS); + /* E4_* flags are private to the filesystem. */ + vap->va_flags = ip->i_flags & ~(E4_INDEX | E4_EXTENTS); vap->va_gen = ip->i_gen; vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize; vap->va_bytes = dbtob((u_quad_t)ip->i_blocks); From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 19:27:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D8D1384; Wed, 22 Jan 2014 19:27:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 350BB1A11; Wed, 22 Jan 2014 19:27:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MJRHPh025925; Wed, 22 Jan 2014 19:27:17 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MJRDR2025901; Wed, 22 Jan 2014 19:27:13 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201401221927.s0MJRDR2025901@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 22 Jan 2014 19:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r261035 - in vendor-crypto/openssl/dist: . apps crypto crypto/aes/asm crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/buffer crypto/ec crypto/engine crypto/evp crypto/modes crypto... X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:27:17 -0000 Author: jkim Date: Wed Jan 22 19:27:13 2014 New Revision: 261035 URL: http://svnweb.freebsd.org/changeset/base/261035 Log: Import OpenSSL 1.0.1f. Approved by: so (delphij), benl (silence) Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/Configure vendor-crypto/openssl/dist/FREEBSD-Xlist vendor-crypto/openssl/dist/FREEBSD-upgrade vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/Makefile.org vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/apps/Makefile vendor-crypto/openssl/dist/apps/apps.h vendor-crypto/openssl/dist/apps/openssl.c vendor-crypto/openssl/dist/apps/pkcs12.c vendor-crypto/openssl/dist/config vendor-crypto/openssl/dist/crypto/Makefile vendor-crypto/openssl/dist/crypto/aes/asm/aes-parisc.pl vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-x86_64.pl vendor-crypto/openssl/dist/crypto/armcap.c vendor-crypto/openssl/dist/crypto/asn1/a_int.c vendor-crypto/openssl/dist/crypto/bio/bss_dgram.c vendor-crypto/openssl/dist/crypto/bn/Makefile vendor-crypto/openssl/dist/crypto/bn/asm/mips-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/mips.pl vendor-crypto/openssl/dist/crypto/bn/asm/parisc-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-mont5.pl vendor-crypto/openssl/dist/crypto/bn/bn_nist.c vendor-crypto/openssl/dist/crypto/buffer/buffer.c vendor-crypto/openssl/dist/crypto/buffer/buffer.h vendor-crypto/openssl/dist/crypto/ec/ec_ameth.c vendor-crypto/openssl/dist/crypto/ec/ec_asn1.c vendor-crypto/openssl/dist/crypto/ec/ec_lib.c vendor-crypto/openssl/dist/crypto/engine/eng_rdrand.c vendor-crypto/openssl/dist/crypto/evp/Makefile vendor-crypto/openssl/dist/crypto/evp/digest.c vendor-crypto/openssl/dist/crypto/evp/e_aes.c vendor-crypto/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha1.c vendor-crypto/openssl/dist/crypto/evp/e_des3.c vendor-crypto/openssl/dist/crypto/evp/p5_crpt2.c vendor-crypto/openssl/dist/crypto/modes/Makefile vendor-crypto/openssl/dist/crypto/modes/asm/ghash-parisc.pl vendor-crypto/openssl/dist/crypto/modes/cbc128.c vendor-crypto/openssl/dist/crypto/modes/ccm128.c vendor-crypto/openssl/dist/crypto/modes/cts128.c vendor-crypto/openssl/dist/crypto/modes/gcm128.c vendor-crypto/openssl/dist/crypto/modes/modes_lcl.h vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/pariscid.pl vendor-crypto/openssl/dist/crypto/pem/pem_info.c vendor-crypto/openssl/dist/crypto/pkcs12/p12_crt.c vendor-crypto/openssl/dist/crypto/rand/md_rand.c vendor-crypto/openssl/dist/crypto/rand/rand.h vendor-crypto/openssl/dist/crypto/rand/rand_err.c vendor-crypto/openssl/dist/crypto/rand/rand_lib.c vendor-crypto/openssl/dist/crypto/rc4/asm/rc4-parisc.pl vendor-crypto/openssl/dist/crypto/rsa/rsa_ameth.c vendor-crypto/openssl/dist/crypto/rsa/rsa_chk.c vendor-crypto/openssl/dist/crypto/rsa/rsa_pmeth.c vendor-crypto/openssl/dist/crypto/sha/Makefile vendor-crypto/openssl/dist/crypto/sha/asm/sha1-parisc.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha1-x86_64.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-mips.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-parisc.pl vendor-crypto/openssl/dist/crypto/sha/sha512.c vendor-crypto/openssl/dist/crypto/srp/srp_grps.h vendor-crypto/openssl/dist/crypto/srp/srp_lib.c vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c vendor-crypto/openssl/dist/crypto/x509/x_all.c vendor-crypto/openssl/dist/crypto/x86cpuid.pl vendor-crypto/openssl/dist/doc/apps/rsa.pod vendor-crypto/openssl/dist/doc/crypto/X509_STORE_CTX_get_error.pod vendor-crypto/openssl/dist/doc/crypto/ecdsa.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set_client_CA_list.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set_options.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_use_psk_identity_hint.pod vendor-crypto/openssl/dist/doc/ssl/SSL_accept.pod vendor-crypto/openssl/dist/doc/ssl/SSL_connect.pod vendor-crypto/openssl/dist/doc/ssl/SSL_do_handshake.pod vendor-crypto/openssl/dist/doc/ssl/SSL_shutdown.pod vendor-crypto/openssl/dist/engines/ccgost/gost89.h vendor-crypto/openssl/dist/ssl/d1_both.c vendor-crypto/openssl/dist/ssl/d1_clnt.c vendor-crypto/openssl/dist/ssl/d1_lib.c vendor-crypto/openssl/dist/ssl/d1_pkt.c vendor-crypto/openssl/dist/ssl/d1_srvr.c vendor-crypto/openssl/dist/ssl/s23_clnt.c vendor-crypto/openssl/dist/ssl/s3_both.c vendor-crypto/openssl/dist/ssl/s3_clnt.c vendor-crypto/openssl/dist/ssl/s3_lib.c vendor-crypto/openssl/dist/ssl/s3_pkt.c vendor-crypto/openssl/dist/ssl/s3_srvr.c vendor-crypto/openssl/dist/ssl/ssl.h vendor-crypto/openssl/dist/ssl/ssl3.h vendor-crypto/openssl/dist/ssl/ssl_lib.c vendor-crypto/openssl/dist/ssl/ssl_locl.h vendor-crypto/openssl/dist/ssl/ssltest.c vendor-crypto/openssl/dist/ssl/t1_enc.c vendor-crypto/openssl/dist/ssl/t1_lib.c vendor-crypto/openssl/dist/util/shlib_wrap.sh Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/CHANGES Wed Jan 22 19:27:13 2014 (r261035) @@ -2,9 +2,31 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1e and 1.0.1f [6 Jan 2014] + + *) Fix for TLS record tampering bug. A carefully crafted invalid + handshake could crash OpenSSL with a NULL pointer exception. + Thanks to Anton Johansson for reporting this issues. + (CVE-2013-4353) + + *) Keep original DTLS digest and encryption contexts in retransmission + structures so we can use the previous session parameters if they need + to be resent. (CVE-2013-6450) + [Steve Henson] + + *) Add option SSL_OP_SAFARI_ECDHE_ECDSA_BUG (part of SSL_OP_ALL) which + avoids preferring ECDHE-ECDSA ciphers when the client appears to be + Safari on OS X. Safari on OS X 10.8..10.8.3 advertises support for + several ECDHE-ECDSA ciphers, but fails to negotiate them. The bug + is fixed in OS X 10.8.4, but Apple have ruled out both hot fixing + 10.8..10.8.3 and forcing users to upgrade to 10.8.4 or newer. + [Rob Stradling, Adam Langley] + Changes between 1.0.1d and 1.0.1e [11 Feb 2013] - *) + *) Correct fix for CVE-2013-0169. The original didn't work on AES-NI + supporting platforms or when small records were transferred. + [Andy Polyakov, Steve Henson] Changes between 1.0.1c and 1.0.1d [5 Feb 2013] @@ -404,6 +426,63 @@ Add command line options to s_client/s_server. [Steve Henson] + Changes between 1.0.0j and 1.0.0k [5 Feb 2013] + + *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. + + This addresses the flaw in CBC record processing discovered by + Nadhem Alfardan and Kenny Paterson. Details of this attack can be found + at: http://www.isg.rhul.ac.uk/tls/ + + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and + Emilia Käsper for the initial patch. + (CVE-2013-0169) + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + + *) Return an error when checking OCSP signatures when key is NULL. + This fixes a DoS attack. (CVE-2013-0166) + [Steve Henson] + + *) Call OCSP Stapling callback after ciphersuite has been chosen, so + the right response is stapled. Also change SSL_get_certificate() + so it returns the certificate actually sent. + See http://rt.openssl.org/Ticket/Display.html?id=2836. + (This is a backport) + [Rob Stradling ] + + *) Fix possible deadlock when decoding public keys. + [Steve Henson] + + Changes between 1.0.0i and 1.0.0j [10 May 2012] + + [NB: OpenSSL 1.0.0i and later 1.0.0 patch levels were released after + OpenSSL 1.0.1.] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 1.0.0h and 1.0.0i [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + Changes between 1.0.0g and 1.0.0h [12 Mar 2012] *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness @@ -1394,6 +1473,86 @@ *) Change 'Configure' script to enable Camellia by default. [NTT] + Changes between 0.9.8x and 0.9.8y [5 Feb 2013] + + *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. + + This addresses the flaw in CBC record processing discovered by + Nadhem Alfardan and Kenny Paterson. Details of this attack can be found + at: http://www.isg.rhul.ac.uk/tls/ + + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and + Emilia Käsper for the initial patch. + (CVE-2013-0169) + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + + *) Return an error when checking OCSP signatures when key is NULL. + This fixes a DoS attack. (CVE-2013-0166) + [Steve Henson] + + *) Call OCSP Stapling callback after ciphersuite has been chosen, so + the right response is stapled. Also change SSL_get_certificate() + so it returns the certificate actually sent. + See http://rt.openssl.org/Ticket/Display.html?id=2836. + (This is a backport) + [Rob Stradling ] + + *) Fix possible deadlock when decoding public keys. + [Steve Henson] + + Changes between 0.9.8w and 0.9.8x [10 May 2012] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + + *) The fix for CVE-2012-2110 did not take into account that the + 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an + int in OpenSSL 0.9.8, making it still vulnerable. Fix by + rejecting negative len parameter. (CVE-2012-2131) + [Tomas Hoger ] + + Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + + Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + + *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness + in CMS and PKCS7 code. When RSA decryption fails use a random key for + content decryption and always return the same error. Note: this attack + needs on average 2^20 messages so it only affects automated senders. The + old behaviour can be reenabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where + an MMA defence is not necessary. + Thanks to Ivan Nestlerode for discovering + this issue. (CVE-2012-0884) + [Steve Henson] + + *) Fix CVE-2011-4619: make sure we really are receiving a + client hello before rejecting multiple SGC restarts. Thanks to + Ivan Nestlerode for discovering this bug. + [Steve Henson] + Changes between 0.9.8s and 0.9.8t [18 Jan 2012] *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. @@ -1401,7 +1560,7 @@ Development, Cisco Systems, Inc. for discovering this bug and preparing a fix. (CVE-2012-0050) [Antonio Martin] - + Changes between 0.9.8r and 0.9.8s [4 Jan 2012] *) Nadhem Alfardan and Kenny Paterson have discovered an extension Modified: vendor-crypto/openssl/dist/Configure ============================================================================== --- vendor-crypto/openssl/dist/Configure Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/Configure Wed Jan 22 19:27:13 2014 (r261035) @@ -178,7 +178,7 @@ my %table=( "debug-ben-no-opt", "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-bodo", "gcc:$gcc_devteam_warn -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"debug-bodo", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", "debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -Wno-overlength-strings -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Modified: vendor-crypto/openssl/dist/FREEBSD-Xlist ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-Xlist Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/FREEBSD-Xlist Wed Jan 22 19:27:13 2014 (r261035) @@ -1,11 +1,15 @@ +openssl-*/*.bak openssl-*/*.com openssl-*/*.doxy openssl-*/*.mak +openssl-*/*.save openssl-*/*.spec openssl-*/*/*.bat openssl-*/*/*.com +openssl-*/*/*.save openssl-*/*/*/*.bat openssl-*/*/*/*.com +openssl-*/*/*/*.save openssl-*/INSTALL.DJGPP openssl-*/INSTALL.MacOS openssl-*/INSTALL.NW Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-upgrade Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/FREEBSD-upgrade Wed Jan 22 19:27:13 2014 (r261035) @@ -11,8 +11,8 @@ First, read http://wiki.freebsd.org/Subv # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://svn.freebsd.org/base" -setenv OSSLVER 1.0.1e -# OSSLTAG format: v1_0_1e +setenv OSSLVER 1.0.1f +# OSSLTAG format: v1_0_1f ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` Modified: vendor-crypto/openssl/dist/Makefile ============================================================================== --- vendor-crypto/openssl/dist/Makefile Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/Makefile Wed Jan 22 19:27:13 2014 (r261035) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1e +VERSION=1.0.1f MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -304,7 +304,8 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_ FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \ export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \ fi; \ - $(MAKE) -e SHLIBDIRS=crypto build-shared; \ + $(MAKE) -e SHLIBDIRS=crypto CC=$${CC:-$(CC)} build-shared; \ + touch -c fips_premain_dso$(EXE_EXT); \ else \ echo "There's no support for shared libraries on this platform" >&2; \ exit 1; \ Modified: vendor-crypto/openssl/dist/Makefile.org ============================================================================== --- vendor-crypto/openssl/dist/Makefile.org Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/Makefile.org Wed Jan 22 19:27:13 2014 (r261035) @@ -302,7 +302,8 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_ FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \ export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \ fi; \ - $(MAKE) -e SHLIBDIRS=crypto build-shared; \ + $(MAKE) -e SHLIBDIRS=crypto CC=$${CC:-$(CC)} build-shared; \ + touch -c fips_premain_dso$(EXE_EXT); \ else \ echo "There's no support for shared libraries on this platform" >&2; \ exit 1; \ Modified: vendor-crypto/openssl/dist/NEWS ============================================================================== --- vendor-crypto/openssl/dist/NEWS Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/NEWS Wed Jan 22 19:27:13 2014 (r261035) @@ -5,11 +5,17 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. - Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e: + Major changes between OpenSSL 1.0.1e and OpenSSL 1.0.1f [6 Jan 2014] + + o Fix for TLS record tampering bug CVE-2013-4353 + o Fix for TLS version checking bug CVE-2013-6449 + o Fix for DTLS retransmission bug CVE-2013-6450 + + Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e [11 Feb 2013]: o Corrected fix for CVE-2013-0169 - Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d: + Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d [4 Feb 2013]: o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version. o Include the fips configuration module. @@ -17,24 +23,24 @@ o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 o Fix for TLS AESNI record handling flaw CVE-2012-2686 - Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c: + Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c [10 May 2012]: o Fix TLS/DTLS record length checking bug CVE-2012-2333 o Don't attempt to use non-FIPS composite ciphers in FIPS mode. - Major changes between OpenSSL 1.0.1a and OpenSSL 1.0.1b: + Major changes between OpenSSL 1.0.1a and OpenSSL 1.0.1b [26 Apr 2012]: o Fix compilation error on non-x86 platforms. o Make FIPS capable OpenSSL ciphers work in non-FIPS mode. o Fix SSL_OP_NO_TLSv1_1 clash with SSL_OP_ALL in OpenSSL 1.0.0 - Major changes between OpenSSL 1.0.1 and OpenSSL 1.0.1a: + Major changes between OpenSSL 1.0.1 and OpenSSL 1.0.1a [19 Apr 2012]: o Fix for ASN1 overflow bug CVE-2012-2110 o Workarounds for some servers that hang on long client hellos. o Fix SEGV in AES code. - Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.1: + Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.1 [14 Mar 2012]: o TLS/DTLS heartbeat support. o SCTP support. @@ -47,17 +53,30 @@ o Preliminary FIPS capability for unvalidated 2.0 FIPS module. o SRP support. - Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h: + Major changes between OpenSSL 1.0.0j and OpenSSL 1.0.0k [5 Feb 2013]: + + o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 + o Fix OCSP bad key DoS attack CVE-2013-0166 + + Major changes between OpenSSL 1.0.0i and OpenSSL 1.0.0j [10 May 2012]: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.0i [19 Apr 2012]: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h [12 Mar 2012]: o Fix for CMS/PKCS#7 MMA CVE-2012-0884 o Corrected fix for CVE-2011-4619 o Various DTLS fixes. - Major changes between OpenSSL 1.0.0f and OpenSSL 1.0.0g: + Major changes between OpenSSL 1.0.0f and OpenSSL 1.0.0g [18 Jan 2012]: o Fix for DTLS DoS issue CVE-2012-0050 - Major changes between OpenSSL 1.0.0e and OpenSSL 1.0.0f: + Major changes between OpenSSL 1.0.0e and OpenSSL 1.0.0f [4 Jan 2012]: o Fix for DTLS plaintext recovery attack CVE-2011-4108 o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 @@ -65,7 +84,7 @@ o Check parameters are not NULL in GOST ENGINE CVE-2012-0027 o Check for malformed RFC3779 data CVE-2011-4577 - Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e: + Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e [6 Sep 2011]: o Fix for CRL vulnerability issue CVE-2011-3207 o Fix for ECDH crashes CVE-2011-3210 @@ -73,11 +92,11 @@ o Support ECDH ciphersuites for certificates using SHA2 algorithms. o Various DTLS fixes. - Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d: + Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d [8 Feb 2011]: o Fix for security issue CVE-2011-0014 - Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c: + Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c [2 Dec 2010]: o Fix for security issue CVE-2010-4180 o Fix for CVE-2010-4252 @@ -85,18 +104,18 @@ o Fix various platform compilation issues. o Corrected fix for security issue CVE-2010-3864. - Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b: + Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b [16 Nov 2010]: o Fix for security issue CVE-2010-3864. o Fix for CVE-2010-2939 o Fix WIN32 build system for GOST ENGINE. - Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a: + Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a [1 Jun 2010]: o Fix for security issue CVE-2010-1633. o GOST MAC and CFB fixes. - Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0: + Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0 [29 Mar 2010]: o RFC3280 path validation: sufficient to process PKITS tests. o Integrated support for PVK files and keyblobs. @@ -119,20 +138,55 @@ o Opaque PRF Input TLS extension support. o Updated time routines to avoid OS limitations. - Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y [5 Feb 2013]: + + o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 + o Fix OCSP bad key DoS attack CVE-2013-0166 + + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x [10 May 2012]: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w [23 Apr 2012]: + + o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) + + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v [19 Apr 2012]: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u [12 Mar 2012]: + + o Fix for CMS/PKCS#7 MMA CVE-2012-0884 + o Corrected fix for CVE-2011-4619 + o Various DTLS fixes. + + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t [18 Jan 2012]: + + o Fix for DTLS DoS issue CVE-2012-0050 + + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s [4 Jan 2012]: + + o Fix for DTLS plaintext recovery attack CVE-2011-4108 + o Fix policy check double free error CVE-2011-4109 + o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 + o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 + o Check for malformed RFC3779 data CVE-2011-4577 + + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r [8 Feb 2011]: o Fix for security issue CVE-2011-0014 - Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q [2 Dec 2010]: o Fix for security issue CVE-2010-4180 o Fix for CVE-2010-4252 - Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p: + Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p [16 Nov 2010]: o Fix for security issue CVE-2010-3864. - Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o: + Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o [1 Jun 2010]: o Fix for security issue CVE-2010-0742. o Various DTLS fixes. @@ -140,12 +194,12 @@ o Fix for no-rc4 compilation. o Chil ENGINE unload workaround. - Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n: + Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n [24 Mar 2010]: o CFB cipher definition fixes. o Fix security issues CVE-2010-0740 and CVE-2010-0433. - Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m: + Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m [25 Feb 2010]: o Cipher definition fixes. o Workaround for slow RAND_poll() on some WIN32 versions. @@ -157,33 +211,33 @@ o Ticket and SNI coexistence fixes. o Many fixes to DTLS handling. - Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l: + Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l [5 Nov 2009]: o Temporary work around for CVE-2009-3555: disable renegotiation. - Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k: + Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k [25 Mar 2009]: o Fix various build issues. o Fix security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789) - Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j: + Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j [7 Jan 2009]: o Fix security issue (CVE-2008-5077) o Merge FIPS 140-2 branch code. - Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h: + Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h [28 May 2008]: o CryptoAPI ENGINE support. o Various precautionary measures. o Fix for bugs affecting certificate request creation. o Support for local machine keyset attribute in PKCS#12 files. - Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g: + Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g [19 Oct 2007]: o Backport of CMS functionality to 0.9.8. o Fixes for bugs introduced with 0.9.8f. - Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f: + Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f [11 Oct 2007]: o Add gcc 4.2 support. o Add support for AES and SSE2 assembly lanugauge optimization @@ -194,23 +248,23 @@ o RFC4507bis support. o TLS Extensions support. - Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e: + Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e [23 Feb 2007]: o Various ciphersuite selection fixes. o RFC3779 support. - Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d: + Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) o Changes to ciphersuite selection algorithm - Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c: + Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 o New cipher Camellia - Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b: + Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b [4 May 2006]: o Cipher string fixes. o Fixes for VC++ 2005. @@ -220,12 +274,12 @@ o Built in dynamic engine compilation support on Win32. o Fixes auto dynamic engine loading in Win32. - Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a: + Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a [11 Oct 2005]: o Fix potential SSL 2.0 rollback, CVE-2005-2969 o Extended Windows CE support - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8 [5 Jul 2005]: o Major work on the BIGNUM library for higher efficiency and to make operations more streamlined and less contradictory. This @@ -299,36 +353,36 @@ o Added initial support for Win64. o Added alternate pkg-config files. - Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m [23 Feb 2007]: o FIPS 1.1.1 module linking. o Various ciphersuite selection fixes. - Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) - Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k: + Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 - Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j: + Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j [4 May 2006]: o Visual C++ 2005 fixes. o Update Windows build system for FIPS. - Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i: + Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i [14 Oct 2005]: o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build. - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h [11 Oct 2005]: o Fix SSL 2.0 Rollback, CVE-2005-2969 o Allow use of fixed-length exponent on DSA signing o Default fixed-window RSA, DSA, DH private-key operations - Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g: + Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g [11 Apr 2005]: o More compilation issues fixed. o Adaptation to more modern Kerberos API. @@ -337,7 +391,7 @@ o More constification. o Added processing of proxy certificates (RFC 3820). - Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f: + Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f [22 Mar 2005]: o Several compilation issues fixed. o Many memory allocation failure checks added. @@ -345,12 +399,12 @@ o Mandatory basic checks on certificates. o Performance improvements. - Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e: + Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e [25 Oct 2004]: o Fix race condition in CRL checking code. o Fixes to PKCS#7 (S/MIME) code. - Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d: + Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d [17 Mar 2004]: o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug o Security: Fix null-pointer assignment in do_change_cipher_spec() @@ -358,14 +412,14 @@ o Multiple X509 verification fixes o Speed up HMAC and other operations - Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c: + Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o New -ignore_err option to OCSP utility. o Various interop and bug fixes in S/MIME code. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b: + Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack @@ -376,7 +430,7 @@ o ASN.1: treat domainComponent correctly. o Documentation: fixes and additions. - Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a: + Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a [19 Feb 2003]: o Security: Important security related bugfixes. o Enhanced compatibility with MIT Kerberos. @@ -387,7 +441,7 @@ o SSL/TLS: now handles manual certificate chain building. o SSL/TLS: certain session ID malfunctions corrected. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7 [30 Dec 2002]: o New library section OCSP. o Complete rewrite of ASN1 code. @@ -433,23 +487,23 @@ o SSL/TLS: add callback to retrieve SSL/TLS messages. o SSL/TLS: support AES cipher suites (RFC3268). - Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k: + Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j: + Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack o Security: make RSA blinding default. o Build: shared library support fixes. - Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i: + Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i [19 Feb 2003]: o Important security related bugfixes. - Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h: + Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h [5 Dec 2002]: o New configuration targets for Tandem OSS and A/UX. o New OIDs for Microsoft attributes. @@ -463,25 +517,25 @@ o Fixes for smaller building problems. o Updates of manuals, FAQ and other instructive documents. - Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g: + Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g [9 Aug 2002]: o Important building fixes on Unix. - Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f: + Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f [8 Aug 2002]: o Various important bugfixes. - Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e: + Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e [30 Jul 2002]: o Important security related bugfixes. o Various SSL/TLS library bugfixes. - Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d: + Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d [9 May 2002]: o Various SSL/TLS library bugfixes. o Fix DH parameter generation for 'non-standard' generators. - Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c: + Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c [21 Dec 2001]: o Various SSL/TLS library bugfixes. o BIGNUM library fixes. @@ -494,7 +548,7 @@ Broadcom and Cryptographic Appliance's keyserver [in 0.9.6c-engine release]. - Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b: + Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b [9 Jul 2001]: o Security fix: PRNG improvements. o Security fix: RSA OAEP check. @@ -511,7 +565,7 @@ o Increase default size for BIO buffering filter. o Compatibility fixes in some scripts. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a [5 Apr 2001]: o Security fix: change behavior of OpenSSL to avoid using environment variables when running as root. @@ -536,7 +590,7 @@ o New function BN_rand_range(). o Add "-rand" option to openssl s_client and s_server. - Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6: + Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6 [10 Oct 2000]: o Some documentation for BIO and SSL libraries. o Enhanced chain verification using key identifiers. @@ -551,7 +605,7 @@ [1] The support for external crypto devices is currently a separate distribution. See the file README.ENGINE. - Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a: + Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a [1 Apr 2000]: o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8 o Shared library support for HPUX and Solaris-gcc @@ -560,7 +614,7 @@ o New 'rand' application o New way to check for existence of algorithms from scripts - Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5: + Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5 [25 May 2000]: o S/MIME support in new 'smime' command o Documentation for the OpenSSL command line application @@ -596,7 +650,7 @@ o Enhanced support for Alpha Linux o Experimental MacOS support - Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4: + Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4 [9 Aug 1999]: o Transparent support for PKCS#8 format private keys: these are used by several software packages and are more secure than the standard @@ -607,7 +661,7 @@ o New pipe-like BIO that allows using the SSL library when actual I/O must be handled by the application (BIO pair) - Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3: + Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3 [24 May 1999]: o Lots of enhancements and cleanups to the Configuration mechanism o RSA OEAP related fixes o Added `openssl ca -revoke' option for revoking a certificate @@ -621,7 +675,7 @@ o Sparc assembler bignum implementation, optimized hash functions o Option to disable selected ciphers - Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b: + Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b [22 Mar 1999]: o Fixed a security hole related to session resumption o Fixed RSA encryption routines for the p < q case o "ALL" in cipher lists now means "everything except NULL ciphers" @@ -643,7 +697,7 @@ o Lots of memory leak fixes. o Lots of bug fixes. - Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c: + Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c [23 Dec 1998]: o Integration of the popular NO_RSA/NO_DSA patches o Initial support for compression inside the SSL record layer o Added BIO proxy and filtering functionality Modified: vendor-crypto/openssl/dist/README ============================================================================== --- vendor-crypto/openssl/dist/README Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/README Wed Jan 22 19:27:13 2014 (r261035) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1e 11 Feb 2013 + OpenSSL 1.0.1f 6 Jan 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist/apps/Makefile ============================================================================== --- vendor-crypto/openssl/dist/apps/Makefile Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/apps/Makefile Wed Jan 22 19:27:13 2014 (r261035) @@ -577,14 +577,15 @@ openssl.o: ../include/openssl/objects.h openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -openssl.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h -openssl.o: ../include/openssl/sha.h ../include/openssl/srtp.h -openssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -openssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -openssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -openssl.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -openssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -openssl.o: ../include/openssl/x509v3.h apps.h openssl.c progs.h s_apps.h +openssl.o: ../include/openssl/pqueue.h ../include/openssl/rand.h +openssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +openssl.o: ../include/openssl/srtp.h ../include/openssl/ssl.h +openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +openssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +openssl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +openssl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +openssl.o: openssl.c progs.h s_apps.h passwd.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h passwd.o: ../include/openssl/buffer.h ../include/openssl/conf.h passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h Modified: vendor-crypto/openssl/dist/apps/apps.h ============================================================================== --- vendor-crypto/openssl/dist/apps/apps.h Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/apps/apps.h Wed Jan 22 19:27:13 2014 (r261035) @@ -188,6 +188,7 @@ extern BIO *bio_err; do { CONF_modules_unload(1); destroy_ui_method(); \ OBJ_cleanup(); EVP_cleanup(); ENGINE_cleanup(); \ CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \ + RAND_cleanup(); \ ERR_free_strings(); zlib_cleanup();} while(0) # else # define apps_startup() \ @@ -198,6 +199,7 @@ extern BIO *bio_err; do { CONF_modules_unload(1); destroy_ui_method(); \ OBJ_cleanup(); EVP_cleanup(); \ CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \ + RAND_cleanup(); \ ERR_free_strings(); zlib_cleanup(); } while(0) # endif #endif Modified: vendor-crypto/openssl/dist/apps/openssl.c ============================================================================== --- vendor-crypto/openssl/dist/apps/openssl.c Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/apps/openssl.c Wed Jan 22 19:27:13 2014 (r261035) @@ -117,6 +117,7 @@ #include "apps.h" #include #include +#include #include #include #include Modified: vendor-crypto/openssl/dist/apps/pkcs12.c ============================================================================== --- vendor-crypto/openssl/dist/apps/pkcs12.c Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/apps/pkcs12.c Wed Jan 22 19:27:13 2014 (r261035) @@ -112,7 +112,7 @@ int MAIN(int argc, char **argv) int maciter = PKCS12_DEFAULT_ITER; int twopass = 0; int keytype = 0; - int cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC; + int cert_pbe; int key_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; int ret = 1; int macver = 1; @@ -130,6 +130,13 @@ int MAIN(int argc, char **argv) apps_startup(); +#ifdef OPENSSL_FIPS + if (FIPS_mode()) + cert_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; + else +#endif + cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC; + enc = EVP_des_ede3_cbc(); if (bio_err == NULL ) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE); Modified: vendor-crypto/openssl/dist/config ============================================================================== --- vendor-crypto/openssl/dist/config Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/config Wed Jan 22 19:27:13 2014 (r261035) @@ -739,7 +739,7 @@ case "$GUESSOS" in libc=/usr/lib/libc.so else # OpenBSD # ld searches for highest libc.so.* and so do we - libc=`(ls /usr/lib/libc.so.* | tail -1) 2>/dev/null` + libc=`(ls /usr/lib/libc.so.* /lib/libc.so.* | tail -1) 2>/dev/null` fi case "`(file -L $libc) 2>/dev/null`" in *ELF*) OUT="BSD-x86-elf" ;; Modified: vendor-crypto/openssl/dist/crypto/Makefile ============================================================================== --- vendor-crypto/openssl/dist/crypto/Makefile Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/crypto/Makefile Wed Jan 22 19:27:13 2014 (r261035) @@ -77,7 +77,9 @@ ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@ pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@ alphacpuid.s: alphacpuid.pl - $(PERL) $< | $(CC) -E - | tee $@ > /dev/null + (preproc=/tmp/$$$$.$@; trap "rm $$preproc" INT; \ + $(PERL) alphacpuid.pl > $$preproc && \ + $(CC) -E $$preproc > $@ && rm $$preproc) testapps: [ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \ Modified: vendor-crypto/openssl/dist/crypto/aes/asm/aes-parisc.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/aes/asm/aes-parisc.pl Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/crypto/aes/asm/aes-parisc.pl Wed Jan 22 19:27:13 2014 (r261035) @@ -1015,7 +1015,8 @@ foreach (split("\n",$code)) { $SIZE_T==4 ? sprintf("extru%s,%d,8,",$1,31-$2) : sprintf("extrd,u%s,%d,8,",$1,63-$2)/e; - s/,\*/,/ if ($SIZE_T==4); + s/,\*/,/ if ($SIZE_T==4); + s/\bbv\b(.*\(%r2\))/bve$1/ if ($SIZE_T==8); print $_,"\n"; } close STDOUT; Modified: vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-x86_64.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-x86_64.pl Wed Jan 22 19:09:41 2014 (r261034) +++ vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-x86_64.pl Wed Jan 22 19:27:13 2014 (r261035) @@ -83,9 +83,9 @@ # Add decryption procedure. Performance in CPU cycles spent to decrypt # one byte out of 4096-byte buffer with 128-bit key is: # -# Core 2 11.0 -# Nehalem 9.16 -# Atom 20.9 +# Core 2 9.83 +# Nehalem 7.74 +# Atom 19.0 # # November 2011. # @@ -456,6 +456,7 @@ sub MixColumns { # modified to emit output in order suitable for feeding back to aesenc[last] my @x=@_[0..7]; my @t=@_[8..15]; +my $inv=@_[16]; # optional $code.=<<___; pshufd \$0x93, @x[0], @t[0] # x0 <<< 32 pshufd \$0x93, @x[1], @t[1] @@ -497,7 +498,8 @@ $code.=<<___; pxor @t[4], @t[0] pshufd \$0x4E, @x[2], @x[6] pxor @t[5], @t[1] - +___ +$code.=<<___ if (!$inv); pxor @t[3], @x[4] pxor @t[7], @x[5] pxor @t[6], @x[3] @@ -505,9 +507,20 @@ $code.=<<___; pxor @t[2], @x[6] movdqa @t[1], @x[7] ___ +$code.=<<___ if ($inv); + pxor @x[4], @t[3] + pxor @t[7], @x[5] + pxor @x[3], @t[6] + movdqa @t[0], @x[3] + pxor @t[2], @x[6] + movdqa @t[6], @x[2] + movdqa @t[1], @x[7] + movdqa @x[6], @x[4] + movdqa @t[3], @x[6] +___ } -sub InvMixColumns { +sub InvMixColumns_orig { my @x=@_[0..7]; my @t=@_[8..15]; @@ -661,6 +674,54 @@ $code.=<<___; ___ } +sub InvMixColumns { +my @x=@_[0..7]; +my @t=@_[8..15]; + +# Thanks to Jussi Kivilinna for providing pointer to +# +# | 0e 0b 0d 09 | | 02 03 01 01 | | 05 00 04 00 | +# | 09 0e 0b 0d | = | 01 02 03 01 | x | 00 05 00 04 | +# | 0d 09 0e 0b | | 01 01 02 03 | | 04 00 05 00 | +# | 0b 0d 09 0e | | 03 01 01 02 | | 00 04 00 05 | + +$code.=<<___; + # multiplication by 0x05-0x00-0x04-0x00 + pshufd \$0x4E, @x[0], @t[0] + pshufd \$0x4E, @x[6], @t[6] + pxor @x[0], @t[0] *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 19:28:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A89A4C9; Wed, 22 Jan 2014 19:28:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5CF1F1A1B; Wed, 22 Jan 2014 19:28:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MJS56n026042; Wed, 22 Jan 2014 19:28:05 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MJS5d6026041; Wed, 22 Jan 2014 19:28:05 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201401221928.s0MJS5d6026041@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 22 Jan 2014 19:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r261036 - vendor-crypto/openssl/1.0.1f X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:28:05 -0000 Author: jkim Date: Wed Jan 22 19:28:04 2014 New Revision: 261036 URL: http://svnweb.freebsd.org/changeset/base/261036 Log: Tag OpenSSL 1.0.1f. Added: vendor-crypto/openssl/1.0.1f/ - copied from r261035, vendor-crypto/openssl/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 19:57:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E45D7DFB; Wed, 22 Jan 2014 19:57:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB54D1D7D; Wed, 22 Jan 2014 19:57:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MJvEjt037035; Wed, 22 Jan 2014 19:57:14 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MJvBu0037015; Wed, 22 Jan 2014 19:57:11 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201401221957.s0MJvBu0037015@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 22 Jan 2014 19:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261037 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn c... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:57:15 -0000 Author: jkim Date: Wed Jan 22 19:57:11 2014 New Revision: 261037 URL: http://svnweb.freebsd.org/changeset/base/261037 Log: Merge OpenSSL 1.0.1f. Approved by: so (delphij), benl (silence) Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/Makefile head/crypto/openssl/Makefile.org head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/Makefile head/crypto/openssl/apps/apps.h head/crypto/openssl/apps/openssl.c head/crypto/openssl/apps/pkcs12.c head/crypto/openssl/config head/crypto/openssl/crypto/Makefile head/crypto/openssl/crypto/aes/asm/aes-parisc.pl head/crypto/openssl/crypto/aes/asm/bsaes-x86_64.pl head/crypto/openssl/crypto/armcap.c head/crypto/openssl/crypto/asn1/a_int.c head/crypto/openssl/crypto/bio/bss_dgram.c head/crypto/openssl/crypto/bn/Makefile head/crypto/openssl/crypto/bn/asm/mips-mont.pl head/crypto/openssl/crypto/bn/asm/mips.pl head/crypto/openssl/crypto/bn/asm/parisc-mont.pl head/crypto/openssl/crypto/bn/asm/x86_64-gf2m.pl head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl head/crypto/openssl/crypto/bn/bn_nist.c head/crypto/openssl/crypto/buffer/buffer.c head/crypto/openssl/crypto/buffer/buffer.h head/crypto/openssl/crypto/ec/ec_ameth.c head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ec_lib.c head/crypto/openssl/crypto/engine/eng_rdrand.c head/crypto/openssl/crypto/evp/Makefile head/crypto/openssl/crypto/evp/digest.c head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c head/crypto/openssl/crypto/evp/e_des3.c head/crypto/openssl/crypto/evp/p5_crpt2.c head/crypto/openssl/crypto/modes/Makefile head/crypto/openssl/crypto/modes/asm/ghash-parisc.pl head/crypto/openssl/crypto/modes/cbc128.c head/crypto/openssl/crypto/modes/ccm128.c head/crypto/openssl/crypto/modes/cts128.c head/crypto/openssl/crypto/modes/gcm128.c head/crypto/openssl/crypto/modes/modes_lcl.h head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/pariscid.pl head/crypto/openssl/crypto/pem/pem_info.c head/crypto/openssl/crypto/pkcs12/p12_crt.c head/crypto/openssl/crypto/rand/md_rand.c head/crypto/openssl/crypto/rand/rand.h head/crypto/openssl/crypto/rand/rand_err.c head/crypto/openssl/crypto/rand/rand_lib.c head/crypto/openssl/crypto/rc4/asm/rc4-parisc.pl head/crypto/openssl/crypto/rsa/rsa_ameth.c head/crypto/openssl/crypto/rsa/rsa_chk.c head/crypto/openssl/crypto/rsa/rsa_pmeth.c head/crypto/openssl/crypto/sha/Makefile head/crypto/openssl/crypto/sha/asm/sha1-parisc.pl head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl head/crypto/openssl/crypto/sha/asm/sha512-mips.pl head/crypto/openssl/crypto/sha/asm/sha512-parisc.pl head/crypto/openssl/crypto/sha/sha512.c head/crypto/openssl/crypto/srp/srp_grps.h head/crypto/openssl/crypto/srp/srp_lib.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509/x_all.c head/crypto/openssl/crypto/x86cpuid.pl head/crypto/openssl/doc/apps/cms.pod head/crypto/openssl/doc/apps/rsa.pod head/crypto/openssl/doc/apps/smime.pod head/crypto/openssl/doc/crypto/X509_STORE_CTX_get_error.pod head/crypto/openssl/doc/crypto/ecdsa.pod head/crypto/openssl/doc/ssl/SSL_COMP_add_compression_method.pod head/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod head/crypto/openssl/doc/ssl/SSL_CTX_load_verify_locations.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_session_id_context.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_ssl_version.pod head/crypto/openssl/doc/ssl/SSL_CTX_use_psk_identity_hint.pod head/crypto/openssl/doc/ssl/SSL_accept.pod head/crypto/openssl/doc/ssl/SSL_clear.pod head/crypto/openssl/doc/ssl/SSL_connect.pod head/crypto/openssl/doc/ssl/SSL_do_handshake.pod head/crypto/openssl/doc/ssl/SSL_read.pod head/crypto/openssl/doc/ssl/SSL_session_reused.pod head/crypto/openssl/doc/ssl/SSL_set_fd.pod head/crypto/openssl/doc/ssl/SSL_set_session.pod head/crypto/openssl/doc/ssl/SSL_shutdown.pod head/crypto/openssl/doc/ssl/SSL_write.pod head/crypto/openssl/engines/ccgost/gost89.h head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_clnt.c head/crypto/openssl/ssl/d1_lib.c head/crypto/openssl/ssl/d1_pkt.c head/crypto/openssl/ssl/d1_srvr.c head/crypto/openssl/ssl/s23_clnt.c head/crypto/openssl/ssl/s3_both.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssl3.h head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/ssltest.c head/crypto/openssl/ssl/t1_enc.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/util/shlib_wrap.sh head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/amd64/bsaes-x86_64.S head/secure/lib/libcrypto/i386/x86cpuid.s head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_add1_signer.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/CHANGES Wed Jan 22 19:57:11 2014 (r261037) @@ -2,9 +2,31 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1e and 1.0.1f [6 Jan 2014] + + *) Fix for TLS record tampering bug. A carefully crafted invalid + handshake could crash OpenSSL with a NULL pointer exception. + Thanks to Anton Johansson for reporting this issues. + (CVE-2013-4353) + + *) Keep original DTLS digest and encryption contexts in retransmission + structures so we can use the previous session parameters if they need + to be resent. (CVE-2013-6450) + [Steve Henson] + + *) Add option SSL_OP_SAFARI_ECDHE_ECDSA_BUG (part of SSL_OP_ALL) which + avoids preferring ECDHE-ECDSA ciphers when the client appears to be + Safari on OS X. Safari on OS X 10.8..10.8.3 advertises support for + several ECDHE-ECDSA ciphers, but fails to negotiate them. The bug + is fixed in OS X 10.8.4, but Apple have ruled out both hot fixing + 10.8..10.8.3 and forcing users to upgrade to 10.8.4 or newer. + [Rob Stradling, Adam Langley] + Changes between 1.0.1d and 1.0.1e [11 Feb 2013] - *) + *) Correct fix for CVE-2013-0169. The original didn't work on AES-NI + supporting platforms or when small records were transferred. + [Andy Polyakov, Steve Henson] Changes between 1.0.1c and 1.0.1d [5 Feb 2013] @@ -404,6 +426,63 @@ Add command line options to s_client/s_server. [Steve Henson] + Changes between 1.0.0j and 1.0.0k [5 Feb 2013] + + *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. + + This addresses the flaw in CBC record processing discovered by + Nadhem Alfardan and Kenny Paterson. Details of this attack can be found + at: http://www.isg.rhul.ac.uk/tls/ + + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and + Emilia Käsper for the initial patch. + (CVE-2013-0169) + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + + *) Return an error when checking OCSP signatures when key is NULL. + This fixes a DoS attack. (CVE-2013-0166) + [Steve Henson] + + *) Call OCSP Stapling callback after ciphersuite has been chosen, so + the right response is stapled. Also change SSL_get_certificate() + so it returns the certificate actually sent. + See http://rt.openssl.org/Ticket/Display.html?id=2836. + (This is a backport) + [Rob Stradling ] + + *) Fix possible deadlock when decoding public keys. + [Steve Henson] + + Changes between 1.0.0i and 1.0.0j [10 May 2012] + + [NB: OpenSSL 1.0.0i and later 1.0.0 patch levels were released after + OpenSSL 1.0.1.] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 1.0.0h and 1.0.0i [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + Changes between 1.0.0g and 1.0.0h [12 Mar 2012] *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness @@ -1394,6 +1473,86 @@ *) Change 'Configure' script to enable Camellia by default. [NTT] + Changes between 0.9.8x and 0.9.8y [5 Feb 2013] + + *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. + + This addresses the flaw in CBC record processing discovered by + Nadhem Alfardan and Kenny Paterson. Details of this attack can be found + at: http://www.isg.rhul.ac.uk/tls/ + + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and + Emilia Käsper for the initial patch. + (CVE-2013-0169) + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + + *) Return an error when checking OCSP signatures when key is NULL. + This fixes a DoS attack. (CVE-2013-0166) + [Steve Henson] + + *) Call OCSP Stapling callback after ciphersuite has been chosen, so + the right response is stapled. Also change SSL_get_certificate() + so it returns the certificate actually sent. + See http://rt.openssl.org/Ticket/Display.html?id=2836. + (This is a backport) + [Rob Stradling ] + + *) Fix possible deadlock when decoding public keys. + [Steve Henson] + + Changes between 0.9.8w and 0.9.8x [10 May 2012] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + + *) The fix for CVE-2012-2110 did not take into account that the + 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an + int in OpenSSL 0.9.8, making it still vulnerable. Fix by + rejecting negative len parameter. (CVE-2012-2131) + [Tomas Hoger ] + + Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + + Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + + *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness + in CMS and PKCS7 code. When RSA decryption fails use a random key for + content decryption and always return the same error. Note: this attack + needs on average 2^20 messages so it only affects automated senders. The + old behaviour can be reenabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where + an MMA defence is not necessary. + Thanks to Ivan Nestlerode for discovering + this issue. (CVE-2012-0884) + [Steve Henson] + + *) Fix CVE-2011-4619: make sure we really are receiving a + client hello before rejecting multiple SGC restarts. Thanks to + Ivan Nestlerode for discovering this bug. + [Steve Henson] + Changes between 0.9.8s and 0.9.8t [18 Jan 2012] *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. @@ -1401,7 +1560,7 @@ Development, Cisco Systems, Inc. for discovering this bug and preparing a fix. (CVE-2012-0050) [Antonio Martin] - + Changes between 0.9.8r and 0.9.8s [4 Jan 2012] *) Nadhem Alfardan and Kenny Paterson have discovered an extension Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/Configure Wed Jan 22 19:57:11 2014 (r261037) @@ -178,7 +178,7 @@ my %table=( "debug-ben-no-opt", "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-bodo", "gcc:$gcc_devteam_warn -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"debug-bodo", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", "debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -Wno-overlength-strings -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/Makefile Wed Jan 22 19:57:11 2014 (r261037) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1e +VERSION=1.0.1f MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -304,7 +304,8 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_ FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \ export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \ fi; \ - $(MAKE) -e SHLIBDIRS=crypto build-shared; \ + $(MAKE) -e SHLIBDIRS=crypto CC=$${CC:-$(CC)} build-shared; \ + touch -c fips_premain_dso$(EXE_EXT); \ else \ echo "There's no support for shared libraries on this platform" >&2; \ exit 1; \ Modified: head/crypto/openssl/Makefile.org ============================================================================== --- head/crypto/openssl/Makefile.org Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/Makefile.org Wed Jan 22 19:57:11 2014 (r261037) @@ -302,7 +302,8 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_ FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \ export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \ fi; \ - $(MAKE) -e SHLIBDIRS=crypto build-shared; \ + $(MAKE) -e SHLIBDIRS=crypto CC=$${CC:-$(CC)} build-shared; \ + touch -c fips_premain_dso$(EXE_EXT); \ else \ echo "There's no support for shared libraries on this platform" >&2; \ exit 1; \ Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/NEWS Wed Jan 22 19:57:11 2014 (r261037) @@ -5,11 +5,17 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. - Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e: + Major changes between OpenSSL 1.0.1e and OpenSSL 1.0.1f [6 Jan 2014] + + o Fix for TLS record tampering bug CVE-2013-4353 + o Fix for TLS version checking bug CVE-2013-6449 + o Fix for DTLS retransmission bug CVE-2013-6450 + + Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e [11 Feb 2013]: o Corrected fix for CVE-2013-0169 - Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d: + Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d [4 Feb 2013]: o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version. o Include the fips configuration module. @@ -17,24 +23,24 @@ o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 o Fix for TLS AESNI record handling flaw CVE-2012-2686 - Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c: + Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c [10 May 2012]: o Fix TLS/DTLS record length checking bug CVE-2012-2333 o Don't attempt to use non-FIPS composite ciphers in FIPS mode. - Major changes between OpenSSL 1.0.1a and OpenSSL 1.0.1b: + Major changes between OpenSSL 1.0.1a and OpenSSL 1.0.1b [26 Apr 2012]: o Fix compilation error on non-x86 platforms. o Make FIPS capable OpenSSL ciphers work in non-FIPS mode. o Fix SSL_OP_NO_TLSv1_1 clash with SSL_OP_ALL in OpenSSL 1.0.0 - Major changes between OpenSSL 1.0.1 and OpenSSL 1.0.1a: + Major changes between OpenSSL 1.0.1 and OpenSSL 1.0.1a [19 Apr 2012]: o Fix for ASN1 overflow bug CVE-2012-2110 o Workarounds for some servers that hang on long client hellos. o Fix SEGV in AES code. - Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.1: + Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.1 [14 Mar 2012]: o TLS/DTLS heartbeat support. o SCTP support. @@ -47,17 +53,30 @@ o Preliminary FIPS capability for unvalidated 2.0 FIPS module. o SRP support. - Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h: + Major changes between OpenSSL 1.0.0j and OpenSSL 1.0.0k [5 Feb 2013]: + + o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 + o Fix OCSP bad key DoS attack CVE-2013-0166 + + Major changes between OpenSSL 1.0.0i and OpenSSL 1.0.0j [10 May 2012]: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.0i [19 Apr 2012]: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h [12 Mar 2012]: o Fix for CMS/PKCS#7 MMA CVE-2012-0884 o Corrected fix for CVE-2011-4619 o Various DTLS fixes. - Major changes between OpenSSL 1.0.0f and OpenSSL 1.0.0g: + Major changes between OpenSSL 1.0.0f and OpenSSL 1.0.0g [18 Jan 2012]: o Fix for DTLS DoS issue CVE-2012-0050 - Major changes between OpenSSL 1.0.0e and OpenSSL 1.0.0f: + Major changes between OpenSSL 1.0.0e and OpenSSL 1.0.0f [4 Jan 2012]: o Fix for DTLS plaintext recovery attack CVE-2011-4108 o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 @@ -65,7 +84,7 @@ o Check parameters are not NULL in GOST ENGINE CVE-2012-0027 o Check for malformed RFC3779 data CVE-2011-4577 - Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e: + Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e [6 Sep 2011]: o Fix for CRL vulnerability issue CVE-2011-3207 o Fix for ECDH crashes CVE-2011-3210 @@ -73,11 +92,11 @@ o Support ECDH ciphersuites for certificates using SHA2 algorithms. o Various DTLS fixes. - Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d: + Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d [8 Feb 2011]: o Fix for security issue CVE-2011-0014 - Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c: + Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c [2 Dec 2010]: o Fix for security issue CVE-2010-4180 o Fix for CVE-2010-4252 @@ -85,18 +104,18 @@ o Fix various platform compilation issues. o Corrected fix for security issue CVE-2010-3864. - Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b: + Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b [16 Nov 2010]: o Fix for security issue CVE-2010-3864. o Fix for CVE-2010-2939 o Fix WIN32 build system for GOST ENGINE. - Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a: + Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a [1 Jun 2010]: o Fix for security issue CVE-2010-1633. o GOST MAC and CFB fixes. - Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0: + Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0 [29 Mar 2010]: o RFC3280 path validation: sufficient to process PKITS tests. o Integrated support for PVK files and keyblobs. @@ -119,20 +138,55 @@ o Opaque PRF Input TLS extension support. o Updated time routines to avoid OS limitations. - Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y [5 Feb 2013]: + + o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 + o Fix OCSP bad key DoS attack CVE-2013-0166 + + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x [10 May 2012]: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w [23 Apr 2012]: + + o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) + + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v [19 Apr 2012]: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u [12 Mar 2012]: + + o Fix for CMS/PKCS#7 MMA CVE-2012-0884 + o Corrected fix for CVE-2011-4619 + o Various DTLS fixes. + + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t [18 Jan 2012]: + + o Fix for DTLS DoS issue CVE-2012-0050 + + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s [4 Jan 2012]: + + o Fix for DTLS plaintext recovery attack CVE-2011-4108 + o Fix policy check double free error CVE-2011-4109 + o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 + o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 + o Check for malformed RFC3779 data CVE-2011-4577 + + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r [8 Feb 2011]: o Fix for security issue CVE-2011-0014 - Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q [2 Dec 2010]: o Fix for security issue CVE-2010-4180 o Fix for CVE-2010-4252 - Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p: + Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p [16 Nov 2010]: o Fix for security issue CVE-2010-3864. - Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o: + Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o [1 Jun 2010]: o Fix for security issue CVE-2010-0742. o Various DTLS fixes. @@ -140,12 +194,12 @@ o Fix for no-rc4 compilation. o Chil ENGINE unload workaround. - Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n: + Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n [24 Mar 2010]: o CFB cipher definition fixes. o Fix security issues CVE-2010-0740 and CVE-2010-0433. - Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m: + Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m [25 Feb 2010]: o Cipher definition fixes. o Workaround for slow RAND_poll() on some WIN32 versions. @@ -157,33 +211,33 @@ o Ticket and SNI coexistence fixes. o Many fixes to DTLS handling. - Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l: + Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l [5 Nov 2009]: o Temporary work around for CVE-2009-3555: disable renegotiation. - Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k: + Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k [25 Mar 2009]: o Fix various build issues. o Fix security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789) - Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j: + Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j [7 Jan 2009]: o Fix security issue (CVE-2008-5077) o Merge FIPS 140-2 branch code. - Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h: + Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h [28 May 2008]: o CryptoAPI ENGINE support. o Various precautionary measures. o Fix for bugs affecting certificate request creation. o Support for local machine keyset attribute in PKCS#12 files. - Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g: + Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g [19 Oct 2007]: o Backport of CMS functionality to 0.9.8. o Fixes for bugs introduced with 0.9.8f. - Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f: + Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f [11 Oct 2007]: o Add gcc 4.2 support. o Add support for AES and SSE2 assembly lanugauge optimization @@ -194,23 +248,23 @@ o RFC4507bis support. o TLS Extensions support. - Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e: + Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e [23 Feb 2007]: o Various ciphersuite selection fixes. o RFC3779 support. - Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d: + Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) o Changes to ciphersuite selection algorithm - Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c: + Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 o New cipher Camellia - Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b: + Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b [4 May 2006]: o Cipher string fixes. o Fixes for VC++ 2005. @@ -220,12 +274,12 @@ o Built in dynamic engine compilation support on Win32. o Fixes auto dynamic engine loading in Win32. - Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a: + Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a [11 Oct 2005]: o Fix potential SSL 2.0 rollback, CVE-2005-2969 o Extended Windows CE support - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8 [5 Jul 2005]: o Major work on the BIGNUM library for higher efficiency and to make operations more streamlined and less contradictory. This @@ -299,36 +353,36 @@ o Added initial support for Win64. o Added alternate pkg-config files. - Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m [23 Feb 2007]: o FIPS 1.1.1 module linking. o Various ciphersuite selection fixes. - Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l [28 Sep 2006]: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) - Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k: + Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k [5 Sep 2006]: o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 - Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j: + Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j [4 May 2006]: o Visual C++ 2005 fixes. o Update Windows build system for FIPS. - Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i: + Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i [14 Oct 2005]: o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build. - Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h: + Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h [11 Oct 2005]: o Fix SSL 2.0 Rollback, CVE-2005-2969 o Allow use of fixed-length exponent on DSA signing o Default fixed-window RSA, DSA, DH private-key operations - Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g: + Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g [11 Apr 2005]: o More compilation issues fixed. o Adaptation to more modern Kerberos API. @@ -337,7 +391,7 @@ o More constification. o Added processing of proxy certificates (RFC 3820). - Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f: + Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f [22 Mar 2005]: o Several compilation issues fixed. o Many memory allocation failure checks added. @@ -345,12 +399,12 @@ o Mandatory basic checks on certificates. o Performance improvements. - Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e: + Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e [25 Oct 2004]: o Fix race condition in CRL checking code. o Fixes to PKCS#7 (S/MIME) code. - Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d: + Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d [17 Mar 2004]: o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug o Security: Fix null-pointer assignment in do_change_cipher_spec() @@ -358,14 +412,14 @@ o Multiple X509 verification fixes o Speed up HMAC and other operations - Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c: + Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o New -ignore_err option to OCSP utility. o Various interop and bug fixes in S/MIME code. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b: + Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack @@ -376,7 +430,7 @@ o ASN.1: treat domainComponent correctly. o Documentation: fixes and additions. - Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a: + Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a [19 Feb 2003]: o Security: Important security related bugfixes. o Enhanced compatibility with MIT Kerberos. @@ -387,7 +441,7 @@ o SSL/TLS: now handles manual certificate chain building. o SSL/TLS: certain session ID malfunctions corrected. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7 [30 Dec 2002]: o New library section OCSP. o Complete rewrite of ASN1 code. @@ -433,23 +487,23 @@ o SSL/TLS: add callback to retrieve SSL/TLS messages. o SSL/TLS: support AES cipher suites (RFC3268). - Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k: + Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k [30 Sep 2003]: o Security: fix various ASN1 parsing bugs. o SSL/TLS protocol fix for unrequested client certificates. - Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j: + Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j [10 Apr 2003]: o Security: counter the Klima-Pokorny-Rosa extension of Bleichbacher's attack o Security: make RSA blinding default. o Build: shared library support fixes. - Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i: + Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i [19 Feb 2003]: o Important security related bugfixes. - Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h: + Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h [5 Dec 2002]: o New configuration targets for Tandem OSS and A/UX. o New OIDs for Microsoft attributes. @@ -463,25 +517,25 @@ o Fixes for smaller building problems. o Updates of manuals, FAQ and other instructive documents. - Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g: + Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g [9 Aug 2002]: o Important building fixes on Unix. - Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f: + Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f [8 Aug 2002]: o Various important bugfixes. - Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e: + Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e [30 Jul 2002]: o Important security related bugfixes. o Various SSL/TLS library bugfixes. - Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d: + Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d [9 May 2002]: o Various SSL/TLS library bugfixes. o Fix DH parameter generation for 'non-standard' generators. - Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c: + Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c [21 Dec 2001]: o Various SSL/TLS library bugfixes. o BIGNUM library fixes. @@ -494,7 +548,7 @@ Broadcom and Cryptographic Appliance's keyserver [in 0.9.6c-engine release]. - Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b: + Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b [9 Jul 2001]: o Security fix: PRNG improvements. o Security fix: RSA OAEP check. @@ -511,7 +565,7 @@ o Increase default size for BIO buffering filter. o Compatibility fixes in some scripts. - Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a: + Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a [5 Apr 2001]: o Security fix: change behavior of OpenSSL to avoid using environment variables when running as root. @@ -536,7 +590,7 @@ o New function BN_rand_range(). o Add "-rand" option to openssl s_client and s_server. - Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6: + Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6 [10 Oct 2000]: o Some documentation for BIO and SSL libraries. o Enhanced chain verification using key identifiers. @@ -551,7 +605,7 @@ [1] The support for external crypto devices is currently a separate distribution. See the file README.ENGINE. - Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a: + Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a [1 Apr 2000]: o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8 o Shared library support for HPUX and Solaris-gcc @@ -560,7 +614,7 @@ o New 'rand' application o New way to check for existence of algorithms from scripts - Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5: + Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5 [25 May 2000]: o S/MIME support in new 'smime' command o Documentation for the OpenSSL command line application @@ -596,7 +650,7 @@ o Enhanced support for Alpha Linux o Experimental MacOS support - Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4: + Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4 [9 Aug 1999]: o Transparent support for PKCS#8 format private keys: these are used by several software packages and are more secure than the standard @@ -607,7 +661,7 @@ o New pipe-like BIO that allows using the SSL library when actual I/O must be handled by the application (BIO pair) - Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3: + Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3 [24 May 1999]: o Lots of enhancements and cleanups to the Configuration mechanism o RSA OEAP related fixes o Added `openssl ca -revoke' option for revoking a certificate @@ -621,7 +675,7 @@ o Sparc assembler bignum implementation, optimized hash functions o Option to disable selected ciphers - Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b: + Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b [22 Mar 1999]: o Fixed a security hole related to session resumption o Fixed RSA encryption routines for the p < q case o "ALL" in cipher lists now means "everything except NULL ciphers" @@ -643,7 +697,7 @@ o Lots of memory leak fixes. o Lots of bug fixes. - Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c: + Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c [23 Dec 1998]: o Integration of the popular NO_RSA/NO_DSA patches o Initial support for compression inside the SSL record layer o Added BIO proxy and filtering functionality Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/README Wed Jan 22 19:57:11 2014 (r261037) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1e 11 Feb 2013 + OpenSSL 1.0.1f 6 Jan 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/Makefile ============================================================================== --- head/crypto/openssl/apps/Makefile Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/apps/Makefile Wed Jan 22 19:57:11 2014 (r261037) @@ -577,14 +577,15 @@ openssl.o: ../include/openssl/objects.h openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -openssl.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h -openssl.o: ../include/openssl/sha.h ../include/openssl/srtp.h -openssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -openssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -openssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -openssl.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -openssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -openssl.o: ../include/openssl/x509v3.h apps.h openssl.c progs.h s_apps.h +openssl.o: ../include/openssl/pqueue.h ../include/openssl/rand.h +openssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +openssl.o: ../include/openssl/srtp.h ../include/openssl/ssl.h +openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +openssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +openssl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +openssl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +openssl.o: openssl.c progs.h s_apps.h passwd.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h passwd.o: ../include/openssl/buffer.h ../include/openssl/conf.h passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h Modified: head/crypto/openssl/apps/apps.h ============================================================================== --- head/crypto/openssl/apps/apps.h Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/apps/apps.h Wed Jan 22 19:57:11 2014 (r261037) @@ -188,6 +188,7 @@ extern BIO *bio_err; do { CONF_modules_unload(1); destroy_ui_method(); \ OBJ_cleanup(); EVP_cleanup(); ENGINE_cleanup(); \ CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \ + RAND_cleanup(); \ ERR_free_strings(); zlib_cleanup();} while(0) # else # define apps_startup() \ @@ -198,6 +199,7 @@ extern BIO *bio_err; do { CONF_modules_unload(1); destroy_ui_method(); \ OBJ_cleanup(); EVP_cleanup(); \ CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \ + RAND_cleanup(); \ ERR_free_strings(); zlib_cleanup(); } while(0) # endif #endif Modified: head/crypto/openssl/apps/openssl.c ============================================================================== --- head/crypto/openssl/apps/openssl.c Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/apps/openssl.c Wed Jan 22 19:57:11 2014 (r261037) @@ -117,6 +117,7 @@ #include "apps.h" #include #include +#include #include #include #include Modified: head/crypto/openssl/apps/pkcs12.c ============================================================================== --- head/crypto/openssl/apps/pkcs12.c Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/apps/pkcs12.c Wed Jan 22 19:57:11 2014 (r261037) @@ -112,7 +112,7 @@ int MAIN(int argc, char **argv) int maciter = PKCS12_DEFAULT_ITER; int twopass = 0; int keytype = 0; - int cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC; + int cert_pbe; int key_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; int ret = 1; int macver = 1; @@ -130,6 +130,13 @@ int MAIN(int argc, char **argv) apps_startup(); +#ifdef OPENSSL_FIPS + if (FIPS_mode()) + cert_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; + else +#endif + cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC; + enc = EVP_des_ede3_cbc(); if (bio_err == NULL ) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE); Modified: head/crypto/openssl/config ============================================================================== --- head/crypto/openssl/config Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/config Wed Jan 22 19:57:11 2014 (r261037) @@ -739,7 +739,7 @@ case "$GUESSOS" in libc=/usr/lib/libc.so else # OpenBSD # ld searches for highest libc.so.* and so do we - libc=`(ls /usr/lib/libc.so.* | tail -1) 2>/dev/null` + libc=`(ls /usr/lib/libc.so.* /lib/libc.so.* | tail -1) 2>/dev/null` fi case "`(file -L $libc) 2>/dev/null`" in *ELF*) OUT="BSD-x86-elf" ;; Modified: head/crypto/openssl/crypto/Makefile ============================================================================== --- head/crypto/openssl/crypto/Makefile Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/crypto/Makefile Wed Jan 22 19:57:11 2014 (r261037) @@ -78,7 +78,9 @@ ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@ pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@ alphacpuid.s: alphacpuid.pl - $(PERL) $< | $(CC) -E - | tee $@ > /dev/null + (preproc=/tmp/$$$$.$@; trap "rm $$preproc" INT; \ + $(PERL) alphacpuid.pl > $$preproc && \ + $(CC) -E $$preproc > $@ && rm $$preproc) testapps: [ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \ Modified: head/crypto/openssl/crypto/aes/asm/aes-parisc.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aes-parisc.pl Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/crypto/aes/asm/aes-parisc.pl Wed Jan 22 19:57:11 2014 (r261037) @@ -1015,7 +1015,8 @@ foreach (split("\n",$code)) { $SIZE_T==4 ? sprintf("extru%s,%d,8,",$1,31-$2) : sprintf("extrd,u%s,%d,8,",$1,63-$2)/e; - s/,\*/,/ if ($SIZE_T==4); + s/,\*/,/ if ($SIZE_T==4); + s/\bbv\b(.*\(%r2\))/bve$1/ if ($SIZE_T==8); print $_,"\n"; } close STDOUT; Modified: head/crypto/openssl/crypto/aes/asm/bsaes-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/bsaes-x86_64.pl Wed Jan 22 19:28:04 2014 (r261036) +++ head/crypto/openssl/crypto/aes/asm/bsaes-x86_64.pl Wed Jan 22 19:57:11 2014 (r261037) @@ -83,9 +83,9 @@ # Add decryption procedure. Performance in CPU cycles spent to decrypt # one byte out of 4096-byte buffer with 128-bit key is: # -# Core 2 11.0 -# Nehalem 9.16 -# Atom 20.9 +# Core 2 9.83 +# Nehalem 7.74 +# Atom 19.0 # # November 2011. # @@ -456,6 +456,7 @@ sub MixColumns { # modified to emit output in order suitable for feeding back to aesenc[last] my @x=@_[0..7]; my @t=@_[8..15]; +my $inv=@_[16]; # optional $code.=<<___; pshufd \$0x93, @x[0], @t[0] # x0 <<< 32 pshufd \$0x93, @x[1], @t[1] @@ -497,7 +498,8 @@ $code.=<<___; pxor @t[4], @t[0] pshufd \$0x4E, @x[2], @x[6] pxor @t[5], @t[1] - +___ +$code.=<<___ if (!$inv); pxor @t[3], @x[4] pxor @t[7], @x[5] pxor @t[6], @x[3] @@ -505,9 +507,20 @@ $code.=<<___; pxor @t[2], @x[6] movdqa @t[1], @x[7] ___ +$code.=<<___ if ($inv); + pxor @x[4], @t[3] + pxor @t[7], @x[5] + pxor @x[3], @t[6] + movdqa @t[0], @x[3] + pxor @t[2], @x[6] + movdqa @t[6], @x[2] + movdqa @t[1], @x[7] + movdqa @x[6], @x[4] + movdqa @t[3], @x[6] +___ } -sub InvMixColumns { +sub InvMixColumns_orig { my @x=@_[0..7]; my @t=@_[8..15]; @@ -661,6 +674,54 @@ $code.=<<___; ___ } +sub InvMixColumns { +my @x=@_[0..7]; +my @t=@_[8..15]; + +# Thanks to Jussi Kivilinna for providing pointer to +# +# | 0e 0b 0d 09 | | 02 03 01 01 | | 05 00 04 00 | +# | 09 0e 0b 0d | = | 01 02 03 01 | x | 00 05 00 04 | +# | 0d 09 0e 0b | | 01 01 02 03 | | 04 00 05 00 | +# | 0b 0d 09 0e | | 03 01 01 02 | | 00 04 00 05 | + +$code.=<<___; + # multiplication by 0x05-0x00-0x04-0x00 + pshufd \$0x4E, @x[0], @t[0] + pshufd \$0x4E, @x[6], @t[6] + pxor @x[0], @t[0] + pshufd \$0x4E, @x[7], @t[7] + pxor @x[6], @t[6] + pshufd \$0x4E, @x[1], @t[1] + pxor @x[7], @t[7] + pshufd \$0x4E, @x[2], @t[2] + pxor @x[1], @t[1] + pshufd \$0x4E, @x[3], @t[3] + pxor @x[2], @t[2] + pxor @t[6], @x[0] + pxor @t[6], @x[1] + pshufd \$0x4E, @x[4], @t[4] + pxor @x[3], @t[3] + pxor @t[0], @x[2] + pxor @t[1], @x[3] + pshufd \$0x4E, @x[5], @t[5] + pxor @x[4], @t[4] + pxor @t[7], @x[1] + pxor @t[2], @x[4] + pxor @x[5], @t[5] + + pxor @t[7], @x[2] + pxor @t[6], @x[3] + pxor @t[6], @x[4] + pxor @t[3], @x[5] + pxor @t[4], @x[6] + pxor @t[7], @x[4] + pxor @t[7], @x[5] + pxor @t[5], @x[7] +___ + &MixColumns (@x,@t,1); # flipped 2<->3 and 4<->6 +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 20:29:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D93418F3; Wed, 22 Jan 2014 20:29:55 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC5B71FF0; Wed, 22 Jan 2014 20:29:55 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 97A8BB964; Wed, 22 Jan 2014 15:29:54 -0500 (EST) From: John Baldwin To: Alfred Perlstein Subject: Re: svn commit: r260898 - head/sys/kern Date: Wed, 22 Jan 2014 15:27:12 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <20140122181443.GU75135@funkthat.com> <52E016BF.80102@freebsd.org> In-Reply-To: <52E016BF.80102@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201401221527.12779.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 22 Jan 2014 15:29:54 -0500 (EST) Cc: src-committers@freebsd.org, Scott Long , Neel Natu , John-Mark Gurney , svn-src-all@freebsd.org, Rui Paulo , svn-src-head@freebsd.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:29:56 -0000 On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote: > > On 1/22/14, 10:14 AM, John-Mark Gurney wrote: > > Scott Long wrote this message on Tue, Jan 21, 2014 at 15:12 -0700: > >> On Jan 21, 2014, at 9:26 AM, John Baldwin wrote: > >> > >>> On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote: > >>>> On Mon, 20 Jan 2014 11:32:29 -0500 > >>>> John Baldwin wrote: > >>>> > >>>>> On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > >>>>>> On 19 Jan 2014, at 17:59, Neel Natu wrote: > >>>>>>> Author: neel > >>>>>>> Date: Mon Jan 20 01:59:35 2014 > >>>>>>> New Revision: 260898 > >>>>>>> URL: http://svnweb.freebsd.org/changeset/base/260898 > >>>>>>> > >>>>>>> Log: > >>>>>>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient > >>>>>>> entries for > >>>>>>> WITNESS to actually work. > >>>>>> This value should be automatically tuned... > >>>>> How do you propose to do so? This is the count of locks initialized > >>>>> before witness' own SYSINIT is executed and the array it sizes is > >>>>> allocated statically at compile time. This used to not be a static > >>>>> array, but an intrusive list embedded in locks themselves, but we > >>>>> decided to shave a pointer off of each lock that was only used for > >>>>> that and to use a statically sized table instead. > >>>>> > >>>>> -- > >>>>> John Baldwin > >>>> As + * MAXCPU, as evidently most recent > >>>> overflows reported were caused by jacking MAXCPU up from its default > >>>> value? > >>> If raising MAXCPU changes the number of unique lock names used, then the > >>> locks are named incorrectly. We don't use the 'pid' in the name for > >>> PROC_LOCK precisely so that WITNESS will treat them all the same so > >>> that if if it learns a lock order for pid 37 it enforces the same lock > >>> order for pid 38. Device locks should follow a similar rule. They > >>> should generally not include the device name (and in some cases they > >>> really shouldn't even have the driver name). > >> Why shouldn?t they have a driver and device name? Wouldn?t it help identify > >> possible deadlocks from driver instances calling into each other? > > Locks have a name and a type. The type is used for witness, but if it > > is NULL, the name is used. So you could if you wanted, create a common > > type, and then put driver/device name in name, but the passed in strings > > to both name and type have to be stable storage (only the pointer is > > stored), so you can't use a stack variable to construct it. > > > Hmm, what if locks had a pointer to a 2 element char * array, the first > being the name, the second the type. That would keep the size of the > lock down and most locks could share a common tuple of name/type in each > subsystem. This would allow us to get rid of the pending static list. > > effectively: > struct lock_object { > char *lo_name; /* Individual lock name. */ > u_int lo_flags; > u_int lo_data; /* General class specific data. */ > struct witness *lo_witness; /* Data for witness. */ > }; > > would change to: > struct lock_object { > char **lo_name_type; /* Individual lock > name[0]/type[1]. */ > u_int lo_flags; > u_int lo_data; /* General class specific data. */ > struct witness *lo_witness; /* Data for witness. */ > }; > > This may be somewhat disruptive, I haven't played with how it would > actually change driver/etc/code. Where would the memory for the char* array come from? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 20:59:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89250701; Wed, 22 Jan 2014 20:59:43 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 6FB5A12C6; Wed, 22 Jan 2014 20:59:43 +0000 (UTC) Received: from Alfreds-MacBook-Pro.local (unknown [50.204.88.5]) by elvis.mu.org (Postfix) with ESMTPSA id 95DC21A3C26; Wed, 22 Jan 2014 12:59:39 -0800 (PST) Message-ID: <52E03139.2020902@freebsd.org> Date: Wed, 22 Jan 2014 12:59:37 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r260898 - head/sys/kern References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <20140122181443.GU75135@funkthat.com> <52E016BF.80102@freebsd.org> <201401221527.12779.jhb@freebsd.org> In-Reply-To: <201401221527.12779.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Scott Long , Neel Natu , John-Mark Gurney , svn-src-all@freebsd.org, Rui Paulo , svn-src-head@freebsd.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:59:43 -0000 On 1/22/14, 12:27 PM, John Baldwin wrote: > On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote: >> Hmm, what if locks had a pointer to a 2 element char * array, the first >> being the name, the second the type. That would keep the size of the >> lock down and most locks could share a common tuple of name/type in each >> subsystem. This would allow us to get rid of the pending static list. >> >> effectively: >> struct lock_object { >> char *lo_name; /* Individual lock name. */ >> u_int lo_flags; >> u_int lo_data; /* General class specific data. */ >> struct witness *lo_witness; /* Data for witness. */ >> }; >> >> would change to: >> struct lock_object { >> char **lo_name_type; /* Individual lock >> name[0]/type[1]. */ >> u_int lo_flags; >> u_int lo_data; /* General class specific data. */ >> struct witness *lo_witness; /* Data for witness. */ >> }; >> >> This may be somewhat disruptive, I haven't played with how it would >> actually change driver/etc/code. > Where would the memory for the char* array come from? > That is a good question. I suspect it would be up to the subsystem to allocate it. Wouldn't it be trivial for *most* of the subsystems to simply have this either as a static global or static function variable: static char *mutex_typename = { "kqueue", "foo" }; Under kern I see this: grep mtx_init * | grep -v NULL ... kern_rmlock.c: mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", MTX_NOWITNESS); subr_bus.c: mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF); Those are solved with statics. Another example: sys/dev/ae/if_ae.c mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); I think the array could be in the softc here? sc->mutex_name_type[0] = device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK; Do we want to do that? It moves "wasting space" to another variable. I'm not sure where there isn't the possibility of using either static (for a global mutex) or space inside the equiv of the softc (or proc or whatever) for this? I'm not sure this is a good idea, just an idea. Are there places where it's not as simple as doing this? -Alfred From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 21:18:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C05A6C58; Wed, 22 Jan 2014 21:18:01 +0000 (UTC) Received: from mail.jr-hosting.nl (mail.jr-hosting.nl [IPv6:2a01:4f8:141:5ffd::25]) by mx1.freebsd.org (Postfix) with ESMTP id 4D1D91498; Wed, 22 Jan 2014 21:18:01 +0000 (UTC) Received: from [10.0.2.17] (a44084.upc-a.chello.nl [62.163.44.84]) by mail.jr-hosting.nl (Postfix) with ESMTPSA id 6F28A3F616; Wed, 22 Jan 2014 22:17:59 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_074ADFCC-B591-49CD-B7B8-826DD4ED6F07"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r260939 - head/release/doc/en_US.ISO8859-1/relnotes From: Remko Lodder In-Reply-To: Date: Wed, 22 Jan 2014 22:17:57 +0100 Message-Id: References: <201401202225.s0KMPolR016521@svn.freebsd.org> To: Ronald Klop X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:18:01 -0000 --Apple-Mail=_074ADFCC-B591-49CD-B7B8-826DD4ED6F07 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 21 Jan 2014, at 11:17, Ronald Klop wrote: > On Mon, 20 Jan 2014 23:25:50 +0100, Glen Barber = wrote: >=20 >> Author: gjb >> Date: Mon Jan 20 22:25:50 2014 >> New Revision: 260939 >> URL: http://svnweb.freebsd.org/changeset/base/260939 >>=20 >> Log: >> Document r260888. >> Sponsored by: The FreeBSD Foundation >>=20 >> Modified: >> head/release/doc/en_US.ISO8859-1/relnotes/article.xml >>=20 >> Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan = 20 22:08:11 2014 (r260938) >> +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan = 20 22:25:50 2014 (r260939) >> @@ -104,7 +104,9 @@ >> >> Kernel Changes >> -   >> + Add a VT kernel >> + configuration file, which enables the new = vt >> + console driver. >> >> Virtualization support >=20 >=20 > Isn't this configuration file temporary to increase testing instead of = something which stays for a future release? >=20 > http://svnweb.freebsd.org/base?view=3Drevision&revision=3D260888 Could be, but then again we can mention that in later release notes as = well. It=92s added now and can be used for more exposure, it can be removed again in the future when it might (or = not) be merged with GENERIC.. Cheers remko >=20 > Regards, > Ronald. --=20 /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News --Apple-Mail=_074ADFCC-B591-49CD-B7B8-826DD4ED6F07 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJS4DWFAAoJEKjD27JZ84ywFtYP/jtWD8ab1GNs3SLW8sTmzbJK 4E/uglbFrxY5m/AX4pZmRXMpZ5DgSdRnnFEkvUWsSCQ9sD1TCf/FOy2VUNVcFGCZ VsoxQ6y3bSfBq80UQgArguk2bMY050mKoHmSj68pxdwcz48i4+Hlni+XBaRpMIeR 6OpZZjQcCqbpfCmJ7OJk6gpK43vykwdRSLqlvyYfMAz7hWROHAhEEJ6yZuDF/etw iTwvpH3PIqTGFvYhvfyzldy9h4jrLSLAtJKJE7mT7uzAAGQ14qCyhTkvsE0KKgR+ 4mhfO0kmOTy86RWxAhNG0mHzlchQWnfKGEGzLDlDov/fC8tRXcoG/ba1vjoDz4i6 hk+3jFqegnYQP75IDEeAMFQTEZIpJH2U8pVjLFlUQ7jkgPHPLCx6tVn6o+NjHO2f 9mzWvOphz0GRLLa+0cfLqPuoTXYs2ekfuROMaxaksFgMB7H9g1m+szRXhvZ4L6WO EwYzvDUQxTmXLmmruVODLvj3SKAHLw/nUCpqCKn9ejPjCYG6/idv10/bYL6QJkpC b2XekN/2BXPMToZvm7RQtN+AcZhP0kgAp6heFIVak08+4iyYzNjpsNgX5vj+/HQi rnl66/tZXelqYfYh00fMZlZL/BXQKzwtDc7XTCWOfu0O+61xPxOZN6n0SkZOJeQi B42cQyK3d4kn/tpvHxXS =VBr3 -----END PGP SIGNATURE----- --Apple-Mail=_074ADFCC-B591-49CD-B7B8-826DD4ED6F07-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 21:20:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34E95DB6; Wed, 22 Jan 2014 21:20:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 06ECA14A5; Wed, 22 Jan 2014 21:20:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MLK8dZ067610; Wed, 22 Jan 2014 21:20:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MLK8lG067607; Wed, 22 Jan 2014 21:20:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401222120.s0MLK8lG067607@svn.freebsd.org> From: Warner Losh Date: Wed, 22 Jan 2014 21:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261038 - in head/sys: conf kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:20:09 -0000 Author: imp Date: Wed Jan 22 21:20:08 2014 New Revision: 261038 URL: http://svnweb.freebsd.org/changeset/base/261038 Log: Implement generic support for early printf. Thought I can't find the paper trail now, this patch is similar to one posted for one of the preliminary versions of a new armv6 port. I took them and made them more generic. Option not enabled by default since each board/port has to provide its own eputc, and possibly do other things as well... Modified: head/sys/conf/options head/sys/kern/subr_prf.c head/sys/sys/systm.h Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Jan 22 19:57:11 2014 (r261037) +++ head/sys/conf/options Wed Jan 22 21:20:08 2014 (r261038) @@ -62,6 +62,7 @@ KDB_TRACE opt_kdb.h KDB_UNATTENDED opt_kdb.h KLD_DEBUG opt_kld.h SYSCTL_DEBUG opt_sysctl.h +EARLY_PRINTF opt_global.h TEXTDUMP_PREFERRED opt_ddb.h TEXTDUMP_VERBOSE opt_ddb.h Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Wed Jan 22 19:57:11 2014 (r261037) +++ head/sys/kern/subr_prf.c Wed Jan 22 21:20:08 2014 (r261038) @@ -1137,3 +1137,25 @@ hexdump(const void *ptr, int length, con } } +#ifdef EARLY_PRINTF +/* + * Support for calling an alternate printf early in boot (like before + * cn_init() can be called). Platforms need to define eputc that want + * to use this. + */ +static void +early_putc_func(int ch, void *arg __unused) +{ + eputc(ch); +} + +void +eprintf(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + kvprintf(fmt, early_putc_func, NULL, 10, ap); + va_end(ap); +} +#endif Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Wed Jan 22 19:57:11 2014 (r261037) +++ head/sys/sys/systm.h Wed Jan 22 21:20:08 2014 (r261038) @@ -196,6 +196,10 @@ void init_param1(void); void init_param2(long physpages); void init_static_kenv(char *, size_t); void tablefull(const char *); +#ifdef EARLY_PRINTF +void eprintf(const char *, ...) __printflike(1, 2); +void eputc(int ch); +#endif int kvprintf(char const *, void (*)(int, void*), void *, int, __va_list) __printflike(1, 0); void log(int, const char *, ...) __printflike(2, 3); From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 21:23:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 779B4180; Wed, 22 Jan 2014 21:23:18 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A4251551; Wed, 22 Jan 2014 21:23:18 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4AF53B948; Wed, 22 Jan 2014 16:23:17 -0500 (EST) From: John Baldwin To: Alfred Perlstein Subject: Re: svn commit: r260898 - head/sys/kern Date: Wed, 22 Jan 2014 16:22:42 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <201401221527.12779.jhb@freebsd.org> <52E03139.2020902@freebsd.org> In-Reply-To: <52E03139.2020902@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201401221622.42789.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 22 Jan 2014 16:23:17 -0500 (EST) Cc: src-committers@freebsd.org, Scott Long , Neel Natu , John-Mark Gurney , svn-src-all@freebsd.org, Rui Paulo , svn-src-head@freebsd.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:23:18 -0000 On Wednesday, January 22, 2014 3:59:37 pm Alfred Perlstein wrote: > > On 1/22/14, 12:27 PM, John Baldwin wrote: > > On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote: > >> Hmm, what if locks had a pointer to a 2 element char * array, the first > >> being the name, the second the type. That would keep the size of the > >> lock down and most locks could share a common tuple of name/type in each > >> subsystem. This would allow us to get rid of the pending static list. > >> > >> effectively: > >> struct lock_object { > >> char *lo_name; /* Individual lock name. */ > >> u_int lo_flags; > >> u_int lo_data; /* General class specific data. */ > >> struct witness *lo_witness; /* Data for witness. */ > >> }; > >> > >> would change to: > >> struct lock_object { > >> char **lo_name_type; /* Individual lock > >> name[0]/type[1]. */ > >> u_int lo_flags; > >> u_int lo_data; /* General class specific data. */ > >> struct witness *lo_witness; /* Data for witness. */ > >> }; > >> > >> This may be somewhat disruptive, I haven't played with how it would > >> actually change driver/etc/code. > > Where would the memory for the char* array come from? > > > That is a good question. I suspect it would be up to the subsystem to > allocate it. > > Wouldn't it be trivial for *most* of the subsystems to simply have this > either as a static global or static function variable: > > static char *mutex_typename = { "kqueue", "foo" }; > > Under kern I see this: > grep mtx_init * | grep -v NULL > ... > kern_rmlock.c: mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", > MTX_NOWITNESS); > subr_bus.c: mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF); > > Those are solved with statics. > > Another example: > > sys/dev/ae/if_ae.c > mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, > MTX_DEF); > > I think the array could be in the softc here? sc->mutex_name_type[0] = > device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK; > > Do we want to do that? It moves "wasting space" to another variable. > > I'm not sure where there isn't the possibility of using either static > (for a global mutex) or space inside the equiv of the softc (or proc or > whatever) for this? > > I'm not sure this is a good idea, just an idea. Are there places where > it's not as simple as doing this? To be honest, the whole name vs type thing isn't widely used, and it makes the mtx_init() function kind of fugly. I think what I would actually prefer is to just kill it, changing the various places that pass a separate name to just pass the type instead. Note that none of the other lock APIs even allow setting a separate type. This would let us remove the static pending list array as well. (And yes, I added the name vs type thing, but at this point I think it did not turn out nearly as useful as I had thought it would be.) The original issue of picking useful-to-witness lock names (i.e. not just using device_get_nameunit()) still remains of course. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 21:23:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BCDB2FF; Wed, 22 Jan 2014 21:23:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0862E1561; Wed, 22 Jan 2014 21:23:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MLNwAs070585; Wed, 22 Jan 2014 21:23:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MLNwvH070583; Wed, 22 Jan 2014 21:23:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401222123.s0MLNwvH070583@svn.freebsd.org> From: Warner Losh Date: Wed, 22 Jan 2014 21:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261039 - in head/sys: arm/arm conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:23:59 -0000 Author: imp Date: Wed Jan 22 21:23:58 2014 New Revision: 261039 URL: http://svnweb.freebsd.org/changeset/base/261039 Log: Add support for mapping a small range of the SoC devices for debugging purposes early in boot. Modified: head/sys/arm/arm/locore.S head/sys/conf/options.arm Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Wed Jan 22 21:20:08 2014 (r261038) +++ head/sys/arm/arm/locore.S Wed Jan 22 21:23:58 2014 (r261039) @@ -258,9 +258,13 @@ mmu_init_table: /* fill all table VA==PA */ /* map SDRAM VA==PA, WT cacheable */ #if !defined(SMP) - MMU_INIT(PHYSADDR, PHYSADDR , 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) + MMU_INIT(PHYSADDR, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) /* map VA 0xc0000000..0xc3ffffff to PA */ MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#if defined(SOCDEV_PA) && defined(SOCKDEV_VA) + /* Map in 0x04000000 worth of the SoC's devices for bootstrap debugging */ + MMU_INIT(SOCKDEV_VA, SOCDEV_PA, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#endif #else MMU_INIT(PHYSADDR, PHYSADDR , 64, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)) /* map VA 0xc0000000..0xc3ffffff to PA */ Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Wed Jan 22 21:20:08 2014 (r261038) +++ head/sys/conf/options.arm Wed Jan 22 21:23:58 2014 (r261039) @@ -35,6 +35,8 @@ LINUX_BOOT_ABI opt_global.h LOADERRAMADDR opt_global.h NO_EVENTTIMERS opt_timer.h PHYSADDR opt_global.h +SOCDEV_PA opt_global.h +SOCDEV_VA opt_global.h PV_STATS opt_pmap.h QEMU_WORKAROUNDS opt_global.h SOC_MV_ARMADAXP opt_global.h From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 21:49:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 371527EF; Wed, 22 Jan 2014 21:49:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 239431716; Wed, 22 Jan 2014 21:49:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MLnLmA079012; Wed, 22 Jan 2014 21:49:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MLnKmO079011; Wed, 22 Jan 2014 21:49:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401222149.s0MLnKmO079011@svn.freebsd.org> From: Warner Losh Date: Wed, 22 Jan 2014 21:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261040 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:49:21 -0000 Author: imp Date: Wed Jan 22 21:49:20 2014 New Revision: 261040 URL: http://svnweb.freebsd.org/changeset/base/261040 Log: Implement support for early printf. You need to define SOCDEV_{PA,VA} as described in the comments for the eputc function in your config file. Modified: head/sys/arm/at91/uart_dev_at91usart.c Modified: head/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_dev_at91usart.c Wed Jan 22 21:23:58 2014 (r261039) +++ head/sys/arm/at91/uart_dev_at91usart.c Wed Jan 22 21:49:20 2014 (r261040) @@ -276,6 +276,24 @@ at91_usart_putc(struct uart_bas *bas, in WR4(bas, USART_THR, c); } +#ifdef EARLY_PRINTF +/* + * Early printf support. This assumes that we have the SoC "system" devices + * mapped into AT91_BASE. To use this before we adjust the boostrap tables, + * You'll need to define SOCDEV_VA to be 0xdc000000 and SOCDEV_PA to be + * 0xfc000000 in your config file where you define EARLY_PRINTF + */ +volatile uint32_t *at91_dbgu = (volatile uint32_t *)(AT91_BASE + AT91_DBGU0); + +void +eputc(int c) +{ + while (!(at91_dbgu[USART_CSR / 4] & USART_CSR_TXRDY)) + continue; + at91_dbgu[USART_THR / 4] = c; +} +#endif + /* * Check for a character available. */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 22:01:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0FF9E4C; Wed, 22 Jan 2014 22:01:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B16721879; Wed, 22 Jan 2014 22:01:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MM1TqW086088; Wed, 22 Jan 2014 22:01:29 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MM1Tc5086087; Wed, 22 Jan 2014 22:01:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401222201.s0MM1Tc5086087@svn.freebsd.org> From: Warner Losh Date: Wed, 22 Jan 2014 22:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261041 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:01:30 -0000 Author: imp Date: Wed Jan 22 22:01:29 2014 New Revision: 261041 URL: http://svnweb.freebsd.org/changeset/base/261041 Log: Clean up HL201 config (for the hot-e 201 and 101 models from thinlinx). Make comments match parameters Add options for early printf so we get regression build testing on it. Add preview of options for FDT support coming soon (I hope) Modified: head/sys/arm/conf/HL201 Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Wed Jan 22 21:49:20 2014 (r261040) +++ head/sys/arm/conf/HL201 Wed Jan 22 22:01:29 2014 (r261041) @@ -1,4 +1,4 @@ -# Kernel configuration for the AT91SAM9 based Hot-e configuration file +# Kernel configuration for the AT91SAM9G20 based Hot-e configuration file # # For more information on this file, please read the handbook section on # Kernel Configuration Files: @@ -39,16 +39,16 @@ options FFS #Berkeley Fast Filesystem #options MD_ROOT #MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk options NANDFS # NAND file system -#options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" +options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager options NFS_ROOT #NFS usable as /, requires NFSCL -options BOOTP_NFSROOT -options BOOTP -options BOOTP_NFSV3 +#options BOOTP_NFSROOT +#options BOOTP +#options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ate0 -options BOOTP_COMPAT +#options BOOTP_COMPAT options ALT_BREAK_TO_DEBUGGER @@ -62,7 +62,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT @@ -83,22 +82,11 @@ device mii #options DIAGNOSTIC device md -#device at91_twi # TWI: Two Wire Interface -#device at91_spi # SPI: -device spibus -# MMC/SD -#device at91_mci -#device mmc -#device mmcsd -# iic -device iic -device iicbus -device icee - device bpf + # USB support options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. -#device ohci # OHCI localbus->USB interface +device ohci # OHCI localbus->USB interface device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices device uhid # "Human Interface Devices" @@ -132,5 +120,14 @@ device pass # Passthrough device (dire #device wlan_amrr # AMRR transmit rate control algorithm options ROOTDEVNAME=\"ufs:da0s1a\" -# NAND Flash - my board as 128MB Samsung part -device nand # NAND interface on CS3 +# NAND Flash - my board as 128MB Samsung part, YMMV. +device nand # NAND interface on CS3 + +# Coming soon, but not yet +#options FDT +#options FDT_DTB_STATIC +#makeoptions FDT_DTS_FILE=at91sam9g20ek.dts + +options EARLY_PRINTF +options SOCDEV_PA=0xfc000000 +options SOCDEV_VA=0xdc000000 From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 22:15:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A59F0791; Wed, 22 Jan 2014 22:15:18 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 811241971; Wed, 22 Jan 2014 22:15:18 +0000 (UTC) Received: from Alfreds-MacBook-Pro.local (c-71-202-25-4.hsd1.ca.comcast.net [71.202.25.4]) by elvis.mu.org (Postfix) with ESMTPSA id 6FA371A3C26; Wed, 22 Jan 2014 14:15:16 -0800 (PST) Message-ID: <52E042F4.5080408@freebsd.org> Date: Wed, 22 Jan 2014 14:15:16 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r260898 - head/sys/kern References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <201401221527.12779.jhb@freebsd.org> <52E03139.2020902@freebsd.org> <201401221622.42789.jhb@freebsd.org> In-Reply-To: <201401221622.42789.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Scott Long , Neel Natu , John-Mark Gurney , svn-src-all@freebsd.org, Rui Paulo , svn-src-head@freebsd.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:15:18 -0000 On 1/22/14, 1:22 PM, John Baldwin wrote: > On Wednesday, January 22, 2014 3:59:37 pm Alfred Perlstein wrote: >> On 1/22/14, 12:27 PM, John Baldwin wrote: >>> On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote: >>>> Hmm, what if locks had a pointer to a 2 element char * array, the first >>>> being the name, the second the type. That would keep the size of the >>>> lock down and most locks could share a common tuple of name/type in each >>>> subsystem. This would allow us to get rid of the pending static list. >>>> >>>> effectively: >>>> struct lock_object { >>>> char *lo_name; /* Individual lock name. */ >>>> u_int lo_flags; >>>> u_int lo_data; /* General class specific data. > */ >>>> struct witness *lo_witness; /* Data for witness. */ >>>> }; >>>> >>>> would change to: >>>> struct lock_object { >>>> char **lo_name_type; /* Individual lock >>>> name[0]/type[1]. */ >>>> u_int lo_flags; >>>> u_int lo_data; /* General class specific data. > */ >>>> struct witness *lo_witness; /* Data for witness. */ >>>> }; >>>> >>>> This may be somewhat disruptive, I haven't played with how it would >>>> actually change driver/etc/code. >>> Where would the memory for the char* array come from? >>> >> That is a good question. I suspect it would be up to the subsystem to >> allocate it. >> >> Wouldn't it be trivial for *most* of the subsystems to simply have this >> either as a static global or static function variable: >> >> static char *mutex_typename = { "kqueue", "foo" }; >> >> Under kern I see this: >> grep mtx_init * | grep -v NULL >> ... >> kern_rmlock.c: mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", >> MTX_NOWITNESS); >> subr_bus.c: mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF); >> >> Those are solved with statics. >> >> Another example: >> >> sys/dev/ae/if_ae.c >> mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, >> MTX_DEF); >> >> I think the array could be in the softc here? sc->mutex_name_type[0] = >> device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK; >> >> Do we want to do that? It moves "wasting space" to another variable. >> >> I'm not sure where there isn't the possibility of using either static >> (for a global mutex) or space inside the equiv of the softc (or proc or >> whatever) for this? >> >> I'm not sure this is a good idea, just an idea. Are there places where >> it's not as simple as doing this? > To be honest, the whole name vs type thing isn't widely used, and it makes > the mtx_init() function kind of fugly. I think what I would actually prefer > is to just kill it, changing the various places that pass a separate name to > just pass the type instead. Note that none of the other lock APIs even allow > setting a separate type. This would let us remove the static pending list > array as well. > > (And yes, I added the name vs type thing, but at this point I think it did > not turn out nearly as useful as I had thought it would be.) > > The original issue of picking useful-to-witness lock names (i.e. not just > using device_get_nameunit()) still remains of course. > I really want to agree, but anything that reduces the immediate ability for people to diagnose problems really makes me worry. This would mean that you would see "network device lock" or some "type" but not know the actual owner. I would say that maybe given this it's just better to grow WITNESS_PENDING based on maxcpu like the PR I pointed out, that way we do not introduce churn AND we maintain the debug-ability. http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/185831 -Alfred From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 22:19:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9615BB50; Wed, 22 Jan 2014 22:19:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8247819B6; Wed, 22 Jan 2014 22:19:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MMJrTH091206; Wed, 22 Jan 2014 22:19:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MMJrMd091205; Wed, 22 Jan 2014 22:19:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222219.s0MMJrMd091205@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 22:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261042 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:19:53 -0000 Author: mav Date: Wed Jan 22 22:19:53 2014 New Revision: 261042 URL: http://svnweb.freebsd.org/changeset/base/261042 Log: Mostly revert r260267 and hopefully really fix the original problem. The latest draft of SBC-3 tells: "A MAXIMUM UNMAP LBA COUNT field set to a non-zero value indicates the maximum number of LBAs that may be unmapped by an UNMAP command." To me it does not sound like that limit is set per single descriptor, but rather per all command. And I have at least one device that behaves exactly that way. This patch fixes the problem there. MFC after: 1 week Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Jan 22 22:01:29 2014 (r261041) +++ head/sys/cam/scsi/scsi_da.c Wed Jan 22 22:19:53 2014 (r261042) @@ -211,7 +211,7 @@ struct da_softc { int delete_running; int delete_available; /* Delete methods possibly available */ uint32_t unmap_max_ranges; - uint32_t unmap_max_lba; /* Max LBAs in a single range */ + uint32_t unmap_max_lba; /* Max LBAs in UNMAP req */ uint64_t ws_max_blks; da_delete_methods delete_method; da_delete_func_t *delete_func; @@ -1854,7 +1854,7 @@ dadeletemaxsize(struct da_softc *softc, switch(delete_method) { case DA_DELETE_UNMAP: - sectors = (off_t)softc->unmap_max_lba * softc->unmap_max_ranges; + sectors = (off_t)softc->unmap_max_lba; break; case DA_DELETE_ATA_TRIM: sectors = (off_t)ATA_DSM_RANGE_MAX * softc->trim_max_ranges; @@ -2526,6 +2526,7 @@ da_delete_unmap(struct cam_periph *perip struct bio *bp1; uint8_t *buf = softc->unmap_buf; uint64_t lba, lastlba = (uint64_t)-1; + uint64_t totalcount = 0; uint64_t count; uint32_t lastcount = 0, c; uint32_t off, ranges = 0; @@ -2552,41 +2553,42 @@ da_delete_unmap(struct cam_periph *perip /* Try to extend the previous range. */ if (lba == lastlba) { - c = min(count, softc->unmap_max_lba - lastcount); + c = omin(count, UNMAP_RANGE_MAX - lastcount); lastcount += c; off = ((ranges - 1) * UNMAP_RANGE_SIZE) + UNMAP_HEAD_SIZE; scsi_ulto4b(lastcount, &buf[off + 8]); count -= c; lba +=c; + totalcount += c; } while (count > 0) { - if (ranges > softc->unmap_max_ranges) { + c = omin(count, UNMAP_RANGE_MAX); + if (totalcount + c > softc->unmap_max_lba || + ranges >= softc->unmap_max_ranges) { xpt_print(periph->path, - "%s issuing short delete %d > %d\n", + "%s issuing short delete %ld > %ld" + "|| %d >= %d", da_delete_method_desc[softc->delete_method], + totalcount + c, softc->unmap_max_lba, ranges, softc->unmap_max_ranges); break; } - c = min(count, softc->unmap_max_lba); off = (ranges * UNMAP_RANGE_SIZE) + UNMAP_HEAD_SIZE; scsi_u64to8b(lba, &buf[off + 0]); scsi_ulto4b(c, &buf[off + 8]); lba += c; + totalcount += c; ranges++; count -= c; lastcount = c; } lastlba = lba; bp1 = bioq_first(&softc->delete_queue); - /* - * Assume no range extension on the next loop iteration to - * avoid issuing a short delete. - */ if (bp1 == NULL || ranges >= softc->unmap_max_ranges || - bp1->bio_bcount / softc->params.secsize > - softc->unmap_max_lba * (softc->unmap_max_ranges - ranges)) + totalcount + bp1->bio_bcount / + softc->params.secsize > softc->unmap_max_lba) break; } while (1); scsi_ulto2b(ranges * 16 + 6, &buf[0]); From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 22:25:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC853DB8; Wed, 22 Jan 2014 22:25:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C90D11A62; Wed, 22 Jan 2014 22:25:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MMPmH2094500; Wed, 22 Jan 2014 22:25:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MMPm4I094499; Wed, 22 Jan 2014 22:25:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401222225.s0MMPm4I094499@svn.freebsd.org> From: Warner Losh Date: Wed, 22 Jan 2014 22:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261043 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:25:48 -0000 Author: imp Date: Wed Jan 22 22:25:48 2014 New Revision: 261043 URL: http://svnweb.freebsd.org/changeset/base/261043 Log: Document EARLY_PRINTF Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Jan 22 22:19:53 2014 (r261042) +++ head/sys/conf/NOTES Wed Jan 22 22:25:48 2014 (r261043) @@ -446,6 +446,15 @@ options DEBUG_MEMGUARD options DEBUG_REDZONE # +# EARLY_PRINTF enables support for calling a special printf (eprintf) +# very early in the kernel (before cn_init() has been called). This +# should only be used for debugging purposes early in boot. Normally, +# it is not defined. It is commented out here because this feature +# isn't generally available. And the required eputc() isn't defined. +# +#options EARLY_PRINTF + +# # KTRACE enables the system-call tracing facility ktrace(2). To be more # SMP-friendly, KTRACE uses a worker thread to process most trace events # asynchronously to the thread generating the event. This requires a From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 22:52:31 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9596E5D3; Wed, 22 Jan 2014 22:52:31 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A6911D70; Wed, 22 Jan 2014 22:52:31 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s0MMqL4k065209 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Jan 2014 14:52:22 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s0MMqLAR065208; Wed, 22 Jan 2014 14:52:21 -0800 (PST) (envelope-from jmg) Date: Wed, 22 Jan 2014 14:52:21 -0800 From: John-Mark Gurney To: Alfred Perlstein Subject: Re: svn commit: r260898 - head/sys/kern Message-ID: <20140122225221.GV75135@funkthat.com> References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <201401221527.12779.jhb@freebsd.org> <52E03139.2020902@freebsd.org> <201401221622.42789.jhb@freebsd.org> <52E042F4.5080408@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52E042F4.5080408@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 22 Jan 2014 14:52:22 -0800 (PST) Cc: src-committers@FreeBSD.org, Scott Long , Neel Natu , John Baldwin , svn-src-all@FreeBSD.org, Rui Paulo , svn-src-head@FreeBSD.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:52:31 -0000 Alfred Perlstein wrote this message on Wed, Jan 22, 2014 at 14:15 -0800: > > On 1/22/14, 1:22 PM, John Baldwin wrote: > >On Wednesday, January 22, 2014 3:59:37 pm Alfred Perlstein wrote: > >>On 1/22/14, 12:27 PM, John Baldwin wrote: > >>>On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote: > >>>>Hmm, what if locks had a pointer to a 2 element char * array, the first > >>>>being the name, the second the type. That would keep the size of the > >>>>lock down and most locks could share a common tuple of name/type in each > >>>>subsystem. This would allow us to get rid of the pending static list. > >>>> > >>>>effectively: > >>>>struct lock_object { > >>>> char *lo_name; /* Individual lock name. */ > >>>> u_int lo_flags; > >>>> u_int lo_data; /* General class specific > >>>> data. > >*/ > >>>> struct witness *lo_witness; /* Data for witness. */ > >>>>}; > >>>> > >>>>would change to: > >>>>struct lock_object { > >>>> char **lo_name_type; /* Individual lock > >>>>name[0]/type[1]. */ > >>>> u_int lo_flags; > >>>> u_int lo_data; /* General class specific > >>>> data. > >*/ > >>>> struct witness *lo_witness; /* Data for witness. */ > >>>>}; > >>>> > >>>>This may be somewhat disruptive, I haven't played with how it would > >>>>actually change driver/etc/code. > >>>Where would the memory for the char* array come from? > >>> > >>That is a good question. I suspect it would be up to the subsystem to > >>allocate it. > >> > >>Wouldn't it be trivial for *most* of the subsystems to simply have this > >>either as a static global or static function variable: > >> > >>static char *mutex_typename = { "kqueue", "foo" }; > >> > >>Under kern I see this: > >>grep mtx_init * | grep -v NULL > >>... > >>kern_rmlock.c: mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", > >>MTX_NOWITNESS); > >>subr_bus.c: mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF); > >> > >>Those are solved with statics. > >> > >>Another example: > >> > >>sys/dev/ae/if_ae.c > >> mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, > >>MTX_DEF); > >> > >>I think the array could be in the softc here? sc->mutex_name_type[0] = > >>device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK; > >> > >>Do we want to do that? It moves "wasting space" to another variable. > >> > >>I'm not sure where there isn't the possibility of using either static > >>(for a global mutex) or space inside the equiv of the softc (or proc or > >>whatever) for this? > >> > >>I'm not sure this is a good idea, just an idea. Are there places where > >>it's not as simple as doing this? > >To be honest, the whole name vs type thing isn't widely used, and it makes > >the mtx_init() function kind of fugly. I think what I would actually > >prefer > >is to just kill it, changing the various places that pass a separate name > >to > >just pass the type instead. Note that none of the other lock APIs even > >allow > >setting a separate type. This would let us remove the static pending list > >array as well. > > > >(And yes, I added the name vs type thing, but at this point I think it did > >not turn out nearly as useful as I had thought it would be.) > > > >The original issue of picking useful-to-witness lock names (i.e. not just > >using device_get_nameunit()) still remains of course. > > > I really want to agree, but anything that reduces the immediate ability > for people to diagnose problems really makes me worry. > > This would mean that you would see "network device lock" or some "type" > but not know the actual owner. isn't it usually apparent which lock it is from the backtrace? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 22:54:57 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B866B717; Wed, 22 Jan 2014 22:54:57 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 9667C1D77; Wed, 22 Jan 2014 22:54:57 +0000 (UTC) Received: from Alfreds-MacBook-Pro.local (c-71-202-25-4.hsd1.ca.comcast.net [71.202.25.4]) by elvis.mu.org (Postfix) with ESMTPSA id 646201A3C25; Wed, 22 Jan 2014 14:54:56 -0800 (PST) Message-ID: <52E04C40.1080303@freebsd.org> Date: Wed, 22 Jan 2014 14:54:56 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John-Mark Gurney Subject: Re: svn commit: r260898 - head/sys/kern References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <201401221527.12779.jhb@freebsd.org> <52E03139.2020902@freebsd.org> <201401221622.42789.jhb@freebsd.org> <52E042F4.5080408@freebsd.org> <20140122225221.GV75135@funkthat.com> In-Reply-To: <20140122225221.GV75135@funkthat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, Scott Long , Neel Natu , John Baldwin , svn-src-all@FreeBSD.org, Rui Paulo , svn-src-head@FreeBSD.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:54:57 -0000 On 1/22/14, 2:52 PM, John-Mark Gurney wrote: > Alfred Perlstein wrote this message on Wed, Jan 22, 2014 at 14:15 -0800: >> On 1/22/14, 1:22 PM, John Baldwin wrote: >>> On Wednesday, January 22, 2014 3:59:37 pm Alfred Perlstein wrote: >>>> On 1/22/14, 12:27 PM, John Baldwin wrote: >>>>> On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote: >>>>>> Hmm, what if locks had a pointer to a 2 element char * array, the first >>>>>> being the name, the second the type. That would keep the size of the >>>>>> lock down and most locks could share a common tuple of name/type in each >>>>>> subsystem. This would allow us to get rid of the pending static list. >>>>>> >>>>>> effectively: >>>>>> struct lock_object { >>>>>> char *lo_name; /* Individual lock name. */ >>>>>> u_int lo_flags; >>>>>> u_int lo_data; /* General class specific >>>>>> data. >>> */ >>>>>> struct witness *lo_witness; /* Data for witness. */ >>>>>> }; >>>>>> >>>>>> would change to: >>>>>> struct lock_object { >>>>>> char **lo_name_type; /* Individual lock >>>>>> name[0]/type[1]. */ >>>>>> u_int lo_flags; >>>>>> u_int lo_data; /* General class specific >>>>>> data. >>> */ >>>>>> struct witness *lo_witness; /* Data for witness. */ >>>>>> }; >>>>>> >>>>>> This may be somewhat disruptive, I haven't played with how it would >>>>>> actually change driver/etc/code. >>>>> Where would the memory for the char* array come from? >>>>> >>>> That is a good question. I suspect it would be up to the subsystem to >>>> allocate it. >>>> >>>> Wouldn't it be trivial for *most* of the subsystems to simply have this >>>> either as a static global or static function variable: >>>> >>>> static char *mutex_typename = { "kqueue", "foo" }; >>>> >>>> Under kern I see this: >>>> grep mtx_init * | grep -v NULL >>>> ... >>>> kern_rmlock.c: mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", >>>> MTX_NOWITNESS); >>>> subr_bus.c: mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF); >>>> >>>> Those are solved with statics. >>>> >>>> Another example: >>>> >>>> sys/dev/ae/if_ae.c >>>> mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, >>>> MTX_DEF); >>>> >>>> I think the array could be in the softc here? sc->mutex_name_type[0] = >>>> device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK; >>>> >>>> Do we want to do that? It moves "wasting space" to another variable. >>>> >>>> I'm not sure where there isn't the possibility of using either static >>>> (for a global mutex) or space inside the equiv of the softc (or proc or >>>> whatever) for this? >>>> >>>> I'm not sure this is a good idea, just an idea. Are there places where >>>> it's not as simple as doing this? >>> To be honest, the whole name vs type thing isn't widely used, and it makes >>> the mtx_init() function kind of fugly. I think what I would actually >>> prefer >>> is to just kill it, changing the various places that pass a separate name >>> to >>> just pass the type instead. Note that none of the other lock APIs even >>> allow >>> setting a separate type. This would let us remove the static pending list >>> array as well. >>> >>> (And yes, I added the name vs type thing, but at this point I think it did >>> not turn out nearly as useful as I had thought it would be.) >>> >>> The original issue of picking useful-to-witness lock names (i.e. not just >>> using device_get_nameunit()) still remains of course. >>> >> I really want to agree, but anything that reduces the immediate ability >> for people to diagnose problems really makes me worry. >> >> This would mean that you would see "network device lock" or some "type" >> but not know the actual owner. > isn't it usually apparent which lock it is from the backtrace? > Isn't the backtrace pretty obvious given IP/PC? -Alfred From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:00:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 387368AA; Wed, 22 Jan 2014 23:00:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 252071DA3; Wed, 22 Jan 2014 23:00:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MN0TTZ008813; Wed, 22 Jan 2014 23:00:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MN0TmD008812; Wed, 22 Jan 2014 23:00:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401222300.s0MN0TmD008812@svn.freebsd.org> From: Glen Barber Date: Wed, 22 Jan 2014 23:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261044 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:00:30 -0000 Author: gjb Date: Wed Jan 22 23:00:29 2014 New Revision: 261044 URL: http://svnweb.freebsd.org/changeset/base/261044 Log: Disable output about duplicate services, which were not output during testing. MFC after: 1 month X-MFC-After: r261031 Sponsored by: The FreeBSD Foundation Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed Jan 22 22:25:48 2014 (r261043) +++ head/etc/Makefile Wed Jan 22 23:00:29 2014 (r261044) @@ -198,7 +198,7 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ - services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.db \ + services_mkdb ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \ ${DESTDIR}/etc/services; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${BIN2} ${DESTDIR}/etc; \ From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:06:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 292B8D91; Wed, 22 Jan 2014 23:06:42 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE3051E4D; Wed, 22 Jan 2014 23:06:41 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id A6A11101D2; Wed, 22 Jan 2014 23:06:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us A6A11101D2 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Wed, 22 Jan 2014 18:06:39 -0500 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r261044 - head/etc Message-ID: <20140122230639.GA35180@glenbarber.us> References: <201401222300.s0MN0TmD008812@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="k1G2Bc0EDIhoSmEt" Content-Disposition: inline In-Reply-To: <201401222300.s0MN0TmD008812@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:06:42 -0000 --k1G2Bc0EDIhoSmEt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 22, 2014 at 11:00:29PM +0000, Glen Barber wrote: > Author: gjb > Date: Wed Jan 22 23:00:29 2014 > New Revision: 261044 > URL: http://svnweb.freebsd.org/changeset/base/261044 >=20 > Log: > Disable output about duplicate services, which were not output during > testing. > =20 Which was result of me, not the change(s) in question as whole. Glen --k1G2Bc0EDIhoSmEt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJS4E7+AAoJELls3eqvi17Q1NcP/jjK2p25+3TKJpRp2mIzMNrh myoYfjk7F66q+hIzF/mdbJlZ+Y2sgYfMQc00IejQ11uaCnD44F2Ww+XvWZrwQqu/ WQadXVPGkETCj3O+fAGcR4srGq5Q0Mu/KCZUiwieqIWDml7InS9ffH6x0+5AMKk3 Nw3NRfPXiZb7hn1RA4vp1Dpc6QPlEtnXiIQOc5QEAmcgmBSeaRJTlYfNbGXb4Z30 7HNhBXmCC6nfvV2HLausnQMgOYFxJrxYONu5paYmnt5V7OV/ACj3Ihhnb1QZGtq4 i8r6YR4VIh1YhBGvL2Nf4ducTPVQOpvkisa29/llhp0oHbIVJknsurBzD5PvD3xz ee7nR1+ytijUJofIIfck0260TPkhXSNfTCwqA2LRaY564xdJyKAm3xaELCzPF2wM y61eZneKRcu5lsPobqwX76OTza2IzJUaKZwAsyJHQWW/75jzzi1CVFCVvmq+QqTq dTTVaszCAgFJbBkpCmVkQqRFplHVxpQRuGV3kftw06MdO1mp1xqyJ00+lA/Ylpac ljyWj0bPq6t5GeEuu3QDNImK49wi43YYFlgaL5O7ZZdz4KtCWDCe9IoQEugsQKRr r8eOHPx/R6AALpwrxG7de4VoaNef536b9diLpJjMZRx1GX3yy1Gz8wr/PQgpJAQw e8ImVoaO9yJ1y5gRuvqB =AsTx -----END PGP SIGNATURE----- --k1G2Bc0EDIhoSmEt-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:42:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C5FB661; Wed, 22 Jan 2014 23:42:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D292910E1; Wed, 22 Jan 2014 23:42:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNgUn4024729; Wed, 22 Jan 2014 23:42:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNgUvK024728; Wed, 22 Jan 2014 23:42:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222342.s0MNgUvK024728@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261045 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:42:31 -0000 Author: mav Date: Wed Jan 22 23:42:30 2014 New Revision: 261045 URL: http://svnweb.freebsd.org/changeset/base/261045 Log: MFC r258132: Some minor tuning to rpc/svc.c: - close cosmetic race in svc_exit(); - do not set wait timeout for idle threads if we have no use for wakeups; - create new requested thread sooner, not only after some another thread wakeup, that may happen later under constant load. Modified: stable/10/sys/rpc/svc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Wed Jan 22 23:00:29 2014 (r261044) +++ stable/10/sys/rpc/svc.c Wed Jan 22 23:42:30 2014 (r261045) @@ -1011,6 +1011,18 @@ svc_run_internal(SVCPOOL *pool, bool_t i while (pool->sp_state != SVCPOOL_CLOSING) { /* + * Create new thread if requested. + */ + if (pool->sp_state == SVCPOOL_THREADWANTED) { + pool->sp_state = SVCPOOL_THREADSTARTING; + pool->sp_lastcreatetime = time_uptime; + mtx_unlock(&pool->sp_lock); + svc_new_thread(pool); + mtx_lock(&pool->sp_lock); + continue; + } + + /* * Check for idle transports once per second. */ if (time_uptime > pool->sp_lastidlecheck) { @@ -1046,8 +1058,13 @@ svc_run_internal(SVCPOOL *pool, bool_t i continue; LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); - error = cv_timedwait_sig(&st->st_cond, &pool->sp_lock, - 5 * hz); + if (ismaster || (!ismaster && + pool->sp_threadcount > pool->sp_minthreads)) + error = cv_timedwait_sig(&st->st_cond, + &pool->sp_lock, 5 * hz); + else + error = cv_wait_sig(&st->st_cond, + &pool->sp_lock); LIST_REMOVE(st, st_ilink); /* @@ -1060,24 +1077,11 @@ svc_run_internal(SVCPOOL *pool, bool_t i && !st->st_xprt && STAILQ_EMPTY(&st->st_reqs)) break; - } - if (error == EWOULDBLOCK) - continue; - if (error) { - if (pool->sp_state != SVCPOOL_CLOSING) { - mtx_unlock(&pool->sp_lock); - svc_exit(pool); - mtx_lock(&pool->sp_lock); - } - break; - } - - if (pool->sp_state == SVCPOOL_THREADWANTED) { - pool->sp_state = SVCPOOL_THREADSTARTING; - pool->sp_lastcreatetime = time_uptime; + } else if (error) { mtx_unlock(&pool->sp_lock); - svc_new_thread(pool); + svc_exit(pool); mtx_lock(&pool->sp_lock); + break; } continue; } @@ -1245,9 +1249,11 @@ svc_exit(SVCPOOL *pool) mtx_lock(&pool->sp_lock); - pool->sp_state = SVCPOOL_CLOSING; - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) - cv_signal(&st->st_cond); + if (pool->sp_state != SVCPOOL_CLOSING) { + pool->sp_state = SVCPOOL_CLOSING; + LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) + cv_signal(&st->st_cond); + } mtx_unlock(&pool->sp_lock); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:45:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A4EA7BE; Wed, 22 Jan 2014 23:45:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 730D510FD; Wed, 22 Jan 2014 23:45:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNjVQb025171; Wed, 22 Jan 2014 23:45:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNjSGs025150; Wed, 22 Jan 2014 23:45:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222345.s0MNjSGs025150@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261046 - in stable/10: include/rpc lib/libc/rpc sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:45:31 -0000 Author: mav Date: Wed Jan 22 23:45:27 2014 New Revision: 261046 URL: http://svnweb.freebsd.org/changeset/base/261046 Log: MFC r258578, r258580, r258581 (by hrs): Replace Sun RPC license in TI-RPC library with a 3-clause BSD license with the explicit permissions. Modified: stable/10/include/rpc/auth.h stable/10/include/rpc/auth_des.h stable/10/include/rpc/auth_kerb.h stable/10/include/rpc/auth_unix.h stable/10/include/rpc/clnt.h stable/10/include/rpc/clnt_soc.h stable/10/include/rpc/des.h stable/10/include/rpc/des_crypt.h stable/10/include/rpc/nettype.h stable/10/include/rpc/pmap_clnt.h stable/10/include/rpc/pmap_prot.h stable/10/include/rpc/pmap_rmt.h stable/10/include/rpc/raw.h stable/10/include/rpc/rpc.h stable/10/include/rpc/rpc_com.h stable/10/include/rpc/rpc_msg.h stable/10/include/rpc/rpcb_clnt.h stable/10/include/rpc/rpcb_prot.x stable/10/include/rpc/rpcent.h stable/10/include/rpc/svc.h stable/10/include/rpc/svc_auth.h stable/10/include/rpc/svc_dg.h stable/10/include/rpc/svc_soc.h stable/10/include/rpc/xdr.h stable/10/lib/libc/rpc/DISCLAIMER stable/10/lib/libc/rpc/auth_des.c stable/10/lib/libc/rpc/auth_none.c stable/10/lib/libc/rpc/auth_unix.c stable/10/lib/libc/rpc/authdes_prot.c stable/10/lib/libc/rpc/authunix_prot.c stable/10/lib/libc/rpc/bindresvport.c stable/10/lib/libc/rpc/clnt_bcast.c stable/10/lib/libc/rpc/clnt_dg.c stable/10/lib/libc/rpc/clnt_generic.c stable/10/lib/libc/rpc/clnt_perror.c stable/10/lib/libc/rpc/clnt_raw.c stable/10/lib/libc/rpc/clnt_simple.c stable/10/lib/libc/rpc/clnt_vc.c stable/10/lib/libc/rpc/des_crypt.c stable/10/lib/libc/rpc/des_soft.c stable/10/lib/libc/rpc/getnetconfig.c stable/10/lib/libc/rpc/getnetpath.c stable/10/lib/libc/rpc/getpublickey.c stable/10/lib/libc/rpc/getrpcent.c stable/10/lib/libc/rpc/getrpcport.c stable/10/lib/libc/rpc/key_call.c stable/10/lib/libc/rpc/key_prot_xdr.c stable/10/lib/libc/rpc/netname.c stable/10/lib/libc/rpc/netnamer.c stable/10/lib/libc/rpc/pmap_clnt.c stable/10/lib/libc/rpc/pmap_getmaps.c stable/10/lib/libc/rpc/pmap_getport.c stable/10/lib/libc/rpc/pmap_prot.c stable/10/lib/libc/rpc/pmap_prot2.c stable/10/lib/libc/rpc/pmap_rmt.c stable/10/lib/libc/rpc/rpc_callmsg.c stable/10/lib/libc/rpc/rpc_com.h stable/10/lib/libc/rpc/rpc_commondata.c stable/10/lib/libc/rpc/rpc_dtablesize.c stable/10/lib/libc/rpc/rpc_generic.c stable/10/lib/libc/rpc/rpc_prot.c stable/10/lib/libc/rpc/rpc_soc.c stable/10/lib/libc/rpc/rpcb_clnt.c stable/10/lib/libc/rpc/rpcb_prot.c stable/10/lib/libc/rpc/rpcb_st_xdr.c stable/10/lib/libc/rpc/rpcdname.c stable/10/lib/libc/rpc/rtime.c stable/10/lib/libc/rpc/svc.c stable/10/lib/libc/rpc/svc_auth.c stable/10/lib/libc/rpc/svc_auth_des.c stable/10/lib/libc/rpc/svc_auth_unix.c stable/10/lib/libc/rpc/svc_dg.c stable/10/lib/libc/rpc/svc_generic.c stable/10/lib/libc/rpc/svc_raw.c stable/10/lib/libc/rpc/svc_run.c stable/10/lib/libc/rpc/svc_simple.c stable/10/lib/libc/rpc/svc_vc.c stable/10/sys/rpc/auth.h stable/10/sys/rpc/auth_none.c stable/10/sys/rpc/auth_unix.c stable/10/sys/rpc/authunix_prot.c stable/10/sys/rpc/clnt.h stable/10/sys/rpc/clnt_dg.c stable/10/sys/rpc/clnt_vc.c stable/10/sys/rpc/krpc.h stable/10/sys/rpc/nettype.h stable/10/sys/rpc/pmap_prot.h stable/10/sys/rpc/rpc.h stable/10/sys/rpc/rpc_callmsg.c stable/10/sys/rpc/rpc_com.h stable/10/sys/rpc/rpc_generic.c stable/10/sys/rpc/rpc_msg.h stable/10/sys/rpc/rpc_prot.c stable/10/sys/rpc/rpcb_clnt.c stable/10/sys/rpc/rpcb_clnt.h stable/10/sys/rpc/rpcb_prot.c stable/10/sys/rpc/rpcb_prot.h stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h stable/10/sys/rpc/svc_auth.c stable/10/sys/rpc/svc_auth.h stable/10/sys/rpc/svc_auth_unix.c stable/10/sys/rpc/svc_dg.c stable/10/sys/rpc/svc_generic.c stable/10/sys/rpc/svc_vc.c stable/10/sys/rpc/types.h stable/10/sys/rpc/xdr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/include/rpc/auth.h ============================================================================== --- stable/10/include/rpc/auth.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/auth.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,32 +1,31 @@ /* $NetBSD: auth.h,v 1.15 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)auth.h 1.17 88/02/08 SMI * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC Modified: stable/10/include/rpc/auth_des.h ============================================================================== --- stable/10/include/rpc/auth_des.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/auth_des.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,32 +1,31 @@ /* @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC; from 1.3 88/02/08 SMI */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC * from: @(#)auth_des.h 1.14 94/04/25 SMI Modified: stable/10/include/rpc/auth_kerb.h ============================================================================== --- stable/10/include/rpc/auth_kerb.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/auth_kerb.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,31 +1,30 @@ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * auth_kerb.h, Protocol for Kerberos style authentication for RPC Modified: stable/10/include/rpc/auth_unix.h ============================================================================== --- stable/10/include/rpc/auth_unix.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/auth_unix.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,30 +1,29 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)auth_unix.h 1.8 88/02/08 SMI * from: @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC Modified: stable/10/include/rpc/clnt.h ============================================================================== --- stable/10/include/rpc/clnt.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/clnt.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,49 +1,31 @@ /* $NetBSD: clnt.h,v 1.14 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * The contents of this file are subject to the Sun Standards - * License Version 1.0 the (the "License";) You may not use - * this file except in compliance with the License. You may - * obtain a copy of the License at lib/libc/rpc/LICENSE - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * The Original Code is Copyright 1998 by Sun Microsystems, Inc - * - * The Initial Developer of the Original Code is: Sun - * Microsystems, Inc. - * - * All Rights Reserved. - * - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. +/*- + * Copyright (c) 2010, Oracle America, Inc. + * All rights reserved. * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)clnt.h 1.31 94/04/29 SMI * from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC @@ -52,9 +34,6 @@ /* * clnt.h - Client side remote procedure call interface. - * - * Copyright (c) 1986-1991,1994-1999 by Sun Microsystems, Inc. - * All rights reserved. */ #ifndef _RPC_CLNT_H_ Modified: stable/10/include/rpc/clnt_soc.h ============================================================================== --- stable/10/include/rpc/clnt_soc.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/clnt_soc.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,33 +1,32 @@ /* $NetBSD: clnt_soc.h,v 1.1 2000/06/02 22:57:55 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1984 - 1991 by Sun Microsystems, Inc. Modified: stable/10/include/rpc/des.h ============================================================================== --- stable/10/include/rpc/des.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/des.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,32 +1,31 @@ /* @(#)des.h 2.2 88/08/10 4.0 RPCSRC; from 2.7 88/02/08 SMI */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Generic DES driver interface Modified: stable/10/include/rpc/des_crypt.h ============================================================================== --- stable/10/include/rpc/des_crypt.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/des_crypt.h Wed Jan 22 23:45:27 2014 (r261046) @@ -5,33 +5,32 @@ * des_crypt.h, des library routine interface * Copyright (C) 1986, Sun Microsystems, Inc. */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: stable/10/include/rpc/nettype.h ============================================================================== --- stable/10/include/rpc/nettype.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/nettype.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,33 +1,32 @@ /* $NetBSD: nettype.h,v 1.2 2000/07/06 03:17:19 christos Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: stable/10/include/rpc/pmap_clnt.h ============================================================================== --- stable/10/include/rpc/pmap_clnt.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/pmap_clnt.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,32 +1,31 @@ /* $NetBSD: pmap_clnt.h,v 1.9 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC Modified: stable/10/include/rpc/pmap_prot.h ============================================================================== --- stable/10/include/rpc/pmap_prot.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/pmap_prot.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,32 +1,31 @@ /* $NetBSD: pmap_prot.h,v 1.8 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)pmap_prot.h 1.14 88/02/08 SMI * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC Modified: stable/10/include/rpc/pmap_rmt.h ============================================================================== --- stable/10/include/rpc/pmap_rmt.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/pmap_rmt.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,32 +1,31 @@ /* $NetBSD: pmap_rmt.h,v 1.7 1998/02/11 23:01:23 lukem Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI * from: @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC Modified: stable/10/include/rpc/raw.h ============================================================================== --- stable/10/include/rpc/raw.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/raw.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,33 +1,32 @@ /* $NetBSD: raw.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: stable/10/include/rpc/rpc.h ============================================================================== --- stable/10/include/rpc/rpc.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/rpc.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,32 +1,31 @@ /* $NetBSD: rpc.h,v 1.13 2000/06/02 22:57:56 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)rpc.h 1.9 88/02/08 SMI * from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC Modified: stable/10/include/rpc/rpc_com.h ============================================================================== --- stable/10/include/rpc/rpc_com.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/rpc_com.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,33 +1,32 @@ /* $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: stable/10/include/rpc/rpc_msg.h ============================================================================== --- stable/10/include/rpc/rpc_msg.h Wed Jan 22 23:42:30 2014 (r261045) +++ stable/10/include/rpc/rpc_msg.h Wed Jan 22 23:45:27 2014 (r261046) @@ -1,32 +1,31 @@ /* $NetBSD: rpc_msg.h,v 1.11 2000/06/02 22:57:56 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:46:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DEA6917; Wed, 22 Jan 2014 23:46:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E23D81104; Wed, 22 Jan 2014 23:46:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNkJ5i025308; Wed, 22 Jan 2014 23:46:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNkJFF025307; Wed, 22 Jan 2014 23:46:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222346.s0MNkJFF025307@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261047 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:46:20 -0000 Author: mav Date: Wed Jan 22 23:46:19 2014 New Revision: 261047 URL: http://svnweb.freebsd.org/changeset/base/261047 Log: MFC r259632: Rework flow control for connection-oriented (TCP) RPC server. When processing receive buffer, write the amount of data, expected in present request record, into socket's so_rcv.sb_lowat to make stack aware about our needs. When processing following upcalls, ignore them until socket collect enough data to be read and processed in one turn. This change reduces number of context switches and other operations in RPC stack during large NFS writes (especially via non-Jumbo networks) by order of magnitude. After precessing current packet, take another look into the pending buffer to find out whether the next packet had been already received. If not, deactivate this port right there without making RPC code to push this port to another thread just to find that there is nothing. If the next packet is received partially, also deactivate the port, but also update socket's so_rcv.sb_lowat to not be woken up prematurely. This change additionally reduces number of context switches per NFS request about in half. Modified: stable/10/sys/rpc/svc_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc_vc.c ============================================================================== --- stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:45:27 2014 (r261046) +++ stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:46:19 2014 (r261047) @@ -381,15 +381,11 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st * We must re-test for new connections after taking * the lock to protect us in the case where a new * connection arrives after our call to accept fails - * with EWOULDBLOCK. The pool lock protects us from - * racing the upcall after our TAILQ_EMPTY() call - * returns false. + * with EWOULDBLOCK. */ ACCEPT_LOCK(); - mtx_lock(&xprt->xp_pool->sp_lock); if (TAILQ_EMPTY(&xprt->xp_socket->so_comp)) - xprt_inactive_locked(xprt); - mtx_unlock(&xprt->xp_pool->sp_lock); + xprt_inactive(xprt); ACCEPT_UNLOCK(); sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -526,35 +522,14 @@ static enum xprt_stat svc_vc_stat(SVCXPRT *xprt) { struct cf_conn *cd; - struct mbuf *m; - size_t n; cd = (struct cf_conn *)(xprt->xp_p1); if (cd->strm_stat == XPRT_DIED) return (XPRT_DIED); - /* - * Return XPRT_MOREREQS if we have buffered data and we are - * mid-record or if we have enough data for a record - * marker. Since this is only a hint, we read mpending and - * resid outside the lock. We do need to take the lock if we - * have to traverse the mbuf chain. - */ - if (cd->mpending) { - if (cd->resid) - return (XPRT_MOREREQS); - n = 0; - sx_xlock(&xprt->xp_lock); - m = cd->mpending; - while (m && n < sizeof(uint32_t)) { - n += m->m_len; - m = m->m_next; - } - sx_xunlock(&xprt->xp_lock); - if (n >= sizeof(uint32_t)) - return (XPRT_MOREREQS); - } + if (cd->mreq != NULL && cd->resid == 0 && cd->eor) + return (XPRT_MOREREQS); if (soreadable(xprt->xp_socket)) return (XPRT_MOREREQS); @@ -575,6 +550,78 @@ svc_vc_backchannel_stat(SVCXPRT *xprt) return (XPRT_IDLE); } +/* + * If we have an mbuf chain in cd->mpending, try to parse a record from it, + * leaving the result in cd->mreq. If we don't have a complete record, leave + * the partial result in cd->mreq and try to read more from the socket. + */ +static void +svc_vc_process_pending(SVCXPRT *xprt) +{ + struct cf_conn *cd = (struct cf_conn *) xprt->xp_p1; + struct socket *so = xprt->xp_socket; + struct mbuf *m; + + /* + * If cd->resid is non-zero, we have part of the + * record already, otherwise we are expecting a record + * marker. + */ + if (!cd->resid && cd->mpending) { + /* + * See if there is enough data buffered to + * make up a record marker. Make sure we can + * handle the case where the record marker is + * split across more than one mbuf. + */ + size_t n = 0; + uint32_t header; + + m = cd->mpending; + while (n < sizeof(uint32_t) && m) { + n += m->m_len; + m = m->m_next; + } + if (n < sizeof(uint32_t)) { + so->so_rcv.sb_lowat = sizeof(uint32_t) - n; + return; + } + m_copydata(cd->mpending, 0, sizeof(header), + (char *)&header); + header = ntohl(header); + cd->eor = (header & 0x80000000) != 0; + cd->resid = header & 0x7fffffff; + m_adj(cd->mpending, sizeof(uint32_t)); + } + + /* + * Start pulling off mbufs from cd->mpending + * until we either have a complete record or + * we run out of data. We use m_split to pull + * data - it will pull as much as possible and + * split the last mbuf if necessary. + */ + while (cd->mpending && cd->resid) { + m = cd->mpending; + if (cd->mpending->m_next + || cd->mpending->m_len > cd->resid) + cd->mpending = m_split(cd->mpending, + cd->resid, M_WAITOK); + else + cd->mpending = NULL; + if (cd->mreq) + m_last(cd->mreq)->m_next = m; + else + cd->mreq = m; + while (m) { + cd->resid -= m->m_len; + m = m->m_next; + } + } + + so->so_rcv.sb_lowat = imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); +} + static bool_t svc_vc_recv(SVCXPRT *xprt, struct rpc_msg *msg, struct sockaddr **addrp, struct mbuf **mp) @@ -582,6 +629,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms struct cf_conn *cd = (struct cf_conn *) xprt->xp_p1; struct uio uio; struct mbuf *m; + struct socket* so = xprt->xp_socket; XDR xdrs; int error, rcvflag; @@ -592,99 +640,40 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms sx_xlock(&xprt->xp_lock); for (;;) { - /* - * If we have an mbuf chain in cd->mpending, try to parse a - * record from it, leaving the result in cd->mreq. If we don't - * have a complete record, leave the partial result in - * cd->mreq and try to read more from the socket. - */ - if (cd->mpending) { - /* - * If cd->resid is non-zero, we have part of the - * record already, otherwise we are expecting a record - * marker. - */ - if (!cd->resid) { - /* - * See if there is enough data buffered to - * make up a record marker. Make sure we can - * handle the case where the record marker is - * split across more than one mbuf. - */ - size_t n = 0; - uint32_t header; - - m = cd->mpending; - while (n < sizeof(uint32_t) && m) { - n += m->m_len; - m = m->m_next; - } - if (n < sizeof(uint32_t)) - goto readmore; - m_copydata(cd->mpending, 0, sizeof(header), - (char *)&header); - header = ntohl(header); - cd->eor = (header & 0x80000000) != 0; - cd->resid = header & 0x7fffffff; - m_adj(cd->mpending, sizeof(uint32_t)); - } - - /* - * Start pulling off mbufs from cd->mpending - * until we either have a complete record or - * we run out of data. We use m_split to pull - * data - it will pull as much as possible and - * split the last mbuf if necessary. - */ - while (cd->mpending && cd->resid) { - m = cd->mpending; - if (cd->mpending->m_next - || cd->mpending->m_len > cd->resid) - cd->mpending = m_split(cd->mpending, - cd->resid, M_WAITOK); - else - cd->mpending = NULL; - if (cd->mreq) - m_last(cd->mreq)->m_next = m; - else - cd->mreq = m; - while (m) { - cd->resid -= m->m_len; - m = m->m_next; - } + /* If we have no request ready, check pending queue. */ + while (cd->mpending && + (cd->mreq == NULL || cd->resid != 0 || !cd->eor)) + svc_vc_process_pending(xprt); + + /* Process and return complete request in cd->mreq. */ + if (cd->mreq != NULL && cd->resid == 0 && cd->eor) { + + xdrmbuf_create(&xdrs, cd->mreq, XDR_DECODE); + cd->mreq = NULL; + + /* Check for next request in a pending queue. */ + svc_vc_process_pending(xprt); + if (cd->mreq == NULL || cd->resid != 0) { + SOCKBUF_LOCK(&so->so_rcv); + if (!soreadable(so)) + xprt_inactive(xprt); + SOCKBUF_UNLOCK(&so->so_rcv); } - /* - * If cd->resid is zero now, we have managed to - * receive a record fragment from the stream. Check - * for the end-of-record mark to see if we need more. - */ - if (cd->resid == 0) { - if (!cd->eor) - continue; - - /* - * Success - we have a complete record in - * cd->mreq. - */ - xdrmbuf_create(&xdrs, cd->mreq, XDR_DECODE); - cd->mreq = NULL; - sx_xunlock(&xprt->xp_lock); - - if (! xdr_callmsg(&xdrs, msg)) { - XDR_DESTROY(&xdrs); - return (FALSE); - } + sx_xunlock(&xprt->xp_lock); - *addrp = NULL; - *mp = xdrmbuf_getall(&xdrs); + if (! xdr_callmsg(&xdrs, msg)) { XDR_DESTROY(&xdrs); - - return (TRUE); + return (FALSE); } + + *addrp = NULL; + *mp = xdrmbuf_getall(&xdrs); + XDR_DESTROY(&xdrs); + + return (TRUE); } - readmore: /* * The socket upcall calls xprt_active() which will eventually * cause the server to call us here. We attempt to @@ -697,8 +686,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms uio.uio_td = curthread; m = NULL; rcvflag = MSG_DONTWAIT; - error = soreceive(xprt->xp_socket, NULL, &uio, &m, NULL, - &rcvflag); + error = soreceive(so, NULL, &uio, &m, NULL, &rcvflag); if (error == EWOULDBLOCK) { /* @@ -706,25 +694,23 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms * taking the lock to protect us in the case * where a new packet arrives on the socket * after our call to soreceive fails with - * EWOULDBLOCK. The pool lock protects us from - * racing the upcall after our soreadable() - * call returns false. + * EWOULDBLOCK. */ - mtx_lock(&xprt->xp_pool->sp_lock); - if (!soreadable(xprt->xp_socket)) - xprt_inactive_locked(xprt); - mtx_unlock(&xprt->xp_pool->sp_lock); + SOCKBUF_LOCK(&so->so_rcv); + if (!soreadable(so)) + xprt_inactive(xprt); + SOCKBUF_UNLOCK(&so->so_rcv); sx_xunlock(&xprt->xp_lock); return (FALSE); } if (error) { - SOCKBUF_LOCK(&xprt->xp_socket->so_rcv); + SOCKBUF_LOCK(&so->so_rcv); if (xprt->xp_upcallset) { xprt->xp_upcallset = 0; - soupcall_clear(xprt->xp_socket, SO_RCV); + soupcall_clear(so, SO_RCV); } - SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); + SOCKBUF_UNLOCK(&so->so_rcv); xprt_inactive(xprt); cd->strm_stat = XPRT_DIED; sx_xunlock(&xprt->xp_lock); @@ -908,7 +894,8 @@ svc_vc_soupcall(struct socket *so, void { SVCXPRT *xprt = (SVCXPRT *) arg; - xprt_active(xprt); + if (soreadable(xprt->xp_socket)) + xprt_active(xprt); return (SU_OK); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:47:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CC8EA4A; Wed, 22 Jan 2014 23:47:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D10F110B; Wed, 22 Jan 2014 23:47:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNlU6q025477; Wed, 22 Jan 2014 23:47:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNlTce025474; Wed, 22 Jan 2014 23:47:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222347.s0MNlTce025474@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261048 - in stable/10/sys: nfs rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:47:30 -0000 Author: mav Date: Wed Jan 22 23:47:29 2014 New Revision: 261048 URL: http://svnweb.freebsd.org/changeset/base/261048 Log: MFC r259659, r259662: Remove several linear list traversals per request from RPC server code. Do not insert active ports into pool->sp_active list if they are success- fully assigned to some thread. This makes that list include only ports that really require attention, and so traversal can be reduced to simple taking the first one. Remove idle thread from pool->sp_idlethreads list when assigning some work (port of requests) to it. That again makes possible to replace list traversals with simple taking the first element. Modified: stable/10/sys/nfs/nfs_fha.c stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/nfs/nfs_fha.c ============================================================================== --- stable/10/sys/nfs/nfs_fha.c Wed Jan 22 23:46:19 2014 (r261047) +++ stable/10/sys/nfs/nfs_fha.c Wed Jan 22 23:47:29 2014 (r261048) @@ -289,19 +289,6 @@ fha_hash_entry_add_op(struct fha_hash_en fhe->num_rw += count; } -static SVCTHREAD * -get_idle_thread(SVCPOOL *pool) -{ - SVCTHREAD *st; - - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) { - if (st->st_xprt == NULL && STAILQ_EMPTY(&st->st_reqs)) - return (st); - } - return (NULL); -} - - /* * Get the service thread currently associated with the fhe that is * appropriate to handle this operation. @@ -386,7 +373,7 @@ fha_hash_entry_choose_thread(struct fha_ ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)t", thread, thread->st_reqcount); #endif - } else if ((thread = get_idle_thread(pool))) { + } else if ((thread = LIST_FIRST(&pool->sp_idlethreads))) { #if 0 ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)i", thread, thread->st_reqcount); @@ -418,7 +405,6 @@ SVCTHREAD * fha_assign(SVCTHREAD *this_thread, struct svc_req *req, struct fha_params *softc) { - SVCPOOL *pool; SVCTHREAD *thread; struct fha_info i; struct fha_hash_entry *fhe; @@ -439,7 +425,6 @@ fha_assign(SVCTHREAD *this_thread, struc if (req->rq_vers != 2 && req->rq_vers != 3) return (this_thread); - pool = req->rq_xprt->xp_pool; fha_extract_info(req, &i, cb); /* Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Wed Jan 22 23:46:19 2014 (r261047) +++ stable/10/sys/rpc/svc.c Wed Jan 22 23:47:29 2014 (r261048) @@ -293,12 +293,10 @@ xprt_unregister_locked(SVCXPRT *xprt) { SVCPOOL *pool = xprt->xp_pool; + mtx_assert(&pool->sp_lock, MA_OWNED); KASSERT(xprt->xp_registered == TRUE, ("xprt_unregister_locked: not registered")); - if (xprt->xp_active) { - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); - xprt->xp_active = FALSE; - } + xprt_inactive_locked(xprt); TAILQ_REMOVE(&pool->sp_xlist, xprt, xp_link); xprt->xp_registered = FALSE; } @@ -320,25 +318,25 @@ xprt_unregister(SVCXPRT *xprt) SVC_RELEASE(xprt); } -static void +/* + * Attempt to assign a service thread to this transport. + */ +static int xprt_assignthread(SVCXPRT *xprt) { SVCPOOL *pool = xprt->xp_pool; SVCTHREAD *st; - /* - * Attempt to assign a service thread to this - * transport. - */ - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) { - if (st->st_xprt == NULL && STAILQ_EMPTY(&st->st_reqs)) - break; - } + mtx_assert(&pool->sp_lock, MA_OWNED); + st = LIST_FIRST(&pool->sp_idlethreads); if (st) { + LIST_REMOVE(st, st_ilink); + st->st_idle = FALSE; SVC_ACQUIRE(xprt); xprt->xp_thread = st; st->st_xprt = xprt; cv_signal(&st->st_cond); + return (TRUE); } else { /* * See if we can create a new thread. The @@ -354,6 +352,7 @@ xprt_assignthread(SVCXPRT *xprt) pool->sp_state = SVCPOOL_THREADWANTED; } } + return (FALSE); } void @@ -372,9 +371,12 @@ xprt_active(SVCXPRT *xprt) } if (!xprt->xp_active) { - TAILQ_INSERT_TAIL(&pool->sp_active, xprt, xp_alink); xprt->xp_active = TRUE; - xprt_assignthread(xprt); + if (xprt->xp_thread == NULL) { + if (!xprt_assignthread(xprt)) + TAILQ_INSERT_TAIL(&pool->sp_active, xprt, + xp_alink); + } } mtx_unlock(&pool->sp_lock); @@ -385,8 +387,10 @@ xprt_inactive_locked(SVCXPRT *xprt) { SVCPOOL *pool = xprt->xp_pool; + mtx_assert(&pool->sp_lock, MA_OWNED); if (xprt->xp_active) { - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + if (xprt->xp_thread == NULL) + TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); xprt->xp_active = FALSE; } } @@ -948,10 +952,11 @@ svc_assign_waiting_sockets(SVCPOOL *pool { SVCXPRT *xprt; - TAILQ_FOREACH(xprt, &pool->sp_active, xp_alink) { - if (!xprt->xp_thread) { - xprt_assignthread(xprt); - } + while ((xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { + if (xprt_assignthread(xprt)) + TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + else + break; } } @@ -1042,21 +1047,17 @@ svc_run_internal(SVCPOOL *pool, bool_t i * active transport which isn't being serviced * by a thread. */ - if (svc_request_space_available(pool)) { - TAILQ_FOREACH(xprt, &pool->sp_active, - xp_alink) { - if (!xprt->xp_thread) { - SVC_ACQUIRE(xprt); - xprt->xp_thread = st; - st->st_xprt = xprt; - break; - } - } - } - if (st->st_xprt) + if (svc_request_space_available(pool) && + (xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { + TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + SVC_ACQUIRE(xprt); + xprt->xp_thread = st; + st->st_xprt = xprt; continue; + } LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); + st->st_idle = TRUE; if (ismaster || (!ismaster && pool->sp_threadcount > pool->sp_minthreads)) error = cv_timedwait_sig(&st->st_cond, @@ -1064,7 +1065,10 @@ svc_run_internal(SVCPOOL *pool, bool_t i else error = cv_wait_sig(&st->st_cond, &pool->sp_lock); - LIST_REMOVE(st, st_ilink); + if (st->st_idle) { + LIST_REMOVE(st, st_ilink); + st->st_idle = FALSE; + } /* * Reduce worker thread count when idle. @@ -1132,11 +1136,12 @@ svc_run_internal(SVCPOOL *pool, bool_t i * execute the request * immediately. */ - if (stpref != st) { - cv_signal(&stpref->st_cond); - continue; - } else { + if (stpref == st) break; + if (stpref->st_idle) { + LIST_REMOVE(stpref, st_ilink); + stpref->st_idle = FALSE; + cv_signal(&stpref->st_cond); } } } while (stat == XPRT_MOREREQS @@ -1153,10 +1158,9 @@ svc_run_internal(SVCPOOL *pool, bool_t i xprt->xp_thread = NULL; st->st_xprt = NULL; if (xprt->xp_active) { - xprt_assignthread(xprt); - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); - TAILQ_INSERT_TAIL(&pool->sp_active, xprt, - xp_alink); + if (!xprt_assignthread(xprt)) + TAILQ_INSERT_TAIL(&pool->sp_active, + xprt, xp_alink); } mtx_unlock(&pool->sp_lock); SVC_RELEASE(xprt); Modified: stable/10/sys/rpc/svc.h ============================================================================== --- stable/10/sys/rpc/svc.h Wed Jan 22 23:46:19 2014 (r261047) +++ stable/10/sys/rpc/svc.h Wed Jan 22 23:47:29 2014 (r261048) @@ -278,6 +278,7 @@ typedef struct __rpc_svcthread { SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ int st_reqcount; /* number of queued reqs */ + int st_idle; /* thread is on idle list */ struct cv st_cond; /* sleeping for work */ LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:48:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8354B7A; Wed, 22 Jan 2014 23:48:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A80441110; Wed, 22 Jan 2014 23:48:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNmGil025618; Wed, 22 Jan 2014 23:48:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNmFE9025614; Wed, 22 Jan 2014 23:48:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222348.s0MNmFE9025614@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261049 - in stable/10/sys: fs/nfsserver nfs nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:48:17 -0000 Author: mav Date: Wed Jan 22 23:48:15 2014 New Revision: 261049 URL: http://svnweb.freebsd.org/changeset/base/261049 Log: MFC r259765: Fix RPC server threads file handle affinity to work better with ZFS. Instead of taking 8 specific bytes of file handle to identify file during RPC thread affitinity handling, use trivial hash of the full file handle. ZFS's struct zfid_short does not have padding field after the length field, as result, originally picked 8 bytes are loosing lower 16 bits of object ID, causing many false matches and unneeded requests affinity to same thread. This fix substantially improves NFS server latency and scalability in SPEC NFS benchmark by more flexible use of multiple NFS threads. Modified: stable/10/sys/fs/nfsserver/nfs_fha_new.c stable/10/sys/nfs/nfs_fha.c stable/10/sys/nfs/nfs_fha.h stable/10/sys/nfsserver/nfs_fha_old.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_fha_new.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_fha_new.c Wed Jan 22 23:47:29 2014 (r261048) +++ stable/10/sys/fs/nfsserver/nfs_fha_new.c Wed Jan 22 23:48:15 2014 (r261049) @@ -41,7 +41,7 @@ static void fhanew_init(void *foo); static void fhanew_uninit(void *foo); rpcproc_t fhanew_get_procnum(rpcproc_t procnum); int fhanew_realign(struct mbuf **mb, int malloc_flags); -int fhanew_get_fh(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos); +int fhanew_get_fh(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos); int fhanew_is_read(rpcproc_t procnum); int fhanew_is_write(rpcproc_t procnum); int fhanew_get_offset(struct mbuf **md, caddr_t *dpos, int v3, @@ -128,11 +128,13 @@ fhanew_realign(struct mbuf **mb, int mal } int -fhanew_get_fh(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos) +fhanew_get_fh(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos) { struct nfsrv_descript lnd, *nd; uint32_t *tl; - int error, len; + uint8_t *buf; + uint64_t t; + int error, len, i; error = 0; len = 0; @@ -151,11 +153,13 @@ fhanew_get_fh(fhandle_t *fh, int v3, str len = NFSX_V2FH; } + t = 0; if (len != 0) { - NFSM_DISSECT_NONBLOCK(tl, uint32_t *, len); - bcopy(tl, fh, len); - } else - bzero(fh, sizeof(*fh)); + NFSM_DISSECT_NONBLOCK(buf, uint8_t *, len); + for (i = 0; i < len; i++) + t ^= ((uint64_t)buf[i] << (i & 7) * 8); + } + *fh = t; nfsmout: *md = nd->nd_md; Modified: stable/10/sys/nfs/nfs_fha.c ============================================================================== --- stable/10/sys/nfs/nfs_fha.c Wed Jan 22 23:47:29 2014 (r261048) +++ stable/10/sys/nfs/nfs_fha.c Wed Jan 22 23:48:15 2014 (r261049) @@ -130,7 +130,6 @@ fha_extract_info(struct svc_req *req, st struct fha_callbacks *cb) { struct mbuf *md; - fhandle_t fh; caddr_t dpos; static u_int64_t random_fh = 0; int error; @@ -177,12 +176,10 @@ fha_extract_info(struct svc_req *req, st dpos = mtod(md, caddr_t); /* Grab the filehandle. */ - error = cb->get_fh(&fh, v3, &md, &dpos); + error = cb->get_fh(&i->fh, v3, &md, &dpos); if (error) goto out; - bcopy(fh.fh_fid.fid_data, &i->fh, sizeof(i->fh)); - /* Content ourselves with zero offset for all but reads. */ if (cb->is_read(procnum) || cb->is_write(procnum)) cb->get_offset(&md, &dpos, v3, i); Modified: stable/10/sys/nfs/nfs_fha.h ============================================================================== --- stable/10/sys/nfs/nfs_fha.h Wed Jan 22 23:47:29 2014 (r261048) +++ stable/10/sys/nfs/nfs_fha.h Wed Jan 22 23:48:15 2014 (r261049) @@ -82,7 +82,7 @@ struct fha_info { struct fha_callbacks { rpcproc_t (*get_procnum)(rpcproc_t procnum); int (*realign)(struct mbuf **mb, int malloc_flags); - int (*get_fh)(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos); + int (*get_fh)(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos); int (*is_read)(rpcproc_t procnum); int (*is_write)(rpcproc_t procnum); int (*get_offset)(struct mbuf **md, caddr_t *dpos, int v3, struct Modified: stable/10/sys/nfsserver/nfs_fha_old.c ============================================================================== --- stable/10/sys/nfsserver/nfs_fha_old.c Wed Jan 22 23:47:29 2014 (r261048) +++ stable/10/sys/nfsserver/nfs_fha_old.c Wed Jan 22 23:48:15 2014 (r261049) @@ -49,7 +49,7 @@ static void fhaold_init(void *foo); static void fhaold_uninit(void *foo); rpcproc_t fhaold_get_procnum(rpcproc_t procnum); int fhaold_realign(struct mbuf **mb, int malloc_flags); -int fhaold_get_fh(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos); +int fhaold_get_fh(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos); int fhaold_is_read(rpcproc_t procnum); int fhaold_is_write(rpcproc_t procnum); int fhaold_get_offset(struct mbuf **md, caddr_t *dpos, int v3, @@ -135,9 +135,33 @@ fhaold_realign(struct mbuf **mb, int mal } int -fhaold_get_fh(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos) +fhaold_get_fh(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos) { - return (nfsm_srvmtofh_xx(fh, v3, md, dpos)); + u_int32_t *tl; + uint8_t *buf; + uint64_t t; + int fhlen, i; + + if (v3) { + tl = nfsm_dissect_xx_nonblock(NFSX_UNSIGNED, md, dpos); + if (tl == NULL) + return EBADRPC; + fhlen = fxdr_unsigned(int, *tl); + if (fhlen != 0 && fhlen != NFSX_V3FH) + return EBADRPC; + } else { + fhlen = NFSX_V2FH; + } + t = 0; + if (fhlen != 0) { + buf = nfsm_dissect_xx_nonblock(fhlen, md, dpos); + if (buf == NULL) + return EBADRPC; + for (i = 0; i < fhlen; i++) + t ^= ((uint64_t)buf[i] << (i & 7) * 8); + } + *fh = t; + return 0; } int From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:48:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45759CAA; Wed, 22 Jan 2014 23:48:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 313CD1115; Wed, 22 Jan 2014 23:48:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNmtdl025721; Wed, 22 Jan 2014 23:48:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNmtpU025720; Wed, 22 Jan 2014 23:48:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222348.s0MNmtpU025720@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261050 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:48:55 -0000 Author: mav Date: Wed Jan 22 23:48:54 2014 New Revision: 261050 URL: http://svnweb.freebsd.org/changeset/base/261050 Log: MFC r259828: Fix a bug introduced at r259632, triggering infinite loop in some cases. Modified: stable/10/sys/rpc/svc_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc_vc.c ============================================================================== --- stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:48:15 2014 (r261049) +++ stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:48:54 2014 (r261050) @@ -555,7 +555,7 @@ svc_vc_backchannel_stat(SVCXPRT *xprt) * leaving the result in cd->mreq. If we don't have a complete record, leave * the partial result in cd->mreq and try to read more from the socket. */ -static void +static int svc_vc_process_pending(SVCXPRT *xprt) { struct cf_conn *cd = (struct cf_conn *) xprt->xp_p1; @@ -584,7 +584,7 @@ svc_vc_process_pending(SVCXPRT *xprt) } if (n < sizeof(uint32_t)) { so->so_rcv.sb_lowat = sizeof(uint32_t) - n; - return; + return (FALSE); } m_copydata(cd->mpending, 0, sizeof(header), (char *)&header); @@ -620,6 +620,7 @@ svc_vc_process_pending(SVCXPRT *xprt) } so->so_rcv.sb_lowat = imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); + return (TRUE); } static bool_t @@ -642,8 +643,10 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms for (;;) { /* If we have no request ready, check pending queue. */ while (cd->mpending && - (cd->mreq == NULL || cd->resid != 0 || !cd->eor)) - svc_vc_process_pending(xprt); + (cd->mreq == NULL || cd->resid != 0 || !cd->eor)) { + if (!svc_vc_process_pending(xprt)) + break; + } /* Process and return complete request in cd->mreq. */ if (cd->mreq != NULL && cd->resid == 0 && cd->eor) { From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:49:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBFE7DF2; Wed, 22 Jan 2014 23:49:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BC8EA1123; Wed, 22 Jan 2014 23:49:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNnbkS025848; Wed, 22 Jan 2014 23:49:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNnbhk025847; Wed, 22 Jan 2014 23:49:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222349.s0MNnbhk025847@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261051 - stable/10/sys/fs/nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:49:38 -0000 Author: mav Date: Wed Jan 22 23:49:37 2014 New Revision: 261051 URL: http://svnweb.freebsd.org/changeset/base/261051 Log: MFC r259877: Slightly simplify expiration logic introduced in r254337. - Do not update the histogram for items we are any way deleting from cache. - Do not update the histogram if nfsrc_tcphighwater is not set. - Remove some extra math operations. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Wed Jan 22 23:48:54 2014 (r261050) +++ stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Wed Jan 22 23:49:37 2014 (r261051) @@ -832,6 +832,7 @@ nfsrvd_cleancache(void) nfsrc_tcpsavedreplies = 0; } +#define HISTSIZE 16 /* * The basic rule is to get rid of entries that are expired. */ @@ -839,7 +840,7 @@ static void nfsrc_trimcache(u_int64_t sockref, struct socket *so) { struct nfsrvcache *rp, *nextrp; - int i, j, k, time_histo[10]; + int i, j, k, tto, time_histo[HISTSIZE]; time_t thisstamp; static time_t udp_lasttrim = 0, tcp_lasttrim = 0; static int onethread = 0; @@ -863,8 +864,9 @@ nfsrc_trimcache(u_int64_t sockref, struc } if (NFSD_MONOSEC != tcp_lasttrim || nfsrc_tcpsavedreplies >= nfsrc_tcphighwater) { - for (i = 0; i < 10; i++) + for (i = 0; i < HISTSIZE; i++) time_histo[i] = 0; + tto = nfsrc_tcptimeout; for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { mtx_lock(&nfsrchash_table[i].mtx); if (i == 0) @@ -874,6 +876,15 @@ nfsrc_trimcache(u_int64_t sockref, struc if (!(rp->rc_flag & (RC_INPROG|RC_LOCKED|RC_WANTED)) && rp->rc_refcnt == 0) { + if ((rp->rc_flag & RC_REFCNT) || + tcp_lasttrim > rp->rc_timestamp || + nfsrc_activesocket(rp, sockref, so)) { + nfsrc_freecache(rp); + continue; + } + + if (nfsrc_tcphighwater == 0) + continue; /* * The timestamps range from roughly the * present (tcp_lasttrim) to the present @@ -881,16 +892,13 @@ nfsrc_trimcache(u_int64_t sockref, struc * histogram of where the timeouts fall. */ j = rp->rc_timestamp - tcp_lasttrim; - if (j >= nfsrc_tcptimeout) - j = nfsrc_tcptimeout - 1; - if (j < 0) + if (j >= tto) + j = HISTSIZE - 1; + else if (j < 0) j = 0; - j = (j * 10 / nfsrc_tcptimeout) % 10; + else + j = j * HISTSIZE / tto; time_histo[j]++; - if ((rp->rc_flag & RC_REFCNT) || - tcp_lasttrim > rp->rc_timestamp || - nfsrc_activesocket(rp, sockref, so)) - nfsrc_freecache(rp); } } mtx_unlock(&nfsrchash_table[i].mtx); @@ -903,12 +911,12 @@ nfsrc_trimcache(u_int64_t sockref, struc * 80% of the nfsrc_tcphighwater. */ k = 0; - for (i = 0; i < 8; i++) { + for (i = 0; i < (HISTSIZE - 2); i++) { k += time_histo[i]; if (k > j) break; } - k = nfsrc_tcptimeout * (i + 1) / 10; + k = tto * (i + 1) / HISTSIZE; if (k < 1) k = 1; thisstamp = tcp_lasttrim + k; From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:50:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CCF9FB5; Wed, 22 Jan 2014 23:50:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 893E01135; Wed, 22 Jan 2014 23:50:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNoDAE026298; Wed, 22 Jan 2014 23:50:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNoDmp026297; Wed, 22 Jan 2014 23:50:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222350.s0MNoDmp026297@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261052 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:50:13 -0000 Author: mav Date: Wed Jan 22 23:50:13 2014 New Revision: 261052 URL: http://svnweb.freebsd.org/changeset/base/261052 Log: MFC r260031: In addition to r259632 completely block receive upcalls if we have more data than we need. This reduces lock pressure from xprt_active() side. Modified: stable/10/sys/rpc/svc_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc_vc.c ============================================================================== --- stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:49:37 2014 (r261051) +++ stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:50:13 2014 (r261052) @@ -619,7 +619,15 @@ svc_vc_process_pending(SVCXPRT *xprt) } } - so->so_rcv.sb_lowat = imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); + /* + * Block receive upcalls if we have more data pending, + * otherwise report our need. + */ + if (cd->mpending) + so->so_rcv.sb_lowat = INT_MAX; + else + so->so_rcv.sb_lowat = + imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); return (TRUE); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:51:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 206CE24F; Wed, 22 Jan 2014 23:51:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 017AD11AA; Wed, 22 Jan 2014 23:51:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNpDKV027178; Wed, 22 Jan 2014 23:51:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNpDCH027174; Wed, 22 Jan 2014 23:51:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222351.s0MNpDCH027174@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261053 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:51:14 -0000 Author: mav Date: Wed Jan 22 23:51:12 2014 New Revision: 261053 URL: http://svnweb.freebsd.org/changeset/base/261053 Log: MFC r260036: Introduce xprt_inactive_self() -- variant for use when sure that port is assigned to thread. For example, withing receive handlers. In that case the function reduces to single assignment and can avoid locking. Modified: stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h stable/10/sys/rpc/svc_dg.c stable/10/sys/rpc/svc_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Wed Jan 22 23:50:13 2014 (r261052) +++ stable/10/sys/rpc/svc.c Wed Jan 22 23:51:12 2014 (r261053) @@ -406,6 +406,19 @@ xprt_inactive(SVCXPRT *xprt) } /* + * Variant of xprt_inactive() for use only when sure that port is + * assigned to thread. For example, withing receive handlers. + */ +void +xprt_inactive_self(SVCXPRT *xprt) +{ + + KASSERT(xprt->xp_thread != NULL, + ("xprt_inactive_self(%p) with NULL xp_thread", xprt)); + xprt->xp_active = FALSE; +} + +/* * Add a service program to the callout list. * The dispatch routine will be called when a rpc request for this * program number comes in. Modified: stable/10/sys/rpc/svc.h ============================================================================== --- stable/10/sys/rpc/svc.h Wed Jan 22 23:50:13 2014 (r261052) +++ stable/10/sys/rpc/svc.h Wed Jan 22 23:51:12 2014 (r261053) @@ -523,6 +523,7 @@ __BEGIN_DECLS extern void xprt_active(SVCXPRT *); extern void xprt_inactive(SVCXPRT *); extern void xprt_inactive_locked(SVCXPRT *); +extern void xprt_inactive_self(SVCXPRT *); __END_DECLS #endif Modified: stable/10/sys/rpc/svc_dg.c ============================================================================== --- stable/10/sys/rpc/svc_dg.c Wed Jan 22 23:50:13 2014 (r261052) +++ stable/10/sys/rpc/svc_dg.c Wed Jan 22 23:51:12 2014 (r261053) @@ -196,10 +196,10 @@ svc_dg_recv(SVCXPRT *xprt, struct rpc_ms * from racing the upcall after our soreadable() call * returns false. */ - mtx_lock(&xprt->xp_pool->sp_lock); + SOCKBUF_LOCK(&xprt->xp_socket->so_rcv); if (!soreadable(xprt->xp_socket)) - xprt_inactive_locked(xprt); - mtx_unlock(&xprt->xp_pool->sp_lock); + xprt_inactive_self(xprt); + SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); sx_xunlock(&xprt->xp_lock); return (FALSE); } @@ -208,7 +208,7 @@ svc_dg_recv(SVCXPRT *xprt, struct rpc_ms SOCKBUF_LOCK(&xprt->xp_socket->so_rcv); soupcall_clear(xprt->xp_socket, SO_RCV); SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); - xprt_inactive(xprt); + xprt_inactive_self(xprt); sx_xunlock(&xprt->xp_lock); return (FALSE); } Modified: stable/10/sys/rpc/svc_vc.c ============================================================================== --- stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:50:13 2014 (r261052) +++ stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:51:12 2014 (r261053) @@ -385,7 +385,7 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st */ ACCEPT_LOCK(); if (TAILQ_EMPTY(&xprt->xp_socket->so_comp)) - xprt_inactive(xprt); + xprt_inactive_self(xprt); ACCEPT_UNLOCK(); sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -398,7 +398,7 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st soupcall_clear(xprt->xp_socket, SO_RCV); } SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); - xprt_inactive(xprt); + xprt_inactive_self(xprt); sx_xunlock(&xprt->xp_lock); return (FALSE); } @@ -667,7 +667,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms if (cd->mreq == NULL || cd->resid != 0) { SOCKBUF_LOCK(&so->so_rcv); if (!soreadable(so)) - xprt_inactive(xprt); + xprt_inactive_self(xprt); SOCKBUF_UNLOCK(&so->so_rcv); } @@ -709,7 +709,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms */ SOCKBUF_LOCK(&so->so_rcv); if (!soreadable(so)) - xprt_inactive(xprt); + xprt_inactive_self(xprt); SOCKBUF_UNLOCK(&so->so_rcv); sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -722,7 +722,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms soupcall_clear(so, SO_RCV); } SOCKBUF_UNLOCK(&so->so_rcv); - xprt_inactive(xprt); + xprt_inactive_self(xprt); cd->strm_stat = XPRT_DIED; sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -732,7 +732,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms /* * EOF - the other end has closed the socket. */ - xprt_inactive(xprt); + xprt_inactive_self(xprt); cd->strm_stat = XPRT_DIED; sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -763,7 +763,7 @@ svc_vc_backchannel_recv(SVCXPRT *xprt, s mtx_lock(&ct->ct_lock); m = cd->mreq; if (m == NULL) { - xprt_inactive(xprt); + xprt_inactive_self(xprt); mtx_unlock(&ct->ct_lock); sx_xunlock(&xprt->xp_lock); return (FALSE); From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:52:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6312550F; Wed, 22 Jan 2014 23:52:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4DB0411BF; Wed, 22 Jan 2014 23:52:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNqLTq028961; Wed, 22 Jan 2014 23:52:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNqKTY028954; Wed, 22 Jan 2014 23:52:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222352.s0MNqKTY028954@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261054 - in stable/10/sys: nfs rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:52:21 -0000 Author: mav Date: Wed Jan 22 23:52:20 2014 New Revision: 261054 URL: http://svnweb.freebsd.org/changeset/base/261054 Log: MFC r260097: Move most of NFS file handle affinity code out of the heavily congested global RPC thread pool lock and protect it with own set of locks. On synthetic benchmarks this improves peak NFS request rate by 40%. Modified: stable/10/sys/nfs/nfs_fha.c stable/10/sys/nfs/nfs_fha.h stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/nfs/nfs_fha.c ============================================================================== --- stable/10/sys/nfs/nfs_fha.c Wed Jan 22 23:51:12 2014 (r261053) +++ stable/10/sys/nfs/nfs_fha.c Wed Jan 22 23:52:20 2014 (r261054) @@ -52,13 +52,10 @@ void fha_init(struct fha_params *softc) { char tmpstr[128]; + int i; - /* - * A small hash table to map filehandles to fha_hash_entry - * structures. - */ - softc->g_fha.hashtable = hashinit(256, M_NFS_FHA, - &softc->g_fha.hashmask); + for (i = 0; i < FHA_HASH_SIZE; i++) + mtx_init(&softc->fha_hash[i].mtx, "fhalock", NULL, MTX_DEF); /* * Set the default tuning parameters. @@ -117,8 +114,11 @@ fha_init(struct fha_params *softc) void fha_uninit(struct fha_params *softc) { + int i; + sysctl_ctx_free(&softc->sysctl_ctx); - hashdestroy(softc->g_fha.hashtable, M_NFS_FHA, softc->g_fha.hashmask); + for (i = 0; i < FHA_HASH_SIZE; i++) + mtx_destroy(&softc->fha_hash[i].mtx); } /* @@ -207,8 +207,13 @@ static void fha_hash_entry_destroy(struct fha_hash_entry *e) { - if (e->num_rw + e->num_exclusive) - panic("nonempty fhe"); + mtx_assert(e->mtx, MA_OWNED); + KASSERT(e->num_rw == 0, + ("%d reqs on destroyed fhe %p", e->num_rw, e)); + KASSERT(e->num_exclusive == 0, + ("%d exclusive reqs on destroyed fhe %p", e->num_exclusive, e)); + KASSERT(e->num_threads == 0, + ("%d threads on destroyed fhe %p", e->num_threads, e)); free(e, M_NFS_FHA); } @@ -216,6 +221,7 @@ static void fha_hash_entry_remove(struct fha_hash_entry *e) { + mtx_assert(e->mtx, MA_OWNED); LIST_REMOVE(e, link); fha_hash_entry_destroy(e); } @@ -224,36 +230,22 @@ static struct fha_hash_entry * fha_hash_entry_lookup(struct fha_params *softc, u_int64_t fh) { SVCPOOL *pool; - - pool = *softc->pool; - + struct fha_hash_slot *fhs; struct fha_hash_entry *fhe, *new_fhe; - LIST_FOREACH(fhe, &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], - link) + pool = *softc->pool; + fhs = &softc->fha_hash[fh % FHA_HASH_SIZE]; + new_fhe = fha_hash_entry_new(fh); + new_fhe->mtx = &fhs->mtx; + mtx_lock(&fhs->mtx); + LIST_FOREACH(fhe, &fhs->list, link) if (fhe->fh == fh) break; - if (!fhe) { - /* Allocate a new entry. */ - mtx_unlock(&pool->sp_lock); - new_fhe = fha_hash_entry_new(fh); - mtx_lock(&pool->sp_lock); - - /* Double-check to make sure we still need the new entry. */ - LIST_FOREACH(fhe, - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], link) - if (fhe->fh == fh) - break; - if (!fhe) { - fhe = new_fhe; - LIST_INSERT_HEAD( - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], - fhe, link); - } else - fha_hash_entry_destroy(new_fhe); - } - + fhe = new_fhe; + LIST_INSERT_HEAD(&fhs->list, fhe, link); + } else + fha_hash_entry_destroy(new_fhe); return (fhe); } @@ -261,6 +253,8 @@ static void fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) { + mtx_assert(fhe->mtx, MA_OWNED); + thread->st_p2 = 0; LIST_INSERT_HEAD(&fhe->threads, thread, st_alink); fhe->num_threads++; } @@ -269,6 +263,9 @@ static void fha_hash_entry_remove_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) { + mtx_assert(fhe->mtx, MA_OWNED); + KASSERT(thread->st_p2 == 0, + ("%d reqs on removed thread %p", thread->st_p2, thread)); LIST_REMOVE(thread, st_alink); fhe->num_threads--; } @@ -280,6 +277,7 @@ static void fha_hash_entry_add_op(struct fha_hash_entry *fhe, int locktype, int count) { + mtx_assert(fhe->mtx, MA_OWNED); if (LK_EXCLUSIVE == locktype) fhe->num_exclusive += count; else @@ -306,7 +304,7 @@ fha_hash_entry_choose_thread(struct fha_ pool = *softc->pool; LIST_FOREACH(thread, &fhe->threads, st_alink) { - req_count = thread->st_reqcount; + req_count = thread->st_p2; /* If there are any writes in progress, use the first thread. */ if (fhe->num_exclusive) { @@ -322,7 +320,7 @@ fha_hash_entry_choose_thread(struct fha_ * exceed our per-thread load limit in the process. */ offset1 = i->offset; - offset2 = STAILQ_FIRST(&thread->st_reqs)->rq_p3; + offset2 = thread->st_p3; if (((offset1 >= offset2) && ((offset1 - offset2) < (1 << softc->ctls.bin_shift))) @@ -360,28 +358,11 @@ fha_hash_entry_choose_thread(struct fha_ */ if ((softc->ctls.max_nfsds_per_fh == 0) || (fhe->num_threads < softc->ctls.max_nfsds_per_fh)) { - /* - * We can add a new thread, so try for an idle thread - * first, and fall back to this_thread if none are idle. - */ - if (STAILQ_EMPTY(&this_thread->st_reqs)) { - thread = this_thread; + thread = this_thread; #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)t", thread, thread->st_reqcount); -#endif - } else if ((thread = LIST_FIRST(&pool->sp_idlethreads))) { -#if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)i", thread, thread->st_reqcount); -#endif - } else { - thread = this_thread; -#if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)b", thread, thread->st_reqcount); + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + "fha: %p(%d)t", thread, thread->st_p2); #endif - } fha_hash_entry_add_thread(fhe, thread); } else { /* @@ -411,16 +392,16 @@ fha_assign(SVCTHREAD *this_thread, struc /* Check to see whether we're enabled. */ if (softc->ctls.enable == 0) - return (this_thread); + goto thist; /* * Only do placement if this is an NFS request. */ if (req->rq_prog != NFS_PROG) - return (this_thread); + goto thist; if (req->rq_vers != 2 && req->rq_vers != 3) - return (this_thread); + goto thist; fha_extract_info(req, &i, cb); @@ -440,8 +421,21 @@ fha_assign(SVCTHREAD *this_thread, struc thread = fha_hash_entry_choose_thread(softc, fhe, &i, this_thread); KASSERT(thread, ("fha_assign: NULL thread!")); fha_hash_entry_add_op(fhe, i.locktype, 1); + thread->st_p2++; + thread->st_p3 = i.offset; + + /* + * Grab the pool lock here to not let chosen thread go away before + * the new request inserted to its queue while we drop fhe lock. + */ + mtx_lock(&(*softc->pool)->sp_lock); + mtx_unlock(fhe->mtx); return (thread); +thist: + req->rq_p1 = NULL; + mtx_lock(&(*softc->pool)->sp_lock); + return (this_thread); } /* @@ -452,6 +446,7 @@ void fha_nd_complete(SVCTHREAD *thread, struct svc_req *req) { struct fha_hash_entry *fhe = req->rq_p1; + struct mtx *mtx; /* * This may be called for reqs that didn't go through @@ -460,13 +455,18 @@ fha_nd_complete(SVCTHREAD *thread, struc if (!fhe) return; + mtx = fhe->mtx; + mtx_lock(mtx); fha_hash_entry_add_op(fhe, req->rq_p2, -1); - - if (thread->st_reqcount == 0) { + thread->st_p2--; + KASSERT(thread->st_p2 >= 0, ("Negative request count %d on %p", + thread->st_p2, thread)); + if (thread->st_p2 == 0) { fha_hash_entry_remove_thread(fhe, thread); if (0 == fhe->num_rw + fhe->num_exclusive) fha_hash_entry_remove(fhe); } + mtx_unlock(mtx); } int @@ -489,10 +489,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st } pool = *softc->pool; - mtx_lock(&pool->sp_lock); count = 0; - for (i = 0; i <= softc->g_fha.hashmask; i++) - if (!LIST_EMPTY(&softc->g_fha.hashtable[i])) + for (i = 0; i < FHA_HASH_SIZE; i++) + if (!LIST_EMPTY(&softc->fha_hash[i].list)) count++; if (count == 0) { @@ -500,8 +499,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st goto out; } - for (i = 0; i <= softc->g_fha.hashmask; i++) { - LIST_FOREACH(fhe, &softc->g_fha.hashtable[i], link) { + for (i = 0; i < FHA_HASH_SIZE; i++) { + mtx_lock(&softc->fha_hash[i].mtx); + LIST_FOREACH(fhe, &softc->fha_hash[i].list, link) { sbuf_printf(&sb, "%sfhe %p: {\n", first ? "" : ", ", fhe); sbuf_printf(&sb, " fh: %ju\n", (uintmax_t) fhe->fh); @@ -512,8 +512,7 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st LIST_FOREACH(thread, &fhe->threads, st_alink) { sbuf_printf(&sb, " thread %p offset %ju " "(count %d)\n", thread, - STAILQ_FIRST(&thread->st_reqs)->rq_p3, - thread->st_reqcount); + thread->st_p3, thread->st_p2); } sbuf_printf(&sb, "}"); @@ -525,11 +524,10 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st break; } } + mtx_unlock(&softc->fha_hash[i].mtx); } out: - if (pool) - mtx_unlock(&pool->sp_lock); sbuf_trim(&sb); sbuf_finish(&sb); error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); Modified: stable/10/sys/nfs/nfs_fha.h ============================================================================== --- stable/10/sys/nfs/nfs_fha.h Wed Jan 22 23:51:12 2014 (r261053) +++ stable/10/sys/nfs/nfs_fha.h Wed Jan 22 23:52:20 2014 (r261054) @@ -35,11 +35,7 @@ #define FHA_DEF_MAX_NFSDS_PER_FH 8 #define FHA_DEF_MAX_REQS_PER_NFSD 0 /* Unlimited */ -/* This is the global structure that represents the state of the fha system. */ -struct fha_global { - struct fha_hash_entry_list *hashtable; - u_long hashmask; -}; +#define FHA_HASH_SIZE 251 struct fha_ctls { int enable; @@ -62,6 +58,7 @@ struct fha_ctls { * avoid contention between threads over single files. */ struct fha_hash_entry { + struct mtx *mtx; LIST_ENTRY(fha_hash_entry) link; u_int64_t fh; u_int32_t num_rw; @@ -72,6 +69,11 @@ struct fha_hash_entry { LIST_HEAD(fha_hash_entry_list, fha_hash_entry); +struct fha_hash_slot { + struct fha_hash_entry_list list; + struct mtx mtx; +}; + /* A structure used for passing around data internally. */ struct fha_info { u_int64_t fh; @@ -93,7 +95,7 @@ struct fha_callbacks { }; struct fha_params { - struct fha_global g_fha; + struct fha_hash_slot fha_hash[FHA_HASH_SIZE]; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; struct fha_ctls ctls; Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Wed Jan 22 23:51:12 2014 (r261053) +++ stable/10/sys/rpc/svc.c Wed Jan 22 23:52:20 2014 (r261054) @@ -71,6 +71,8 @@ static struct svc_callout *svc_find(SVCP char *); static void svc_new_thread(SVCPOOL *pool); static void xprt_unregister_locked(SVCXPRT *xprt); +static void svc_change_space_used(SVCPOOL *pool, int delta); +static bool_t svc_request_space_available(SVCPOOL *pool); /* *************** SVCXPRT related stuff **************** */ @@ -373,7 +375,8 @@ xprt_active(SVCXPRT *xprt) if (!xprt->xp_active) { xprt->xp_active = TRUE; if (xprt->xp_thread == NULL) { - if (!xprt_assignthread(xprt)) + if (!svc_request_space_available(pool) || + !xprt_assignthread(xprt)) TAILQ_INSERT_TAIL(&pool->sp_active, xprt, xp_alink); } @@ -965,56 +968,63 @@ svc_assign_waiting_sockets(SVCPOOL *pool { SVCXPRT *xprt; + mtx_lock(&pool->sp_lock); while ((xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { if (xprt_assignthread(xprt)) TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); else break; } + mtx_unlock(&pool->sp_lock); } -static bool_t -svc_request_space_available(SVCPOOL *pool) +static void +svc_change_space_used(SVCPOOL *pool, int delta) { + unsigned int value; - mtx_assert(&pool->sp_lock, MA_OWNED); - - if (pool->sp_space_throttled) { - /* - * Below the low-water yet? If so, assign any waiting sockets. - */ - if (pool->sp_space_used < pool->sp_space_low) { - pool->sp_space_throttled = FALSE; - svc_assign_waiting_sockets(pool); - return TRUE; - } - - return FALSE; - } else { - if (pool->sp_space_used - >= pool->sp_space_high) { + value = atomic_fetchadd_int(&pool->sp_space_used, delta) + delta; + if (delta > 0) { + if (value >= pool->sp_space_high && !pool->sp_space_throttled) { pool->sp_space_throttled = TRUE; pool->sp_space_throttle_count++; - return FALSE; } - - return TRUE; + if (value > pool->sp_space_used_highest) + pool->sp_space_used_highest = value; + } else { + if (value < pool->sp_space_low && pool->sp_space_throttled) { + pool->sp_space_throttled = FALSE; + svc_assign_waiting_sockets(pool); + } } } +static bool_t +svc_request_space_available(SVCPOOL *pool) +{ + + if (pool->sp_space_throttled) + return (FALSE); + return (TRUE); +} + static void svc_run_internal(SVCPOOL *pool, bool_t ismaster) { + struct svc_reqlist reqs; SVCTHREAD *st, *stpref; SVCXPRT *xprt; enum xprt_stat stat; struct svc_req *rqstp; + size_t sz; int error; st = mem_alloc(sizeof(*st)); + st->st_pool = pool; st->st_xprt = NULL; STAILQ_INIT(&st->st_reqs); cv_init(&st->st_cond, "rpcsvc"); + STAILQ_INIT(&reqs); mtx_lock(&pool->sp_lock); LIST_INSERT_HEAD(&pool->sp_threads, st, st_link); @@ -1108,15 +1118,14 @@ svc_run_internal(SVCPOOL *pool, bool_t i * RPCs. */ xprt->xp_lastactive = time_uptime; - stat = XPRT_IDLE; do { + mtx_unlock(&pool->sp_lock); if (!svc_request_space_available(pool)) break; rqstp = NULL; - mtx_unlock(&pool->sp_lock); stat = svc_getreq(xprt, &rqstp); - mtx_lock(&pool->sp_lock); if (rqstp) { + svc_change_space_used(pool, rqstp->rq_size); /* * See if the application has * a preference for some other @@ -1126,17 +1135,12 @@ svc_run_internal(SVCPOOL *pool, bool_t i if (pool->sp_assign) stpref = pool->sp_assign(st, rqstp); + else + mtx_lock(&pool->sp_lock); - pool->sp_space_used += - rqstp->rq_size; - if (pool->sp_space_used - > pool->sp_space_used_highest) - pool->sp_space_used_highest = - pool->sp_space_used; rqstp->rq_thread = stpref; STAILQ_INSERT_TAIL(&stpref->st_reqs, rqstp, rq_link); - stpref->st_reqcount++; /* * If we assigned the request @@ -1156,7 +1160,8 @@ svc_run_internal(SVCPOOL *pool, bool_t i stpref->st_idle = FALSE; cv_signal(&stpref->st_cond); } - } + } else + mtx_lock(&pool->sp_lock); } while (stat == XPRT_MOREREQS && pool->sp_state != SVCPOOL_CLOSING); @@ -1171,25 +1176,30 @@ svc_run_internal(SVCPOOL *pool, bool_t i xprt->xp_thread = NULL; st->st_xprt = NULL; if (xprt->xp_active) { - if (!xprt_assignthread(xprt)) + if (!svc_request_space_available(pool) || + !xprt_assignthread(xprt)) TAILQ_INSERT_TAIL(&pool->sp_active, xprt, xp_alink); } + STAILQ_CONCAT(&reqs, &st->st_reqs); mtx_unlock(&pool->sp_lock); SVC_RELEASE(xprt); - mtx_lock(&pool->sp_lock); + } else { + STAILQ_CONCAT(&reqs, &st->st_reqs); + mtx_unlock(&pool->sp_lock); } /* * Execute what we have queued. */ - while ((rqstp = STAILQ_FIRST(&st->st_reqs)) != NULL) { - size_t sz = rqstp->rq_size; - mtx_unlock(&pool->sp_lock); + sz = 0; + while ((rqstp = STAILQ_FIRST(&reqs)) != NULL) { + STAILQ_REMOVE_HEAD(&reqs, rq_link); + sz += rqstp->rq_size; svc_executereq(rqstp); - mtx_lock(&pool->sp_lock); - pool->sp_space_used -= sz; } + svc_change_space_used(pool, -sz); + mtx_lock(&pool->sp_lock); } if (st->st_xprt) { @@ -1309,24 +1319,13 @@ void svc_freereq(struct svc_req *rqstp) { SVCTHREAD *st; - SVCXPRT *xprt; SVCPOOL *pool; st = rqstp->rq_thread; - xprt = rqstp->rq_xprt; - if (xprt) - pool = xprt->xp_pool; - else - pool = NULL; if (st) { - mtx_lock(&pool->sp_lock); - KASSERT(rqstp == STAILQ_FIRST(&st->st_reqs), - ("Freeing request out of order")); - STAILQ_REMOVE_HEAD(&st->st_reqs, rq_link); - st->st_reqcount--; + pool = st->st_pool; if (pool->sp_done) pool->sp_done(st, rqstp); - mtx_unlock(&pool->sp_lock); } if (rqstp->rq_auth.svc_ah_ops) Modified: stable/10/sys/rpc/svc.h ============================================================================== --- stable/10/sys/rpc/svc.h Wed Jan 22 23:51:12 2014 (r261053) +++ stable/10/sys/rpc/svc.h Wed Jan 22 23:52:20 2014 (r261054) @@ -275,14 +275,16 @@ STAILQ_HEAD(svc_reqlist, svc_req); * thread to read and execute pending RPCs. */ typedef struct __rpc_svcthread { + struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ - int st_reqcount; /* number of queued reqs */ int st_idle; /* thread is on idle list */ struct cv st_cond; /* sleeping for work */ LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ LIST_ENTRY(__rpc_svcthread) st_alink; /* application thread list */ + int st_p2; /* application workspace */ + uint64_t st_p3; /* application workspace */ } SVCTHREAD; LIST_HEAD(svcthread_list, __rpc_svcthread); From owner-svn-src-all@FreeBSD.ORG Wed Jan 22 23:55:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D82567F; Wed, 22 Jan 2014 23:55:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 77B4711DC; Wed, 22 Jan 2014 23:55:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MNtREA029381; Wed, 22 Jan 2014 23:55:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MNtPqU029370; Wed, 22 Jan 2014 23:55:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401222355.s0MNtPqU029370@svn.freebsd.org> From: Alexander Motin Date: Wed, 22 Jan 2014 23:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261055 - in stable/10/sys: fs/nfs fs/nfsserver rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:55:27 -0000 Author: mav Date: Wed Jan 22 23:55:25 2014 New Revision: 261055 URL: http://svnweb.freebsd.org/changeset/base/261055 Log: MFC r260229, r260258, r260367, r260390, r260459, r260648: Rework NFS Duplicate Request Cache cleanup logic. - Introduce additional hash to group requests by hash of sockref. This allows to process TCP acknowledgements without looping though all the cache, and as result allows to do it every time. - Indroduce additional callbacks to notify application layer about sockets disconnection. Without this last few requests processed just before socket disconnection never processed their ACKs and stuck in cache for many hours. - Implement transport-specific method for tracking reply acknowledgements. New implementation does not cross multiple stack layers to get the data and does not have race conditions that previously made some requests stuck in cache. This could be done more efficiently at sockbuf layer, but that would broke some KBIs, while I don't know other consumers for it aside NFS. - Instead of traversing all DRC twice per request, run cleaning only once per request, and except in some conditions traverse only single hash slot at a time. Together this limits NFS DRC growth only to situations of real connectivity problems. If network is working well, and so all replies are acknowledged, cache remains almost empty even after hours of heavy load. Without this change on the same test cache was growing to many thousand requests even with perfectly working local network. As another result this reduces CPU time spent on the DRC handling during SPEC NFS benchmark from about 10% to 0.5%. Sponsored by: iXsystems, Inc. Modified: stable/10/sys/fs/nfs/nfs_var.h stable/10/sys/fs/nfs/nfsrvcache.h stable/10/sys/fs/nfsserver/nfs_nfsdcache.c stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/10/sys/fs/nfsserver/nfs_nfsdport.c stable/10/sys/fs/nfsserver/nfs_nfsdsubs.c stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h stable/10/sys/rpc/svc_dg.c stable/10/sys/rpc/svc_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/10/sys/fs/nfs/nfs_var.h Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/fs/nfs/nfs_var.h Wed Jan 22 23:55:25 2014 (r261055) @@ -218,14 +218,14 @@ void nfsrvd_dorpc(struct nfsrv_descript /* nfs_nfsdcache.c */ void nfsrvd_initcache(void); -int nfsrvd_getcache(struct nfsrv_descript *, struct socket *); -struct nfsrvcache *nfsrvd_updatecache(struct nfsrv_descript *, - struct socket *); -void nfsrvd_sentcache(struct nfsrvcache *, struct socket *, int); +int nfsrvd_getcache(struct nfsrv_descript *); +struct nfsrvcache *nfsrvd_updatecache(struct nfsrv_descript *); +void nfsrvd_sentcache(struct nfsrvcache *, int, uint32_t); void nfsrvd_cleancache(void); void nfsrvd_refcache(struct nfsrvcache *); void nfsrvd_derefcache(struct nfsrvcache *); void nfsrvd_delcache(struct nfsrvcache *); +void nfsrc_trimcache(uint64_t, uint32_t, int); /* nfs_commonsubs.c */ void newnfs_init(void); @@ -327,9 +327,6 @@ int nfsd_checkrootexp(struct nfsrv_descr void nfscl_retopts(struct nfsmount *, char *, size_t); /* nfs_commonport.c */ -int nfsrv_checksockseqnum(struct socket *, tcp_seq); -int nfsrv_getsockseqnum(struct socket *, tcp_seq *); -int nfsrv_getsocksndseq(struct socket *, tcp_seq *, tcp_seq *); int nfsrv_lookupfilename(struct nameidata *, char *, NFSPROC_T *); void nfsrv_object_create(vnode_t, NFSPROC_T *); int nfsrv_mallocmget_limit(void); Modified: stable/10/sys/fs/nfs/nfsrvcache.h ============================================================================== --- stable/10/sys/fs/nfs/nfsrvcache.h Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/fs/nfs/nfsrvcache.h Wed Jan 22 23:55:25 2014 (r261055) @@ -46,6 +46,7 @@ /* Cache table entry. */ struct nfsrvcache { LIST_ENTRY(nfsrvcache) rc_hash; /* Hash chain */ + LIST_ENTRY(nfsrvcache) rc_ahash; /* ACK hash chain */ TAILQ_ENTRY(nfsrvcache) rc_lru; /* UDP lru chain */ u_int32_t rc_xid; /* rpc id number */ time_t rc_timestamp; /* Time done */ @@ -64,6 +65,7 @@ struct nfsrvcache { int16_t refcnt; u_int16_t cksum; time_t cachetime; + int acked; } ot; } rc_un2; u_int16_t rc_proc; /* rpc proc number */ @@ -81,6 +83,13 @@ struct nfsrvcache { #define rc_reqlen rc_un2.ot.len #define rc_cksum rc_un2.ot.cksum #define rc_cachetime rc_un2.ot.cachetime +#define rc_acked rc_un2.ot.acked + +/* TCP ACK values */ +#define RC_NO_SEQ 0 +#define RC_NO_ACK 1 +#define RC_ACK 2 +#define RC_NACK 3 /* Return values */ #define RC_DROPIT 0 @@ -95,7 +104,6 @@ struct nfsrvcache { #define RC_UDP 0x0010 #define RC_INETIPV6 0x0020 #define RC_INPROG 0x0040 -#define RC_TCPSEQ 0x0080 #define RC_NFSV2 0x0100 #define RC_NFSV3 0x0200 #define RC_NFSV4 0x0400 Modified: stable/10/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Wed Jan 22 23:55:25 2014 (r261055) @@ -162,6 +162,7 @@ __FBSDID("$FreeBSD$"); extern struct nfsstats newnfsstats; extern struct mtx nfsrc_udpmtx; extern struct nfsrchash_bucket nfsrchash_table[NFSRVCACHE_HASHSIZE]; +extern struct nfsrchash_bucket nfsrcahash_table[NFSRVCACHE_HASHSIZE]; int nfsrc_floodlevel = NFSRVCACHE_FLOODLEVEL, nfsrc_tcpsavedreplies = 0; #endif /* !APPLEKEXT */ @@ -238,6 +239,7 @@ static int newnfsv2_procid[NFS_V3NPROCS] (&nfsrvudphashtbl[nfsrc_hash(xid)]) #define NFSRCHASH(xid) \ (&nfsrchash_table[nfsrc_hash(xid)].tbl) +#define NFSRCAHASH(xid) (&nfsrcahash_table[nfsrc_hash(xid)]) #define TRUE 1 #define FALSE 0 #define NFSRVCACHE_CHECKLEN 100 @@ -281,9 +283,6 @@ static void nfsrc_lock(struct nfsrvcache static void nfsrc_unlock(struct nfsrvcache *rp); static void nfsrc_wanted(struct nfsrvcache *rp); static void nfsrc_freecache(struct nfsrvcache *rp); -static void nfsrc_trimcache(u_int64_t, struct socket *); -static int nfsrc_activesocket(struct nfsrvcache *rp, u_int64_t, - struct socket *); static int nfsrc_getlenandcksum(mbuf_t m1, u_int16_t *cksum); static void nfsrc_marksametcpconn(u_int64_t); @@ -314,6 +313,7 @@ nfsrvd_initcache(void) for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { LIST_INIT(&nfsrvudphashtbl[i]); LIST_INIT(&nfsrchash_table[i].tbl); + LIST_INIT(&nfsrcahash_table[i].tbl); } TAILQ_INIT(&nfsrvudplru); nfsrc_tcpsavedreplies = 0; @@ -325,10 +325,9 @@ nfsrvd_initcache(void) /* * Get a cache entry for this request. Basically just malloc a new one * and then call nfsrc_getudp() or nfsrc_gettcp() to do the rest. - * Call nfsrc_trimcache() to clean up the cache before returning. */ APPLESTATIC int -nfsrvd_getcache(struct nfsrv_descript *nd, struct socket *so) +nfsrvd_getcache(struct nfsrv_descript *nd) { struct nfsrvcache *newrp; int ret; @@ -356,7 +355,6 @@ nfsrvd_getcache(struct nfsrv_descript *n } else { ret = nfsrc_gettcp(nd, newrp); } - nfsrc_trimcache(nd->nd_sockref, so); NFSEXITCODE2(0, nd); return (ret); } @@ -456,7 +454,7 @@ out: * Update a request cache entry after the rpc has been done */ APPLESTATIC struct nfsrvcache * -nfsrvd_updatecache(struct nfsrv_descript *nd, struct socket *so) +nfsrvd_updatecache(struct nfsrv_descript *nd) { struct nfsrvcache *rp; struct nfsrvcache *retrp = NULL; @@ -549,7 +547,6 @@ nfsrvd_updatecache(struct nfsrv_descript } out: - nfsrc_trimcache(nd->nd_sockref, so); NFSEXITCODE2(0, nd); return (retrp); } @@ -575,29 +572,23 @@ nfsrvd_delcache(struct nfsrvcache *rp) /* * Called after nfsrvd_updatecache() once the reply is sent, to update - * the entry for nfsrc_activesocket() and unlock it. The argument is + * the entry's sequence number and unlock it. The argument is * the pointer returned by nfsrvd_updatecache(). */ APPLESTATIC void -nfsrvd_sentcache(struct nfsrvcache *rp, struct socket *so, int err) +nfsrvd_sentcache(struct nfsrvcache *rp, int have_seq, uint32_t seq) { - tcp_seq tmp_seq; - struct mtx *mutex; + struct nfsrchash_bucket *hbp; - mutex = nfsrc_cachemutex(rp); - if (!(rp->rc_flag & RC_LOCKED)) - panic("nfsrvd_sentcache not locked"); - if (!err) { - if ((so->so_proto->pr_domain->dom_family != AF_INET && - so->so_proto->pr_domain->dom_family != AF_INET6) || - so->so_proto->pr_protocol != IPPROTO_TCP) - panic("nfs sent cache"); - if (nfsrv_getsockseqnum(so, &tmp_seq)) { - mtx_lock(mutex); - rp->rc_tcpseq = tmp_seq; - rp->rc_flag |= RC_TCPSEQ; - mtx_unlock(mutex); - } + KASSERT(rp->rc_flag & RC_LOCKED, ("nfsrvd_sentcache not locked")); + if (have_seq) { + hbp = NFSRCAHASH(rp->rc_sockref); + mtx_lock(&hbp->mtx); + rp->rc_tcpseq = seq; + if (rp->rc_acked != RC_NO_ACK) + LIST_INSERT_HEAD(&hbp->tbl, rp, rc_ahash); + rp->rc_acked = RC_NO_ACK; + mtx_unlock(&hbp->mtx); } nfsrc_unlock(rp); } @@ -790,11 +781,18 @@ nfsrc_wanted(struct nfsrvcache *rp) static void nfsrc_freecache(struct nfsrvcache *rp) { + struct nfsrchash_bucket *hbp; LIST_REMOVE(rp, rc_hash); if (rp->rc_flag & RC_UDP) { TAILQ_REMOVE(&nfsrvudplru, rp, rc_lru); nfsrc_udpcachesize--; + } else if (rp->rc_acked != RC_NO_SEQ) { + hbp = NFSRCAHASH(rp->rc_sockref); + mtx_lock(&hbp->mtx); + if (rp->rc_acked == RC_NO_ACK) + LIST_REMOVE(rp, rc_ahash); + mtx_unlock(&hbp->mtx); } nfsrc_wanted(rp); if (rp->rc_flag & RC_REPMBUF) { @@ -836,14 +834,32 @@ nfsrvd_cleancache(void) /* * The basic rule is to get rid of entries that are expired. */ -static void -nfsrc_trimcache(u_int64_t sockref, struct socket *so) +void +nfsrc_trimcache(u_int64_t sockref, uint32_t snd_una, int final) { + struct nfsrchash_bucket *hbp; struct nfsrvcache *rp, *nextrp; - int i, j, k, tto, time_histo[HISTSIZE]; + int force, lastslot, i, j, k, tto, time_histo[HISTSIZE]; time_t thisstamp; static time_t udp_lasttrim = 0, tcp_lasttrim = 0; - static int onethread = 0; + static int onethread = 0, oneslot = 0; + + if (sockref != 0) { + hbp = NFSRCAHASH(sockref); + mtx_lock(&hbp->mtx); + LIST_FOREACH_SAFE(rp, &hbp->tbl, rc_ahash, nextrp) { + if (sockref == rp->rc_sockref) { + if (SEQ_GEQ(snd_una, rp->rc_tcpseq)) { + rp->rc_acked = RC_ACK; + LIST_REMOVE(rp, rc_ahash); + } else if (final) { + rp->rc_acked = RC_NACK; + LIST_REMOVE(rp, rc_ahash); + } + } + } + mtx_unlock(&hbp->mtx); + } if (atomic_cmpset_acq_int(&onethread, 0, 1) == 0) return; @@ -864,13 +880,28 @@ nfsrc_trimcache(u_int64_t sockref, struc } if (NFSD_MONOSEC != tcp_lasttrim || nfsrc_tcpsavedreplies >= nfsrc_tcphighwater) { - for (i = 0; i < HISTSIZE; i++) - time_histo[i] = 0; + force = nfsrc_tcphighwater / 4; + if (force > 0 && + nfsrc_tcpsavedreplies + force >= nfsrc_tcphighwater) { + for (i = 0; i < HISTSIZE; i++) + time_histo[i] = 0; + i = 0; + lastslot = NFSRVCACHE_HASHSIZE - 1; + } else { + force = 0; + if (NFSD_MONOSEC != tcp_lasttrim) { + i = 0; + lastslot = NFSRVCACHE_HASHSIZE - 1; + } else { + lastslot = i = oneslot; + if (++oneslot >= NFSRVCACHE_HASHSIZE) + oneslot = 0; + } + } tto = nfsrc_tcptimeout; - for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { + tcp_lasttrim = NFSD_MONOSEC; + for (; i <= lastslot; i++) { mtx_lock(&nfsrchash_table[i].mtx); - if (i == 0) - tcp_lasttrim = NFSD_MONOSEC; LIST_FOREACH_SAFE(rp, &nfsrchash_table[i].tbl, rc_hash, nextrp) { if (!(rp->rc_flag & @@ -878,12 +909,12 @@ nfsrc_trimcache(u_int64_t sockref, struc && rp->rc_refcnt == 0) { if ((rp->rc_flag & RC_REFCNT) || tcp_lasttrim > rp->rc_timestamp || - nfsrc_activesocket(rp, sockref, so)) { + rp->rc_acked == RC_ACK) { nfsrc_freecache(rp); continue; } - if (nfsrc_tcphighwater == 0) + if (force == 0) continue; /* * The timestamps range from roughly the @@ -903,8 +934,7 @@ nfsrc_trimcache(u_int64_t sockref, struc } mtx_unlock(&nfsrchash_table[i].mtx); } - j = nfsrc_tcphighwater / 5; /* 20% of it */ - if (j > 0 && (nfsrc_tcpsavedreplies + j) > nfsrc_tcphighwater) { + if (force) { /* * Trim some more with a smaller timeout of as little * as 20% of nfsrc_tcptimeout to try and get below @@ -913,7 +943,7 @@ nfsrc_trimcache(u_int64_t sockref, struc k = 0; for (i = 0; i < (HISTSIZE - 2); i++) { k += time_histo[i]; - if (k > j) + if (k > force) break; } k = tto * (i + 1) / HISTSIZE; @@ -929,8 +959,7 @@ nfsrc_trimcache(u_int64_t sockref, struc && rp->rc_refcnt == 0 && ((rp->rc_flag & RC_REFCNT) || thisstamp > rp->rc_timestamp || - nfsrc_activesocket(rp, sockref, - so))) + rp->rc_acked == RC_ACK)) nfsrc_freecache(rp); } mtx_unlock(&nfsrchash_table[i].mtx); @@ -975,28 +1004,6 @@ nfsrvd_derefcache(struct nfsrvcache *rp) } /* - * Check to see if the socket is active. - * Return 1 if the reply has been received/acknowledged by the client, - * 0 otherwise. - * XXX - Uses tcp internals. - */ -static int -nfsrc_activesocket(struct nfsrvcache *rp, u_int64_t cur_sockref, - struct socket *cur_so) -{ - int ret = 0; - - if (!(rp->rc_flag & RC_TCPSEQ)) - return (ret); - /* - * If the sockref is the same, it is the same TCP connection. - */ - if (cur_sockref == rp->rc_sockref) - ret = nfsrv_checksockseqnum(cur_so, rp->rc_tcpseq); - return (ret); -} - -/* * Calculate the length of the mbuf list and a checksum on the first up to * NFSRVCACHE_CHECKLEN bytes. */ Modified: stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c Wed Jan 22 23:55:25 2014 (r261055) @@ -97,8 +97,8 @@ static int nfs_maxvers = NFS_VER4; SYSCTL_INT(_vfs_nfsd, OID_AUTO, server_max_nfsvers, CTLFLAG_RW, &nfs_maxvers, 0, "The highest version of NFS handled by the server"); -static int nfs_proc(struct nfsrv_descript *, u_int32_t, struct socket *, - u_int64_t, struct nfsrvcache **); +static int nfs_proc(struct nfsrv_descript *, u_int32_t, SVCXPRT *xprt, + struct nfsrvcache **); extern u_long sb_max_adj; extern int newnfs_numnfsd; @@ -251,8 +251,7 @@ nfssvc_program(struct svc_req *rqst, SVC } } - cacherep = nfs_proc(&nd, rqst->rq_xid, xprt->xp_socket, - xprt->xp_sockref, &rp); + cacherep = nfs_proc(&nd, rqst->rq_xid, xprt, &rp); NFSLOCKV4ROOTMUTEX(); nfsv4_relref(&nfsd_suspend_lock); NFSUNLOCKV4ROOTMUTEX(); @@ -287,8 +286,10 @@ nfssvc_program(struct svc_req *rqst, SVC } else if (!svc_sendreply_mbuf(rqst, nd.nd_mreq)) { svcerr_systemerr(rqst); } - if (rp != NULL) - nfsrvd_sentcache(rp, xprt->xp_socket, 0); + if (rp != NULL) { + nfsrvd_sentcache(rp, (rqst->rq_reply_seq != 0 || + SVC_ACK(xprt, NULL)), rqst->rq_reply_seq); + } svc_freereq(rqst); out: @@ -300,11 +301,12 @@ out: * Return the appropriate cache response. */ static int -nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, struct socket *so, - u_int64_t sockref, struct nfsrvcache **rpp) +nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, SVCXPRT *xprt, + struct nfsrvcache **rpp) { struct thread *td = curthread; int cacherep = RC_DOIT, isdgram; + uint32_t ack; *rpp = NULL; if (nd->nd_nam2 == NULL) { @@ -336,8 +338,11 @@ nfs_proc(struct nfsrv_descript *nd, u_in nd->nd_flag |= ND_SAMETCPCONN; nd->nd_retxid = xid; nd->nd_tcpconntime = NFSD_MONOSEC; - nd->nd_sockref = sockref; - cacherep = nfsrvd_getcache(nd, so); + nd->nd_sockref = xprt->xp_sockref; + cacherep = nfsrvd_getcache(nd); + ack = 0; + SVC_ACK(xprt, &ack); + nfsrc_trimcache(xprt->xp_sockref, ack, 0); } /* @@ -352,13 +357,23 @@ nfs_proc(struct nfsrv_descript *nd, u_in cacherep = RC_DROPIT; else cacherep = RC_REPLY; - *rpp = nfsrvd_updatecache(nd, so); + *rpp = nfsrvd_updatecache(nd); } NFSEXITCODE2(0, nd); return (cacherep); } +static void +nfssvc_loss(SVCXPRT *xprt) +{ + uint32_t ack; + + ack = 0; + SVC_ACK(xprt, &ack); + nfsrc_trimcache(xprt->xp_sockref, ack, 1); +} + /* * Adds a socket to the list for servicing by nfsds. */ @@ -399,6 +414,8 @@ nfsrvd_addsock(struct file *fp) if (nfs_maxvers >= NFS_VER4) svc_reg(xprt, NFS_PROG, NFS_VER4, nfssvc_program, NULL); + if (so->so_type == SOCK_STREAM) + svc_loss_reg(xprt, nfssvc_loss); SVC_RELEASE(xprt); } Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 22 23:55:25 2014 (r261055) @@ -61,6 +61,7 @@ extern struct nfsv4lock nfsd_suspend_loc struct vfsoptlist nfsv4root_opt, nfsv4root_newopt; NFSDLOCKMUTEX; struct nfsrchash_bucket nfsrchash_table[NFSRVCACHE_HASHSIZE]; +struct nfsrchash_bucket nfsrcahash_table[NFSRVCACHE_HASHSIZE]; struct mtx nfsrc_udpmtx; struct mtx nfs_v4root_mutex; struct nfsrvfh nfs_rootfh, nfs_pubfh; @@ -2881,40 +2882,6 @@ out: } /* - * Get the tcp socket sequence numbers we need. - * (Maybe this should be moved to the tcp sources?) - */ -int -nfsrv_getsocksndseq(struct socket *so, tcp_seq *maxp, tcp_seq *unap) -{ - struct inpcb *inp; - struct tcpcb *tp; - int error = 0; - - inp = sotoinpcb(so); - KASSERT(inp != NULL, ("nfsrv_getsocksndseq: inp == NULL")); - INP_RLOCK(inp); - if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { - INP_RUNLOCK(inp); - error = EPIPE; - goto out; - } - tp = intotcpcb(inp); - if (tp->t_state != TCPS_ESTABLISHED) { - INP_RUNLOCK(inp); - error = EPIPE; - goto out; - } - *maxp = tp->snd_max; - *unap = tp->snd_una; - INP_RUNLOCK(inp); - -out: - NFSEXITCODE(error); - return (error); -} - -/* * This function needs to test to see if the system is near its limit * for memory allocation via malloc() or mget() and return True iff * either of these resources are near their limit. @@ -3340,6 +3307,11 @@ nfsd_modevent(module_t mod, int type, vo i); mtx_init(&nfsrchash_table[i].mtx, nfsrchash_table[i].lock_name, NULL, MTX_DEF); + snprintf(nfsrcahash_table[i].lock_name, + sizeof(nfsrcahash_table[i].lock_name), "nfsrc_tcpa%d", + i); + mtx_init(&nfsrcahash_table[i].mtx, + nfsrcahash_table[i].lock_name, NULL, MTX_DEF); } mtx_init(&nfsrc_udpmtx, "nfs_udpcache_mutex", NULL, MTX_DEF); mtx_init(&nfs_v4root_mutex, "nfs_v4root_mutex", NULL, MTX_DEF); @@ -3385,8 +3357,10 @@ nfsd_modevent(module_t mod, int type, vo svcpool_destroy(nfsrvd_pool); /* and get rid of the locks */ - for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) + for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { mtx_destroy(&nfsrchash_table[i].mtx); + mtx_destroy(&nfsrcahash_table[i].mtx); + } mtx_destroy(&nfsrc_udpmtx); mtx_destroy(&nfs_v4root_mutex); mtx_destroy(&nfsv4root_mnt.mnt_mtx); Modified: stable/10/sys/fs/nfsserver/nfs_nfsdsubs.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdsubs.c Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/fs/nfsserver/nfs_nfsdsubs.c Wed Jan 22 23:55:25 2014 (r261055) @@ -1987,47 +1987,6 @@ nfsmout: return (error); } -/* - * Check the tcp socket sequence number has been acknowledged. - */ -int -nfsrv_checksockseqnum(struct socket *so, tcp_seq tcpseqval) -{ - tcp_seq maxseq, unaseq; - int error, ret; - - error = nfsrv_getsocksndseq(so, &maxseq, &unaseq); - if (error) - return (0); - ret = SEQ_GEQ(unaseq, tcpseqval); - return (ret); -} - -/* - * Get the tcp sequence number to be acknowledged. - */ -int -nfsrv_getsockseqnum(struct socket *so, tcp_seq *tcpseqp) -{ - tcp_seq maxseq, unaseq; - u_int sbcc; - int error; - - sbcc = so->so_snd.sb_cc; - error = nfsrv_getsocksndseq(so, &maxseq, &unaseq); - if (error) - return (0); - /* - * Set the seq# to a value that will - * be at least the end of the reply. - * When this sequence# is acknowledged - * by the client, the client has received - * the reply. - */ - *tcpseqp = sbcc + maxseq; - return (1); -} - void nfsd_init(void) { Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/rpc/svc.c Wed Jan 22 23:55:25 2014 (r261055) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -93,6 +94,7 @@ svcpool_create(const char *name, struct TAILQ_INIT(&pool->sp_xlist); TAILQ_INIT(&pool->sp_active); TAILQ_INIT(&pool->sp_callouts); + TAILQ_INIT(&pool->sp_lcallouts); LIST_INIT(&pool->sp_threads); LIST_INIT(&pool->sp_idlethreads); pool->sp_minthreads = 1; @@ -158,6 +160,7 @@ svcpool_destroy(SVCPOOL *pool) { SVCXPRT *xprt, *nxprt; struct svc_callout *s; + struct svc_loss_callout *sl; struct svcxprt_list cleanup; TAILQ_INIT(&cleanup); @@ -169,12 +172,16 @@ svcpool_destroy(SVCPOOL *pool) TAILQ_INSERT_TAIL(&cleanup, xprt, xp_link); } - while (TAILQ_FIRST(&pool->sp_callouts)) { - s = TAILQ_FIRST(&pool->sp_callouts); + while ((s = TAILQ_FIRST(&pool->sp_callouts)) != NULL) { mtx_unlock(&pool->sp_lock); svc_unreg(pool, s->sc_prog, s->sc_vers); mtx_lock(&pool->sp_lock); } + while ((sl = TAILQ_FIRST(&pool->sp_lcallouts)) != NULL) { + mtx_unlock(&pool->sp_lock); + svc_loss_unreg(pool, sl->slc_dispatch); + mtx_lock(&pool->sp_lock); + } mtx_unlock(&pool->sp_lock); TAILQ_FOREACH_SAFE(xprt, &cleanup, xp_link, nxprt) { @@ -511,6 +518,55 @@ svc_unreg(SVCPOOL *pool, const rpcprog_t mtx_unlock(&pool->sp_lock); } +/* + * Add a service connection loss program to the callout list. + * The dispatch routine will be called when some port in ths pool die. + */ +bool_t +svc_loss_reg(SVCXPRT *xprt, void (*dispatch)(SVCXPRT *)) +{ + SVCPOOL *pool = xprt->xp_pool; + struct svc_loss_callout *s; + + mtx_lock(&pool->sp_lock); + TAILQ_FOREACH(s, &pool->sp_lcallouts, slc_link) { + if (s->slc_dispatch == dispatch) + break; + } + if (s != NULL) { + mtx_unlock(&pool->sp_lock); + return (TRUE); + } + s = malloc(sizeof (struct svc_callout), M_RPC, M_NOWAIT); + if (s == NULL) { + mtx_unlock(&pool->sp_lock); + return (FALSE); + } + s->slc_dispatch = dispatch; + TAILQ_INSERT_TAIL(&pool->sp_lcallouts, s, slc_link); + mtx_unlock(&pool->sp_lock); + return (TRUE); +} + +/* + * Remove a service connection loss program from the callout list. + */ +void +svc_loss_unreg(SVCPOOL *pool, void (*dispatch)(SVCXPRT *)) +{ + struct svc_loss_callout *s; + + mtx_lock(&pool->sp_lock); + TAILQ_FOREACH(s, &pool->sp_lcallouts, slc_link) { + if (s->slc_dispatch == dispatch) { + TAILQ_REMOVE(&pool->sp_lcallouts, s, slc_link); + free(s, M_RPC); + break; + } + } + mtx_unlock(&pool->sp_lock); +} + /* ********************** CALLOUT list related stuff ************* */ /* @@ -554,7 +610,7 @@ svc_sendreply_common(struct svc_req *rqs if (!SVCAUTH_WRAP(&rqstp->rq_auth, &body)) return (FALSE); - ok = SVC_REPLY(xprt, rply, rqstp->rq_addr, body); + ok = SVC_REPLY(xprt, rply, rqstp->rq_addr, body, &rqstp->rq_reply_seq); if (rqstp->rq_addr) { free(rqstp->rq_addr, M_SONAME); rqstp->rq_addr = NULL; @@ -803,6 +859,7 @@ svc_getreq(SVCXPRT *xprt, struct svc_req struct svc_req *r; struct rpc_msg msg; struct mbuf *args; + struct svc_loss_callout *s; enum xprt_stat stat; /* now receive msgs from xprtprt (support batch calls) */ @@ -831,7 +888,7 @@ svc_getreq(SVCXPRT *xprt, struct svc_req break; case RS_DONE: SVC_REPLY(xprt, &repmsg, r->rq_addr, - repbody); + repbody, &r->rq_reply_seq); if (r->rq_addr) { free(r->rq_addr, M_SONAME); r->rq_addr = NULL; @@ -881,6 +938,8 @@ call_done: r = NULL; } if ((stat = SVC_STAT(xprt)) == XPRT_DIED) { + TAILQ_FOREACH(s, &pool->sp_lcallouts, slc_link) + (*s->slc_dispatch)(xprt); xprt_unregister(xprt); } Modified: stable/10/sys/rpc/svc.h ============================================================================== --- stable/10/sys/rpc/svc.h Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/rpc/svc.h Wed Jan 22 23:55:25 2014 (r261055) @@ -103,9 +103,11 @@ struct xp_ops { struct sockaddr **, struct mbuf **); /* get transport status */ enum xprt_stat (*xp_stat)(struct __rpc_svcxprt *); + /* get transport acknowledge sequence */ + bool_t (*xp_ack)(struct __rpc_svcxprt *, uint32_t *); /* send reply */ bool_t (*xp_reply)(struct __rpc_svcxprt *, struct rpc_msg *, - struct sockaddr *, struct mbuf *); + struct sockaddr *, struct mbuf *, uint32_t *); /* destroy this struct */ void (*xp_destroy)(struct __rpc_svcxprt *); /* catch-all function */ @@ -166,6 +168,8 @@ typedef struct __rpc_svcxprt { time_t xp_lastactive; /* time of last RPC */ u_int64_t xp_sockref; /* set by nfsv4 to identify socket */ int xp_upcallset; /* socket upcall is set up */ + uint32_t xp_snd_cnt; /* # of bytes to send to socket */ + uint32_t xp_snt_cnt; /* # of bytes sent to socket */ #else int xp_fd; u_short xp_port; /* associated port number */ @@ -230,6 +234,17 @@ struct svc_callout { }; TAILQ_HEAD(svc_callout_list, svc_callout); +/* + * The services connection loss list + * The dispatch routine takes request structs and runs the + * apropriate procedure. + */ +struct svc_loss_callout { + TAILQ_ENTRY(svc_loss_callout) slc_link; + void (*slc_dispatch)(SVCXPRT *); +}; +TAILQ_HEAD(svc_loss_callout_list, svc_loss_callout); + struct __rpc_svcthread; /* @@ -253,6 +268,7 @@ struct svc_req { void *rq_p1; /* application workspace */ int rq_p2; /* application workspace */ uint64_t rq_p3; /* application workspace */ + uint32_t rq_reply_seq; /* reply socket sequence # */ char rq_credarea[3*MAX_AUTH_BYTES]; }; STAILQ_HEAD(svc_reqlist, svc_req); @@ -311,13 +327,14 @@ enum svcpool_state { typedef SVCTHREAD *pool_assign_fn(SVCTHREAD *, struct svc_req *); typedef void pool_done_fn(SVCTHREAD *, struct svc_req *); typedef struct __rpc_svcpool { - struct mtx sp_lock; /* protect the transport lists */ + struct mtx_padalign sp_lock; /* protect the transport lists */ const char *sp_name; /* pool name (e.g. "nfsd", "NLM" */ enum svcpool_state sp_state; /* current pool state */ struct proc *sp_proc; /* process which is in svc_run */ struct svcxprt_list sp_xlist; /* all transports in the pool */ struct svcxprt_list sp_active; /* transports needing service */ struct svc_callout_list sp_callouts; /* (prog,vers)->dispatch list */ + struct svc_loss_callout_list sp_lcallouts; /* loss->dispatch list */ struct svcthread_list sp_threads; /* service threads */ struct svcthread_list sp_idlethreads; /* idle service threads */ int sp_minthreads; /* minimum service thread count */ @@ -393,8 +410,12 @@ struct svc_req { #define SVC_STAT(xprt) \ (*(xprt)->xp_ops->xp_stat)(xprt) -#define SVC_REPLY(xprt, msg, addr, m) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg), (addr), (m)) +#define SVC_ACK(xprt, ack) \ + ((xprt)->xp_ops->xp_ack == NULL ? FALSE : \ + ((ack) == NULL ? TRUE : (*(xprt)->xp_ops->xp_ack)((xprt), (ack)))) + +#define SVC_REPLY(xprt, msg, addr, m, seq) \ + (*(xprt)->xp_ops->xp_reply) ((xprt), (msg), (addr), (m), (seq)) #define SVC_DESTROY(xprt) \ (*(xprt)->xp_ops->xp_destroy)(xprt) @@ -495,6 +516,32 @@ extern void svc_unreg(const rpcprog_t, c #endif __END_DECLS +#ifdef _KERNEL +/* + * Service connection loss registration + * + * svc_loss_reg(xprt, dispatch) + * const SVCXPRT *xprt; + * const void (*dispatch)(); + */ + +__BEGIN_DECLS +extern bool_t svc_loss_reg(SVCXPRT *, void (*)(SVCXPRT *)); +__END_DECLS + +/* + * Service connection loss un-registration + * + * svc_loss_unreg(xprt, dispatch) + * const SVCXPRT *xprt; + * const void (*dispatch)(); + */ + +__BEGIN_DECLS +extern void svc_loss_unreg(SVCPOOL *, void (*)(SVCXPRT *)); +__END_DECLS +#endif + /* * Transport registration. * Modified: stable/10/sys/rpc/svc_dg.c ============================================================================== --- stable/10/sys/rpc/svc_dg.c Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/rpc/svc_dg.c Wed Jan 22 23:55:25 2014 (r261055) @@ -66,7 +66,7 @@ static enum xprt_stat svc_dg_stat(SVCXPR static bool_t svc_dg_recv(SVCXPRT *, struct rpc_msg *, struct sockaddr **, struct mbuf **); static bool_t svc_dg_reply(SVCXPRT *, struct rpc_msg *, - struct sockaddr *, struct mbuf *); + struct sockaddr *, struct mbuf *, uint32_t *); static void svc_dg_destroy(SVCXPRT *); static bool_t svc_dg_control(SVCXPRT *, const u_int, void *); static int svc_dg_soupcall(struct socket *so, void *arg, int waitflag); @@ -230,7 +230,7 @@ svc_dg_recv(SVCXPRT *xprt, struct rpc_ms static bool_t svc_dg_reply(SVCXPRT *xprt, struct rpc_msg *msg, - struct sockaddr *addr, struct mbuf *m) + struct sockaddr *addr, struct mbuf *m, uint32_t *seq) { XDR xdrs; struct mbuf *mrep; Modified: stable/10/sys/rpc/svc_vc.c ============================================================================== --- stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:52:20 2014 (r261054) +++ stable/10/sys/rpc/svc_vc.c Wed Jan 22 23:55:25 2014 (r261055) @@ -76,10 +76,11 @@ static void svc_vc_rendezvous_destroy(SV static bool_t svc_vc_null(void); static void svc_vc_destroy(SVCXPRT *); static enum xprt_stat svc_vc_stat(SVCXPRT *); +static bool_t svc_vc_ack(SVCXPRT *, uint32_t *); static bool_t svc_vc_recv(SVCXPRT *, struct rpc_msg *, struct sockaddr **, struct mbuf **); static bool_t svc_vc_reply(SVCXPRT *, struct rpc_msg *, - struct sockaddr *, struct mbuf *); + struct sockaddr *, struct mbuf *, uint32_t *seq); static bool_t svc_vc_control(SVCXPRT *xprt, const u_int rq, void *in); static bool_t svc_vc_rendezvous_control (SVCXPRT *xprt, const u_int rq, void *in); @@ -88,7 +89,7 @@ static enum xprt_stat svc_vc_backchannel static bool_t svc_vc_backchannel_recv(SVCXPRT *, struct rpc_msg *, struct sockaddr **, struct mbuf **); static bool_t svc_vc_backchannel_reply(SVCXPRT *, struct rpc_msg *, - struct sockaddr *, struct mbuf *); + struct sockaddr *, struct mbuf *, uint32_t *); static bool_t svc_vc_backchannel_control(SVCXPRT *xprt, const u_int rq, void *in); static SVCXPRT *svc_vc_create_conn(SVCPOOL *pool, struct socket *so, @@ -100,7 +101,7 @@ static struct xp_ops svc_vc_rendezvous_o .xp_recv = svc_vc_rendezvous_recv, .xp_stat = svc_vc_rendezvous_stat, .xp_reply = (bool_t (*)(SVCXPRT *, struct rpc_msg *, - struct sockaddr *, struct mbuf *))svc_vc_null, + struct sockaddr *, struct mbuf *, uint32_t *))svc_vc_null, .xp_destroy = svc_vc_rendezvous_destroy, .xp_control = svc_vc_rendezvous_control }; @@ -108,6 +109,7 @@ static struct xp_ops svc_vc_rendezvous_o static struct xp_ops svc_vc_ops = { .xp_recv = svc_vc_recv, .xp_stat = svc_vc_stat, + .xp_ack = svc_vc_ack, .xp_reply = svc_vc_reply, .xp_destroy = svc_vc_destroy, .xp_control = svc_vc_control @@ -184,8 +186,10 @@ svc_vc_create(SVCPOOL *pool, struct sock return (xprt); cleanup_svc_vc_create: - if (xprt) + if (xprt) { + sx_destroy(&xprt->xp_lock); svc_xprt_free(xprt); + } return (NULL); } @@ -270,7 +274,8 @@ svc_vc_create_conn(SVCPOOL *pool, struct return (xprt); cleanup_svc_vc_create: if (xprt) { - mem_free(xprt, sizeof(*xprt)); + sx_destroy(&xprt->xp_lock); + svc_xprt_free(xprt); } if (cd) mem_free(cd, sizeof(*cd)); @@ -451,7 +456,6 @@ svc_vc_destroy_common(SVCXPRT *xprt) } SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); - sx_destroy(&xprt->xp_lock); if (xprt->xp_socket) (void)soclose(xprt->xp_socket); @@ -537,6 +541,15 @@ svc_vc_stat(SVCXPRT *xprt) return (XPRT_IDLE); } +static bool_t +svc_vc_ack(SVCXPRT *xprt, uint32_t *ack) +{ + + *ack = atomic_load_acq_32(&xprt->xp_snt_cnt); + *ack -= xprt->xp_socket->so_snd.sb_cc; + return (TRUE); +} + static enum xprt_stat svc_vc_backchannel_stat(SVCXPRT *xprt) { @@ -785,12 +798,12 @@ svc_vc_backchannel_recv(SVCXPRT *xprt, s static bool_t svc_vc_reply(SVCXPRT *xprt, struct rpc_msg *msg, - struct sockaddr *addr, struct mbuf *m) + struct sockaddr *addr, struct mbuf *m, uint32_t *seq) { XDR xdrs; struct mbuf *mrep; bool_t stat = TRUE; - int error; + int error, len; /* * Leave space for record mark. @@ -817,14 +830,19 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_m * Prepend a record marker containing the reply length. */ M_PREPEND(mrep, sizeof(uint32_t), M_WAITOK); + len = mrep->m_pkthdr.len; *mtod(mrep, uint32_t *) = - htonl(0x80000000 | (mrep->m_pkthdr.len - - sizeof(uint32_t))); + htonl(0x80000000 | (len - sizeof(uint32_t))); + atomic_add_acq_32(&xprt->xp_snd_cnt, len); error = sosend(xprt->xp_socket, NULL, NULL, mrep, NULL, 0, curthread); if (!error) { + atomic_add_rel_32(&xprt->xp_snt_cnt, len); + if (seq) + *seq = xprt->xp_snd_cnt; stat = TRUE; - } + } else + atomic_subtract_32(&xprt->xp_snd_cnt, len); } else { m_freem(mrep); } @@ -837,7 +855,7 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_m static bool_t svc_vc_backchannel_reply(SVCXPRT *xprt, struct rpc_msg *msg, - struct sockaddr *addr, struct mbuf *m) + struct sockaddr *addr, struct mbuf *m, uint32_t *seq) { struct ct_data *ct; XDR xdrs; From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:26:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17D9C953; Thu, 23 Jan 2014 00:26:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DDCEC14DC; Thu, 23 Jan 2014 00:26:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0QOB3042416; Thu, 23 Jan 2014 00:26:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0QOS1042415; Thu, 23 Jan 2014 00:26:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230026.s0N0QOS1042415@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261056 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:26:25 -0000 Author: mav Date: Thu Jan 23 00:26:24 2014 New Revision: 261056 URL: http://svnweb.freebsd.org/changeset/base/261056 Log: MFC r258132: Some minor tuning to rpc/svc.c: - close cosmetic race in svc_exit(); - do not set wait timeout for idle threads if we have no use for wakeups; - create new requested thread sooner, not only after some another thread wakeup, that may happen later under constant load. Modified: stable/9/sys/rpc/svc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Wed Jan 22 23:55:25 2014 (r261055) +++ stable/9/sys/rpc/svc.c Thu Jan 23 00:26:24 2014 (r261056) @@ -1013,6 +1013,18 @@ svc_run_internal(SVCPOOL *pool, bool_t i while (pool->sp_state != SVCPOOL_CLOSING) { /* + * Create new thread if requested. + */ + if (pool->sp_state == SVCPOOL_THREADWANTED) { + pool->sp_state = SVCPOOL_THREADSTARTING; + pool->sp_lastcreatetime = time_uptime; + mtx_unlock(&pool->sp_lock); + svc_new_thread(pool); + mtx_lock(&pool->sp_lock); + continue; + } + + /* * Check for idle transports once per second. */ if (time_uptime > pool->sp_lastidlecheck) { @@ -1048,8 +1060,13 @@ svc_run_internal(SVCPOOL *pool, bool_t i continue; LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); - error = cv_timedwait_sig(&st->st_cond, &pool->sp_lock, - 5 * hz); + if (ismaster || (!ismaster && + pool->sp_threadcount > pool->sp_minthreads)) + error = cv_timedwait_sig(&st->st_cond, + &pool->sp_lock, 5 * hz); + else + error = cv_wait_sig(&st->st_cond, + &pool->sp_lock); LIST_REMOVE(st, st_ilink); /* @@ -1062,24 +1079,11 @@ svc_run_internal(SVCPOOL *pool, bool_t i && !st->st_xprt && STAILQ_EMPTY(&st->st_reqs)) break; - } - if (error == EWOULDBLOCK) - continue; - if (error) { - if (pool->sp_state != SVCPOOL_CLOSING) { - mtx_unlock(&pool->sp_lock); - svc_exit(pool); - mtx_lock(&pool->sp_lock); - } - break; - } - - if (pool->sp_state == SVCPOOL_THREADWANTED) { - pool->sp_state = SVCPOOL_THREADSTARTING; - pool->sp_lastcreatetime = time_uptime; + } else if (error) { mtx_unlock(&pool->sp_lock); - svc_new_thread(pool); + svc_exit(pool); mtx_lock(&pool->sp_lock); + break; } continue; } @@ -1247,9 +1251,11 @@ svc_exit(SVCPOOL *pool) mtx_lock(&pool->sp_lock); - pool->sp_state = SVCPOOL_CLOSING; - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) - cv_signal(&st->st_cond); + if (pool->sp_state != SVCPOOL_CLOSING) { + pool->sp_state = SVCPOOL_CLOSING; + LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) + cv_signal(&st->st_cond); + } mtx_unlock(&pool->sp_lock); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:28:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA682C6C; Thu, 23 Jan 2014 00:28:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B37FA14F7; Thu, 23 Jan 2014 00:28:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0SLrs042912; Thu, 23 Jan 2014 00:28:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0SIai042895; Thu, 23 Jan 2014 00:28:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230028.s0N0SIai042895@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:28:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261057 - in stable/9: include/rpc lib/libc/rpc sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:28:21 -0000 Author: mav Date: Thu Jan 23 00:28:17 2014 New Revision: 261057 URL: http://svnweb.freebsd.org/changeset/base/261057 Log: MFC r258578, r258580, r258581 (by hrs): Replace Sun RPC license in TI-RPC library with a 3-clause BSD license with the explicit permissions. Modified: stable/9/include/rpc/auth.h stable/9/include/rpc/auth_des.h stable/9/include/rpc/auth_kerb.h stable/9/include/rpc/auth_unix.h stable/9/include/rpc/clnt.h stable/9/include/rpc/clnt_soc.h stable/9/include/rpc/des.h stable/9/include/rpc/des_crypt.h stable/9/include/rpc/nettype.h stable/9/include/rpc/pmap_clnt.h stable/9/include/rpc/pmap_prot.h stable/9/include/rpc/pmap_rmt.h stable/9/include/rpc/raw.h stable/9/include/rpc/rpc.h stable/9/include/rpc/rpc_com.h stable/9/include/rpc/rpc_msg.h stable/9/include/rpc/rpcb_clnt.h stable/9/include/rpc/rpcb_prot.x stable/9/include/rpc/rpcent.h stable/9/include/rpc/svc.h stable/9/include/rpc/svc_auth.h stable/9/include/rpc/svc_dg.h stable/9/include/rpc/svc_soc.h stable/9/include/rpc/xdr.h stable/9/lib/libc/rpc/DISCLAIMER stable/9/lib/libc/rpc/auth_des.c stable/9/lib/libc/rpc/auth_none.c stable/9/lib/libc/rpc/auth_unix.c stable/9/lib/libc/rpc/authdes_prot.c stable/9/lib/libc/rpc/authunix_prot.c stable/9/lib/libc/rpc/bindresvport.c stable/9/lib/libc/rpc/clnt_bcast.c stable/9/lib/libc/rpc/clnt_dg.c stable/9/lib/libc/rpc/clnt_generic.c stable/9/lib/libc/rpc/clnt_perror.c stable/9/lib/libc/rpc/clnt_raw.c stable/9/lib/libc/rpc/clnt_simple.c stable/9/lib/libc/rpc/clnt_vc.c stable/9/lib/libc/rpc/des_crypt.c stable/9/lib/libc/rpc/des_soft.c stable/9/lib/libc/rpc/getnetconfig.c stable/9/lib/libc/rpc/getnetpath.c stable/9/lib/libc/rpc/getpublickey.c stable/9/lib/libc/rpc/getrpcent.c stable/9/lib/libc/rpc/getrpcport.c stable/9/lib/libc/rpc/key_call.c stable/9/lib/libc/rpc/key_prot_xdr.c stable/9/lib/libc/rpc/netname.c stable/9/lib/libc/rpc/netnamer.c stable/9/lib/libc/rpc/pmap_clnt.c stable/9/lib/libc/rpc/pmap_getmaps.c stable/9/lib/libc/rpc/pmap_getport.c stable/9/lib/libc/rpc/pmap_prot.c stable/9/lib/libc/rpc/pmap_prot2.c stable/9/lib/libc/rpc/pmap_rmt.c stable/9/lib/libc/rpc/rpc_callmsg.c stable/9/lib/libc/rpc/rpc_com.h stable/9/lib/libc/rpc/rpc_commondata.c stable/9/lib/libc/rpc/rpc_dtablesize.c stable/9/lib/libc/rpc/rpc_generic.c stable/9/lib/libc/rpc/rpc_prot.c stable/9/lib/libc/rpc/rpc_soc.c stable/9/lib/libc/rpc/rpcb_clnt.c stable/9/lib/libc/rpc/rpcb_prot.c stable/9/lib/libc/rpc/rpcb_st_xdr.c stable/9/lib/libc/rpc/rpcdname.c stable/9/lib/libc/rpc/rtime.c stable/9/lib/libc/rpc/svc.c stable/9/lib/libc/rpc/svc_auth.c stable/9/lib/libc/rpc/svc_auth_des.c stable/9/lib/libc/rpc/svc_auth_unix.c stable/9/lib/libc/rpc/svc_dg.c stable/9/lib/libc/rpc/svc_generic.c stable/9/lib/libc/rpc/svc_raw.c stable/9/lib/libc/rpc/svc_run.c stable/9/lib/libc/rpc/svc_simple.c stable/9/lib/libc/rpc/svc_vc.c stable/9/sys/rpc/auth.h stable/9/sys/rpc/auth_none.c stable/9/sys/rpc/auth_unix.c stable/9/sys/rpc/authunix_prot.c stable/9/sys/rpc/clnt.h stable/9/sys/rpc/clnt_dg.c stable/9/sys/rpc/clnt_vc.c stable/9/sys/rpc/nettype.h stable/9/sys/rpc/pmap_prot.h stable/9/sys/rpc/rpc.h stable/9/sys/rpc/rpc_callmsg.c stable/9/sys/rpc/rpc_com.h stable/9/sys/rpc/rpc_generic.c stable/9/sys/rpc/rpc_msg.h stable/9/sys/rpc/rpc_prot.c stable/9/sys/rpc/rpcb_clnt.c stable/9/sys/rpc/rpcb_clnt.h stable/9/sys/rpc/rpcb_prot.c stable/9/sys/rpc/rpcb_prot.h stable/9/sys/rpc/svc.c stable/9/sys/rpc/svc.h stable/9/sys/rpc/svc_auth.c stable/9/sys/rpc/svc_auth.h stable/9/sys/rpc/svc_auth_unix.c stable/9/sys/rpc/svc_dg.c stable/9/sys/rpc/svc_generic.c stable/9/sys/rpc/svc_vc.c stable/9/sys/rpc/types.h stable/9/sys/rpc/xdr.h Directory Properties: stable/9/ (props changed) stable/9/include/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/include/rpc/auth.h ============================================================================== --- stable/9/include/rpc/auth.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/auth.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,32 +1,31 @@ /* $NetBSD: auth.h,v 1.15 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)auth.h 1.17 88/02/08 SMI * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC Modified: stable/9/include/rpc/auth_des.h ============================================================================== --- stable/9/include/rpc/auth_des.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/auth_des.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,32 +1,31 @@ /* @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC; from 1.3 88/02/08 SMI */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC * from: @(#)auth_des.h 1.14 94/04/25 SMI Modified: stable/9/include/rpc/auth_kerb.h ============================================================================== --- stable/9/include/rpc/auth_kerb.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/auth_kerb.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,31 +1,30 @@ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * auth_kerb.h, Protocol for Kerberos style authentication for RPC Modified: stable/9/include/rpc/auth_unix.h ============================================================================== --- stable/9/include/rpc/auth_unix.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/auth_unix.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,30 +1,29 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)auth_unix.h 1.8 88/02/08 SMI * from: @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC Modified: stable/9/include/rpc/clnt.h ============================================================================== --- stable/9/include/rpc/clnt.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/clnt.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,49 +1,31 @@ /* $NetBSD: clnt.h,v 1.14 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * The contents of this file are subject to the Sun Standards - * License Version 1.0 the (the "License";) You may not use - * this file except in compliance with the License. You may - * obtain a copy of the License at lib/libc/rpc/LICENSE - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * The Original Code is Copyright 1998 by Sun Microsystems, Inc - * - * The Initial Developer of the Original Code is: Sun - * Microsystems, Inc. - * - * All Rights Reserved. - * - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. +/*- + * Copyright (c) 2010, Oracle America, Inc. + * All rights reserved. * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)clnt.h 1.31 94/04/29 SMI * from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC @@ -52,9 +34,6 @@ /* * clnt.h - Client side remote procedure call interface. - * - * Copyright (c) 1986-1991,1994-1999 by Sun Microsystems, Inc. - * All rights reserved. */ #ifndef _RPC_CLNT_H_ Modified: stable/9/include/rpc/clnt_soc.h ============================================================================== --- stable/9/include/rpc/clnt_soc.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/clnt_soc.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,33 +1,32 @@ /* $NetBSD: clnt_soc.h,v 1.1 2000/06/02 22:57:55 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1984 - 1991 by Sun Microsystems, Inc. Modified: stable/9/include/rpc/des.h ============================================================================== --- stable/9/include/rpc/des.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/des.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,32 +1,31 @@ /* @(#)des.h 2.2 88/08/10 4.0 RPCSRC; from 2.7 88/02/08 SMI */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Generic DES driver interface Modified: stable/9/include/rpc/des_crypt.h ============================================================================== --- stable/9/include/rpc/des_crypt.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/des_crypt.h Thu Jan 23 00:28:17 2014 (r261057) @@ -5,33 +5,32 @@ * des_crypt.h, des library routine interface * Copyright (C) 1986, Sun Microsystems, Inc. */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: stable/9/include/rpc/nettype.h ============================================================================== --- stable/9/include/rpc/nettype.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/nettype.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,33 +1,32 @@ /* $NetBSD: nettype.h,v 1.2 2000/07/06 03:17:19 christos Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: stable/9/include/rpc/pmap_clnt.h ============================================================================== --- stable/9/include/rpc/pmap_clnt.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/pmap_clnt.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,32 +1,31 @@ /* $NetBSD: pmap_clnt.h,v 1.9 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC Modified: stable/9/include/rpc/pmap_prot.h ============================================================================== --- stable/9/include/rpc/pmap_prot.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/pmap_prot.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,32 +1,31 @@ /* $NetBSD: pmap_prot.h,v 1.8 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)pmap_prot.h 1.14 88/02/08 SMI * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC Modified: stable/9/include/rpc/pmap_rmt.h ============================================================================== --- stable/9/include/rpc/pmap_rmt.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/pmap_rmt.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,32 +1,31 @@ /* $NetBSD: pmap_rmt.h,v 1.7 1998/02/11 23:01:23 lukem Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI * from: @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC Modified: stable/9/include/rpc/raw.h ============================================================================== --- stable/9/include/rpc/raw.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/raw.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,33 +1,32 @@ /* $NetBSD: raw.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: stable/9/include/rpc/rpc.h ============================================================================== --- stable/9/include/rpc/rpc.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/rpc.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,32 +1,31 @@ /* $NetBSD: rpc.h,v 1.13 2000/06/02 22:57:56 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. * * from: @(#)rpc.h 1.9 88/02/08 SMI * from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC Modified: stable/9/include/rpc/rpc_com.h ============================================================================== --- stable/9/include/rpc/rpc_com.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/rpc_com.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,33 +1,32 @@ /* $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: stable/9/include/rpc/rpc_msg.h ============================================================================== --- stable/9/include/rpc/rpc_msg.h Thu Jan 23 00:26:24 2014 (r261056) +++ stable/9/include/rpc/rpc_msg.h Thu Jan 23 00:28:17 2014 (r261057) @@ -1,32 +1,31 @@ /* $NetBSD: rpc_msg.h,v 1.11 2000/06/02 22:57:56 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - 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. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:35:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 899752A8; Thu, 23 Jan 2014 00:35:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 74E8E1609; Thu, 23 Jan 2014 00:35:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0ZhuA046729; Thu, 23 Jan 2014 00:35:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0ZgBT046723; Thu, 23 Jan 2014 00:35:42 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230035.s0N0ZgBT046723@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261058 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:35:43 -0000 Author: mav Date: Thu Jan 23 00:35:41 2014 New Revision: 261058 URL: http://svnweb.freebsd.org/changeset/base/261058 Log: MFC r244008 (by rmacklem): Add support for backchannels to the kernel RPC. Backchannels are used by NFSv4.1 for callbacks. A backchannel is a connection established by the client, but used for RPCs done by the server on the client (callbacks). As a result, this patch mixes some client side calls in the server side and vice versa. Some definitions in the .c files were extracted out into a file called krpc.h, so that they could be included in multiple .c files. This code has been in projects/nfsv4.1-client for some time. Although no one has given it a formal review, I believe kib@ has taken a look at it. Added: stable/9/sys/rpc/krpc.h - copied unchanged from r244008, head/sys/rpc/krpc.h Modified: stable/9/sys/rpc/clnt.h stable/9/sys/rpc/clnt_rc.c stable/9/sys/rpc/clnt_vc.c stable/9/sys/rpc/svc.h stable/9/sys/rpc/svc_vc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/clnt.h ============================================================================== --- stable/9/sys/rpc/clnt.h Thu Jan 23 00:28:17 2014 (r261057) +++ stable/9/sys/rpc/clnt.h Thu Jan 23 00:35:41 2014 (r261058) @@ -354,6 +354,7 @@ enum clnt_stat clnt_call_private(CLIENT #define CLGET_RETRIES 26 /* get retry count for reconnect */ #define CLSET_PRIVPORT 27 /* set privileged source port flag */ #define CLGET_PRIVPORT 28 /* get privileged source port flag */ +#define CLSET_BACKCHANNEL 29 /* set backchannel for socket */ #endif Modified: stable/9/sys/rpc/clnt_rc.c ============================================================================== --- stable/9/sys/rpc/clnt_rc.c Thu Jan 23 00:28:17 2014 (r261057) +++ stable/9/sys/rpc/clnt_rc.c Thu Jan 23 00:35:41 2014 (r261058) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include static enum clnt_stat clnt_reconnect_call(CLIENT *, struct rpc_callextra *, rpcproc_t, struct mbuf *, struct mbuf **, struct timeval); @@ -67,27 +68,6 @@ static struct clnt_ops clnt_reconnect_op static int fake_wchan; -struct rc_data { - struct mtx rc_lock; - struct sockaddr_storage rc_addr; /* server address */ - struct netconfig* rc_nconf; /* network type */ - rpcprog_t rc_prog; /* program number */ - rpcvers_t rc_vers; /* version number */ - size_t rc_sendsz; - size_t rc_recvsz; - struct timeval rc_timeout; - struct timeval rc_retry; - int rc_retries; - int rc_privport; - char *rc_waitchan; - int rc_intr; - int rc_connecting; - int rc_closed; - struct ucred *rc_ucred; - CLIENT* rc_client; /* underlying RPC client */ - struct rpc_err rc_err; -}; - CLIENT * clnt_reconnect_create( struct netconfig *nconf, /* network type */ @@ -211,6 +191,8 @@ clnt_reconnect_connect(CLIENT *cl) CLNT_CONTROL(newclient, CLSET_RETRY_TIMEOUT, &rc->rc_retry); CLNT_CONTROL(newclient, CLSET_WAITCHAN, rc->rc_waitchan); CLNT_CONTROL(newclient, CLSET_INTERRUPTIBLE, &rc->rc_intr); + if (rc->rc_backchannel != NULL) + CLNT_CONTROL(newclient, CLSET_BACKCHANNEL, rc->rc_backchannel); stat = RPC_SUCCESS; out: @@ -385,6 +367,7 @@ static bool_t clnt_reconnect_control(CLIENT *cl, u_int request, void *info) { struct rc_data *rc = (struct rc_data *)cl->cl_private; + SVCXPRT *xprt; if (info == NULL) { return (FALSE); @@ -466,6 +449,13 @@ clnt_reconnect_control(CLIENT *cl, u_int *(int *) info = rc->rc_privport; break; + case CLSET_BACKCHANNEL: + xprt = (SVCXPRT *)info; + SVC_ACQUIRE(xprt); + xprt_register(xprt); + rc->rc_backchannel = info; + break; + default: return (FALSE); } @@ -502,9 +492,15 @@ static void clnt_reconnect_destroy(CLIENT *cl) { struct rc_data *rc = (struct rc_data *)cl->cl_private; + SVCXPRT *xprt; if (rc->rc_client) CLNT_DESTROY(rc->rc_client); + if (rc->rc_backchannel) { + xprt = (SVCXPRT *)rc->rc_backchannel; + xprt_unregister(xprt); + SVC_RELEASE(xprt); + } crfree(rc->rc_ucred); mtx_destroy(&rc->rc_lock); mem_free(rc, sizeof(*rc)); Modified: stable/9/sys/rpc/clnt_vc.c ============================================================================== --- stable/9/sys/rpc/clnt_vc.c Thu Jan 23 00:28:17 2014 (r261057) +++ stable/9/sys/rpc/clnt_vc.c Thu Jan 23 00:35:41 2014 (r261058) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -76,8 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include - -#define MCALL_MSG_SIZE 24 +#include struct cmessage { struct cmsghdr cmsg; @@ -105,43 +105,6 @@ static struct clnt_ops clnt_vc_ops = { .cl_control = clnt_vc_control }; -/* - * A pending RPC request which awaits a reply. Requests which have - * received their reply will have cr_xid set to zero and cr_mrep to - * the mbuf chain of the reply. - */ -struct ct_request { - TAILQ_ENTRY(ct_request) cr_link; - uint32_t cr_xid; /* XID of request */ - struct mbuf *cr_mrep; /* reply received by upcall */ - int cr_error; /* any error from upcall */ - char cr_verf[MAX_AUTH_BYTES]; /* reply verf */ -}; - -TAILQ_HEAD(ct_request_list, ct_request); - -struct ct_data { - struct mtx ct_lock; - int ct_threads; /* number of threads in clnt_vc_call */ - bool_t ct_closing; /* TRUE if we are closing */ - bool_t ct_closed; /* TRUE if we are closed */ - struct socket *ct_socket; /* connection socket */ - bool_t ct_closeit; /* close it on destroy */ - struct timeval ct_wait; /* wait interval in milliseconds */ - struct sockaddr_storage ct_addr; /* remote addr */ - struct rpc_err ct_error; - uint32_t ct_xid; - char ct_mcallc[MCALL_MSG_SIZE]; /* marshalled callmsg */ - size_t ct_mpos; /* pos after marshal */ - const char *ct_waitchan; - int ct_waitflag; - struct mbuf *ct_record; /* current reply record */ - size_t ct_record_resid; /* how much left of reply to read */ - bool_t ct_record_eor; /* true if reading last fragment */ - struct ct_request_list ct_pending; - int ct_upcallrefs; /* Ref cnt of upcalls in prog. */ -}; - static void clnt_vc_upcallsdone(struct ct_data *); /* @@ -635,6 +598,7 @@ clnt_vc_control(CLIENT *cl, u_int reques { struct ct_data *ct = (struct ct_data *)cl->cl_private; void *infop = info; + SVCXPRT *xprt; mtx_lock(&ct->ct_lock); @@ -746,6 +710,14 @@ clnt_vc_control(CLIENT *cl, u_int reques *(int *) info = FALSE; break; + case CLSET_BACKCHANNEL: + xprt = (SVCXPRT *)info; + if (ct->ct_backchannelxprt == NULL) { + xprt->xp_p2 = ct; + ct->ct_backchannelxprt = xprt; + } + break; + default: mtx_unlock(&ct->ct_lock); return (FALSE); @@ -811,10 +783,20 @@ clnt_vc_destroy(CLIENT *cl) { struct ct_data *ct = (struct ct_data *) cl->cl_private; struct socket *so = NULL; + SVCXPRT *xprt; clnt_vc_close(cl); mtx_lock(&ct->ct_lock); + xprt = ct->ct_backchannelxprt; + ct->ct_backchannelxprt = NULL; + if (xprt != NULL) { + mtx_unlock(&ct->ct_lock); /* To avoid a LOR. */ + sx_xlock(&xprt->xp_lock); + mtx_lock(&ct->ct_lock); + xprt->xp_p2 = NULL; + xprt_unregister(xprt); + } if (ct->ct_socket) { if (ct->ct_closeit) { @@ -823,6 +805,10 @@ clnt_vc_destroy(CLIENT *cl) } mtx_unlock(&ct->ct_lock); + if (xprt != NULL) { + sx_xunlock(&xprt->xp_lock); + SVC_RELEASE(xprt); + } mtx_destroy(&ct->ct_lock); if (so) { @@ -853,12 +839,15 @@ clnt_vc_soupcall(struct socket *so, void { struct ct_data *ct = (struct ct_data *) arg; struct uio uio; - struct mbuf *m; + struct mbuf *m, *m2; struct ct_request *cr; int error, rcvflag, foundreq; - uint32_t xid, header; + uint32_t xid_plus_direction[2], header; bool_t do_read; + SVCXPRT *xprt; + struct cf_conn *cd; + CTASSERT(sizeof(xid_plus_direction) == 2 * sizeof(uint32_t)); ct->ct_upcallrefs++; uio.uio_td = curthread; do { @@ -972,45 +961,89 @@ clnt_vc_soupcall(struct socket *so, void && ct->ct_record_eor) { /* * The XID is in the first uint32_t of - * the reply. + * the reply and the message direction + * is the second one. */ - if (ct->ct_record->m_len < sizeof(xid) && + if (ct->ct_record->m_len < + sizeof(xid_plus_direction) && m_length(ct->ct_record, NULL) < - sizeof(xid)) { + sizeof(xid_plus_direction)) { m_freem(ct->ct_record); break; } - m_copydata(ct->ct_record, 0, sizeof(xid), - (char *)&xid); - xid = ntohl(xid); - - mtx_lock(&ct->ct_lock); - foundreq = 0; - TAILQ_FOREACH(cr, &ct->ct_pending, cr_link) { - if (cr->cr_xid == xid) { + m_copydata(ct->ct_record, 0, + sizeof(xid_plus_direction), + (char *)xid_plus_direction); + xid_plus_direction[0] = + ntohl(xid_plus_direction[0]); + xid_plus_direction[1] = + ntohl(xid_plus_direction[1]); + /* Check message direction. */ + if (xid_plus_direction[1] == CALL) { + /* This is a backchannel request. */ + mtx_lock(&ct->ct_lock); + xprt = ct->ct_backchannelxprt; + if (xprt == NULL) { + mtx_unlock(&ct->ct_lock); + /* Just throw it away. */ + m_freem(ct->ct_record); + ct->ct_record = NULL; + } else { + cd = (struct cf_conn *) + xprt->xp_p1; + m2 = cd->mreq; /* - * This one - * matches. We leave - * the reply mbuf in - * cr->cr_mrep. Set - * the XID to zero so - * that we will ignore - * any duplicaed - * replies. + * The requests are chained + * in the m_nextpkt list. */ - cr->cr_xid = 0; - cr->cr_mrep = ct->ct_record; - cr->cr_error = 0; - foundreq = 1; - wakeup(cr); - break; + while (m2 != NULL && + m2->m_nextpkt != NULL) + /* Find end of list. */ + m2 = m2->m_nextpkt; + if (m2 != NULL) + m2->m_nextpkt = + ct->ct_record; + else + cd->mreq = + ct->ct_record; + ct->ct_record->m_nextpkt = + NULL; + ct->ct_record = NULL; + xprt_active(xprt); + mtx_unlock(&ct->ct_lock); } - } - mtx_unlock(&ct->ct_lock); + } else { + mtx_lock(&ct->ct_lock); + foundreq = 0; + TAILQ_FOREACH(cr, &ct->ct_pending, + cr_link) { + if (cr->cr_xid == + xid_plus_direction[0]) { + /* + * This one + * matches. We leave + * the reply mbuf in + * cr->cr_mrep. Set + * the XID to zero so + * that we will ignore + * any duplicated + * replies. + */ + cr->cr_xid = 0; + cr->cr_mrep = + ct->ct_record; + cr->cr_error = 0; + foundreq = 1; + wakeup(cr); + break; + } + } + mtx_unlock(&ct->ct_lock); - if (!foundreq) - m_freem(ct->ct_record); - ct->ct_record = NULL; + if (!foundreq) + m_freem(ct->ct_record); + ct->ct_record = NULL; + } } } } while (m); Copied: stable/9/sys/rpc/krpc.h (from r244008, head/sys/rpc/krpc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/rpc/krpc.h Thu Jan 23 00:35:41 2014 (r261058, copy of r244008, head/sys/rpc/krpc.h) @@ -0,0 +1,111 @@ +/*- + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + * + * $FreeBSD$ + */ + +#ifndef _RPC_KRPC_H_ +#define _RPC_KRPC_H_ + +#ifdef _KERNEL +/* + * Definitions now shared between client and server RPC for backchannels. + */ +#define MCALL_MSG_SIZE 24 + +/* + * A pending RPC request which awaits a reply. Requests which have + * received their reply will have cr_xid set to zero and cr_mrep to + * the mbuf chain of the reply. + */ +struct ct_request { + TAILQ_ENTRY(ct_request) cr_link; + uint32_t cr_xid; /* XID of request */ + struct mbuf *cr_mrep; /* reply received by upcall */ + int cr_error; /* any error from upcall */ + char cr_verf[MAX_AUTH_BYTES]; /* reply verf */ +}; + +TAILQ_HEAD(ct_request_list, ct_request); + +struct rc_data { + struct mtx rc_lock; + struct sockaddr_storage rc_addr; /* server address */ + struct netconfig* rc_nconf; /* network type */ + rpcprog_t rc_prog; /* program number */ + rpcvers_t rc_vers; /* version number */ + size_t rc_sendsz; + size_t rc_recvsz; + struct timeval rc_timeout; + struct timeval rc_retry; + int rc_retries; + int rc_privport; + char *rc_waitchan; + int rc_intr; + int rc_connecting; + int rc_closed; + struct ucred *rc_ucred; + CLIENT* rc_client; /* underlying RPC client */ + struct rpc_err rc_err; + void *rc_backchannel; +}; + +struct ct_data { + struct mtx ct_lock; + int ct_threads; /* number of threads in clnt_vc_call */ + bool_t ct_closing; /* TRUE if we are closing */ + bool_t ct_closed; /* TRUE if we are closed */ + struct socket *ct_socket; /* connection socket */ + bool_t ct_closeit; /* close it on destroy */ + struct timeval ct_wait; /* wait interval in milliseconds */ + struct sockaddr_storage ct_addr; /* remote addr */ + struct rpc_err ct_error; + uint32_t ct_xid; + char ct_mcallc[MCALL_MSG_SIZE]; /* marshalled callmsg */ + size_t ct_mpos; /* pos after marshal */ + const char *ct_waitchan; + int ct_waitflag; + struct mbuf *ct_record; /* current reply record */ + size_t ct_record_resid; /* how much left of reply to read */ + bool_t ct_record_eor; /* true if reading last fragment */ + struct ct_request_list ct_pending; + int ct_upcallrefs; /* Ref cnt of upcalls in prog. */ + SVCXPRT *ct_backchannelxprt; /* xprt for backchannel */ +}; + +struct cf_conn { /* kept in xprt->xp_p1 for actual connection */ + enum xprt_stat strm_stat; + struct mbuf *mpending; /* unparsed data read from the socket */ + struct mbuf *mreq; /* current record being built from mpending */ + uint32_t resid; /* number of bytes needed for fragment */ + bool_t eor; /* reading last fragment of current record */ +}; + +#endif /* _KERNEL */ + +#endif /* _RPC_KRPC_H_ */ Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Thu Jan 23 00:28:17 2014 (r261057) +++ stable/9/sys/rpc/svc.h Thu Jan 23 00:35:41 2014 (r261058) @@ -702,6 +702,8 @@ extern SVCXPRT *svc_vc_create(SVCPOOL *, * const size_t recvsize; -- max recv size */ +extern SVCXPRT *svc_vc_create_backchannel(SVCPOOL *); + /* * Generic TLI create routine */ Modified: stable/9/sys/rpc/svc_vc.c ============================================================================== --- stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:28:17 2014 (r261057) +++ stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:35:41 2014 (r261058) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -82,6 +83,14 @@ static bool_t svc_vc_reply(SVCXPRT *, st static bool_t svc_vc_control(SVCXPRT *xprt, const u_int rq, void *in); static bool_t svc_vc_rendezvous_control (SVCXPRT *xprt, const u_int rq, void *in); +static void svc_vc_backchannel_destroy(SVCXPRT *); +static enum xprt_stat svc_vc_backchannel_stat(SVCXPRT *); +static bool_t svc_vc_backchannel_recv(SVCXPRT *, struct rpc_msg *, + struct sockaddr **, struct mbuf **); +static bool_t svc_vc_backchannel_reply(SVCXPRT *, struct rpc_msg *, + struct sockaddr *, struct mbuf *); +static bool_t svc_vc_backchannel_control(SVCXPRT *xprt, const u_int rq, + void *in); static SVCXPRT *svc_vc_create_conn(SVCPOOL *pool, struct socket *so, struct sockaddr *raddr); static int svc_vc_accept(struct socket *head, struct socket **sop); @@ -104,12 +113,12 @@ static struct xp_ops svc_vc_ops = { .xp_control = svc_vc_control }; -struct cf_conn { /* kept in xprt->xp_p1 for actual connection */ - enum xprt_stat strm_stat; - struct mbuf *mpending; /* unparsed data read from the socket */ - struct mbuf *mreq; /* current record being built from mpending */ - uint32_t resid; /* number of bytes needed for fragment */ - bool_t eor; /* reading last fragment of current record */ +static struct xp_ops svc_vc_backchannel_ops = { + .xp_recv = svc_vc_backchannel_recv, + .xp_stat = svc_vc_backchannel_stat, + .xp_reply = svc_vc_backchannel_reply, + .xp_destroy = svc_vc_backchannel_destroy, + .xp_control = svc_vc_backchannel_control }; /* @@ -269,6 +278,28 @@ cleanup_svc_vc_create: } /* + * Create a new transport for a backchannel on a clnt_vc socket. + */ +SVCXPRT * +svc_vc_create_backchannel(SVCPOOL *pool) +{ + SVCXPRT *xprt = NULL; + struct cf_conn *cd = NULL; + + cd = mem_alloc(sizeof(*cd)); + cd->strm_stat = XPRT_IDLE; + + xprt = svc_xprt_alloc(); + sx_init(&xprt->xp_lock, "xprt->xp_lock"); + xprt->xp_pool = pool; + xprt->xp_socket = NULL; + xprt->xp_p1 = cd; + xprt->xp_p2 = NULL; + xprt->xp_ops = &svc_vc_backchannel_ops; + return (xprt); +} + +/* * This does all of the accept except the final call to soaccept. The * caller will call soaccept after dropping its locks (soaccept may * call malloc). @@ -454,6 +485,22 @@ svc_vc_destroy(SVCXPRT *xprt) mem_free(cd, sizeof(*cd)); } +static void +svc_vc_backchannel_destroy(SVCXPRT *xprt) +{ + struct cf_conn *cd = (struct cf_conn *)xprt->xp_p1; + struct mbuf *m, *m2; + + svc_xprt_free(xprt); + m = cd->mreq; + while (m != NULL) { + m2 = m; + m = m->m_nextpkt; + m_freem(m2); + } + mem_free(cd, sizeof(*cd)); +} + /*ARGSUSED*/ static bool_t svc_vc_control(SVCXPRT *xprt, const u_int rq, void *in) @@ -468,6 +515,13 @@ svc_vc_rendezvous_control(SVCXPRT *xprt, return (FALSE); } +static bool_t +svc_vc_backchannel_control(SVCXPRT *xprt, const u_int rq, void *in) +{ + + return (FALSE); +} + static enum xprt_stat svc_vc_stat(SVCXPRT *xprt) { @@ -508,6 +562,19 @@ svc_vc_stat(SVCXPRT *xprt) return (XPRT_IDLE); } +static enum xprt_stat +svc_vc_backchannel_stat(SVCXPRT *xprt) +{ + struct cf_conn *cd; + + cd = (struct cf_conn *)(xprt->xp_p1); + + if (cd->mreq != NULL) + return (XPRT_MOREREQS); + + return (XPRT_IDLE); +} + static bool_t svc_vc_recv(SVCXPRT *xprt, struct rpc_msg *msg, struct sockaddr **addrp, struct mbuf **mp) @@ -682,6 +749,44 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms } static bool_t +svc_vc_backchannel_recv(SVCXPRT *xprt, struct rpc_msg *msg, + struct sockaddr **addrp, struct mbuf **mp) +{ + struct cf_conn *cd = (struct cf_conn *) xprt->xp_p1; + struct ct_data *ct; + struct mbuf *m; + XDR xdrs; + + sx_xlock(&xprt->xp_lock); + ct = (struct ct_data *)xprt->xp_p2; + if (ct == NULL) { + sx_xunlock(&xprt->xp_lock); + return (FALSE); + } + mtx_lock(&ct->ct_lock); + m = cd->mreq; + if (m == NULL) { + xprt_inactive(xprt); + mtx_unlock(&ct->ct_lock); + sx_xunlock(&xprt->xp_lock); + return (FALSE); + } + cd->mreq = m->m_nextpkt; + mtx_unlock(&ct->ct_lock); + sx_xunlock(&xprt->xp_lock); + + xdrmbuf_create(&xdrs, m, XDR_DECODE); + if (! xdr_callmsg(&xdrs, msg)) { + XDR_DESTROY(&xdrs); + return (FALSE); + } + *addrp = NULL; + *mp = xdrmbuf_getall(&xdrs); + XDR_DESTROY(&xdrs); + return (TRUE); +} + +static bool_t svc_vc_reply(SVCXPRT *xprt, struct rpc_msg *msg, struct sockaddr *addr, struct mbuf *m) { @@ -735,6 +840,65 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_m } static bool_t +svc_vc_backchannel_reply(SVCXPRT *xprt, struct rpc_msg *msg, + struct sockaddr *addr, struct mbuf *m) +{ + struct ct_data *ct; + XDR xdrs; + struct mbuf *mrep; + bool_t stat = TRUE; + int error; + + /* + * Leave space for record mark. + */ + MGETHDR(mrep, M_WAITOK, MT_DATA); + mrep->m_len = 0; + mrep->m_data += sizeof(uint32_t); + + xdrmbuf_create(&xdrs, mrep, XDR_ENCODE); + + if (msg->rm_reply.rp_stat == MSG_ACCEPTED && + msg->rm_reply.rp_acpt.ar_stat == SUCCESS) { + if (!xdr_replymsg(&xdrs, msg)) + stat = FALSE; + else + xdrmbuf_append(&xdrs, m); + } else { + stat = xdr_replymsg(&xdrs, msg); + } + + if (stat) { + m_fixhdr(mrep); + + /* + * Prepend a record marker containing the reply length. + */ + M_PREPEND(mrep, sizeof(uint32_t), M_WAITOK); + *mtod(mrep, uint32_t *) = + htonl(0x80000000 | (mrep->m_pkthdr.len + - sizeof(uint32_t))); + sx_xlock(&xprt->xp_lock); + ct = (struct ct_data *)xprt->xp_p2; + if (ct != NULL) + error = sosend(ct->ct_socket, NULL, NULL, mrep, NULL, + 0, curthread); + else + error = EPIPE; + sx_xunlock(&xprt->xp_lock); + if (!error) { + stat = TRUE; + } + } else { + m_freem(mrep); + } + + XDR_DESTROY(&xdrs); + + return (stat); +} + +static bool_t svc_vc_null() { From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:40:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40C15790; Thu, 23 Jan 2014 00:40:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E66111657; Thu, 23 Jan 2014 00:40:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0eSms049114; Thu, 23 Jan 2014 00:40:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0eSWB049113; Thu, 23 Jan 2014 00:40:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230040.s0N0eSWB049113@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261059 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:40:29 -0000 Author: mav Date: Thu Jan 23 00:40:28 2014 New Revision: 261059 URL: http://svnweb.freebsd.org/changeset/base/261059 Log: MFC r259632: Rework flow control for connection-oriented (TCP) RPC server. When processing receive buffer, write the amount of data, expected in present request record, into socket's so_rcv.sb_lowat to make stack aware about our needs. When processing following upcalls, ignore them until socket collect enough data to be read and processed in one turn. This change reduces number of context switches and other operations in RPC stack during large NFS writes (especially via non-Jumbo networks) by order of magnitude. After precessing current packet, take another look into the pending buffer to find out whether the next packet had been already received. If not, deactivate this port right there without making RPC code to push this port to another thread just to find that there is nothing. If the next packet is received partially, also deactivate the port, but also update socket's so_rcv.sb_lowat to not be woken up prematurely. This change additionally reduces number of context switches per NFS request about in half. Modified: stable/9/sys/rpc/svc_vc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc_vc.c ============================================================================== --- stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:35:41 2014 (r261058) +++ stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:40:28 2014 (r261059) @@ -381,15 +381,11 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st * We must re-test for new connections after taking * the lock to protect us in the case where a new * connection arrives after our call to accept fails - * with EWOULDBLOCK. The pool lock protects us from - * racing the upcall after our TAILQ_EMPTY() call - * returns false. + * with EWOULDBLOCK. */ ACCEPT_LOCK(); - mtx_lock(&xprt->xp_pool->sp_lock); if (TAILQ_EMPTY(&xprt->xp_socket->so_comp)) - xprt_inactive_locked(xprt); - mtx_unlock(&xprt->xp_pool->sp_lock); + xprt_inactive(xprt); ACCEPT_UNLOCK(); sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -526,35 +522,14 @@ static enum xprt_stat svc_vc_stat(SVCXPRT *xprt) { struct cf_conn *cd; - struct mbuf *m; - size_t n; cd = (struct cf_conn *)(xprt->xp_p1); if (cd->strm_stat == XPRT_DIED) return (XPRT_DIED); - /* - * Return XPRT_MOREREQS if we have buffered data and we are - * mid-record or if we have enough data for a record - * marker. Since this is only a hint, we read mpending and - * resid outside the lock. We do need to take the lock if we - * have to traverse the mbuf chain. - */ - if (cd->mpending) { - if (cd->resid) - return (XPRT_MOREREQS); - n = 0; - sx_xlock(&xprt->xp_lock); - m = cd->mpending; - while (m && n < sizeof(uint32_t)) { - n += m->m_len; - m = m->m_next; - } - sx_xunlock(&xprt->xp_lock); - if (n >= sizeof(uint32_t)) - return (XPRT_MOREREQS); - } + if (cd->mreq != NULL && cd->resid == 0 && cd->eor) + return (XPRT_MOREREQS); if (soreadable(xprt->xp_socket)) return (XPRT_MOREREQS); @@ -575,6 +550,78 @@ svc_vc_backchannel_stat(SVCXPRT *xprt) return (XPRT_IDLE); } +/* + * If we have an mbuf chain in cd->mpending, try to parse a record from it, + * leaving the result in cd->mreq. If we don't have a complete record, leave + * the partial result in cd->mreq and try to read more from the socket. + */ +static void +svc_vc_process_pending(SVCXPRT *xprt) +{ + struct cf_conn *cd = (struct cf_conn *) xprt->xp_p1; + struct socket *so = xprt->xp_socket; + struct mbuf *m; + + /* + * If cd->resid is non-zero, we have part of the + * record already, otherwise we are expecting a record + * marker. + */ + if (!cd->resid && cd->mpending) { + /* + * See if there is enough data buffered to + * make up a record marker. Make sure we can + * handle the case where the record marker is + * split across more than one mbuf. + */ + size_t n = 0; + uint32_t header; + + m = cd->mpending; + while (n < sizeof(uint32_t) && m) { + n += m->m_len; + m = m->m_next; + } + if (n < sizeof(uint32_t)) { + so->so_rcv.sb_lowat = sizeof(uint32_t) - n; + return; + } + m_copydata(cd->mpending, 0, sizeof(header), + (char *)&header); + header = ntohl(header); + cd->eor = (header & 0x80000000) != 0; + cd->resid = header & 0x7fffffff; + m_adj(cd->mpending, sizeof(uint32_t)); + } + + /* + * Start pulling off mbufs from cd->mpending + * until we either have a complete record or + * we run out of data. We use m_split to pull + * data - it will pull as much as possible and + * split the last mbuf if necessary. + */ + while (cd->mpending && cd->resid) { + m = cd->mpending; + if (cd->mpending->m_next + || cd->mpending->m_len > cd->resid) + cd->mpending = m_split(cd->mpending, + cd->resid, M_WAITOK); + else + cd->mpending = NULL; + if (cd->mreq) + m_last(cd->mreq)->m_next = m; + else + cd->mreq = m; + while (m) { + cd->resid -= m->m_len; + m = m->m_next; + } + } + + so->so_rcv.sb_lowat = imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); +} + static bool_t svc_vc_recv(SVCXPRT *xprt, struct rpc_msg *msg, struct sockaddr **addrp, struct mbuf **mp) @@ -582,6 +629,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms struct cf_conn *cd = (struct cf_conn *) xprt->xp_p1; struct uio uio; struct mbuf *m; + struct socket* so = xprt->xp_socket; XDR xdrs; int error, rcvflag; @@ -592,99 +640,40 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms sx_xlock(&xprt->xp_lock); for (;;) { - /* - * If we have an mbuf chain in cd->mpending, try to parse a - * record from it, leaving the result in cd->mreq. If we don't - * have a complete record, leave the partial result in - * cd->mreq and try to read more from the socket. - */ - if (cd->mpending) { - /* - * If cd->resid is non-zero, we have part of the - * record already, otherwise we are expecting a record - * marker. - */ - if (!cd->resid) { - /* - * See if there is enough data buffered to - * make up a record marker. Make sure we can - * handle the case where the record marker is - * split across more than one mbuf. - */ - size_t n = 0; - uint32_t header; - - m = cd->mpending; - while (n < sizeof(uint32_t) && m) { - n += m->m_len; - m = m->m_next; - } - if (n < sizeof(uint32_t)) - goto readmore; - m_copydata(cd->mpending, 0, sizeof(header), - (char *)&header); - header = ntohl(header); - cd->eor = (header & 0x80000000) != 0; - cd->resid = header & 0x7fffffff; - m_adj(cd->mpending, sizeof(uint32_t)); - } - - /* - * Start pulling off mbufs from cd->mpending - * until we either have a complete record or - * we run out of data. We use m_split to pull - * data - it will pull as much as possible and - * split the last mbuf if necessary. - */ - while (cd->mpending && cd->resid) { - m = cd->mpending; - if (cd->mpending->m_next - || cd->mpending->m_len > cd->resid) - cd->mpending = m_split(cd->mpending, - cd->resid, M_WAIT); - else - cd->mpending = NULL; - if (cd->mreq) - m_last(cd->mreq)->m_next = m; - else - cd->mreq = m; - while (m) { - cd->resid -= m->m_len; - m = m->m_next; - } + /* If we have no request ready, check pending queue. */ + while (cd->mpending && + (cd->mreq == NULL || cd->resid != 0 || !cd->eor)) + svc_vc_process_pending(xprt); + + /* Process and return complete request in cd->mreq. */ + if (cd->mreq != NULL && cd->resid == 0 && cd->eor) { + + xdrmbuf_create(&xdrs, cd->mreq, XDR_DECODE); + cd->mreq = NULL; + + /* Check for next request in a pending queue. */ + svc_vc_process_pending(xprt); + if (cd->mreq == NULL || cd->resid != 0) { + SOCKBUF_LOCK(&so->so_rcv); + if (!soreadable(so)) + xprt_inactive(xprt); + SOCKBUF_UNLOCK(&so->so_rcv); } - /* - * If cd->resid is zero now, we have managed to - * receive a record fragment from the stream. Check - * for the end-of-record mark to see if we need more. - */ - if (cd->resid == 0) { - if (!cd->eor) - continue; - - /* - * Success - we have a complete record in - * cd->mreq. - */ - xdrmbuf_create(&xdrs, cd->mreq, XDR_DECODE); - cd->mreq = NULL; - sx_xunlock(&xprt->xp_lock); - - if (! xdr_callmsg(&xdrs, msg)) { - XDR_DESTROY(&xdrs); - return (FALSE); - } + sx_xunlock(&xprt->xp_lock); - *addrp = NULL; - *mp = xdrmbuf_getall(&xdrs); + if (! xdr_callmsg(&xdrs, msg)) { XDR_DESTROY(&xdrs); - - return (TRUE); + return (FALSE); } + + *addrp = NULL; + *mp = xdrmbuf_getall(&xdrs); + XDR_DESTROY(&xdrs); + + return (TRUE); } - readmore: /* * The socket upcall calls xprt_active() which will eventually * cause the server to call us here. We attempt to @@ -697,8 +686,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms uio.uio_td = curthread; m = NULL; rcvflag = MSG_DONTWAIT; - error = soreceive(xprt->xp_socket, NULL, &uio, &m, NULL, - &rcvflag); + error = soreceive(so, NULL, &uio, &m, NULL, &rcvflag); if (error == EWOULDBLOCK) { /* @@ -706,25 +694,23 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms * taking the lock to protect us in the case * where a new packet arrives on the socket * after our call to soreceive fails with - * EWOULDBLOCK. The pool lock protects us from - * racing the upcall after our soreadable() - * call returns false. + * EWOULDBLOCK. */ - mtx_lock(&xprt->xp_pool->sp_lock); - if (!soreadable(xprt->xp_socket)) - xprt_inactive_locked(xprt); - mtx_unlock(&xprt->xp_pool->sp_lock); + SOCKBUF_LOCK(&so->so_rcv); + if (!soreadable(so)) + xprt_inactive(xprt); + SOCKBUF_UNLOCK(&so->so_rcv); sx_xunlock(&xprt->xp_lock); return (FALSE); } if (error) { - SOCKBUF_LOCK(&xprt->xp_socket->so_rcv); + SOCKBUF_LOCK(&so->so_rcv); if (xprt->xp_upcallset) { xprt->xp_upcallset = 0; - soupcall_clear(xprt->xp_socket, SO_RCV); + soupcall_clear(so, SO_RCV); } - SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); + SOCKBUF_UNLOCK(&so->so_rcv); xprt_inactive(xprt); cd->strm_stat = XPRT_DIED; sx_xunlock(&xprt->xp_lock); @@ -910,7 +896,8 @@ svc_vc_soupcall(struct socket *so, void { SVCXPRT *xprt = (SVCXPRT *) arg; - xprt_active(xprt); + if (soreadable(xprt->xp_socket)) + xprt_active(xprt); return (SU_OK); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:41:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B57DBA91; Thu, 23 Jan 2014 00:41:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 96E1B16BB; Thu, 23 Jan 2014 00:41:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0fOLE050323; Thu, 23 Jan 2014 00:41:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0fOH1050320; Thu, 23 Jan 2014 00:41:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230041.s0N0fOH1050320@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261060 - in stable/9/sys: nfs rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:41:24 -0000 Author: mav Date: Thu Jan 23 00:41:23 2014 New Revision: 261060 URL: http://svnweb.freebsd.org/changeset/base/261060 Log: MFC r259659, r259662: Remove several linear list traversals per request from RPC server code. Do not insert active ports into pool->sp_active list if they are success- fully assigned to some thread. This makes that list include only ports that really require attention, and so traversal can be reduced to simple taking the first one. Remove idle thread from pool->sp_idlethreads list when assigning some work (port of requests) to it. That again makes possible to replace list traversals with simple taking the first element. Modified: stable/9/sys/nfs/nfs_fha.c stable/9/sys/rpc/svc.c stable/9/sys/rpc/svc.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/nfs/nfs_fha.c ============================================================================== --- stable/9/sys/nfs/nfs_fha.c Thu Jan 23 00:40:28 2014 (r261059) +++ stable/9/sys/nfs/nfs_fha.c Thu Jan 23 00:41:23 2014 (r261060) @@ -289,19 +289,6 @@ fha_hash_entry_add_op(struct fha_hash_en fhe->num_rw += count; } -static SVCTHREAD * -get_idle_thread(SVCPOOL *pool) -{ - SVCTHREAD *st; - - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) { - if (st->st_xprt == NULL && STAILQ_EMPTY(&st->st_reqs)) - return (st); - } - return (NULL); -} - - /* * Get the service thread currently associated with the fhe that is * appropriate to handle this operation. @@ -386,7 +373,7 @@ fha_hash_entry_choose_thread(struct fha_ ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)t", thread, thread->st_reqcount); #endif - } else if ((thread = get_idle_thread(pool))) { + } else if ((thread = LIST_FIRST(&pool->sp_idlethreads))) { #if 0 ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)i", thread, thread->st_reqcount); @@ -418,7 +405,6 @@ SVCTHREAD * fha_assign(SVCTHREAD *this_thread, struct svc_req *req, struct fha_params *softc) { - SVCPOOL *pool; SVCTHREAD *thread; struct fha_info i; struct fha_hash_entry *fhe; @@ -439,7 +425,6 @@ fha_assign(SVCTHREAD *this_thread, struc if (req->rq_vers != 2 && req->rq_vers != 3) return (this_thread); - pool = req->rq_xprt->xp_pool; fha_extract_info(req, &i, cb); /* Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Thu Jan 23 00:40:28 2014 (r261059) +++ stable/9/sys/rpc/svc.c Thu Jan 23 00:41:23 2014 (r261060) @@ -293,12 +293,10 @@ xprt_unregister_locked(SVCXPRT *xprt) { SVCPOOL *pool = xprt->xp_pool; + mtx_assert(&pool->sp_lock, MA_OWNED); KASSERT(xprt->xp_registered == TRUE, ("xprt_unregister_locked: not registered")); - if (xprt->xp_active) { - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); - xprt->xp_active = FALSE; - } + xprt_inactive_locked(xprt); TAILQ_REMOVE(&pool->sp_xlist, xprt, xp_link); xprt->xp_registered = FALSE; } @@ -320,25 +318,25 @@ xprt_unregister(SVCXPRT *xprt) SVC_RELEASE(xprt); } -static void +/* + * Attempt to assign a service thread to this transport. + */ +static int xprt_assignthread(SVCXPRT *xprt) { SVCPOOL *pool = xprt->xp_pool; SVCTHREAD *st; - /* - * Attempt to assign a service thread to this - * transport. - */ - LIST_FOREACH(st, &pool->sp_idlethreads, st_ilink) { - if (st->st_xprt == NULL && STAILQ_EMPTY(&st->st_reqs)) - break; - } + mtx_assert(&pool->sp_lock, MA_OWNED); + st = LIST_FIRST(&pool->sp_idlethreads); if (st) { + LIST_REMOVE(st, st_ilink); + st->st_idle = FALSE; SVC_ACQUIRE(xprt); xprt->xp_thread = st; st->st_xprt = xprt; cv_signal(&st->st_cond); + return (TRUE); } else { /* * See if we can create a new thread. The @@ -354,6 +352,7 @@ xprt_assignthread(SVCXPRT *xprt) pool->sp_state = SVCPOOL_THREADWANTED; } } + return (FALSE); } void @@ -372,9 +371,12 @@ xprt_active(SVCXPRT *xprt) } if (!xprt->xp_active) { - TAILQ_INSERT_TAIL(&pool->sp_active, xprt, xp_alink); xprt->xp_active = TRUE; - xprt_assignthread(xprt); + if (xprt->xp_thread == NULL) { + if (!xprt_assignthread(xprt)) + TAILQ_INSERT_TAIL(&pool->sp_active, xprt, + xp_alink); + } } mtx_unlock(&pool->sp_lock); @@ -385,8 +387,10 @@ xprt_inactive_locked(SVCXPRT *xprt) { SVCPOOL *pool = xprt->xp_pool; + mtx_assert(&pool->sp_lock, MA_OWNED); if (xprt->xp_active) { - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + if (xprt->xp_thread == NULL) + TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); xprt->xp_active = FALSE; } } @@ -950,10 +954,11 @@ svc_assign_waiting_sockets(SVCPOOL *pool { SVCXPRT *xprt; - TAILQ_FOREACH(xprt, &pool->sp_active, xp_alink) { - if (!xprt->xp_thread) { - xprt_assignthread(xprt); - } + while ((xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { + if (xprt_assignthread(xprt)) + TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + else + break; } } @@ -1044,21 +1049,17 @@ svc_run_internal(SVCPOOL *pool, bool_t i * active transport which isn't being serviced * by a thread. */ - if (svc_request_space_available(pool)) { - TAILQ_FOREACH(xprt, &pool->sp_active, - xp_alink) { - if (!xprt->xp_thread) { - SVC_ACQUIRE(xprt); - xprt->xp_thread = st; - st->st_xprt = xprt; - break; - } - } - } - if (st->st_xprt) + if (svc_request_space_available(pool) && + (xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { + TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); + SVC_ACQUIRE(xprt); + xprt->xp_thread = st; + st->st_xprt = xprt; continue; + } LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); + st->st_idle = TRUE; if (ismaster || (!ismaster && pool->sp_threadcount > pool->sp_minthreads)) error = cv_timedwait_sig(&st->st_cond, @@ -1066,7 +1067,10 @@ svc_run_internal(SVCPOOL *pool, bool_t i else error = cv_wait_sig(&st->st_cond, &pool->sp_lock); - LIST_REMOVE(st, st_ilink); + if (st->st_idle) { + LIST_REMOVE(st, st_ilink); + st->st_idle = FALSE; + } /* * Reduce worker thread count when idle. @@ -1134,11 +1138,12 @@ svc_run_internal(SVCPOOL *pool, bool_t i * execute the request * immediately. */ - if (stpref != st) { - cv_signal(&stpref->st_cond); - continue; - } else { + if (stpref == st) break; + if (stpref->st_idle) { + LIST_REMOVE(stpref, st_ilink); + stpref->st_idle = FALSE; + cv_signal(&stpref->st_cond); } } } while (stat == XPRT_MOREREQS @@ -1155,10 +1160,9 @@ svc_run_internal(SVCPOOL *pool, bool_t i xprt->xp_thread = NULL; st->st_xprt = NULL; if (xprt->xp_active) { - xprt_assignthread(xprt); - TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); - TAILQ_INSERT_TAIL(&pool->sp_active, xprt, - xp_alink); + if (!xprt_assignthread(xprt)) + TAILQ_INSERT_TAIL(&pool->sp_active, + xprt, xp_alink); } mtx_unlock(&pool->sp_lock); SVC_RELEASE(xprt); Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Thu Jan 23 00:40:28 2014 (r261059) +++ stable/9/sys/rpc/svc.h Thu Jan 23 00:41:23 2014 (r261060) @@ -278,6 +278,7 @@ typedef struct __rpc_svcthread { SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ int st_reqcount; /* number of queued reqs */ + int st_idle; /* thread is on idle list */ struct cv st_cond; /* sleeping for work */ LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:42:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B935CBC3; Thu, 23 Jan 2014 00:42:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9929016BF; Thu, 23 Jan 2014 00:42:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0g9qu050469; Thu, 23 Jan 2014 00:42:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0g8CY050465; Thu, 23 Jan 2014 00:42:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230042.s0N0g8CY050465@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261061 - in stable/9/sys: fs/nfsserver nfs nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:42:09 -0000 Author: mav Date: Thu Jan 23 00:42:08 2014 New Revision: 261061 URL: http://svnweb.freebsd.org/changeset/base/261061 Log: MFC r259765: Fix RPC server threads file handle affinity to work better with ZFS. Instead of taking 8 specific bytes of file handle to identify file during RPC thread affitinity handling, use trivial hash of the full file handle. ZFS's struct zfid_short does not have padding field after the length field, as result, originally picked 8 bytes are loosing lower 16 bits of object ID, causing many false matches and unneeded requests affinity to same thread. This fix substantially improves NFS server latency and scalability in SPEC NFS benchmark by more flexible use of multiple NFS threads. Modified: stable/9/sys/fs/nfsserver/nfs_fha_new.c stable/9/sys/nfs/nfs_fha.c stable/9/sys/nfs/nfs_fha.h stable/9/sys/nfsserver/nfs_fha_old.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_fha_new.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_fha_new.c Thu Jan 23 00:41:23 2014 (r261060) +++ stable/9/sys/fs/nfsserver/nfs_fha_new.c Thu Jan 23 00:42:08 2014 (r261061) @@ -41,7 +41,7 @@ static void fhanew_init(void *foo); static void fhanew_uninit(void *foo); rpcproc_t fhanew_get_procnum(rpcproc_t procnum); int fhanew_realign(struct mbuf **mb, int malloc_flags); -int fhanew_get_fh(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos); +int fhanew_get_fh(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos); int fhanew_is_read(rpcproc_t procnum); int fhanew_is_write(rpcproc_t procnum); int fhanew_get_offset(struct mbuf **md, caddr_t *dpos, int v3, @@ -128,11 +128,13 @@ fhanew_realign(struct mbuf **mb, int mal } int -fhanew_get_fh(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos) +fhanew_get_fh(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos) { struct nfsrv_descript lnd, *nd; uint32_t *tl; - int error, len; + uint8_t *buf; + uint64_t t; + int error, len, i; error = 0; len = 0; @@ -151,11 +153,13 @@ fhanew_get_fh(fhandle_t *fh, int v3, str len = NFSX_V2FH; } + t = 0; if (len != 0) { - NFSM_DISSECT_NONBLOCK(tl, uint32_t *, len); - bcopy(tl, fh, len); - } else - bzero(fh, sizeof(*fh)); + NFSM_DISSECT_NONBLOCK(buf, uint8_t *, len); + for (i = 0; i < len; i++) + t ^= ((uint64_t)buf[i] << (i & 7) * 8); + } + *fh = t; nfsmout: *md = nd->nd_md; Modified: stable/9/sys/nfs/nfs_fha.c ============================================================================== --- stable/9/sys/nfs/nfs_fha.c Thu Jan 23 00:41:23 2014 (r261060) +++ stable/9/sys/nfs/nfs_fha.c Thu Jan 23 00:42:08 2014 (r261061) @@ -130,7 +130,6 @@ fha_extract_info(struct svc_req *req, st struct fha_callbacks *cb) { struct mbuf *md; - fhandle_t fh; caddr_t dpos; static u_int64_t random_fh = 0; int error; @@ -177,12 +176,10 @@ fha_extract_info(struct svc_req *req, st dpos = mtod(md, caddr_t); /* Grab the filehandle. */ - error = cb->get_fh(&fh, v3, &md, &dpos); + error = cb->get_fh(&i->fh, v3, &md, &dpos); if (error) goto out; - bcopy(fh.fh_fid.fid_data, &i->fh, sizeof(i->fh)); - /* Content ourselves with zero offset for all but reads. */ if (cb->is_read(procnum) || cb->is_write(procnum)) cb->get_offset(&md, &dpos, v3, i); Modified: stable/9/sys/nfs/nfs_fha.h ============================================================================== --- stable/9/sys/nfs/nfs_fha.h Thu Jan 23 00:41:23 2014 (r261060) +++ stable/9/sys/nfs/nfs_fha.h Thu Jan 23 00:42:08 2014 (r261061) @@ -82,7 +82,7 @@ struct fha_info { struct fha_callbacks { rpcproc_t (*get_procnum)(rpcproc_t procnum); int (*realign)(struct mbuf **mb, int malloc_flags); - int (*get_fh)(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos); + int (*get_fh)(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos); int (*is_read)(rpcproc_t procnum); int (*is_write)(rpcproc_t procnum); int (*get_offset)(struct mbuf **md, caddr_t *dpos, int v3, struct Modified: stable/9/sys/nfsserver/nfs_fha_old.c ============================================================================== --- stable/9/sys/nfsserver/nfs_fha_old.c Thu Jan 23 00:41:23 2014 (r261060) +++ stable/9/sys/nfsserver/nfs_fha_old.c Thu Jan 23 00:42:08 2014 (r261061) @@ -49,7 +49,7 @@ static void fhaold_init(void *foo); static void fhaold_uninit(void *foo); rpcproc_t fhaold_get_procnum(rpcproc_t procnum); int fhaold_realign(struct mbuf **mb, int malloc_flags); -int fhaold_get_fh(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos); +int fhaold_get_fh(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos); int fhaold_is_read(rpcproc_t procnum); int fhaold_is_write(rpcproc_t procnum); int fhaold_get_offset(struct mbuf **md, caddr_t *dpos, int v3, @@ -135,9 +135,33 @@ fhaold_realign(struct mbuf **mb, int mal } int -fhaold_get_fh(fhandle_t *fh, int v3, struct mbuf **md, caddr_t *dpos) +fhaold_get_fh(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos) { - return (nfsm_srvmtofh_xx(fh, v3, md, dpos)); + u_int32_t *tl; + uint8_t *buf; + uint64_t t; + int fhlen, i; + + if (v3) { + tl = nfsm_dissect_xx_nonblock(NFSX_UNSIGNED, md, dpos); + if (tl == NULL) + return EBADRPC; + fhlen = fxdr_unsigned(int, *tl); + if (fhlen != 0 && fhlen != NFSX_V3FH) + return EBADRPC; + } else { + fhlen = NFSX_V2FH; + } + t = 0; + if (fhlen != 0) { + buf = nfsm_dissect_xx_nonblock(fhlen, md, dpos); + if (buf == NULL) + return EBADRPC; + for (i = 0; i < fhlen; i++) + t ^= ((uint64_t)buf[i] << (i & 7) * 8); + } + *fh = t; + return 0; } int From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:42:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B9D5D0F; Thu, 23 Jan 2014 00:42:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 56F0F16C9; Thu, 23 Jan 2014 00:42:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0guRO050591; Thu, 23 Jan 2014 00:42:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0guta050590; Thu, 23 Jan 2014 00:42:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230042.s0N0guta050590@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:42:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261062 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:42:56 -0000 Author: mav Date: Thu Jan 23 00:42:55 2014 New Revision: 261062 URL: http://svnweb.freebsd.org/changeset/base/261062 Log: MFC r259828: Fix a bug introduced at r259632, triggering infinite loop in some cases. Modified: stable/9/sys/rpc/svc_vc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc_vc.c ============================================================================== --- stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:42:08 2014 (r261061) +++ stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:42:55 2014 (r261062) @@ -555,7 +555,7 @@ svc_vc_backchannel_stat(SVCXPRT *xprt) * leaving the result in cd->mreq. If we don't have a complete record, leave * the partial result in cd->mreq and try to read more from the socket. */ -static void +static int svc_vc_process_pending(SVCXPRT *xprt) { struct cf_conn *cd = (struct cf_conn *) xprt->xp_p1; @@ -584,7 +584,7 @@ svc_vc_process_pending(SVCXPRT *xprt) } if (n < sizeof(uint32_t)) { so->so_rcv.sb_lowat = sizeof(uint32_t) - n; - return; + return (FALSE); } m_copydata(cd->mpending, 0, sizeof(header), (char *)&header); @@ -620,6 +620,7 @@ svc_vc_process_pending(SVCXPRT *xprt) } so->so_rcv.sb_lowat = imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); + return (TRUE); } static bool_t @@ -642,8 +643,10 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms for (;;) { /* If we have no request ready, check pending queue. */ while (cd->mpending && - (cd->mreq == NULL || cd->resid != 0 || !cd->eor)) - svc_vc_process_pending(xprt); + (cd->mreq == NULL || cd->resid != 0 || !cd->eor)) { + if (!svc_vc_process_pending(xprt)) + break; + } /* Process and return complete request in cd->mreq. */ if (cd->mreq != NULL && cd->resid == 0 && cd->eor) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:43:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6BF1E58; Thu, 23 Jan 2014 00:43:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8721116D4; Thu, 23 Jan 2014 00:43:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0hXMm050790; Thu, 23 Jan 2014 00:43:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0hXn0050789; Thu, 23 Jan 2014 00:43:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230043.s0N0hXn0050789@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261063 - stable/9/sys/fs/nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:43:33 -0000 Author: mav Date: Thu Jan 23 00:43:33 2014 New Revision: 261063 URL: http://svnweb.freebsd.org/changeset/base/261063 Log: MFC r259877: Slightly simplify expiration logic introduced in r254337. - Do not update the histogram for items we are any way deleting from cache. - Do not update the histogram if nfsrc_tcphighwater is not set. - Remove some extra math operations. Modified: stable/9/sys/fs/nfsserver/nfs_nfsdcache.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdcache.c Thu Jan 23 00:42:55 2014 (r261062) +++ stable/9/sys/fs/nfsserver/nfs_nfsdcache.c Thu Jan 23 00:43:33 2014 (r261063) @@ -832,6 +832,7 @@ nfsrvd_cleancache(void) nfsrc_tcpsavedreplies = 0; } +#define HISTSIZE 16 /* * The basic rule is to get rid of entries that are expired. */ @@ -839,7 +840,7 @@ static void nfsrc_trimcache(u_int64_t sockref, struct socket *so) { struct nfsrvcache *rp, *nextrp; - int i, j, k, time_histo[10]; + int i, j, k, tto, time_histo[HISTSIZE]; time_t thisstamp; static time_t udp_lasttrim = 0, tcp_lasttrim = 0; static int onethread = 0; @@ -863,8 +864,9 @@ nfsrc_trimcache(u_int64_t sockref, struc } if (NFSD_MONOSEC != tcp_lasttrim || nfsrc_tcpsavedreplies >= nfsrc_tcphighwater) { - for (i = 0; i < 10; i++) + for (i = 0; i < HISTSIZE; i++) time_histo[i] = 0; + tto = nfsrc_tcptimeout; for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { mtx_lock(&nfsrchash_table[i].mtx); if (i == 0) @@ -874,6 +876,15 @@ nfsrc_trimcache(u_int64_t sockref, struc if (!(rp->rc_flag & (RC_INPROG|RC_LOCKED|RC_WANTED)) && rp->rc_refcnt == 0) { + if ((rp->rc_flag & RC_REFCNT) || + tcp_lasttrim > rp->rc_timestamp || + nfsrc_activesocket(rp, sockref, so)) { + nfsrc_freecache(rp); + continue; + } + + if (nfsrc_tcphighwater == 0) + continue; /* * The timestamps range from roughly the * present (tcp_lasttrim) to the present @@ -881,16 +892,13 @@ nfsrc_trimcache(u_int64_t sockref, struc * histogram of where the timeouts fall. */ j = rp->rc_timestamp - tcp_lasttrim; - if (j >= nfsrc_tcptimeout) - j = nfsrc_tcptimeout - 1; - if (j < 0) + if (j >= tto) + j = HISTSIZE - 1; + else if (j < 0) j = 0; - j = (j * 10 / nfsrc_tcptimeout) % 10; + else + j = j * HISTSIZE / tto; time_histo[j]++; - if ((rp->rc_flag & RC_REFCNT) || - tcp_lasttrim > rp->rc_timestamp || - nfsrc_activesocket(rp, sockref, so)) - nfsrc_freecache(rp); } } mtx_unlock(&nfsrchash_table[i].mtx); @@ -903,12 +911,12 @@ nfsrc_trimcache(u_int64_t sockref, struc * 80% of the nfsrc_tcphighwater. */ k = 0; - for (i = 0; i < 8; i++) { + for (i = 0; i < (HISTSIZE - 2); i++) { k += time_histo[i]; if (k > j) break; } - k = nfsrc_tcptimeout * (i + 1) / 10; + k = tto * (i + 1) / HISTSIZE; if (k < 1) k = 1; thisstamp = tcp_lasttrim + k; From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:44:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 239F9101; Thu, 23 Jan 2014 00:44:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FFBF16E0; Thu, 23 Jan 2014 00:44:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0iEfY050977; Thu, 23 Jan 2014 00:44:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0iEpF050976; Thu, 23 Jan 2014 00:44:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230044.s0N0iEpF050976@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261064 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:44:15 -0000 Author: mav Date: Thu Jan 23 00:44:14 2014 New Revision: 261064 URL: http://svnweb.freebsd.org/changeset/base/261064 Log: MFC r260031: In addition to r259632 completely block receive upcalls if we have more data than we need. This reduces lock pressure from xprt_active() side. Modified: stable/9/sys/rpc/svc_vc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc_vc.c ============================================================================== --- stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:43:33 2014 (r261063) +++ stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:44:14 2014 (r261064) @@ -619,7 +619,15 @@ svc_vc_process_pending(SVCXPRT *xprt) } } - so->so_rcv.sb_lowat = imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); + /* + * Block receive upcalls if we have more data pending, + * otherwise report our need. + */ + if (cd->mpending) + so->so_rcv.sb_lowat = INT_MAX; + else + so->so_rcv.sb_lowat = + imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); return (TRUE); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:44:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7634F263; Thu, 23 Jan 2014 00:44:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 56D8D16EC; Thu, 23 Jan 2014 00:44:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0ikLb051083; Thu, 23 Jan 2014 00:44:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0ijiQ051079; Thu, 23 Jan 2014 00:44:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230044.s0N0ijiQ051079@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261065 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:44:46 -0000 Author: mav Date: Thu Jan 23 00:44:45 2014 New Revision: 261065 URL: http://svnweb.freebsd.org/changeset/base/261065 Log: MFC r260036: Introduce xprt_inactive_self() -- variant for use when sure that port is assigned to thread. For example, withing receive handlers. In that case the function reduces to single assignment and can avoid locking. Modified: stable/9/sys/rpc/svc.c stable/9/sys/rpc/svc.h stable/9/sys/rpc/svc_dg.c stable/9/sys/rpc/svc_vc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Thu Jan 23 00:44:14 2014 (r261064) +++ stable/9/sys/rpc/svc.c Thu Jan 23 00:44:45 2014 (r261065) @@ -406,6 +406,19 @@ xprt_inactive(SVCXPRT *xprt) } /* + * Variant of xprt_inactive() for use only when sure that port is + * assigned to thread. For example, withing receive handlers. + */ +void +xprt_inactive_self(SVCXPRT *xprt) +{ + + KASSERT(xprt->xp_thread != NULL, + ("xprt_inactive_self(%p) with NULL xp_thread", xprt)); + xprt->xp_active = FALSE; +} + +/* * Add a service program to the callout list. * The dispatch routine will be called when a rpc request for this * program number comes in. Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Thu Jan 23 00:44:14 2014 (r261064) +++ stable/9/sys/rpc/svc.h Thu Jan 23 00:44:45 2014 (r261065) @@ -523,6 +523,7 @@ __BEGIN_DECLS extern void xprt_active(SVCXPRT *); extern void xprt_inactive(SVCXPRT *); extern void xprt_inactive_locked(SVCXPRT *); +extern void xprt_inactive_self(SVCXPRT *); __END_DECLS #endif Modified: stable/9/sys/rpc/svc_dg.c ============================================================================== --- stable/9/sys/rpc/svc_dg.c Thu Jan 23 00:44:14 2014 (r261064) +++ stable/9/sys/rpc/svc_dg.c Thu Jan 23 00:44:45 2014 (r261065) @@ -196,10 +196,10 @@ svc_dg_recv(SVCXPRT *xprt, struct rpc_ms * from racing the upcall after our soreadable() call * returns false. */ - mtx_lock(&xprt->xp_pool->sp_lock); + SOCKBUF_LOCK(&xprt->xp_socket->so_rcv); if (!soreadable(xprt->xp_socket)) - xprt_inactive_locked(xprt); - mtx_unlock(&xprt->xp_pool->sp_lock); + xprt_inactive_self(xprt); + SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); sx_xunlock(&xprt->xp_lock); return (FALSE); } @@ -208,7 +208,7 @@ svc_dg_recv(SVCXPRT *xprt, struct rpc_ms SOCKBUF_LOCK(&xprt->xp_socket->so_rcv); soupcall_clear(xprt->xp_socket, SO_RCV); SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); - xprt_inactive(xprt); + xprt_inactive_self(xprt); sx_xunlock(&xprt->xp_lock); return (FALSE); } Modified: stable/9/sys/rpc/svc_vc.c ============================================================================== --- stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:44:14 2014 (r261064) +++ stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:44:45 2014 (r261065) @@ -385,7 +385,7 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st */ ACCEPT_LOCK(); if (TAILQ_EMPTY(&xprt->xp_socket->so_comp)) - xprt_inactive(xprt); + xprt_inactive_self(xprt); ACCEPT_UNLOCK(); sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -398,7 +398,7 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st soupcall_clear(xprt->xp_socket, SO_RCV); } SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); - xprt_inactive(xprt); + xprt_inactive_self(xprt); sx_xunlock(&xprt->xp_lock); return (FALSE); } @@ -667,7 +667,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms if (cd->mreq == NULL || cd->resid != 0) { SOCKBUF_LOCK(&so->so_rcv); if (!soreadable(so)) - xprt_inactive(xprt); + xprt_inactive_self(xprt); SOCKBUF_UNLOCK(&so->so_rcv); } @@ -709,7 +709,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms */ SOCKBUF_LOCK(&so->so_rcv); if (!soreadable(so)) - xprt_inactive(xprt); + xprt_inactive_self(xprt); SOCKBUF_UNLOCK(&so->so_rcv); sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -722,7 +722,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms soupcall_clear(so, SO_RCV); } SOCKBUF_UNLOCK(&so->so_rcv); - xprt_inactive(xprt); + xprt_inactive_self(xprt); cd->strm_stat = XPRT_DIED; sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -732,7 +732,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms /* * EOF - the other end has closed the socket. */ - xprt_inactive(xprt); + xprt_inactive_self(xprt); cd->strm_stat = XPRT_DIED; sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -763,7 +763,7 @@ svc_vc_backchannel_recv(SVCXPRT *xprt, s mtx_lock(&ct->ct_lock); m = cd->mreq; if (m == NULL) { - xprt_inactive(xprt); + xprt_inactive_self(xprt); mtx_unlock(&ct->ct_lock); sx_xunlock(&xprt->xp_lock); return (FALSE); From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:45:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7745E3B3; Thu, 23 Jan 2014 00:45:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 61A1516F5; Thu, 23 Jan 2014 00:45:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0jLVB051253; Thu, 23 Jan 2014 00:45:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0jKqU051249; Thu, 23 Jan 2014 00:45:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230045.s0N0jKqU051249@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261066 - in stable/9/sys: nfs rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:45:21 -0000 Author: mav Date: Thu Jan 23 00:45:20 2014 New Revision: 261066 URL: http://svnweb.freebsd.org/changeset/base/261066 Log: MFC r260097: Move most of NFS file handle affinity code out of the heavily congested global RPC thread pool lock and protect it with own set of locks. On synthetic benchmarks this improves peak NFS request rate by 40%. Modified: stable/9/sys/nfs/nfs_fha.c stable/9/sys/nfs/nfs_fha.h stable/9/sys/rpc/svc.c stable/9/sys/rpc/svc.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/nfs/nfs_fha.c ============================================================================== --- stable/9/sys/nfs/nfs_fha.c Thu Jan 23 00:44:45 2014 (r261065) +++ stable/9/sys/nfs/nfs_fha.c Thu Jan 23 00:45:20 2014 (r261066) @@ -52,13 +52,10 @@ void fha_init(struct fha_params *softc) { char tmpstr[128]; + int i; - /* - * A small hash table to map filehandles to fha_hash_entry - * structures. - */ - softc->g_fha.hashtable = hashinit(256, M_NFS_FHA, - &softc->g_fha.hashmask); + for (i = 0; i < FHA_HASH_SIZE; i++) + mtx_init(&softc->fha_hash[i].mtx, "fhalock", NULL, MTX_DEF); /* * Set the default tuning parameters. @@ -117,8 +114,11 @@ fha_init(struct fha_params *softc) void fha_uninit(struct fha_params *softc) { + int i; + sysctl_ctx_free(&softc->sysctl_ctx); - hashdestroy(softc->g_fha.hashtable, M_NFS_FHA, softc->g_fha.hashmask); + for (i = 0; i < FHA_HASH_SIZE; i++) + mtx_destroy(&softc->fha_hash[i].mtx); } /* @@ -207,8 +207,13 @@ static void fha_hash_entry_destroy(struct fha_hash_entry *e) { - if (e->num_rw + e->num_exclusive) - panic("nonempty fhe"); + mtx_assert(e->mtx, MA_OWNED); + KASSERT(e->num_rw == 0, + ("%d reqs on destroyed fhe %p", e->num_rw, e)); + KASSERT(e->num_exclusive == 0, + ("%d exclusive reqs on destroyed fhe %p", e->num_exclusive, e)); + KASSERT(e->num_threads == 0, + ("%d threads on destroyed fhe %p", e->num_threads, e)); free(e, M_NFS_FHA); } @@ -216,6 +221,7 @@ static void fha_hash_entry_remove(struct fha_hash_entry *e) { + mtx_assert(e->mtx, MA_OWNED); LIST_REMOVE(e, link); fha_hash_entry_destroy(e); } @@ -224,36 +230,22 @@ static struct fha_hash_entry * fha_hash_entry_lookup(struct fha_params *softc, u_int64_t fh) { SVCPOOL *pool; - - pool = *softc->pool; - + struct fha_hash_slot *fhs; struct fha_hash_entry *fhe, *new_fhe; - LIST_FOREACH(fhe, &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], - link) + pool = *softc->pool; + fhs = &softc->fha_hash[fh % FHA_HASH_SIZE]; + new_fhe = fha_hash_entry_new(fh); + new_fhe->mtx = &fhs->mtx; + mtx_lock(&fhs->mtx); + LIST_FOREACH(fhe, &fhs->list, link) if (fhe->fh == fh) break; - if (!fhe) { - /* Allocate a new entry. */ - mtx_unlock(&pool->sp_lock); - new_fhe = fha_hash_entry_new(fh); - mtx_lock(&pool->sp_lock); - - /* Double-check to make sure we still need the new entry. */ - LIST_FOREACH(fhe, - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], link) - if (fhe->fh == fh) - break; - if (!fhe) { - fhe = new_fhe; - LIST_INSERT_HEAD( - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], - fhe, link); - } else - fha_hash_entry_destroy(new_fhe); - } - + fhe = new_fhe; + LIST_INSERT_HEAD(&fhs->list, fhe, link); + } else + fha_hash_entry_destroy(new_fhe); return (fhe); } @@ -261,6 +253,8 @@ static void fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) { + mtx_assert(fhe->mtx, MA_OWNED); + thread->st_p2 = 0; LIST_INSERT_HEAD(&fhe->threads, thread, st_alink); fhe->num_threads++; } @@ -269,6 +263,9 @@ static void fha_hash_entry_remove_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) { + mtx_assert(fhe->mtx, MA_OWNED); + KASSERT(thread->st_p2 == 0, + ("%d reqs on removed thread %p", thread->st_p2, thread)); LIST_REMOVE(thread, st_alink); fhe->num_threads--; } @@ -280,6 +277,7 @@ static void fha_hash_entry_add_op(struct fha_hash_entry *fhe, int locktype, int count) { + mtx_assert(fhe->mtx, MA_OWNED); if (LK_EXCLUSIVE == locktype) fhe->num_exclusive += count; else @@ -306,7 +304,7 @@ fha_hash_entry_choose_thread(struct fha_ pool = *softc->pool; LIST_FOREACH(thread, &fhe->threads, st_alink) { - req_count = thread->st_reqcount; + req_count = thread->st_p2; /* If there are any writes in progress, use the first thread. */ if (fhe->num_exclusive) { @@ -322,7 +320,7 @@ fha_hash_entry_choose_thread(struct fha_ * exceed our per-thread load limit in the process. */ offset1 = i->offset; - offset2 = STAILQ_FIRST(&thread->st_reqs)->rq_p3; + offset2 = thread->st_p3; if (((offset1 >= offset2) && ((offset1 - offset2) < (1 << softc->ctls.bin_shift))) @@ -360,28 +358,11 @@ fha_hash_entry_choose_thread(struct fha_ */ if ((softc->ctls.max_nfsds_per_fh == 0) || (fhe->num_threads < softc->ctls.max_nfsds_per_fh)) { - /* - * We can add a new thread, so try for an idle thread - * first, and fall back to this_thread if none are idle. - */ - if (STAILQ_EMPTY(&this_thread->st_reqs)) { - thread = this_thread; + thread = this_thread; #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)t", thread, thread->st_reqcount); -#endif - } else if ((thread = LIST_FIRST(&pool->sp_idlethreads))) { -#if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)i", thread, thread->st_reqcount); -#endif - } else { - thread = this_thread; -#if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)b", thread, thread->st_reqcount); + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + "fha: %p(%d)t", thread, thread->st_p2); #endif - } fha_hash_entry_add_thread(fhe, thread); } else { /* @@ -411,16 +392,16 @@ fha_assign(SVCTHREAD *this_thread, struc /* Check to see whether we're enabled. */ if (softc->ctls.enable == 0) - return (this_thread); + goto thist; /* * Only do placement if this is an NFS request. */ if (req->rq_prog != NFS_PROG) - return (this_thread); + goto thist; if (req->rq_vers != 2 && req->rq_vers != 3) - return (this_thread); + goto thist; fha_extract_info(req, &i, cb); @@ -440,8 +421,21 @@ fha_assign(SVCTHREAD *this_thread, struc thread = fha_hash_entry_choose_thread(softc, fhe, &i, this_thread); KASSERT(thread, ("fha_assign: NULL thread!")); fha_hash_entry_add_op(fhe, i.locktype, 1); + thread->st_p2++; + thread->st_p3 = i.offset; + + /* + * Grab the pool lock here to not let chosen thread go away before + * the new request inserted to its queue while we drop fhe lock. + */ + mtx_lock(&(*softc->pool)->sp_lock); + mtx_unlock(fhe->mtx); return (thread); +thist: + req->rq_p1 = NULL; + mtx_lock(&(*softc->pool)->sp_lock); + return (this_thread); } /* @@ -452,6 +446,7 @@ void fha_nd_complete(SVCTHREAD *thread, struct svc_req *req) { struct fha_hash_entry *fhe = req->rq_p1; + struct mtx *mtx; /* * This may be called for reqs that didn't go through @@ -460,13 +455,18 @@ fha_nd_complete(SVCTHREAD *thread, struc if (!fhe) return; + mtx = fhe->mtx; + mtx_lock(mtx); fha_hash_entry_add_op(fhe, req->rq_p2, -1); - - if (thread->st_reqcount == 0) { + thread->st_p2--; + KASSERT(thread->st_p2 >= 0, ("Negative request count %d on %p", + thread->st_p2, thread)); + if (thread->st_p2 == 0) { fha_hash_entry_remove_thread(fhe, thread); if (0 == fhe->num_rw + fhe->num_exclusive) fha_hash_entry_remove(fhe); } + mtx_unlock(mtx); } int @@ -489,10 +489,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st } pool = *softc->pool; - mtx_lock(&pool->sp_lock); count = 0; - for (i = 0; i <= softc->g_fha.hashmask; i++) - if (!LIST_EMPTY(&softc->g_fha.hashtable[i])) + for (i = 0; i < FHA_HASH_SIZE; i++) + if (!LIST_EMPTY(&softc->fha_hash[i].list)) count++; if (count == 0) { @@ -500,8 +499,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st goto out; } - for (i = 0; i <= softc->g_fha.hashmask; i++) { - LIST_FOREACH(fhe, &softc->g_fha.hashtable[i], link) { + for (i = 0; i < FHA_HASH_SIZE; i++) { + mtx_lock(&softc->fha_hash[i].mtx); + LIST_FOREACH(fhe, &softc->fha_hash[i].list, link) { sbuf_printf(&sb, "%sfhe %p: {\n", first ? "" : ", ", fhe); sbuf_printf(&sb, " fh: %ju\n", (uintmax_t) fhe->fh); @@ -512,8 +512,7 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st LIST_FOREACH(thread, &fhe->threads, st_alink) { sbuf_printf(&sb, " thread %p offset %ju " "(count %d)\n", thread, - STAILQ_FIRST(&thread->st_reqs)->rq_p3, - thread->st_reqcount); + thread->st_p3, thread->st_p2); } sbuf_printf(&sb, "}"); @@ -525,11 +524,10 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st break; } } + mtx_unlock(&softc->fha_hash[i].mtx); } out: - if (pool) - mtx_unlock(&pool->sp_lock); sbuf_trim(&sb); sbuf_finish(&sb); error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); Modified: stable/9/sys/nfs/nfs_fha.h ============================================================================== --- stable/9/sys/nfs/nfs_fha.h Thu Jan 23 00:44:45 2014 (r261065) +++ stable/9/sys/nfs/nfs_fha.h Thu Jan 23 00:45:20 2014 (r261066) @@ -35,11 +35,7 @@ #define FHA_DEF_MAX_NFSDS_PER_FH 8 #define FHA_DEF_MAX_REQS_PER_NFSD 0 /* Unlimited */ -/* This is the global structure that represents the state of the fha system. */ -struct fha_global { - struct fha_hash_entry_list *hashtable; - u_long hashmask; -}; +#define FHA_HASH_SIZE 251 struct fha_ctls { int enable; @@ -62,6 +58,7 @@ struct fha_ctls { * avoid contention between threads over single files. */ struct fha_hash_entry { + struct mtx *mtx; LIST_ENTRY(fha_hash_entry) link; u_int64_t fh; u_int32_t num_rw; @@ -72,6 +69,11 @@ struct fha_hash_entry { LIST_HEAD(fha_hash_entry_list, fha_hash_entry); +struct fha_hash_slot { + struct fha_hash_entry_list list; + struct mtx mtx; +}; + /* A structure used for passing around data internally. */ struct fha_info { u_int64_t fh; @@ -93,7 +95,7 @@ struct fha_callbacks { }; struct fha_params { - struct fha_global g_fha; + struct fha_hash_slot fha_hash[FHA_HASH_SIZE]; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; struct fha_ctls ctls; Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Thu Jan 23 00:44:45 2014 (r261065) +++ stable/9/sys/rpc/svc.c Thu Jan 23 00:45:20 2014 (r261066) @@ -71,6 +71,8 @@ static struct svc_callout *svc_find(SVCP char *); static void svc_new_thread(SVCPOOL *pool); static void xprt_unregister_locked(SVCXPRT *xprt); +static void svc_change_space_used(SVCPOOL *pool, int delta); +static bool_t svc_request_space_available(SVCPOOL *pool); /* *************** SVCXPRT related stuff **************** */ @@ -373,7 +375,8 @@ xprt_active(SVCXPRT *xprt) if (!xprt->xp_active) { xprt->xp_active = TRUE; if (xprt->xp_thread == NULL) { - if (!xprt_assignthread(xprt)) + if (!svc_request_space_available(pool) || + !xprt_assignthread(xprt)) TAILQ_INSERT_TAIL(&pool->sp_active, xprt, xp_alink); } @@ -967,56 +970,63 @@ svc_assign_waiting_sockets(SVCPOOL *pool { SVCXPRT *xprt; + mtx_lock(&pool->sp_lock); while ((xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { if (xprt_assignthread(xprt)) TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); else break; } + mtx_unlock(&pool->sp_lock); } -static bool_t -svc_request_space_available(SVCPOOL *pool) +static void +svc_change_space_used(SVCPOOL *pool, int delta) { + unsigned int value; - mtx_assert(&pool->sp_lock, MA_OWNED); - - if (pool->sp_space_throttled) { - /* - * Below the low-water yet? If so, assign any waiting sockets. - */ - if (pool->sp_space_used < pool->sp_space_low) { - pool->sp_space_throttled = FALSE; - svc_assign_waiting_sockets(pool); - return TRUE; - } - - return FALSE; - } else { - if (pool->sp_space_used - >= pool->sp_space_high) { + value = atomic_fetchadd_int(&pool->sp_space_used, delta) + delta; + if (delta > 0) { + if (value >= pool->sp_space_high && !pool->sp_space_throttled) { pool->sp_space_throttled = TRUE; pool->sp_space_throttle_count++; - return FALSE; } - - return TRUE; + if (value > pool->sp_space_used_highest) + pool->sp_space_used_highest = value; + } else { + if (value < pool->sp_space_low && pool->sp_space_throttled) { + pool->sp_space_throttled = FALSE; + svc_assign_waiting_sockets(pool); + } } } +static bool_t +svc_request_space_available(SVCPOOL *pool) +{ + + if (pool->sp_space_throttled) + return (FALSE); + return (TRUE); +} + static void svc_run_internal(SVCPOOL *pool, bool_t ismaster) { + struct svc_reqlist reqs; SVCTHREAD *st, *stpref; SVCXPRT *xprt; enum xprt_stat stat; struct svc_req *rqstp; + size_t sz; int error; st = mem_alloc(sizeof(*st)); + st->st_pool = pool; st->st_xprt = NULL; STAILQ_INIT(&st->st_reqs); cv_init(&st->st_cond, "rpcsvc"); + STAILQ_INIT(&reqs); mtx_lock(&pool->sp_lock); LIST_INSERT_HEAD(&pool->sp_threads, st, st_link); @@ -1110,15 +1120,14 @@ svc_run_internal(SVCPOOL *pool, bool_t i * RPCs. */ xprt->xp_lastactive = time_uptime; - stat = XPRT_IDLE; do { + mtx_unlock(&pool->sp_lock); if (!svc_request_space_available(pool)) break; rqstp = NULL; - mtx_unlock(&pool->sp_lock); stat = svc_getreq(xprt, &rqstp); - mtx_lock(&pool->sp_lock); if (rqstp) { + svc_change_space_used(pool, rqstp->rq_size); /* * See if the application has * a preference for some other @@ -1128,17 +1137,12 @@ svc_run_internal(SVCPOOL *pool, bool_t i if (pool->sp_assign) stpref = pool->sp_assign(st, rqstp); + else + mtx_lock(&pool->sp_lock); - pool->sp_space_used += - rqstp->rq_size; - if (pool->sp_space_used - > pool->sp_space_used_highest) - pool->sp_space_used_highest = - pool->sp_space_used; rqstp->rq_thread = stpref; STAILQ_INSERT_TAIL(&stpref->st_reqs, rqstp, rq_link); - stpref->st_reqcount++; /* * If we assigned the request @@ -1158,7 +1162,8 @@ svc_run_internal(SVCPOOL *pool, bool_t i stpref->st_idle = FALSE; cv_signal(&stpref->st_cond); } - } + } else + mtx_lock(&pool->sp_lock); } while (stat == XPRT_MOREREQS && pool->sp_state != SVCPOOL_CLOSING); @@ -1173,25 +1178,30 @@ svc_run_internal(SVCPOOL *pool, bool_t i xprt->xp_thread = NULL; st->st_xprt = NULL; if (xprt->xp_active) { - if (!xprt_assignthread(xprt)) + if (!svc_request_space_available(pool) || + !xprt_assignthread(xprt)) TAILQ_INSERT_TAIL(&pool->sp_active, xprt, xp_alink); } + STAILQ_CONCAT(&reqs, &st->st_reqs); mtx_unlock(&pool->sp_lock); SVC_RELEASE(xprt); - mtx_lock(&pool->sp_lock); + } else { + STAILQ_CONCAT(&reqs, &st->st_reqs); + mtx_unlock(&pool->sp_lock); } /* * Execute what we have queued. */ - while ((rqstp = STAILQ_FIRST(&st->st_reqs)) != NULL) { - size_t sz = rqstp->rq_size; - mtx_unlock(&pool->sp_lock); + sz = 0; + while ((rqstp = STAILQ_FIRST(&reqs)) != NULL) { + STAILQ_REMOVE_HEAD(&reqs, rq_link); + sz += rqstp->rq_size; svc_executereq(rqstp); - mtx_lock(&pool->sp_lock); - pool->sp_space_used -= sz; } + svc_change_space_used(pool, -sz); + mtx_lock(&pool->sp_lock); } if (st->st_xprt) { @@ -1311,24 +1321,13 @@ void svc_freereq(struct svc_req *rqstp) { SVCTHREAD *st; - SVCXPRT *xprt; SVCPOOL *pool; st = rqstp->rq_thread; - xprt = rqstp->rq_xprt; - if (xprt) - pool = xprt->xp_pool; - else - pool = NULL; if (st) { - mtx_lock(&pool->sp_lock); - KASSERT(rqstp == STAILQ_FIRST(&st->st_reqs), - ("Freeing request out of order")); - STAILQ_REMOVE_HEAD(&st->st_reqs, rq_link); - st->st_reqcount--; + pool = st->st_pool; if (pool->sp_done) pool->sp_done(st, rqstp); - mtx_unlock(&pool->sp_lock); } if (rqstp->rq_auth.svc_ah_ops) Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Thu Jan 23 00:44:45 2014 (r261065) +++ stable/9/sys/rpc/svc.h Thu Jan 23 00:45:20 2014 (r261066) @@ -275,14 +275,16 @@ STAILQ_HEAD(svc_reqlist, svc_req); * thread to read and execute pending RPCs. */ typedef struct __rpc_svcthread { + struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ - int st_reqcount; /* number of queued reqs */ int st_idle; /* thread is on idle list */ struct cv st_cond; /* sleeping for work */ LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ LIST_ENTRY(__rpc_svcthread) st_alink; /* application thread list */ + int st_p2; /* application workspace */ + uint64_t st_p3; /* application workspace */ } SVCTHREAD; LIST_HEAD(svcthread_list, __rpc_svcthread); From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 00:46:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E13754F9; Thu, 23 Jan 2014 00:46:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB32116FF; Thu, 23 Jan 2014 00:46:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N0kVY9051433; Thu, 23 Jan 2014 00:46:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N0kTcI051423; Thu, 23 Jan 2014 00:46:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401230046.s0N0kTcI051423@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 00:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261067 - in stable/9/sys: fs/nfs fs/nfsserver rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:46:32 -0000 Author: mav Date: Thu Jan 23 00:46:29 2014 New Revision: 261067 URL: http://svnweb.freebsd.org/changeset/base/261067 Log: MFC r260229, r260258, r260367, r260390, r260459, r260648: Rework NFS Duplicate Request Cache cleanup logic. - Introduce additional hash to group requests by hash of sockref. This allows to process TCP acknowledgements without looping though all the cache, and as result allows to do it every time. - Indroduce additional callbacks to notify application layer about sockets disconnection. Without this last few requests processed just before socket disconnection never processed their ACKs and stuck in cache for many hours. - Implement transport-specific method for tracking reply acknowledgements. New implementation does not cross multiple stack layers to get the data and does not have race conditions that previously made some requests stuck in cache. This could be done more efficiently at sockbuf layer, but that would broke some KBIs, while I don't know other consumers for it aside NFS. - Instead of traversing all DRC twice per request, run cleaning only once per request, and except in some conditions traverse only single hash slot at a time. Together this limits NFS DRC growth only to situations of real connectivity problems. If network is working well, and so all replies are acknowledged, cache remains almost empty even after hours of heavy load. Without this change on the same test cache was growing to many thousand requests even with perfectly working local network. As another result this reduces CPU time spent on the DRC handling during SPEC NFS benchmark from about 10% to 0.5%. Sponsored by: iXsystems, Inc. Modified: stable/9/sys/fs/nfs/nfs_var.h stable/9/sys/fs/nfs/nfsrvcache.h stable/9/sys/fs/nfsserver/nfs_nfsdcache.c stable/9/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/9/sys/fs/nfsserver/nfs_nfsdport.c stable/9/sys/fs/nfsserver/nfs_nfsdsubs.c stable/9/sys/rpc/svc.c stable/9/sys/rpc/svc.h stable/9/sys/rpc/svc_dg.c stable/9/sys/rpc/svc_vc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/9/sys/fs/nfs/nfs_var.h Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/fs/nfs/nfs_var.h Thu Jan 23 00:46:29 2014 (r261067) @@ -215,14 +215,14 @@ void nfsrvd_dorpc(struct nfsrv_descript /* nfs_nfsdcache.c */ void nfsrvd_initcache(void); -int nfsrvd_getcache(struct nfsrv_descript *, struct socket *); -struct nfsrvcache *nfsrvd_updatecache(struct nfsrv_descript *, - struct socket *); -void nfsrvd_sentcache(struct nfsrvcache *, struct socket *, int); +int nfsrvd_getcache(struct nfsrv_descript *); +struct nfsrvcache *nfsrvd_updatecache(struct nfsrv_descript *); +void nfsrvd_sentcache(struct nfsrvcache *, int, uint32_t); void nfsrvd_cleancache(void); void nfsrvd_refcache(struct nfsrvcache *); void nfsrvd_derefcache(struct nfsrvcache *); void nfsrvd_delcache(struct nfsrvcache *); +void nfsrc_trimcache(uint64_t, uint32_t, int); /* nfs_commonsubs.c */ void newnfs_init(void); @@ -316,9 +316,6 @@ int nfsd_checkrootexp(struct nfsrv_descr void nfscl_retopts(struct nfsmount *, char *, size_t); /* nfs_commonport.c */ -int nfsrv_checksockseqnum(struct socket *, tcp_seq); -int nfsrv_getsockseqnum(struct socket *, tcp_seq *); -int nfsrv_getsocksndseq(struct socket *, tcp_seq *, tcp_seq *); int nfsrv_lookupfilename(struct nameidata *, char *, NFSPROC_T *); void nfsrv_object_create(vnode_t, NFSPROC_T *); int nfsrv_mallocmget_limit(void); Modified: stable/9/sys/fs/nfs/nfsrvcache.h ============================================================================== --- stable/9/sys/fs/nfs/nfsrvcache.h Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/fs/nfs/nfsrvcache.h Thu Jan 23 00:46:29 2014 (r261067) @@ -46,6 +46,7 @@ /* Cache table entry. */ struct nfsrvcache { LIST_ENTRY(nfsrvcache) rc_hash; /* Hash chain */ + LIST_ENTRY(nfsrvcache) rc_ahash; /* ACK hash chain */ TAILQ_ENTRY(nfsrvcache) rc_lru; /* UDP lru chain */ u_int32_t rc_xid; /* rpc id number */ time_t rc_timestamp; /* Time done */ @@ -64,6 +65,7 @@ struct nfsrvcache { int16_t refcnt; u_int16_t cksum; time_t cachetime; + int acked; } ot; } rc_un2; u_int16_t rc_proc; /* rpc proc number */ @@ -81,6 +83,13 @@ struct nfsrvcache { #define rc_reqlen rc_un2.ot.len #define rc_cksum rc_un2.ot.cksum #define rc_cachetime rc_un2.ot.cachetime +#define rc_acked rc_un2.ot.acked + +/* TCP ACK values */ +#define RC_NO_SEQ 0 +#define RC_NO_ACK 1 +#define RC_ACK 2 +#define RC_NACK 3 /* Return values */ #define RC_DROPIT 0 @@ -95,7 +104,6 @@ struct nfsrvcache { #define RC_UDP 0x0010 #define RC_INETIPV6 0x0020 #define RC_INPROG 0x0040 -#define RC_TCPSEQ 0x0080 #define RC_NFSV2 0x0100 #define RC_NFSV3 0x0200 #define RC_NFSV4 0x0400 Modified: stable/9/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdcache.c Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/fs/nfsserver/nfs_nfsdcache.c Thu Jan 23 00:46:29 2014 (r261067) @@ -162,6 +162,7 @@ __FBSDID("$FreeBSD$"); extern struct nfsstats newnfsstats; extern struct mtx nfsrc_udpmtx; extern struct nfsrchash_bucket nfsrchash_table[NFSRVCACHE_HASHSIZE]; +extern struct nfsrchash_bucket nfsrcahash_table[NFSRVCACHE_HASHSIZE]; int nfsrc_floodlevel = NFSRVCACHE_FLOODLEVEL, nfsrc_tcpsavedreplies = 0; #endif /* !APPLEKEXT */ @@ -238,6 +239,7 @@ static int newnfsv2_procid[NFS_V3NPROCS] (&nfsrvudphashtbl[nfsrc_hash(xid)]) #define NFSRCHASH(xid) \ (&nfsrchash_table[nfsrc_hash(xid)].tbl) +#define NFSRCAHASH(xid) (&nfsrcahash_table[nfsrc_hash(xid)]) #define TRUE 1 #define FALSE 0 #define NFSRVCACHE_CHECKLEN 100 @@ -281,9 +283,6 @@ static void nfsrc_lock(struct nfsrvcache static void nfsrc_unlock(struct nfsrvcache *rp); static void nfsrc_wanted(struct nfsrvcache *rp); static void nfsrc_freecache(struct nfsrvcache *rp); -static void nfsrc_trimcache(u_int64_t, struct socket *); -static int nfsrc_activesocket(struct nfsrvcache *rp, u_int64_t, - struct socket *); static int nfsrc_getlenandcksum(mbuf_t m1, u_int16_t *cksum); static void nfsrc_marksametcpconn(u_int64_t); @@ -314,6 +313,7 @@ nfsrvd_initcache(void) for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { LIST_INIT(&nfsrvudphashtbl[i]); LIST_INIT(&nfsrchash_table[i].tbl); + LIST_INIT(&nfsrcahash_table[i].tbl); } TAILQ_INIT(&nfsrvudplru); nfsrc_tcpsavedreplies = 0; @@ -325,10 +325,9 @@ nfsrvd_initcache(void) /* * Get a cache entry for this request. Basically just malloc a new one * and then call nfsrc_getudp() or nfsrc_gettcp() to do the rest. - * Call nfsrc_trimcache() to clean up the cache before returning. */ APPLESTATIC int -nfsrvd_getcache(struct nfsrv_descript *nd, struct socket *so) +nfsrvd_getcache(struct nfsrv_descript *nd) { struct nfsrvcache *newrp; int ret; @@ -356,7 +355,6 @@ nfsrvd_getcache(struct nfsrv_descript *n } else { ret = nfsrc_gettcp(nd, newrp); } - nfsrc_trimcache(nd->nd_sockref, so); NFSEXITCODE2(0, nd); return (ret); } @@ -456,7 +454,7 @@ out: * Update a request cache entry after the rpc has been done */ APPLESTATIC struct nfsrvcache * -nfsrvd_updatecache(struct nfsrv_descript *nd, struct socket *so) +nfsrvd_updatecache(struct nfsrv_descript *nd) { struct nfsrvcache *rp; struct nfsrvcache *retrp = NULL; @@ -549,7 +547,6 @@ nfsrvd_updatecache(struct nfsrv_descript } out: - nfsrc_trimcache(nd->nd_sockref, so); NFSEXITCODE2(0, nd); return (retrp); } @@ -575,29 +572,23 @@ nfsrvd_delcache(struct nfsrvcache *rp) /* * Called after nfsrvd_updatecache() once the reply is sent, to update - * the entry for nfsrc_activesocket() and unlock it. The argument is + * the entry's sequence number and unlock it. The argument is * the pointer returned by nfsrvd_updatecache(). */ APPLESTATIC void -nfsrvd_sentcache(struct nfsrvcache *rp, struct socket *so, int err) +nfsrvd_sentcache(struct nfsrvcache *rp, int have_seq, uint32_t seq) { - tcp_seq tmp_seq; - struct mtx *mutex; + struct nfsrchash_bucket *hbp; - mutex = nfsrc_cachemutex(rp); - if (!(rp->rc_flag & RC_LOCKED)) - panic("nfsrvd_sentcache not locked"); - if (!err) { - if ((so->so_proto->pr_domain->dom_family != AF_INET && - so->so_proto->pr_domain->dom_family != AF_INET6) || - so->so_proto->pr_protocol != IPPROTO_TCP) - panic("nfs sent cache"); - if (nfsrv_getsockseqnum(so, &tmp_seq)) { - mtx_lock(mutex); - rp->rc_tcpseq = tmp_seq; - rp->rc_flag |= RC_TCPSEQ; - mtx_unlock(mutex); - } + KASSERT(rp->rc_flag & RC_LOCKED, ("nfsrvd_sentcache not locked")); + if (have_seq) { + hbp = NFSRCAHASH(rp->rc_sockref); + mtx_lock(&hbp->mtx); + rp->rc_tcpseq = seq; + if (rp->rc_acked != RC_NO_ACK) + LIST_INSERT_HEAD(&hbp->tbl, rp, rc_ahash); + rp->rc_acked = RC_NO_ACK; + mtx_unlock(&hbp->mtx); } nfsrc_unlock(rp); } @@ -790,11 +781,18 @@ nfsrc_wanted(struct nfsrvcache *rp) static void nfsrc_freecache(struct nfsrvcache *rp) { + struct nfsrchash_bucket *hbp; LIST_REMOVE(rp, rc_hash); if (rp->rc_flag & RC_UDP) { TAILQ_REMOVE(&nfsrvudplru, rp, rc_lru); nfsrc_udpcachesize--; + } else if (rp->rc_acked != RC_NO_SEQ) { + hbp = NFSRCAHASH(rp->rc_sockref); + mtx_lock(&hbp->mtx); + if (rp->rc_acked == RC_NO_ACK) + LIST_REMOVE(rp, rc_ahash); + mtx_unlock(&hbp->mtx); } nfsrc_wanted(rp); if (rp->rc_flag & RC_REPMBUF) { @@ -836,14 +834,32 @@ nfsrvd_cleancache(void) /* * The basic rule is to get rid of entries that are expired. */ -static void -nfsrc_trimcache(u_int64_t sockref, struct socket *so) +void +nfsrc_trimcache(u_int64_t sockref, uint32_t snd_una, int final) { + struct nfsrchash_bucket *hbp; struct nfsrvcache *rp, *nextrp; - int i, j, k, tto, time_histo[HISTSIZE]; + int force, lastslot, i, j, k, tto, time_histo[HISTSIZE]; time_t thisstamp; static time_t udp_lasttrim = 0, tcp_lasttrim = 0; - static int onethread = 0; + static int onethread = 0, oneslot = 0; + + if (sockref != 0) { + hbp = NFSRCAHASH(sockref); + mtx_lock(&hbp->mtx); + LIST_FOREACH_SAFE(rp, &hbp->tbl, rc_ahash, nextrp) { + if (sockref == rp->rc_sockref) { + if (SEQ_GEQ(snd_una, rp->rc_tcpseq)) { + rp->rc_acked = RC_ACK; + LIST_REMOVE(rp, rc_ahash); + } else if (final) { + rp->rc_acked = RC_NACK; + LIST_REMOVE(rp, rc_ahash); + } + } + } + mtx_unlock(&hbp->mtx); + } if (atomic_cmpset_acq_int(&onethread, 0, 1) == 0) return; @@ -864,13 +880,28 @@ nfsrc_trimcache(u_int64_t sockref, struc } if (NFSD_MONOSEC != tcp_lasttrim || nfsrc_tcpsavedreplies >= nfsrc_tcphighwater) { - for (i = 0; i < HISTSIZE; i++) - time_histo[i] = 0; + force = nfsrc_tcphighwater / 4; + if (force > 0 && + nfsrc_tcpsavedreplies + force >= nfsrc_tcphighwater) { + for (i = 0; i < HISTSIZE; i++) + time_histo[i] = 0; + i = 0; + lastslot = NFSRVCACHE_HASHSIZE - 1; + } else { + force = 0; + if (NFSD_MONOSEC != tcp_lasttrim) { + i = 0; + lastslot = NFSRVCACHE_HASHSIZE - 1; + } else { + lastslot = i = oneslot; + if (++oneslot >= NFSRVCACHE_HASHSIZE) + oneslot = 0; + } + } tto = nfsrc_tcptimeout; - for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { + tcp_lasttrim = NFSD_MONOSEC; + for (; i <= lastslot; i++) { mtx_lock(&nfsrchash_table[i].mtx); - if (i == 0) - tcp_lasttrim = NFSD_MONOSEC; LIST_FOREACH_SAFE(rp, &nfsrchash_table[i].tbl, rc_hash, nextrp) { if (!(rp->rc_flag & @@ -878,12 +909,12 @@ nfsrc_trimcache(u_int64_t sockref, struc && rp->rc_refcnt == 0) { if ((rp->rc_flag & RC_REFCNT) || tcp_lasttrim > rp->rc_timestamp || - nfsrc_activesocket(rp, sockref, so)) { + rp->rc_acked == RC_ACK) { nfsrc_freecache(rp); continue; } - if (nfsrc_tcphighwater == 0) + if (force == 0) continue; /* * The timestamps range from roughly the @@ -903,8 +934,7 @@ nfsrc_trimcache(u_int64_t sockref, struc } mtx_unlock(&nfsrchash_table[i].mtx); } - j = nfsrc_tcphighwater / 5; /* 20% of it */ - if (j > 0 && (nfsrc_tcpsavedreplies + j) > nfsrc_tcphighwater) { + if (force) { /* * Trim some more with a smaller timeout of as little * as 20% of nfsrc_tcptimeout to try and get below @@ -913,7 +943,7 @@ nfsrc_trimcache(u_int64_t sockref, struc k = 0; for (i = 0; i < (HISTSIZE - 2); i++) { k += time_histo[i]; - if (k > j) + if (k > force) break; } k = tto * (i + 1) / HISTSIZE; @@ -929,8 +959,7 @@ nfsrc_trimcache(u_int64_t sockref, struc && rp->rc_refcnt == 0 && ((rp->rc_flag & RC_REFCNT) || thisstamp > rp->rc_timestamp || - nfsrc_activesocket(rp, sockref, - so))) + rp->rc_acked == RC_ACK)) nfsrc_freecache(rp); } mtx_unlock(&nfsrchash_table[i].mtx); @@ -975,28 +1004,6 @@ nfsrvd_derefcache(struct nfsrvcache *rp) } /* - * Check to see if the socket is active. - * Return 1 if the reply has been received/acknowledged by the client, - * 0 otherwise. - * XXX - Uses tcp internals. - */ -static int -nfsrc_activesocket(struct nfsrvcache *rp, u_int64_t cur_sockref, - struct socket *cur_so) -{ - int ret = 0; - - if (!(rp->rc_flag & RC_TCPSEQ)) - return (ret); - /* - * If the sockref is the same, it is the same TCP connection. - */ - if (cur_sockref == rp->rc_sockref) - ret = nfsrv_checksockseqnum(cur_so, rp->rc_tcpseq); - return (ret); -} - -/* * Calculate the length of the mbuf list and a checksum on the first up to * NFSRVCACHE_CHECKLEN bytes. */ Modified: stable/9/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Jan 23 00:46:29 2014 (r261067) @@ -97,8 +97,8 @@ static int nfs_maxvers = NFS_VER4; SYSCTL_INT(_vfs_nfsd, OID_AUTO, server_max_nfsvers, CTLFLAG_RW, &nfs_maxvers, 0, "The highest version of NFS handled by the server"); -static int nfs_proc(struct nfsrv_descript *, u_int32_t, struct socket *, - u_int64_t, struct nfsrvcache **); +static int nfs_proc(struct nfsrv_descript *, u_int32_t, SVCXPRT *xprt, + struct nfsrvcache **); extern u_long sb_max_adj; extern int newnfs_numnfsd; @@ -251,8 +251,7 @@ nfssvc_program(struct svc_req *rqst, SVC } } - cacherep = nfs_proc(&nd, rqst->rq_xid, xprt->xp_socket, - xprt->xp_sockref, &rp); + cacherep = nfs_proc(&nd, rqst->rq_xid, xprt, &rp); NFSLOCKV4ROOTMUTEX(); nfsv4_relref(&nfsd_suspend_lock); NFSUNLOCKV4ROOTMUTEX(); @@ -287,8 +286,10 @@ nfssvc_program(struct svc_req *rqst, SVC } else if (!svc_sendreply_mbuf(rqst, nd.nd_mreq)) { svcerr_systemerr(rqst); } - if (rp != NULL) - nfsrvd_sentcache(rp, xprt->xp_socket, 0); + if (rp != NULL) { + nfsrvd_sentcache(rp, (rqst->rq_reply_seq != 0 || + SVC_ACK(xprt, NULL)), rqst->rq_reply_seq); + } svc_freereq(rqst); out: @@ -300,11 +301,12 @@ out: * Return the appropriate cache response. */ static int -nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, struct socket *so, - u_int64_t sockref, struct nfsrvcache **rpp) +nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, SVCXPRT *xprt, + struct nfsrvcache **rpp) { struct thread *td = curthread; int cacherep = RC_DOIT, isdgram; + uint32_t ack; *rpp = NULL; if (nd->nd_nam2 == NULL) { @@ -336,8 +338,11 @@ nfs_proc(struct nfsrv_descript *nd, u_in nd->nd_flag |= ND_SAMETCPCONN; nd->nd_retxid = xid; nd->nd_tcpconntime = NFSD_MONOSEC; - nd->nd_sockref = sockref; - cacherep = nfsrvd_getcache(nd, so); + nd->nd_sockref = xprt->xp_sockref; + cacherep = nfsrvd_getcache(nd); + ack = 0; + SVC_ACK(xprt, &ack); + nfsrc_trimcache(xprt->xp_sockref, ack, 0); } /* @@ -352,13 +357,23 @@ nfs_proc(struct nfsrv_descript *nd, u_in cacherep = RC_DROPIT; else cacherep = RC_REPLY; - *rpp = nfsrvd_updatecache(nd, so); + *rpp = nfsrvd_updatecache(nd); } NFSEXITCODE2(0, nd); return (cacherep); } +static void +nfssvc_loss(SVCXPRT *xprt) +{ + uint32_t ack; + + ack = 0; + SVC_ACK(xprt, &ack); + nfsrc_trimcache(xprt->xp_sockref, ack, 1); +} + /* * Adds a socket to the list for servicing by nfsds. */ @@ -399,6 +414,8 @@ nfsrvd_addsock(struct file *fp) if (nfs_maxvers >= NFS_VER4) svc_reg(xprt, NFS_PROG, NFS_VER4, nfssvc_program, NULL); + if (so->so_type == SOCK_STREAM) + svc_loss_reg(xprt, nfssvc_loss); SVC_RELEASE(xprt); } Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Jan 23 00:46:29 2014 (r261067) @@ -61,6 +61,7 @@ extern struct nfsv4lock nfsd_suspend_loc struct vfsoptlist nfsv4root_opt, nfsv4root_newopt; NFSDLOCKMUTEX; struct nfsrchash_bucket nfsrchash_table[NFSRVCACHE_HASHSIZE]; +struct nfsrchash_bucket nfsrcahash_table[NFSRVCACHE_HASHSIZE]; struct mtx nfsrc_udpmtx; struct mtx nfs_v4root_mutex; struct nfsrvfh nfs_rootfh, nfs_pubfh; @@ -2894,40 +2895,6 @@ out: } /* - * Get the tcp socket sequence numbers we need. - * (Maybe this should be moved to the tcp sources?) - */ -int -nfsrv_getsocksndseq(struct socket *so, tcp_seq *maxp, tcp_seq *unap) -{ - struct inpcb *inp; - struct tcpcb *tp; - int error = 0; - - inp = sotoinpcb(so); - KASSERT(inp != NULL, ("nfsrv_getsocksndseq: inp == NULL")); - INP_RLOCK(inp); - if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { - INP_RUNLOCK(inp); - error = EPIPE; - goto out; - } - tp = intotcpcb(inp); - if (tp->t_state != TCPS_ESTABLISHED) { - INP_RUNLOCK(inp); - error = EPIPE; - goto out; - } - *maxp = tp->snd_max; - *unap = tp->snd_una; - INP_RUNLOCK(inp); - -out: - NFSEXITCODE(error); - return (error); -} - -/* * This function needs to test to see if the system is near its limit * for memory allocation via malloc() or mget() and return True iff * either of these resources are near their limit. @@ -3350,6 +3317,11 @@ nfsd_modevent(module_t mod, int type, vo i); mtx_init(&nfsrchash_table[i].mtx, nfsrchash_table[i].lock_name, NULL, MTX_DEF); + snprintf(nfsrcahash_table[i].lock_name, + sizeof(nfsrcahash_table[i].lock_name), "nfsrc_tcpa%d", + i); + mtx_init(&nfsrcahash_table[i].mtx, + nfsrcahash_table[i].lock_name, NULL, MTX_DEF); } mtx_init(&nfsrc_udpmtx, "nfs_udpcache_mutex", NULL, MTX_DEF); mtx_init(&nfs_v4root_mutex, "nfs_v4root_mutex", NULL, MTX_DEF); @@ -3395,8 +3367,10 @@ nfsd_modevent(module_t mod, int type, vo svcpool_destroy(nfsrvd_pool); /* and get rid of the locks */ - for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) + for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { mtx_destroy(&nfsrchash_table[i].mtx); + mtx_destroy(&nfsrcahash_table[i].mtx); + } mtx_destroy(&nfsrc_udpmtx); mtx_destroy(&nfs_v4root_mutex); mtx_destroy(&nfsv4root_mnt.mnt_mtx); Modified: stable/9/sys/fs/nfsserver/nfs_nfsdsubs.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdsubs.c Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/fs/nfsserver/nfs_nfsdsubs.c Thu Jan 23 00:46:29 2014 (r261067) @@ -1987,47 +1987,6 @@ nfsmout: return (error); } -/* - * Check the tcp socket sequence number has been acknowledged. - */ -int -nfsrv_checksockseqnum(struct socket *so, tcp_seq tcpseqval) -{ - tcp_seq maxseq, unaseq; - int error, ret; - - error = nfsrv_getsocksndseq(so, &maxseq, &unaseq); - if (error) - return (0); - ret = SEQ_GEQ(unaseq, tcpseqval); - return (ret); -} - -/* - * Get the tcp sequence number to be acknowledged. - */ -int -nfsrv_getsockseqnum(struct socket *so, tcp_seq *tcpseqp) -{ - tcp_seq maxseq, unaseq; - u_int sbcc; - int error; - - sbcc = so->so_snd.sb_cc; - error = nfsrv_getsocksndseq(so, &maxseq, &unaseq); - if (error) - return (0); - /* - * Set the seq# to a value that will - * be at least the end of the reply. - * When this sequence# is acknowledged - * by the client, the client has received - * the reply. - */ - *tcpseqp = sbcc + maxseq; - return (1); -} - void nfsd_init(void) { Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/rpc/svc.c Thu Jan 23 00:46:29 2014 (r261067) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -93,6 +94,7 @@ svcpool_create(const char *name, struct TAILQ_INIT(&pool->sp_xlist); TAILQ_INIT(&pool->sp_active); TAILQ_INIT(&pool->sp_callouts); + TAILQ_INIT(&pool->sp_lcallouts); LIST_INIT(&pool->sp_threads); LIST_INIT(&pool->sp_idlethreads); pool->sp_minthreads = 1; @@ -158,6 +160,7 @@ svcpool_destroy(SVCPOOL *pool) { SVCXPRT *xprt, *nxprt; struct svc_callout *s; + struct svc_loss_callout *sl; struct svcxprt_list cleanup; TAILQ_INIT(&cleanup); @@ -169,12 +172,16 @@ svcpool_destroy(SVCPOOL *pool) TAILQ_INSERT_TAIL(&cleanup, xprt, xp_link); } - while (TAILQ_FIRST(&pool->sp_callouts)) { - s = TAILQ_FIRST(&pool->sp_callouts); + while ((s = TAILQ_FIRST(&pool->sp_callouts)) != NULL) { mtx_unlock(&pool->sp_lock); svc_unreg(pool, s->sc_prog, s->sc_vers); mtx_lock(&pool->sp_lock); } + while ((sl = TAILQ_FIRST(&pool->sp_lcallouts)) != NULL) { + mtx_unlock(&pool->sp_lock); + svc_loss_unreg(pool, sl->slc_dispatch); + mtx_lock(&pool->sp_lock); + } mtx_unlock(&pool->sp_lock); TAILQ_FOREACH_SAFE(xprt, &cleanup, xp_link, nxprt) { @@ -511,6 +518,55 @@ svc_unreg(SVCPOOL *pool, const rpcprog_t mtx_unlock(&pool->sp_lock); } +/* + * Add a service connection loss program to the callout list. + * The dispatch routine will be called when some port in ths pool die. + */ +bool_t +svc_loss_reg(SVCXPRT *xprt, void (*dispatch)(SVCXPRT *)) +{ + SVCPOOL *pool = xprt->xp_pool; + struct svc_loss_callout *s; + + mtx_lock(&pool->sp_lock); + TAILQ_FOREACH(s, &pool->sp_lcallouts, slc_link) { + if (s->slc_dispatch == dispatch) + break; + } + if (s != NULL) { + mtx_unlock(&pool->sp_lock); + return (TRUE); + } + s = malloc(sizeof (struct svc_callout), M_RPC, M_NOWAIT); + if (s == NULL) { + mtx_unlock(&pool->sp_lock); + return (FALSE); + } + s->slc_dispatch = dispatch; + TAILQ_INSERT_TAIL(&pool->sp_lcallouts, s, slc_link); + mtx_unlock(&pool->sp_lock); + return (TRUE); +} + +/* + * Remove a service connection loss program from the callout list. + */ +void +svc_loss_unreg(SVCPOOL *pool, void (*dispatch)(SVCXPRT *)) +{ + struct svc_loss_callout *s; + + mtx_lock(&pool->sp_lock); + TAILQ_FOREACH(s, &pool->sp_lcallouts, slc_link) { + if (s->slc_dispatch == dispatch) { + TAILQ_REMOVE(&pool->sp_lcallouts, s, slc_link); + free(s, M_RPC); + break; + } + } + mtx_unlock(&pool->sp_lock); +} + /* ********************** CALLOUT list related stuff ************* */ /* @@ -554,7 +610,7 @@ svc_sendreply_common(struct svc_req *rqs if (!SVCAUTH_WRAP(&rqstp->rq_auth, &body)) return (FALSE); - ok = SVC_REPLY(xprt, rply, rqstp->rq_addr, body); + ok = SVC_REPLY(xprt, rply, rqstp->rq_addr, body, &rqstp->rq_reply_seq); if (rqstp->rq_addr) { free(rqstp->rq_addr, M_SONAME); rqstp->rq_addr = NULL; @@ -805,6 +861,7 @@ svc_getreq(SVCXPRT *xprt, struct svc_req struct svc_req *r; struct rpc_msg msg; struct mbuf *args; + struct svc_loss_callout *s; enum xprt_stat stat; /* now receive msgs from xprtprt (support batch calls) */ @@ -833,7 +890,7 @@ svc_getreq(SVCXPRT *xprt, struct svc_req break; case RS_DONE: SVC_REPLY(xprt, &repmsg, r->rq_addr, - repbody); + repbody, &r->rq_reply_seq); if (r->rq_addr) { free(r->rq_addr, M_SONAME); r->rq_addr = NULL; @@ -883,6 +940,8 @@ call_done: r = NULL; } if ((stat = SVC_STAT(xprt)) == XPRT_DIED) { + TAILQ_FOREACH(s, &pool->sp_lcallouts, slc_link) + (*s->slc_dispatch)(xprt); xprt_unregister(xprt); } Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/rpc/svc.h Thu Jan 23 00:46:29 2014 (r261067) @@ -103,9 +103,11 @@ struct xp_ops { struct sockaddr **, struct mbuf **); /* get transport status */ enum xprt_stat (*xp_stat)(struct __rpc_svcxprt *); + /* get transport acknowledge sequence */ + bool_t (*xp_ack)(struct __rpc_svcxprt *, uint32_t *); /* send reply */ bool_t (*xp_reply)(struct __rpc_svcxprt *, struct rpc_msg *, - struct sockaddr *, struct mbuf *); + struct sockaddr *, struct mbuf *, uint32_t *); /* destroy this struct */ void (*xp_destroy)(struct __rpc_svcxprt *); /* catch-all function */ @@ -166,6 +168,8 @@ typedef struct __rpc_svcxprt { time_t xp_lastactive; /* time of last RPC */ u_int64_t xp_sockref; /* set by nfsv4 to identify socket */ int xp_upcallset; /* socket upcall is set up */ + uint32_t xp_snd_cnt; /* # of bytes to send to socket */ + uint32_t xp_snt_cnt; /* # of bytes sent to socket */ #else int xp_fd; u_short xp_port; /* associated port number */ @@ -230,6 +234,17 @@ struct svc_callout { }; TAILQ_HEAD(svc_callout_list, svc_callout); +/* + * The services connection loss list + * The dispatch routine takes request structs and runs the + * apropriate procedure. + */ +struct svc_loss_callout { + TAILQ_ENTRY(svc_loss_callout) slc_link; + void (*slc_dispatch)(SVCXPRT *); +}; +TAILQ_HEAD(svc_loss_callout_list, svc_loss_callout); + struct __rpc_svcthread; /* @@ -253,6 +268,7 @@ struct svc_req { void *rq_p1; /* application workspace */ int rq_p2; /* application workspace */ uint64_t rq_p3; /* application workspace */ + uint32_t rq_reply_seq; /* reply socket sequence # */ char rq_credarea[3*MAX_AUTH_BYTES]; }; STAILQ_HEAD(svc_reqlist, svc_req); @@ -311,13 +327,14 @@ enum svcpool_state { typedef SVCTHREAD *pool_assign_fn(SVCTHREAD *, struct svc_req *); typedef void pool_done_fn(SVCTHREAD *, struct svc_req *); typedef struct __rpc_svcpool { - struct mtx sp_lock; /* protect the transport lists */ + struct mtx_padalign sp_lock; /* protect the transport lists */ const char *sp_name; /* pool name (e.g. "nfsd", "NLM" */ enum svcpool_state sp_state; /* current pool state */ struct proc *sp_proc; /* process which is in svc_run */ struct svcxprt_list sp_xlist; /* all transports in the pool */ struct svcxprt_list sp_active; /* transports needing service */ struct svc_callout_list sp_callouts; /* (prog,vers)->dispatch list */ + struct svc_loss_callout_list sp_lcallouts; /* loss->dispatch list */ struct svcthread_list sp_threads; /* service threads */ struct svcthread_list sp_idlethreads; /* idle service threads */ int sp_minthreads; /* minimum service thread count */ @@ -393,8 +410,12 @@ struct svc_req { #define SVC_STAT(xprt) \ (*(xprt)->xp_ops->xp_stat)(xprt) -#define SVC_REPLY(xprt, msg, addr, m) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg), (addr), (m)) +#define SVC_ACK(xprt, ack) \ + ((xprt)->xp_ops->xp_ack == NULL ? FALSE : \ + ((ack) == NULL ? TRUE : (*(xprt)->xp_ops->xp_ack)((xprt), (ack)))) + +#define SVC_REPLY(xprt, msg, addr, m, seq) \ + (*(xprt)->xp_ops->xp_reply) ((xprt), (msg), (addr), (m), (seq)) #define SVC_DESTROY(xprt) \ (*(xprt)->xp_ops->xp_destroy)(xprt) @@ -495,6 +516,32 @@ extern void svc_unreg(const rpcprog_t, c #endif __END_DECLS +#ifdef _KERNEL +/* + * Service connection loss registration + * + * svc_loss_reg(xprt, dispatch) + * const SVCXPRT *xprt; + * const void (*dispatch)(); + */ + +__BEGIN_DECLS +extern bool_t svc_loss_reg(SVCXPRT *, void (*)(SVCXPRT *)); +__END_DECLS + +/* + * Service connection loss un-registration + * + * svc_loss_unreg(xprt, dispatch) + * const SVCXPRT *xprt; + * const void (*dispatch)(); + */ + +__BEGIN_DECLS +extern void svc_loss_unreg(SVCPOOL *, void (*)(SVCXPRT *)); +__END_DECLS +#endif + /* * Transport registration. * Modified: stable/9/sys/rpc/svc_dg.c ============================================================================== --- stable/9/sys/rpc/svc_dg.c Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/rpc/svc_dg.c Thu Jan 23 00:46:29 2014 (r261067) @@ -66,7 +66,7 @@ static enum xprt_stat svc_dg_stat(SVCXPR static bool_t svc_dg_recv(SVCXPRT *, struct rpc_msg *, struct sockaddr **, struct mbuf **); static bool_t svc_dg_reply(SVCXPRT *, struct rpc_msg *, - struct sockaddr *, struct mbuf *); + struct sockaddr *, struct mbuf *, uint32_t *); static void svc_dg_destroy(SVCXPRT *); static bool_t svc_dg_control(SVCXPRT *, const u_int, void *); static int svc_dg_soupcall(struct socket *so, void *arg, int waitflag); @@ -230,7 +230,7 @@ svc_dg_recv(SVCXPRT *xprt, struct rpc_ms static bool_t svc_dg_reply(SVCXPRT *xprt, struct rpc_msg *msg, - struct sockaddr *addr, struct mbuf *m) + struct sockaddr *addr, struct mbuf *m, uint32_t *seq) { XDR xdrs; struct mbuf *mrep; Modified: stable/9/sys/rpc/svc_vc.c ============================================================================== --- stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:45:20 2014 (r261066) +++ stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:46:29 2014 (r261067) @@ -76,10 +76,11 @@ static void svc_vc_rendezvous_destroy(SV static bool_t svc_vc_null(void); static void svc_vc_destroy(SVCXPRT *); static enum xprt_stat svc_vc_stat(SVCXPRT *); +static bool_t svc_vc_ack(SVCXPRT *, uint32_t *); static bool_t svc_vc_recv(SVCXPRT *, struct rpc_msg *, struct sockaddr **, struct mbuf **); static bool_t svc_vc_reply(SVCXPRT *, struct rpc_msg *, - struct sockaddr *, struct mbuf *); + struct sockaddr *, struct mbuf *, uint32_t *seq); static bool_t svc_vc_control(SVCXPRT *xprt, const u_int rq, void *in); static bool_t svc_vc_rendezvous_control (SVCXPRT *xprt, const u_int rq, void *in); @@ -88,7 +89,7 @@ static enum xprt_stat svc_vc_backchannel static bool_t svc_vc_backchannel_recv(SVCXPRT *, struct rpc_msg *, struct sockaddr **, struct mbuf **); static bool_t svc_vc_backchannel_reply(SVCXPRT *, struct rpc_msg *, - struct sockaddr *, struct mbuf *); + struct sockaddr *, struct mbuf *, uint32_t *); static bool_t svc_vc_backchannel_control(SVCXPRT *xprt, const u_int rq, void *in); static SVCXPRT *svc_vc_create_conn(SVCPOOL *pool, struct socket *so, @@ -100,7 +101,7 @@ static struct xp_ops svc_vc_rendezvous_o .xp_recv = svc_vc_rendezvous_recv, .xp_stat = svc_vc_rendezvous_stat, .xp_reply = (bool_t (*)(SVCXPRT *, struct rpc_msg *, - struct sockaddr *, struct mbuf *))svc_vc_null, + struct sockaddr *, struct mbuf *, uint32_t *))svc_vc_null, .xp_destroy = svc_vc_rendezvous_destroy, .xp_control = svc_vc_rendezvous_control }; @@ -108,6 +109,7 @@ static struct xp_ops svc_vc_rendezvous_o static struct xp_ops svc_vc_ops = { .xp_recv = svc_vc_recv, .xp_stat = svc_vc_stat, + .xp_ack = svc_vc_ack, .xp_reply = svc_vc_reply, .xp_destroy = svc_vc_destroy, .xp_control = svc_vc_control @@ -184,8 +186,10 @@ svc_vc_create(SVCPOOL *pool, struct sock return (xprt); cleanup_svc_vc_create: - if (xprt) + if (xprt) { + sx_destroy(&xprt->xp_lock); svc_xprt_free(xprt); + } return (NULL); } @@ -270,7 +274,8 @@ svc_vc_create_conn(SVCPOOL *pool, struct return (xprt); cleanup_svc_vc_create: if (xprt) { - mem_free(xprt, sizeof(*xprt)); + sx_destroy(&xprt->xp_lock); + svc_xprt_free(xprt); } if (cd) mem_free(cd, sizeof(*cd)); @@ -451,7 +456,6 @@ svc_vc_destroy_common(SVCXPRT *xprt) } SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); - sx_destroy(&xprt->xp_lock); if (xprt->xp_socket) (void)soclose(xprt->xp_socket); @@ -537,6 +541,15 @@ svc_vc_stat(SVCXPRT *xprt) return (XPRT_IDLE); } +static bool_t +svc_vc_ack(SVCXPRT *xprt, uint32_t *ack) +{ + + *ack = atomic_load_acq_32(&xprt->xp_snt_cnt); + *ack -= xprt->xp_socket->so_snd.sb_cc; + return (TRUE); +} + static enum xprt_stat svc_vc_backchannel_stat(SVCXPRT *xprt) { @@ -785,12 +798,12 @@ svc_vc_backchannel_recv(SVCXPRT *xprt, s static bool_t svc_vc_reply(SVCXPRT *xprt, struct rpc_msg *msg, - struct sockaddr *addr, struct mbuf *m) + struct sockaddr *addr, struct mbuf *m, uint32_t *seq) { XDR xdrs; struct mbuf *mrep; bool_t stat = TRUE; - int error; + int error, len; /* * Leave space for record mark. @@ -818,14 +831,19 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_m * Prepend a record marker containing the reply length. */ M_PREPEND(mrep, sizeof(uint32_t), M_WAIT); + len = mrep->m_pkthdr.len; *mtod(mrep, uint32_t *) = - htonl(0x80000000 | (mrep->m_pkthdr.len - - sizeof(uint32_t))); + htonl(0x80000000 | (len - sizeof(uint32_t))); + atomic_add_acq_32(&xprt->xp_snd_cnt, len); error = sosend(xprt->xp_socket, NULL, NULL, mrep, NULL, 0, curthread); if (!error) { + atomic_add_rel_32(&xprt->xp_snt_cnt, len); + if (seq) + *seq = xprt->xp_snd_cnt; stat = TRUE; - } + } else + atomic_subtract_32(&xprt->xp_snd_cnt, len); } else { m_freem(mrep); } @@ -838,7 +856,7 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_m static bool_t svc_vc_backchannel_reply(SVCXPRT *xprt, struct rpc_msg *msg, - struct sockaddr *addr, struct mbuf *m) + struct sockaddr *addr, struct mbuf *m, uint32_t *seq) { struct ct_data *ct; XDR xdrs; From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 01:09:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8025EC23; Thu, 23 Jan 2014 01:09:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C5F11892; Thu, 23 Jan 2014 01:09:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N19YCh060197; Thu, 23 Jan 2014 01:09:34 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N19YT9060195; Thu, 23 Jan 2014 01:09:34 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201401230109.s0N19YT9060195@svn.freebsd.org> From: Justin Hibbits Date: Thu, 23 Jan 2014 01:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261068 - head/sys/dev/adb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:09:34 -0000 Author: jhibbits Date: Thu Jan 23 01:09:33 2014 New Revision: 261068 URL: http://svnweb.freebsd.org/changeset/base/261068 Log: Properly sort the arguments to mtx_init(9). PR: misc/186020 Submitted by: alfred MFC after: 1 week Modified: head/sys/dev/adb/adb_kbd.c head/sys/dev/adb/adb_mouse.c Modified: head/sys/dev/adb/adb_kbd.c ============================================================================== --- head/sys/dev/adb/adb_kbd.c Thu Jan 23 00:46:29 2014 (r261067) +++ head/sys/dev/adb/adb_kbd.c Thu Jan 23 01:09:33 2014 (r261068) @@ -304,7 +304,7 @@ adb_kbd_attach(device_t dev) /* Try stepping forward to the extended keyboard protocol */ adb_set_device_handler(dev,3); - mtx_init(&sc->sc_mutex,KBD_DRIVER_NAME,MTX_DEF,0); + mtx_init(&sc->sc_mutex, KBD_DRIVER_NAME, NULL, MTX_DEF); cv_init(&sc->sc_cv,KBD_DRIVER_NAME); callout_init(&sc->sc_repeater, 0); Modified: head/sys/dev/adb/adb_mouse.c ============================================================================== --- head/sys/dev/adb/adb_mouse.c Thu Jan 23 00:46:29 2014 (r261067) +++ head/sys/dev/adb/adb_mouse.c Thu Jan 23 01:09:33 2014 (r261068) @@ -154,7 +154,7 @@ adb_mouse_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; - mtx_init(&sc->sc_mtx,"ams",MTX_DEF,0); + mtx_init(&sc->sc_mtx, "ams", NULL, MTX_DEF); cv_init(&sc->sc_cv,"ams"); sc->flags = 0; From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 02:47:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 904B6E46; Thu, 23 Jan 2014 02:47:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78CB6111D; Thu, 23 Jan 2014 02:47:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N2ld8J098562; Thu, 23 Jan 2014 02:47:39 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N2lbkU098546; Thu, 23 Jan 2014 02:47:37 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <201401230247.s0N2lbkU098546@svn.freebsd.org> From: Jason Evans Date: Thu, 23 Jan 2014 02:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261071 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 02:47:39 -0000 Author: jasone Date: Thu Jan 23 02:47:36 2014 New Revision: 261071 URL: http://svnweb.freebsd.org/changeset/base/261071 Log: Update jemalloc to version 3.5.0. Added: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h (contents, props changed) head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h (contents, props changed) head/contrib/jemalloc/include/jemalloc/internal/public_namespace.h (contents, props changed) Deleted: head/contrib/jemalloc/include/jemalloc/jemalloc_defs.h Modified: head/contrib/jemalloc/COPYING head/contrib/jemalloc/ChangeLog head/contrib/jemalloc/FREEBSD-Xlist head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/FREEBSD-upgrade head/contrib/jemalloc/VERSION head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/arena.h head/contrib/jemalloc/include/jemalloc/internal/chunk_dss.h head/contrib/jemalloc/include/jemalloc/internal/ckh.h head/contrib/jemalloc/include/jemalloc/internal/hash.h head/contrib/jemalloc/include/jemalloc/internal/huge.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h head/contrib/jemalloc/include/jemalloc/internal/prng.h head/contrib/jemalloc/include/jemalloc/internal/prof.h head/contrib/jemalloc/include/jemalloc/internal/ql.h head/contrib/jemalloc/include/jemalloc/internal/qr.h head/contrib/jemalloc/include/jemalloc/internal/rb.h head/contrib/jemalloc/include/jemalloc/internal/rtree.h head/contrib/jemalloc/include/jemalloc/internal/tcache.h head/contrib/jemalloc/include/jemalloc/internal/tsd.h head/contrib/jemalloc/include/jemalloc/internal/util.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h head/contrib/jemalloc/src/arena.c head/contrib/jemalloc/src/bitmap.c head/contrib/jemalloc/src/chunk.c head/contrib/jemalloc/src/chunk_dss.c head/contrib/jemalloc/src/chunk_mmap.c head/contrib/jemalloc/src/ckh.c head/contrib/jemalloc/src/ctl.c head/contrib/jemalloc/src/huge.c head/contrib/jemalloc/src/jemalloc.c head/contrib/jemalloc/src/mutex.c head/contrib/jemalloc/src/prof.c head/contrib/jemalloc/src/quarantine.c head/contrib/jemalloc/src/rtree.c head/contrib/jemalloc/src/stats.c head/contrib/jemalloc/src/tcache.c head/contrib/jemalloc/src/tsd.c head/contrib/jemalloc/src/util.c head/include/malloc_np.h head/lib/libc/gen/tls.c head/lib/libc/stdlib/jemalloc/Makefile.inc head/lib/libc/stdlib/jemalloc/Symbol.map Modified: head/contrib/jemalloc/COPYING ============================================================================== --- head/contrib/jemalloc/COPYING Thu Jan 23 02:10:30 2014 (r261070) +++ head/contrib/jemalloc/COPYING Thu Jan 23 02:47:36 2014 (r261071) @@ -1,10 +1,10 @@ Unless otherwise specified, files in the jemalloc source distribution are subject to the following license: -------------------------------------------------------------------------------- -Copyright (C) 2002-2013 Jason Evans . +Copyright (C) 2002-2014 Jason Evans . All rights reserved. Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved. -Copyright (C) 2009-2013 Facebook, Inc. All rights reserved. +Copyright (C) 2009-2014 Facebook, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Modified: head/contrib/jemalloc/ChangeLog ============================================================================== --- head/contrib/jemalloc/ChangeLog Thu Jan 23 02:10:30 2014 (r261070) +++ head/contrib/jemalloc/ChangeLog Thu Jan 23 02:47:36 2014 (r261071) @@ -6,6 +6,59 @@ found in the git revision history: http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git git://canonware.com/jemalloc.git +* 3.5.0 (January 22, 2014) + + This version focuses on refactoring and automated testing, though it also + includes some non-trivial heap profiling optimizations not mentioned below. + + New features: + - Add the *allocx() API, which is a successor to the experimental *allocm() + API. The *allocx() functions are slightly simpler to use because they have + fewer parameters, they directly return the results of primary interest, and + mallocx()/rallocx() avoid the strict aliasing pitfall that + allocm()/rallocx() share with posix_memalign(). Note that *allocm() is + slated for removal in the next non-bugfix release. + - Add support for LinuxThreads. + + Bug fixes: + - Unless heap profiling is enabled, disable floating point code and don't link + with libm. This, in combination with e.g. EXTRA_CFLAGS=-mno-sse on x64 + systems, makes it possible to completely disable floating point register + use. Some versions of glibc neglect to save/restore caller-saved floating + point registers during dynamic lazy symbol loading, and the symbol loading + code uses whatever malloc the application happens to have linked/loaded + with, the result being potential floating point register corruption. + - Report ENOMEM rather than EINVAL if an OOM occurs during heap profiling + backtrace creation in imemalign(). This bug impacted posix_memalign() and + aligned_alloc(). + - Fix a file descriptor leak in a prof_dump_maps() error path. + - Fix prof_dump() to close the dump file descriptor for all relevant error + paths. + - Fix rallocm() to use the arena specified by the ALLOCM_ARENA(s) flag for + allocation, not just deallocation. + - Fix a data race for large allocation stats counters. + - Fix a potential infinite loop during thread exit. This bug occurred on + Solaris, and could affect other platforms with similar pthreads TSD + implementations. + - Don't junk-fill reallocations unless usable size changes. This fixes a + violation of the *allocx()/*allocm() semantics. + - Fix growing large reallocation to junk fill new space. + - Fix huge deallocation to junk fill when munmap is disabled. + - Change the default private namespace prefix from empty to je_, and change + --with-private-namespace-prefix so that it prepends an additional prefix + rather than replacing je_. This reduces the likelihood of applications + which statically link jemalloc experiencing symbol name collisions. + - Add missing private namespace mangling (relevant when + --with-private-namespace is specified). + - Add and use JEMALLOC_INLINE_C so that static inline functions are marked as + static even for debug builds. + - Add a missing mutex unlock in a malloc_init_hard() error path. In practice + this error path is never executed. + - Fix numerous bugs in malloc_strotumax() error handling/reporting. These + bugs had no impact except for malformed inputs. + - Fix numerous bugs in malloc_snprintf(). These bugs were not exercised by + existing calls, so they had no impact. + * 3.4.1 (October 20, 2013) Bug fixes: Modified: head/contrib/jemalloc/FREEBSD-Xlist ============================================================================== --- head/contrib/jemalloc/FREEBSD-Xlist Thu Jan 23 02:10:30 2014 (r261070) +++ head/contrib/jemalloc/FREEBSD-Xlist Thu Jan 23 02:47:36 2014 (r261071) @@ -10,14 +10,35 @@ autom4te.cache/ bin/ config.* configure* +coverage.sh doc/*.in doc/*.xml doc/*.xsl doc/*.html include/jemalloc/internal/jemalloc_internal.h.in +include/jemalloc/internal/jemalloc_internal_defs.h.in +include/jemalloc/internal/private_namespace.sh +include/jemalloc/internal/private_symbols.txt +include/jemalloc/internal/private_unnamespace.h +include/jemalloc/internal/private_unnamespace.sh +include/jemalloc/internal/public_namespace.sh +include/jemalloc/internal/public_symbols.txt +include/jemalloc/internal/public_unnamespace.h +include/jemalloc/internal/public_unnamespace.sh include/jemalloc/internal/size_classes.sh include/jemalloc/jemalloc.h.in +include/jemalloc/jemalloc.sh include/jemalloc/jemalloc_defs.h.in +include/jemalloc/jemalloc_macros.h +include/jemalloc/jemalloc_macros.h.in +include/jemalloc/jemalloc_mangle_jet.h +include/jemalloc/jemalloc_mangle.sh +include/jemalloc/jemalloc_mangle.h +include/jemalloc/jemalloc_protos_jet.h +include/jemalloc/jemalloc_protos.h +include/jemalloc/jemalloc_protos.h.in +include/jemalloc/jemalloc_rename.h +include/jemalloc/jemalloc_rename.sh include/msvc_compat/ install-sh src/zone.c Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Thu Jan 23 02:10:30 2014 (r261070) +++ head/contrib/jemalloc/FREEBSD-diffs Thu Jan 23 02:47:36 2014 (r261071) @@ -1,8 +1,8 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index abd5e6f..1d7491a 100644 +index c7e2e87..2bd59f0 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in -@@ -51,12 +51,23 @@ +@@ -57,12 +57,23 @@ This manual describes jemalloc @jemalloc_version@. More information can be found at the jemalloc website. @@ -27,7 +27,7 @@ index abd5e6f..1d7491a 100644 Standard API -@@ -2180,4 +2191,16 @@ malloc_conf = "lg_chunk:24";]]> +@@ -2338,4 +2349,19 @@ malloc_conf = "lg_chunk:24";]]> The posix_memalign function conforms to IEEE Std 1003.1-2001 (“POSIX.1”). @@ -42,32 +42,35 @@ index abd5e6f..1d7491a 100644 + mallctl*, and + *allocm functions first appeared in + FreeBSD 10.0. ++ ++ The *allocx functions first appeared ++ in FreeBSD 11.0. + diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in -index 53c135c..c547339 100644 +index d24a1fe..d101c3d 100644 --- a/include/jemalloc/internal/jemalloc_internal.h.in +++ b/include/jemalloc/internal/jemalloc_internal.h.in @@ -1,5 +1,8 @@ #ifndef JEMALLOC_INTERNAL_H - #define JEMALLOC_INTERNAL_H + #define JEMALLOC_INTERNAL_H +#include "libc_private.h" +#include "namespace.h" + #include #ifdef _WIN32 # include -@@ -54,6 +57,9 @@ typedef intptr_t ssize_t; +@@ -65,6 +68,9 @@ typedef intptr_t ssize_t; + #include #endif - #include +#include "un-namespace.h" +#include "libc_private.h" + #define JEMALLOC_NO_DEMANGLE - #include "../jemalloc@install_suffix@.h" - -@@ -95,13 +101,7 @@ static const bool config_fill = + #ifdef JEMALLOC_JET + # define JEMALLOC_N(n) jet_##n +@@ -99,13 +105,7 @@ static const bool config_fill = false #endif ; @@ -96,36 +99,24 @@ index de44e14..564d604 100644 #endif bool malloc_mutex_init(malloc_mutex_t *mutex); -diff --git a/include/jemalloc/internal/private_namespace.h b/include/jemalloc/internal/private_namespace.h -index cdb0b0e..2a98d1f 100644 ---- a/include/jemalloc/internal/private_namespace.h -+++ b/include/jemalloc/internal/private_namespace.h -@@ -218,7 +218,6 @@ - #define iralloc JEMALLOC_N(iralloc) - #define irallocx JEMALLOC_N(irallocx) - #define isalloc JEMALLOC_N(isalloc) --#define isthreaded JEMALLOC_N(isthreaded) - #define ivsalloc JEMALLOC_N(ivsalloc) - #define jemalloc_postfork_child JEMALLOC_N(jemalloc_postfork_child) - #define jemalloc_postfork_parent JEMALLOC_N(jemalloc_postfork_parent) -diff --git a/include/jemalloc/jemalloc.h.in b/include/jemalloc/jemalloc.h.in -index 31b1304..c3ef2f5 100644 ---- a/include/jemalloc/jemalloc.h.in -+++ b/include/jemalloc/jemalloc.h.in -@@ -15,6 +15,7 @@ extern "C" { - #define JEMALLOC_VERSION_GID "@jemalloc_version_gid@" - - #include "jemalloc_defs@install_suffix@.h" -+#include "jemalloc_FreeBSD.h" - - #ifdef JEMALLOC_EXPERIMENTAL - #define ALLOCM_LG_ALIGN(la) (la) +diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt +index 1e64ed5..29ddba3 100644 +--- a/include/jemalloc/internal/private_symbols.txt ++++ b/include/jemalloc/internal/private_symbols.txt +@@ -225,7 +225,6 @@ iralloc + iralloct + iralloct_realign + isalloc +-isthreaded + ivsalloc + ixalloc + jemalloc_postfork_child diff --git a/include/jemalloc/jemalloc_FreeBSD.h b/include/jemalloc/jemalloc_FreeBSD.h new file mode 100644 -index 0000000..e6c8407 +index 0000000..94554bc --- /dev/null +++ b/include/jemalloc/jemalloc_FreeBSD.h -@@ -0,0 +1,117 @@ +@@ -0,0 +1,134 @@ +/* + * Override settings that were generated in jemalloc_defs.h as necessary. + */ @@ -202,6 +193,12 @@ index 0000000..e6c8407 +#undef je_free +#undef je_posix_memalign +#undef je_malloc_usable_size ++#undef je_mallocx ++#undef je_rallocx ++#undef je_xallocx ++#undef je_sallocx ++#undef je_dallocx ++#undef je_nallocx +#undef je_allocm +#undef je_rallocm +#undef je_sallocm @@ -213,6 +210,12 @@ index 0000000..e6c8407 +#define je_free __free +#define je_posix_memalign __posix_memalign +#define je_malloc_usable_size __malloc_usable_size ++#define je_mallocx __mallocx ++#define je_rallocx __rallocx ++#define je_xallocx __xallocx ++#define je_sallocx __sallocx ++#define je_dallocx __dallocx ++#define je_nallocx __nallocx +#define je_allocm __allocm +#define je_rallocm __rallocm +#define je_sallocm __sallocm @@ -236,15 +239,31 @@ index 0000000..e6c8407 +__weak_reference(__free, free); +__weak_reference(__posix_memalign, posix_memalign); +__weak_reference(__malloc_usable_size, malloc_usable_size); ++__weak_reference(__mallocx, mallocx); ++__weak_reference(__rallocx, rallocx); ++__weak_reference(__xallocx, xallocx); ++__weak_reference(__sallocx, sallocx); ++__weak_reference(__dallocx, dallocx); ++__weak_reference(__nallocx, nallocx); +__weak_reference(__allocm, allocm); +__weak_reference(__rallocm, rallocm); +__weak_reference(__sallocm, sallocm); +__weak_reference(__dallocm, dallocm); +__weak_reference(__nallocm, nallocm); +#endif +diff --git a/include/jemalloc/jemalloc_rename.sh b/include/jemalloc/jemalloc_rename.sh +index f943891..47d032c 100755 +--- a/include/jemalloc/jemalloc_rename.sh ++++ b/include/jemalloc/jemalloc_rename.sh +@@ -19,4 +19,6 @@ done + + cat < -.\" Date: 10/20/2013 +.\" Date: 01/22/2014 .\" Manual: User Manual -.\" Source: jemalloc 3.4.1-0-g0135fb806e4137dc9cdf152541926a2bc95e33f0 +.\" Source: jemalloc 3.5.0-0-gcc47dde16203a6ae7eb685b53e1ae501f3869bc6 .\" Language: English .\" -.TH "JEMALLOC" "3" "10/20/2013" "jemalloc 3.4.1-0-g0135fb806e41" "User Manual" +.TH "JEMALLOC" "3" "01/22/2014" "jemalloc 3.5.0-0-gcc47dde16203" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 3\&.4\&.1\-0\-g0135fb806e4137dc9cdf152541926a2bc95e33f0\&. More information can be found at the +This manual describes jemalloc 3\&.5\&.0\-0\-gcc47dde16203a6ae7eb685b53e1ae501f3869bc6\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: @@ -71,16 +71,28 @@ make variable)\&. .HP \w'void\ free('u .BI "void free(void\ *" "ptr" ");" .SS "Non\-standard API" -.HP \w'size_t\ malloc_usable_size('u -.BI "size_t malloc_usable_size(const\ void\ *" "ptr" ");" -.HP \w'void\ malloc_stats_print('u -.BI "void malloc_stats_print(void\ " "(*write_cb)" "\ (void\ *,\ const\ char\ *), void\ *" "cbopaque" ", const\ char\ *" "opts" ");" +.HP \w'void\ *mallocx('u +.BI "void *mallocx(size_t\ " "size" ", int\ " "flags" ");" +.HP \w'void\ *rallocx('u +.BI "void *rallocx(void\ *" "ptr" ", size_t\ " "size" ", int\ " "flags" ");" +.HP \w'size_t\ xallocx('u +.BI "size_t xallocx(void\ *" "ptr" ", size_t\ " "size" ", size_t\ " "extra" ", int\ " "flags" ");" +.HP \w'size_t\ sallocx('u +.BI "size_t sallocx(void\ *" "ptr" ", int\ " "flags" ");" +.HP \w'void\ dallocx('u +.BI "void dallocx(void\ *" "ptr" ", int\ " "flags" ");" +.HP \w'size_t\ nallocx('u +.BI "size_t nallocx(size_t\ " "size" ", int\ " "flags" ");" .HP \w'int\ mallctl('u .BI "int mallctl(const\ char\ *" "name" ", void\ *" "oldp" ", size_t\ *" "oldlenp" ", void\ *" "newp" ", size_t\ " "newlen" ");" .HP \w'int\ mallctlnametomib('u .BI "int mallctlnametomib(const\ char\ *" "name" ", size_t\ *" "mibp" ", size_t\ *" "miblenp" ");" .HP \w'int\ mallctlbymib('u .BI "int mallctlbymib(const\ size_t\ *" "mib" ", size_t\ " "miblen" ", void\ *" "oldp" ", size_t\ *" "oldlenp" ", void\ *" "newp" ", size_t\ " "newlen" ");" +.HP \w'void\ malloc_stats_print('u +.BI "void malloc_stats_print(void\ " "(*write_cb)" "\ (void\ *,\ const\ char\ *), void\ *" "cbopaque" ", const\ char\ *" "opts" ");" +.HP \w'size_t\ malloc_usable_size('u +.BI "size_t malloc_usable_size(const\ void\ *" "ptr" ");" .HP \w'void\ (*malloc_message)('u .BI "void (*malloc_message)(void\ *" "cbopaque" ", const\ char\ *" "s" ");" .PP @@ -172,36 +184,105 @@ is .SS "Non\-standard API" .PP The -\fBmalloc_usable_size\fR\fB\fR -function returns the usable size of the allocation pointed to by -\fIptr\fR\&. The return value may be larger than the size that was requested during allocation\&. The -\fBmalloc_usable_size\fR\fB\fR -function is not a mechanism for in\-place -\fBrealloc\fR\fB\fR; rather it is provided solely as a tool for introspection purposes\&. Any discrepancy between the requested allocation size and the size reported by -\fBmalloc_usable_size\fR\fB\fR -should not be depended on, since such behavior is entirely implementation\-dependent\&. +\fBmallocx\fR\fB\fR, +\fBrallocx\fR\fB\fR, +\fBxallocx\fR\fB\fR, +\fBsallocx\fR\fB\fR, +\fBdallocx\fR\fB\fR, and +\fBnallocx\fR\fB\fR +functions all have a +\fIflags\fR +argument that can be used to specify options\&. The functions only check the options that are contextually relevant\&. Use bitwise or (|) operations to specify one or more of the following: +.PP +\fBMALLOCX_LG_ALIGN(\fR\fB\fIla\fR\fR\fB) \fR +.RS 4 +Align the memory allocation to start at an address that is a multiple of +(1 << \fIla\fR)\&. This macro does not validate that +\fIla\fR +is within the valid range\&. +.RE +.PP +\fBMALLOCX_ALIGN(\fR\fB\fIa\fR\fR\fB) \fR +.RS 4 +Align the memory allocation to start at an address that is a multiple of +\fIa\fR, where +\fIa\fR +is a power of two\&. This macro does not validate that +\fIa\fR +is a power of 2\&. +.RE +.PP +\fBMALLOCX_ZERO\fR +.RS 4 +Initialize newly allocated memory to contain zero bytes\&. In the growing reallocation case, the real size prior to reallocation defines the boundary between untouched bytes and those that are initialized to contain zero bytes\&. If this macro is absent, newly allocated memory is uninitialized\&. +.RE +.PP +\fBMALLOCX_ARENA(\fR\fB\fIa\fR\fR\fB) \fR +.RS 4 +Use the arena specified by the index +\fIa\fR +(and by necessity bypass the thread cache)\&. This macro has no effect for huge regions, nor for regions that were allocated via an arena other than the one specified\&. This macro does not validate that +\fIa\fR +specifies an arena index in the valid range\&. +.RE .PP The -\fBmalloc_stats_print\fR\fB\fR -function writes human\-readable summary statistics via the -\fIwrite_cb\fR -callback function pointer and -\fIcbopaque\fR -data passed to -\fIwrite_cb\fR, or -\fBmalloc_message\fR\fB\fR -if -\fIwrite_cb\fR +\fBmallocx\fR\fB\fR +function allocates at least +\fIsize\fR +bytes of memory, and returns a pointer to the base address of the allocation\&. Behavior is undefined if +\fIsize\fR is -\fBNULL\fR\&. This function can be called repeatedly\&. General information that never changes during execution can be omitted by specifying "g" as a character within the -\fIopts\fR -string\&. Note that -\fBmalloc_message\fR\fB\fR -uses the -\fBmallctl*\fR\fB\fR -functions internally, so inconsistent statistics can be reported if multiple threads use these functions simultaneously\&. If -\fB\-\-enable\-stats\fR -is specified during configuration, \(lqm\(rq and \(lqa\(rq can be specified to omit merged arena and per arena statistics, respectively; \(lqb\(rq and \(lql\(rq can be specified to omit per size class statistics for bins and large objects, respectively\&. Unrecognized characters are silently ignored\&. Note that thread caching may prevent some statistics from being completely up to date, since extra locking would be required to merge counters that track thread cache operations\&. +\fB0\fR, or if request size overflows due to size class and/or alignment constraints\&. +.PP +The +\fBrallocx\fR\fB\fR +function resizes the allocation at +\fIptr\fR +to be at least +\fIsize\fR +bytes, and returns a pointer to the base address of the resulting allocation, which may or may not have moved from its original location\&. Behavior is undefined if +\fIsize\fR +is +\fB0\fR, or if request size overflows due to size class and/or alignment constraints\&. +.PP +The +\fBxallocx\fR\fB\fR +function resizes the allocation at +\fIptr\fR +in place to be at least +\fIsize\fR +bytes, and returns the real size of the allocation\&. If +\fIextra\fR +is non\-zero, an attempt is made to resize the allocation to be at least +(\fIsize\fR + \fIextra\fR) +bytes, though inability to allocate the extra byte(s) will not by itself result in failure to resize\&. Behavior is undefined if +\fIsize\fR +is +\fB0\fR, or if +(\fIsize\fR + \fIextra\fR > \fBSIZE_T_MAX\fR)\&. +.PP +The +\fBsallocx\fR\fB\fR +function returns the real size of the allocation at +\fIptr\fR\&. +.PP +The +\fBdallocx\fR\fB\fR +function causes the memory referenced by +\fIptr\fR +to be made available for future allocations\&. +.PP +The +\fBnallocx\fR\fB\fR +function allocates no memory, but it performs the same size computation as the +\fBmallocx\fR\fB\fR +function, and returns the real size of the allocation that would result from the equivalent +\fBmallocx\fR\fB\fR +function call\&. Behavior is undefined if +\fIsize\fR +is +\fB0\fR, or if request size overflows due to size class and/or alignment constraints\&. .PP The \fBmallctl\fR\fB\fR @@ -245,15 +326,14 @@ that is smaller than the number of perio .\} .nf unsigned nbins, i; - -int mib[4]; +size_t mib[4]; size_t len, miblen; len = sizeof(nbins); mallctl("arenas\&.nbins", &nbins, &len, NULL, 0); miblen = 4; -mallnametomib("arenas\&.bin\&.0\&.size", mib, &miblen); +mallctlnametomib("arenas\&.bin\&.0\&.size", mib, &miblen); for (i = 0; i < nbins; i++) { size_t bin_size; @@ -266,6 +346,38 @@ for (i = 0; i < nbins; i++) { .if n \{\ .RE .\} +.PP +The +\fBmalloc_stats_print\fR\fB\fR +function writes human\-readable summary statistics via the +\fIwrite_cb\fR +callback function pointer and +\fIcbopaque\fR +data passed to +\fIwrite_cb\fR, or +\fBmalloc_message\fR\fB\fR +if +\fIwrite_cb\fR +is +\fBNULL\fR\&. This function can be called repeatedly\&. General information that never changes during execution can be omitted by specifying "g" as a character within the +\fIopts\fR +string\&. Note that +\fBmalloc_message\fR\fB\fR +uses the +\fBmallctl*\fR\fB\fR +functions internally, so inconsistent statistics can be reported if multiple threads use these functions simultaneously\&. If +\fB\-\-enable\-stats\fR +is specified during configuration, \(lqm\(rq and \(lqa\(rq can be specified to omit merged arena and per arena statistics, respectively; \(lqb\(rq and \(lql\(rq can be specified to omit per size class statistics for bins and large objects, respectively\&. Unrecognized characters are silently ignored\&. Note that thread caching may prevent some statistics from being completely up to date, since extra locking would be required to merge counters that track thread cache operations\&. +.PP +The +\fBmalloc_usable_size\fR\fB\fR +function returns the usable size of the allocation pointed to by +\fIptr\fR\&. The return value may be larger than the size that was requested during allocation\&. The +\fBmalloc_usable_size\fR\fB\fR +function is not a mechanism for in\-place +\fBrealloc\fR\fB\fR; rather it is provided solely as a tool for introspection purposes\&. Any discrepancy between the requested allocation size and the size reported by +\fBmalloc_usable_size\fR\fB\fR +should not be depended on, since such behavior is entirely implementation\-dependent\&. .SS "Experimental API" .PP The experimental API is subject to change or removal without regard for backward compatibility\&. If @@ -302,7 +414,7 @@ is a power of 2\&. .PP \fBALLOCM_ZERO\fR .RS 4 -Initialize newly allocated memory to contain zero bytes\&. In the growing reallocation case, the real size prior to reallocation defines the boundary between untouched bytes and those that are initialized to contain zero bytes\&. If this option is absent, newly allocated memory is uninitialized\&. +Initialize newly allocated memory to contain zero bytes\&. In the growing reallocation case, the real size prior to reallocation defines the boundary between untouched bytes and those that are initialized to contain zero bytes\&. If this macro is absent, newly allocated memory is uninitialized\&. .RE .PP \fBALLOCM_NO_MOVE\fR @@ -313,9 +425,10 @@ For reallocation, fail rather than movin \fBALLOCM_ARENA(\fR\fB\fIa\fR\fR\fB) \fR .RS 4 Use the arena specified by the index -\fIa\fR\&. This macro does not validate that \fIa\fR -specifies an arena in the valid range\&. +(and by necessity bypass the thread cache)\&. This macro has no effect for huge regions, nor for regions that were allocated via an arena other than the one specified\&. This macro does not validate that +\fIa\fR +specifies an arena index in the valid range\&. .RE .PP The @@ -332,7 +445,7 @@ is not \fBNULL\fR\&. Behavior is undefined if \fIsize\fR is -\fB0\fR\&. +\fB0\fR, or if request size overflows due to size class and/or alignment constraints\&. .PP The \fBrallocm\fR\fB\fR @@ -350,11 +463,11 @@ is not \fBNULL\fR\&. If \fIextra\fR is non\-zero, an attempt is made to resize the allocation to be at least -\fIsize\fR + \fIextra\fR) +(\fIsize\fR + \fIextra\fR) bytes, though inability to allocate the extra byte(s) will not by itself result in failure\&. Behavior is undefined if \fIsize\fR is -\fB0\fR, or if +\fB0\fR, if request size overflows due to size class and/or alignment constraints, or if (\fIsize\fR + \fIextra\fR > \fBSIZE_T_MAX\fR)\&. .PP The @@ -384,7 +497,7 @@ to the real size of the allocation that function call\&. Behavior is undefined if \fIsize\fR is -\fB0\fR\&. +\fB0\fR, or if request size overflows due to size class and/or alignment constraints\&. .SH "TUNING" .PP Once, when the first call is made to one of the memory allocation routines, the allocator initializes its internals based in part on various options that can be specified at compile\- or run\-time\&. @@ -662,16 +775,18 @@ in these cases\&. This option is disable is specified during configuration, in which case it is enabled by default\&. .RE .PP -"opt\&.lg_chunk" (\fBsize_t\fR) r\- -.RS 4 -Virtual memory chunk size (log base 2)\&. If a chunk size outside the supported size range is specified, the size is silently clipped to the minimum/maximum supported size\&. The default chunk size is 4 MiB (2^22)\&. -.RE -.PP "opt\&.dss" (\fBconst char *\fR) r\- .RS 4 dss (\fBsbrk\fR(2)) allocation precedence as related to \fBmmap\fR(2) -allocation\&. The following settings are supported: \(lqdisabled\(rq, \(lqprimary\(rq, and \(lqsecondary\(rq (default)\&. +allocation\&. The following settings are supported: \(lqdisabled\(rq, \(lqprimary\(rq, and \(lqsecondary\(rq\&. The default is \(lqsecondary\(rq if +"config\&.dss" +is true, \(lqdisabled\(rq otherwise\&. +.RE +.PP +"opt\&.lg_chunk" (\fBsize_t\fR) r\- +.RS 4 +Virtual memory chunk size (log base 2)\&. If a chunk size outside the supported size range is specified, the size is silently clipped to the minimum/maximum supported size\&. The default chunk size is 4 MiB (2^22)\&. .RE .PP "opt\&.narenas" (\fBsize_t\fR) r\- @@ -726,7 +841,8 @@ option is enabled, the redzones are chec "opt\&.zero" (\fBbool\fR) r\- [\fB\-\-enable\-fill\fR] .RS 4 Zero filling enabled/disabled\&. If enabled, each byte of uninitialized allocated memory will be initialized to 0\&. Note that this initialization only happens once for each byte, so -\fBrealloc\fR\fB\fR +\fBrealloc\fR\fB\fR, +\fBrallocx\fR\fB\fR and \fBrallocm\fR\fB\fR calls do not zero memory that was previously allocated\&. This is intended for debugging and will impact performance negatively\&. This option is disabled by default\&. @@ -804,7 +920,7 @@ Filename prefix for profile dumps\&. If jeprof\&. .RE .PP -"opt\&.prof_active" (\fBbool\fR) r\- [\fB\-\-enable\-prof\fR] +"opt\&.prof_active" (\fBbool\fR) rw [\fB\-\-enable\-prof\fR] .RS 4 Profiling activated/deactivated\&. This is a secondary control mechanism that makes it possible to start the application with profiling enabled (see the "opt\&.prof" @@ -1119,7 +1235,7 @@ Number of or similar calls made to purge dirty pages\&. .RE .PP -"stats\&.arenas\&.\&.npurged" (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] +"stats\&.arenas\&.\&.purged" (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 Number of pages purged\&. .RE @@ -1342,11 +1458,32 @@ function returns no value\&. .SS "Non\-standard API" .PP The -\fBmalloc_usable_size\fR\fB\fR -function returns the usable size of the allocation pointed to by +\fBmallocx\fR\fB\fR +and +\fBrallocx\fR\fB\fR +functions return a pointer to the allocated memory if successful; otherwise a +\fBNULL\fR +pointer is returned to indicate insufficient contiguous memory was available to service the allocation request\&. +.PP +The +\fBxallocx\fR\fB\fR +function returns the real size of the resulting resized allocation pointed to by +\fIptr\fR, which is a value less than +\fIsize\fR +if the allocation could not be adequately grown in place\&. +.PP +The +\fBsallocx\fR\fB\fR +function returns the real size of the allocation pointed to by \fIptr\fR\&. .PP The +\fBnallocx\fR\fB\fR +returns the real size that would result from a successful equivalent +\fBmallocx\fR\fB\fR +function call, or zero if insufficient memory is available to perform the size computation\&. +.PP +The \fBmallctl\fR\fB\fR, \fBmallctlnametomib\fR\fB\fR, and \fBmallctlbymib\fR\fB\fR @@ -1363,12 +1500,6 @@ is too large or too small\&. Alternative is too large or too small; in this case as much data as possible are read despite the error\&. .RE .PP -ENOMEM -.RS 4 -\fI*oldlenp\fR -is too short to hold the requested value\&. -.RE -.PP ENOENT .RS 4 \fIname\fR @@ -1393,6 +1524,11 @@ An interface with side effects failed in \fBmallctl*\fR\fB\fR read/write processing\&. .RE +.PP +The +\fBmalloc_usable_size\fR\fB\fR +function returns the usable size of the allocation pointed to by +\fIptr\fR\&. .SS "Experimental API" .PP The @@ -1501,6 +1637,10 @@ The \fBmallctl*\fR\fB\fR, and \fB*allocm\fR\fB\fR functions first appeared in FreeBSD 10\&.0\&. +.PP +The +\fB*allocx\fR\fB\fR +functions first appeared in FreeBSD 11\&.0\&. .SH "AUTHOR" .PP \fBJason Evans\fR Modified: head/contrib/jemalloc/include/jemalloc/internal/arena.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/arena.h Thu Jan 23 02:10:30 2014 (r261070) +++ head/contrib/jemalloc/include/jemalloc/internal/arena.h Thu Jan 23 02:47:36 2014 (r261071) @@ -158,6 +158,7 @@ struct arena_chunk_map_s { }; typedef rb_tree(arena_chunk_map_t) arena_avail_tree_t; typedef rb_tree(arena_chunk_map_t) arena_run_tree_t; +typedef ql_head(arena_chunk_map_t) arena_chunk_mapelms_t; /* Arena chunk header. */ struct arena_chunk_s { @@ -174,11 +175,12 @@ struct arena_chunk_s { size_t nruns_avail; /* - * Number of available run adjacencies. Clean and dirty available runs - * are not coalesced, which causes virtual memory fragmentation. The - * ratio of (nruns_avail-nruns_adjac):nruns_adjac is used for tracking - * this fragmentation. - * */ + * Number of available run adjacencies that purging could coalesce. + * Clean and dirty available runs are not coalesced, which causes + * virtual memory fragmentation. The ratio of + * (nruns_avail-nruns_adjac):nruns_adjac is used for tracking this + * fragmentation. + */ size_t nruns_adjac; /* @@ -404,7 +406,16 @@ void arena_tcache_fill_small(arena_t *ar size_t binind, uint64_t prof_accumbytes); void arena_alloc_junk_small(void *ptr, arena_bin_info_t *bin_info, bool zero); +#ifdef JEMALLOC_JET +typedef void (arena_redzone_corruption_t)(void *, size_t, bool, size_t, + uint8_t); +extern arena_redzone_corruption_t *arena_redzone_corruption; +typedef void (arena_dalloc_junk_small_t)(void *, arena_bin_info_t *); +extern arena_dalloc_junk_small_t *arena_dalloc_junk_small; +#else void arena_dalloc_junk_small(void *ptr, arena_bin_info_t *bin_info); +#endif +void arena_quarantine_junk_small(void *ptr, size_t usize); void *arena_malloc_small(arena_t *arena, size_t size, bool zero); void *arena_malloc_large(arena_t *arena, size_t size, bool zero); void *arena_palloc(arena_t *arena, size_t size, size_t alignment, bool zero); @@ -415,10 +426,18 @@ void arena_dalloc_bin(arena_t *arena, ar size_t pageind, arena_chunk_map_t *mapelm); void arena_dalloc_small(arena_t *arena, arena_chunk_t *chunk, void *ptr, size_t pageind); +#ifdef JEMALLOC_JET +typedef void (arena_dalloc_junk_large_t)(void *, size_t); +extern arena_dalloc_junk_large_t *arena_dalloc_junk_large; +#endif void arena_dalloc_large_locked(arena_t *arena, arena_chunk_t *chunk, void *ptr); void arena_dalloc_large(arena_t *arena, arena_chunk_t *chunk, void *ptr); -void *arena_ralloc_no_move(void *ptr, size_t oldsize, size_t size, +#ifdef JEMALLOC_JET +typedef void (arena_ralloc_junk_large_t)(void *, size_t, size_t); +extern arena_ralloc_junk_large_t *arena_ralloc_junk_large; +#endif +bool arena_ralloc_no_move(void *ptr, size_t oldsize, size_t size, size_t extra, bool zero); void *arena_ralloc(arena_t *arena, void *ptr, size_t oldsize, size_t size, size_t extra, size_t alignment, bool zero, bool try_tcache_alloc, @@ -473,7 +492,7 @@ size_t arena_bin_index(arena_t *arena, a unsigned arena_run_regind(arena_run_t *run, arena_bin_info_t *bin_info, const void *ptr); prof_ctx_t *arena_prof_ctx_get(const void *ptr); -void arena_prof_ctx_set(const void *ptr, prof_ctx_t *ctx); +void arena_prof_ctx_set(const void *ptr, size_t usize, prof_ctx_t *ctx); void *arena_malloc(arena_t *arena, size_t size, bool zero, bool try_tcache); size_t arena_salloc(const void *ptr, bool demote); void arena_dalloc(arena_t *arena, arena_chunk_t *chunk, void *ptr, @@ -885,10 +904,10 @@ arena_prof_ctx_get(const void *ptr) } JEMALLOC_INLINE void -arena_prof_ctx_set(const void *ptr, prof_ctx_t *ctx) +arena_prof_ctx_set(const void *ptr, size_t usize, prof_ctx_t *ctx) { arena_chunk_t *chunk; - size_t pageind, mapbits; + size_t pageind; cassert(config_prof); assert(ptr != NULL); @@ -896,10 +915,17 @@ arena_prof_ctx_set(const void *ptr, prof chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - mapbits = arena_mapbits_get(chunk, pageind); - assert((mapbits & CHUNK_MAP_ALLOCATED) != 0); - if ((mapbits & CHUNK_MAP_LARGE) == 0) { + assert(arena_mapbits_allocated_get(chunk, pageind) != 0); + + if (usize > SMALL_MAXCLASS || (prof_promote && + ((uintptr_t)ctx != (uintptr_t)1U || arena_mapbits_large_get(chunk, + pageind) != 0))) { + assert(arena_mapbits_large_get(chunk, pageind) != 0); + arena_mapp_get(chunk, pageind)->prof_ctx = ctx; + } else { + assert(arena_mapbits_large_get(chunk, pageind) == 0); if (prof_promote == false) { + size_t mapbits = arena_mapbits_get(chunk, pageind); arena_run_t *run = (arena_run_t *)((uintptr_t)chunk + (uintptr_t)((pageind - (mapbits >> LG_PAGE)) << LG_PAGE)); @@ -911,12 +937,11 @@ arena_prof_ctx_set(const void *ptr, prof bin_info = &arena_bin_info[binind]; regind = arena_run_regind(run, bin_info, ptr); - *((prof_ctx_t **)((uintptr_t)run + bin_info->ctx0_offset - + (regind * sizeof(prof_ctx_t *)))) = ctx; - } else - assert((uintptr_t)ctx == (uintptr_t)1U); - } else - arena_mapp_get(chunk, pageind)->prof_ctx = ctx; + *((prof_ctx_t **)((uintptr_t)run + + bin_info->ctx0_offset + (regind * sizeof(prof_ctx_t + *)))) = ctx; + } + } } JEMALLOC_ALWAYS_INLINE void * Modified: head/contrib/jemalloc/include/jemalloc/internal/chunk_dss.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/chunk_dss.h Thu Jan 23 02:10:30 2014 (r261070) +++ head/contrib/jemalloc/include/jemalloc/internal/chunk_dss.h Thu Jan 23 02:47:36 2014 (r261071) @@ -7,7 +7,7 @@ typedef enum { dss_prec_secondary = 2, dss_prec_limit = 3 -} dss_prec_t ; +} dss_prec_t; #define DSS_PREC_DEFAULT dss_prec_secondary #define DSS_DEFAULT "secondary" Modified: head/contrib/jemalloc/include/jemalloc/internal/ckh.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/ckh.h Thu Jan 23 02:10:30 2014 (r261070) +++ head/contrib/jemalloc/include/jemalloc/internal/ckh.h Thu Jan 23 02:47:36 2014 (r261071) @@ -17,7 +17,7 @@ typedef bool ckh_keycomp_t (const void * * There are 2^LG_CKH_BUCKET_CELLS cells in each hash table bucket. Try to fit * one bucket per L1 cache line. */ -#define LG_CKH_BUCKET_CELLS (LG_CACHELINE - LG_SIZEOF_PTR - 1) +#define LG_CKH_BUCKET_CELLS (LG_CACHELINE - LG_SIZEOF_PTR - 1) #endif /* JEMALLOC_H_TYPES */ /******************************************************************************/ Modified: head/contrib/jemalloc/include/jemalloc/internal/hash.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/hash.h Thu Jan 23 02:10:30 2014 (r261070) +++ head/contrib/jemalloc/include/jemalloc/internal/hash.h Thu Jan 23 02:47:36 2014 (r261071) @@ -19,6 +19,11 @@ #ifdef JEMALLOC_H_INLINES #ifndef JEMALLOC_ENABLE_INLINE +uint32_t hash_x86_32(const void *key, int len, uint32_t seed); +void hash_x86_128(const void *key, const int len, uint32_t seed, + uint64_t r_out[2]); +void hash_x64_128(const void *key, const int len, const uint32_t seed, + uint64_t r_out[2]); void hash(const void *key, size_t len, const uint32_t seed, size_t r_hash[2]); #endif @@ -43,14 +48,14 @@ JEMALLOC_INLINE uint32_t hash_get_block_32(const uint32_t *p, int i) { - return p[i]; + return (p[i]); } JEMALLOC_INLINE uint64_t hash_get_block_64(const uint64_t *p, int i) { - return p[i]; + return (p[i]); } JEMALLOC_INLINE uint32_t @@ -63,7 +68,7 @@ hash_fmix_32(uint32_t h) h *= 0xc2b2ae35; h ^= h >> 16; - return h; + return (h); } JEMALLOC_INLINE uint64_t @@ -76,7 +81,7 @@ hash_fmix_64(uint64_t k) k *= QU(0xc4ceb9fe1a85ec53LLU); k ^= k >> 33; - return k; + return (k); } JEMALLOC_INLINE uint32_t @@ -127,12 +132,12 @@ hash_x86_32(const void *key, int len, ui h1 = hash_fmix_32(h1); - return h1; + return (h1); } UNUSED JEMALLOC_INLINE void hash_x86_128(const void *key, const int len, uint32_t seed, - uint64_t r_out[2]) + uint64_t r_out[2]) { const uint8_t * data = (const uint8_t *) key; const int nblocks = len / 16; @@ -234,7 +239,7 @@ hash_x86_128(const void *key, const int UNUSED JEMALLOC_INLINE void hash_x64_128(const void *key, const int len, const uint32_t seed, - uint64_t r_out[2]) + uint64_t r_out[2]) { const uint8_t *data = (const uint8_t *) key; const int nblocks = len / 16; @@ -310,7 +315,6 @@ hash_x64_128(const void *key, const int r_out[1] = h2; } - /******************************************************************************/ /* API. */ JEMALLOC_INLINE void Modified: head/contrib/jemalloc/include/jemalloc/internal/huge.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/huge.h Thu Jan 23 02:10:30 2014 (r261070) +++ head/contrib/jemalloc/include/jemalloc/internal/huge.h Thu Jan 23 02:47:36 2014 (r261071) @@ -19,10 +19,14 @@ extern malloc_mutex_t huge_mtx; void *huge_malloc(size_t size, bool zero); void *huge_palloc(size_t size, size_t alignment, bool zero); -void *huge_ralloc_no_move(void *ptr, size_t oldsize, size_t size, +bool huge_ralloc_no_move(void *ptr, size_t oldsize, size_t size, size_t extra); void *huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 03:14:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC4F19B7; Thu, 23 Jan 2014 03:14:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD7AA1447; Thu, 23 Jan 2014 03:14:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N3EnJM011316; Thu, 23 Jan 2014 03:14:49 GMT (envelope-from skreuzer@svn.freebsd.org) Received: (from skreuzer@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N3Enu6011314; Thu, 23 Jan 2014 03:14:49 GMT (envelope-from skreuzer@svn.freebsd.org) Message-Id: <201401230314.s0N3Enu6011314@svn.freebsd.org> From: Steven Kreuzer Date: Thu, 23 Jan 2014 03:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261072 - in head: share/man/man5 share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:14:50 -0000 Author: skreuzer (doc,ports committer) Date: Thu Jan 23 03:14:48 2014 New Revision: 261072 URL: http://svnweb.freebsd.org/changeset/base/261072 Log: Remove WITHOUT_ATF as it has been replaced by WITH_TESTS PR: conf/185326 Reported by: Igor Mozolevsky Approved by: hrs (mentor) Deleted: head/tools/build/options/WITHOUT_ATF Modified: head/share/man/man5/src.conf.5 head/share/mk/bsd.own.mk Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Jan 23 02:47:36 2014 (r261071) +++ head/share/man/man5/src.conf.5 Thu Jan 23 03:14:48 2014 (r261072) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd December 4, 2013 +.Dd January 21, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -113,9 +113,6 @@ checks. Set to not build .Xr at 1 and related utilities. -.It Va WITHOUT_ATF -.\" from FreeBSD: head/tools/build/options/WITHOUT_ATF 241823 2012-10-22 01:18:41Z marcel -Set to not build programs and libraries related to the ATF testing framework. .It Va WITHOUT_ATM .\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build @@ -245,12 +242,6 @@ and .Pp It is a default setting on arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_LLDB -.El .It Va WITH_CLANG_IS_CC .\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as @@ -627,9 +618,9 @@ and On amd64, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. -.It Va WITHOUT_LIBCPLUSPLUS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim -Set to avoid building libcxxrt and libc++. +.It Va WITH_LIBCPLUSPLUS +.\" from FreeBSD: head/tools/build/options/WITH_LIBCPLUSPLUS 228082 2011-11-28 17:56:46Z dim +Set to build libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD .\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Thu Jan 23 02:47:36 2014 (r261071) +++ head/share/mk/bsd.own.mk Thu Jan 23 03:14:48 2014 (r261072) @@ -251,7 +251,6 @@ __DEFAULT_YES_OPTIONS = \ ARM_EABI \ ASSERT_DEBUG \ AT \ - ATF \ ATM \ AUDIT \ AUTHPF \ From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 03:20:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B28EAC2B for ; Thu, 23 Jan 2014 03:20:04 +0000 (UTC) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D5141486 for ; Thu, 23 Jan 2014 03:20:04 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id i13so1578691qae.27 for ; Wed, 22 Jan 2014 19:20:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=lfQH93XeN+EY83/TY9UQtdnWt4+F2Hdk10jzLupu5Bg=; b=bT2dF6bGRZzhqAgLgv5RSxnXsBuI3p0Utj6AveZnScryHfavHlGcHWHJEfVNofGbd4 GXE1p4utJd/xFHa6EfgAQQ4YpxJGUMMac4pwNvHZEUS2UL4njjiFP+fDAao2vAsvlTJX Hm9sXhdX1oWu0aPUdNgp+L9cYxHR/6ivGxzrOJLfyR61d4lvhkD5JGo4oON8KmT7/kuk uAjilWn5bysibC4A7nluzfMXhCpFOFr0/lNHHfm7mSy3jOAWNG696SDEXCG+W8N4qzZH 0/ow/jea4dixbNEcPQ0cMQ5jbbzfSaqFeNjrcUe+PrFMJxAf183MWLez/h84OylqlXJ+ l7kQ== X-Gm-Message-State: ALoCoQnzEcuQyBnt8YGed6hmQZq3RMdMrE2Wpp0FBDY4Ivq2RS4d3uBxlPLwjCBVMBIOzPqgppRa X-Received: by 10.224.26.143 with SMTP id e15mr7970187qac.3.1390447203191; Wed, 22 Jan 2014 19:20:03 -0800 (PST) Received: from calypso.meroh.net (cpe-108-176-158-82.nyc.res.rr.com. [108.176.158.82]) by mx.google.com with ESMTPSA id g10sm17675690qaf.9.2014.01.22.19.19.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 19:20:00 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r261072 - in head: share/man/man5 share/mk tools/build/options From: Julio Merino In-Reply-To: <201401230314.s0N3Enu6011314@svn.freebsd.org> Date: Wed, 22 Jan 2014 22:19:59 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201401230314.s0N3Enu6011314@svn.freebsd.org> To: Steven Kreuzer X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:20:04 -0000 On Jan 22, 2014, at 22:14, Steven Kreuzer wrote: > Author: skreuzer (doc,ports committer) > Date: Thu Jan 23 03:14:48 2014 > New Revision: 261072 > URL: http://svnweb.freebsd.org/changeset/base/261072 >=20 > Log: > Remove WITHOUT_ATF as it has been replaced by WITH_TESTS >=20 > PR: conf/185326 > Reported by: Igor Mozolevsky > Approved by: hrs (mentor) Thanks for doing this. And please don't forget to MFC into stable/10. (Just a reminder because = I don't see a MFC tag in the commit message.)= From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 03:24:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F21DEC2; Thu, 23 Jan 2014 03:24:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A847151F; Thu, 23 Jan 2014 03:24:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N3Od6w015195; Thu, 23 Jan 2014 03:24:39 GMT (envelope-from skreuzer@svn.freebsd.org) Received: (from skreuzer@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N3Odbs015193; Thu, 23 Jan 2014 03:24:39 GMT (envelope-from skreuzer@svn.freebsd.org) Message-Id: <201401230324.s0N3Odbs015193@svn.freebsd.org> From: Steven Kreuzer Date: Thu, 23 Jan 2014 03:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261073 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:24:39 -0000 Author: skreuzer (doc,ports committer) Date: Thu Jan 23 03:24:38 2014 New Revision: 261073 URL: http://svnweb.freebsd.org/changeset/base/261073 Log: OpenSSL has been updated to version 1.0.1.f Approved by: hrs (mentor) Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jan 23 03:14:48 2014 (r261072) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jan 23 03:24:38 2014 (r261073) @@ -250,6 +250,9 @@ &man.lldb.1; has been updated to upstream snapshot version r196259. + + OpenSSL has + been updated to version 1.0.1.f. From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 04:05:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBF25E33; Thu, 23 Jan 2014 04:05:10 +0000 (UTC) Received: from mail-qc0-x22b.google.com (mail-qc0-x22b.google.com [IPv6:2607:f8b0:400d:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 616F11839; Thu, 23 Jan 2014 04:05:10 +0000 (UTC) Received: by mail-qc0-f171.google.com with SMTP id n7so1840167qcx.30 for ; Wed, 22 Jan 2014 20:05:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=S7S7lbM54dbd5yISY0ro2ZhwdQN2dbVHwTW01Zes2Hc=; b=LY0drWDz7kCes+oYAB9z1eL1/7wMn2tBQm2D7pU1dRqMHg6sU+0Idq0pajV2nt6NDk dxc8NTNHBDlm5ssG34RmXFgq3D2AyAzm1JcPkbCRgdiQ/McaHRo43acP42/l6v2NxiKN Qerp5v97NO4f0Imkr4QEXFHVMAaQbV9rCLfqgYRoP25qLIleFCGS45VryW1lIJPXoiIM NtRemDm3BigKkg9b76wWTkZYlINukhu0kkm1+wOLhkUQLL9KwSrBmXxrOwvrOo+GlMbv ahSw/3/1ZdL9aAzeFDkbKD8wWqLOGRnTRp3g0sTennyfeF3C/EqNKy4CftQsx8Eo2QOC 2COQ== MIME-Version: 1.0 X-Received: by 10.140.42.180 with SMTP id c49mr7939630qga.24.1390449909564; Wed, 22 Jan 2014 20:05:09 -0800 (PST) Received: by 10.224.52.8 with HTTP; Wed, 22 Jan 2014 20:05:09 -0800 (PST) Received: by 10.224.52.8 with HTTP; Wed, 22 Jan 2014 20:05:09 -0800 (PST) In-Reply-To: <1536225.gsjt6oXMt2@pippin.baldwin.cx> References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> Date: Wed, 22 Jan 2014 20:05:09 -0800 Message-ID: Subject: Re: svn commit: r260898 - head/sys/kern From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo , Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 04:05:11 -0000 .. Make it be an offset into the table rather than a pointer, then we can do dirty rcu style hacks to just replace and grow the table as we need more memory. Don't we have a standard way to pull memory from the top of the physmem area early on for allocations like this? Adrian On Jan 20, 2014 3:50 PM, "John Baldwin" wrote: > On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > > On 19 Jan 2014, at 17:59, Neel Natu wrote: > > > Author: neel > > > Date: Mon Jan 20 01:59:35 2014 > > > New Revision: 260898 > > > URL: http://svnweb.freebsd.org/changeset/base/260898 > > > > > > Log: > > > Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient > entries > > > for > > > WITNESS to actually work. > > > > This value should be automatically tuned... > > How do you propose to do so? This is the count of locks initialized before > witness' own SYSINIT is executed and the array it sizes is allocated > statically at compile time. This used to not be a static array, but an > intrusive list embedded in locks themselves, but we decided to shave a > pointer off of each lock that was only used for that and to use a > statically > sized table instead. > > -- > John Baldwin > From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 04:34:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9770841; Thu, 23 Jan 2014 04:34:41 +0000 (UTC) Received: from felyko.com (felyko.com [174.136.100.2]) by mx1.freebsd.org (Postfix) with ESMTP id 8D8AE1A68; Thu, 23 Jan 2014 04:34:41 +0000 (UTC) Received: from [10.0.1.3] (c-24-6-115-18.hsd1.ca.comcast.net [24.6.115.18]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 4B32839828; Wed, 22 Jan 2014 20:34:34 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r260898 - head/sys/kern From: Rui Paulo In-Reply-To: Date: Wed, 22 Jan 2014 20:34:47 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <0F26E4E1-5D75-413E-B92B-AA7092B87D89@FreeBSD.org> References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> To: Adrian Chadd X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Neel Natu , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 04:34:41 -0000 On 22 Jan 2014, at 20:05, Adrian Chadd wrote: > .. Make it be an offset into the table rather than a pointer, then we = can do dirty rcu style hacks to just replace and grow the table as we = need more memory. >=20 > Don't we have a standard way to pull memory from the top of the = physmem area early on for allocations like this? Perhaps a bit overkill for this problem? =20 -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 05:50:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C30D39A0; Thu, 23 Jan 2014 05:50:23 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id A9D6D1151; Thu, 23 Jan 2014 05:50:23 +0000 (UTC) Received: from Alfreds-MacBook-Pro.local (unknown [50.204.88.5]) by elvis.mu.org (Postfix) with ESMTPSA id CBB371A3C26; Wed, 22 Jan 2014 21:50:21 -0800 (PST) Message-ID: <52E0AD9A.2000704@freebsd.org> Date: Wed, 22 Jan 2014 21:50:18 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Rui Paulo , Adrian Chadd Subject: Re: svn commit: r260898 - head/sys/kern References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> <0F26E4E1-5D75-413E-B92B-AA7092B87D89@FreeBSD.org> In-Reply-To: <0F26E4E1-5D75-413E-B92B-AA7092B87D89@FreeBSD.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, Neel Natu , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 05:50:23 -0000 On 1/22/14, 8:34 PM, Rui Paulo wrote: > On 22 Jan 2014, at 20:05, Adrian Chadd wrote: > >> .. Make it be an offset into the table rather than a pointer, then we can do dirty rcu style hacks to just replace and grow the table as we need more memory. >> >> Don't we have a standard way to pull memory from the top of the physmem area early on for allocations like this? > Perhaps a bit overkill for this problem? Probably.. I keep thinking we should just increase the size by 2x but allow platforms to override. for "SMALL". -Alfred From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 06:03:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4B33169 for ; Thu, 23 Jan 2014 06:03:57 +0000 (UTC) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2DA3A12E4 for ; Thu, 23 Jan 2014 06:03:57 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=date:from:to :cc:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=sweb; b=JjX0ncNZUsIO8N0S13XFbCbcKJ0Kho42Q NYTmAPrMvuBcXS8zM5UZRFYY4Eu5bQEKdYmMnz73Lv3Zx5dLyqJHuO2w7/6FzKmj c/egqLkU6i/UZKoPVUZqKSa3UTrbD6xdiDb1IwYOUqZ4sBmLGtrDFRViGiCkNifY kFd9dTdPI8= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=date:from :to:cc:subject:message-id:references:mime-version:content-type :in-reply-to; s=sweb; bh=rzA87JDj64uul/XVYlXn21udp/qVSgs7QtkKmnj v824=; b=ID4jvzP6+SkJ2aMCo8bYkEOnOG+PPDibIw8xErpBGSOJqkI/KQ+OXed IDVcDehnM7Cu8iRFniXvntHuNqyxLY5pUIs826or4+qgpuCIcHKqkxDQmKrqM4DX THWMV9pxLiNGdGhZ0WtTReHseq/bXTP/TSt8V7+jju2rnCStFXdo= Received: (qmail 40940 invoked from network); 22 Jan 2014 23:57:14 -0600 Received: from unknown (HELO admin.xzibition.com) (bryan@shatow.net@173.160.118.90) by sweb.xzibition.com with ESMTPA; 22 Jan 2014 23:57:14 -0600 Date: Wed, 22 Jan 2014 23:57:10 -0600 From: Bryan Drewery To: John Baldwin Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Message-ID: <20140123055710.GA5421@admin.xzibition.com> References: <201401221659.s0MGxrc7056036@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: <201401221659.s0MGxrc7056036@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 06:03:57 -0000 --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 22, 2014 at 04:59:53PM +0000, John Baldwin wrote: > Author: jhb > Date: Wed Jan 22 16:59:53 2014 > New Revision: 261031 > URL: http://svnweb.freebsd.org/changeset/base/261031 >=20 > Log: > Generate /var/db/services.db during 'make distribution' so that it is > present during new installs. Update etcupdate and mergemaster to > ignore the generated file. > =20 > Tested by: gjb (release build) > MFC after: 1 month >=20 > Modified: > head/Makefile.inc1 > head/etc/Makefile > head/usr.sbin/etcupdate/etcupdate.sh > head/usr.sbin/mergemaster/mergemaster.sh >=20 > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/Makefile.inc1 Wed Jan 22 16:50:18 2014 (r261030) > +++ head/Makefile.inc1 Wed Jan 22 16:59:53 2014 (r261031) > @@ -771,7 +771,7 @@ _nmtree_itools=3D nmtree > ITOOLS=3D [ awk cap_mkdb cat chflags chmod chown \ > date echo egrep find grep id install ${_install-info} \ > ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \ > - rm sed sh sysctl test true uname wc ${_zoneinfo} > + rm sed services_mkdb sh sysctl test true uname wc ${_zoneinfo} > =20 > # > # distributeworld >=20 > Modified: head/etc/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/etc/Makefile Wed Jan 22 16:50:18 2014 (r261030) > +++ head/etc/Makefile Wed Jan 22 16:59:53 2014 (r261031) > @@ -198,6 +198,8 @@ distribution: > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ > ${BIN1} ${DESTDIR}/etc; \ > cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ > + services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.db \ > + ${DESTDIR}/etc/services; \ Something is not right here. Building in a jail with make distribution fails: cd /zpoudriere/jails/head/usr/src/etc; install -o root -g wheel -m 644 cr= ontab devd.conf devfs.conf ddb.conf dhclient.conf disktab fbtab ftpu= sers gettytab group hosts hosts.allow hosts.equiv inetd.conf libalia= s.conf libmap.conf login.access login.conf mac.conf motd netconfig n= etwork.subr networks newsyslog.conf nsswitch.conf phones profile prot= ocols rc rc.bsdextended rc.firewall rc.initdiskless rc.sendmail rc.sh= utdown rc.subr remote rpc services shells sysctl.conf syslog.conf t= ermcap.small libmap32.conf etc.amd64/ttys amd.map apmd.conf snmpd.config fr= eebsd-update.conf /zpoudriere/jails/head/usr/src/etc/../usr.bin/locate/loca= te/locate.rc hosts.lpd printcap /zpoudriere/jails/head/usr/src/etc/../usr.b= in/mail/misc/mail.rc ntp.conf nscd.conf portsnap.conf pf.os csh.cshrc csh.l= ogin csh.logout regdomain.xml /zpoudriere/jails/head/etc; cap_mkdb -l /zpo= udriere/jails/head/etc/login.conf; services_mkdb -l -q -o /zpoudriere/jail= s/head/var/db/services.db /zpoudriere/jails/head/etc/services; install -o= root -g wheel -m 755 netstart pccard_ether rc.suspend rc.resume /zpoudrie= re/jails/head/etc; install -o root -g wheel -m 600 master.passwd nsmb.con= f opieaccess /zpoudriere/jails/head/etc; services_mkdb: illegal option -- l Usage: services_mkdb [-q] [-o ] [] services_mkdb -u [] *** Error code 1 Stop. make[2]: stopped in /zpoudriere/jails/head/usr/src/etc *** Error code 1 > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ > ${BIN2} ${DESTDIR}/etc; \ > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ >=20 > Modified: head/usr.sbin/etcupdate/etcupdate.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.sbin/etcupdate/etcupdate.sh Wed Jan 22 16:50:18 2014 (r26103= 0) > +++ head/usr.sbin/etcupdate/etcupdate.sh Wed Jan 22 16:59:53 2014 (r26103= 1) > @@ -213,7 +213,8 @@ build_tree() > =20 > # Purge auto-generated files. Only the source files need to > # be updated after which these files are regenerated. > - rm -f $1/etc/*.db $1/etc/passwd >&3 2>&1 || return 1 > + rm -f $1/etc/*.db $1/etc/passwd $1/var/db/services.db >&3 2>&1 || \ > + return 1 > =20 > # Remove empty files. These just clutter the output of 'diff'. > find $1 -type f -size 0 -delete >&3 2>&1 || return 1 >=20 > Modified: head/usr.sbin/mergemaster/mergemaster.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.sbin/mergemaster/mergemaster.sh Wed Jan 22 16:50:18 2014 (r2= 61030) > +++ head/usr.sbin/mergemaster/mergemaster.sh Wed Jan 22 16:59:53 2014 (r2= 61031) > @@ -699,7 +699,8 @@ case "${RERUN}" in > # or spwd.db. Instead, we want to compare the text versions, and run = *_mkdb. > # Prompt the user to do so below, as needed. > # > - rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd > + rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd \ > + ${TEMPROOT}/var/db/services.db > =20 > # We only need to compare things like freebsd.cf once > find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJS4K81XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNkZFQkU5OTJGNTI4MERGNDgxMTM2MkE2 RTc4MkFDMDNDOUIwQ0Y5AAoJEG54KsA8mwz5TDgP/343XoCjvHVRtVGhpQpq3acx nWCokmjWXt2eUMZO+AhW9qtfN5AREOuTuVVFCZR63yc9acFiG17S7qS2mNfp0Evr KSG+rj4LdQ5X9ByBUEv3vziZ7eR6WYPTAjqIk0OBThmQu+1uP+cIq3TlHdJsZ0nB GCNQTP7yeGh1kOF7zK7gGJtyqQPe1TB6qPEAR+Mg8sJlMlAdTs/KGEZBRyIwg1kH usddhUl8mn2Xbk+K5rGLEyixAD7X2WsN9p47uozmkV11eG0W1c/LgovLgo1a8//W A7xH8rnJSa/vAj5mAJFHtMVevsbm5uiRUSvaEqa2GtVfRx5wF3TFa2j2wsnAtJJt yU+ipKZqaRojIuqVdp4yjWg/m3tMGN0Fk9WJ+3zgKZo6OwPUPaXTgs+D6gTDYh9E T/mSzfitBlaCVzT/WkK29MQ3k/SRy/rvsMmdddlhosO8Vy+DVePIj3KxQj57nxQ3 0hCTvL6w5bDAipwzGZ3EWCiXfAPGbI1Rq3OgV3UmJLyR1btGQfPXk9Gckm28yR/B 8+2QvGpul41S1RRTbF6k+fkbcfjlD16oGKCuPIG2ym/RfbBVzHFIWNyWCMX5yaen Qbj0aXWaBcyNua0ZOdQazKawXhAyIQqWS8EX/nWFAGeEoH6/3SV6y2ZXWiRuOYIM bMoAnO9PAU85B8Ioz1lr =dGlB -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 06:06:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43C6B38B; Thu, 23 Jan 2014 06:06:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 164BA12FE; Thu, 23 Jan 2014 06:06:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N66oAN078060; Thu, 23 Jan 2014 06:06:50 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N66o2B078059; Thu, 23 Jan 2014 06:06:50 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201401230606.s0N66o2B078059@svn.freebsd.org> From: Neel Natu Date: Thu, 23 Jan 2014 06:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261074 - head/sys/amd64/vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 06:06:51 -0000 Author: neel Date: Thu Jan 23 06:06:50 2014 New Revision: 261074 URL: http://svnweb.freebsd.org/changeset/base/261074 Log: Set "Interrupt Window Exiting" in the case where there is a vector to be injected into the vcpu but the VM-entry interruption information field already has the valid bit set. Pointed out by: David Reed (david.reed@tidalscale.com) Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Thu Jan 23 03:24:38 2014 (r261073) +++ head/sys/amd64/vmm/intel/vmx.c Thu Jan 23 06:06:50 2014 (r261074) @@ -1121,15 +1121,15 @@ vmx_inject_interrupts(struct vmx *vmx, i } /* - * If there is already an interrupt pending then just return. This - * could happen for multiple reasons: - * - A vectoring VM-entry was aborted due to astpending or rendezvous. - * - A VM-exit happened during event injection. - * - A NMI was injected above or after "NMI window exiting" VM-exit. + * If interrupt-window exiting is already in effect then don't bother + * checking for pending interrupts. This is just an optimization and + * not needed for correctness. */ - info = vmcs_read(VMCS_ENTRY_INTR_INFO); - if (info & VMCS_INTR_VALID) + if ((vmx->cap[vcpu].proc_ctls & PROCBASED_INT_WINDOW_EXITING) != 0) { + VCPU_CTR0(vmx->vm, vcpu, "Skip interrupt injection due to " + "pending int_window_exiting"); return; + } /* Ask the local apic for a vector to inject */ if (!vlapic_pending_intr(vlapic, &vector)) @@ -1139,12 +1139,31 @@ vmx_inject_interrupts(struct vmx *vmx, i /* Check RFLAGS.IF and the interruptibility state of the guest */ rflags = vmcs_read(VMCS_GUEST_RFLAGS); - if ((rflags & PSL_I) == 0) + if ((rflags & PSL_I) == 0) { + VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to " + "rflags %#lx", vector, rflags); goto cantinject; + } gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); - if (gi & HWINTR_BLOCKING) + if (gi & HWINTR_BLOCKING) { + VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to " + "Guest Interruptibility-state %#x", vector, gi); goto cantinject; + } + + info = vmcs_read(VMCS_ENTRY_INTR_INFO); + if (info & VMCS_INTR_VALID) { + /* + * This is expected and could happen for multiple reasons: + * - A vectoring VM-entry was aborted due to astpending + * - A VM-exit happened during event injection. + * - An NMI was injected above or after "NMI window exiting" + */ + VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to " + "VM-entry intr info %#x", vector, info); + goto cantinject; + } /* Inject the interrupt */ info = VMCS_INTR_T_HWINTR | VMCS_INTR_VALID; From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 06:19:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52EE7981 for ; Thu, 23 Jan 2014 06:19:27 +0000 (UTC) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D48A01445 for ; Thu, 23 Jan 2014 06:19:26 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=date:from:to :cc:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=sweb; b=iyRuNJro68lS4/Dx2+b534Y3PRUKeefaw pujcxPK8H67Rzze30uwRETQ3TzepXsV2F5/RJkHJwJNqw8BXK3fU1vo4oWpmQ+uI FTkP0med3rj5T2aMRp0O7D66016JgDDVbPBfJ4ANFlVIJwSzOSLr+ndMsOk17z8Z Spq5KOuX0k= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=date:from :to:cc:subject:message-id:references:mime-version:content-type :in-reply-to; s=sweb; bh=HADP+SWgkMEEdYW4/Hw02BZpDIdhxTUZ8qz2wnk c2RU=; b=09lylB0jYhyi4/p7uEDjHyYucbYgesDzOmK9xzGycjkQRi8VGSvastf wepNVpj6xftpvStBc2BX/VCSX5nfvaIAZNghitW4JIeVP2QuJaWikw2weTs/x99I TkI8QyeV1l+SzoDnWlRs4sRbkLL5zH7LAL3auKh9tqx2m2wqjaqI= Received: (qmail 89886 invoked from network); 23 Jan 2014 00:19:23 -0600 Received: from unknown (HELO admin.xzibition.com) (bryan@shatow.net@173.160.118.90) by sweb.xzibition.com with ESMTPA; 23 Jan 2014 00:19:23 -0600 Date: Thu, 23 Jan 2014 00:19:22 -0600 From: Bryan Drewery To: John Baldwin Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Message-ID: <20140123061922.GB5421@admin.xzibition.com> References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <20140123055710.GA5421@admin.xzibition.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="i9LlY+UWpKt15+FH" Content-Disposition: inline In-Reply-To: <20140123055710.GA5421@admin.xzibition.com> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 06:19:27 -0000 --i9LlY+UWpKt15+FH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 22, 2014 at 11:57:10PM -0600, Bryan Drewery wrote: > On Wed, Jan 22, 2014 at 04:59:53PM +0000, John Baldwin wrote: > > Author: jhb > > Date: Wed Jan 22 16:59:53 2014 > > New Revision: 261031 > > URL: http://svnweb.freebsd.org/changeset/base/261031 > >=20 > > Log: > > Generate /var/db/services.db during 'make distribution' so that it is > > present during new installs. Update etcupdate and mergemaster to > > ignore the generated file. > > =20 > > Tested by: gjb (release build) > > MFC after: 1 month > >=20 > > Modified: > > head/Makefile.inc1 > > head/etc/Makefile > > head/usr.sbin/etcupdate/etcupdate.sh > > head/usr.sbin/mergemaster/mergemaster.sh > >=20 > > Modified: head/Makefile.inc1 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/Makefile.inc1 Wed Jan 22 16:50:18 2014 (r261030) > > +++ head/Makefile.inc1 Wed Jan 22 16:59:53 2014 (r261031) > > @@ -771,7 +771,7 @@ _nmtree_itools=3D nmtree > > ITOOLS=3D [ awk cap_mkdb cat chflags chmod chown \ > > date echo egrep find grep id install ${_install-info} \ > > ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \ > > - rm sed sh sysctl test true uname wc ${_zoneinfo} > > + rm sed services_mkdb sh sysctl test true uname wc ${_zoneinfo} > > =20 > > # > > # distributeworld > >=20 > > Modified: head/etc/Makefile > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/etc/Makefile Wed Jan 22 16:50:18 2014 (r261030) > > +++ head/etc/Makefile Wed Jan 22 16:59:53 2014 (r261031) > > @@ -198,6 +198,8 @@ distribution: > > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ > > ${BIN1} ${DESTDIR}/etc; \ > > cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ > > + services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.db= \ > > + ${DESTDIR}/etc/services; \ >=20 > Something is not right here. Building in a jail with make distribution > fails: Correction, I am not using jails here. This is setting TARGET_ARCH for a build. It seems to be using the already installed host version (which does not have the -l support) and not the just-built version. >=20 > cd /zpoudriere/jails/head/usr/src/etc; install -o root -g wheel -m 644 = crontab devd.conf devfs.conf ddb.conf dhclient.conf disktab fbtab ft= pusers gettytab group hosts hosts.allow hosts.equiv inetd.conf libal= ias.conf libmap.conf login.access login.conf mac.conf motd netconfig = network.subr networks newsyslog.conf nsswitch.conf phones profile pr= otocols rc rc.bsdextended rc.firewall rc.initdiskless rc.sendmail rc.= shutdown rc.subr remote rpc services shells sysctl.conf syslog.conf = termcap.small libmap32.conf etc.amd64/ttys amd.map apmd.conf snmpd.config = freebsd-update.conf /zpoudriere/jails/head/usr/src/etc/../usr.bin/locate/lo= cate/locate.rc hosts.lpd printcap /zpoudriere/jails/head/usr/src/etc/../usr= =2Ebin/mail/misc/mail.rc ntp.conf nscd.conf portsnap.conf pf.os csh.cshrc c= sh.login csh.logout regdomain.xml /zpoudriere/jails/head/etc; cap_mkdb -l = /zpoudriere/jails/head/etc/login.conf; services_mkdb -l -q -o /zpoudriere/= jails/head/var/db/services.db /zpoudriere/jails/head/etc/services; instal= l -o root -g wheel -m 755 netstart pccard_ether rc.suspend rc.resume /zpou= driere/jails/head/etc; install -o root -g wheel -m 600 master.passwd nsmb= =2Econf opieaccess /zpoudriere/jails/head/etc; > services_mkdb: illegal option -- l > Usage: services_mkdb [-q] [-o ] [] > services_mkdb -u [] > *** Error code 1 >=20 > Stop. > make[2]: stopped in /zpoudriere/jails/head/usr/src/etc > *** Error code 1 >=20 >=20 >=20 > > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ > > ${BIN2} ${DESTDIR}/etc; \ > > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ > >=20 > > Modified: head/usr.sbin/etcupdate/etcupdate.sh > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/usr.sbin/etcupdate/etcupdate.sh Wed Jan 22 16:50:18 2014 (r261= 030) > > +++ head/usr.sbin/etcupdate/etcupdate.sh Wed Jan 22 16:59:53 2014 (r261= 031) > > @@ -213,7 +213,8 @@ build_tree() > > =20 > > # Purge auto-generated files. Only the source files need to > > # be updated after which these files are regenerated. > > - rm -f $1/etc/*.db $1/etc/passwd >&3 2>&1 || return 1 > > + rm -f $1/etc/*.db $1/etc/passwd $1/var/db/services.db >&3 2>&1 || \ > > + return 1 > > =20 > > # Remove empty files. These just clutter the output of 'diff'. > > find $1 -type f -size 0 -delete >&3 2>&1 || return 1 > >=20 > > Modified: head/usr.sbin/mergemaster/mergemaster.sh > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/usr.sbin/mergemaster/mergemaster.sh Wed Jan 22 16:50:18 2014 (= r261030) > > +++ head/usr.sbin/mergemaster/mergemaster.sh Wed Jan 22 16:59:53 2014 (= r261031) > > @@ -699,7 +699,8 @@ case "${RERUN}" in > > # or spwd.db. Instead, we want to compare the text versions, and ru= n *_mkdb. > > # Prompt the user to do so below, as needed. > > # > > - rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd > > + rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd \ > > + ${TEMPROOT}/var/db/services.db > > =20 > > # We only need to compare things like freebsd.cf once > > find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null > > _______________________________________________ > > svn-src-all@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/svn-src-all > > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" --i9LlY+UWpKt15+FH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJS4LRqXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNkZFQkU5OTJGNTI4MERGNDgxMTM2MkE2 RTc4MkFDMDNDOUIwQ0Y5AAoJEG54KsA8mwz5chUP/0ZS+Ib2cKgCFdqMtRRERXwy C7VC3sX9xsHkU5cClNApf+EZLFrec6L0dlOl8l0nrVLNsz1w7OQbyEJMrWsFk2js MfcwsBGvUapRBcoZJvIqBgwUJ6LcWqEj89pQK/8o9Ftd+otkcM2KriBOcAnmjn0p PH2hPJNl00mi4XhmkpgfcBoRrQLfz9xqZvCUV6SJJ7qizOVLLhIxovIN7c2uoN37 sm14Fm+M43fEcSIoQKLbMacfzgrqvnc8AFLoTsPx3zTTxQB5YsL9dt4SAUuFdLDu mIkMu5HA2ro0XoXwlzYz9BqlJu2nDZSmeKOCXI0A8xyE9r7cDk/3Qq8Drsf6/KRL IV6JGdfzEhr9oQSbNrUcgjH+j7uJQIQPlr/IbvlPwPY7C5+s5L2i775MzaUZPelJ GM7QaJDLdMxV3lavk++1UUjAZb1d7fsUnG24uZYwdXJV+VcnUUdJSgNt1MnjwX0+ tdgkrwe+9w3qJzPSVJaYf2Zwvh0Ot+jO+35KJxRR1enSF30gPpQYUkJDXpIdYwbO L2gVZOaAgKZvnzimyGa/CL3F7NhPUGDinOsnnDP8IDVvo00Udlb0lS6c9zagEiyo GSpp/Onrvb7fTPEFdPnGGpK6JIaTbfacs3xfEfaGl2mCKSlWkX0+5g4toVlG/oGq H8lHhsgOw3y4nPIhyZxp =35uU -----END PGP SIGNATURE----- --i9LlY+UWpKt15+FH-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 06:36:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E513018B; Thu, 23 Jan 2014 06:36:43 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B34C2165E; Thu, 23 Jan 2014 06:36:43 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 8A688FAF1; Thu, 23 Jan 2014 06:36:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 8A688FAF1 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Thu, 23 Jan 2014 01:36:39 -0500 From: Glen Barber To: Bryan Drewery Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Message-ID: <20140123063639.GF52955@glenbarber.us> References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <20140123055710.GA5421@admin.xzibition.com> <20140123061922.GB5421@admin.xzibition.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GLp9dJVi+aaipsRk" Content-Disposition: inline In-Reply-To: <20140123061922.GB5421@admin.xzibition.com> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 06:36:44 -0000 --GLp9dJVi+aaipsRk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 23, 2014 at 12:19:22AM -0600, Bryan Drewery wrote: > > > Modified: head/etc/Makefile > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/etc/Makefile Wed Jan 22 16:50:18 2014 (r261030) > > > +++ head/etc/Makefile Wed Jan 22 16:59:53 2014 (r261031) > > > @@ -198,6 +198,8 @@ distribution: > > > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ > > > ${BIN1} ${DESTDIR}/etc; \ > > > cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ > > > + services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.= db \ > > > + ${DESTDIR}/etc/services; \ > >=20 > > Something is not right here. Building in a jail with make distribution > > fails: >=20 > Correction, I am not using jails here. This is setting TARGET_ARCH for a > build. >=20 > It seems to be using the already installed host version (which does not > have the -l support) and not the just-built version. >=20 It needs to use the build host version, because using (for example) powerpc resulting binary won't work on and amd64 system. Glen --GLp9dJVi+aaipsRk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJS4Lh3AAoJELls3eqvi17Q8ZsQALyOrvO2XSk76b39RSV5l0Jy dxX4fkUy77FKj1ut38gj9CZfvNmRbFg/L7Uij4T9G4Wk5QHNM5qOHcm7cGLjW+by V5Z+1eXkNux8de4JcT26buMuBdU1Pt4yXZG0J7ralRsrRS2tlE/EuCmKVHoyY52j Wc+YUhJOBh7qVEN7JgKxWwmCYpymhia/W8v31z0trkUUNwjRWIfCDcVslsO6zeKS LstlZ2RDojXVXzKxY4w9KR8QCR/bxXxOuyDq6K6CUXD7guqm7N602lXHalvqM62Q Yzzc/aXu99PSwKUewroAAmUSyeSlzQBgLTKfon31c2remdwVgOY1Mwl/P2nLWDWR /JmCSVBXawt7Xi9DHEAK/2uTWlrsbDfZFHGdDkU/fgo183eUi7ZTJkcsS81b9zZ1 vbBQwAZQrjq9fhAhaRO43spRVm8RFaJ+wt1LI5gxi0qWsDwjgbSYe/FEbKmMqaJr SQBxajrkFNMCWQ7WCDKpRue5VGhpVYr0GDZZwYJFoJ/PYWDgo/BS7UpsvyrZee1z A2RjJoqZPIApxHadLlOTM8eopjRcDAc6Bn1bsUq9PbiWorDOVmvcZYp+DOd1KUe4 husOYWEjFgJGro7tfmMC1M4ejqVANInxQr6wBMSTFU+eZuiu+sItI20PVY/Rx3tm ui7yYWUnEyPJarQURaz1 =CsaZ -----END PGP SIGNATURE----- --GLp9dJVi+aaipsRk-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 07:35:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8AB4A10; Thu, 23 Jan 2014 07:35:55 +0000 (UTC) Received: from mail-qa0-x236.google.com (mail-qa0-x236.google.com [IPv6:2607:f8b0:400d:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA041B63; Thu, 23 Jan 2014 07:35:55 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id i13so1789915qae.27 for ; Wed, 22 Jan 2014 23:35:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MYs1XN/LA5Z9xQvFRNQwOS3w35K+dFTJasvaovyP3bc=; b=KyIhkc2TfeteN24qa5soDgIxvSc/owXkVshdJzkHJlULyFg6HvDzoL3aQmugDX/g+L RBslQdaPUTTUDdoSjmlk8WuxmGCiZ31+ms5HJ1IQVxwO1+hdV5M7L7jBkA3I4M/DshJ3 o6szjoWaqquFR09Z9fPaQ/oTNa+wg1uO+i84vkUimTiMuVH4NqxsqWutC9IRSmSfWIL5 3N9lq5KXnYvwsYCxicq7JG/RfUyQ+O2jaa4iEBxVB0bRNdJormc5Slmuh1QbWHBuEsvD H99TYvilFF6+KNjcxRHOFTiDP5mmXkwH6L3RnELtor3rLKLzwmMSuGVvATUV+4W1oinb 5FMQ== MIME-Version: 1.0 X-Received: by 10.224.16.72 with SMTP id n8mr9356715qaa.76.1390462554397; Wed, 22 Jan 2014 23:35:54 -0800 (PST) Received: by 10.224.52.8 with HTTP; Wed, 22 Jan 2014 23:35:54 -0800 (PST) In-Reply-To: <0F26E4E1-5D75-413E-B92B-AA7092B87D89@FreeBSD.org> References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <1536225.gsjt6oXMt2@pippin.baldwin.cx> <0F26E4E1-5D75-413E-B92B-AA7092B87D89@FreeBSD.org> Date: Wed, 22 Jan 2014 23:35:54 -0800 Message-ID: Subject: Re: svn commit: r260898 - head/sys/kern From: Adrian Chadd To: Rui Paulo Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Neel Natu , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:35:55 -0000 On 22 January 2014 20:34, Rui Paulo wrote: > On 22 Jan 2014, at 20:05, Adrian Chadd wrote: > >> .. Make it be an offset into the table rather than a pointer, then we can do dirty rcu style hacks to just replace and grow the table as we need more memory. >> >> Don't we have a standard way to pull memory from the top of the physmem area early on for allocations like this? > > Perhaps a bit overkill for this problem? We already have platform dependent ways of doing this in the VM init path for exactly this - structures needed early at boot. It may be overkill but it may also be the cleanest way to allow boot-time tuned things based on early available information, which we may want to do when it's time to boot a single kernel on a 2-core atom board or a 256 core intel/amd server board. -a From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 09:37:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40BCBB49; Thu, 23 Jan 2014 09:37:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2CA531788; Thu, 23 Jan 2014 09:37:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0N9b410059113; Thu, 23 Jan 2014 09:37:04 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0N9b4sv059112; Thu, 23 Jan 2014 09:37:04 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201401230937.s0N9b4sv059112@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 23 Jan 2014 09:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261075 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:37:04 -0000 Author: pluknet Date: Thu Jan 23 09:37:03 2014 New Revision: 261075 URL: http://svnweb.freebsd.org/changeset/base/261075 Log: Update EINVAL description. This matches current POSIX standards and actual FreeBSD behavior. MFC after: 1 week Modified: head/lib/libc/sys/posix_fallocate.2 Modified: head/lib/libc/sys/posix_fallocate.2 ============================================================================== --- head/lib/libc/sys/posix_fallocate.2 Thu Jan 23 06:06:50 2014 (r261074) +++ head/lib/libc/sys/posix_fallocate.2 Thu Jan 23 09:37:03 2014 (r261075) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd January 23, 2014 .Dt POSIX_FALLOCATE 2 .Os .Sh NAME @@ -107,7 +107,7 @@ A signal was caught during execution. .It Bq Er EINVAL The .Fa len -argument was zero or the +argument was less than or equal to zero or the .Fa offset argument was less than zero. .It Bq Er EIO From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 09:59:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 493C727D; Thu, 23 Jan 2014 09:59:27 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E1B98196A; Thu, 23 Jan 2014 09:59:26 +0000 (UTC) Received: from srg.kevlo.org (mail.kevlo.org [220.135.115.6]) by ns.kevlo.org (8.14.6/8.14.6) with ESMTP id s0N9dVV0003376; Thu, 23 Jan 2014 17:39:31 +0800 (CST) (envelope-from kevlo@FreeBSD.org) Message-ID: <52E0E36E.2070509@FreeBSD.org> Date: Thu, 23 Jan 2014 17:39:58 +0800 From: Kevin Lo User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Hans Petter Selasky Subject: Re: svn commit: r261014 - head/sys/dev/usb/wlan References: <201401220957.s0M9vQfY070899@svn.freebsd.org> In-Reply-To: <201401220957.s0M9vQfY070899@svn.freebsd.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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:59:27 -0000 On 2014/01/22 17:57, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Jan 22 09:57:26 2014 > New Revision: 261014 > URL: http://svnweb.freebsd.org/changeset/base/261014 > > Log: > - Fix some non-portable code with regard to endianness. Don't use memmove(). > - Fix a range check for maximum transmit length. > - Fix read from missing field when transmitting data. > > MFC after: 2 weeks I appreciate you're taking the time to fix code, but your change totally breaks RT3573 and IQ calibration doesn't work for RT5372 and RT5572. I think it'd be good to send me the patch for testing/review before committing. Thanks! Kevin From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 10:11:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94E4E9C2; Thu, 23 Jan 2014 10:11:09 +0000 (UTC) Received: from mta05.bitpro.no (mta05.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id 43F7E1ADB; Thu, 23 Jan 2014 10:11:09 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta05.bitpro.no (Postfix) with ESMTPS id 8A64717FC8E; Thu, 23 Jan 2014 11:11:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id A2E121607AF; Thu, 23 Jan 2014 11:11:57 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V5wVqcxXtxxU; Thu, 23 Jan 2014 11:11:56 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 97DDC160758; Thu, 23 Jan 2014 11:11:56 +0100 (CET) Message-ID: <52E0EAF9.5080406@bitfrost.no> Date: Thu, 23 Jan 2014 11:12:09 +0100 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Kevin Lo Subject: Re: svn commit: r261014 - head/sys/dev/usb/wlan References: <201401220957.s0M9vQfY070899@svn.freebsd.org> <52E0E36E.2070509@FreeBSD.org> In-Reply-To: <52E0E36E.2070509@FreeBSD.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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:11:09 -0000 On 01/23/14 10:39, Kevin Lo wrote: > > On 2014/01/22 17:57, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Jan 22 09:57:26 2014 >> New Revision: 261014 >> URL: http://svnweb.freebsd.org/changeset/base/261014 >> >> Log: >> - Fix some non-portable code with regard to endianness. Don't use >> memmove(). >> - Fix a range check for maximum transmit length. >> - Fix read from missing field when transmitting data. >> MFC after: 2 weeks > > I appreciate you're taking the time to fix code, but your change totally > breaks RT3573 and IQ calibration doesn't work for RT5372 and RT5572. > I think it'd be good to send me the patch for testing/review > before committing. Thanks! > > Kevin > > Hi Kevin, That's fine. I don't have that chipset to test with. My dongle was working fine with the given patches. The fixes were based on code inspection. Will you send a new patch to fix the issues I've mentioned today? There are clearly some bugs in there either with or without the patch. Thank you! --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 10:18:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F35CD1B; Thu, 23 Jan 2014 10:18:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E9671B14; Thu, 23 Jan 2014 10:18:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NAIToC075028; Thu, 23 Jan 2014 10:18:29 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NAISGM075025; Thu, 23 Jan 2014 10:18:28 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401231018.s0NAISGM075025@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 23 Jan 2014 10:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261076 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:18:29 -0000 Author: hselasky Date: Thu Jan 23 10:18:28 2014 New Revision: 261076 URL: http://svnweb.freebsd.org/changeset/base/261076 Log: Revert r261014. Let Kevin fix it. MFC after: 1 week Modified: head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runvar.h Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Thu Jan 23 09:37:03 2014 (r261075) +++ head/sys/dev/usb/wlan/if_run.c Thu Jan 23 10:18:28 2014 (r261076) @@ -1356,22 +1356,11 @@ run_efuse_read(struct run_softc *sc, uin uint16_t reg; int error, ntries; - switch (count) { - case 1: - *val = 0xff; /* address not found */ - break; - case 2: - *val = 0xffff; /* address not found */ - addr *= 2; - break; - default: - *val = 0xffff; /* address not found */ - return (USB_ERR_INVAL); - } - if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) return (error); + if (count == 2) + addr *= 2; /*- * Read one 16-byte block into registers EFUSE_DATA[0-3]: * DATA0: F E D C @@ -1392,21 +1381,21 @@ run_efuse_read(struct run_softc *sc, uin if (ntries == 100) return (ETIMEDOUT); - if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) + if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) { + *val = 0xffff; /* address not found */ return (0); - + } /* determine to which 32-bit register our 16-bit word belongs */ reg = RT3070_EFUSE_DATA3 - (addr & 0xc); if ((error = run_read(sc, reg, &tmp)) != 0) return (error); - /* get correct bytes */ - *val = (uint16_t)(tmp >> (8 * (addr & 0x3))); - - /* mask for byte read, if any */ - if (count == 1) - *val &= 0xff; - + if (count == 2) + *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; + else { + tmp >>= (8 *(addr & 0x3)); + memmove(val, &tmp, sizeof(*val)); + } return (0); } @@ -3094,9 +3083,10 @@ tr_setup: STAILQ_REMOVE_HEAD(&pq->tx_qh, next); m = data->m; - size = (sc->mac_ver == 0x5592) ? - sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc); - if ((m->m_pkthdr.len + size + 3 + 8) > RUN_MAX_TXSZ) { + size = (sc->mac_ver == 0x5592) ? + RUN_MAX_TXSZ + sizeof(uint32_t) : RUN_MAX_TXSZ; + if ((m->m_pkthdr.len + + sizeof(data->desc) + 3 + 8) > size) { DPRINTF("data overflow, %u bytes\n", m->m_pkthdr.len); @@ -3108,6 +3098,8 @@ tr_setup: } pc = usbd_xfer_get_frame(xfer, 0); + size = (sc->mac_ver == 0x5592) ? + sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc); usbd_copy_in(pc, 0, &data->desc, size); usbd_m_copy_in(pc, size, m, 0, m->m_pkthdr.len); size += m->m_pkthdr.len; Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Thu Jan 23 09:37:03 2014 (r261075) +++ head/sys/dev/usb/wlan/if_runvar.h Thu Jan 23 10:18:28 2014 (r261076) @@ -89,7 +89,6 @@ struct run_tx_data { uint32_t align[0]; /* dummy field */ uint8_t desc[sizeof(struct rt2870_txd) + sizeof(struct rt2860_txwi)]; - uint8_t desc_extra[4]; /* used by v5592 */ uint8_t ridx; }; STAILQ_HEAD(run_tx_data_head, run_tx_data); From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 12:02:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36C09B33; Thu, 23 Jan 2014 12:02:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2064615C4; Thu, 23 Jan 2014 12:02:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NC25Dp015926; Thu, 23 Jan 2014 12:02:05 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NC24NB015916; Thu, 23 Jan 2014 12:02:04 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201401231202.s0NC24NB015916@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 23 Jan 2014 12:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261077 - in stable/10/sys: arm/broadcom/bcm2835 arm/lpc boot/uboot/lib dev/cesa dev/fdt powerpc/mpc85xx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 12:02:06 -0000 Author: loos Date: Thu Jan 23 12:02:04 2014 New Revision: 261077 URL: http://svnweb.freebsd.org/changeset/base/261077 Log: MFC r257127: Remove all the instances of '#undef DEBUG' from kernel. Suggested by: rpaulo Approved by: adrian (mentor) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c stable/10/sys/arm/lpc/if_lpe.c stable/10/sys/arm/lpc/lpc_mmc.c stable/10/sys/boot/uboot/lib/disk.c stable/10/sys/boot/uboot/lib/glue.c stable/10/sys/dev/cesa/cesa.c stable/10/sys/dev/fdt/fdt_slicer.c stable/10/sys/powerpc/mpc85xx/fsl_sdhc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu Jan 23 10:18:28 2014 (r261076) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu Jan 23 12:02:04 2014 (r261077) @@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" -#undef DEBUG - #ifdef DEBUG #define dprintf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) Modified: stable/10/sys/arm/lpc/if_lpe.c ============================================================================== --- stable/10/sys/arm/lpc/if_lpe.c Thu Jan 23 10:18:28 2014 (r261076) +++ stable/10/sys/arm/lpc/if_lpe.c Thu Jan 23 12:02:04 2014 (r261077) @@ -65,9 +65,6 @@ __FBSDID("$FreeBSD$"); #include "miibus_if.h" -#define DEBUG -#undef DEBUG - #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) Modified: stable/10/sys/arm/lpc/lpc_mmc.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_mmc.c Thu Jan 23 10:18:28 2014 (r261076) +++ stable/10/sys/arm/lpc/lpc_mmc.c Thu Jan 23 12:02:04 2014 (r261077) @@ -64,9 +64,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define DEBUG -#undef DEBUG - #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) Modified: stable/10/sys/boot/uboot/lib/disk.c ============================================================================== --- stable/10/sys/boot/uboot/lib/disk.c Thu Jan 23 10:18:28 2014 (r261076) +++ stable/10/sys/boot/uboot/lib/disk.c Thu Jan 23 12:02:04 2014 (r261077) @@ -45,9 +45,6 @@ __FBSDID("$FreeBSD$"); #include "glue.h" #include "libuboot.h" -#define DEBUG -#undef DEBUG - #define stor_printf(fmt, args...) do { \ printf("%s%d: ", dev->d_dev->dv_name, dev->d_unit); \ printf(fmt, ##args); \ Modified: stable/10/sys/boot/uboot/lib/glue.c ============================================================================== --- stable/10/sys/boot/uboot/lib/glue.c Thu Jan 23 10:18:28 2014 (r261076) +++ stable/10/sys/boot/uboot/lib/glue.c Thu Jan 23 12:02:04 2014 (r261077) @@ -34,9 +34,6 @@ __FBSDID("$FreeBSD$"); #include "api_public.h" #include "glue.h" -#define DEBUG -#undef DEBUG - #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); printf(fmt,##args); } while (0) #else Modified: stable/10/sys/dev/cesa/cesa.c ============================================================================== --- stable/10/sys/dev/cesa/cesa.c Thu Jan 23 10:18:28 2014 (r261076) +++ stable/10/sys/dev/cesa/cesa.c Thu Jan 23 12:02:04 2014 (r261077) @@ -71,8 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include "cesa.h" -#undef DEBUG - static int cesa_probe(device_t); static int cesa_attach(device_t); static int cesa_detach(device_t); Modified: stable/10/sys/dev/fdt/fdt_slicer.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_slicer.c Thu Jan 23 10:18:28 2014 (r261076) +++ stable/10/sys/dev/fdt/fdt_slicer.c Thu Jan 23 12:02:04 2014 (r261077) @@ -35,9 +35,6 @@ __FBSDID("$FreeBSD$"); #include -#define DEBUG -#undef DEBUG - #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) Modified: stable/10/sys/powerpc/mpc85xx/fsl_sdhc.c ============================================================================== --- stable/10/sys/powerpc/mpc85xx/fsl_sdhc.c Thu Jan 23 10:18:28 2014 (r261076) +++ stable/10/sys/powerpc/mpc85xx/fsl_sdhc.c Thu Jan 23 12:02:04 2014 (r261077) @@ -64,8 +64,6 @@ __FBSDID("$FreeBSD$"); #include "fsl_sdhc.h" -#define DEBUG -#undef DEBUG #ifdef DEBUG #define DPRINTF(fmt, arg...) printf("DEBUG %s(): " fmt, __FUNCTION__, ##arg) #else From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 12:32:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6E54373; Thu, 23 Jan 2014 12:32:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C0950186C; Thu, 23 Jan 2014 12:32:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NCWWVa027574; Thu, 23 Jan 2014 12:32:32 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NCWV8L027563; Thu, 23 Jan 2014 12:32:31 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201401231232.s0NCWV8L027563@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 23 Jan 2014 12:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261078 - in stable/10/sys: arm/broadcom/bcm2835 arm/conf boot/fdt/dts conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 12:32:32 -0000 Author: loos Date: Thu Jan 23 12:32:30 2014 New Revision: 261078 URL: http://svnweb.freebsd.org/changeset/base/261078 Log: MFC r256959: Add the Raspberry Pi BSC (I2C compliant) controller driver. Reviewed by: rpaulo MFC r256961: Enable the build of OFW I2C bus for FDT systems. MFC r258045: As all the IIC controllers on system uses the same 'iichb' prefix we cannot rely only on checking the device unit to indentify the BSC unit we are attaching to. Make use of the device base address to identify our BSC unit. MFC r259127: Bring the RPi I2C driver in line with ti_i2c. Make it treat any slave address as a 7-bit address. Approved by: adrian (mentor) Added: stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c - copied, changed from r256959, head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h - copied unchanged from r256959, head/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h - copied, changed from r256959, head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/arm/conf/RPI-B stable/10/sys/boot/fdt/dts/bcm2835.dtsi stable/10/sys/conf/files Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c (from r256959, head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c) ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Wed Oct 23 12:29:39 2013 (r256959, copy source) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Thu Jan 23 12:32:30 2014 (r261078) @@ -234,31 +234,13 @@ static int bcm_bsc_attach(device_t dev) { struct bcm_bsc_softc *sc; + unsigned long start; device_t gpio; - int rid; - - if (device_get_unit(dev) > 1) { - device_printf(dev, "only bsc0 and bsc1 are supported\n"); - return (ENXIO); - } + int i, rid; sc = device_get_softc(dev); sc->sc_dev = dev; - /* - * Configure the GPIO pins to ALT0 function to enable BSC control - * over the pins. - */ - gpio = devclass_get_device(devclass_find("gpio"), 0); - if (!gpio) { - device_printf(dev, "cannot find gpio0\n"); - return (ENXIO); - } - bcm_gpio_set_alternate(gpio, bcm_bsc_pins[device_get_unit(dev)].sda, - BCM_GPIO_ALT0); - bcm_gpio_set_alternate(gpio, bcm_bsc_pins[device_get_unit(dev)].scl, - BCM_GPIO_ALT0); - rid = 0; sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -270,6 +252,29 @@ bcm_bsc_attach(device_t dev) sc->sc_bst = rman_get_bustag(sc->sc_mem_res); sc->sc_bsh = rman_get_bushandle(sc->sc_mem_res); + /* Check the unit we are attaching by its base address. */ + start = rman_get_start(sc->sc_mem_res); + for (i = 0; i < nitems(bcm_bsc_pins); i++) { + if (bcm_bsc_pins[i].start == start) + break; + } + if (i == nitems(bcm_bsc_pins)) { + device_printf(dev, "only bsc0 and bsc1 are supported\n"); + return (ENXIO); + } + + /* + * Configure the GPIO pins to ALT0 function to enable BSC control + * over the pins. + */ + gpio = devclass_get_device(devclass_find("gpio"), 0); + if (!gpio) { + device_printf(dev, "cannot find gpio0\n"); + return (ENXIO); + } + bcm_gpio_set_alternate(gpio, bcm_bsc_pins[i].sda, BCM_GPIO_ALT0); + bcm_gpio_set_alternate(gpio, bcm_bsc_pins[i].scl, BCM_GPIO_ALT0); + rid = 0; sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); @@ -399,7 +404,7 @@ bcm_bsc_transfer(device_t dev, struct ii for (i = 0; i < nmsgs; i++) { /* Write the slave address. */ - BCM_BSC_WRITE(sc, BCM_BSC_SLAVE, (msgs[i].slave >> 1) & 0x7f); + BCM_BSC_WRITE(sc, BCM_BSC_SLAVE, msgs[i].slave); /* Write the data length. */ BCM_BSC_WRITE(sc, BCM_BSC_DLEN, msgs[i].len); Copied: stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h (from r256959, head/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h Thu Jan 23 12:32:30 2014 (r261078, copy of r256959, head/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2012 Oleksandr Tymoshenko + * Copyright (c) 2013 Luiz Otavio O Souza + * 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. + * + * $FreeBSD$ + */ + +#ifndef _BCM2835_BSCREG_H_ +#define _BCM2835_BSCREG_H_ + +#define BCM_BSC_CORE_CLK 150000000U +#define BCM_BSC_CTRL 0x00 +#define BCM_BSC_CTRL_I2CEN (1 << 15) +#define BCM_BSC_CTRL_INTR (1 << 10) +#define BCM_BSC_CTRL_INTT (1 << 9) +#define BCM_BSC_CTRL_INTD (1 << 8) +#define BCM_BSC_CTRL_ST (1 << 7) +#define BCM_BSC_CTRL_CLEAR1 (1 << 5) +#define BCM_BSC_CTRL_CLEAR0 (1 << 4) +#define BCM_BSC_CTRL_READ (1 << 0) +#define BCM_BSC_STATUS 0x04 +#define BCM_BSC_STATUS_CLKT (1 << 9) +#define BCM_BSC_STATUS_ERR (1 << 8) +#define BCM_BSC_STATUS_RXF (1 << 7) +#define BCM_BSC_STATUS_TXE (1 << 6) +#define BCM_BSC_STATUS_RXD (1 << 5) +#define BCM_BSC_STATUS_TXD (1 << 4) +#define BCM_BSC_STATUS_RXR (1 << 3) +#define BCM_BSC_STATUS_TXW (1 << 2) +#define BCM_BSC_STATUS_DONE (1 << 1) +#define BCM_BSC_STATUS_TA (1 << 0) +#define BCM_BSC_DLEN 0x08 +#define BCM_BSC_SLAVE 0x0c +#define BCM_BSC_DATA 0x10 +#define BCM_BSC_CLOCK 0x14 +#define BCM_BSC_DELAY 0x18 +#define BCM_BSC_CLKT 0x1c + +#endif /* _BCM2835_BSCREG_H_ */ Copied and modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h (from r256959, head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h) ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Wed Oct 23 12:29:39 2013 (r256959, copy source) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Thu Jan 23 12:32:30 2014 (r261078) @@ -33,9 +33,10 @@ struct { uint32_t sda; uint32_t scl; + unsigned long start; } bcm_bsc_pins[] = { - { 0, 1 }, /* BSC0 GPIO pins. */ - { 2, 3 } /* BSC1 GPIO pins. */ + { 0, 1, 0x20205000 }, /* BSC0 GPIO pins and base address. */ + { 2, 3, 0x20804000 } /* BSC1 GPIO pins and base address. */ }; struct bcm_bsc_softc { Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Thu Jan 23 12:02:04 2014 (r261077) +++ stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Thu Jan 23 12:32:30 2014 (r261078) @@ -1,5 +1,6 @@ # $FreeBSD$ +arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc arm/broadcom/bcm2835/bcm2835_dma.c standard arm/broadcom/bcm2835/bcm2835_fb.c optional sc arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Thu Jan 23 12:02:04 2014 (r261077) +++ stable/10/sys/arm/conf/RPI-B Thu Jan 23 12:32:30 2014 (r261078) @@ -79,6 +79,11 @@ device mmcsd device gpio device gpioled +# I2C +device iic +device iicbus +device bcm2835_bsc + options KDB options DDB #Enable the kernel debugger options INVARIANTS #Enable calls of extra sanity checking Modified: stable/10/sys/boot/fdt/dts/bcm2835.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/bcm2835.dtsi Thu Jan 23 12:02:04 2014 (r261077) +++ stable/10/sys/boot/fdt/dts/bcm2835.dtsi Thu Jan 23 12:32:30 2014 (r261078) @@ -396,6 +396,22 @@ }; }; + bsc0 { + compatible = "broadcom,bcm2835-bsc", + "broadcom,bcm2708-bsc"; + reg = <0x205000 0x20>; + interrupts = <61>; + interrupt-parent = <&intc>; + }; + + bsc1 { + compatible = "broadcom,bcm2835-bsc", + "broadcom,bcm2708-bsc"; + reg = <0x804000 0x20>; + interrupts = <61>; + interrupt-parent = <&intc>; + }; + spi0 { compatible = "broadcom,bcm2835-spi", "broadcom,bcm2708-spi"; Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu Jan 23 12:02:04 2014 (r261077) +++ stable/10/sys/conf/files Thu Jan 23 12:32:30 2014 (r261078) @@ -1914,6 +1914,7 @@ dev/ofw/ofw_bus_if.m optional fdt dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_if.m optional fdt +dev/ofw/ofw_iicbus.c optional fdt iicbus dev/ofw/openfirm.c optional fdt dev/ofw/openfirmio.c optional fdt dev/patm/if_patm.c optional patm pci From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 14:13:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7B9292A; Thu, 23 Jan 2014 14:13:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B2C2B128F; Thu, 23 Jan 2014 14:13:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NEDCkD065867; Thu, 23 Jan 2014 14:13:12 GMT (envelope-from skreuzer@svn.freebsd.org) Received: (from skreuzer@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NEDCPj065866; Thu, 23 Jan 2014 14:13:12 GMT (envelope-from skreuzer@svn.freebsd.org) Message-Id: <201401231413.s0NEDCPj065866@svn.freebsd.org> From: Steven Kreuzer Date: Thu, 23 Jan 2014 14:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261079 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 14:13:12 -0000 Author: skreuzer (doc,ports committer) Date: Thu Jan 23 14:13:12 2014 New Revision: 261079 URL: http://svnweb.freebsd.org/changeset/base/261079 Log: jemalloc has been updated to version 3.5.0. Approved by: hrs (mentor) Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jan 23 12:32:30 2014 (r261078) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jan 23 14:13:12 2014 (r261079) @@ -253,6 +253,9 @@ OpenSSL has been updated to version 1.0.1.f. + + &man.jemalloc.3; has been updated to + version 3.5.0. From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 15:28:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0188FDF9; Thu, 23 Jan 2014 15:28:33 +0000 (UTC) Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93DDE1920; Thu, 23 Jan 2014 15:28:32 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id wp4so2166995obc.39 for ; Thu, 23 Jan 2014 07:28:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zi7x/mcd7ovR6zuF112w/OXo50yi5Ld7tAGn4z4TpYc=; b=hLdGKXYWR3tOELfeRsJ8dVhLIT80OHZcwB/ivl8BbYKWGzjUD6Q8XjxduiGG/KUPE1 NEc4dQbYWzcGQ//lg+QvLwGwPrkfw67zyENOeXoAC3cOjDhslvrm9Qo/yZyfcqD1GnJh 6Le+mMaI2RgvNDn4XVd0X6gF6JL7tM3FWv/E4M4Csg0gPVqPy/WrDDh7Id6tIzaGZykn 63HVRxp/vGpglfd0UopFkXC7U6go1ntvQlh0wAD9UnvNx3pbWpkcxP5bj+Z0hGBMg77Y Yi0g82duciwYbk5IRYXY7zJzxFrH++GmZ33LXWu9OhbXD+T8V1rctvzm0mA2mcb+Tr/P F7sg== MIME-Version: 1.0 X-Received: by 10.60.65.5 with SMTP id t5mr6390464oes.19.1390490911467; Thu, 23 Jan 2014 07:28:31 -0800 (PST) Received: by 10.182.92.36 with HTTP; Thu, 23 Jan 2014 07:28:31 -0800 (PST) In-Reply-To: <201401230937.s0N9b4sv059112@svn.freebsd.org> References: <201401230937.s0N9b4sv059112@svn.freebsd.org> Date: Thu, 23 Jan 2014 10:28:31 -0500 Message-ID: Subject: Re: svn commit: r261075 - head/lib/libc/sys From: Benjamin Kaduk To: Sergey Kandaurov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:28:33 -0000 On Thu, Jan 23, 2014 at 4:37 AM, Sergey Kandaurov wrote: > Author: pluknet > Date: Thu Jan 23 09:37:03 2014 > New Revision: 261075 > URL: http://svnweb.freebsd.org/changeset/base/261075 > > Log: > Update EINVAL description. > This matches current POSIX standards and actual FreeBSD behavior. > The STANDARDS section mentions only IEEE Std 1003.1-2004 (``POSIX.1''), which seems to not be the current revision. I see that Bruce has made more comments on the PR, so maybe the fixes can be consolidated into a single patch. -Ben From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 15:42:39 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0589382; Thu, 23 Jan 2014 15:42:39 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 793BF1A86; Thu, 23 Jan 2014 15:42:38 +0000 (UTC) Received: from whitestar.lan (70-91-204-25-BusName-SFBA.hfc.comcastbusiness.net [70.91.204.25]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id s0NFgY1V053765 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 23 Jan 2014 15:42:36 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster From: David Chisnall In-Reply-To: <20140123063639.GF52955@glenbarber.us> Date: Thu, 23 Jan 2014 07:42:36 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <5A563133-0BAC-4E4E-8BD5-AE64086A7B6E@FreeBSD.org> References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <20140123055710.GA5421@admin.xzibition.com> <20140123061922.GB5421@admin.xzibition.com> <20140123063639.GF52955@glenbarber.us> To: Glen Barber X-Mailer: Apple Mail (2.1822) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin , Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:42:39 -0000 On 22 Jan 2014, at 22:36, Glen Barber wrote: > It needs to use the build host version, because using (for example) > powerpc resulting binary won't work on and amd64 system. If it's used as part of the build, then it should be part of the = toolchain target and we should be using the version built there. David From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 17:24:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 956E2D37; Thu, 23 Jan 2014 17:24:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 672E615AA; Thu, 23 Jan 2014 17:24:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NHORPw039587; Thu, 23 Jan 2014 17:24:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NHOQLE039584; Thu, 23 Jan 2014 17:24:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201401231724.s0NHOQLE039584@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 23 Jan 2014 17:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261080 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:24:27 -0000 Author: kib Date: Thu Jan 23 17:24:26 2014 New Revision: 261080 URL: http://svnweb.freebsd.org/changeset/base/261080 Log: The posix_fallocate(2) syscall should return error number on error, without modifying errno. Reported and tested by: Gennady Proskurin Reviewed by: mdf PR: standards/186028 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/sys/posix_fallocate.2 head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/vfs_syscalls.c Modified: head/lib/libc/sys/posix_fallocate.2 ============================================================================== --- head/lib/libc/sys/posix_fallocate.2 Thu Jan 23 14:13:12 2014 (r261079) +++ head/lib/libc/sys/posix_fallocate.2 Thu Jan 23 17:24:26 2014 (r261080) @@ -83,9 +83,9 @@ that reduces the file size to a size sma If successful, .Fn posix_fallocate returns zero. -It returns -1 on failure, and sets +It returns error number on failure, without setting .Va errno -to indicate the error. +variable. .Sh ERRORS Possible failure conditions: .Bl -tag -width Er Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 23 14:13:12 2014 (r261079) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 23 17:24:26 2014 (r261080) @@ -2995,8 +2995,9 @@ freebsd32_posix_fallocate(struct thread struct freebsd32_posix_fallocate_args *uap) { - return (kern_posix_fallocate(td, uap->fd, - PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len))); + td->td_retval[0] = kern_posix_fallocate(td, uap->fd, + PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len)); + return (0); } int Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Thu Jan 23 14:13:12 2014 (r261079) +++ head/sys/kern/vfs_syscalls.c Thu Jan 23 17:24:26 2014 (r261080) @@ -4584,7 +4584,9 @@ int sys_posix_fallocate(struct thread *td, struct posix_fallocate_args *uap) { - return (kern_posix_fallocate(td, uap->fd, uap->offset, uap->len)); + td->td_retval[0] = kern_posix_fallocate(td, uap->fd, uap->offset, + uap->len); + return (0); } /* From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 17:26:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7D35F0E; Thu, 23 Jan 2014 17:26:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C100915CC; Thu, 23 Jan 2014 17:26:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NHQTZZ039850; Thu, 23 Jan 2014 17:26:29 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NHQSA5039843; Thu, 23 Jan 2014 17:26:28 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201401231726.s0NHQSA5039843@svn.freebsd.org> From: Alan Somers Date: Thu, 23 Jan 2014 17:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261081 - in head: . etc/mtree tests/sys tests/sys/kern tools/regression/sockets/unix_seqpacket tools/regression/sockets/unix_seqpacket_exercise X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:26:29 -0000 Author: asomers Date: Thu Jan 23 17:26:28 2014 New Revision: 261081 URL: http://svnweb.freebsd.org/changeset/base/261081 Log: Replace the old unix_seqpacket and unix_seqpacket_exercise tests, which were a little broken and not automatable, with unix_seqpacket_test. It's coverage is a superset of the old tests and it uses ATF. It includes test cases for bugs kern/185813 and kern/185812. PR: kern/185812 PR: kern/185813 Sponsored by: Spectra Logic MFC after: 2 weeks Added: head/tests/sys/ head/tests/sys/Makefile (contents, props changed) head/tests/sys/kern/ head/tests/sys/kern/Makefile (contents, props changed) head/tests/sys/kern/unix_seqpacket_test.c (contents, props changed) Deleted: head/tools/regression/sockets/unix_seqpacket/ head/tools/regression/sockets/unix_seqpacket_exercise/ Modified: head/Makefile.inc1 head/etc/mtree/BSD.tests.dist Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jan 23 17:24:26 2014 (r261080) +++ head/Makefile.inc1 Thu Jan 23 17:26:28 2014 (r261081) @@ -417,7 +417,7 @@ LIB32WMAKEFLAGS+= \ -DNO_LINT LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \ - -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML + -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML -DNO_TESTS LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \ ${IMAKE_INSTALL} .endif Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Thu Jan 23 17:24:26 2014 (r261080) +++ head/etc/mtree/BSD.tests.dist Thu Jan 23 17:26:28 2014 (r261081) @@ -78,6 +78,10 @@ .. .. .. + sys + kern + .. + .. usr.bin atf atf-sh Added: head/tests/sys/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/Makefile Thu Jan 23 17:26:28 2014 (r261081) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/sys + +KYUAFILE= yes + +CLEANFILES+= Kyuafile +Kyuafile: ${.CURDIR}/../Kyuafile + cp -f ${.CURDIR}/../Kyuafile . + +.include Added: head/tests/sys/kern/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/Makefile Thu Jan 23 17:26:28 2014 (r261081) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/kern + +ATF_TESTS_C= unix_seqpacket_test +TEST_METADATA.unix_seqpacket_test+= timeout="15" + +LDADD+= -lpthread + +.include Added: head/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/unix_seqpacket_test.c Thu Jan 23 17:26:28 2014 (r261081) @@ -0,0 +1,1117 @@ +/*- + * Copyright (c) 2014 Spectra Logic Corporation. 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 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 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 + +/* + * Helper functions + */ + +#define MIN(x, y) ((x) < (y) ? (x) : (y)) +#define MAX(x, y) ((x) > (y) ? (x) : (y)) + +void +do_socketpair(int *sv) +{ + int s; + + s = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sv); + ATF_REQUIRE_EQ(0, s); + ATF_REQUIRE(sv[0] >= 0); + ATF_REQUIRE(sv[1] >= 0); + ATF_REQUIRE(sv[0] != sv[1]); +} + +void +do_socketpair_nonblocking(int *sv) +{ + int s; + + s = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sv); + ATF_REQUIRE_EQ(0, s); + ATF_REQUIRE(sv[0] >= 0); + ATF_REQUIRE(sv[1] >= 0); + ATF_REQUIRE(sv[0] != sv[1]); + ATF_REQUIRE(-1 != fcntl(sv[0], F_SETFL, O_NONBLOCK)); + ATF_REQUIRE(-1 != fcntl(sv[1], F_SETFL, O_NONBLOCK)); +} + +/* + * Returns a pair of sockets made the hard way: bind, listen, connect & accept + * @return const char* The path to the socket + */ +const char* +mk_pair_of_sockets(int *sv) +{ + struct sockaddr_un sun; + /* ATF's isolation mechanisms will guarantee uniqueness of this file */ + const char *path = "sock"; + int s, err, s2, s1; + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s >= 0); + + bzero(&sun, sizeof(sun)); + sun.sun_family = AF_LOCAL; + sun.sun_len = sizeof(sun); + strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); + err = bind(s, (struct sockaddr *)&sun, sizeof(sun)); + err = listen(s, -1); + ATF_CHECK_EQ(0, err); + ATF_CHECK_EQ(0, err); + + /* Create the other socket */ + s2 = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s2 >= 0); + err = connect(s2, (struct sockaddr*)&sun, sizeof(sun)); + if (err != 0) { + perror("connect"); + atf_tc_fail("connect(2) failed"); + } + + /* Accept it */ + s1 = accept(s, NULL, NULL); + if (s1 == -1) { + perror("accept"); + atf_tc_fail("accept(2) failed"); + } + + sv[0] = s1; + sv[1] = s2; + return (path); +} + +static volatile sig_atomic_t got_sigpipe = 0; +static void +shutdown_send_sigpipe_handler(int x) +{ + got_sigpipe = 1; +} + +/* + * Parameterized test function bodies + */ +void +test_eagain(size_t sndbufsize, size_t rcvbufsize) +{ + int i; + int sv[2]; + const size_t totalsize = (sndbufsize + rcvbufsize) * 2; + const size_t pktsize = MIN(sndbufsize, rcvbufsize) / 4; + char sndbuf[pktsize]; + char recv_buf[pktsize]; + ssize_t ssize, rsize; + + /* setup the socket pair */ + do_socketpair(sv); + /* Setup the buffers */ + ATF_REQUIRE_EQ(0, setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &sndbufsize, + sizeof(sndbufsize))); + ATF_REQUIRE_EQ(0, setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rcvbufsize, + sizeof(rcvbufsize))); + + bzero(sndbuf, pktsize); + /* Send data until we get EAGAIN */ + for(i=0; i < totalsize / pktsize; i++) { + ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); + if (ssize == -1) { + if (errno == EAGAIN) + atf_tc_pass(); + else { + perror("send"); + atf_tc_fail("send returned < 0 but not EAGAIN"); + } + } + } + atf_tc_fail("Never got EAGAIN"); +} + +void +test_sendrecv_symmetric_buffers(size_t bufsize, int blocking) { + int s; + int sv[2]; + const size_t pktsize = bufsize / 2; + char sndbuf[pktsize]; + char recv_buf[pktsize]; + ssize_t ssize, rsize; + + /* setup the socket pair */ + if (blocking) + do_socketpair(sv); + else + do_socketpair_nonblocking(sv); + + /* Setup the buffers */ + s = setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize)); + ATF_REQUIRE_EQ(0, s); + s = setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(bufsize)); + ATF_REQUIRE_EQ(0, s); + + /* Fill the send buffer */ + bzero(sndbuf, pktsize); + + /* send and receive the packet */ + ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); + if (ssize < 0) { + perror("send"); + atf_tc_fail("send returned < 0"); + } + ATF_CHECK_EQ_MSG(pktsize, ssize, "expected %zd=send(...) but got %zd", + pktsize, ssize); + + rsize = recv(sv[1], recv_buf, pktsize, MSG_WAITALL); + if (rsize < 0) { + perror("recv"); + atf_tc_fail("recv returned < 0"); + } + ATF_CHECK_EQ_MSG(pktsize, rsize, "expected %zd=send(...) but got %zd", + pktsize, rsize); +} + +void +test_pipe_simulator(size_t sndbufsize, size_t rcvbufsize) +{ + int s, num_sent, num_received; + int sv[2]; + const size_t pktsize = MIN(sndbufsize, rcvbufsize) / 4; + int numpkts; + char sndbuf[pktsize]; + char rcvbuf[pktsize]; + char comparebuf[pktsize]; + ssize_t ssize, rsize; + bool currently_sending = true; + + /* setup the socket pair */ + do_socketpair_nonblocking(sv); + /* Setup the buffers */ + ATF_REQUIRE_EQ(0, setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &sndbufsize, + sizeof(sndbufsize))); + ATF_REQUIRE_EQ(0, setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rcvbufsize, + sizeof(rcvbufsize))); + + /* Send a total amount of data comfortably greater than the buffers */ + numpkts = MAX(sndbufsize, rcvbufsize) * 8 / pktsize; + for (num_sent=0, num_received=0; + num_sent < numpkts || num_received < numpkts; ) { + if (currently_sending && num_sent < numpkts) { + /* The simulated sending process */ + /* fill the buffer */ + memset(sndbuf, num_sent, pktsize); + ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); + if (ssize < 0) { + /* + * XXX: This is bug-compatible with the kernel. + * The kernel returns EMSGSIZE when it should + * return EAGAIN + */ + if (errno == EAGAIN || errno == EMSGSIZE) + currently_sending = false; + else { + perror("send"); + atf_tc_fail("send failed"); + } + } else { + ATF_CHECK_EQ_MSG(pktsize, ssize, + "expected %zd=send(...) but got %zd", + pktsize, ssize); + num_sent++; + } + } else { + /* The simulated receiving process */ + rsize = recv(sv[1], rcvbuf, pktsize, MSG_WAITALL); + if (rsize < 0) { + if (errno == EAGAIN) { + currently_sending = true; + ATF_REQUIRE_MSG(num_sent < numpkts, + "Packets were lost!"); + } + else { + perror("recv"); + atf_tc_fail("recv failed"); + } + } else { + ATF_CHECK_EQ_MSG(pktsize, rsize, + "expected %zd=recv(...) but got %zd", + pktsize, rsize); + memset(comparebuf, num_received, pktsize); + ATF_CHECK_EQ_MSG(0, memcmp(comparebuf, rcvbuf, + pktsize), + "Received data miscompare"); + num_received++; + } + } + } +} + +typedef struct { + ssize_t pktsize; + int numpkts; + int so; +} test_pipe_thread_data_t; + +static void* +test_pipe_writer(void* args) +{ + test_pipe_thread_data_t* td = args; + char sndbuf[td->pktsize]; + ssize_t ssize; + int i; + + for(i=0; i < td->numpkts; i++) { + memset(sndbuf, i, td->pktsize); + ssize = send(td->so, sndbuf, td->pktsize, MSG_EOR); + if (ssize < 0) { + perror("send"); + atf_tc_fail("send returned < 0"); + } + ATF_CHECK_EQ_MSG(td->pktsize, ssize, + "expected %zd=send(...) but got %zd", + td->pktsize, ssize); + } + return (0); +} + +static void* +test_pipe_reader(void* args) +{ + test_pipe_thread_data_t* td = args; + char rcvbuf[td->pktsize]; + char comparebuf[td->pktsize]; + ssize_t rsize; + int i, d; + + for(i=0; i < td->numpkts; i++) { + memset(comparebuf, i, td->pktsize); + rsize = recv(td->so, rcvbuf, td->pktsize, MSG_WAITALL); + if (rsize < 0) { + perror("recv"); + atf_tc_fail("recv returned < 0"); + } + ATF_CHECK_EQ_MSG(td->pktsize, rsize, + "expected %zd=send(...) but got %zd", + td->pktsize, rsize); + d = memcmp(comparebuf, rcvbuf, td->pktsize); + ATF_CHECK_EQ_MSG(0, d, + "Received data miscompare on packet %d", i); + } + return (0); +} + + +void +test_pipe(size_t sndbufsize, size_t rcvbufsize) +{ + test_pipe_thread_data_t writer_data, reader_data; + pthread_t writer, reader; + int num_sent, num_received; + int sv[2]; + const size_t pktsize = MIN(sndbufsize, rcvbufsize) / 4; + int numpkts; + + /* setup the socket pair */ + do_socketpair(sv); + /* Setup the buffers */ + ATF_REQUIRE_EQ(0, setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &sndbufsize, + sizeof(sndbufsize))); + ATF_REQUIRE_EQ(0, setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rcvbufsize, + sizeof(rcvbufsize))); + + /* Send a total amount of data comfortably greater than the buffers */ + numpkts = MAX(sndbufsize, rcvbufsize) * 8 / pktsize; + + /* Start the child threads */ + writer_data.pktsize = pktsize; + writer_data.numpkts = numpkts; + writer_data.so = sv[0]; + reader_data.pktsize = pktsize; + reader_data.numpkts = numpkts; + reader_data.so = sv[1]; + ATF_REQUIRE_EQ(0, pthread_create(&writer, NULL, test_pipe_writer, + (void*)&writer_data)); + ATF_REQUIRE_EQ(0, pthread_create(&reader, NULL, test_pipe_reader, + (void*)&reader_data)); + + /* Join the children */ + ATF_REQUIRE_EQ(0, pthread_join(writer, NULL)); + ATF_REQUIRE_EQ(0, pthread_join(reader, NULL)); +} + + +/* + * Test Cases + */ + +/* Create a SEQPACKET socket */ +ATF_TC_WITHOUT_HEAD(create_socket); +ATF_TC_BODY(create_socket, tc) +{ + int s; + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_CHECK(s >= 0); +} + +/* Create SEQPACKET sockets using socketpair(2) */ +ATF_TC_WITHOUT_HEAD(create_socketpair); +ATF_TC_BODY(create_socketpair, tc) +{ + int sv[2]; + int s; + + s = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sv); + ATF_CHECK_EQ(0, s); + ATF_CHECK(sv[0] >= 0); + ATF_CHECK(sv[1] >= 0); + ATF_CHECK(sv[0] != sv[1]); +} + +/* Call listen(2) without first calling bind(2). It should fail */ +ATF_TC_WITHOUT_HEAD(listen_unbound); +ATF_TC_BODY(listen_unbound, tc) +{ + int s, r; + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s > 0); + r = listen(s, -1); + /* expect listen to fail since we haven't called bind(2) */ + ATF_CHECK(r != 0); +} + +/* Bind the socket to a file */ +ATF_TC_WITHOUT_HEAD(bind); +ATF_TC_BODY(bind, tc) +{ + struct sockaddr_un sun; + /* ATF's isolation mechanisms will guarantee uniqueness of this file */ + const char *path = "sock"; + int s, r; + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s >= 0); + + bzero(&sun, sizeof(sun)); + sun.sun_family = AF_LOCAL; + sun.sun_len = sizeof(sun); + strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); + r = bind(s, (struct sockaddr *)&sun, sizeof(sun)); + ATF_CHECK_EQ(0, r); +} + +/* listen(2) a socket that is already bound(2) should succeed */ +ATF_TC_WITHOUT_HEAD(listen_bound); +ATF_TC_BODY(listen_bound, tc) +{ + struct sockaddr_un sun; + /* ATF's isolation mechanisms will guarantee uniqueness of this file */ + const char *path = "sock"; + int s, r, l; + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s >= 0); + + bzero(&sun, sizeof(sun)); + sun.sun_family = AF_LOCAL; + sun.sun_len = sizeof(sun); + strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); + r = bind(s, (struct sockaddr *)&sun, sizeof(sun)); + l = listen(s, -1); + ATF_CHECK_EQ(0, r); + ATF_CHECK_EQ(0, l); +} + +/* connect(2) can make a connection */ +ATF_TC_WITHOUT_HEAD(connect); +ATF_TC_BODY(connect, tc) +{ + struct sockaddr_un sun; + /* ATF's isolation mechanisms will guarantee uniqueness of this file */ + const char *path = "sock"; + int s, r, err, l, s2; + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s >= 0); + + bzero(&sun, sizeof(sun)); + sun.sun_family = AF_LOCAL; + sun.sun_len = sizeof(sun); + strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); + r = bind(s, (struct sockaddr *)&sun, sizeof(sun)); + l = listen(s, -1); + ATF_CHECK_EQ(0, r); + ATF_CHECK_EQ(0, l); + + /* Create the other socket */ + s2 = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s2 >= 0); + err = connect(s2, (struct sockaddr*)&sun, sizeof(sun)); + if (err != 0) { + perror("connect"); + atf_tc_fail("connect(2) failed"); + } +} + +/* accept(2) can receive a connection */ +ATF_TC_WITHOUT_HEAD(accept); +ATF_TC_BODY(accept, tc) +{ + int sv[2]; + + mk_pair_of_sockets(sv); +} + + +/* Set O_NONBLOCK on the socket */ +ATF_TC_WITHOUT_HEAD(fcntl_nonblock); +ATF_TC_BODY(fcntl_nonblock, tc) +{ + int s; + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s >= 0); + if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) { + perror("fcntl"); + atf_tc_fail("fcntl failed"); + } +} + +/* Resize the send and receive buffers */ +ATF_TC_WITHOUT_HEAD(resize_buffers); +ATF_TC_BODY(resize_buffers, tc) +{ + int s; + int sndbuf = 12345; + int rcvbuf = 23456; + int xs, xr; + socklen_t sl = sizeof(xs); + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s >= 0); + + printf(" Socket Buffer Sizes\n"); + printf(" | SNDBUF | RCVBUF |\n"); + ATF_CHECK_EQ(0, getsockopt(s, SOL_SOCKET, SO_SNDBUF, &xs, &sl)); + ATF_CHECK_EQ(0, getsockopt(s, SOL_SOCKET, SO_RCVBUF, &xr, &sl)); + printf("Default | %7d | %7d |\n", xs, xr); + + if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf)) != 0){ + perror("setsockopt"); + atf_tc_fail("setsockopt(SO_SNDBUF) failed"); + } + ATF_CHECK_EQ(0, getsockopt(s, SOL_SOCKET, SO_SNDBUF, &xs, &sl)); + ATF_CHECK_EQ(0, getsockopt(s, SOL_SOCKET, SO_RCVBUF, &xr, &sl)); + printf("After changing SNDBUF | %7d | %7d |\n", xs, xr); + + if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf)) != 0){ + perror("setsockopt"); + atf_tc_fail("setsockopt(SO_RCVBUF) failed"); + } + ATF_CHECK_EQ(0, getsockopt(s, SOL_SOCKET, SO_SNDBUF, &xs, &sl)); + ATF_CHECK_EQ(0, getsockopt(s, SOL_SOCKET, SO_RCVBUF, &xr, &sl)); + printf("After changing RCVBUF | %7d | %7d |\n", xs, xr); +} + +/* + * Resize the send and receive buffers of a connected socketpair + * Print some useful debugging info too + */ +ATF_TC_WITHOUT_HEAD(resize_connected_buffers); +ATF_TC_BODY(resize_connected_buffers, tc) +{ + int sv[2]; + int sndbuf = 12345; + int rcvbuf = 23456; + int err; + int ls, lr, rs, rr; + socklen_t sl = sizeof(ls); + + /* setup the socket pair */ + do_socketpair(sv); + + printf(" Socket Buffer Sizes\n"); + printf(" | Left Socket | Right Socket |\n"); + printf(" | SNDBUF | RCVBUF | SNDBUF | RCVBUF |\n"); + ATF_CHECK_EQ(0, getsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &ls, &sl)); + ATF_CHECK_EQ(0, getsockopt(sv[0], SOL_SOCKET, SO_RCVBUF, &lr, &sl)); + ATF_CHECK_EQ(0, getsockopt(sv[1], SOL_SOCKET, SO_SNDBUF, &rs, &sl)); + ATF_CHECK_EQ(0, getsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rr, &sl)); + printf("Default | %7d | %7d | %7d | %7d |\n", + ls, lr, rs, rr); + + /* Update one side's send buffer */ + err = setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf)); + if (err != 0){ + perror("setsockopt"); + atf_tc_fail("setsockopt(SO_SNDBUF) failed"); + } + + ATF_CHECK_EQ(0, getsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &ls, &sl)); + ATF_CHECK_EQ(0, getsockopt(sv[0], SOL_SOCKET, SO_RCVBUF, &lr, &sl)); + ATF_CHECK_EQ(0, getsockopt(sv[1], SOL_SOCKET, SO_SNDBUF, &rs, &sl)); + ATF_CHECK_EQ(0, getsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rr, &sl)); + printf("After changing Left's SNDBUF | %7d | %7d | %7d | %7d |\n", + ls, lr, rs, rr); + + /* Update the same side's receive buffer */ + err = setsockopt(sv[0], SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf)); + if (err != 0){ + perror("setsockopt"); + atf_tc_fail("setsockopt(SO_RCVBUF) failed"); + } + + ATF_CHECK_EQ(0, getsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &ls, &sl)); + ATF_CHECK_EQ(0, getsockopt(sv[0], SOL_SOCKET, SO_RCVBUF, &lr, &sl)); + ATF_CHECK_EQ(0, getsockopt(sv[1], SOL_SOCKET, SO_SNDBUF, &rs, &sl)); + ATF_CHECK_EQ(0, getsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rr, &sl)); + printf("After changing Left's RCVBUF | %7d | %7d | %7d | %7d |\n", + ls, lr, rs, rr); +} + + +/* send(2) and recv(2) a single short record */ +ATF_TC_WITHOUT_HEAD(send_recv); +ATF_TC_BODY(send_recv, tc) +{ + int s; + int sv[2]; + const int bufsize = 64; + const char *data = "data"; + char recv_buf[bufsize]; + size_t datalen; + ssize_t ssize, rsize; + + /* setup the socket pair */ + do_socketpair(sv); + + /* send and receive a small packet */ + datalen = strlen(data) + 1; /* +1 for the null */ + ssize = send(sv[0], data, datalen, MSG_EOR); + if (ssize < 0) { + perror("send"); + atf_tc_fail("send returned < 0"); + } + ATF_CHECK_EQ_MSG(datalen, ssize, "expected %zd=send(...) but got %zd", + datalen, ssize); + + rsize = recv(sv[1], recv_buf, bufsize, MSG_WAITALL); + ATF_CHECK_EQ(datalen, rsize); +} + +/* sendto(2) and recvfrom(2) a single short record + * According to The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 + * Edition, sendto(2) is exactly the same as send(2) on a connection-mode socket + * + * According to the same spec, not all protocols are required to provide the + * source addres in recvfrom(2). + */ +ATF_TC_WITHOUT_HEAD(sendto_recvfrom); +ATF_TC_BODY(sendto_recvfrom, tc) +{ + const char* path; + struct sockaddr_storage from; + int s; + int sv[2]; + const int bufsize = 64; + const char *data = "data"; + char recv_buf[bufsize]; + size_t datalen; + ssize_t ssize, rsize; + socklen_t fromlen; + + /* setup the socket pair */ + path = mk_pair_of_sockets(sv); + + /* send and receive a small packet */ + datalen = strlen(data) + 1; /* +1 for the null */ + ssize = sendto(sv[0], data, datalen, MSG_EOR, NULL, 0); + if (ssize < 0) { + perror("send"); + atf_tc_fail("send returned < 0"); + } + ATF_CHECK_EQ_MSG(datalen, ssize, "expected %zd=send(...) but got %zd", + datalen, ssize); + + fromlen = sizeof(from); + rsize = recvfrom(sv[1], recv_buf, bufsize, MSG_WAITALL, + (struct sockaddr*)&from, &fromlen); + if (ssize < 0) { + perror("recvfrom"); + atf_tc_fail("recvfrom returned < 0"); + } + ATF_CHECK_EQ(datalen, rsize); + + /* + * FreeBSD does not currently provide the source address for SEQ_PACKET + * AF_UNIX sockets, and POSIX does not require it, so these two checks + * are disabled. If FreeBSD gains that feature in the future, then + * these checks may be reenabled + */ + /* ATF_CHECK_EQ(PF_LOCAL, from.ss_family); */ + /* ATF_CHECK_STREQ(path, ((struct sockaddr_un*)&from)->sun_path); */ +} + +/* + * send(2) and recv(2) a single short record with sockets created the + * traditional way, involving bind, listen, connect, and accept + */ +ATF_TC_WITHOUT_HEAD(send_recv_with_connect); +ATF_TC_BODY(send_recv_with_connect, tc) +{ + const char* path; + int sv[2]; + const int bufsize = 64; + const char *data = "data"; + char recv_buf[bufsize]; + size_t datalen; + ssize_t ssize, rsize; + + mk_pair_of_sockets(sv); + + /* send and receive a small packet */ + datalen = strlen(data) + 1; /* +1 for the null */ + ssize = send(sv[0], data, datalen, MSG_EOR); + if (ssize < 0) { + perror("send"); + atf_tc_fail("send returned < 0"); + } + ATF_CHECK_EQ_MSG(datalen, ssize, "expected %zd=send(...) but got %zd", + datalen, ssize); + + rsize = recv(sv[1], recv_buf, bufsize, MSG_WAITALL); + ATF_CHECK_EQ(datalen, rsize); +} + +/* send(2) should fail on a shutdown socket */ +ATF_TC_WITHOUT_HEAD(shutdown_send); +ATF_TC_BODY(shutdown_send, tc) +{ + int s; + const char *data = "data"; + ssize_t ssize; + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_CHECK(s >= 0); + ATF_CHECK_EQ(0, shutdown(s, SHUT_RDWR)); + /* USE MSG_NOSIGNAL so we don't get SIGPIPE */ + ssize = send(s, data, sizeof(data), MSG_EOR | MSG_NOSIGNAL); + ATF_CHECK_EQ(EPIPE, errno); + ATF_CHECK_EQ(-1, ssize); +} + +/* send(2) should cause SIGPIPE on a shutdown socket */ +ATF_TC_WITHOUT_HEAD(shutdown_send_sigpipe); +ATF_TC_BODY(shutdown_send_sigpipe, tc) +{ + int s; + const char *data = "data"; + ssize_t ssize; + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_CHECK(s >= 0); + ATF_CHECK_EQ(0, shutdown(s, SHUT_RDWR)); + ATF_REQUIRE(SIG_ERR != signal(SIGPIPE, shutdown_send_sigpipe_handler)); + ssize = send(s, data, sizeof(data), MSG_EOR); + ATF_CHECK_EQ(1, got_sigpipe); +} + +/* nonblocking send(2) and recv(2) a single short record */ +ATF_TC_WITHOUT_HEAD(send_recv_nonblocking); +ATF_TC_BODY(send_recv_nonblocking, tc) +{ + int s; + int sv[2]; + const int bufsize = 64; + const char *data = "data"; + char recv_buf[bufsize]; + size_t datalen; + ssize_t ssize, rsize; + + /* setup the socket pair */ + do_socketpair_nonblocking(sv); + + /* Verify that there is nothing to receive */ + rsize = recv(sv[1], recv_buf, bufsize, MSG_WAITALL); + ATF_CHECK_EQ(EAGAIN, errno); + ATF_CHECK_EQ(-1, rsize); + + /* send and receive a small packet */ + datalen = strlen(data) + 1; /* +1 for the null */ + ssize = send(sv[0], data, datalen, MSG_EOR); + if (ssize < 0) { + perror("send"); + atf_tc_fail("send returned < 0"); + } + ATF_CHECK_EQ_MSG(datalen, ssize, "expected %zd=send(...) but got %zd", + datalen, ssize); + + rsize = recv(sv[1], recv_buf, bufsize, MSG_WAITALL); + ATF_CHECK_EQ(datalen, rsize); +} + +/* + * We should get EMSGSIZE if we try to send a message larger than the socket + * buffer, with blocking sockets + */ +ATF_TC_WITHOUT_HEAD(emsgsize); +ATF_TC_BODY(emsgsize, tc) +{ + int s; + int sv[2]; + const size_t sndbufsize = 8192; + const size_t rcvbufsize = 8192; + const size_t pktsize = (sndbufsize + rcvbufsize) * 2; + char sndbuf[pktsize]; + char recv_buf[pktsize]; + ssize_t ssize, rsize; + + /* setup the socket pair */ + do_socketpair(sv); + /* Setup the buffers */ + ATF_REQUIRE_EQ(0, setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &sndbufsize, + sizeof(sndbufsize))); + ATF_REQUIRE_EQ(0, setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rcvbufsize, + sizeof(rcvbufsize))); + + ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); + ATF_CHECK_EQ(EMSGSIZE, errno); + ATF_CHECK_EQ(-1, ssize); +} + +/* + * We should get EMSGSIZE if we try to send a message larger than the socket + * buffer, with nonblocking sockets + */ +ATF_TC_WITHOUT_HEAD(emsgsize_nonblocking); +ATF_TC_BODY(emsgsize_nonblocking, tc) +{ + int s; + int sv[2]; + const size_t sndbufsize = 8192; + const size_t rcvbufsize = 8192; + const size_t pktsize = (sndbufsize + rcvbufsize) * 2; + char sndbuf[pktsize]; + char recv_buf[pktsize]; + ssize_t ssize, rsize; + + /* setup the socket pair */ + do_socketpair_nonblocking(sv); + /* Setup the buffers */ + ATF_REQUIRE_EQ(0, setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &sndbufsize, + sizeof(sndbufsize))); + ATF_REQUIRE_EQ(0, setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rcvbufsize, + sizeof(rcvbufsize))); + + ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); + ATF_CHECK_EQ(EMSGSIZE, errno); + ATF_CHECK_EQ(-1, ssize); +} + + +/* + * We should get EAGAIN if we try to send a message larger than the socket + * buffer, with nonblocking sockets. Test with several different sockbuf sizes + */ +ATF_TC_WITHOUT_HEAD(eagain_8k_8k); +ATF_TC_BODY(eagain_8k_8k, tc) +{ + atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); + test_eagain(8192, 8192); +} +ATF_TC_WITHOUT_HEAD(eagain_8k_128k); +ATF_TC_BODY(eagain_8k_128k, tc) +{ + atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); + test_eagain(8192, 131072); +} +ATF_TC_WITHOUT_HEAD(eagain_128k_8k); +ATF_TC_BODY(eagain_128k_8k, tc) +{ + atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); + test_eagain(131072, 8192); +} +ATF_TC_WITHOUT_HEAD(eagain_128k_128k); +ATF_TC_BODY(eagain_128k_128k, tc) +{ + atf_tc_expect_fail("PR kern/185812 send(2) on a UNIX domain SEQPACKET socket returns EMSGSIZE instead of EAGAIN"); + test_eagain(131072, 131072); +} + + +/* + * nonblocking send(2) and recv(2) of several records, which should collectively + * fill up the send buffer but not the receive buffer + */ +ATF_TC_WITHOUT_HEAD(rcvbuf_oversized); +ATF_TC_BODY(rcvbuf_oversized, tc) +{ + int s, i, j; + int sv[2]; + const size_t sndbufsize = 8192; + const size_t rcvbufsize = 131072; + const size_t geom_mean_bufsize = 32768; + const int pktsize = 1024; + char sndbuf[pktsize]; + char recv_buf[pktsize]; + size_t datalen; + ssize_t ssize, rsize; + + /* setup the socket pair */ + do_socketpair_nonblocking(sv); + + /* + * Send and receive packets that are collectively greater than the send + * buffer, but less than the receive buffer + */ + for (i=0; i < geom_mean_bufsize / pktsize; i++) { + /* Fill the buffer */ + memset(sndbuf, i, pktsize); + + /* send the packet */ + ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); + if (ssize < 0) { + perror("send"); + atf_tc_fail("send returned < 0"); + } + ATF_CHECK_EQ_MSG(pktsize, ssize, + "expected %zd=send(...) but got %zd", pktsize, ssize); + + /* Receive it */ + + rsize = recv(sv[1], recv_buf, pktsize, MSG_WAITALL); + if (rsize < 0) { + perror("recv"); + atf_tc_fail("recv returned < 0"); + } + ATF_CHECK_EQ_MSG(pktsize, rsize, + "expected %zd=send(...) but got %zd", pktsize, rsize); + + /* Verify the contents */ + ATF_CHECK_EQ_MSG(0, memcmp(sndbuf, recv_buf, pktsize), + "Received data miscompare"); + } + + /* Trying to receive again should return EAGAIN */ + rsize = recv(sv[1], recv_buf, pktsize, MSG_WAITALL); + ATF_CHECK_EQ(EAGAIN, errno); + ATF_CHECK_EQ(-1, rsize); +} + +/* + * Simulate the behavior of a blocking pipe. The sender will send until his + * buffer fills up, then we'll simulate a scheduler switch that will allow the + * receiver to read until his buffer empties. Repeat the process until the + * transfer is complete. + * Repeat the test with multiple send and receive buffer sizes + */ +ATF_TC_WITHOUT_HEAD(pipe_simulator_8k_8k); +ATF_TC_BODY(pipe_simulator_8k_8k, tc) +{ + test_pipe_simulator(8192, 8192); +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 17:27:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93F15F4; Thu, 23 Jan 2014 17:27:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7FCDB15D2; Thu, 23 Jan 2014 17:27:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NHRHoH039984; Thu, 23 Jan 2014 17:27:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NHRH9A039978; Thu, 23 Jan 2014 17:27:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401231727.s0NHRH9A039978@svn.freebsd.org> From: Alexander Motin Date: Thu, 23 Jan 2014 17:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261082 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:27:17 -0000 Author: mav Date: Thu Jan 23 17:27:16 2014 New Revision: 261082 URL: http://svnweb.freebsd.org/changeset/base/261082 Log: Fix build on stable/9. I am sorry. :( Modified: stable/9/sys/rpc/svc.h stable/9/sys/rpc/svc_vc.c Modified: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Thu Jan 23 17:26:28 2014 (r261081) +++ stable/9/sys/rpc/svc.h Thu Jan 23 17:27:16 2014 (r261082) @@ -327,7 +327,7 @@ enum svcpool_state { typedef SVCTHREAD *pool_assign_fn(SVCTHREAD *, struct svc_req *); typedef void pool_done_fn(SVCTHREAD *, struct svc_req *); typedef struct __rpc_svcpool { - struct mtx_padalign sp_lock; /* protect the transport lists */ + struct mtx sp_lock; /* protect the transport lists */ const char *sp_name; /* pool name (e.g. "nfsd", "NLM" */ enum svcpool_state sp_state; /* current pool state */ struct proc *sp_proc; /* process which is in svc_run */ Modified: stable/9/sys/rpc/svc_vc.c ============================================================================== --- stable/9/sys/rpc/svc_vc.c Thu Jan 23 17:26:28 2014 (r261081) +++ stable/9/sys/rpc/svc_vc.c Thu Jan 23 17:27:16 2014 (r261082) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 18:09:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C762857; Thu, 23 Jan 2014 18:09:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 49857195C; Thu, 23 Jan 2014 18:09:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NI9BwN055633; Thu, 23 Jan 2014 18:09:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NI9Aki055630; Thu, 23 Jan 2014 18:09:10 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401231809.s0NI9Aki055630@svn.freebsd.org> From: Warner Losh Date: Thu, 23 Jan 2014 18:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261083 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:09:11 -0000 Author: imp Date: Thu Jan 23 18:09:10 2014 New Revision: 261083 URL: http://svnweb.freebsd.org/changeset/base/261083 Log: Add Atmel serial drivers. Modified: head/sys/dev/uart/uart.h head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/dev/uart/uart.h ============================================================================== --- head/sys/dev/uart/uart.h Thu Jan 23 17:27:16 2014 (r261082) +++ head/sys/dev/uart/uart.h Thu Jan 23 18:09:10 2014 (r261083) @@ -76,6 +76,7 @@ extern struct uart_class uart_pl011_clas extern struct uart_class uart_cdnc_class __attribute__((weak)); extern struct uart_class uart_ti8250_class __attribute__((weak)); extern struct uart_class uart_vybrid_class __attribute__((weak)); +extern struct uart_class at91_usart_class __attribute__((weak)); #ifdef FDT struct ofw_compat_data; Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Thu Jan 23 17:27:16 2014 (r261082) +++ head/sys/dev/uart/uart_bus_fdt.c Thu Jan 23 18:09:10 2014 (r261083) @@ -71,6 +71,8 @@ static driver_t uart_fdt_driver = { */ static struct ofw_compat_data compat_data[] = { {"arm,pl011", (uintptr_t)&uart_pl011_class}, + {"atmel,at91rm9200-usart",(uintptr_t)&at91_usart_class}, + {"atmel,at91sam9260-usart",(uintptr_t)&at91_usart_class}, {"cadence,uart", (uintptr_t)&uart_cdnc_class}, {"exynos", (uintptr_t)&uart_s3c2410_class}, {"fsl,imx6q-uart", (uintptr_t)&uart_imx_class}, From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 19:07:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A705DA9; Thu, 23 Jan 2014 19:07:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB43A1F52; Thu, 23 Jan 2014 19:07:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NJ7MwS078649; Thu, 23 Jan 2014 19:07:22 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NJ7MQV078648; Thu, 23 Jan 2014 19:07:22 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201401231907.s0NJ7MQV078648@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 23 Jan 2014 19:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261084 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:07:23 -0000 Author: ae Date: Thu Jan 23 19:07:22 2014 New Revision: 261084 URL: http://svnweb.freebsd.org/changeset/base/261084 Log: malloc() with M_WAITOK doesn't return NULL. MFC after: 1 week Modified: head/sys/geom/geom_ctl.c Modified: head/sys/geom/geom_ctl.c ============================================================================== --- head/sys/geom/geom_ctl.c Thu Jan 23 18:09:10 2014 (r261083) +++ head/sys/geom/geom_ctl.c Thu Jan 23 19:07:22 2014 (r261084) @@ -122,10 +122,7 @@ geom_alloc_copyin(struct gctl_req *req, void *ptr; ptr = g_malloc(len, M_WAITOK); - if (ptr == NULL) - req->nerror = ENOMEM; - else - req->nerror = copyin(uaddr, ptr, len); + nreq->nerror = copyin(uaddr, ptr, len); if (!req->nerror) return (ptr); if (ptr != NULL) From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 19:31:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1E4F308; Thu, 23 Jan 2014 19:31:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE5FA118E; Thu, 23 Jan 2014 19:31:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NJVHoE089310; Thu, 23 Jan 2014 19:31:17 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NJVHKS089308; Thu, 23 Jan 2014 19:31:17 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201401231931.s0NJVHKS089308@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 23 Jan 2014 19:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261085 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:31:17 -0000 Author: ae Date: Thu Jan 23 19:31:17 2014 New Revision: 261085 URL: http://svnweb.freebsd.org/changeset/base/261085 Log: Fix typo in r261084. Add to the gctl_error() an ability to specify error description even if numeric error code is already specified. Also by default set error code to EINVAL. PR: 185852 MFC after: 1 week Modified: head/sys/geom/geom_ctl.c Modified: head/sys/geom/geom_ctl.c ============================================================================== --- head/sys/geom/geom_ctl.c Thu Jan 23 19:07:22 2014 (r261084) +++ head/sys/geom/geom_ctl.c Thu Jan 23 19:31:17 2014 (r261085) @@ -84,8 +84,8 @@ g_ctl_init(void) } /* - * Report an error back to the user in ascii format. Return whatever copyout - * returned, or EINVAL if it succeeded. + * Report an error back to the user in ascii format. Return nerror + * or EINVAL if nerror isn't specified. */ int gctl_error(struct gctl_req *req, const char *fmt, ...) @@ -99,9 +99,10 @@ gctl_error(struct gctl_req *req, const c if (sbuf_done(req->serror)) { if (!req->nerror) req->nerror = EEXIST; - } - if (req->nerror) return (req->nerror); + } + if (!req->nerror) + req->nerror = EINVAL; va_start(ap, fmt); sbuf_vprintf(req->serror, fmt, ap); @@ -109,7 +110,7 @@ gctl_error(struct gctl_req *req, const c sbuf_finish(req->serror); if (g_debugflags & G_F_CTLDUMP) printf("gctl %p error \"%s\"\n", req, sbuf_data(req->serror)); - return (0); + return (req->nerror); } /* @@ -122,7 +123,7 @@ geom_alloc_copyin(struct gctl_req *req, void *ptr; ptr = g_malloc(len, M_WAITOK); - nreq->nerror = copyin(uaddr, ptr, len); + req->nerror = copyin(uaddr, ptr, len); if (!req->nerror) return (ptr); if (ptr != NULL) From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 19:39:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8868C783; Thu, 23 Jan 2014 19:39:25 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E08711FB; Thu, 23 Jan 2014 19:39:25 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 89D28B94F; Thu, 23 Jan 2014 14:39:21 -0500 (EST) From: John Baldwin To: Alfred Perlstein Subject: Re: svn commit: r260898 - head/sys/kern Date: Thu, 23 Jan 2014 14:29:50 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <20140122225221.GV75135@funkthat.com> <52E04C40.1080303@freebsd.org> In-Reply-To: <52E04C40.1080303@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201401231429.50980.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 23 Jan 2014 14:39:24 -0500 (EST) Cc: src-committers@freebsd.org, Scott Long , Neel Natu , John-Mark Gurney , svn-src-all@freebsd.org, Rui Paulo , svn-src-head@freebsd.org, Alexander Kabaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:39:25 -0000 On Wednesday, January 22, 2014 5:54:56 pm Alfred Perlstein wrote: > > On 1/22/14, 2:52 PM, John-Mark Gurney wrote: > > Alfred Perlstein wrote this message on Wed, Jan 22, 2014 at 14:15 -0800: > >> On 1/22/14, 1:22 PM, John Baldwin wrote: > >>> On Wednesday, January 22, 2014 3:59:37 pm Alfred Perlstein wrote: > >>>> On 1/22/14, 12:27 PM, John Baldwin wrote: > >>>>> On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote: > >>>>>> Hmm, what if locks had a pointer to a 2 element char * array, the first > >>>>>> being the name, the second the type. That would keep the size of the > >>>>>> lock down and most locks could share a common tuple of name/type in each > >>>>>> subsystem. This would allow us to get rid of the pending static list. > >>>>>> > >>>>>> effectively: > >>>>>> struct lock_object { > >>>>>> char *lo_name; /* Individual lock name. */ > >>>>>> u_int lo_flags; > >>>>>> u_int lo_data; /* General class specific > >>>>>> data. > >>> */ > >>>>>> struct witness *lo_witness; /* Data for witness. */ > >>>>>> }; > >>>>>> > >>>>>> would change to: > >>>>>> struct lock_object { > >>>>>> char **lo_name_type; /* Individual lock > >>>>>> name[0]/type[1]. */ > >>>>>> u_int lo_flags; > >>>>>> u_int lo_data; /* General class specific > >>>>>> data. > >>> */ > >>>>>> struct witness *lo_witness; /* Data for witness. */ > >>>>>> }; > >>>>>> > >>>>>> This may be somewhat disruptive, I haven't played with how it would > >>>>>> actually change driver/etc/code. > >>>>> Where would the memory for the char* array come from? > >>>>> > >>>> That is a good question. I suspect it would be up to the subsystem to > >>>> allocate it. > >>>> > >>>> Wouldn't it be trivial for *most* of the subsystems to simply have this > >>>> either as a static global or static function variable: > >>>> > >>>> static char *mutex_typename = { "kqueue", "foo" }; > >>>> > >>>> Under kern I see this: > >>>> grep mtx_init * | grep -v NULL > >>>> ... > >>>> kern_rmlock.c: mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", > >>>> MTX_NOWITNESS); > >>>> subr_bus.c: mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF); > >>>> > >>>> Those are solved with statics. > >>>> > >>>> Another example: > >>>> > >>>> sys/dev/ae/if_ae.c > >>>> mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, > >>>> MTX_DEF); > >>>> > >>>> I think the array could be in the softc here? sc->mutex_name_type[0] = > >>>> device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK; > >>>> > >>>> Do we want to do that? It moves "wasting space" to another variable. > >>>> > >>>> I'm not sure where there isn't the possibility of using either static > >>>> (for a global mutex) or space inside the equiv of the softc (or proc or > >>>> whatever) for this? > >>>> > >>>> I'm not sure this is a good idea, just an idea. Are there places where > >>>> it's not as simple as doing this? > >>> To be honest, the whole name vs type thing isn't widely used, and it makes > >>> the mtx_init() function kind of fugly. I think what I would actually > >>> prefer > >>> is to just kill it, changing the various places that pass a separate name > >>> to > >>> just pass the type instead. Note that none of the other lock APIs even > >>> allow > >>> setting a separate type. This would let us remove the static pending list > >>> array as well. > >>> > >>> (And yes, I added the name vs type thing, but at this point I think it did > >>> not turn out nearly as useful as I had thought it would be.) > >>> > >>> The original issue of picking useful-to-witness lock names (i.e. not just > >>> using device_get_nameunit()) still remains of course. > >>> > >> I really want to agree, but anything that reduces the immediate ability > >> for people to diagnose problems really makes me worry. > >> > >> This would mean that you would see "network device lock" or some "type" > >> but not know the actual owner. > > isn't it usually apparent which lock it is from the backtrace? > > > Isn't the backtrace pretty obvious given IP/PC? Erm, have you used WITNESS? It outputs the filename and line number of both locks involved in any LOR which is even more useful than a specific lock name. I highly doubt that there is any real gain from having separate lock names and types at this point. I will take a gander at removing it and seeing what the diff looks like. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 19:39:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1B84788; Thu, 23 Jan 2014 19:39:30 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 839F411FD; Thu, 23 Jan 2014 19:39:30 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 01566B983; Thu, 23 Jan 2014 14:39:29 -0500 (EST) From: John Baldwin To: Adrian Chadd Subject: Re: svn commit: r260898 - head/sys/kern Date: Thu, 23 Jan 2014 14:30:46 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401200159.s0K1xa5X012123@svn.freebsd.org> <0F26E4E1-5D75-413E-B92B-AA7092B87D89@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201401231430.46532.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 23 Jan 2014 14:39:29 -0500 (EST) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo , Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:39:30 -0000 On Thursday, January 23, 2014 2:35:54 am Adrian Chadd wrote: > On 22 January 2014 20:34, Rui Paulo wrote: > > On 22 Jan 2014, at 20:05, Adrian Chadd wrote: > > > >> .. Make it be an offset into the table rather than a pointer, then we can do dirty rcu style hacks to just replace and grow the table as we need more memory. > >> > >> Don't we have a standard way to pull memory from the top of the physmem area early on for allocations like this? > > > > Perhaps a bit overkill for this problem? > > We already have platform dependent ways of doing this in the VM init > path for exactly this - structures needed early at boot. > > It may be overkill but it may also be the cleanest way to allow > boot-time tuned things based on early available information, which we > may want to do when it's time to boot a single kernel on a 2-core atom > board or a 256 core intel/amd server board. The number of witness structures (WITNESS_COUNT) should not vary in those cases. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 19:39:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94CFB8C3; Thu, 23 Jan 2014 19:39:33 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 60BA211FE; Thu, 23 Jan 2014 19:39:33 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 24D0FB9AB; Thu, 23 Jan 2014 14:39:32 -0500 (EST) From: John Baldwin To: David Chisnall Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Date: Thu, 23 Jan 2014 14:39:14 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <20140123063639.GF52955@glenbarber.us> <5A563133-0BAC-4E4E-8BD5-AE64086A7B6E@FreeBSD.org> In-Reply-To: <5A563133-0BAC-4E4E-8BD5-AE64086A7B6E@FreeBSD.org> MIME-Version: 1.0 Message-Id: <201401231439.14819.jhb@freebsd.org> Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 23 Jan 2014 14:39:32 -0500 (EST) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:39:33 -0000 On Thursday, January 23, 2014 10:42:36 am David Chisnall wrote: > On 22 Jan 2014, at 22:36, Glen Barber wrote: > > > It needs to use the build host version, because using (for example) > > powerpc resulting binary won't work on and amd64 system. > > If it's used as part of the build, then it should be part of the toolchain target and we should be using the version built there. 'make distribute' is not a normal part of the build (it's not part of buildworld or installworld). Both mergemaster and etcupdate only run it after an installworld has been performed, in which case an up-to-date services_mkdb should already be installed. Bryan, what are you running 'make distribute' for? Is this to populate a new jail from a world build? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 19:48:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E5B7F19 for ; Thu, 23 Jan 2014 19:48:49 +0000 (UTC) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 290CC12FF for ; Thu, 23 Jan 2014 19:48:49 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=date:from:to :cc:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=sweb; b=mYGahUEF+9d+5hn0WW/5fI+pfdRiAaqij OQtc7fu+30EZ6n6vWd++N+zb8nDgq1wVvTfUaohy7YG2RQWSNmMn2LbPTTvFR0Ee 0hkLxFe8gM4QbeqcdQbp1NKBpPIth0A9eM2BrJz/MurCC0eQP2SxsvBLwTnBUm6j cKYZQlgloo= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=date:from :to:cc:subject:message-id:references:mime-version:content-type :in-reply-to; s=sweb; bh=hl4BTd2Gx48ilOKezwQlB1QyMcZ0cHhEgq0V2tb jiBs=; b=J23sQUN2FmMX1D90t/6nIxYwt1XnjU+z34WiSSSUOFTS1O7pKXyDHBp tlu0ILs8UpEMsdlAZDuRV+sCYjv/uJiSfV5t+pHWhjFK2Y6kt6nEZZVhGBI47tjM QtPGlQAd1ZwOJQA1HqxfPnEOcZd1LSwG0yFFisfpC9FTtoFGrboM= Received: (qmail 22124 invoked from network); 23 Jan 2014 13:48:45 -0600 Received: from unknown (HELO admin.xzibition.com) (bryan@shatow.net@173.160.118.90) by sweb.xzibition.com with ESMTPA; 23 Jan 2014 13:48:45 -0600 Date: Thu, 23 Jan 2014 13:48:41 -0600 From: Bryan Drewery To: John Baldwin Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Message-ID: <20140123194841.GA39296@admin.xzibition.com> References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <20140123063639.GF52955@glenbarber.us> <5A563133-0BAC-4E4E-8BD5-AE64086A7B6E@FreeBSD.org> <201401231439.14819.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: <201401231439.14819.jhb@freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:48:49 -0000 --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 23, 2014 at 02:39:14PM -0500, John Baldwin wrote: > On Thursday, January 23, 2014 10:42:36 am David Chisnall wrote: > > On 22 Jan 2014, at 22:36, Glen Barber wrote: > >=20 > > > It needs to use the build host version, because using (for example) > > > powerpc resulting binary won't work on and amd64 system. > >=20 > > If it's used as part of the build, then it should be part of the toolch= ain=20 > target and we should be using the version built there. >=20 > 'make distribute' is not a normal part of the build (it's not part of > buildworld or installworld). Both mergemaster and etcupdate only run it > after an installworld has been performed, in which case an up-to-date > services_mkdb should already be installed. >=20 > Bryan, what are you running 'make distribute' for? Is this to populate > a new jail from a world build? Yes, poudriere uses this to create jails. It runs: export TARGET_ARCH=3D... make buildworld make installworld DESTDIR=3D... make distrib-dirs DESTDIR=3D... DB_FROM_SRC=3D1 make distribution DESTDIR=3D... No mergemaster or etc-update is ran, we just install all of the defaults. >=20 > --=20 > John Baldwin > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJS4XIYXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNkZFQkU5OTJGNTI4MERGNDgxMTM2MkE2 RTc4MkFDMDNDOUIwQ0Y5AAoJEG54KsA8mwz5u4UP/3yIxIjcPryUv5Clu/EfNlod tl/T5rngLVWewLQe6DzK7vJ5NvoIIvSac7CYTXsajyC48wLk4N64h+wWQiR4+UQr cTlAKenAcX4/MvEpwsN1qAIJeBoyhJNGTo9svEU7izi3+Tds81wtNmCl/U12OAfR Yu+dRkSswUDTYJA45IHvheLMlnSzPFWXosCw+YJqi6YA29nzBKV4Sf9HjMnyRpbT fSZVodqLZIidOWFG5ZJhwfS8tqSKg5X+BNmlNY3Uez1ScX/Zcg6auxDYemssRjj7 x1Lxg3p1BuG9Nozzrjkeoe3utNP8aNtgeUPz1hIQoDcHAUuQGgBCfwQNv4NaJGx+ 2rOatVlBGOqecBK6KnTwqbDFFc/lidx7Dj013j4anXEL7Fnu8IWWF+IxxnE7mD9/ Djgm0BC0NnFnHEKhiCBrgT5rGdHB5MgmGeW9XmqUna1sYcy6jJanDlSQo3LYZUJ3 WqBtfe3eaflfXzBaFYR1QvyTfRowhU+3eqK41Wk9l5uj8kGbaUQAdffQ4/Tq6YnF wDqlb2Y6IxxivPtttcubMdn0BiqkG2RANd/ypMVXREGMToH2t/ZWgaPjJNeK/6Az U2XngQkO91+/d2OHT9sq7Qdzq8ALzgAxZ2lJyC18aw1iexI8E6BGW8nBRoqcNdHU St+fUyLC96fRfn3jCgKI =ZZ+Z -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 19:55:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0BA3641; Thu, 23 Jan 2014 19:55:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FD8713D3; Thu, 23 Jan 2014 19:55:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NJt2UY097165; Thu, 23 Jan 2014 19:55:02 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NJt2Ai097164; Thu, 23 Jan 2014 19:55:02 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201401231955.s0NJt2Ai097164@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 23 Jan 2014 19:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261086 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:55:02 -0000 Author: ae Date: Thu Jan 23 19:55:02 2014 New Revision: 261086 URL: http://svnweb.freebsd.org/changeset/base/261086 Log: In gctl_copyin() remove unused error variable. geom_alloc_copyin() can't return ENOMEM, so describe its fail as bad control request. Add check for NULL pointer in gctl_dump(), since it can be NULL when geom_alloc_copyin() failed. MFC after: 1 week Modified: head/sys/geom/geom_ctl.c Modified: head/sys/geom/geom_ctl.c ============================================================================== --- head/sys/geom/geom_ctl.c Thu Jan 23 19:31:17 2014 (r261085) +++ head/sys/geom/geom_ctl.c Thu Jan 23 19:55:02 2014 (r261086) @@ -134,13 +134,13 @@ geom_alloc_copyin(struct gctl_req *req, static void gctl_copyin(struct gctl_req *req) { - int error, i; struct gctl_req_arg *ap; char *p; + int i; ap = geom_alloc_copyin(req, req->arg, req->narg * sizeof(*ap)); if (ap == NULL) { - req->nerror = ENOMEM; + gctl_error(req, "bad control request"); req->arg = NULL; return; } @@ -152,10 +152,9 @@ gctl_copyin(struct gctl_req *req) ap[i].kvalue = NULL; } - error = 0; for (i = 0; i < req->narg; i++) { if (ap[i].nlen < 1 || ap[i].nlen > SPECNAMELEN) { - error = gctl_error(req, + gctl_error(req, "wrong param name length %d: %d", i, ap[i].nlen); break; } @@ -163,14 +162,14 @@ gctl_copyin(struct gctl_req *req) if (p == NULL) break; if (p[ap[i].nlen - 1] != '\0') { - error = gctl_error(req, "unterminated param name"); + gctl_error(req, "unterminated param name"); g_free(p); break; } ap[i].name = p; ap[i].flag |= GCTL_PARAM_NAMEKERNEL; if (ap[i].len <= 0) { - error = gctl_error(req, "negative param length"); + gctl_error(req, "negative param length"); break; } p = geom_alloc_copyin(req, ap[i].value, ap[i].len); @@ -178,7 +177,7 @@ gctl_copyin(struct gctl_req *req) break; if ((ap[i].flag & GCTL_PARAM_ASCII) && p[ap[i].len - 1] != '\0') { - error = gctl_error(req, "unterminated param value"); + gctl_error(req, "unterminated param value"); g_free(p); break; } @@ -232,9 +231,9 @@ gctl_free(struct gctl_req *req) static void gctl_dump(struct gctl_req *req) { + struct gctl_req_arg *ap; u_int i; int j; - struct gctl_req_arg *ap; printf("Dump of gctl request at %p:\n", req); if (req->nerror > 0) { @@ -242,6 +241,8 @@ gctl_dump(struct gctl_req *req) if (sbuf_len(req->serror) > 0) printf(" error:\t\"%s\"\n", sbuf_data(req->serror)); } + if (req->arg == NULL) + return; for (i = 0; i < req->narg; i++) { ap = &req->arg[i]; if (!(ap->flag & GCTL_PARAM_NAMEKERNEL)) From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 20:10:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 391D1123; Thu, 23 Jan 2014 20:10:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 086F5156E; Thu, 23 Jan 2014 20:10:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NKARDo005573; Thu, 23 Jan 2014 20:10:27 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NKAMEe005534; Thu, 23 Jan 2014 20:10:22 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401232010.s0NKAMEe005534@svn.freebsd.org> From: John Baldwin Date: Thu, 23 Jan 2014 20:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261087 - in head/sys: amd64/amd64 amd64/include amd64/vmm dev/hwpmc i386/i386 i386/include i386/xen pc98/include pc98/pc98 x86/acpica x86/include x86/x86 x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:10:28 -0000 Author: jhb Date: Thu Jan 23 20:10:22 2014 New Revision: 261087 URL: http://svnweb.freebsd.org/changeset/base/261087 Log: Move to . Added: head/sys/x86/include/apicvar.h - copied, changed from r260983, head/sys/i386/include/apicvar.h Deleted: head/sys/amd64/include/apicvar.h head/sys/i386/include/apicvar.h head/sys/pc98/include/apicvar.h Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mp_watchdog.c head/sys/amd64/amd64/pmap.c head/sys/amd64/include/smp.h head/sys/amd64/vmm/vmm_ipi.c head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_piv.c head/sys/dev/hwpmc/hwpmc_ppro.c head/sys/dev/hwpmc/hwpmc_uncore.c head/sys/dev/hwpmc/hwpmc_x86.c head/sys/i386/i386/machdep.c head/sys/i386/i386/mp_watchdog.c head/sys/i386/i386/pmap.c head/sys/i386/include/smp.h head/sys/i386/xen/mptable.c head/sys/pc98/pc98/machdep.c head/sys/x86/acpica/madt.c head/sys/x86/acpica/srat.c head/sys/x86/x86/io_apic.c head/sys/x86/x86/local_apic.c head/sys/x86/x86/mca.c head/sys/x86/x86/mptable.c head/sys/x86/x86/msi.c head/sys/x86/xen/xen_intr.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/amd64/amd64/machdep.c Thu Jan 23 20:10:22 2014 (r261087) @@ -140,7 +140,7 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_ATPIC #include #else -#include +#include #endif #include Modified: head/sys/amd64/amd64/mp_watchdog.c ============================================================================== --- head/sys/amd64/amd64/mp_watchdog.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/amd64/amd64/mp_watchdog.c Thu Jan 23 20:10:22 2014 (r261087) @@ -45,7 +45,7 @@ #include #include -#include +#include #include /* Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/amd64/amd64/pmap.c Thu Jan 23 20:10:22 2014 (r261087) @@ -135,7 +135,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include Modified: head/sys/amd64/include/smp.h ============================================================================== --- head/sys/amd64/include/smp.h Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/amd64/include/smp.h Thu Jan 23 20:10:22 2014 (r261087) @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include /* global symbols in mpboot.S */ Modified: head/sys/amd64/vmm/vmm_ipi.c ============================================================================== --- head/sys/amd64/vmm/vmm_ipi.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/amd64/vmm/vmm_ipi.c Thu Jan 23 20:10:22 2014 (r261087) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/dev/hwpmc/hwpmc_core.c Thu Jan 23 20:10:22 2014 (r261087) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include Modified: head/sys/dev/hwpmc/hwpmc_piv.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_piv.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/dev/hwpmc/hwpmc_piv.c Thu Jan 23 20:10:22 2014 (r261087) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include Modified: head/sys/dev/hwpmc/hwpmc_ppro.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_ppro.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/dev/hwpmc/hwpmc_ppro.c Thu Jan 23 20:10:22 2014 (r261087) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include Modified: head/sys/dev/hwpmc/hwpmc_uncore.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_uncore.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/dev/hwpmc/hwpmc_uncore.c Thu Jan 23 20:10:22 2014 (r261087) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include Modified: head/sys/dev/hwpmc/hwpmc_x86.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_x86.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/dev/hwpmc/hwpmc_x86.c Thu Jan 23 20:10:22 2014 (r261087) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/i386/i386/machdep.c Thu Jan 23 20:10:22 2014 (r261087) @@ -143,7 +143,7 @@ __FBSDID("$FreeBSD$"); #endif #ifdef DEV_APIC -#include +#include #endif #ifdef DEV_ISA Modified: head/sys/i386/i386/mp_watchdog.c ============================================================================== --- head/sys/i386/i386/mp_watchdog.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/i386/i386/mp_watchdog.c Thu Jan 23 20:10:22 2014 (r261087) @@ -45,7 +45,7 @@ #include #include -#include +#include #include /* Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/i386/i386/pmap.c Thu Jan 23 20:10:22 2014 (r261087) @@ -140,7 +140,7 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_APIC #include #include -#include +#include #endif #include #include Modified: head/sys/i386/include/smp.h ============================================================================== --- head/sys/i386/include/smp.h Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/i386/include/smp.h Thu Jan 23 20:10:22 2014 (r261087) @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include /* global data in mpboot.s */ Modified: head/sys/i386/xen/mptable.c ============================================================================== --- head/sys/i386/xen/mptable.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/i386/xen/mptable.c Thu Jan 23 20:10:22 2014 (r261087) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/pc98/pc98/machdep.c Thu Jan 23 20:10:22 2014 (r261087) @@ -137,7 +137,7 @@ __FBSDID("$FreeBSD$"); #endif #ifdef DEV_APIC -#include +#include #endif #ifdef DEV_ISA Modified: head/sys/x86/acpica/madt.c ============================================================================== --- head/sys/x86/acpica/madt.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/x86/acpica/madt.c Thu Jan 23 20:10:22 2014 (r261087) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include Modified: head/sys/x86/acpica/srat.c ============================================================================== --- head/sys/x86/acpica/srat.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/x86/acpica/srat.c Thu Jan 23 20:10:22 2014 (r261087) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include Copied and modified: head/sys/x86/include/apicvar.h (from r260983, head/sys/i386/include/apicvar.h) ============================================================================== --- head/sys/i386/include/apicvar.h Tue Jan 21 13:23:18 2014 (r260983, copy source) +++ head/sys/x86/include/apicvar.h Thu Jan 23 20:10:22 2014 (r261087) @@ -29,8 +29,8 @@ * $FreeBSD$ */ -#ifndef _MACHINE_APICVAR_H_ -#define _MACHINE_APICVAR_H_ +#ifndef _X86_APICVAR_H_ +#define _X86_APICVAR_H_ /* * Local && I/O APIC variable definitions. @@ -114,14 +114,16 @@ #define IPI_INVLPG (APIC_IPI_INTS + 2) #define IPI_INVLRNG (APIC_IPI_INTS + 3) #define IPI_INVLCACHE (APIC_IPI_INTS + 4) +#ifdef __i386__ #define IPI_LAZYPMAP (APIC_IPI_INTS + 5) /* Lazy pmap release. */ +#endif /* Vector to handle bitmap based IPIs */ #define IPI_BITMAP_VECTOR (APIC_IPI_INTS + 6) -/* IPIs handled by IPI_BITMAPED_VECTOR (XXX ups is there a better place?) */ +/* IPIs handled by IPI_BITMAP_VECTOR */ #define IPI_AST 0 /* Generate software trap. */ #define IPI_PREEMPT 1 -#define IPI_HARDCLOCK 2 +#define IPI_HARDCLOCK 2 #define IPI_BITMAP_LAST IPI_HARDCLOCK #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) @@ -220,4 +222,4 @@ void lapic_setup(int boot); void xen_intr_handle_upcall(struct trapframe *frame); #endif /* !LOCORE */ -#endif /* _MACHINE_APICVAR_H_ */ +#endif /* _X86_APICVAR_H_ */ Modified: head/sys/x86/x86/io_apic.c ============================================================================== --- head/sys/x86/x86/io_apic.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/x86/x86/io_apic.c Thu Jan 23 20:10:22 2014 (r261087) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/x86/x86/local_apic.c Thu Jan 23 20:10:22 2014 (r261087) @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/x86/x86/mca.c Thu Jan 23 20:10:22 2014 (r261087) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include Modified: head/sys/x86/x86/mptable.c ============================================================================== --- head/sys/x86/x86/mptable.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/x86/x86/mptable.c Thu Jan 23 20:10:22 2014 (r261087) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #ifdef NEW_PCIB #include Modified: head/sys/x86/x86/msi.c ============================================================================== --- head/sys/x86/x86/msi.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/x86/x86/msi.c Thu Jan 23 20:10:22 2014 (r261087) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include Modified: head/sys/x86/xen/xen_intr.c ============================================================================== --- head/sys/x86/xen/xen_intr.c Thu Jan 23 19:55:02 2014 (r261086) +++ head/sys/x86/xen/xen_intr.c Thu Jan 23 20:10:22 2014 (r261087) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 20:17:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17F3B786; Thu, 23 Jan 2014 20:17:55 +0000 (UTC) Received: from mail-bk0-x235.google.com (mail-bk0-x235.google.com [IPv6:2a00:1450:4008:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2735D1631; Thu, 23 Jan 2014 20:17:53 +0000 (UTC) Received: by mail-bk0-f53.google.com with SMTP id my13so628870bkb.40 for ; Thu, 23 Jan 2014 12:17:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=5CK5XlHk+Te8z8qyju2awZXuUPdjX/sjfv9TUOn2QFg=; b=h58QPV/2nbDTj4oODHeksFMF44y6mhGXqiNf7RSR+kHWi0EEIyooIR5kdrlHL8+h46 nqrOgUqARAOpUGaJLXY9zdVemyTKeOlRLg3JTR2y0luUV5aRUaB94c3XjIhUHCZIxA+r wTlCJ9hrAi6diG9hNzYnBe40meMqK1SfRZobDS8i7Cvmx01hX/x0aUC4kSucgJ0XIZ21 H0aGumZ53U+OmXsUY3wSkPVH3X7/kcQ3IDfo9YXLgUsHrX8+lwEwfBT/khxrPKVqju3O QzMOYwIsHyc9zD7mGjNuMLM74jb6hulcUPd+tah0SyQyI4dhlMUd0Nl56ftFQjf0qj8S ouEw== X-Received: by 10.205.108.71 with SMTP id eb7mr1610456bkc.129.1390508272477; Thu, 23 Jan 2014 12:17:52 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id rf10sm173451bkb.3.2014.01.23.12.17.50 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 23 Jan 2014 12:17:51 -0800 (PST) Date: Thu, 23 Jan 2014 21:17:48 +0100 From: Mateusz Guzik To: "Andrey V. Elsukov" Subject: Re: svn commit: r261085 - head/sys/geom Message-ID: <20140123201748.GA26772@dft-labs.eu> References: <201401231931.s0NJVHKS089308@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201401231931.s0NJVHKS089308@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:17:55 -0000 On Thu, Jan 23, 2014 at 07:31:17PM +0000, Andrey V. Elsukov wrote: > @@ -122,7 +123,7 @@ geom_alloc_copyin(struct gctl_req *req, > void *ptr; > > ptr = g_malloc(len, M_WAITOK); > - nreq->nerror = copyin(uaddr, ptr, len); > + req->nerror = copyin(uaddr, ptr, len); > if (!req->nerror) > return (ptr); > if (ptr != NULL) Is not this if (ptr != NULL) unnecesary? -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 20:21:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1383ACD; Thu, 23 Jan 2014 20:21:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AA31E16CD; Thu, 23 Jan 2014 20:21:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NKLfEJ012769; Thu, 23 Jan 2014 20:21:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NKLdCg012757; Thu, 23 Jan 2014 20:21:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401232021.s0NKLdCg012757@svn.freebsd.org> From: John Baldwin Date: Thu, 23 Jan 2014 20:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261088 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/amd64/vmm/io sys/modules/vmm usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:21:41 -0000 Author: jhb Date: Thu Jan 23 20:21:39 2014 New Revision: 261088 URL: http://svnweb.freebsd.org/changeset/base/261088 Log: MFC 257422,257661,258075,258476,258494,258579,258609,258699: Several enhancements to the I/O APIC support in bhyve including: - Move the I/O APIC device model from userspace into vmm.ko and add ioctls to assert and deassert I/O APIC pins. - Add HPET device emulation including a single timer block with 8 timers. - Remove the 'vdev' abstraction. Approved by: neel Added: stable/10/sys/amd64/vmm/io/vhpet.c - copied, changed from r258579, head/sys/amd64/vmm/io/vhpet.c stable/10/sys/amd64/vmm/io/vhpet.h - copied unchanged from r258579, head/sys/amd64/vmm/io/vhpet.h stable/10/sys/amd64/vmm/io/vioapic.c - copied, changed from r258075, head/sys/amd64/vmm/io/vioapic.c stable/10/sys/amd64/vmm/io/vioapic.h - copied, changed from r258075, head/sys/amd64/vmm/io/vioapic.h Deleted: stable/10/sys/amd64/vmm/io/vdev.c stable/10/sys/amd64/vmm/io/vdev.h stable/10/usr.sbin/bhyve/ioapic.c stable/10/usr.sbin/bhyve/ioapic.h Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/include/vmm_dev.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/io/ppt.c stable/10/sys/amd64/vmm/io/vlapic.c stable/10/sys/amd64/vmm/io/vlapic.h stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_dev.c stable/10/sys/amd64/vmm/vmm_ktr.h stable/10/sys/amd64/vmm/vmm_lapic.c stable/10/sys/amd64/vmm/vmm_lapic.h stable/10/sys/modules/vmm/Makefile stable/10/usr.sbin/bhyve/Makefile stable/10/usr.sbin/bhyve/acpi.c stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/mptbl.c stable/10/usr.sbin/bhyve/pci_emul.c stable/10/usr.sbin/bhyve/pci_emul.h stable/10/usr.sbin/bhyve/pci_lpc.c stable/10/usr.sbin/bhyve/pit_8254.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Thu Jan 23 20:10:22 2014 (r261087) +++ stable/10/lib/libvmmapi/vmmapi.c Thu Jan 23 20:21:39 2014 (r261088) @@ -397,6 +397,39 @@ vm_lapic_irq(struct vmctx *ctx, int vcpu } int +vm_ioapic_assert_irq(struct vmctx *ctx, int irq) +{ + struct vm_ioapic_irq ioapic_irq; + + bzero(&ioapic_irq, sizeof(struct vm_ioapic_irq)); + ioapic_irq.irq = irq; + + return (ioctl(ctx->fd, VM_IOAPIC_ASSERT_IRQ, &ioapic_irq)); +} + +int +vm_ioapic_deassert_irq(struct vmctx *ctx, int irq) +{ + struct vm_ioapic_irq ioapic_irq; + + bzero(&ioapic_irq, sizeof(struct vm_ioapic_irq)); + ioapic_irq.irq = irq; + + return (ioctl(ctx->fd, VM_IOAPIC_DEASSERT_IRQ, &ioapic_irq)); +} + +int +vm_ioapic_pulse_irq(struct vmctx *ctx, int irq) +{ + struct vm_ioapic_irq ioapic_irq; + + bzero(&ioapic_irq, sizeof(struct vm_ioapic_irq)); + ioapic_irq.irq = irq; + + return (ioctl(ctx->fd, VM_IOAPIC_PULSE_IRQ, &ioapic_irq)); +} + +int vm_inject_nmi(struct vmctx *ctx, int vcpu) { struct vm_nmi vmnmi; @@ -792,3 +825,16 @@ vm_get_gpa_pmap(struct vmctx *ctx, uint6 return (error); } + +int +vm_get_hpet_capabilities(struct vmctx *ctx, uint32_t *capabilities) +{ + int error; + struct vm_hpet_cap cap; + + bzero(&cap, sizeof(struct vm_hpet_cap)); + error = ioctl(ctx->fd, VM_GET_HPET_CAPABILITIES, &cap); + if (capabilities != NULL) + *capabilities = cap.capabilities; + return (error); +} Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Thu Jan 23 20:10:22 2014 (r261087) +++ stable/10/lib/libvmmapi/vmmapi.h Thu Jan 23 20:21:39 2014 (r261088) @@ -67,6 +67,9 @@ int vm_inject_event(struct vmctx *ctx, i int vm_inject_event2(struct vmctx *ctx, int vcpu, enum vm_event_type type, int vector, int error_code); int vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector); +int vm_ioapic_assert_irq(struct vmctx *ctx, int irq); +int vm_ioapic_deassert_irq(struct vmctx *ctx, int irq); +int vm_ioapic_pulse_irq(struct vmctx *ctx, int irq); int vm_inject_nmi(struct vmctx *ctx, int vcpu); int vm_capability_name2type(const char *capname); const char *vm_capability_type2name(int type); @@ -93,6 +96,8 @@ const char *vm_get_stat_desc(struct vmct int vm_get_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state *s); int vm_set_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state s); +int vm_get_hpet_capabilities(struct vmctx *ctx, uint32_t *capabilities); + /* Reset vcpu register state */ int vcpu_reset(struct vmctx *ctx, int vcpu); Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Thu Jan 23 20:10:22 2014 (r261087) +++ stable/10/sys/amd64/include/vmm.h Thu Jan 23 20:21:39 2014 (r261088) @@ -38,6 +38,8 @@ struct vm_memory_segment; struct seg_desc; struct vm_exit; struct vm_run; +struct vhpet; +struct vioapic; struct vlapic; struct vmspace; struct vm_object; @@ -116,10 +118,13 @@ int vm_nmi_pending(struct vm *vm, int vc void vm_nmi_clear(struct vm *vm, int vcpuid); uint64_t *vm_guest_msrs(struct vm *vm, int cpu); struct vlapic *vm_lapic(struct vm *vm, int cpu); +struct vioapic *vm_ioapic(struct vm *vm); +struct vhpet *vm_hpet(struct vm *vm); int vm_get_capability(struct vm *vm, int vcpu, int type, int *val); int vm_set_capability(struct vm *vm, int vcpu, int type, int val); int vm_get_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state *state); int vm_set_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state state); +int vm_apicid2vcpuid(struct vm *vm, int apicid); void vm_activate_cpu(struct vm *vm, int vcpu); cpuset_t vm_active_cpus(struct vm *vm); struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid); Modified: stable/10/sys/amd64/include/vmm_dev.h ============================================================================== --- stable/10/sys/amd64/include/vmm_dev.h Thu Jan 23 20:10:22 2014 (r261087) +++ stable/10/sys/amd64/include/vmm_dev.h Thu Jan 23 20:21:39 2014 (r261088) @@ -71,6 +71,10 @@ struct vm_lapic_irq { int vector; }; +struct vm_ioapic_irq { + int irq; +}; + struct vm_capability { int cpuid; enum vm_cap_type captype; @@ -142,6 +146,10 @@ struct vm_gpa_pte { int ptenum; }; +struct vm_hpet_cap { + uint32_t capabilities; /* lower 32 bits of HPET capabilities */ +}; + enum { /* general routines */ IOCNUM_ABIVERS = 0, @@ -164,6 +172,9 @@ enum { IOCNUM_INJECT_EVENT = 30, IOCNUM_LAPIC_IRQ = 31, IOCNUM_INJECT_NMI = 32, + IOCNUM_IOAPIC_ASSERT_IRQ = 33, + IOCNUM_IOAPIC_DEASSERT_IRQ = 34, + IOCNUM_IOAPIC_PULSE_IRQ = 35, /* PCI pass-thru */ IOCNUM_BIND_PPTDEV = 40, @@ -179,6 +190,7 @@ enum { /* kernel device state */ IOCNUM_SET_X2APIC_STATE = 60, IOCNUM_GET_X2APIC_STATE = 61, + IOCNUM_GET_HPET_CAPABILITIES = 62, }; #define VM_RUN \ @@ -199,6 +211,12 @@ enum { _IOW('v', IOCNUM_INJECT_EVENT, struct vm_event) #define VM_LAPIC_IRQ \ _IOW('v', IOCNUM_LAPIC_IRQ, struct vm_lapic_irq) +#define VM_IOAPIC_ASSERT_IRQ \ + _IOW('v', IOCNUM_IOAPIC_ASSERT_IRQ, struct vm_ioapic_irq) +#define VM_IOAPIC_DEASSERT_IRQ \ + _IOW('v', IOCNUM_IOAPIC_DEASSERT_IRQ, struct vm_ioapic_irq) +#define VM_IOAPIC_PULSE_IRQ \ + _IOW('v', IOCNUM_IOAPIC_PULSE_IRQ, struct vm_ioapic_irq) #define VM_SET_CAPABILITY \ _IOW('v', IOCNUM_SET_CAPABILITY, struct vm_capability) #define VM_GET_CAPABILITY \ @@ -223,6 +241,8 @@ enum { _IOW('v', IOCNUM_SET_X2APIC_STATE, struct vm_x2apic) #define VM_GET_X2APIC_STATE \ _IOWR('v', IOCNUM_GET_X2APIC_STATE, struct vm_x2apic) +#define VM_GET_HPET_CAPABILITIES \ + _IOR('v', IOCNUM_GET_HPET_CAPABILITIES, struct vm_hpet_cap) #define VM_GET_GPA_PMAP \ _IOWR('v', IOCNUM_GET_GPA_PMAP, struct vm_gpa_pte) #endif Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Thu Jan 23 20:10:22 2014 (r261087) +++ stable/10/sys/amd64/vmm/intel/vmx.c Thu Jan 23 20:21:39 2014 (r261088) @@ -308,8 +308,8 @@ vmx_setjmp_rc2str(int rc) } } -#define SETJMP_TRACE(vmx, vcpu, vmxctx, regname) \ - VMM_CTR1((vmx)->vm, (vcpu), "setjmp trace " #regname " 0x%016lx", \ +#define SETJMP_TRACE(vmx, vcpu, vmxctx, regname) \ + VCPU_CTR1((vmx)->vm, (vcpu), "setjmp trace " #regname " 0x%016lx", \ (vmxctx)->regname) static void @@ -321,14 +321,14 @@ vmx_setjmp_trace(struct vmx *vmx, int vc panic("vmx_setjmp_trace: invalid vmxctx %p; should be %p", vmxctx, &vmx->ctx[vcpu]); - VMM_CTR1((vmx)->vm, (vcpu), "vmxctx = %p", vmxctx); - VMM_CTR2((vmx)->vm, (vcpu), "setjmp return code %s(%d)", + VCPU_CTR1((vmx)->vm, (vcpu), "vmxctx = %p", vmxctx); + VCPU_CTR2((vmx)->vm, (vcpu), "setjmp return code %s(%d)", vmx_setjmp_rc2str(rc), rc); host_rsp = host_rip = ~0; vmread(VMCS_HOST_RIP, &host_rip); vmread(VMCS_HOST_RSP, &host_rsp); - VMM_CTR2((vmx)->vm, (vcpu), "vmcs host_rip 0x%016lx, host_rsp 0x%016lx", + VCPU_CTR2((vmx)->vm, (vcpu), "vmcs host_rip 0x%016lx, host_rsp %#lx", host_rip, host_rsp); SETJMP_TRACE(vmx, vcpu, vmxctx, host_r15); @@ -887,7 +887,7 @@ static __inline void vmx_run_trace(struct vmx *vmx, int vcpu) { #ifdef KTR - VMM_CTR1(vmx->vm, vcpu, "Resume execution at 0x%0lx", vmcs_guest_rip()); + VCPU_CTR1(vmx->vm, vcpu, "Resume execution at %#lx", vmcs_guest_rip()); #endif } @@ -896,7 +896,7 @@ vmx_exit_trace(struct vmx *vmx, int vcpu int handled) { #ifdef KTR - VMM_CTR3(vmx->vm, vcpu, "%s %s vmexit at 0x%0lx", + VCPU_CTR3(vmx->vm, vcpu, "%s %s vmexit at 0x%0lx", handled ? "handled" : "unhandled", exit_reason_to_str(exit_reason), rip); #endif @@ -906,7 +906,7 @@ static __inline void vmx_astpending_trace(struct vmx *vmx, int vcpu, uint64_t rip) { #ifdef KTR - VMM_CTR1(vmx->vm, vcpu, "astpending vmexit at 0x%0lx", rip); + VCPU_CTR1(vmx->vm, vcpu, "astpending vmexit at 0x%0lx", rip); #endif } @@ -1055,7 +1055,7 @@ vmx_inject_nmi(struct vmx *vmx, int vcpu if (error) panic("vmx_inject_nmi: vmwrite(intrinfo) %d", error); - VMM_CTR0(vmx->vm, vcpu, "Injecting vNMI"); + VCPU_CTR0(vmx->vm, vcpu, "Injecting vNMI"); /* Clear the request */ vm_nmi_clear(vmx->vm, vcpu); @@ -1068,7 +1068,7 @@ nmiblocked: */ vmx_set_nmi_window_exiting(vmx, vcpu); - VMM_CTR0(vmx->vm, vcpu, "Enabling NMI window exiting"); + VCPU_CTR0(vmx->vm, vcpu, "Enabling NMI window exiting"); return (1); } @@ -1134,7 +1134,7 @@ vmx_inject_interrupts(struct vmx *vmx, i /* Update the Local APIC ISR */ lapic_intr_accepted(vmx->vm, vcpu, vector); - VMM_CTR1(vmx->vm, vcpu, "Injecting hwintr at vector %d", vector); + VCPU_CTR1(vmx->vm, vcpu, "Injecting hwintr at vector %d", vector); return; @@ -1145,7 +1145,7 @@ cantinject: */ vmx_set_int_window_exiting(vmx, vcpu); - VMM_CTR0(vmx->vm, vcpu, "Enabling interrupt window exiting"); + VCPU_CTR0(vmx->vm, vcpu, "Enabling interrupt window exiting"); } static int @@ -1435,7 +1435,7 @@ vmx_exit_process(struct vmx *vmx, int vc case EXIT_REASON_INTR_WINDOW: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_INTR_WINDOW, 1); vmx_clear_int_window_exiting(vmx, vcpu); - VMM_CTR0(vmx->vm, vcpu, "Disabling interrupt window exiting"); + VCPU_CTR0(vmx->vm, vcpu, "Disabling interrupt window exiting"); return (1); case EXIT_REASON_EXT_INTR: /* @@ -1458,7 +1458,7 @@ vmx_exit_process(struct vmx *vmx, int vc /* Exit to allow the pending virtual NMI to be injected */ vmm_stat_incr(vmx->vm, vcpu, VMEXIT_NMI_WINDOW, 1); vmx_clear_nmi_window_exiting(vmx, vcpu); - VMM_CTR0(vmx->vm, vcpu, "Disabling NMI window exiting"); + VCPU_CTR0(vmx->vm, vcpu, "Disabling NMI window exiting"); return (1); case EXIT_REASON_INOUT: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_INOUT, 1); @@ -1659,7 +1659,7 @@ vmx_run(void *arg, int vcpu, register_t if (!handled) vmm_stat_incr(vmx->vm, vcpu, VMEXIT_USERSPACE, 1); - VMM_CTR1(vmx->vm, vcpu, "goto userland: exitcode %d",vmexit->exitcode); + VCPU_CTR1(vmx->vm, vcpu, "goto userland: exitcode %d",vmexit->exitcode); /* * XXX Modified: stable/10/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.c Thu Jan 23 20:10:22 2014 (r261087) +++ stable/10/sys/amd64/vmm/io/ppt.c Thu Jan 23 20:21:39 2014 (r261088) @@ -421,7 +421,7 @@ pptintr(void *arg) vec = pptarg->vec; if (ppt->vm != NULL) - (void) lapic_set_intr(ppt->vm, pptarg->vcpu, vec); + lapic_intr_edge(ppt->vm, pptarg->vcpu, vec); else { /* * XXX Copied and modified: stable/10/sys/amd64/vmm/io/vhpet.c (from r258579, head/sys/amd64/vmm/io/vhpet.c) ============================================================================== --- head/sys/amd64/vmm/io/vhpet.c Mon Nov 25 19:04:51 2013 (r258579, copy source) +++ stable/10/sys/amd64/vmm/io/vhpet.c Thu Jan 23 20:21:39 2014 (r261088) @@ -266,14 +266,14 @@ vhpet_timer_interrupt(struct vhpet *vhpe if (apicid != 0xff) { /* unicast */ vcpuid = vm_apicid2vcpuid(vhpet->vm, apicid); - lapic_set_intr(vhpet->vm, vcpuid, vector); + lapic_intr_edge(vhpet->vm, vcpuid, vector); } else { /* broadcast */ dmask = vm_active_cpus(vhpet->vm); while ((vcpuid = CPU_FFS(&dmask)) != 0) { vcpuid--; CPU_CLR(vcpuid, &dmask); - lapic_set_intr(vhpet->vm, vcpuid, vector); + lapic_intr_edge(vhpet->vm, vcpuid, vector); } } return; @@ -725,8 +725,9 @@ done: struct vhpet * vhpet_init(struct vm *vm) { - int i; + int i, pincount; struct vhpet *vhpet; + uint64_t allowed_irqs; struct vhpet_callout_arg *arg; struct bintime bt; @@ -737,12 +738,20 @@ vhpet_init(struct vm *vm) FREQ2BT(HPET_FREQ, &bt); vhpet->freq_sbt = bttosbt(bt); + pincount = vioapic_pincount(vm); + if (pincount >= 24) + allowed_irqs = 0x00f00000; /* irqs 20, 21, 22 and 23 */ + else + allowed_irqs = 0; + /* * Initialize HPET timer hardware state. */ for (i = 0; i < VHPET_NUM_TIMERS; i++) { - vhpet->timer[i].cap_config = 0UL << 32 | - HPET_TCAP_FSB_INT_DEL | HPET_TCAP_PER_INT; + vhpet->timer[i].cap_config = allowed_irqs << 32; + vhpet->timer[i].cap_config |= HPET_TCAP_PER_INT; + vhpet->timer[i].cap_config |= HPET_TCAP_FSB_INT_DEL; + vhpet->timer[i].compval = 0xffffffff; callout_init(&vhpet->timer[i].callout, 1); Copied: stable/10/sys/amd64/vmm/io/vhpet.h (from r258579, head/sys/amd64/vmm/io/vhpet.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/amd64/vmm/io/vhpet.h Thu Jan 23 20:21:39 2014 (r261088, copy of r258579, head/sys/amd64/vmm/io/vhpet.h) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2013 Tycho Nightingale + * Copyright (c) 2013 Neel Natu + * 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 NETAPP, INC ``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 NETAPP, INC 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$ + */ + +#ifndef _VHPET_H_ +#define _VHPET_H_ + +#define VHPET_BASE 0xfed00000 +#define VHPET_SIZE 1024 + +struct vhpet *vhpet_init(struct vm *vm); +void vhpet_cleanup(struct vhpet *vhpet); +int vhpet_mmio_write(void *vm, int vcpuid, uint64_t gpa, uint64_t val, + int size, void *arg); +int vhpet_mmio_read(void *vm, int vcpuid, uint64_t gpa, uint64_t *val, + int size, void *arg); +int vhpet_getcap(struct vm_hpet_cap *cap); + +#endif /* _VHPET_H_ */ Copied and modified: stable/10/sys/amd64/vmm/io/vioapic.c (from r258075, head/sys/amd64/vmm/io/vioapic.c) ============================================================================== --- head/sys/amd64/vmm/io/vioapic.c Tue Nov 12 22:51:03 2013 (r258075, copy source) +++ stable/10/sys/amd64/vmm/io/vioapic.c Thu Jan 23 20:21:39 2014 (r261088) @@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$"); #define IOREGSEL 0x00 #define IOWIN 0x10 -#define REDIR_ENTRIES 16 -#define INTR_ASSERTED(vioapic, pin) ((vioapic)->rtbl[(pin)].pinstate == true) +#define REDIR_ENTRIES 24 +#define RTBL_RO_BITS ((uint64_t)(IOART_REM_IRR | IOART_DELIVS)) struct vioapic { struct vm *vm; @@ -59,8 +59,7 @@ struct vioapic { uint32_t ioregsel; struct { uint64_t reg; - bool pinstate; - bool pending; + int acnt; /* sum of pin asserts (+1) and deasserts (-1) */ } rtbl[REDIR_ENTRIES]; }; @@ -79,6 +78,9 @@ static MALLOC_DEFINE(M_VIOAPIC, "vioapic #define VIOAPIC_CTR3(vioapic, fmt, a1, a2, a3) \ VM_CTR3((vioapic)->vm, fmt, a1, a2, a3) +#define VIOAPIC_CTR4(vioapic, fmt, a1, a2, a3, a4) \ + VM_CTR4((vioapic)->vm, fmt, a1, a2, a3, a4) + #ifdef KTR static const char * pinstate_str(bool asserted) @@ -89,14 +91,25 @@ pinstate_str(bool asserted) else return ("deasserted"); } + +static const char * +trigger_str(bool level) +{ + + if (level) + return ("level"); + else + return ("edge"); +} #endif static void -vioapic_set_pinstate(struct vioapic *vioapic, int pin, bool newstate) +vioapic_send_intr(struct vioapic *vioapic, int pin) { int vector, apicid, vcpuid; uint32_t low, high; cpuset_t dmask; + bool level; KASSERT(pin >= 0 && pin < REDIR_ENTRIES, ("vioapic_set_pinstate: invalid pin number %d", pin)); @@ -104,64 +117,104 @@ vioapic_set_pinstate(struct vioapic *vio KASSERT(VIOAPIC_LOCKED(vioapic), ("vioapic_set_pinstate: vioapic is not locked")); - VIOAPIC_CTR2(vioapic, "ioapic pin%d %s", pin, pinstate_str(newstate)); + low = vioapic->rtbl[pin].reg; + high = vioapic->rtbl[pin].reg >> 32; - /* Nothing to do if interrupt pin has not changed state */ - if (vioapic->rtbl[pin].pinstate == newstate) + /* + * XXX We only deal with: + * - physical destination + * - fixed delivery mode + */ + if ((low & IOART_DESTMOD) != IOART_DESTPHY) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: unsupported dest mode " + "0x%08x", pin, low); return; + } - vioapic->rtbl[pin].pinstate = newstate; /* record it */ + if ((low & IOART_DELMOD) != IOART_DELFIXED) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: unsupported delivery mode " + "0x%08x", pin, low); + return; + } - /* Nothing to do if interrupt pin is deasserted */ - if (!INTR_ASSERTED(vioapic, pin)) + if ((low & IOART_INTMASK) == IOART_INTMSET) { + VIOAPIC_CTR1(vioapic, "ioapic pin%d: masked", pin); return; + } - /* - * XXX - * We only deal with: - * - edge triggered interrupts - * - fixed delivery mode - * Level-triggered sources will work so long as there is no sharing. - */ - low = vioapic->rtbl[pin].reg; - high = vioapic->rtbl[pin].reg >> 32; - if ((low & IOART_INTMASK) == IOART_INTMCLR && - (low & IOART_DESTMOD) == IOART_DESTPHY && - (low & IOART_DELMOD) == IOART_DELFIXED) { - vector = low & IOART_INTVEC; - apicid = high >> APIC_ID_SHIFT; - if (apicid != 0xff) { - /* unicast */ - vcpuid = vm_apicid2vcpuid(vioapic->vm, apicid); - VIOAPIC_CTR3(vioapic, "ioapic pin%d triggering " - "intr vector %d on vcpuid %d", pin, vector, vcpuid); - lapic_set_intr(vioapic->vm, vcpuid, vector); - } else { - /* broadcast */ - VIOAPIC_CTR2(vioapic, "ioapic pin%d triggering intr " - "vector %d on all vcpus", pin, vector); - dmask = vm_active_cpus(vioapic->vm); - while ((vcpuid = CPU_FFS(&dmask)) != 0) { - vcpuid--; - CPU_CLR(vcpuid, &dmask); - lapic_set_intr(vioapic->vm, vcpuid, vector); - } + level = low & IOART_TRGRLVL ? true : false; + if (level) + vioapic->rtbl[pin].reg |= IOART_REM_IRR; + + vector = low & IOART_INTVEC; + apicid = high >> APIC_ID_SHIFT; + if (apicid != 0xff) { + /* unicast */ + vcpuid = vm_apicid2vcpuid(vioapic->vm, apicid); + VIOAPIC_CTR4(vioapic, "ioapic pin%d: %s triggered intr " + "vector %d on vcpuid %d", pin, trigger_str(level), + vector, vcpuid); + lapic_set_intr(vioapic->vm, vcpuid, vector, level); + } else { + /* broadcast */ + VIOAPIC_CTR3(vioapic, "ioapic pin%d: %s triggered intr " + "vector %d on all vcpus", pin, trigger_str(level), vector); + dmask = vm_active_cpus(vioapic->vm); + while ((vcpuid = CPU_FFS(&dmask)) != 0) { + vcpuid--; + CPU_CLR(vcpuid, &dmask); + lapic_set_intr(vioapic->vm, vcpuid, vector, level); } - } else if ((low & IOART_INTMASK) != IOART_INTMCLR && - (low & IOART_TRGRLVL) != 0) { - /* - * For level-triggered interrupts that have been - * masked, set the pending bit so that an interrupt - * will be generated on unmask and if the level is - * still asserted - */ - VIOAPIC_CTR1(vioapic, "ioapic pin%d interrupt pending", pin); - vioapic->rtbl[pin].pending = true; } } +static void +vioapic_set_pinstate(struct vioapic *vioapic, int pin, bool newstate) +{ + int oldcnt, newcnt; + bool needintr; + + KASSERT(pin >= 0 && pin < REDIR_ENTRIES, + ("vioapic_set_pinstate: invalid pin number %d", pin)); + + KASSERT(VIOAPIC_LOCKED(vioapic), + ("vioapic_set_pinstate: vioapic is not locked")); + + oldcnt = vioapic->rtbl[pin].acnt; + if (newstate) + vioapic->rtbl[pin].acnt++; + else + vioapic->rtbl[pin].acnt--; + newcnt = vioapic->rtbl[pin].acnt; + + if (newcnt < 0) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: bad acnt %d", + pin, newcnt); + } + + needintr = false; + if (oldcnt == 0 && newcnt == 1) { + needintr = true; + VIOAPIC_CTR1(vioapic, "ioapic pin%d: asserted", pin); + } else if (oldcnt == 1 && newcnt == 0) { + VIOAPIC_CTR1(vioapic, "ioapic pin%d: deasserted", pin); + } else { + VIOAPIC_CTR3(vioapic, "ioapic pin%d: %s, ignored, acnt %d", + pin, pinstate_str(newstate), newcnt); + } + + if (needintr) + vioapic_send_intr(vioapic, pin); +} + +enum irqstate { + IRQSTATE_ASSERT, + IRQSTATE_DEASSERT, + IRQSTATE_PULSE +}; + static int -vioapic_set_irqstate(struct vm *vm, int irq, bool state) +vioapic_set_irqstate(struct vm *vm, int irq, enum irqstate irqstate) { struct vioapic *vioapic; @@ -171,7 +224,20 @@ vioapic_set_irqstate(struct vm *vm, int vioapic = vm_ioapic(vm); VIOAPIC_LOCK(vioapic); - vioapic_set_pinstate(vioapic, irq, state); + switch (irqstate) { + case IRQSTATE_ASSERT: + vioapic_set_pinstate(vioapic, irq, true); + break; + case IRQSTATE_DEASSERT: + vioapic_set_pinstate(vioapic, irq, false); + break; + case IRQSTATE_PULSE: + vioapic_set_pinstate(vioapic, irq, true); + vioapic_set_pinstate(vioapic, irq, false); + break; + default: + panic("vioapic_set_irqstate: invalid irqstate %d", irqstate); + } VIOAPIC_UNLOCK(vioapic); return (0); @@ -181,14 +247,21 @@ int vioapic_assert_irq(struct vm *vm, int irq) { - return (vioapic_set_irqstate(vm, irq, true)); + return (vioapic_set_irqstate(vm, irq, IRQSTATE_ASSERT)); } int vioapic_deassert_irq(struct vm *vm, int irq) { - return (vioapic_set_irqstate(vm, irq, false)); + return (vioapic_set_irqstate(vm, irq, IRQSTATE_DEASSERT)); +} + +int +vioapic_pulse_irq(struct vm *vm, int irq) +{ + + return (vioapic_set_irqstate(vm, irq, IRQSTATE_PULSE)); } static uint32_t @@ -202,7 +275,7 @@ vioapic_read(struct vioapic *vioapic, ui return (vioapic->id); break; case IOAPIC_VER: - return ((REDIR_ENTRIES << MAXREDIRSHIFT) | 0x11); + return (((REDIR_ENTRIES - 1) << MAXREDIRSHIFT) | 0x11); break; case IOAPIC_ARB: return (vioapic->id); @@ -229,6 +302,7 @@ vioapic_read(struct vioapic *vioapic, ui static void vioapic_write(struct vioapic *vioapic, uint32_t addr, uint32_t data) { + uint64_t data64, mask64; int regnum, pin, lshift; regnum = addr & 0xff; @@ -253,30 +327,26 @@ vioapic_write(struct vioapic *vioapic, u else lshift = 0; - vioapic->rtbl[pin].reg &= ~((uint64_t)0xffffffff << lshift); - vioapic->rtbl[pin].reg |= ((uint64_t)data << lshift); + data64 = (uint64_t)data << lshift; + mask64 = (uint64_t)0xffffffff << lshift; + vioapic->rtbl[pin].reg &= ~mask64 | RTBL_RO_BITS; + vioapic->rtbl[pin].reg |= data64 & ~RTBL_RO_BITS; - VIOAPIC_CTR2(vioapic, "ioapic pin%d redir table entry %#lx", + VIOAPIC_CTR2(vioapic, "ioapic pin%d: redir table entry %#lx", pin, vioapic->rtbl[pin].reg); - if (vioapic->rtbl[pin].pending && - ((vioapic->rtbl[pin].reg & IOART_INTMASK) == - IOART_INTMCLR)) { - vioapic->rtbl[pin].pending = false; - /* - * Inject the deferred level-triggered int if it is - * still asserted. Simulate by toggling the pin - * off and then on. - */ - if (vioapic->rtbl[pin].pinstate == true) { - VIOAPIC_CTR1(vioapic, "ioapic pin%d pending " - "interrupt delivered", pin); - vioapic_set_pinstate(vioapic, pin, false); - vioapic_set_pinstate(vioapic, pin, true); - } else { - VIOAPIC_CTR1(vioapic, "ioapic pin%d pending " - "interrupt dismissed", pin); - } + /* + * Generate an interrupt if the following conditions are met: + * - pin is not masked + * - previous interrupt has been EOIed + * - pin level is asserted + */ + if ((vioapic->rtbl[pin].reg & IOART_INTMASK) == IOART_INTMCLR && + (vioapic->rtbl[pin].reg & IOART_REM_IRR) == 0 && + (vioapic->rtbl[pin].acnt > 0)) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: asserted at rtbl " + "write, acnt %d", pin, vioapic->rtbl[pin].acnt); + vioapic_send_intr(vioapic, pin); } } } @@ -340,6 +410,38 @@ vioapic_mmio_write(void *vm, int vcpuid, return (error); } +void +vioapic_process_eoi(struct vm *vm, int vcpuid, int vector) +{ + struct vioapic *vioapic; + int pin; + + KASSERT(vector >= 0 && vector < 256, + ("vioapic_process_eoi: invalid vector %d", vector)); + + vioapic = vm_ioapic(vm); + VIOAPIC_CTR1(vioapic, "ioapic processing eoi for vector %d", vector); + + /* + * XXX keep track of the pins associated with this vector instead + * of iterating on every single pin each time. + */ + VIOAPIC_LOCK(vioapic); + for (pin = 0; pin < REDIR_ENTRIES; pin++) { + if ((vioapic->rtbl[pin].reg & IOART_REM_IRR) == 0) + continue; + if ((vioapic->rtbl[pin].reg & IOART_INTVEC) != vector) + continue; + vioapic->rtbl[pin].reg &= ~IOART_REM_IRR; + if (vioapic->rtbl[pin].acnt > 0) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: asserted at eoi, " + "acnt %d", pin, vioapic->rtbl[pin].acnt); + vioapic_send_intr(vioapic, pin); + } + } + VIOAPIC_UNLOCK(vioapic); +} + struct vioapic * vioapic_init(struct vm *vm) { @@ -364,3 +466,10 @@ vioapic_cleanup(struct vioapic *vioapic) free(vioapic, M_VIOAPIC); } + +int +vioapic_pincount(struct vm *vm) +{ + + return (REDIR_ENTRIES); +} Copied and modified: stable/10/sys/amd64/vmm/io/vioapic.h (from r258075, head/sys/amd64/vmm/io/vioapic.h) ============================================================================== --- head/sys/amd64/vmm/io/vioapic.h Tue Nov 12 22:51:03 2013 (r258075, copy source) +++ stable/10/sys/amd64/vmm/io/vioapic.h Thu Jan 23 20:21:39 2014 (r261088) @@ -30,9 +30,6 @@ #ifndef _VIOAPIC_H_ #define _VIOAPIC_H_ -struct vm; -struct vioapic; - #define VIOAPIC_BASE 0xFEC00000 #define VIOAPIC_SIZE 4096 @@ -41,9 +38,13 @@ void vioapic_cleanup(struct vioapic *vio int vioapic_assert_irq(struct vm *vm, int irq); int vioapic_deassert_irq(struct vm *vm, int irq); +int vioapic_pulse_irq(struct vm *vm, int irq); int vioapic_mmio_write(void *vm, int vcpuid, uint64_t gpa, uint64_t wval, int size, void *arg); int vioapic_mmio_read(void *vm, int vcpuid, uint64_t gpa, uint64_t *rval, int size, void *arg); + +int vioapic_pincount(struct vm *vm); +void vioapic_process_eoi(struct vm *vm, int vcpuid, int vector); #endif Modified: stable/10/sys/amd64/vmm/io/vlapic.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vlapic.c Thu Jan 23 20:10:22 2014 (r261087) +++ stable/10/sys/amd64/vmm/io/vlapic.c Thu Jan 23 20:21:39 2014 (r261088) @@ -44,14 +44,14 @@ __FBSDID("$FreeBSD$"); #include "vmm_stat.h" #include "vmm_lapic.h" #include "vmm_ktr.h" -#include "vdev.h" #include "vlapic.h" +#include "vioapic.h" #define VLAPIC_CTR0(vlapic, format) \ - VMM_CTR0((vlapic)->vm, (vlapic)->vcpuid, format) + VCPU_CTR0((vlapic)->vm, (vlapic)->vcpuid, format) #define VLAPIC_CTR1(vlapic, format, p1) \ - VMM_CTR1((vlapic)->vm, (vlapic)->vcpuid, format, p1) + VCPU_CTR1((vlapic)->vm, (vlapic)->vcpuid, format, p1) #define VLAPIC_CTR_IRR(vlapic, msg) \ do { \ @@ -100,8 +100,6 @@ struct vlapic { struct vm *vm; int vcpuid; - struct io_region *mmio; - struct vdev_ops *ops; struct LAPIC apic; int esr_update; @@ -195,9 +193,8 @@ vlapic_init_ipi(struct vlapic *vlapic) } static int -vlapic_op_reset(void* dev) +vlapic_reset(struct vlapic *vlapic) { - struct vlapic *vlapic = (struct vlapic*)dev; struct LAPIC *lapic = &vlapic->apic; memset(lapic, 0, sizeof(*lapic)); @@ -214,36 +211,33 @@ vlapic_op_reset(void* dev) } -static int -vlapic_op_init(void* dev) -{ - struct vlapic *vlapic = (struct vlapic*)dev; - vdev_register_region(vlapic->ops, vlapic, vlapic->mmio); - return vlapic_op_reset(dev); -} - -static int -vlapic_op_halt(void* dev) -{ - struct vlapic *vlapic = (struct vlapic*)dev; - vdev_unregister_region(vlapic, vlapic->mmio); - return 0; - -} - void -vlapic_set_intr_ready(struct vlapic *vlapic, int vector) +vlapic_set_intr_ready(struct vlapic *vlapic, int vector, bool level) { struct LAPIC *lapic = &vlapic->apic; - uint32_t *irrptr; + uint32_t *irrptr, *tmrptr, mask; int idx; if (vector < 0 || vector >= 256) panic("vlapic_set_intr_ready: invalid vector %d\n", vector); idx = (vector / 32) * 4; + mask = 1 << (vector % 32); + irrptr = &lapic->irr0; - atomic_set_int(&irrptr[idx], 1 << (vector % 32)); + atomic_set_int(&irrptr[idx], mask); + + /* + * Upon acceptance of an interrupt into the IRR the corresponding + * TMR bit is cleared for edge-triggered interrupts and set for + * level-triggered interrupts. + */ + tmrptr = &lapic->tmr0; + if (level) + atomic_set_int(&tmrptr[idx], mask); + else + atomic_clear_int(&tmrptr[idx], mask); + VLAPIC_CTR_IRR(vlapic, "vlapic_set_intr_ready"); } @@ -371,10 +365,11 @@ static void vlapic_process_eoi(struct vlapic *vlapic) { struct LAPIC *lapic = &vlapic->apic; - uint32_t *isrptr; - int i, idx, bitpos; + uint32_t *isrptr, *tmrptr; + int i, idx, bitpos, vector; isrptr = &lapic->isr0; + tmrptr = &lapic->tmr0; /* * The x86 architecture reserves the the first 32 vectors for use @@ -383,15 +378,20 @@ vlapic_process_eoi(struct vlapic *vlapic for (i = 7; i > 0; i--) { idx = i * 4; bitpos = fls(isrptr[idx]); - if (bitpos != 0) { + if (bitpos-- != 0) { if (vlapic->isrvec_stk_top <= 0) { panic("invalid vlapic isrvec_stk_top %d", vlapic->isrvec_stk_top); } - isrptr[idx] &= ~(1 << (bitpos - 1)); + isrptr[idx] &= ~(1 << bitpos); VLAPIC_CTR_ISR(vlapic, "vlapic_process_eoi"); vlapic->isrvec_stk_top--; vlapic_update_ppr(vlapic); + if ((tmrptr[idx] & (1 << bitpos)) != 0) { + vector = i * 32 + bitpos; + vioapic_process_eoi(vlapic->vm, vlapic->vcpuid, + vector); + } return; } } @@ -426,7 +426,7 @@ vlapic_fire_timer(struct vlapic *vlapic) if (!vlapic_get_lvt_field(lvt, APIC_LVTT_M)) { vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_INTR_TIMER, 1); vector = vlapic_get_lvt_field(lvt,APIC_LVTT_VECTOR); - vlapic_set_intr_ready(vlapic, vector); + vlapic_set_intr_ready(vlapic, vector, false); } } @@ -472,7 +472,7 @@ lapic_process_icr(struct vlapic *vlapic, i--; CPU_CLR(i, &dmask); if (mode == APIC_DELMODE_FIXED) { - lapic_set_intr(vlapic->vm, i, vec); + lapic_intr_edge(vlapic->vm, i, vec); vmm_stat_array_incr(vlapic->vm, vlapic->vcpuid, IPIS_SENT, i, 1); } else @@ -594,11 +594,9 @@ vlapic_intr_accepted(struct vlapic *vlap } int -vlapic_op_mem_read(void* dev, uint64_t gpa, opsize_t size, uint64_t *data) +vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data) { - struct vlapic *vlapic = (struct vlapic*)dev; struct LAPIC *lapic = &vlapic->apic; - uint64_t offset = gpa & ~(PAGE_SIZE); uint32_t *reg; int i; @@ -686,11 +684,9 @@ vlapic_op_mem_read(void* dev, uint64_t g } int -vlapic_op_mem_write(void* dev, uint64_t gpa, opsize_t size, uint64_t data) +vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data) { - struct vlapic *vlapic = (struct vlapic*)dev; struct LAPIC *lapic = &vlapic->apic; - uint64_t offset = gpa & ~(PAGE_SIZE); uint32_t *reg; int retval; @@ -832,16 +828,6 @@ restart: return (0); } -struct vdev_ops vlapic_dev_ops = { - .name = "vlapic", - .init = vlapic_op_init, - .reset = vlapic_op_reset, - .halt = vlapic_op_halt, - .memread = vlapic_op_mem_read, - .memwrite = vlapic_op_mem_write, -}; -static struct io_region vlapic_mmio[VM_MAXCPU]; - struct vlapic * vlapic_init(struct vm *vm, int vcpuid) { @@ -856,17 +842,7 @@ vlapic_init(struct vm *vm, int vcpuid) if (vcpuid == 0) vlapic->msr_apicbase |= APICBASE_BSP; - vlapic->ops = &vlapic_dev_ops; - - vlapic->mmio = vlapic_mmio + vcpuid; - vlapic->mmio->base = DEFAULT_APIC_BASE; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 20:25:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 389BDE0A; Thu, 23 Jan 2014 20:25:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0B68C1710; Thu, 23 Jan 2014 20:25:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NKPcWY013299; Thu, 23 Jan 2014 20:25:38 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NKPcUl013298; Thu, 23 Jan 2014 20:25:38 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201401232025.s0NKPcUl013298@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 23 Jan 2014 20:25:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261089 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:25:39 -0000 Author: ae Date: Thu Jan 23 20:25:38 2014 New Revision: 261089 URL: http://svnweb.freebsd.org/changeset/base/261089 Log: Remove another unneeded NULL check from geom_alloc_copyin(). Do copyout in case of gctl version mismatch and fix sbuf leak in g_ctl_ioctl_ctl(). MFC after: 1 week Modified: head/sys/geom/geom_ctl.c Modified: head/sys/geom/geom_ctl.c ============================================================================== --- head/sys/geom/geom_ctl.c Thu Jan 23 20:21:39 2014 (r261088) +++ head/sys/geom/geom_ctl.c Thu Jan 23 20:25:38 2014 (r261089) @@ -126,8 +126,7 @@ geom_alloc_copyin(struct gctl_req *req, req->nerror = copyin(uaddr, ptr, len); if (!req->nerror) return (ptr); - if (ptr != NULL) - g_free(ptr); + g_free(ptr); return (NULL); } @@ -463,30 +462,31 @@ g_ctl_ioctl_ctl(struct cdev *dev, u_long req = (void *)data; req->nerror = 0; - req->serror = sbuf_new_auto(); /* It is an error if we cannot return an error text */ if (req->lerror < 2) return (EINVAL); if (!useracc(req->error, req->lerror, VM_PROT_WRITE)) return (EINVAL); + req->serror = sbuf_new_auto(); /* Check the version */ - if (req->version != GCTL_VERSION) - return (gctl_error(req, - "kernel and libgeom version mismatch.")); - - /* Get things on board */ - gctl_copyin(req); - - if (g_debugflags & G_F_CTLDUMP) - gctl_dump(req); - - if (!req->nerror) { - g_waitfor_event(g_ctl_req, req, M_WAITOK, NULL); - gctl_copyout(req); + if (req->version != GCTL_VERSION) { + gctl_error(req, "kernel and libgeom version mismatch."); + req->arg = NULL; + } else { + /* Get things on board */ + gctl_copyin(req); + + if (g_debugflags & G_F_CTLDUMP) + gctl_dump(req); + + if (!req->nerror) { + g_waitfor_event(g_ctl_req, req, M_WAITOK, NULL); + gctl_copyout(req); + } } if (sbuf_done(req->serror)) { - req->nerror = copyout(sbuf_data(req->serror), req->error, + copyout(sbuf_data(req->serror), req->error, imin(req->lerror, sbuf_len(req->serror) + 1)); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 20:34:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC9873D0; Thu, 23 Jan 2014 20:34:45 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A268017FC; Thu, 23 Jan 2014 20:34:45 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8E134B964; Thu, 23 Jan 2014 15:34:44 -0500 (EST) From: John Baldwin To: Bryan Drewery Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Date: Thu, 23 Jan 2014 15:03:42 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <201401231439.14819.jhb@freebsd.org> <20140123194841.GA39296@admin.xzibition.com> In-Reply-To: <20140123194841.GA39296@admin.xzibition.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201401231503.42671.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 23 Jan 2014 15:34:44 -0500 (EST) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:34:45 -0000 On Thursday, January 23, 2014 2:48:41 pm Bryan Drewery wrote: > On Thu, Jan 23, 2014 at 02:39:14PM -0500, John Baldwin wrote: > > On Thursday, January 23, 2014 10:42:36 am David Chisnall wrote: > > > On 22 Jan 2014, at 22:36, Glen Barber wrote: > > > > > > > It needs to use the build host version, because using (for example) > > > > powerpc resulting binary won't work on and amd64 system. > > > > > > If it's used as part of the build, then it should be part of the toolchain > > target and we should be using the version built there. > > > > 'make distribute' is not a normal part of the build (it's not part of > > buildworld or installworld). Both mergemaster and etcupdate only run it > > after an installworld has been performed, in which case an up-to-date > > services_mkdb should already be installed. > > > > Bryan, what are you running 'make distribute' for? Is this to populate > > a new jail from a world build? > > Yes, poudriere uses this to create jails. It runs: > > export TARGET_ARCH=... > make buildworld > make installworld DESTDIR=... > make distrib-dirs DESTDIR=... DB_FROM_SRC=1 > make distribution DESTDIR=... > > > No mergemaster or etc-update is ran, we just install all of the > defaults. Yes, but you are attemping to install a newer jail than the host, and strictly speaking that isn't supported. (Rather, we only guarantee that a jail will work so long as its world is older or equal in age to the host.) All that said, for stable branches I intend to MFC the new flags to services_mkdb long before possibly merging the change to turn it on in 'make distribution' -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 20:35:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28F42762; Thu, 23 Jan 2014 20:35:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 092F4182B; Thu, 23 Jan 2014 20:35:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NKZYbJ017124; Thu, 23 Jan 2014 20:35:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NKZXG7017114; Thu, 23 Jan 2014 20:35:33 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201401232035.s0NKZXG7017114@svn.freebsd.org> From: John Baldwin Date: Thu, 23 Jan 2014 20:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261090 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:35:35 -0000 Author: jhb Date: Thu Jan 23 20:35:32 2014 New Revision: 261090 URL: http://svnweb.freebsd.org/changeset/base/261090 Log: MFC 259826,259997,259998: Support soft power-off via the ACPI S5 state for bhyve guests and wire up a virtual power button to SIGTERM: - Implement the PM1_EVT and PM1_CTL registers required by ACPI. - Emulate the Reset Control register at I/O port 0xcf9. - Advertise an _S5 package. - Implement an SMI_CMD register with commands to enable and disable ACPI. Currently the only change when ACPI is enabled is to enable the virtual power button via SIGTERM. - Implement a fixed-feature power button when ACPI is enabled by asserting PWRBTN_STS in PM1_EVT when SIGTERM is received. - Add support for EVFILT_SIGNAL events to mevent. - Implement support for the ACPI system command interrupt (SCI) and assert it when needed based on the values in PM1_EVT. Mark the SCI as active-low and level triggered in the MADT and MP Table. Added: stable/10/usr.sbin/bhyve/pm.c - copied, changed from r259826, head/usr.sbin/bhyve/pm.c Modified: stable/10/usr.sbin/bhyve/Makefile stable/10/usr.sbin/bhyve/acpi.c stable/10/usr.sbin/bhyve/acpi.h stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/inout.h stable/10/usr.sbin/bhyve/mevent.c stable/10/usr.sbin/bhyve/mevent.h stable/10/usr.sbin/bhyve/mptbl.c stable/10/usr.sbin/bhyve/pmtmr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/Makefile ============================================================================== --- stable/10/usr.sbin/bhyve/Makefile Thu Jan 23 20:25:38 2014 (r261089) +++ stable/10/usr.sbin/bhyve/Makefile Thu Jan 23 20:35:32 2014 (r261090) @@ -10,7 +10,7 @@ MAN= bhyve.8 SRCS= acpi.c atpic.c bhyverun.c block_if.c consport.c dbgport.c elcr.c SRCS+= inout.c legacy_irq.c mem.c mevent.c mptbl.c pci_ahci.c SRCS+= pci_emul.c pci_hostbridge.c pci_lpc.c pci_passthru.c pci_virtio_block.c -SRCS+= pci_virtio_net.c pci_uart.c pit_8254.c pmtmr.c post.c rtc.c +SRCS+= pci_virtio_net.c pci_uart.c pit_8254.c pm.c pmtmr.c post.c rtc.c SRCS+= uart_emul.c virtio.c xmsr.c spinup_ap.c .PATH: ${.CURDIR}/../../sys/amd64/vmm Modified: stable/10/usr.sbin/bhyve/acpi.c ============================================================================== --- stable/10/usr.sbin/bhyve/acpi.c Thu Jan 23 20:25:38 2014 (r261089) +++ stable/10/usr.sbin/bhyve/acpi.c Thu Jan 23 20:35:32 2014 (r261090) @@ -85,8 +85,6 @@ __FBSDID("$FreeBSD$"); #define BHYVE_ASL_SUFFIX ".aml" #define BHYVE_ASL_COMPILER "/usr/sbin/iasl" -#define BHYVE_PM_TIMER_ADDR 0x408 - static int basl_keep_temps; static int basl_verbose_iasl; static int basl_ncpu; @@ -283,11 +281,11 @@ basl_fwrite_madt(FILE *fp) EFPRINTF(fp, "[0001]\t\tSubtable Type : 02\n"); EFPRINTF(fp, "[0001]\t\tLength : 0A\n"); EFPRINTF(fp, "[0001]\t\tBus : 00\n"); - EFPRINTF(fp, "[0001]\t\tSource : 09\n"); - EFPRINTF(fp, "[0004]\t\tInterrupt : 00000009\n"); + EFPRINTF(fp, "[0001]\t\tSource : %02X\n", SCI_INT); + EFPRINTF(fp, "[0004]\t\tInterrupt : %08X\n", SCI_INT); EFPRINTF(fp, "[0002]\t\tFlags (decoded below) : 0000\n"); - EFPRINTF(fp, "\t\t\tPolarity : 0\n"); - EFPRINTF(fp, "\t\t\tTrigger Mode : 0\n"); + EFPRINTF(fp, "\t\t\tPolarity : 3\n"); + EFPRINTF(fp, "\t\t\tTrigger Mode : 3\n"); EFPRINTF(fp, "\n"); EFFLUSH(fp); @@ -324,21 +322,27 @@ basl_fwrite_fadt(FILE *fp) basl_acpi_base + FACS_OFFSET); EFPRINTF(fp, "[0004]\t\tDSDT Address : %08X\n", basl_acpi_base + DSDT_OFFSET); - EFPRINTF(fp, "[0001]\t\tModel : 00\n"); + EFPRINTF(fp, "[0001]\t\tModel : 01\n"); EFPRINTF(fp, "[0001]\t\tPM Profile : 00 [Unspecified]\n"); - EFPRINTF(fp, "[0002]\t\tSCI Interrupt : 0009\n"); - EFPRINTF(fp, "[0004]\t\tSMI Command Port : 00000000\n"); - EFPRINTF(fp, "[0001]\t\tACPI Enable Value : 00\n"); - EFPRINTF(fp, "[0001]\t\tACPI Disable Value : 00\n"); + EFPRINTF(fp, "[0002]\t\tSCI Interrupt : %04X\n", + SCI_INT); + EFPRINTF(fp, "[0004]\t\tSMI Command Port : %08X\n", + SMI_CMD); + EFPRINTF(fp, "[0001]\t\tACPI Enable Value : %02X\n", + BHYVE_ACPI_ENABLE); + EFPRINTF(fp, "[0001]\t\tACPI Disable Value : %02X\n", + BHYVE_ACPI_DISABLE); EFPRINTF(fp, "[0001]\t\tS4BIOS Command : 00\n"); EFPRINTF(fp, "[0001]\t\tP-State Control : 00\n"); - EFPRINTF(fp, "[0004]\t\tPM1A Event Block Address : 00000000\n"); + EFPRINTF(fp, "[0004]\t\tPM1A Event Block Address : %08X\n", + PM1A_EVT_ADDR); EFPRINTF(fp, "[0004]\t\tPM1B Event Block Address : 00000000\n"); - EFPRINTF(fp, "[0004]\t\tPM1A Control Block Address : 00000000\n"); + EFPRINTF(fp, "[0004]\t\tPM1A Control Block Address : %08X\n", + PM1A_CNT_ADDR); EFPRINTF(fp, "[0004]\t\tPM1B Control Block Address : 00000000\n"); EFPRINTF(fp, "[0004]\t\tPM2 Control Block Address : 00000000\n"); EFPRINTF(fp, "[0004]\t\tPM Timer Block Address : %08X\n", - BHYVE_PM_TIMER_ADDR); + IO_PMTMR); EFPRINTF(fp, "[0004]\t\tGPE0 Block Address : 00000000\n"); EFPRINTF(fp, "[0004]\t\tGPE1 Block Address : 00000000\n"); EFPRINTF(fp, "[0001]\t\tPM1 Event Block Length : 04\n"); @@ -369,15 +373,15 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, "[0004]\t\tFlags (decoded below) : 00000000\n"); EFPRINTF(fp, "\t\t\tWBINVD instruction is operational (V1) : 1\n"); EFPRINTF(fp, "\t\t\tWBINVD flushes all caches (V1) : 0\n"); - EFPRINTF(fp, "\t\t\tAll CPUs support C1 (V1) : 0\n"); + EFPRINTF(fp, "\t\t\tAll CPUs support C1 (V1) : 1\n"); EFPRINTF(fp, "\t\t\tC2 works on MP system (V1) : 0\n"); - EFPRINTF(fp, "\t\t\tControl Method Power Button (V1) : 1\n"); + EFPRINTF(fp, "\t\t\tControl Method Power Button (V1) : 0\n"); EFPRINTF(fp, "\t\t\tControl Method Sleep Button (V1) : 1\n"); EFPRINTF(fp, "\t\t\tRTC wake not in fixed reg space (V1) : 0\n"); EFPRINTF(fp, "\t\t\tRTC can wake system from S4 (V1) : 0\n"); EFPRINTF(fp, "\t\t\t32-bit PM Timer (V1) : 1\n"); EFPRINTF(fp, "\t\t\tDocking Supported (V1) : 0\n"); - EFPRINTF(fp, "\t\t\tReset Register Supported (V2) : 0\n"); + EFPRINTF(fp, "\t\t\tReset Register Supported (V2) : 1\n"); EFPRINTF(fp, "\t\t\tSealed Case (V3) : 0\n"); EFPRINTF(fp, "\t\t\tHeadless - No Video (V3) : 1\n"); EFPRINTF(fp, "\t\t\tUse native instr after SLP_TYPx (V3) : 0\n"); @@ -397,10 +401,10 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, "[0001]\t\tBit Width : 08\n"); EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n"); EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 01 [Byte Access:8]\n"); - EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000001\n"); + EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000CF9\n"); EFPRINTF(fp, "\n"); - EFPRINTF(fp, "[0001]\t\tValue to cause reset : 00\n"); + EFPRINTF(fp, "[0001]\t\tValue to cause reset : 06\n"); EFPRINTF(fp, "[0003]\t\tReserved : 000000\n"); EFPRINTF(fp, "[0008]\t\tFACS Address : 00000000%08X\n", basl_acpi_base + FACS_OFFSET); @@ -412,7 +416,8 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, "[0001]\t\tBit Width : 20\n"); EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n"); EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 02 [Word Access:16]\n"); - EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000001\n"); + EFPRINTF(fp, "[0008]\t\tAddress : 00000000%08X\n", + PM1A_EVT_ADDR); EFPRINTF(fp, "\n"); EFPRINTF(fp, @@ -431,7 +436,8 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, "[0001]\t\tBit Width : 10\n"); EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n"); EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 02 [Word Access:16]\n"); - EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000001\n"); + EFPRINTF(fp, "[0008]\t\tAddress : 00000000%08X\n", + PM1A_CNT_ADDR); EFPRINTF(fp, "\n"); EFPRINTF(fp, @@ -463,7 +469,7 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 03 [DWord Access:32]\n"); EFPRINTF(fp, "[0008]\t\tAddress : 00000000%08X\n", - BHYVE_PM_TIMER_ADDR); + IO_PMTMR); EFPRINTF(fp, "\n"); EFPRINTF(fp, "[0012]\t\tGPE0 Block : [Generic Address Structure]\n"); @@ -603,6 +609,11 @@ basl_fwrite_dsdt(FILE *fp) EFPRINTF(fp, "DefinitionBlock (\"bhyve_dsdt.aml\", \"DSDT\", 2," "\"BHYVE \", \"BVDSDT \", 0x00000001)\n"); EFPRINTF(fp, "{\n"); + EFPRINTF(fp, " Name (_S5, Package (0x02)\n"); + EFPRINTF(fp, " {\n"); + EFPRINTF(fp, " 0x05,\n"); + EFPRINTF(fp, " Zero,\n"); + EFPRINTF(fp, " })\n"); EFPRINTF(fp, " Scope (_SB)\n"); EFPRINTF(fp, " {\n"); EFPRINTF(fp, " Device (PCI0)\n"); Modified: stable/10/usr.sbin/bhyve/acpi.h ============================================================================== --- stable/10/usr.sbin/bhyve/acpi.h Thu Jan 23 20:25:38 2014 (r261089) +++ stable/10/usr.sbin/bhyve/acpi.h Thu Jan 23 20:35:32 2014 (r261090) @@ -29,6 +29,19 @@ #ifndef _ACPI_H_ #define _ACPI_H_ +#define SCI_INT 9 + +#define SMI_CMD 0xb2 +#define BHYVE_ACPI_ENABLE 0xa0 +#define BHYVE_ACPI_DISABLE 0xa1 + +#define PM1A_EVT_ADDR 0x400 +#define PM1A_CNT_ADDR 0x404 + +#define IO_PMTMR 0x408 /* 4-byte i/o port for the timer */ + +struct vmctx; + int acpi_build(struct vmctx *ctx, int ncpu); #endif /* _ACPI_H_ */ Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Thu Jan 23 20:25:38 2014 (r261089) +++ stable/10/usr.sbin/bhyve/bhyverun.c Thu Jan 23 20:35:32 2014 (r261090) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #define VMEXIT_RESTART 2 /* restart current instruction */ #define VMEXIT_ABORT 3 /* abort the vm run loop */ #define VMEXIT_RESET 4 /* guest machine has reset */ +#define VMEXIT_POWEROFF 5 /* guest machine has powered off */ #define MB (1024UL * 1024) #define GB (1024UL * MB) @@ -282,12 +283,17 @@ vmexit_inout(struct vmctx *ctx, struct v return (vmexit_handle_notify(ctx, vme, pvcpu, eax)); error = emulate_inout(ctx, vcpu, in, port, bytes, &eax, strictio); - if (error == 0 && in) + if (error == INOUT_OK && in) error = vm_set_register(ctx, vcpu, VM_REG_GUEST_RAX, eax); - if (error == 0) + switch (error) { + case INOUT_OK: return (VMEXIT_CONTINUE); - else { + case INOUT_RESET: + return (VMEXIT_RESET); + case INOUT_POWEROFF: + return (VMEXIT_POWEROFF); + default: fprintf(stderr, "Unhandled %s%c 0x%04x\n", in ? "in" : "out", bytes == 1 ? 'b' : (bytes == 2 ? 'w' : 'l'), port); Modified: stable/10/usr.sbin/bhyve/inout.h ============================================================================== --- stable/10/usr.sbin/bhyve/inout.h Thu Jan 23 20:25:38 2014 (r261089) +++ stable/10/usr.sbin/bhyve/inout.h Thu Jan 23 20:35:32 2014 (r261090) @@ -33,6 +33,12 @@ struct vmctx; +/* Handler return values. */ +#define INOUT_ERROR -1 +#define INOUT_OK 0 +#define INOUT_RESET 1 +#define INOUT_POWEROFF 2 + typedef int (*inout_func_t)(struct vmctx *ctx, int vcpu, int in, int port, int bytes, uint32_t *eax, void *arg); Modified: stable/10/usr.sbin/bhyve/mevent.c ============================================================================== --- stable/10/usr.sbin/bhyve/mevent.c Thu Jan 23 20:25:38 2014 (r261089) +++ stable/10/usr.sbin/bhyve/mevent.c Thu Jan 23 20:35:32 2014 (r261090) @@ -135,6 +135,9 @@ mevent_kq_filter(struct mevent *mevp) if (mevp->me_type == EVF_TIMER) retval = EVFILT_TIMER; + if (mevp->me_type == EVF_SIGNAL) + retval = EVFILT_SIGNAL; + return (retval); } @@ -437,7 +440,7 @@ mevent_dispatch(void) * Block awaiting events */ ret = kevent(mfd, NULL, 0, eventlist, MEVENT_MAX, NULL); - if (ret == -1) { + if (ret == -1 && errno != EINTR) { perror("Error return from kevent monitor"); } Modified: stable/10/usr.sbin/bhyve/mevent.h ============================================================================== --- stable/10/usr.sbin/bhyve/mevent.h Thu Jan 23 20:25:38 2014 (r261089) +++ stable/10/usr.sbin/bhyve/mevent.h Thu Jan 23 20:35:32 2014 (r261090) @@ -32,7 +32,8 @@ enum ev_type { EVF_READ, EVF_WRITE, - EVF_TIMER + EVF_TIMER, + EVF_SIGNAL }; struct mevent; Modified: stable/10/usr.sbin/bhyve/mptbl.c ============================================================================== --- stable/10/usr.sbin/bhyve/mptbl.c Thu Jan 23 20:25:38 2014 (r261089) +++ stable/10/usr.sbin/bhyve/mptbl.c Thu Jan 23 20:35:32 2014 (r261090) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "acpi.h" #include "bhyverun.h" #include "mptbl.h" @@ -200,13 +201,21 @@ mpt_build_ioint_entries(int_entry_ptr mp mpie->int_type = INTENTRY_TYPE_INT; mpie->src_bus_irq = 0; break; + case SCI_INT: + /* ACPI SCI is level triggered and active-lo. */ + mpie->int_flags = INTENTRY_FLAGS_POLARITY_ACTIVELO | + INTENTRY_FLAGS_TRIGGER_LEVEL; + mpie->int_type = INTENTRY_TYPE_INT; + mpie->src_bus_irq = SCI_INT; + break; case 5: case 10: case 11: /* - * PCI Irqs set to level triggered. + * PCI Irqs set to level triggered and active-lo. */ - mpie->int_flags = INTENTRY_FLAGS_TRIGGER_LEVEL; + mpie->int_flags = INTENTRY_FLAGS_POLARITY_ACTIVELO | + INTENTRY_FLAGS_TRIGGER_LEVEL; mpie->src_bus_id = 0; /* fall through.. */ default: Copied and modified: stable/10/usr.sbin/bhyve/pm.c (from r259826, head/usr.sbin/bhyve/pm.c) ============================================================================== --- head/usr.sbin/bhyve/pm.c Tue Dec 24 16:14:19 2013 (r259826, copy source) +++ stable/10/usr.sbin/bhyve/pm.c Thu Jan 23 20:35:32 2014 (r261090) @@ -29,11 +29,20 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include +#include +#include + +#include "acpi.h" #include "inout.h" +#include "mevent.h" -#define PM1A_EVT_ADDR 0x400 -#define PM1A_CNT_ADDR 0x404 +static pthread_mutex_t pm_lock = PTHREAD_MUTEX_INITIALIZER; +static struct mevent *power_button; +static sig_t old_power_handler; /* * Reset Control register at I/O port 0xcf9. Bit 2 forces a system @@ -63,12 +72,75 @@ reset_handler(struct vmctx *ctx, int vcp INOUT_PORT(reset_reg, 0xCF9, IOPORT_F_INOUT, reset_handler); /* + * ACPI's SCI is a level-triggered interrupt. + */ +static int sci_active; + +static void +sci_assert(struct vmctx *ctx) +{ + + if (sci_active) + return; + vm_ioapic_assert_irq(ctx, SCI_INT); + sci_active = 1; +} + +static void +sci_deassert(struct vmctx *ctx) +{ + + if (!sci_active) + return; + vm_ioapic_deassert_irq(ctx, SCI_INT); + sci_active = 0; +} + +/* * Power Management 1 Event Registers * - * bhyve doesn't support any power management events currently, so the - * status register always returns zero. The enable register preserves - * its value but has no effect. + * The only power management event supported is a power button upon + * receiving SIGTERM. */ +static uint16_t pm1_enable, pm1_status; + +#define PM1_TMR_STS 0x0001 +#define PM1_BM_STS 0x0010 +#define PM1_GBL_STS 0x0020 +#define PM1_PWRBTN_STS 0x0100 +#define PM1_SLPBTN_STS 0x0200 +#define PM1_RTC_STS 0x0400 +#define PM1_WAK_STS 0x8000 + +#define PM1_TMR_EN 0x0001 +#define PM1_GBL_EN 0x0020 +#define PM1_PWRBTN_EN 0x0100 +#define PM1_SLPBTN_EN 0x0200 +#define PM1_RTC_EN 0x0400 + +static void +sci_update(struct vmctx *ctx) +{ + int need_sci; + + /* See if the SCI should be active or not. */ + need_sci = 0; + if ((pm1_enable & PM1_TMR_EN) && (pm1_status & PM1_TMR_STS)) + need_sci = 1; + if ((pm1_enable & PM1_GBL_EN) && (pm1_status & PM1_GBL_STS)) + need_sci = 1; + if ((pm1_enable & PM1_PWRBTN_EN) && (pm1_status & PM1_PWRBTN_STS)) + need_sci = 1; + if ((pm1_enable & PM1_SLPBTN_EN) && (pm1_status & PM1_SLPBTN_STS)) + need_sci = 1; + if ((pm1_enable & PM1_RTC_EN) && (pm1_status & PM1_RTC_STS)) + need_sci = 1; + if (need_sci) + sci_assert(ctx); + else + sci_deassert(ctx); +} + static int pm1_status_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, uint32_t *eax, void *arg) @@ -76,8 +148,20 @@ pm1_status_handler(struct vmctx *ctx, in if (bytes != 2) return (-1); + + pthread_mutex_lock(&pm_lock); if (in) - *eax = 0; + *eax = pm1_status; + else { + /* + * Writes are only permitted to clear certain bits by + * writing 1 to those flags. + */ + pm1_status &= ~(*eax & (PM1_WAK_STS | PM1_RTC_STS | + PM1_SLPBTN_STS | PM1_PWRBTN_STS | PM1_BM_STS)); + sci_update(ctx); + } + pthread_mutex_unlock(&pm_lock); return (0); } @@ -85,25 +169,51 @@ static int pm1_enable_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, uint32_t *eax, void *arg) { - static uint16_t pm1_enable; if (bytes != 2) return (-1); + + pthread_mutex_lock(&pm_lock); if (in) *eax = pm1_enable; - else - pm1_enable = *eax; + else { + /* + * Only permit certain bits to be set. We never use + * the global lock, but ACPI-CA whines profusely if it + * can't set GBL_EN. + */ + pm1_enable = *eax & (PM1_PWRBTN_EN | PM1_GBL_EN); + sci_update(ctx); + } + pthread_mutex_unlock(&pm_lock); return (0); } INOUT_PORT(pm1_status, PM1A_EVT_ADDR, IOPORT_F_INOUT, pm1_status_handler); INOUT_PORT(pm1_enable, PM1A_EVT_ADDR + 2, IOPORT_F_INOUT, pm1_enable_handler); +static void +power_button_handler(int signal, enum ev_type type, void *arg) +{ + struct vmctx *ctx; + + ctx = arg; + pthread_mutex_lock(&pm_lock); + if (!(pm1_status & PM1_PWRBTN_STS)) { + pm1_status |= PM1_PWRBTN_STS; + sci_update(ctx); + } + pthread_mutex_unlock(&pm_lock); +} + /* * Power Management 1 Control Register * * This is mostly unimplemented except that we wish to handle writes that * set SPL_EN to handle S5 (soft power off). */ +static uint16_t pm1_control; + +#define PM1_SCI_EN 0x0001 #define PM1_SLP_TYP 0x1c00 #define PM1_SLP_EN 0x2000 #define PM1_ALWAYS_ZERO 0xc003 @@ -112,7 +222,6 @@ static int pm1_control_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, uint32_t *eax, void *arg) { - static uint16_t pm1_control; if (bytes != 2) return (-1); @@ -121,9 +230,11 @@ pm1_control_handler(struct vmctx *ctx, i else { /* * Various bits are write-only or reserved, so force them - * to zero in pm1_control. + * to zero in pm1_control. Always preserve SCI_EN as OSPM + * can never change it. */ - pm1_control = *eax & ~(PM1_SLP_EN | PM1_ALWAYS_ZERO); + pm1_control = (pm1_control & PM1_SCI_EN) | + (*eax & ~(PM1_SLP_EN | PM1_ALWAYS_ZERO)); /* * If SLP_EN is set, check for S5. Bhyve's _S5_ method @@ -137,3 +248,41 @@ pm1_control_handler(struct vmctx *ctx, i return (0); } INOUT_PORT(pm1_control, PM1A_CNT_ADDR, IOPORT_F_INOUT, pm1_control_handler); + +/* + * ACPI SMI Command Register + * + * This write-only register is used to enable and disable ACPI. + */ +static int +smi_cmd_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, + uint32_t *eax, void *arg) +{ + + assert(!in); + if (bytes != 1) + return (-1); + + pthread_mutex_lock(&pm_lock); + switch (*eax) { + case BHYVE_ACPI_ENABLE: + pm1_control |= PM1_SCI_EN; + if (power_button == NULL) { + power_button = mevent_add(SIGTERM, EVF_SIGNAL, + power_button_handler, ctx); + old_power_handler = signal(SIGTERM, SIG_IGN); + } + break; + case BHYVE_ACPI_DISABLE: + pm1_control &= ~PM1_SCI_EN; + if (power_button != NULL) { + mevent_delete(power_button); + power_button = NULL; + signal(SIGTERM, old_power_handler); + } + break; + } + pthread_mutex_unlock(&pm_lock); + return (0); +} +INOUT_PORT(smi_cmd, SMI_CMD, IOPORT_F_OUT, smi_cmd_handler); Modified: stable/10/usr.sbin/bhyve/pmtmr.c ============================================================================== --- stable/10/usr.sbin/bhyve/pmtmr.c Thu Jan 23 20:25:38 2014 (r261089) +++ stable/10/usr.sbin/bhyve/pmtmr.c Thu Jan 23 20:35:32 2014 (r261090) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "acpi.h" #include "inout.h" /* @@ -49,11 +50,10 @@ __FBSDID("$FreeBSD$"); * This implementation will be 32-bits */ -#define IO_PMTMR 0x408 /* 4-byte i/o port for the timer */ - #define PMTMR_FREQ 3579545 /* 3.579545MHz */ static pthread_mutex_t pmtmr_mtx; +static pthread_once_t pmtmr_once = PTHREAD_ONCE_INIT; static uint64_t pmtmr_old; @@ -123,6 +123,7 @@ pmtmr_init(void) pmtmr_uptime_old = tsnew; pmtmr_old = timespec_to_pmtmr(&tsnew, &tsold); } + pthread_mutex_init(&pmtmr_mtx, NULL); } static uint32_t @@ -133,13 +134,7 @@ pmtmr_val(void) uint64_t pmtmr_new; int error; - static int inited = 0; - - if (!inited) { - pthread_mutex_init(&pmtmr_mtx, NULL); - pmtmr_init(); - inited = 1; - } + pthread_once(&pmtmr_once, pmtmr_init); pthread_mutex_lock(&pmtmr_mtx); From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 21:23:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CA9EB43 for ; Thu, 23 Jan 2014 21:23:03 +0000 (UTC) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 364FA1D5D for ; Thu, 23 Jan 2014 21:23:02 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=date:from:to :cc:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=sweb; b=x/n5nZs8R9j6jl56JoRFLd8x2mBVXMwL/ cvsPyNsMR2VgsDrCQzRXfl+2JmdSpqAuqcItvtgbmZAD9ArwFjewE5e0dT0dWE/D 9reuL9vNcoQcrIYmSNiWsV+BnI/UoSDFXMm4DPwqL1A3hOd+g8uRu15XTIDTwlYX L3ePIpseHw= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=date:from :to:cc:subject:message-id:references:mime-version:content-type :in-reply-to; s=sweb; bh=IZ4RDFHkGCYLL/+xml2cAd7zptd3QyxPjq7C9V3 AA/k=; b=I9vdBzUSE5Q4ao5bOucKo7Uj2ZUXL07bTwKF3a13V00JRRDRwFcFBRl XjtV6BrxdqBn35UYPPh7m5SzYkX5kR6dIlM6SXmiPXTZc8YsXIi/5mwNyLCtP89W FHe3M+C5GxgwFXPfSVP/V7xr8sYbhy+SZQcLao2H1Xnol3mv5yc4= Received: (qmail 53689 invoked from network); 23 Jan 2014 15:22:59 -0600 Received: from unknown (HELO admin.xzibition.com) (bryan@shatow.net@173.160.118.90) by sweb.xzibition.com with ESMTPA; 23 Jan 2014 15:22:59 -0600 Date: Thu, 23 Jan 2014 15:22:56 -0600 From: Bryan Drewery To: John Baldwin Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Message-ID: <20140123212256.GA37334@admin.xzibition.com> References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <201401231439.14819.jhb@freebsd.org> <20140123194841.GA39296@admin.xzibition.com> <201401231503.42671.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <201401231503.42671.jhb@freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:23:03 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 23, 2014 at 03:03:42PM -0500, John Baldwin wrote: > On Thursday, January 23, 2014 2:48:41 pm Bryan Drewery wrote: > > On Thu, Jan 23, 2014 at 02:39:14PM -0500, John Baldwin wrote: > > > On Thursday, January 23, 2014 10:42:36 am David Chisnall wrote: > > > > On 22 Jan 2014, at 22:36, Glen Barber wrote: > > > >=20 > > > > > It needs to use the build host version, because using (for exampl= e) > > > > > powerpc resulting binary won't work on and amd64 system. > > > >=20 > > > > If it's used as part of the build, then it should be part of the to= olchain=20 > > > target and we should be using the version built there. > > >=20 > > > 'make distribute' is not a normal part of the build (it's not part of > > > buildworld or installworld). Both mergemaster and etcupdate only run= it > > > after an installworld has been performed, in which case an up-to-date > > > services_mkdb should already be installed. > > >=20 > > > Bryan, what are you running 'make distribute' for? Is this to popula= te > > > a new jail from a world build? > >=20 > > Yes, poudriere uses this to create jails. It runs: > >=20 > > export TARGET_ARCH=3D... > > make buildworld > > make installworld DESTDIR=3D... > > make distrib-dirs DESTDIR=3D... DB_FROM_SRC=3D1 > > make distribution DESTDIR=3D... > >=20 > >=20 > > No mergemaster or etc-update is ran, we just install all of the > > defaults. >=20 > Yes, but you are attemping to install a newer jail than the host, and str= ictly > speaking that isn't supported. (Rather, we only guarantee that a jail wi= ll work > so long as its world is older or equal in age to the host.) I am aware of *running* newer jails not being suppored, but *building* seems to be an absolute must to be supported. How else would you upgrade? On my own system, I build the new source into a jail and then promote the ZFS dataset the jail is using and then reboot into it. >=20 > All that said, for stable branches I intend to MFC the new flags to servi= ces_mkdb > long before possibly merging the change to turn it on in 'make distributi= on' >=20 > --=20 > John Baldwin --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJS4YgvXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNkZFQkU5OTJGNTI4MERGNDgxMTM2MkE2 RTc4MkFDMDNDOUIwQ0Y5AAoJEG54KsA8mwz5fEkQAK+g0qKvYmmLTz4mlLzvNpDd O5L54873F3xfrlqtxGkwhWTOm1qApNyVWcyIL+yzk+T5Kdka4ZMz+YWvH/8grKb0 S9qkn12hh16A2/xLNzXIx5OWJepCaqnYvHI9jguWEkAsxcWiGSfett1sLDSxTblp 4Q9jj2o9WH80HX4BLbVoUy7fdkezH7+3blasVQKzSc0WomYcCK/nO434m6iaBhLN y7rS2PhR8dB6MFea/pkFbqeev6nxJH6kJQSJ8UtDOBuDqjqzQ474DCX2AJO7APSA YJh+4IO4BOYEPRpQmrOiK5CQ2tqF/sNC54OOArhZg4KV/S9QuRGmX9c5uGamkkph RpXi1wT6uvT8lWGvSldVtK8jiVjfN005fpGnRT7YoIELJdBgjvoRPBYrYGStwnvY qzzX67so8doDCKS8dbUtnDWYemAdiyqo1R6dDe/SlDdE76cipqgrV34UHazDM30N iomM7nKQvfxQ6grl5BmQmEqj/QSquMe3KG/7BIxvpo1m6UakSYq2xadZZhWXGmuY FX4Q/Ht1xF1m8M1KZT0NKTIYuVTDS+qwfuXZks4cTjPnLqtnxcyRqddup+vTs2ft uKGN8ijDNeBqc23E8eB1AQyJeCX9TRWJ8VIPthpQT9zJseSgF/D+B2lW3ylQU+6U iEYI7xcNL8nL8UfZintK =e+jj -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 21:30:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25109F29; Thu, 23 Jan 2014 21:30:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 11D871DC7; Thu, 23 Jan 2014 21:30:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0NLUVwk037353; Thu, 23 Jan 2014 21:30:31 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0NLUVkq037352; Thu, 23 Jan 2014 21:30:31 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201401232130.s0NLUVkq037352@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 23 Jan 2014 21:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261091 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:30:32 -0000 Author: ae Date: Thu Jan 23 21:30:31 2014 New Revision: 261091 URL: http://svnweb.freebsd.org/changeset/base/261091 Log: Always free sbuf in gctl_free(). MFC after: 1 week Modified: head/sys/geom/geom_ctl.c Modified: head/sys/geom/geom_ctl.c ============================================================================== --- head/sys/geom/geom_ctl.c Thu Jan 23 20:35:32 2014 (r261090) +++ head/sys/geom/geom_ctl.c Thu Jan 23 21:30:31 2014 (r261091) @@ -214,6 +214,7 @@ gctl_free(struct gctl_req *req) { int i; + sbuf_delete(req->serror); if (req->arg == NULL) return; for (i = 0; i < req->narg; i++) { @@ -224,7 +225,6 @@ gctl_free(struct gctl_req *req) g_free(req->arg[i].kvalue); } g_free(req->arg); - sbuf_delete(req->serror); } static void From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 21:38:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDF6133A; Thu, 23 Jan 2014 21:38:54 +0000 (UTC) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A5371E89; Thu, 23 Jan 2014 21:38:54 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id q10so2292230pdj.38 for ; Thu, 23 Jan 2014 13:38:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=w4AXa1zkwysPItA8PtNcR52xeDnneLf3G0Z0djLRWF8=; b=c8TRRB7S/njVG6vA42HbpQ3FVzNtHKkRZFo7Icv1Hx9cWO1IPkIS0TcKZHveNYj/m2 6vOEeJvKW3YW/WGyfmWBfK/arsHmDbuC/f4hihbDUZ+NeNiXLBo0pgPxbGakjQazIAeM TBHkEfinQQFnfSe1YW8WJgINDIcGi8w6Jg4E66dSE4knnZElaSZvlGWSQ81VmRuWE7h0 ZYW6J2VJtzqRrrlGIK1ShwBMSfFvFHcO8sNuEoDCgF49jk8yV+JMmtSjjiwTckFjF72f lK2+N6hK7Ian9w7c589195AYVcvhvd5Y0CwITeBj0dfFaZtzI4ROkNdWxg7TVd/yR4p6 AibQ== MIME-Version: 1.0 X-Received: by 10.66.163.2 with SMTP id ye2mr10367631pab.110.1390513134326; Thu, 23 Jan 2014 13:38:54 -0800 (PST) Sender: sjk4015@gmail.com Received: by 10.68.114.101 with HTTP; Thu, 23 Jan 2014 13:38:54 -0800 (PST) In-Reply-To: References: <201401230314.s0N3Enu6011314@svn.freebsd.org> Date: Thu, 23 Jan 2014 16:38:54 -0500 X-Google-Sender-Auth: Dfsc36_0bW6vfoazKmz0rWtlJjQ Message-ID: Subject: Re: svn commit: r261072 - in head: share/man/man5 share/mk tools/build/options From: Steven Kreuzer To: Julio Merino Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:38:54 -0000 Hi Julio- Thanks. I forgot to include the MFC line in this commit. I set a reminder for myself and I will merge it in 3 days. On Wed, Jan 22, 2014 at 10:19 PM, Julio Merino wrote: > On Jan 22, 2014, at 22:14, Steven Kreuzer wrote: > >> Author: skreuzer (doc,ports committer) >> Date: Thu Jan 23 03:14:48 2014 >> New Revision: 261072 >> URL: http://svnweb.freebsd.org/changeset/base/261072 >> >> Log: >> Remove WITHOUT_ATF as it has been replaced by WITH_TESTS >> >> PR: conf/185326 >> Reported by: Igor Mozolevsky >> Approved by: hrs (mentor) > > Thanks for doing this. > > And please don't forget to MFC into stable/10. (Just a reminder because I don't see a MFC tag in the commit message.) From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 22:05:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 435AC899 for ; Thu, 23 Jan 2014 22:05:51 +0000 (UTC) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D3542118C for ; Thu, 23 Jan 2014 22:05:50 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=date:from:to :cc:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=sweb; b=Nt7d0/+2D0qNoSEK9pTMHhqBYNambRGI8 u9Z1+P1QQn77zYY3wWWo4xV8rAYMwop7YGECw9/uN1mwdzw+zAA3BKnu1bbwCxAw 2aezn/LhTaL1EImFXh77r0E4BVgqLKZvczYpKhrNkQgNqp6pw80U4bFs7aP+heDh SvnG70g6ho= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=date:from :to:cc:subject:message-id:references:mime-version:content-type :in-reply-to; s=sweb; bh=zBT/Q2/qtCUlnHadwoiBs8wtToYANZ0JnE4bWRo Mlx8=; b=WpiNv7MY5XJINHoNNPJ8CpxIaOBJeHDnAnBTbx84U5ikgrknipQQXvb EKocm6tMGs8R23HtmZHAbs2y5zYx/LB4oky9N2hO0EZG5iCgFahBpCXmFKf+Uf70 4IFFMJGEoloB869EcsokrI/XuFkwzlRh3p6grvT6r3+ubVu5Im/E= Received: (qmail 69243 invoked from network); 23 Jan 2014 16:05:46 -0600 Received: from unknown (HELO admin.xzibition.com) (bryan@shatow.net@173.160.118.90) by sweb.xzibition.com with ESMTPA; 23 Jan 2014 16:05:46 -0600 Date: Thu, 23 Jan 2014 16:05:45 -0600 From: Bryan Drewery To: John Baldwin Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Message-ID: <20140123220545.GB37334@admin.xzibition.com> References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <201401231439.14819.jhb@freebsd.org> <20140123194841.GA39296@admin.xzibition.com> <201401231503.42671.jhb@freebsd.org> <20140123212256.GA37334@admin.xzibition.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DBIVS5p969aUjpLe" Content-Disposition: inline In-Reply-To: <20140123212256.GA37334@admin.xzibition.com> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:05:51 -0000 --DBIVS5p969aUjpLe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 23, 2014 at 03:22:56PM -0600, Bryan Drewery wrote: > On Thu, Jan 23, 2014 at 03:03:42PM -0500, John Baldwin wrote: > > On Thursday, January 23, 2014 2:48:41 pm Bryan Drewery wrote: > > > On Thu, Jan 23, 2014 at 02:39:14PM -0500, John Baldwin wrote: > > > > On Thursday, January 23, 2014 10:42:36 am David Chisnall wrote: > > > > > On 22 Jan 2014, at 22:36, Glen Barber wrote: > > > > >=20 > > > > > > It needs to use the build host version, because using (for exam= ple) > > > > > > powerpc resulting binary won't work on and amd64 system. > > > > >=20 > > > > > If it's used as part of the build, then it should be part of the = toolchain=20 > > > > target and we should be using the version built there. > > > >=20 > > > > 'make distribute' is not a normal part of the build (it's not part = of > > > > buildworld or installworld). Both mergemaster and etcupdate only r= un it > > > > after an installworld has been performed, in which case an up-to-da= te > > > > services_mkdb should already be installed. > > > >=20 > > > > Bryan, what are you running 'make distribute' for? Is this to popu= late > > > > a new jail from a world build? > > >=20 > > > Yes, poudriere uses this to create jails. It runs: > > >=20 > > > export TARGET_ARCH=3D... > > > make buildworld > > > make installworld DESTDIR=3D... > > > make distrib-dirs DESTDIR=3D... DB_FROM_SRC=3D1 > > > make distribution DESTDIR=3D... > > >=20 > > >=20 > > > No mergemaster or etc-update is ran, we just install all of the > > > defaults. > >=20 > > Yes, but you are attemping to install a newer jail than the host, and s= trictly > > speaking that isn't supported. (Rather, we only guarantee that a jail = will work > > so long as its world is older or equal in age to the host.) >=20 > I am aware of *running* newer jails not being suppored, but *building* > seems to be an absolute must to be supported. How else would you > upgrade? >=20 > On my own system, I build the new source into a jail and then promote > the ZFS dataset the jail is using and then reboot into it. Ok I see that my other use case is fine (building newer) and that this is just an issue with cross-building. I do understand that you can't run cross-arch and that you'll just need to have the updated version in the host. So nevermind my concerns. Sorry for the noise. >=20 > >=20 > > All that said, for stable branches I intend to MFC the new flags to ser= vices_mkdb > > long before possibly merging the change to turn it on in 'make distribu= tion' > >=20 > > --=20 > > John Baldwin --DBIVS5p969aUjpLe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJS4ZI5XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNkZFQkU5OTJGNTI4MERGNDgxMTM2MkE2 RTc4MkFDMDNDOUIwQ0Y5AAoJEG54KsA8mwz5/ZcP/i/oI2c5WMK8trvQQwAcQhDK 9U2VGKTqlZbG9nS1K5JVcg2YHhF/qwGDxeKluza3GsWNUJ0Tvdsng3Fu+cM5Fxl1 0EtJeL9XAUbJFoVv0RQHUF+9VDLGykojlm7UmNiyWgR5bTRwykBDa/SYsj09/hg0 MxNj1FMkSAquc7CxDNn6rGWDGreHxEXywPEJZTm4UcUcEnso05qatTlJhHHYhoph v5QDO3MqcPeCia8dUuQCBRJc0FyTbKywP9xnKY3ZK66Slsvf4OBtZ7Snf6iWGBDL MQdO98TGtTsJ/BXr+sFx/KBMdeuXtDyUnyHWsA9qz3xyqXJoB4TNavxdgvhY3iPU fD2uC2UwmWjsNvh93HZMvSJkLTSTQ2PkkhI+lBOvPzGV7ZjwzKfuqxbtGlQe4+j1 UbVudEl9+QI/F8tjeFtzEsz9ZWXRQIyQOwY/RMG+0b8JhU6pSi/C4lopcRXsTi3s AT0RbQdY4bI7Q9dv1C5AquzCjMtLO80WuPSgY0N9D3kaGH9fd4tjYEJF22F/12Xd NTVeUSVknS9lApyN0qZ5811QPulYxToP8Zj+/9Ug9hEZuygf5uJDm+4cNqfeRBbO /Pem55dQbYLmXwFSKsJWskIG4u6mcNVpt/EihaX5r6tH3kPhunp/sPWxcCkPqzo4 Nzm1tYyKMlWMsrkxggk0 =ZFxX -----END PGP SIGNATURE----- --DBIVS5p969aUjpLe-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 22:13:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57E50C2B; Thu, 23 Jan 2014 22:13:17 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B57D1234; Thu, 23 Jan 2014 22:13:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0EBECB917; Thu, 23 Jan 2014 17:13:16 -0500 (EST) From: John Baldwin To: Bryan Drewery Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Date: Thu, 23 Jan 2014 17:12:51 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <201401231503.42671.jhb@freebsd.org> <20140123212256.GA37334@admin.xzibition.com> In-Reply-To: <20140123212256.GA37334@admin.xzibition.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201401231712.51610.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 23 Jan 2014 17:13:16 -0500 (EST) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:13:17 -0000 On Thursday, January 23, 2014 4:22:56 pm Bryan Drewery wrote: > On Thu, Jan 23, 2014 at 03:03:42PM -0500, John Baldwin wrote: > > On Thursday, January 23, 2014 2:48:41 pm Bryan Drewery wrote: > > > On Thu, Jan 23, 2014 at 02:39:14PM -0500, John Baldwin wrote: > > > > On Thursday, January 23, 2014 10:42:36 am David Chisnall wrote: > > > > > On 22 Jan 2014, at 22:36, Glen Barber wrote: > > > > > > > > > > > It needs to use the build host version, because using (for example) > > > > > > powerpc resulting binary won't work on and amd64 system. > > > > > > > > > > If it's used as part of the build, then it should be part of the toolchain > > > > target and we should be using the version built there. > > > > > > > > 'make distribute' is not a normal part of the build (it's not part of > > > > buildworld or installworld). Both mergemaster and etcupdate only run it > > > > after an installworld has been performed, in which case an up-to-date > > > > services_mkdb should already be installed. > > > > > > > > Bryan, what are you running 'make distribute' for? Is this to populate > > > > a new jail from a world build? > > > > > > Yes, poudriere uses this to create jails. It runs: > > > > > > export TARGET_ARCH=... > > > make buildworld > > > make installworld DESTDIR=... > > > make distrib-dirs DESTDIR=... DB_FROM_SRC=1 > > > make distribution DESTDIR=... > > > > > > > > > No mergemaster or etc-update is ran, we just install all of the > > > defaults. > > > > Yes, but you are attemping to install a newer jail than the host, and strictly > > speaking that isn't supported. (Rather, we only guarantee that a jail will work > > so long as its world is older or equal in age to the host.) > > I am aware of *running* newer jails not being suppored, but *building* > seems to be an absolute must to be supported. How else would you > upgrade? A normal upgrade does 'installworld' followed by some sort of /etc updating tool. It doesn't do 'make distribute'. Also, this is related to why one is not guaranteed to be able to do an 'installworld' unless you've booted into the new kernel first (though it often works, and 'make distribute' also often works, but often != always). The thing is, there is no notion of cross-tools, etc. for things like installworld and distribution. We have always expected the host to have ITOOLS that work. Note that this exact situation has happened before back when cap_mkdb and pwd_mkdb grew endianness flags for release cross-builds. The pwd_mkdb flag and the change to enable it in etc/Makefile were both made on the same day. (The cap_mkdb change was made earlier, but that appears to be more a result of the testing cycle for cross-building releases than an intentional delay.) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 22:48:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C0FB1FA for ; Thu, 23 Jan 2014 22:48:38 +0000 (UTC) Received: from mail-pd0-x22c.google.com (mail-pd0-x22c.google.com [IPv6:2607:f8b0:400e:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF3A91576 for ; Thu, 23 Jan 2014 22:48:37 +0000 (UTC) Received: by mail-pd0-f172.google.com with SMTP id p10so2349260pdj.31 for ; Thu, 23 Jan 2014 14:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Eg1k5+Dn2gA9CQy0qyE4ZhpjIQskBqnZ5eiPWCNEBxU=; b=dE818qKaCZFiMRHprYgT+iyeb7toZm/ZXoXY4v1iZNW70DqJQhJEnkw2DkLo9qAtkf B8pmy/phHMusd/VXTJYs0sUjGQekLv/6L0Sp+62YNYwXhqdNAo7KuZ5H0aDqsJCPDFFO +7/M2M6VbPxPcGeDtks3V3xtpSiC/6BGevb/E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Eg1k5+Dn2gA9CQy0qyE4ZhpjIQskBqnZ5eiPWCNEBxU=; b=iKr05ZY7ZZY+439SNDoLfBDMaymDtIP4hIJaSkRBIQBNc8Q1mQXAUb9KrmramhbIRB ht7kTG6eshl+sO42DQXFFUTtFlPrEEpM8eUvbLuDQ+Cdpy41KFxx5rau+Ot5261rfP6n iRDARhDxnzOlVbQZtXMDQkVDJVtCWbmeTk3z945kSJrvXfUKtYoFTPGao3fmkQu/iiJp 1D4xSnxYd2tF6t2yaqu4HikFVezEOh7AJOAkl2arejstYPkCcxkfkfg6S7xuT8iyMpMA pjGj8NL6w3gOAhoe7owOOU8i+bmHSWlaanyPnUqbfnnUGVfkbHtVjxF8Xth0bRyW2vCM UT8w== X-Gm-Message-State: ALoCoQmELE3ekSIaRVuBiHAtG1VYyoctMD84JRIRDOhjsUMQblk5exxUUOZMS/tcy/YIuBfQ47Ow X-Received: by 10.66.50.105 with SMTP id b9mr1220194pao.9.1390517317561; Thu, 23 Jan 2014 14:48:37 -0800 (PST) Received: from hater-dm.corp.yahoo.com (nat-dip4.cfw-a-gci.corp.yahoo.com. [209.131.62.113]) by mx.google.com with ESMTPSA id sq7sm41908638pbc.19.2014.01.23.14.48.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jan 2014 14:48:36 -0800 (PST) Message-ID: <52E19C42.2030700@wemm.org> Date: Thu, 23 Jan 2014 14:48:34 -0800 From: Peter Wemm User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John Baldwin , Bryan Drewery Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <201401231503.42671.jhb@freebsd.org> <20140123212256.GA37334@admin.xzibition.com> <201401231712.51610.jhb@freebsd.org> In-Reply-To: <201401231712.51610.jhb@freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:48:38 -0000 On 1/23/14, 2:12 PM, John Baldwin wrote: > On Thursday, January 23, 2014 4:22:56 pm Bryan Drewery wrote: >> On Thu, Jan 23, 2014 at 03:03:42PM -0500, John Baldwin wrote: >>> On Thursday, January 23, 2014 2:48:41 pm Bryan Drewery wrote: >>>> On Thu, Jan 23, 2014 at 02:39:14PM -0500, John Baldwin wrote: >>>>> On Thursday, January 23, 2014 10:42:36 am David Chisnall wrote: >>>>>> On 22 Jan 2014, at 22:36, Glen Barber wrote: >>>>>> >>>>>>> It needs to use the build host version, because using (for example) >>>>>>> powerpc resulting binary won't work on and amd64 system. >>>>>> >>>>>> If it's used as part of the build, then it should be part of the toolchain >>>>> target and we should be using the version built there. >>>>> >>>>> 'make distribute' is not a normal part of the build (it's not part of >>>>> buildworld or installworld). Both mergemaster and etcupdate only run it >>>>> after an installworld has been performed, in which case an up-to-date >>>>> services_mkdb should already be installed. >>>>> >>>>> Bryan, what are you running 'make distribute' for? Is this to populate >>>>> a new jail from a world build? >>>> >>>> Yes, poudriere uses this to create jails. It runs: >>>> >>>> export TARGET_ARCH=... >>>> make buildworld >>>> make installworld DESTDIR=... >>>> make distrib-dirs DESTDIR=... DB_FROM_SRC=1 >>>> make distribution DESTDIR=... >>>> >>>> >>>> No mergemaster or etc-update is ran, we just install all of the >>>> defaults. >>> >>> Yes, but you are attemping to install a newer jail than the host, and strictly >>> speaking that isn't supported. (Rather, we only guarantee that a jail will work >>> so long as its world is older or equal in age to the host.) >> >> I am aware of *running* newer jails not being suppored, but *building* >> seems to be an absolute must to be supported. How else would you >> upgrade? > > A normal upgrade does 'installworld' followed by some sort of /etc updating > tool. It doesn't do 'make distribute'. Also, this is related to why one > is not guaranteed to be able to do an 'installworld' unless you've booted into > the new kernel first (though it often works, and 'make distribute' also often > works, but often != always). > > The thing is, there is no notion of cross-tools, etc. for things like > installworld and distribution. We have always expected the host to have > ITOOLS that work. > > Note that this exact situation has happened before back when cap_mkdb and > pwd_mkdb grew endianness flags for release cross-builds. The pwd_mkdb > flag and the change to enable it in etc/Makefile were both made on the same > day. (The cap_mkdb change was made earlier, but that appears to be more > a result of the testing cycle for cross-building releases than an > intentional delay.) FWIW, we do this at work and ran into the same problem. We do the same things that poudriere does, almost exactly. We added: "CAP_MKDB_ENDIAN= PWD_MKDB_ENDIAN=" to the "make DESTDIR=/stage distribution" phase. This currently works all the way back to stable/4. Is there a middle ground where we could only specify -l / -b in a cross build perhaps? -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV UTF-8: for when a ' just won\342\200\231t do. From owner-svn-src-all@FreeBSD.ORG Thu Jan 23 23:56:28 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C904D78; Thu, 23 Jan 2014 23:56:28 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id CDAEB1AB8; Thu, 23 Jan 2014 23:56:27 +0000 (UTC) Received: from c122-106-144-87.carlnfd1.nsw.optusnet.com.au (c122-106-144-87.carlnfd1.nsw.optusnet.com.au [122.106.144.87]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 9E9131A29FE; Fri, 24 Jan 2014 10:56:17 +1100 (EST) Date: Fri, 24 Jan 2014 10:56:16 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r261080 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern In-Reply-To: <201401231724.s0NHOQLE039584@svn.freebsd.org> Message-ID: <20140124091907.I2614@besplex.bde.org> References: <201401231724.s0NHOQLE039584@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=bpB1Wiqi c=1 sm=1 tr=0 a=p/w0leo876FR0WNmYI1KeA==:117 a=PO7r1zJSAAAA:8 a=aMK5myg-p9oA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Nhj2jhtrgT8A:10 a=RgBw9RmQAAAA:8 a=mBz_84EukJEfn65XYgIA:9 a=jr8VamtQr4TqBslQ:21 a=C4T51DSm5XGUXB0p:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:56:28 -0000 On Thu, 23 Jan 2014, Konstantin Belousov wrote: > Author: kib > > Log: > The posix_fallocate(2) syscall should return error number on error, > without modifying errno. > > Reported and tested by: Gennady Proskurin > Reviewed by: mdf This needs many more fixes. I pointed out some in my review. Now the grammar is further unimproved. > Modified: head/lib/libc/sys/posix_fallocate.2 > ============================================================================== > --- head/lib/libc/sys/posix_fallocate.2 Thu Jan 23 14:13:12 2014 (r261079) > +++ head/lib/libc/sys/posix_fallocate.2 Thu Jan 23 17:24:26 2014 (r261080) > @@ -83,9 +83,9 @@ that reduces the file size to a size sma > If successful, > .Fn posix_fallocate > returns zero. > -It returns -1 on failure, and sets > +It returns error number on failure, without setting New bug (grammar error): missing article before "error number". The previous version said plain "error". The grammar error is not as large for that, and could have been fixed by saying "an error". None of "error", "error number", "an error", "the error", "an error number" or "the error number" describes what the error actually is. "an error" improves the wording of the previous version while keeping its fuzziness. > .Va errno > -to indicate the error. > +variable. Old bugs (new in the previous version): 1. (grammar error): missing article before "errno variable". 2. (verbosness): after fixing the grammar error, "the errno variable" is a verbose and unusual way of saying "errno". Most man pages just say "errno", like this one used to do before "variable" was added. Grepping for grammar near errno in libc/sys/*.2 shows a few more grammar errors and mounds of style bugs: - 3 man pages use .Dv instead of the usual .Va. mdoc(7) says that .Va is for generic variables and .Dv is for variables (sic) or constants defined (sic) in an include file. The latter makes little sense, and all the examples are for manifest (#defined) constants. Every variable that is worth documenting in a man page should be declared, but never defined in an include file. - wording for the style bug of not using -std is inconsistent even within aio man pages. Some say that errno is "set appropriately: and others say that errno is set "to indicate the error condition" (but aio has complications so that -std is often not usable). Another says "as enumerated below", where the enumeration is in a normal ERRORS section. - one aio man page quotes -1 - brk.2 "the global variable" errno. This is not just verbose, but is wrong in the threaded case. - cap_ioctls_limit.2 abuses .Va for -1 and doesn't mark up errno at all. It also says "the global variable errno". - clock_gettime.2 uses -std, but has an unusual ERRORS section that begins with "The following error codes may be set in errno". If that is correct, then the error handling isn't fully -std. But I think it is -std. Normal wording is for POSIX to say "shall fail if" and ERRORS to say "will fail if" (I don't like the "will" wording. deshallify.sh never changes "shall" to "will". It mostly either just removes "shall", or changes it to "is" or "are". This gives better wording, but might not be suitable for the ERRORS section). The "may be set" wording says very little. - the cpuset man pages copy the bad example set in clock_gettime.2 - dup.2 says that errno is an "external" variable. It is missing the "will" bug, and just says "fails" instead of "will fail". - intro.2 says both "the external identifer errno" (and gives excessive detail about the implementation of this) and "the variable errno". It gives some details about syscalls setting errno. These details are now wrong for syscalls like posix_fallocate(). - mlockall.2 says "the global location errno" - modfind.2 says both "sets errno to indicate the error" and "errno is set to indicate the error". It uses the former where it should use -std to give the latter (or whatever), and uses the latter in the ERRORS section where it shouldn't mention errno again. - modnext.2 has an unusual (non-bulleted) ERRORS section. - another variation is "sets the global variable errno to indicate the error" - msgrcv.2 has the grammar error "and errno set to E*" in several places - nanosleep.2 says "the global variable errno will be set to indicate the interruption" - nfssvc.2 in some places says "errno == E*" instead of something involving errno being set. In other places it says "the global variable errno is set to specify the error" (the -std wording is "indicate", not "specify") - posix_openpt.2 says "-1 shall be returned and errno set to indicate the error". It hasn't been deshallified. - procctl.2 spells -1 verbosely as "a value of -1" - read.2 spells -1 as "a -1" - readlink.2 spells "sets errno" as "placing the error code in the global variable errno" - reboot.2 says "an error [sic] is returned [sic] in the global variable errno - sched_get_priority_max.2 says "if unsucessful, they shall return a value of -1 and set errno" and also "On failure, errno will be set" - syscall.2 says "an error code is stored in errno" - The above mostly only mentions the first instance of each style bug. There are very few instances of "errno" that don't involve a style bug that is a little larger than not using -std. "the global variable errno" is popular, and is what is given by -std. -std also gives the verboseness "the value 0" and "the value -1". All this variation in an error where there is a macro designed to prevent it and to allow changing the wording easily :-(. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 00:14:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E2D1842; Fri, 24 Jan 2014 00:14:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8AD881D47; Fri, 24 Jan 2014 00:14:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O0EEXT038294; Fri, 24 Jan 2014 00:14:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O0EE0o038293; Fri, 24 Jan 2014 00:14:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401240014.s0O0EE0o038293@svn.freebsd.org> From: Warner Losh Date: Fri, 24 Jan 2014 00:14:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261092 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:14:14 -0000 Author: imp Date: Fri Jan 24 00:14:14 2014 New Revision: 261092 URL: http://svnweb.freebsd.org/changeset/base/261092 Log: clock-frequency is a FreeBSD-specific extention. Make it optional and allow the client uart drivers to decide if a frequency is required. Modified: head/sys/dev/uart/uart_cpu_fdt.c Modified: head/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- head/sys/dev/uart/uart_cpu_fdt.c Thu Jan 23 21:30:31 2014 (r261091) +++ head/sys/dev/uart/uart_cpu_fdt.c Fri Jan 24 00:14:14 2014 (r261092) @@ -62,9 +62,10 @@ uart_fdt_get_clock(phandle_t node, pcell { pcell_t clock; + /* clock-frequency is a FreeBSD-only extention. */ if ((OF_getprop(node, "clock-frequency", &clock, sizeof(clock))) <= 0) - return (ENXIO); + clock = 0; if (clock == 0) /* Try to retrieve parent 'bus-frequency' */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 00:24:32 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D519FC04; Fri, 24 Jan 2014 00:24:32 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD4AD1E0F; Fri, 24 Jan 2014 00:24:32 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s0O0OPVm086936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 Jan 2014 16:24:26 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s0O0OPr7086935; Thu, 23 Jan 2014 16:24:25 -0800 (PST) (envelope-from jmg) Date: Thu, 23 Jan 2014 16:24:25 -0800 From: John-Mark Gurney To: Mateusz Guzik Subject: Re: svn commit: r261085 - head/sys/geom Message-ID: <20140124002425.GB75135@funkthat.com> References: <201401231931.s0NJVHKS089308@svn.freebsd.org> <20140123201748.GA26772@dft-labs.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140123201748.GA26772@dft-labs.eu> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Thu, 23 Jan 2014 16:24:26 -0800 (PST) Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:24:32 -0000 Mateusz Guzik wrote this message on Thu, Jan 23, 2014 at 21:17 +0100: > On Thu, Jan 23, 2014 at 07:31:17PM +0000, Andrey V. Elsukov wrote: > > @@ -122,7 +123,7 @@ geom_alloc_copyin(struct gctl_req *req, > > void *ptr; > > > > ptr = g_malloc(len, M_WAITOK); > > - nreq->nerror = copyin(uaddr, ptr, len); > > + req->nerror = copyin(uaddr, ptr, len); > > if (!req->nerror) > > return (ptr); > > if (ptr != NULL) > > Is not this if (ptr != NULL) unnecesary? The code: if (!req->nerror) return (ptr); if (ptr != NULL) g_free(ptr); return (NULL); If anything, the if statement can be removed, but the g_free needs to remain, otherwise there will be a memory leak... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 00:41:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80B2827C; Fri, 24 Jan 2014 00:41:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C75C1F53; Fri, 24 Jan 2014 00:41:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O0f3jV049059; Fri, 24 Jan 2014 00:41:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O0f3o5049058; Fri, 24 Jan 2014 00:41:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401240041.s0O0f3o5049058@svn.freebsd.org> From: Alexander Motin Date: Fri, 24 Jan 2014 00:41:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261093 - stable/10/sys/dev/mfi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:41:03 -0000 Author: mav Date: Fri Jan 24 00:41:02 2014 New Revision: 261093 URL: http://svnweb.freebsd.org/changeset/base/261093 Log: MFC r260521: Remove not applicable PI_SDTR_ABLE and PI_WIDE_16 hba_inquiry flags to make CAM to not try negotiate unsupported settings and suppress warnings. While there, enable command queuing on pass-through devices, announced in hba_inquiry, but disabled. Even though queue size is very small, It seems working well enough. Modified: stable/10/sys/dev/mfi/mfi_cam.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mfi/mfi_cam.c ============================================================================== --- stable/10/sys/dev/mfi/mfi_cam.c Fri Jan 24 00:14:14 2014 (r261092) +++ stable/10/sys/dev/mfi/mfi_cam.c Fri Jan 24 00:41:02 2014 (r261093) @@ -216,7 +216,7 @@ mfip_cam_action(struct cam_sim *sim, uni struct ccb_pathinq *cpi = &ccb->cpi; cpi->version_num = 1; - cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; + cpi->hba_inquiry = PI_TAG_ABLE; cpi->target_sprt = 0; cpi->hba_misc = PIM_NOBUSRESET|PIM_SEQSCAN; cpi->hba_eng_cnt = 0; @@ -244,6 +244,8 @@ mfip_cam_action(struct cam_sim *sim, uni break; case XPT_GET_TRAN_SETTINGS: { + struct ccb_trans_settings_scsi *scsi = + &ccb->cts.proto_specific.scsi; struct ccb_trans_settings_sas *sas = &ccb->cts.xport_specific.sas; @@ -252,6 +254,9 @@ mfip_cam_action(struct cam_sim *sim, uni ccb->cts.transport = XPORT_SAS; ccb->cts.transport_version = 0; + scsi->valid = CTS_SCSI_VALID_TQ; + scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; + sas->valid &= ~CTS_SAS_VALID_SPEED; sas->bitrate = 150000; From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 00:42:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A47143CA; Fri, 24 Jan 2014 00:42:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 90B291F5B; Fri, 24 Jan 2014 00:42:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O0gIMn049236; Fri, 24 Jan 2014 00:42:18 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O0gIKR049235; Fri, 24 Jan 2014 00:42:18 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201401240042.s0O0gIKR049235@svn.freebsd.org> From: Ian Lepore Date: Fri, 24 Jan 2014 00:42:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261094 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:42:18 -0000 Author: ian Date: Fri Jan 24 00:42:18 2014 New Revision: 261094 URL: http://svnweb.freebsd.org/changeset/base/261094 Log: Be more robust with malformed interrupt config data. Instead of crashing or going into a near-infinite loop, warn and make potentially-reasonable assumptions. Reviewed by: brooks, nwhitehorn Modified: head/sys/dev/fdt/fdt_common.c Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Fri Jan 24 00:41:02 2014 (r261093) +++ head/sys/dev/fdt/fdt_common.c Fri Jan 24 00:42:18 2014 (r261094) @@ -483,11 +483,23 @@ fdt_intr_to_rl(device_t dev, phandle_t n nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { - iparent = 0; - OF_searchencprop(node, "interrupt-parent", &iparent, - sizeof(iparent)); - OF_searchencprop(OF_xref_phandle(iparent), "#interrupt-cells", - &icells, sizeof(icells)); + if (OF_searchencprop(node, "interrupt-parent", &iparent, + sizeof(iparent)) == -1) { + device_printf(dev, "No interrupt-parent found, " + "assuming direct parent\n"); + iparent = OF_parent(node); + } + if (OF_searchencprop(OF_xref_phandle(iparent), + "#interrupt-cells", &icells, sizeof(icells)) == -1) { + device_printf(dev, "Missing #interrupt-cells property, " + "assuming <1>\n"); + icells = 1; + } + if (icells < 1 || icells > nintr) { + device_printf(dev, "Invalid #interrupt-cells property " + "value <%d>, assuming <1>\n", icells); + icells = 1; + } for (i = 0, k = 0; i < nintr; i += icells, k++) { intr[i] = ofw_bus_map_intr(dev, iparent, intr[i]); resource_list_add(rl, SYS_RES_IRQ, k, intr[i], intr[i], From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 00:56:23 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CA99A9C for ; Fri, 24 Jan 2014 00:56:23 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 13171106B for ; Fri, 24 Jan 2014 00:56:23 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s0O0uAlE087345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 Jan 2014 16:56:11 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s0O0uA76087344; Thu, 23 Jan 2014 16:56:10 -0800 (PST) (envelope-from jmg) Date: Thu, 23 Jan 2014 16:56:10 -0800 From: John-Mark Gurney To: Peter Wemm Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Message-ID: <20140124005610.GC75135@funkthat.com> References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <201401231503.42671.jhb@freebsd.org> <20140123212256.GA37334@admin.xzibition.com> <201401231712.51610.jhb@freebsd.org> <52E19C42.2030700@wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52E19C42.2030700@wemm.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Thu, 23 Jan 2014 16:56:11 -0800 (PST) Cc: src-committers@FreeBSD.org, John Baldwin , svn-src-all@FreeBSD.org, David Chisnall , Glen Barber , svn-src-head@FreeBSD.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:56:23 -0000 Peter Wemm wrote this message on Thu, Jan 23, 2014 at 14:48 -0800: > On 1/23/14, 2:12 PM, John Baldwin wrote: > > On Thursday, January 23, 2014 4:22:56 pm Bryan Drewery wrote: > >> On Thu, Jan 23, 2014 at 03:03:42PM -0500, John Baldwin wrote: > >>> On Thursday, January 23, 2014 2:48:41 pm Bryan Drewery wrote: > >>>> On Thu, Jan 23, 2014 at 02:39:14PM -0500, John Baldwin wrote: > >>>>> On Thursday, January 23, 2014 10:42:36 am David Chisnall wrote: > >>>>>> On 22 Jan 2014, at 22:36, Glen Barber wrote: > >>>>>> > >>>>>>> It needs to use the build host version, because using (for example) > >>>>>>> powerpc resulting binary won't work on and amd64 system. > >>>>>> > >>>>>> If it's used as part of the build, then it should be part of the toolchain > >>>>> target and we should be using the version built there. > >>>>> > >>>>> 'make distribute' is not a normal part of the build (it's not part of > >>>>> buildworld or installworld). Both mergemaster and etcupdate only run it > >>>>> after an installworld has been performed, in which case an up-to-date > >>>>> services_mkdb should already be installed. > >>>>> > >>>>> Bryan, what are you running 'make distribute' for? Is this to populate > >>>>> a new jail from a world build? > >>>> > >>>> Yes, poudriere uses this to create jails. It runs: > >>>> > >>>> export TARGET_ARCH=... > >>>> make buildworld > >>>> make installworld DESTDIR=... > >>>> make distrib-dirs DESTDIR=... DB_FROM_SRC=1 > >>>> make distribution DESTDIR=... > >>>> > >>>> > >>>> No mergemaster or etc-update is ran, we just install all of the > >>>> defaults. > >>> > >>> Yes, but you are attemping to install a newer jail than the host, and strictly > >>> speaking that isn't supported. (Rather, we only guarantee that a jail will work > >>> so long as its world is older or equal in age to the host.) > >> > >> I am aware of *running* newer jails not being suppored, but *building* > >> seems to be an absolute must to be supported. How else would you > >> upgrade? > > > > A normal upgrade does 'installworld' followed by some sort of /etc updating > > tool. It doesn't do 'make distribute'. Also, this is related to why one > > is not guaranteed to be able to do an 'installworld' unless you've booted into > > the new kernel first (though it often works, and 'make distribute' also often > > works, but often != always). > > > > The thing is, there is no notion of cross-tools, etc. for things like > > installworld and distribution. We have always expected the host to have > > ITOOLS that work. > > > > Note that this exact situation has happened before back when cap_mkdb and > > pwd_mkdb grew endianness flags for release cross-builds. The pwd_mkdb > > flag and the change to enable it in etc/Makefile were both made on the same > > day. (The cap_mkdb change was made earlier, but that appears to be more > > a result of the testing cycle for cross-building releases than an > > intentional delay.) > > FWIW, we do this at work and ran into the same problem. We do the same > things that poudriere does, almost exactly. > > We added: "CAP_MKDB_ENDIAN= PWD_MKDB_ENDIAN=" to the "make DESTDIR=/stage > distribution" phase. This currently works all the way back to stable/4. > > Is there a middle ground where we could only specify -l / -b in a cross > build perhaps? How about when current ARCH != TARGET_ARCH? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 02:57:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EF74E52; Fri, 24 Jan 2014 02:57:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1AEA21965; Fri, 24 Jan 2014 02:57:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O2v0HZ099670; Fri, 24 Jan 2014 02:57:00 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O2v0le099668; Fri, 24 Jan 2014 02:57:00 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201401240257.s0O2v0le099668@svn.freebsd.org> From: Justin Hibbits Date: Fri, 24 Jan 2014 02:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261095 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 02:57:01 -0000 Author: jhibbits Date: Fri Jan 24 02:57:00 2014 New Revision: 261095 URL: http://svnweb.freebsd.org/changeset/base/261095 Log: Fix 32-bit signal handling on ppc64. This was broken when the PSL_USERSTATIC macro was changed. Since copying 64-bit srr1 into 32-bit srr1 drops the upper 32 bits, any bits set in the context were dropped, meaning the context check fails. Since 32-bit set_context can't change those bits anyway, copy the ones from the current context (td->td_frame) before calling set_context(). MFC after: 3 weeks Modified: head/sys/powerpc/powerpc/exec_machdep.c Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Fri Jan 24 00:42:18 2014 (r261094) +++ head/sys/powerpc/powerpc/exec_machdep.c Fri Jan 24 02:57:00 2014 (r261095) @@ -752,6 +752,7 @@ set_mcontext32(struct thread *td, const memcpy(mcp64.mc_av,mcp->mc_av,sizeof(mcp64.mc_av)); for (i = 0; i < 42; i++) mcp64.mc_frame[i] = mcp->mc_frame[i]; + mcp64.mc_srr1 |= (td->td_frame->srr1 & 0xFFFFFFFF00000000ULL); memcpy(mcp64.mc_fpreg,mcp->mc_fpreg,sizeof(mcp64.mc_fpreg)); error = set_mcontext(td, &mcp64); From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:24:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 590B3E6; Fri, 24 Jan 2014 07:24:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 440421D9D; Fri, 24 Jan 2014 07:24:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7Of5G002917; Fri, 24 Jan 2014 07:24:41 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7Of2E002916; Fri, 24 Jan 2014 07:24:41 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240724.s0O7Of2E002916@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261096 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:24:41 -0000 Author: hselasky Date: Fri Jan 24 07:24:40 2014 New Revision: 261096 URL: http://svnweb.freebsd.org/changeset/base/261096 Log: MFC r260388, r260535 and r260536: Fix XHCI interrupt logic for "Intel Lynx Point" found in MBP2013. Modified: stable/10/sys/dev/usb/controller/xhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Fri Jan 24 02:57:00 2014 (r261095) +++ stable/10/sys/dev/usb/controller/xhci.c Fri Jan 24 07:24:40 2014 (r261096) @@ -1578,23 +1578,26 @@ void xhci_interrupt(struct xhci_softc *sc) { uint32_t status; + uint32_t temp; USB_BUS_LOCK(&sc->sc_bus); status = XREAD4(sc, oper, XHCI_USBSTS); - if (status == 0) - goto done; - /* acknowledge interrupts */ + /* acknowledge interrupts, if any */ + if (status != 0) { + XWRITE4(sc, oper, XHCI_USBSTS, status); + DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); + } - XWRITE4(sc, oper, XHCI_USBSTS, status); + temp = XREAD4(sc, runt, XHCI_IMAN(0)); - DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); + /* force clearing of pending interrupts */ + if (temp & XHCI_IMAN_INTR_PEND) + XWRITE4(sc, runt, XHCI_IMAN(0), temp); - if (status & XHCI_STS_EINT) { - /* check for event(s) */ - xhci_interrupt_poll(sc); - } + /* check for event(s) */ + xhci_interrupt_poll(sc); if (status & (XHCI_STS_PCD | XHCI_STS_HCH | XHCI_STS_HSE | XHCI_STS_HCE)) { @@ -1618,7 +1621,6 @@ xhci_interrupt(struct xhci_softc *sc) __FUNCTION__); } } -done: USB_BUS_UNLOCK(&sc->sc_bus); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:27:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A53B231B; Fri, 24 Jan 2014 07:27:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 904C01DB3; Fri, 24 Jan 2014 07:27:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7RBEg003235; Fri, 24 Jan 2014 07:27:11 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7RB6m003234; Fri, 24 Jan 2014 07:27:11 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240727.s0O7RB6m003234@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261097 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:27:11 -0000 Author: hselasky Date: Fri Jan 24 07:27:11 2014 New Revision: 261097 URL: http://svnweb.freebsd.org/changeset/base/261097 Log: MFC r260388, r260535 and r260536: Fix XHCI interrupt logic for "Intel Lynx Point" found in MBP2013. Modified: stable/9/sys/dev/usb/controller/xhci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Fri Jan 24 07:24:40 2014 (r261096) +++ stable/9/sys/dev/usb/controller/xhci.c Fri Jan 24 07:27:11 2014 (r261097) @@ -1544,23 +1544,26 @@ void xhci_interrupt(struct xhci_softc *sc) { uint32_t status; + uint32_t temp; USB_BUS_LOCK(&sc->sc_bus); status = XREAD4(sc, oper, XHCI_USBSTS); - if (status == 0) - goto done; - /* acknowledge interrupts */ + /* acknowledge interrupts, if any */ + if (status != 0) { + XWRITE4(sc, oper, XHCI_USBSTS, status); + DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); + } - XWRITE4(sc, oper, XHCI_USBSTS, status); + temp = XREAD4(sc, runt, XHCI_IMAN(0)); - DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); + /* force clearing of pending interrupts */ + if (temp & XHCI_IMAN_INTR_PEND) + XWRITE4(sc, runt, XHCI_IMAN(0), temp); - if (status & XHCI_STS_EINT) { - /* check for event(s) */ - xhci_interrupt_poll(sc); - } + /* check for event(s) */ + xhci_interrupt_poll(sc); if (status & (XHCI_STS_PCD | XHCI_STS_HCH | XHCI_STS_HSE | XHCI_STS_HCE)) { @@ -1584,7 +1587,6 @@ xhci_interrupt(struct xhci_softc *sc) __FUNCTION__); } } -done: USB_BUS_UNLOCK(&sc->sc_bus); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:29:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AD0F470; Fri, 24 Jan 2014 07:29:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 655721DC6; Fri, 24 Jan 2014 07:29:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7TWZL003543; Fri, 24 Jan 2014 07:29:32 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7TWUH003542; Fri, 24 Jan 2014 07:29:32 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240729.s0O7TWUH003542@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r261098 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:29:32 -0000 Author: hselasky Date: Fri Jan 24 07:29:31 2014 New Revision: 261098 URL: http://svnweb.freebsd.org/changeset/base/261098 Log: MFC r260388, r260535 and r260536: Fix XHCI interrupt logic for "Intel Lynx Point" found in MBP2013. Modified: stable/8/sys/dev/usb/controller/xhci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Fri Jan 24 07:27:11 2014 (r261097) +++ stable/8/sys/dev/usb/controller/xhci.c Fri Jan 24 07:29:31 2014 (r261098) @@ -1544,23 +1544,26 @@ void xhci_interrupt(struct xhci_softc *sc) { uint32_t status; + uint32_t temp; USB_BUS_LOCK(&sc->sc_bus); status = XREAD4(sc, oper, XHCI_USBSTS); - if (status == 0) - goto done; - /* acknowledge interrupts */ + /* acknowledge interrupts, if any */ + if (status != 0) { + XWRITE4(sc, oper, XHCI_USBSTS, status); + DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); + } - XWRITE4(sc, oper, XHCI_USBSTS, status); + temp = XREAD4(sc, runt, XHCI_IMAN(0)); - DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); + /* force clearing of pending interrupts */ + if (temp & XHCI_IMAN_INTR_PEND) + XWRITE4(sc, runt, XHCI_IMAN(0), temp); - if (status & XHCI_STS_EINT) { - /* check for event(s) */ - xhci_interrupt_poll(sc); - } + /* check for event(s) */ + xhci_interrupt_poll(sc); if (status & (XHCI_STS_PCD | XHCI_STS_HCH | XHCI_STS_HSE | XHCI_STS_HCE)) { @@ -1584,7 +1587,6 @@ xhci_interrupt(struct xhci_softc *sc) __FUNCTION__); } } -done: USB_BUS_UNLOCK(&sc->sc_bus); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:32:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13FBF5C0; Fri, 24 Jan 2014 07:32:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E85EB1E30; Fri, 24 Jan 2014 07:32:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7W58w006480; Fri, 24 Jan 2014 07:32:05 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7W5Kj006479; Fri, 24 Jan 2014 07:32:05 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240732.s0O7W5Kj006479@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261099 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:32:06 -0000 Author: hselasky Date: Fri Jan 24 07:32:05 2014 New Revision: 261099 URL: http://svnweb.freebsd.org/changeset/base/261099 Log: MFC r260559: Don't do synchronous USB requests inside USB transfer callbacks. It is technically OK, but not recommended. Modified: stable/10/sys/dev/usb/serial/umcs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/umcs.c ============================================================================== --- stable/10/sys/dev/usb/serial/umcs.c Fri Jan 24 07:29:31 2014 (r261098) +++ stable/10/sys/dev/usb/serial/umcs.c Fri Jan 24 07:32:05 2014 (r261099) @@ -121,8 +121,6 @@ struct umcs7840_softc_oneport { uint8_t sc_lcr; /* local line control register */ uint8_t sc_mcr; /* local modem control register */ - uint8_t sc_lsr; /* local line status register */ - uint8_t sc_msr; /* local modem status register */ }; struct umcs7840_softc { @@ -535,12 +533,7 @@ umcs7840_cfg_open(struct ucom_softc *uco if (umcs7840_set_reg_sync(sc, umcs7840_port_registers[pn].reg_control, data)) return; - /* Read LSR & MSR */ - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &sc->sc_ports[pn].sc_lsr)) - return; - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &sc->sc_ports[pn].sc_msr)) - return; - DPRINTF("Port %d has been opened, LSR=%02x MSR=%02x\n", pn, sc->sc_ports[pn].sc_lsr, sc->sc_ports[pn].sc_msr); + DPRINTF("Port %d has been opened\n", pn); } static void @@ -748,9 +741,17 @@ static void umcs7840_cfg_get_status(struct ucom_softc *ucom, uint8_t *lsr, uint8_t *msr) { struct umcs7840_softc *sc = ucom->sc_parent; + uint8_t pn = ucom->sc_portno; + uint8_t hw_lsr = 0; /* local line status register */ + uint8_t hw_msr = 0; /* local modem status register */ + + /* Read LSR & MSR */ + umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &hw_lsr); + umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &hw_msr); + + *lsr = hw_lsr; + *msr = hw_msr; - *lsr = sc->sc_ports[ucom->sc_portno].sc_lsr; - *msr = sc->sc_ports[ucom->sc_portno].sc_msr; DPRINTF("Port %d status: LSR=%02x MSR=%02x\n", ucom->sc_portno, *lsr, *msr); } @@ -781,21 +782,11 @@ umcs7840_intr_callback(struct usb_xfer * case MCS7840_UART_ISR_RXERR: case MCS7840_UART_ISR_RXHASDATA: case MCS7840_UART_ISR_RXTIMEOUT: - /* Read new LSR */ - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &sc->sc_ports[pn].sc_lsr)) - break; /* Inner switch */ + case MCS7840_UART_ISR_MSCHANGE: ucom_status_change(&sc->sc_ucom[subunit]); - /* Inner switch */ break; - case MCS7840_UART_ISR_TXEMPTY: + default: /* Do nothing */ - break; /* Inner switch */ - case MCS7840_UART_ISR_MSCHANGE: - /* Read new MSR */ - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &sc->sc_ports[pn].sc_msr)) - break; /* Inner switch */ - DPRINTF("Port %d: new MSR %02x\n", pn, sc->sc_ports[pn].sc_msr); - ucom_status_change(&sc->sc_ucom[subunit]); break; } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:33:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93AAE6F7; Fri, 24 Jan 2014 07:33:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73D461E3B; Fri, 24 Jan 2014 07:33:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7Xtrh006746; Fri, 24 Jan 2014 07:33:55 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7Xt0e006745; Fri, 24 Jan 2014 07:33:55 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240733.s0O7Xt0e006745@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261100 - stable/9/sys/dev/usb/serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:33:55 -0000 Author: hselasky Date: Fri Jan 24 07:33:54 2014 New Revision: 261100 URL: http://svnweb.freebsd.org/changeset/base/261100 Log: MFC r260559: Don't do synchronous USB requests inside USB transfer callbacks. It is technically OK, but not recommended. Modified: stable/9/sys/dev/usb/serial/umcs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/umcs.c ============================================================================== --- stable/9/sys/dev/usb/serial/umcs.c Fri Jan 24 07:32:05 2014 (r261099) +++ stable/9/sys/dev/usb/serial/umcs.c Fri Jan 24 07:33:54 2014 (r261100) @@ -121,8 +121,6 @@ struct umcs7840_softc_oneport { uint8_t sc_lcr; /* local line control register */ uint8_t sc_mcr; /* local modem control register */ - uint8_t sc_lsr; /* local line status register */ - uint8_t sc_msr; /* local modem status register */ }; struct umcs7840_softc { @@ -535,12 +533,7 @@ umcs7840_cfg_open(struct ucom_softc *uco if (umcs7840_set_reg_sync(sc, umcs7840_port_registers[pn].reg_control, data)) return; - /* Read LSR & MSR */ - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &sc->sc_ports[pn].sc_lsr)) - return; - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &sc->sc_ports[pn].sc_msr)) - return; - DPRINTF("Port %d has been opened, LSR=%02x MSR=%02x\n", pn, sc->sc_ports[pn].sc_lsr, sc->sc_ports[pn].sc_msr); + DPRINTF("Port %d has been opened\n", pn); } static void @@ -748,9 +741,17 @@ static void umcs7840_cfg_get_status(struct ucom_softc *ucom, uint8_t *lsr, uint8_t *msr) { struct umcs7840_softc *sc = ucom->sc_parent; + uint8_t pn = ucom->sc_portno; + uint8_t hw_lsr = 0; /* local line status register */ + uint8_t hw_msr = 0; /* local modem status register */ + + /* Read LSR & MSR */ + umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &hw_lsr); + umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &hw_msr); + + *lsr = hw_lsr; + *msr = hw_msr; - *lsr = sc->sc_ports[ucom->sc_portno].sc_lsr; - *msr = sc->sc_ports[ucom->sc_portno].sc_msr; DPRINTF("Port %d status: LSR=%02x MSR=%02x\n", ucom->sc_portno, *lsr, *msr); } @@ -781,21 +782,11 @@ umcs7840_intr_callback(struct usb_xfer * case MCS7840_UART_ISR_RXERR: case MCS7840_UART_ISR_RXHASDATA: case MCS7840_UART_ISR_RXTIMEOUT: - /* Read new LSR */ - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &sc->sc_ports[pn].sc_lsr)) - break; /* Inner switch */ + case MCS7840_UART_ISR_MSCHANGE: ucom_status_change(&sc->sc_ucom[subunit]); - /* Inner switch */ break; - case MCS7840_UART_ISR_TXEMPTY: + default: /* Do nothing */ - break; /* Inner switch */ - case MCS7840_UART_ISR_MSCHANGE: - /* Read new MSR */ - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &sc->sc_ports[pn].sc_msr)) - break; /* Inner switch */ - DPRINTF("Port %d: new MSR %02x\n", pn, sc->sc_ports[pn].sc_msr); - ucom_status_change(&sc->sc_ucom[subunit]); break; } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:35:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EDD99E2; Fri, 24 Jan 2014 07:35:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F1A81E4F; Fri, 24 Jan 2014 07:35:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7ZSJx007008; Fri, 24 Jan 2014 07:35:28 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7ZSmu007007; Fri, 24 Jan 2014 07:35:28 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240735.s0O7ZSmu007007@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07: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 Subject: svn commit: r261101 - stable/8/sys/dev/usb/serial X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:35:28 -0000 Author: hselasky Date: Fri Jan 24 07:35:27 2014 New Revision: 261101 URL: http://svnweb.freebsd.org/changeset/base/261101 Log: MFC r260559: Don't do synchronous USB requests inside USB transfer callbacks. It is technically OK, but not recommended. Modified: stable/8/sys/dev/usb/serial/umcs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/umcs.c ============================================================================== --- stable/8/sys/dev/usb/serial/umcs.c Fri Jan 24 07:33:54 2014 (r261100) +++ stable/8/sys/dev/usb/serial/umcs.c Fri Jan 24 07:35:27 2014 (r261101) @@ -121,8 +121,6 @@ struct umcs7840_softc_oneport { uint8_t sc_lcr; /* local line control register */ uint8_t sc_mcr; /* local modem control register */ - uint8_t sc_lsr; /* local line status register */ - uint8_t sc_msr; /* local modem status register */ }; struct umcs7840_softc { @@ -511,12 +509,7 @@ umcs7840_cfg_open(struct ucom_softc *uco if (umcs7840_set_reg_sync(sc, umcs7840_port_registers[pn].reg_control, data)) return; - /* Read LSR & MSR */ - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &sc->sc_ports[pn].sc_lsr)) - return; - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &sc->sc_ports[pn].sc_msr)) - return; - DPRINTF("Port %d has been opened, LSR=%02x MSR=%02x\n", pn, sc->sc_ports[pn].sc_lsr, sc->sc_ports[pn].sc_msr); + DPRINTF("Port %d has been opened\n", pn); } static void @@ -724,9 +717,17 @@ static void umcs7840_cfg_get_status(struct ucom_softc *ucom, uint8_t *lsr, uint8_t *msr) { struct umcs7840_softc *sc = ucom->sc_parent; + uint8_t pn = ucom->sc_portno; + uint8_t hw_lsr = 0; /* local line status register */ + uint8_t hw_msr = 0; /* local modem status register */ + + /* Read LSR & MSR */ + umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &hw_lsr); + umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &hw_msr); + + *lsr = hw_lsr; + *msr = hw_msr; - *lsr = sc->sc_ports[ucom->sc_portno].sc_lsr; - *msr = sc->sc_ports[ucom->sc_portno].sc_msr; DPRINTF("Port %d status: LSR=%02x MSR=%02x\n", ucom->sc_portno, *lsr, *msr); } @@ -757,21 +758,11 @@ umcs7840_intr_callback(struct usb_xfer * case MCS7840_UART_ISR_RXERR: case MCS7840_UART_ISR_RXHASDATA: case MCS7840_UART_ISR_RXTIMEOUT: - /* Read new LSR */ - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &sc->sc_ports[pn].sc_lsr)) - break; /* Inner switch */ + case MCS7840_UART_ISR_MSCHANGE: ucom_status_change(&sc->sc_ucom[subunit]); - /* Inner switch */ break; - case MCS7840_UART_ISR_TXEMPTY: + default: /* Do nothing */ - break; /* Inner switch */ - case MCS7840_UART_ISR_MSCHANGE: - /* Read new MSR */ - if (umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &sc->sc_ports[pn].sc_msr)) - break; /* Inner switch */ - DPRINTF("Port %d: new MSR %02x\n", pn, sc->sc_ports[pn].sc_msr); - ucom_status_change(&sc->sc_ucom[subunit]); break; } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:41:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00C87C9B; Fri, 24 Jan 2014 07:40:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C669D1E85; Fri, 24 Jan 2014 07:40:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7ex2w007931; Fri, 24 Jan 2014 07:40:59 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7exuM007930; Fri, 24 Jan 2014 07:40:59 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240740.s0O7exuM007930@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r261102 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:41:00 -0000 Author: hselasky Date: Fri Jan 24 07:40:58 2014 New Revision: 261102 URL: http://svnweb.freebsd.org/changeset/base/261102 Log: MFC r260563: Make sure reserved fields of the EHCI DMA descriptors are not dirty after previous transfers. Modified: stable/8/sys/dev/usb/controller/ehci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Fri Jan 24 07:35:27 2014 (r261101) +++ stable/8/sys/dev/usb/controller/ehci.c Fri Jan 24 07:40:58 2014 (r261102) @@ -1647,12 +1647,17 @@ restart: } td->len = 0; + /* properly reset reserved fields */ td->qtd_buffer[0] = 0; - td->qtd_buffer_hi[0] = 0; - td->qtd_buffer[1] = 0; + td->qtd_buffer[2] = 0; + td->qtd_buffer[3] = 0; + td->qtd_buffer[4] = 0; + td->qtd_buffer_hi[0] = 0; td->qtd_buffer_hi[1] = 0; - + td->qtd_buffer_hi[2] = 0; + td->qtd_buffer_hi[3] = 0; + td->qtd_buffer_hi[4] = 0; } else { uint8_t x; @@ -1707,6 +1712,12 @@ restart: htohc32(temp->sc, buf_res.physaddr & (~0xFFF)); td->qtd_buffer_hi[x] = 0; + + /* properly reset reserved fields */ + while (++x < EHCI_QTD_NBUFFERS) { + td->qtd_buffer[x] = 0; + td->qtd_buffer_hi[x] = 0; + } } if (td_next) { @@ -1994,6 +2005,18 @@ ehci_setup_standard_chain(struct usb_xfe qh->qh_qtd.qtd_altnext = htohc32(temp.sc, EHCI_LINK_TERMINATE); + /* properly reset reserved fields */ + qh->qh_qtd.qtd_buffer[0] = 0; + qh->qh_qtd.qtd_buffer[1] = 0; + qh->qh_qtd.qtd_buffer[2] = 0; + qh->qh_qtd.qtd_buffer[3] = 0; + qh->qh_qtd.qtd_buffer[4] = 0; + qh->qh_qtd.qtd_buffer_hi[0] = 0; + qh->qh_qtd.qtd_buffer_hi[1] = 0; + qh->qh_qtd.qtd_buffer_hi[2] = 0; + qh->qh_qtd.qtd_buffer_hi[3] = 0; + qh->qh_qtd.qtd_buffer_hi[4] = 0; + usb_pc_cpu_flush(qh->page_cache); if (xfer->xroot->udev->flags.self_suspended == 0) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:42:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5B37DD5; Fri, 24 Jan 2014 07:42:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 972CE1EE4; Fri, 24 Jan 2014 07:42:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7gQeb010389; Fri, 24 Jan 2014 07:42:26 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7gQrT010388; Fri, 24 Jan 2014 07:42:26 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240742.s0O7gQrT010388@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:42:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261103 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:42:26 -0000 Author: hselasky Date: Fri Jan 24 07:42:26 2014 New Revision: 261103 URL: http://svnweb.freebsd.org/changeset/base/261103 Log: MFC r260563: Make sure reserved fields of the EHCI DMA descriptors are not dirty after previous transfers. Modified: stable/9/sys/dev/usb/controller/ehci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci.c Fri Jan 24 07:40:58 2014 (r261102) +++ stable/9/sys/dev/usb/controller/ehci.c Fri Jan 24 07:42:26 2014 (r261103) @@ -1651,12 +1651,17 @@ restart: } td->len = 0; + /* properly reset reserved fields */ td->qtd_buffer[0] = 0; - td->qtd_buffer_hi[0] = 0; - td->qtd_buffer[1] = 0; + td->qtd_buffer[2] = 0; + td->qtd_buffer[3] = 0; + td->qtd_buffer[4] = 0; + td->qtd_buffer_hi[0] = 0; td->qtd_buffer_hi[1] = 0; - + td->qtd_buffer_hi[2] = 0; + td->qtd_buffer_hi[3] = 0; + td->qtd_buffer_hi[4] = 0; } else { uint8_t x; @@ -1711,6 +1716,12 @@ restart: htohc32(temp->sc, buf_res.physaddr & (~0xFFF)); td->qtd_buffer_hi[x] = 0; + + /* properly reset reserved fields */ + while (++x < EHCI_QTD_NBUFFERS) { + td->qtd_buffer[x] = 0; + td->qtd_buffer_hi[x] = 0; + } } if (td_next) { @@ -1998,6 +2009,18 @@ ehci_setup_standard_chain(struct usb_xfe qh->qh_qtd.qtd_altnext = htohc32(temp.sc, EHCI_LINK_TERMINATE); + /* properly reset reserved fields */ + qh->qh_qtd.qtd_buffer[0] = 0; + qh->qh_qtd.qtd_buffer[1] = 0; + qh->qh_qtd.qtd_buffer[2] = 0; + qh->qh_qtd.qtd_buffer[3] = 0; + qh->qh_qtd.qtd_buffer[4] = 0; + qh->qh_qtd.qtd_buffer_hi[0] = 0; + qh->qh_qtd.qtd_buffer_hi[1] = 0; + qh->qh_qtd.qtd_buffer_hi[2] = 0; + qh->qh_qtd.qtd_buffer_hi[3] = 0; + qh->qh_qtd.qtd_buffer_hi[4] = 0; + usb_pc_cpu_flush(qh->page_cache); if (xfer->xroot->udev->flags.self_suspended == 0) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:43:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B088F12; Fri, 24 Jan 2014 07:43:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F05AE1EE9; Fri, 24 Jan 2014 07:43:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7hk1U010571; Fri, 24 Jan 2014 07:43:46 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7hkcb010570; Fri, 24 Jan 2014 07:43:46 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240743.s0O7hkcb010570@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:43:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261104 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:43:47 -0000 Author: hselasky Date: Fri Jan 24 07:43:46 2014 New Revision: 261104 URL: http://svnweb.freebsd.org/changeset/base/261104 Log: MFC r260563: Make sure reserved fields of the EHCI DMA descriptors are not dirty after previous transfers. Modified: stable/10/sys/dev/usb/controller/ehci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci.c Fri Jan 24 07:42:26 2014 (r261103) +++ stable/10/sys/dev/usb/controller/ehci.c Fri Jan 24 07:43:46 2014 (r261104) @@ -1654,12 +1654,17 @@ restart: } td->len = 0; + /* properly reset reserved fields */ td->qtd_buffer[0] = 0; - td->qtd_buffer_hi[0] = 0; - td->qtd_buffer[1] = 0; + td->qtd_buffer[2] = 0; + td->qtd_buffer[3] = 0; + td->qtd_buffer[4] = 0; + td->qtd_buffer_hi[0] = 0; td->qtd_buffer_hi[1] = 0; - + td->qtd_buffer_hi[2] = 0; + td->qtd_buffer_hi[3] = 0; + td->qtd_buffer_hi[4] = 0; } else { uint8_t x; @@ -1714,6 +1719,12 @@ restart: htohc32(temp->sc, buf_res.physaddr & (~0xFFF)); td->qtd_buffer_hi[x] = 0; + + /* properly reset reserved fields */ + while (++x < EHCI_QTD_NBUFFERS) { + td->qtd_buffer[x] = 0; + td->qtd_buffer_hi[x] = 0; + } } if (td_next) { @@ -2001,6 +2012,18 @@ ehci_setup_standard_chain(struct usb_xfe qh->qh_qtd.qtd_altnext = htohc32(temp.sc, EHCI_LINK_TERMINATE); + /* properly reset reserved fields */ + qh->qh_qtd.qtd_buffer[0] = 0; + qh->qh_qtd.qtd_buffer[1] = 0; + qh->qh_qtd.qtd_buffer[2] = 0; + qh->qh_qtd.qtd_buffer[3] = 0; + qh->qh_qtd.qtd_buffer[4] = 0; + qh->qh_qtd.qtd_buffer_hi[0] = 0; + qh->qh_qtd.qtd_buffer_hi[1] = 0; + qh->qh_qtd.qtd_buffer_hi[2] = 0; + qh->qh_qtd.qtd_buffer_hi[3] = 0; + qh->qh_qtd.qtd_buffer_hi[4] = 0; + usb_pc_cpu_flush(qh->page_cache); if (xfer->xroot->udev->flags.self_suspended == 0) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:48:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FBDF189; Fri, 24 Jan 2014 07:48:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE3E81F32; Fri, 24 Jan 2014 07:48:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7mrNJ011210; Fri, 24 Jan 2014 07:48:53 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7mq5D011199; Fri, 24 Jan 2014 07:48:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240748.s0O7mq5D011199@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261105 - in stable/10/sys/dev/usb: . controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:48:54 -0000 Author: hselasky Date: Fri Jan 24 07:48:52 2014 New Revision: 261105 URL: http://svnweb.freebsd.org/changeset/base/261105 Log: MFC r260588 and r260589: - Separate I/O errors from reception of STALL PID. - Implement better error recovery for Transaction Translators, TTs, found in High Speed USB HUBs which translate from High Speed USB into FULL or LOW speed USB. In some rare cases SPLIT transactions might get lost, which might leave the TT in an unknown state. Whenever we detect such an error try to issue either a clear TT buffer request, or if that is not possible reset the whole TT. Modified: stable/10/sys/dev/usb/controller/ehci.c stable/10/sys/dev/usb/controller/uhci.c stable/10/sys/dev/usb/usb_device.c stable/10/sys/dev/usb/usb_device.h stable/10/sys/dev/usb/usb_hub.c stable/10/sys/dev/usb/usb_hub.h stable/10/sys/dev/usb/usb_request.c stable/10/sys/dev/usb/usb_transfer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci.c Fri Jan 24 07:43:46 2014 (r261104) +++ stable/10/sys/dev/usb/controller/ehci.c Fri Jan 24 07:48:52 2014 (r261105) @@ -1198,9 +1198,16 @@ ehci_non_isoc_done_sub(struct usb_xfer * (status & EHCI_QTD_PINGSTATE) ? "[PING]" : ""); } #endif - - return ((status & EHCI_QTD_HALTED) ? - USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION); + if (status & EHCI_QTD_HALTED) { + if ((xfer->xroot->udev->parent_hs_hub != NULL) || + (xfer->xroot->udev->address != 0)) { + /* try to separate I/O errors from STALL */ + if (EHCI_QTD_GET_CERR(status) == 0) + return (USB_ERR_IOERROR); + } + return (USB_ERR_STALLED); + } + return (USB_ERR_NORMAL_COMPLETION); } static void Modified: stable/10/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/uhci.c Fri Jan 24 07:43:46 2014 (r261104) +++ stable/10/sys/dev/usb/controller/uhci.c Fri Jan 24 07:48:52 2014 (r261105) @@ -1179,8 +1179,13 @@ uhci_non_isoc_done_sub(struct usb_xfer * (status & UHCI_TD_SPD) ? "[SPD]" : ""); } #endif - return (status & UHCI_TD_STALLED) ? - USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION; + if (status & UHCI_TD_STALLED) { + /* try to separate I/O errors from STALL */ + if (UHCI_TD_GET_ERRCNT(status) == 0) + return (USB_ERR_IOERROR); + return (USB_ERR_STALLED); + } + return (USB_ERR_NORMAL_COMPLETION); } static void Modified: stable/10/sys/dev/usb/usb_device.c ============================================================================== --- stable/10/sys/dev/usb/usb_device.c Fri Jan 24 07:43:46 2014 (r261104) +++ stable/10/sys/dev/usb/usb_device.c Fri Jan 24 07:48:52 2014 (r261105) @@ -98,7 +98,7 @@ static void usb_init_attach_arg(struct u struct usb_attach_arg *); static void usb_suspend_resume_sub(struct usb_device *, device_t, uint8_t); -static void usbd_clear_stall_proc(struct usb_proc_msg *_pm); +static usb_proc_callback_t usbd_clear_stall_proc; static usb_error_t usb_config_parse(struct usb_device *, uint8_t, uint8_t); static void usbd_set_device_strings(struct usb_device *); #if USB_HAVE_DEVCTL @@ -1474,7 +1474,7 @@ usb_suspend_resume(struct usb_device *ud static void usbd_clear_stall_proc(struct usb_proc_msg *_pm) { - struct usb_clear_stall_msg *pm = (void *)_pm; + struct usb_udev_msg *pm = (void *)_pm; struct usb_device *udev = pm->udev; /* Change lock */ Modified: stable/10/sys/dev/usb/usb_device.h ============================================================================== --- stable/10/sys/dev/usb/usb_device.h Fri Jan 24 07:43:46 2014 (r261104) +++ stable/10/sys/dev/usb/usb_device.h Fri Jan 24 07:48:52 2014 (r261105) @@ -53,7 +53,7 @@ struct usb_symlink; /* UGEN */ #define USB_UNCFG_FLAG_NONE 0x00 #define USB_UNCFG_FLAG_FREE_EP0 0x02 /* endpoint zero is freed */ -struct usb_clear_stall_msg { +struct usb_udev_msg { struct usb_proc_msg hdr; struct usb_device *udev; }; @@ -179,8 +179,8 @@ union usb_device_scratch { * these structures for every USB device. */ struct usb_device { - struct usb_clear_stall_msg cs_msg[2]; /* generic clear stall - * messages */ + /* generic clear stall message */ + struct usb_udev_msg cs_msg[2]; struct sx enum_sx; struct sx sr_sx; struct mtx device_mtx; @@ -316,4 +316,10 @@ void usbd_sr_lock(struct usb_device *); void usbd_sr_unlock(struct usb_device *); uint8_t usbd_enum_is_locked(struct usb_device *); +#if USB_HAVE_TT_SUPPORT +void uhub_tt_buffer_reset_async_locked(struct usb_device *, struct usb_endpoint *); +#endif + +uint8_t uhub_count_active_host_ports(struct usb_device *, enum usb_dev_speed); + #endif /* _USB_DEVICE_H_ */ Modified: stable/10/sys/dev/usb/usb_hub.c ============================================================================== --- stable/10/sys/dev/usb/usb_hub.c Fri Jan 24 07:43:46 2014 (r261104) +++ stable/10/sys/dev/usb/usb_hub.c Fri Jan 24 07:48:52 2014 (r261105) @@ -74,7 +74,13 @@ #endif /* USB_GLOBAL_INCLUDE_FILE */ #define UHUB_INTR_INTERVAL 250 /* ms */ -#define UHUB_N_TRANSFER 1 +enum { + UHUB_INTR_TRANSFER, +#if USB_HAVE_TT_SUPPORT + UHUB_RESET_TT_TRANSFER, +#endif + UHUB_N_TRANSFER, +}; #ifdef USB_DEBUG static int uhub_debug = 0; @@ -129,6 +135,9 @@ static bus_child_location_str_t uhub_chi static bus_child_pnpinfo_str_t uhub_child_pnpinfo_string; static usb_callback_t uhub_intr_callback; +#if USB_HAVE_TT_SUPPORT +static usb_callback_t uhub_reset_tt_callback; +#endif static void usb_dev_resume_peer(struct usb_device *udev); static void usb_dev_suspend_peer(struct usb_device *udev); @@ -136,7 +145,7 @@ static uint8_t usb_peer_should_wakeup(st static const struct usb_config uhub_config[UHUB_N_TRANSFER] = { - [0] = { + [UHUB_INTR_TRANSFER] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_ANY, @@ -146,6 +155,17 @@ static const struct usb_config uhub_conf .callback = &uhub_intr_callback, .interval = UHUB_INTR_INTERVAL, }, +#if USB_HAVE_TT_SUPPORT + [UHUB_RESET_TT_TRANSFER] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = UE_DIR_ANY, + .bufsize = sizeof(struct usb_device_request), + .callback = &uhub_reset_tt_callback, + .timeout = 1000, /* 1 second */ + .usb_mode = USB_MODE_HOST, + }, +#endif }; /* @@ -215,6 +235,199 @@ uhub_intr_callback(struct usb_xfer *xfer } /*------------------------------------------------------------------------* + * uhub_reset_tt_proc + * + * This function starts the TT reset USB request + *------------------------------------------------------------------------*/ +#if USB_HAVE_TT_SUPPORT +static void +uhub_reset_tt_proc(struct usb_proc_msg *_pm) +{ + struct usb_udev_msg *pm = (void *)_pm; + struct usb_device *udev = pm->udev; + struct usb_hub *hub; + struct uhub_softc *sc; + + hub = udev->hub; + if (hub == NULL) + return; + sc = hub->hubsoftc; + if (sc == NULL) + return; + + /* Change lock */ + USB_BUS_UNLOCK(udev->bus); + mtx_lock(&sc->sc_mtx); + /* Start transfer */ + usbd_transfer_start(sc->sc_xfer[UHUB_RESET_TT_TRANSFER]); + /* Change lock */ + mtx_unlock(&sc->sc_mtx); + USB_BUS_LOCK(udev->bus); +} +#endif + +/*------------------------------------------------------------------------* + * uhub_tt_buffer_reset_async_locked + * + * This function queues a TT reset for the given USB device and endpoint. + *------------------------------------------------------------------------*/ +#if USB_HAVE_TT_SUPPORT +void +uhub_tt_buffer_reset_async_locked(struct usb_device *child, struct usb_endpoint *ep) +{ + struct usb_device_request req; + struct usb_device *udev; + struct usb_hub *hub; + struct usb_port *up; + uint16_t wValue; + uint8_t port; + + if (child == NULL || ep == NULL) + return; + + udev = child->parent_hs_hub; + port = child->hs_port_no; + + if (udev == NULL) + return; + + hub = udev->hub; + if ((hub == NULL) || + (udev->speed != USB_SPEED_HIGH) || + (child->speed != USB_SPEED_LOW && + child->speed != USB_SPEED_FULL) || + (child->flags.usb_mode != USB_MODE_HOST) || + (port == 0) || (ep->edesc == NULL)) { + /* not applicable */ + return; + } + + USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); + + up = hub->ports + port - 1; + + if (udev->ddesc.bDeviceClass == UDCLASS_HUB && + udev->ddesc.bDeviceProtocol == UDPROTO_HSHUBSTT) + port = 1; + + /* if we already received a clear buffer request, reset the whole TT */ + if (up->req_reset_tt.bRequest != 0) { + req.bmRequestType = UT_WRITE_CLASS_OTHER; + req.bRequest = UR_RESET_TT; + USETW(req.wValue, 0); + req.wIndex[0] = port; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + } else { + wValue = (ep->edesc->bEndpointAddress & 0xF) | + ((child->address & 0x7F) << 4) | + ((ep->edesc->bEndpointAddress & 0x80) << 8) | + ((ep->edesc->bmAttributes & 3) << 12); + + req.bmRequestType = UT_WRITE_CLASS_OTHER; + req.bRequest = UR_CLEAR_TT_BUFFER; + USETW(req.wValue, wValue); + req.wIndex[0] = port; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + } + up->req_reset_tt = req; + /* get reset transfer started */ + usb_proc_msignal(USB_BUS_NON_GIANT_PROC(udev->bus), + &hub->tt_msg[0], &hub->tt_msg[1]); +} +#endif + +#if USB_HAVE_TT_SUPPORT +static void +uhub_reset_tt_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct uhub_softc *sc; + struct usb_device *udev; + struct usb_port *up; + uint8_t x; + + DPRINTF("TT buffer reset\n"); + + sc = usbd_xfer_softc(xfer); + udev = sc->sc_udev; + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + case USB_ST_SETUP: +tr_setup: + USB_BUS_LOCK(udev->bus); + /* find first port which needs a TT reset */ + for (x = 0; x != udev->hub->nports; x++) { + up = udev->hub->ports + x; + + if (up->req_reset_tt.bRequest == 0) + continue; + + /* copy in the transfer */ + usbd_copy_in(xfer->frbuffers, 0, &up->req_reset_tt, + sizeof(up->req_reset_tt)); + /* reset buffer */ + memset(&up->req_reset_tt, 0, sizeof(up->req_reset_tt)); + + /* set length */ + usbd_xfer_set_frame_len(xfer, 0, sizeof(up->req_reset_tt)); + xfer->nframes = 1; + USB_BUS_UNLOCK(udev->bus); + + usbd_transfer_submit(xfer); + return; + } + USB_BUS_UNLOCK(udev->bus); + break; + + default: + if (error == USB_ERR_CANCELLED) + break; + + DPRINTF("TT buffer reset failed (%s)\n", usbd_errstr(error)); + goto tr_setup; + } +} +#endif + +/*------------------------------------------------------------------------* + * uhub_count_active_host_ports + * + * This function counts the number of active ports at the given speed. + *------------------------------------------------------------------------*/ +uint8_t +uhub_count_active_host_ports(struct usb_device *udev, enum usb_dev_speed speed) +{ + struct uhub_softc *sc; + struct usb_device *child; + struct usb_hub *hub; + struct usb_port *up; + uint8_t retval = 0; + uint8_t x; + + if (udev == NULL) + goto done; + hub = udev->hub; + if (hub == NULL) + goto done; + sc = hub->hubsoftc; + if (sc == NULL) + goto done; + + for (x = 0; x != hub->nports; x++) { + up = hub->ports + x; + child = usb_bus_port_get_device(udev->bus, up); + if (child != NULL && + child->flags.usb_mode == USB_MODE_HOST && + child->speed == speed) + retval++; + } +done: + return (retval); +} + +/*------------------------------------------------------------------------* * uhub_explore_sub - subroutine * * Return values: @@ -1114,7 +1327,12 @@ uhub_attach(device_t dev) hub->explore = &uhub_explore; hub->nports = nports; hub->hubudev = udev; - +#if USB_HAVE_TT_SUPPORT + hub->tt_msg[0].hdr.pm_callback = &uhub_reset_tt_proc; + hub->tt_msg[0].udev = udev; + hub->tt_msg[1].hdr.pm_callback = &uhub_reset_tt_proc; + hub->tt_msg[1].udev = udev; +#endif /* if self powered hub, give ports maximum current */ if (udev->flags.self_powered) { hub->portpower = USB_MAX_POWER; @@ -1216,11 +1434,9 @@ uhub_attach(device_t dev) /* Start the interrupt endpoint, if any */ - if (sc->sc_xfer[0] != NULL) { - mtx_lock(&sc->sc_mtx); - usbd_transfer_start(sc->sc_xfer[0]); - mtx_unlock(&sc->sc_mtx); - } + mtx_lock(&sc->sc_mtx); + usbd_transfer_start(sc->sc_xfer[UHUB_INTR_TRANSFER]); + mtx_unlock(&sc->sc_mtx); /* Enable automatic power save on all USB HUBs */ @@ -1250,6 +1466,7 @@ uhub_detach(device_t dev) { struct uhub_softc *sc = device_get_softc(dev); struct usb_hub *hub = sc->sc_udev->hub; + struct usb_bus *bus = sc->sc_udev->bus; struct usb_device *child; uint8_t x; @@ -1262,7 +1479,7 @@ uhub_detach(device_t dev) /* Detach all ports */ for (x = 0; x != hub->nports; x++) { - child = usb_bus_port_get_device(sc->sc_udev->bus, hub->ports + x); + child = usb_bus_port_get_device(bus, hub->ports + x); if (child == NULL) { continue; @@ -1274,6 +1491,14 @@ uhub_detach(device_t dev) usb_free_device(child, 0); } +#if USB_HAVE_TT_SUPPORT + /* Make sure our TT messages are not queued anywhere */ + USB_BUS_LOCK(bus); + usb_proc_mwait(USB_BUS_NON_GIANT_PROC(bus), + &hub->tt_msg[0], &hub->tt_msg[1]); + USB_BUS_UNLOCK(bus); +#endif + #if (USB_HAVE_FIXED_PORT == 0) free(hub, M_USBDEV); #endif Modified: stable/10/sys/dev/usb/usb_hub.h ============================================================================== --- stable/10/sys/dev/usb/usb_hub.h Fri Jan 24 07:43:46 2014 (r261104) +++ stable/10/sys/dev/usb/usb_hub.h Fri Jan 24 07:48:52 2014 (r261105) @@ -35,6 +35,9 @@ struct usb_port { #define USB_RESTART_MAX 5 uint8_t device_index; /* zero means not valid */ enum usb_hc_mode usb_mode; /* host or device mode */ +#if USB_HAVE_TT_SUPPORT + struct usb_device_request req_reset_tt __aligned(4); +#endif }; /* @@ -44,6 +47,9 @@ struct usb_hub { struct usb_device *hubudev; /* the HUB device */ usb_error_t (*explore) (struct usb_device *hub); void *hubsoftc; +#if USB_HAVE_TT_SUPPORT + struct usb_udev_msg tt_msg[2]; +#endif usb_size_t uframe_usage[USB_HS_MICRO_FRAMES_MAX]; uint16_t portpower; /* mA per USB port */ uint8_t isoc_last_time; Modified: stable/10/sys/dev/usb/usb_request.c ============================================================================== --- stable/10/sys/dev/usb/usb_request.c Fri Jan 24 07:43:46 2014 (r261104) +++ stable/10/sys/dev/usb/usb_request.c Fri Jan 24 07:48:52 2014 (r261105) @@ -721,6 +721,17 @@ done: if ((mtx != NULL) && (mtx != &Giant)) mtx_lock(mtx); + switch (err) { + case USB_ERR_NORMAL_COMPLETION: + case USB_ERR_SHORT_XFER: + case USB_ERR_STALLED: + case USB_ERR_CANCELLED: + break; + default: + DPRINTF("I/O error - waiting a bit for TT cleanup\n"); + usb_pause_mtx(mtx, hz / 16); + break; + } return ((usb_error_t)err); } @@ -2010,6 +2021,7 @@ usbd_req_re_enumerate(struct usb_device return (USB_ERR_INVAL); } retry: +#if USB_HAVE_TT_SUPPORT /* * Try to reset the High Speed parent HUB of a LOW- or FULL- * speed device, if any. @@ -2017,15 +2029,24 @@ retry: if (udev->parent_hs_hub != NULL && udev->speed != USB_SPEED_HIGH) { DPRINTF("Trying to reset parent High Speed TT.\n"); - err = usbd_req_reset_tt(udev->parent_hs_hub, NULL, - udev->hs_port_no); + if (udev->parent_hs_hub == parent_hub && + (uhub_count_active_host_ports(parent_hub, USB_SPEED_LOW) + + uhub_count_active_host_ports(parent_hub, USB_SPEED_FULL)) == 1) { + /* we can reset the whole TT */ + err = usbd_req_reset_tt(parent_hub, NULL, + udev->hs_port_no); + } else { + /* only reset a particular device and endpoint */ + err = usbd_req_clear_tt_buffer(udev->parent_hs_hub, NULL, + udev->hs_port_no, old_addr, UE_CONTROL, 0); + } if (err) { DPRINTF("Resetting parent High " "Speed TT failed (%s).\n", usbd_errstr(err)); } } - +#endif /* Try to warm reset first */ if (parent_hub->speed == USB_SPEED_SUPER) usbd_req_warm_reset_port(parent_hub, mtx, udev->port_no); Modified: stable/10/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/10/sys/dev/usb/usb_transfer.c Fri Jan 24 07:43:46 2014 (r261104) +++ stable/10/sys/dev/usb/usb_transfer.c Fri Jan 24 07:48:52 2014 (r261105) @@ -2432,7 +2432,9 @@ usbd_transfer_enqueue(struct usb_xfer_qu void usbd_transfer_done(struct usb_xfer *xfer, usb_error_t error) { - USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED); + struct usb_xfer_root *info = xfer->xroot; + + USB_BUS_LOCK_ASSERT(info->bus, MA_OWNED); DPRINTF("err=%s\n", usbd_errstr(error)); @@ -2446,10 +2448,10 @@ usbd_transfer_done(struct usb_xfer *xfer xfer->flags_int.control_act = 0; return; } - /* only set transfer error if not already set */ - if (!xfer->error) { + /* only set transfer error, if not already set */ + if (xfer->error == USB_ERR_NORMAL_COMPLETION) xfer->error = error; - } + /* stop any callouts */ usb_callout_stop(&xfer->timeout_handle); @@ -2461,14 +2463,14 @@ usbd_transfer_done(struct usb_xfer *xfer usbd_transfer_dequeue(xfer); #if USB_HAVE_BUSDMA - if (mtx_owned(xfer->xroot->xfer_mtx)) { + if (mtx_owned(info->xfer_mtx)) { struct usb_xfer_queue *pq; /* * If the private USB lock is not locked, then we assume * that the BUS-DMA load stage has been passed: */ - pq = &xfer->xroot->dma_q; + pq = &info->dma_q; if (pq->curr == xfer) { /* start the next BUS-DMA load, if any */ @@ -2478,10 +2480,10 @@ usbd_transfer_done(struct usb_xfer *xfer #endif /* keep some statistics */ if (xfer->error) { - xfer->xroot->bus->stats_err.uds_requests + info->bus->stats_err.uds_requests [xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE]++; } else { - xfer->xroot->bus->stats_ok.uds_requests + info->bus->stats_ok.uds_requests [xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE]++; } @@ -2847,6 +2849,22 @@ usbd_callback_wrapper_sub(struct usb_xfe /* end of control transfer, if any */ xfer->flags_int.control_act = 0; +#if USB_HAVE_TT_SUPPORT + switch (xfer->error) { + case USB_ERR_NORMAL_COMPLETION: + case USB_ERR_SHORT_XFER: + case USB_ERR_STALLED: + case USB_ERR_CANCELLED: + /* nothing to do */ + break; + default: + /* try to reset the TT, if any */ + USB_BUS_LOCK(bus); + uhub_tt_buffer_reset_async_locked(xfer->xroot->udev, xfer->endpoint); + USB_BUS_UNLOCK(bus); + break; + } +#endif /* check if we should block the execution queue */ if ((xfer->error != USB_ERR_CANCELLED) && (xfer->flags.pipe_bof)) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 07:57:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAA913B9; Fri, 24 Jan 2014 07:57:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4DDD1FB8; Fri, 24 Jan 2014 07:57:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O7vNPs014788; Fri, 24 Jan 2014 07:57:23 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O7vMua014771; Fri, 24 Jan 2014 07:57:22 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240757.s0O7vMua014771@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 07:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261106 - in stable/9/sys/dev/usb: . controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:57:23 -0000 Author: hselasky Date: Fri Jan 24 07:57:21 2014 New Revision: 261106 URL: http://svnweb.freebsd.org/changeset/base/261106 Log: MFC r260588 and r260589: - Separate I/O errors from reception of STALL PID. - Implement better error recovery for Transaction Translators, TTs, found in High Speed USB HUBs which translate from High Speed USB into FULL or LOW speed USB. In some rare cases SPLIT transactions might get lost, which might leave the TT in an unknown state. Whenever we detect such an error try to issue either a clear TT buffer request, or if that is not possible reset the whole TT. Modified: stable/9/sys/dev/usb/controller/ehci.c stable/9/sys/dev/usb/controller/uhci.c stable/9/sys/dev/usb/usb_device.c stable/9/sys/dev/usb/usb_device.h stable/9/sys/dev/usb/usb_hub.c stable/9/sys/dev/usb/usb_hub.h stable/9/sys/dev/usb/usb_request.c stable/9/sys/dev/usb/usb_transfer.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci.c Fri Jan 24 07:48:52 2014 (r261105) +++ stable/9/sys/dev/usb/controller/ehci.c Fri Jan 24 07:57:21 2014 (r261106) @@ -1195,9 +1195,16 @@ ehci_non_isoc_done_sub(struct usb_xfer * (status & EHCI_QTD_PINGSTATE) ? "[PING]" : ""); } #endif - - return ((status & EHCI_QTD_HALTED) ? - USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION); + if (status & EHCI_QTD_HALTED) { + if ((xfer->xroot->udev->parent_hs_hub != NULL) || + (xfer->xroot->udev->address != 0)) { + /* try to separate I/O errors from STALL */ + if (EHCI_QTD_GET_CERR(status) == 0) + return (USB_ERR_IOERROR); + } + return (USB_ERR_STALLED); + } + return (USB_ERR_NORMAL_COMPLETION); } static void Modified: stable/9/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/uhci.c Fri Jan 24 07:48:52 2014 (r261105) +++ stable/9/sys/dev/usb/controller/uhci.c Fri Jan 24 07:57:21 2014 (r261106) @@ -1176,8 +1176,13 @@ uhci_non_isoc_done_sub(struct usb_xfer * (status & UHCI_TD_SPD) ? "[SPD]" : ""); } #endif - return (status & UHCI_TD_STALLED) ? - USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION; + if (status & UHCI_TD_STALLED) { + /* try to separate I/O errors from STALL */ + if (UHCI_TD_GET_ERRCNT(status) == 0) + return (USB_ERR_IOERROR); + return (USB_ERR_STALLED); + } + return (USB_ERR_NORMAL_COMPLETION); } static void Modified: stable/9/sys/dev/usb/usb_device.c ============================================================================== --- stable/9/sys/dev/usb/usb_device.c Fri Jan 24 07:48:52 2014 (r261105) +++ stable/9/sys/dev/usb/usb_device.c Fri Jan 24 07:57:21 2014 (r261106) @@ -94,7 +94,7 @@ static void usb_init_attach_arg(struct u struct usb_attach_arg *); static void usb_suspend_resume_sub(struct usb_device *, device_t, uint8_t); -static void usbd_clear_stall_proc(struct usb_proc_msg *_pm); +static usb_proc_callback_t usbd_clear_stall_proc; static usb_error_t usb_config_parse(struct usb_device *, uint8_t, uint8_t); static void usbd_set_device_strings(struct usb_device *); #if USB_HAVE_DEVCTL @@ -1444,7 +1444,7 @@ usb_suspend_resume(struct usb_device *ud static void usbd_clear_stall_proc(struct usb_proc_msg *_pm) { - struct usb_clear_stall_msg *pm = (void *)_pm; + struct usb_udev_msg *pm = (void *)_pm; struct usb_device *udev = pm->udev; /* Change lock */ Modified: stable/9/sys/dev/usb/usb_device.h ============================================================================== --- stable/9/sys/dev/usb/usb_device.h Fri Jan 24 07:48:52 2014 (r261105) +++ stable/9/sys/dev/usb/usb_device.h Fri Jan 24 07:57:21 2014 (r261106) @@ -53,7 +53,7 @@ struct usb_symlink; /* UGEN */ #define USB_UNCFG_FLAG_NONE 0x00 #define USB_UNCFG_FLAG_FREE_EP0 0x02 /* endpoint zero is freed */ -struct usb_clear_stall_msg { +struct usb_udev_msg { struct usb_proc_msg hdr; struct usb_device *udev; }; @@ -179,8 +179,8 @@ union usb_device_scratch { * these structures for every USB device. */ struct usb_device { - struct usb_clear_stall_msg cs_msg[2]; /* generic clear stall - * messages */ + /* generic clear stall message */ + struct usb_udev_msg cs_msg[2]; struct sx enum_sx; struct sx sr_sx; struct mtx device_mtx; @@ -304,4 +304,10 @@ void usbd_sr_lock(struct usb_device *); void usbd_sr_unlock(struct usb_device *); uint8_t usbd_enum_is_locked(struct usb_device *); +#if USB_HAVE_TT_SUPPORT +void uhub_tt_buffer_reset_async_locked(struct usb_device *, struct usb_endpoint *); +#endif + +uint8_t uhub_count_active_host_ports(struct usb_device *, enum usb_dev_speed); + #endif /* _USB_DEVICE_H_ */ Modified: stable/9/sys/dev/usb/usb_hub.c ============================================================================== --- stable/9/sys/dev/usb/usb_hub.c Fri Jan 24 07:48:52 2014 (r261105) +++ stable/9/sys/dev/usb/usb_hub.c Fri Jan 24 07:57:21 2014 (r261106) @@ -70,7 +70,13 @@ #include #define UHUB_INTR_INTERVAL 250 /* ms */ -#define UHUB_N_TRANSFER 1 +enum { + UHUB_INTR_TRANSFER, +#if USB_HAVE_TT_SUPPORT + UHUB_RESET_TT_TRANSFER, +#endif + UHUB_N_TRANSFER, +}; #ifdef USB_DEBUG static int uhub_debug = 0; @@ -123,6 +129,9 @@ static bus_child_location_str_t uhub_chi static bus_child_pnpinfo_str_t uhub_child_pnpinfo_string; static usb_callback_t uhub_intr_callback; +#if USB_HAVE_TT_SUPPORT +static usb_callback_t uhub_reset_tt_callback; +#endif static void usb_dev_resume_peer(struct usb_device *udev); static void usb_dev_suspend_peer(struct usb_device *udev); @@ -130,7 +139,7 @@ static uint8_t usb_peer_should_wakeup(st static const struct usb_config uhub_config[UHUB_N_TRANSFER] = { - [0] = { + [UHUB_INTR_TRANSFER] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_ANY, @@ -140,6 +149,17 @@ static const struct usb_config uhub_conf .callback = &uhub_intr_callback, .interval = UHUB_INTR_INTERVAL, }, +#if USB_HAVE_TT_SUPPORT + [UHUB_RESET_TT_TRANSFER] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = UE_DIR_ANY, + .bufsize = sizeof(struct usb_device_request), + .callback = &uhub_reset_tt_callback, + .timeout = 1000, /* 1 second */ + .usb_mode = USB_MODE_HOST, + }, +#endif }; /* @@ -209,6 +229,199 @@ uhub_intr_callback(struct usb_xfer *xfer } /*------------------------------------------------------------------------* + * uhub_reset_tt_proc + * + * This function starts the TT reset USB request + *------------------------------------------------------------------------*/ +#if USB_HAVE_TT_SUPPORT +static void +uhub_reset_tt_proc(struct usb_proc_msg *_pm) +{ + struct usb_udev_msg *pm = (void *)_pm; + struct usb_device *udev = pm->udev; + struct usb_hub *hub; + struct uhub_softc *sc; + + hub = udev->hub; + if (hub == NULL) + return; + sc = hub->hubsoftc; + if (sc == NULL) + return; + + /* Change lock */ + USB_BUS_UNLOCK(udev->bus); + mtx_lock(&sc->sc_mtx); + /* Start transfer */ + usbd_transfer_start(sc->sc_xfer[UHUB_RESET_TT_TRANSFER]); + /* Change lock */ + mtx_unlock(&sc->sc_mtx); + USB_BUS_LOCK(udev->bus); +} +#endif + +/*------------------------------------------------------------------------* + * uhub_tt_buffer_reset_async_locked + * + * This function queues a TT reset for the given USB device and endpoint. + *------------------------------------------------------------------------*/ +#if USB_HAVE_TT_SUPPORT +void +uhub_tt_buffer_reset_async_locked(struct usb_device *child, struct usb_endpoint *ep) +{ + struct usb_device_request req; + struct usb_device *udev; + struct usb_hub *hub; + struct usb_port *up; + uint16_t wValue; + uint8_t port; + + if (child == NULL || ep == NULL) + return; + + udev = child->parent_hs_hub; + port = child->hs_port_no; + + if (udev == NULL) + return; + + hub = udev->hub; + if ((hub == NULL) || + (udev->speed != USB_SPEED_HIGH) || + (child->speed != USB_SPEED_LOW && + child->speed != USB_SPEED_FULL) || + (child->flags.usb_mode != USB_MODE_HOST) || + (port == 0) || (ep->edesc == NULL)) { + /* not applicable */ + return; + } + + USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); + + up = hub->ports + port - 1; + + if (udev->ddesc.bDeviceClass == UDCLASS_HUB && + udev->ddesc.bDeviceProtocol == UDPROTO_HSHUBSTT) + port = 1; + + /* if we already received a clear buffer request, reset the whole TT */ + if (up->req_reset_tt.bRequest != 0) { + req.bmRequestType = UT_WRITE_CLASS_OTHER; + req.bRequest = UR_RESET_TT; + USETW(req.wValue, 0); + req.wIndex[0] = port; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + } else { + wValue = (ep->edesc->bEndpointAddress & 0xF) | + ((child->address & 0x7F) << 4) | + ((ep->edesc->bEndpointAddress & 0x80) << 8) | + ((ep->edesc->bmAttributes & 3) << 12); + + req.bmRequestType = UT_WRITE_CLASS_OTHER; + req.bRequest = UR_CLEAR_TT_BUFFER; + USETW(req.wValue, wValue); + req.wIndex[0] = port; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + } + up->req_reset_tt = req; + /* get reset transfer started */ + usb_proc_msignal(&udev->bus->non_giant_callback_proc, + &hub->tt_msg[0], &hub->tt_msg[1]); +} +#endif + +#if USB_HAVE_TT_SUPPORT +static void +uhub_reset_tt_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct uhub_softc *sc; + struct usb_device *udev; + struct usb_port *up; + uint8_t x; + + DPRINTF("TT buffer reset\n"); + + sc = usbd_xfer_softc(xfer); + udev = sc->sc_udev; + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + case USB_ST_SETUP: +tr_setup: + USB_BUS_LOCK(udev->bus); + /* find first port which needs a TT reset */ + for (x = 0; x != udev->hub->nports; x++) { + up = udev->hub->ports + x; + + if (up->req_reset_tt.bRequest == 0) + continue; + + /* copy in the transfer */ + usbd_copy_in(xfer->frbuffers, 0, &up->req_reset_tt, + sizeof(up->req_reset_tt)); + /* reset buffer */ + memset(&up->req_reset_tt, 0, sizeof(up->req_reset_tt)); + + /* set length */ + usbd_xfer_set_frame_len(xfer, 0, sizeof(up->req_reset_tt)); + xfer->nframes = 1; + USB_BUS_UNLOCK(udev->bus); + + usbd_transfer_submit(xfer); + return; + } + USB_BUS_UNLOCK(udev->bus); + break; + + default: + if (error == USB_ERR_CANCELLED) + break; + + DPRINTF("TT buffer reset failed (%s)\n", usbd_errstr(error)); + goto tr_setup; + } +} +#endif + +/*------------------------------------------------------------------------* + * uhub_count_active_host_ports + * + * This function counts the number of active ports at the given speed. + *------------------------------------------------------------------------*/ +uint8_t +uhub_count_active_host_ports(struct usb_device *udev, enum usb_dev_speed speed) +{ + struct uhub_softc *sc; + struct usb_device *child; + struct usb_hub *hub; + struct usb_port *up; + uint8_t retval = 0; + uint8_t x; + + if (udev == NULL) + goto done; + hub = udev->hub; + if (hub == NULL) + goto done; + sc = hub->hubsoftc; + if (sc == NULL) + goto done; + + for (x = 0; x != hub->nports; x++) { + up = hub->ports + x; + child = usb_bus_port_get_device(udev->bus, up); + if (child != NULL && + child->flags.usb_mode == USB_MODE_HOST && + child->speed == speed) + retval++; + } +done: + return (retval); +} + +/*------------------------------------------------------------------------* * uhub_explore_sub - subroutine * * Return values: @@ -1105,7 +1318,12 @@ uhub_attach(device_t dev) hub->explore = &uhub_explore; hub->nports = nports; hub->hubudev = udev; - +#if USB_HAVE_TT_SUPPORT + hub->tt_msg[0].hdr.pm_callback = &uhub_reset_tt_proc; + hub->tt_msg[0].udev = udev; + hub->tt_msg[1].hdr.pm_callback = &uhub_reset_tt_proc; + hub->tt_msg[1].udev = udev; +#endif /* if self powered hub, give ports maximum current */ if (udev->flags.self_powered) { hub->portpower = USB_MAX_POWER; @@ -1207,11 +1425,9 @@ uhub_attach(device_t dev) /* Start the interrupt endpoint, if any */ - if (sc->sc_xfer[0] != NULL) { - mtx_lock(&sc->sc_mtx); - usbd_transfer_start(sc->sc_xfer[0]); - mtx_unlock(&sc->sc_mtx); - } + mtx_lock(&sc->sc_mtx); + usbd_transfer_start(sc->sc_xfer[UHUB_INTR_TRANSFER]); + mtx_unlock(&sc->sc_mtx); /* Enable automatic power save on all USB HUBs */ @@ -1241,6 +1457,7 @@ uhub_detach(device_t dev) { struct uhub_softc *sc = device_get_softc(dev); struct usb_hub *hub = sc->sc_udev->hub; + struct usb_bus *bus = sc->sc_udev->bus; struct usb_device *child; uint8_t x; @@ -1253,7 +1470,7 @@ uhub_detach(device_t dev) /* Detach all ports */ for (x = 0; x != hub->nports; x++) { - child = usb_bus_port_get_device(sc->sc_udev->bus, hub->ports + x); + child = usb_bus_port_get_device(bus, hub->ports + x); if (child == NULL) { continue; @@ -1265,6 +1482,13 @@ uhub_detach(device_t dev) usb_free_device(child, 0); } +#if USB_HAVE_TT_SUPPORT + /* Make sure our TT messages are not queued anywhere */ + USB_BUS_LOCK(bus); + usb_proc_mwait(&bus->non_giant_callback_proc, + &hub->tt_msg[0], &hub->tt_msg[1]); + USB_BUS_UNLOCK(bus); +#endif free(hub, M_USBDEV); sc->sc_udev->hub = NULL; Modified: stable/9/sys/dev/usb/usb_hub.h ============================================================================== --- stable/9/sys/dev/usb/usb_hub.h Fri Jan 24 07:48:52 2014 (r261105) +++ stable/9/sys/dev/usb/usb_hub.h Fri Jan 24 07:57:21 2014 (r261106) @@ -35,6 +35,9 @@ struct usb_port { #define USB_RESTART_MAX 5 uint8_t device_index; /* zero means not valid */ enum usb_hc_mode usb_mode; /* host or device mode */ +#if USB_HAVE_TT_SUPPORT + struct usb_device_request req_reset_tt __aligned(4); +#endif }; /* @@ -44,6 +47,9 @@ struct usb_hub { struct usb_device *hubudev; /* the HUB device */ usb_error_t (*explore) (struct usb_device *hub); void *hubsoftc; +#if USB_HAVE_TT_SUPPORT + struct usb_udev_msg tt_msg[2]; +#endif usb_size_t uframe_usage[USB_HS_MICRO_FRAMES_MAX]; uint16_t portpower; /* mA per USB port */ uint8_t isoc_last_time; Modified: stable/9/sys/dev/usb/usb_request.c ============================================================================== --- stable/9/sys/dev/usb/usb_request.c Fri Jan 24 07:48:52 2014 (r261105) +++ stable/9/sys/dev/usb/usb_request.c Fri Jan 24 07:57:21 2014 (r261106) @@ -714,6 +714,17 @@ done: if ((mtx != NULL) && (mtx != &Giant)) mtx_lock(mtx); + switch (err) { + case USB_ERR_NORMAL_COMPLETION: + case USB_ERR_SHORT_XFER: + case USB_ERR_STALLED: + case USB_ERR_CANCELLED: + break; + default: + DPRINTF("I/O error - waiting a bit for TT cleanup\n"); + usb_pause_mtx(mtx, hz / 16); + break; + } return ((usb_error_t)err); } @@ -1965,6 +1976,7 @@ usbd_req_re_enumerate(struct usb_device return (USB_ERR_INVAL); } retry: +#if USB_HAVE_TT_SUPPORT /* * Try to reset the High Speed parent HUB of a LOW- or FULL- * speed device, if any. @@ -1972,15 +1984,24 @@ retry: if (udev->parent_hs_hub != NULL && udev->speed != USB_SPEED_HIGH) { DPRINTF("Trying to reset parent High Speed TT.\n"); - err = usbd_req_reset_tt(udev->parent_hs_hub, NULL, - udev->hs_port_no); + if (udev->parent_hs_hub == parent_hub && + (uhub_count_active_host_ports(parent_hub, USB_SPEED_LOW) + + uhub_count_active_host_ports(parent_hub, USB_SPEED_FULL)) == 1) { + /* we can reset the whole TT */ + err = usbd_req_reset_tt(parent_hub, NULL, + udev->hs_port_no); + } else { + /* only reset a particular device and endpoint */ + err = usbd_req_clear_tt_buffer(udev->parent_hs_hub, NULL, + udev->hs_port_no, old_addr, UE_CONTROL, 0); + } if (err) { DPRINTF("Resetting parent High " "Speed TT failed (%s).\n", usbd_errstr(err)); } } - +#endif /* Try to warm reset first */ if (parent_hub->speed == USB_SPEED_SUPER) usbd_req_warm_reset_port(parent_hub, mtx, udev->port_no); Modified: stable/9/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/9/sys/dev/usb/usb_transfer.c Fri Jan 24 07:48:52 2014 (r261105) +++ stable/9/sys/dev/usb/usb_transfer.c Fri Jan 24 07:57:21 2014 (r261106) @@ -2366,7 +2366,9 @@ usbd_transfer_enqueue(struct usb_xfer_qu void usbd_transfer_done(struct usb_xfer *xfer, usb_error_t error) { - USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED); + struct usb_xfer_root *info = xfer->xroot; + + USB_BUS_LOCK_ASSERT(info->bus, MA_OWNED); DPRINTF("err=%s\n", usbd_errstr(error)); @@ -2380,10 +2382,10 @@ usbd_transfer_done(struct usb_xfer *xfer xfer->flags_int.control_act = 0; return; } - /* only set transfer error if not already set */ - if (!xfer->error) { + /* only set transfer error, if not already set */ + if (xfer->error == USB_ERR_NORMAL_COMPLETION) xfer->error = error; - } + /* stop any callouts */ usb_callout_stop(&xfer->timeout_handle); @@ -2395,14 +2397,14 @@ usbd_transfer_done(struct usb_xfer *xfer usbd_transfer_dequeue(xfer); #if USB_HAVE_BUSDMA - if (mtx_owned(xfer->xroot->xfer_mtx)) { + if (mtx_owned(info->xfer_mtx)) { struct usb_xfer_queue *pq; /* * If the private USB lock is not locked, then we assume * that the BUS-DMA load stage has been passed: */ - pq = &xfer->xroot->dma_q; + pq = &info->dma_q; if (pq->curr == xfer) { /* start the next BUS-DMA load, if any */ @@ -2412,10 +2414,10 @@ usbd_transfer_done(struct usb_xfer *xfer #endif /* keep some statistics */ if (xfer->error) { - xfer->xroot->bus->stats_err.uds_requests + info->bus->stats_err.uds_requests [xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE]++; } else { - xfer->xroot->bus->stats_ok.uds_requests + info->bus->stats_ok.uds_requests [xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE]++; } @@ -2781,6 +2783,22 @@ usbd_callback_wrapper_sub(struct usb_xfe /* end of control transfer, if any */ xfer->flags_int.control_act = 0; +#if USB_HAVE_TT_SUPPORT + switch (xfer->error) { + case USB_ERR_NORMAL_COMPLETION: + case USB_ERR_SHORT_XFER: + case USB_ERR_STALLED: + case USB_ERR_CANCELLED: + /* nothing to do */ + break; + default: + /* try to reset the TT, if any */ + USB_BUS_LOCK(bus); + uhub_tt_buffer_reset_async_locked(xfer->xroot->udev, xfer->endpoint); + USB_BUS_UNLOCK(bus); + break; + } +#endif /* check if we should block the execution queue */ if ((xfer->error != USB_ERR_CANCELLED) && (xfer->flags.pipe_bof)) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:01:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12F0A613; Fri, 24 Jan 2014 08:01:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F0FD11070; Fri, 24 Jan 2014 08:01:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O81hi1018104; Fri, 24 Jan 2014 08:01:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O81gmj018093; Fri, 24 Jan 2014 08:01:42 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240801.s0O81gmj018093@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r261107 - in stable/8/sys/dev/usb: . controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:01:44 -0000 Author: hselasky Date: Fri Jan 24 08:01:42 2014 New Revision: 261107 URL: http://svnweb.freebsd.org/changeset/base/261107 Log: MFC r260588 and r260589: - Separate I/O errors from reception of STALL PID. - Implement better error recovery for Transaction Translators, TTs, found in High Speed USB HUBs which translate from High Speed USB into FULL or LOW speed USB. In some rare cases SPLIT transactions might get lost, which might leave the TT in an unknown state. Whenever we detect such an error try to issue either a clear TT buffer request, or if that is not possible reset the whole TT. Modified: stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/uhci.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_device.h stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usb_hub.h stable/8/sys/dev/usb/usb_request.c stable/8/sys/dev/usb/usb_transfer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Fri Jan 24 07:57:21 2014 (r261106) +++ stable/8/sys/dev/usb/controller/ehci.c Fri Jan 24 08:01:42 2014 (r261107) @@ -1191,9 +1191,16 @@ ehci_non_isoc_done_sub(struct usb_xfer * (status & EHCI_QTD_PINGSTATE) ? "[PING]" : ""); } #endif - - return ((status & EHCI_QTD_HALTED) ? - USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION); + if (status & EHCI_QTD_HALTED) { + if ((xfer->xroot->udev->parent_hs_hub != NULL) || + (xfer->xroot->udev->address != 0)) { + /* try to separate I/O errors from STALL */ + if (EHCI_QTD_GET_CERR(status) == 0) + return (USB_ERR_IOERROR); + } + return (USB_ERR_STALLED); + } + return (USB_ERR_NORMAL_COMPLETION); } static void Modified: stable/8/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/uhci.c Fri Jan 24 07:57:21 2014 (r261106) +++ stable/8/sys/dev/usb/controller/uhci.c Fri Jan 24 08:01:42 2014 (r261107) @@ -1176,8 +1176,13 @@ uhci_non_isoc_done_sub(struct usb_xfer * (status & UHCI_TD_SPD) ? "[SPD]" : ""); } #endif - return (status & UHCI_TD_STALLED) ? - USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION; + if (status & UHCI_TD_STALLED) { + /* try to separate I/O errors from STALL */ + if (UHCI_TD_GET_ERRCNT(status) == 0) + return (USB_ERR_IOERROR); + return (USB_ERR_STALLED); + } + return (USB_ERR_NORMAL_COMPLETION); } static void Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Fri Jan 24 07:57:21 2014 (r261106) +++ stable/8/sys/dev/usb/usb_device.c Fri Jan 24 08:01:42 2014 (r261107) @@ -94,7 +94,7 @@ static void usb_init_attach_arg(struct u struct usb_attach_arg *); static void usb_suspend_resume_sub(struct usb_device *, device_t, uint8_t); -static void usbd_clear_stall_proc(struct usb_proc_msg *_pm); +static usb_proc_callback_t usbd_clear_stall_proc; static usb_error_t usb_config_parse(struct usb_device *, uint8_t, uint8_t); static void usbd_set_device_strings(struct usb_device *); #if USB_HAVE_DEVCTL @@ -1444,7 +1444,7 @@ usb_suspend_resume(struct usb_device *ud static void usbd_clear_stall_proc(struct usb_proc_msg *_pm) { - struct usb_clear_stall_msg *pm = (void *)_pm; + struct usb_udev_msg *pm = (void *)_pm; struct usb_device *udev = pm->udev; /* Change lock */ Modified: stable/8/sys/dev/usb/usb_device.h ============================================================================== --- stable/8/sys/dev/usb/usb_device.h Fri Jan 24 07:57:21 2014 (r261106) +++ stable/8/sys/dev/usb/usb_device.h Fri Jan 24 08:01:42 2014 (r261107) @@ -53,7 +53,7 @@ struct usb_symlink; /* UGEN */ #define USB_UNCFG_FLAG_NONE 0x00 #define USB_UNCFG_FLAG_FREE_EP0 0x02 /* endpoint zero is freed */ -struct usb_clear_stall_msg { +struct usb_udev_msg { struct usb_proc_msg hdr; struct usb_device *udev; }; @@ -179,8 +179,8 @@ union usb_device_scratch { * these structures for every USB device. */ struct usb_device { - struct usb_clear_stall_msg cs_msg[2]; /* generic clear stall - * messages */ + /* generic clear stall message */ + struct usb_udev_msg cs_msg[2]; struct sx enum_sx; struct sx sr_sx; struct mtx device_mtx; @@ -305,4 +305,10 @@ void usbd_sr_lock(struct usb_device *); void usbd_sr_unlock(struct usb_device *); uint8_t usbd_enum_is_locked(struct usb_device *); +#if USB_HAVE_TT_SUPPORT +void uhub_tt_buffer_reset_async_locked(struct usb_device *, struct usb_endpoint *); +#endif + +uint8_t uhub_count_active_host_ports(struct usb_device *, enum usb_dev_speed); + #endif /* _USB_DEVICE_H_ */ Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Fri Jan 24 07:57:21 2014 (r261106) +++ stable/8/sys/dev/usb/usb_hub.c Fri Jan 24 08:01:42 2014 (r261107) @@ -70,7 +70,13 @@ #include #define UHUB_INTR_INTERVAL 250 /* ms */ -#define UHUB_N_TRANSFER 1 +enum { + UHUB_INTR_TRANSFER, +#if USB_HAVE_TT_SUPPORT + UHUB_RESET_TT_TRANSFER, +#endif + UHUB_N_TRANSFER, +}; #ifdef USB_DEBUG static int uhub_debug = 0; @@ -123,6 +129,9 @@ static bus_child_location_str_t uhub_chi static bus_child_pnpinfo_str_t uhub_child_pnpinfo_string; static usb_callback_t uhub_intr_callback; +#if USB_HAVE_TT_SUPPORT +static usb_callback_t uhub_reset_tt_callback; +#endif static void usb_dev_resume_peer(struct usb_device *udev); static void usb_dev_suspend_peer(struct usb_device *udev); @@ -130,7 +139,7 @@ static uint8_t usb_peer_should_wakeup(st static const struct usb_config uhub_config[UHUB_N_TRANSFER] = { - [0] = { + [UHUB_INTR_TRANSFER] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_ANY, @@ -140,6 +149,17 @@ static const struct usb_config uhub_conf .callback = &uhub_intr_callback, .interval = UHUB_INTR_INTERVAL, }, +#if USB_HAVE_TT_SUPPORT + [UHUB_RESET_TT_TRANSFER] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = UE_DIR_ANY, + .bufsize = sizeof(struct usb_device_request), + .callback = &uhub_reset_tt_callback, + .timeout = 1000, /* 1 second */ + .usb_mode = USB_MODE_HOST, + }, +#endif }; /* @@ -209,6 +229,199 @@ uhub_intr_callback(struct usb_xfer *xfer } /*------------------------------------------------------------------------* + * uhub_reset_tt_proc + * + * This function starts the TT reset USB request + *------------------------------------------------------------------------*/ +#if USB_HAVE_TT_SUPPORT +static void +uhub_reset_tt_proc(struct usb_proc_msg *_pm) +{ + struct usb_udev_msg *pm = (void *)_pm; + struct usb_device *udev = pm->udev; + struct usb_hub *hub; + struct uhub_softc *sc; + + hub = udev->hub; + if (hub == NULL) + return; + sc = hub->hubsoftc; + if (sc == NULL) + return; + + /* Change lock */ + USB_BUS_UNLOCK(udev->bus); + mtx_lock(&sc->sc_mtx); + /* Start transfer */ + usbd_transfer_start(sc->sc_xfer[UHUB_RESET_TT_TRANSFER]); + /* Change lock */ + mtx_unlock(&sc->sc_mtx); + USB_BUS_LOCK(udev->bus); +} +#endif + +/*------------------------------------------------------------------------* + * uhub_tt_buffer_reset_async_locked + * + * This function queues a TT reset for the given USB device and endpoint. + *------------------------------------------------------------------------*/ +#if USB_HAVE_TT_SUPPORT +void +uhub_tt_buffer_reset_async_locked(struct usb_device *child, struct usb_endpoint *ep) +{ + struct usb_device_request req; + struct usb_device *udev; + struct usb_hub *hub; + struct usb_port *up; + uint16_t wValue; + uint8_t port; + + if (child == NULL || ep == NULL) + return; + + udev = child->parent_hs_hub; + port = child->hs_port_no; + + if (udev == NULL) + return; + + hub = udev->hub; + if ((hub == NULL) || + (udev->speed != USB_SPEED_HIGH) || + (child->speed != USB_SPEED_LOW && + child->speed != USB_SPEED_FULL) || + (child->flags.usb_mode != USB_MODE_HOST) || + (port == 0) || (ep->edesc == NULL)) { + /* not applicable */ + return; + } + + USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); + + up = hub->ports + port - 1; + + if (udev->ddesc.bDeviceClass == UDCLASS_HUB && + udev->ddesc.bDeviceProtocol == UDPROTO_HSHUBSTT) + port = 1; + + /* if we already received a clear buffer request, reset the whole TT */ + if (up->req_reset_tt.bRequest != 0) { + req.bmRequestType = UT_WRITE_CLASS_OTHER; + req.bRequest = UR_RESET_TT; + USETW(req.wValue, 0); + req.wIndex[0] = port; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + } else { + wValue = (ep->edesc->bEndpointAddress & 0xF) | + ((child->address & 0x7F) << 4) | + ((ep->edesc->bEndpointAddress & 0x80) << 8) | + ((ep->edesc->bmAttributes & 3) << 12); + + req.bmRequestType = UT_WRITE_CLASS_OTHER; + req.bRequest = UR_CLEAR_TT_BUFFER; + USETW(req.wValue, wValue); + req.wIndex[0] = port; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + } + up->req_reset_tt = req; + /* get reset transfer started */ + usb_proc_msignal(&udev->bus->non_giant_callback_proc, + &hub->tt_msg[0], &hub->tt_msg[1]); +} +#endif + +#if USB_HAVE_TT_SUPPORT +static void +uhub_reset_tt_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct uhub_softc *sc; + struct usb_device *udev; + struct usb_port *up; + uint8_t x; + + DPRINTF("TT buffer reset\n"); + + sc = usbd_xfer_softc(xfer); + udev = sc->sc_udev; + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + case USB_ST_SETUP: +tr_setup: + USB_BUS_LOCK(udev->bus); + /* find first port which needs a TT reset */ + for (x = 0; x != udev->hub->nports; x++) { + up = udev->hub->ports + x; + + if (up->req_reset_tt.bRequest == 0) + continue; + + /* copy in the transfer */ + usbd_copy_in(xfer->frbuffers, 0, &up->req_reset_tt, + sizeof(up->req_reset_tt)); + /* reset buffer */ + memset(&up->req_reset_tt, 0, sizeof(up->req_reset_tt)); + + /* set length */ + usbd_xfer_set_frame_len(xfer, 0, sizeof(up->req_reset_tt)); + xfer->nframes = 1; + USB_BUS_UNLOCK(udev->bus); + + usbd_transfer_submit(xfer); + return; + } + USB_BUS_UNLOCK(udev->bus); + break; + + default: + if (error == USB_ERR_CANCELLED) + break; + + DPRINTF("TT buffer reset failed (%s)\n", usbd_errstr(error)); + goto tr_setup; + } +} +#endif + +/*------------------------------------------------------------------------* + * uhub_count_active_host_ports + * + * This function counts the number of active ports at the given speed. + *------------------------------------------------------------------------*/ +uint8_t +uhub_count_active_host_ports(struct usb_device *udev, enum usb_dev_speed speed) +{ + struct uhub_softc *sc; + struct usb_device *child; + struct usb_hub *hub; + struct usb_port *up; + uint8_t retval = 0; + uint8_t x; + + if (udev == NULL) + goto done; + hub = udev->hub; + if (hub == NULL) + goto done; + sc = hub->hubsoftc; + if (sc == NULL) + goto done; + + for (x = 0; x != hub->nports; x++) { + up = hub->ports + x; + child = usb_bus_port_get_device(udev->bus, up); + if (child != NULL && + child->flags.usb_mode == USB_MODE_HOST && + child->speed == speed) + retval++; + } +done: + return (retval); +} + +/*------------------------------------------------------------------------* * uhub_explore_sub - subroutine * * Return values: @@ -1102,7 +1315,12 @@ uhub_attach(device_t dev) hub->explore = &uhub_explore; hub->nports = nports; hub->hubudev = udev; - +#if USB_HAVE_TT_SUPPORT + hub->tt_msg[0].hdr.pm_callback = &uhub_reset_tt_proc; + hub->tt_msg[0].udev = udev; + hub->tt_msg[1].hdr.pm_callback = &uhub_reset_tt_proc; + hub->tt_msg[1].udev = udev; +#endif /* if self powered hub, give ports maximum current */ if (udev->flags.self_powered) { hub->portpower = USB_MAX_POWER; @@ -1204,11 +1422,9 @@ uhub_attach(device_t dev) /* Start the interrupt endpoint, if any */ - if (sc->sc_xfer[0] != NULL) { - mtx_lock(&sc->sc_mtx); - usbd_transfer_start(sc->sc_xfer[0]); - mtx_unlock(&sc->sc_mtx); - } + mtx_lock(&sc->sc_mtx); + usbd_transfer_start(sc->sc_xfer[UHUB_INTR_TRANSFER]); + mtx_unlock(&sc->sc_mtx); /* Enable automatic power save on all USB HUBs */ @@ -1238,6 +1454,7 @@ uhub_detach(device_t dev) { struct uhub_softc *sc = device_get_softc(dev); struct usb_hub *hub = sc->sc_udev->hub; + struct usb_bus *bus = sc->sc_udev->bus; struct usb_device *child; uint8_t x; @@ -1250,7 +1467,7 @@ uhub_detach(device_t dev) /* Detach all ports */ for (x = 0; x != hub->nports; x++) { - child = usb_bus_port_get_device(sc->sc_udev->bus, hub->ports + x); + child = usb_bus_port_get_device(bus, hub->ports + x); if (child == NULL) { continue; @@ -1262,6 +1479,14 @@ uhub_detach(device_t dev) usb_free_device(child, 0); } +#if USB_HAVE_TT_SUPPORT + /* Make sure our TT messages are not queued anywhere */ + USB_BUS_LOCK(bus); + usb_proc_mwait(&bus->non_giant_callback_proc, + &hub->tt_msg[0], &hub->tt_msg[1]); + USB_BUS_UNLOCK(bus); +#endif + free(hub, M_USBDEV); sc->sc_udev->hub = NULL; Modified: stable/8/sys/dev/usb/usb_hub.h ============================================================================== --- stable/8/sys/dev/usb/usb_hub.h Fri Jan 24 07:57:21 2014 (r261106) +++ stable/8/sys/dev/usb/usb_hub.h Fri Jan 24 08:01:42 2014 (r261107) @@ -35,6 +35,9 @@ struct usb_port { #define USB_RESTART_MAX 5 uint8_t device_index; /* zero means not valid */ enum usb_hc_mode usb_mode; /* host or device mode */ +#if USB_HAVE_TT_SUPPORT + struct usb_device_request req_reset_tt __aligned(4); +#endif }; /* @@ -44,6 +47,9 @@ struct usb_hub { struct usb_device *hubudev; /* the HUB device */ usb_error_t (*explore) (struct usb_device *hub); void *hubsoftc; +#if USB_HAVE_TT_SUPPORT + struct usb_udev_msg tt_msg[2]; +#endif usb_size_t uframe_usage[USB_HS_MICRO_FRAMES_MAX]; uint16_t portpower; /* mA per USB port */ uint8_t isoc_last_time; Modified: stable/8/sys/dev/usb/usb_request.c ============================================================================== --- stable/8/sys/dev/usb/usb_request.c Fri Jan 24 07:57:21 2014 (r261106) +++ stable/8/sys/dev/usb/usb_request.c Fri Jan 24 08:01:42 2014 (r261107) @@ -714,6 +714,17 @@ done: if ((mtx != NULL) && (mtx != &Giant)) mtx_lock(mtx); + switch (err) { + case USB_ERR_NORMAL_COMPLETION: + case USB_ERR_SHORT_XFER: + case USB_ERR_STALLED: + case USB_ERR_CANCELLED: + break; + default: + DPRINTF("I/O error - waiting a bit for TT cleanup\n"); + usb_pause_mtx(mtx, hz / 16); + break; + } return ((usb_error_t)err); } @@ -1965,6 +1976,7 @@ usbd_req_re_enumerate(struct usb_device return (USB_ERR_INVAL); } retry: +#if USB_HAVE_TT_SUPPORT /* * Try to reset the High Speed parent HUB of a LOW- or FULL- * speed device, if any. @@ -1972,15 +1984,24 @@ retry: if (udev->parent_hs_hub != NULL && udev->speed != USB_SPEED_HIGH) { DPRINTF("Trying to reset parent High Speed TT.\n"); - err = usbd_req_reset_tt(udev->parent_hs_hub, NULL, - udev->hs_port_no); + if (udev->parent_hs_hub == parent_hub && + (uhub_count_active_host_ports(parent_hub, USB_SPEED_LOW) + + uhub_count_active_host_ports(parent_hub, USB_SPEED_FULL)) == 1) { + /* we can reset the whole TT */ + err = usbd_req_reset_tt(parent_hub, NULL, + udev->hs_port_no); + } else { + /* only reset a particular device and endpoint */ + err = usbd_req_clear_tt_buffer(udev->parent_hs_hub, NULL, + udev->hs_port_no, old_addr, UE_CONTROL, 0); + } if (err) { DPRINTF("Resetting parent High " "Speed TT failed (%s).\n", usbd_errstr(err)); } } - +#endif /* Try to warm reset first */ if (parent_hub->speed == USB_SPEED_SUPER) usbd_req_warm_reset_port(parent_hub, mtx, udev->port_no); Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Fri Jan 24 07:57:21 2014 (r261106) +++ stable/8/sys/dev/usb/usb_transfer.c Fri Jan 24 08:01:42 2014 (r261107) @@ -2366,7 +2366,9 @@ usbd_transfer_enqueue(struct usb_xfer_qu void usbd_transfer_done(struct usb_xfer *xfer, usb_error_t error) { - USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED); + struct usb_xfer_root *info = xfer->xroot; + + USB_BUS_LOCK_ASSERT(info->bus, MA_OWNED); DPRINTF("err=%s\n", usbd_errstr(error)); @@ -2380,10 +2382,10 @@ usbd_transfer_done(struct usb_xfer *xfer xfer->flags_int.control_act = 0; return; } - /* only set transfer error if not already set */ - if (!xfer->error) { + /* only set transfer error, if not already set */ + if (xfer->error == USB_ERR_NORMAL_COMPLETION) xfer->error = error; - } + /* stop any callouts */ usb_callout_stop(&xfer->timeout_handle); @@ -2395,14 +2397,14 @@ usbd_transfer_done(struct usb_xfer *xfer usbd_transfer_dequeue(xfer); #if USB_HAVE_BUSDMA - if (mtx_owned(xfer->xroot->xfer_mtx)) { + if (mtx_owned(info->xfer_mtx)) { struct usb_xfer_queue *pq; /* * If the private USB lock is not locked, then we assume * that the BUS-DMA load stage has been passed: */ - pq = &xfer->xroot->dma_q; + pq = &info->dma_q; if (pq->curr == xfer) { /* start the next BUS-DMA load, if any */ @@ -2412,10 +2414,10 @@ usbd_transfer_done(struct usb_xfer *xfer #endif /* keep some statistics */ if (xfer->error) { - xfer->xroot->bus->stats_err.uds_requests + info->bus->stats_err.uds_requests [xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE]++; } else { - xfer->xroot->bus->stats_ok.uds_requests + info->bus->stats_ok.uds_requests [xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE]++; } @@ -2781,6 +2783,22 @@ usbd_callback_wrapper_sub(struct usb_xfe /* end of control transfer, if any */ xfer->flags_int.control_act = 0; +#if USB_HAVE_TT_SUPPORT + switch (xfer->error) { + case USB_ERR_NORMAL_COMPLETION: + case USB_ERR_SHORT_XFER: + case USB_ERR_STALLED: + case USB_ERR_CANCELLED: + /* nothing to do */ + break; + default: + /* try to reset the TT, if any */ + USB_BUS_LOCK(bus); + uhub_tt_buffer_reset_async_locked(xfer->xroot->udev, xfer->endpoint); + USB_BUS_UNLOCK(bus); + break; + } +#endif /* check if we should block the execution queue */ if ((xfer->error != USB_ERR_CANCELLED) && (xfer->flags.pipe_bof)) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:06:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD8797EC; Fri, 24 Jan 2014 08:06:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 989EC108C; Fri, 24 Jan 2014 08:06:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O86FXn018892; Fri, 24 Jan 2014 08:06:15 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O86F9U018890; Fri, 24 Jan 2014 08:06:15 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240806.s0O86F9U018890@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r261108 - stable/8/sys/dev/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:06:15 -0000 Author: hselasky Date: Fri Jan 24 08:06:14 2014 New Revision: 261108 URL: http://svnweb.freebsd.org/changeset/base/261108 Log: MFC r260808 and r260814: - Close a minor deadlock. - Fix a possible memory use after free and leak situation associated with USB device detach when using character device handles. This also includes LibUSB. It turns out that "usb_close()" cannot always get a reference to clean up its USB transfers and such, if called during the kernel USB device detach. Modified: stable/8/sys/dev/usb/usb_dev.c stable/8/sys/dev/usb/usb_device.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_dev.c ============================================================================== --- stable/8/sys/dev/usb/usb_dev.c Fri Jan 24 08:01:42 2014 (r261107) +++ stable/8/sys/dev/usb/usb_dev.c Fri Jan 24 08:06:14 2014 (r261108) @@ -203,6 +203,11 @@ usb_ref_device(struct usb_cdev_privdata DPRINTFN(2, "no device at %u\n", cpd->dev_index); goto error; } + if (cpd->udev->state == USB_STATE_DETACHED && + (need_uref != 2)) { + DPRINTFN(2, "device is detached\n"); + goto error; + } if (cpd->udev->refcount == USB_DEV_REF_MAX) { DPRINTFN(2, "no dev ref\n"); goto error; @@ -593,6 +598,13 @@ usb_fifo_free(struct usb_fifo *f) mtx_unlock(f->priv_mtx); mtx_lock(&usb_ref_lock); + /* + * Check if the "f->refcount" variable reached zero + * during the unlocked time before entering wait: + */ + if (f->refcount == 0) + break; + /* wait for sync */ cv_wait(&f->cv_drain, &usb_ref_lock); } @@ -911,23 +923,12 @@ usb_close(void *arg) DPRINTFN(2, "cpd=%p\n", cpd); - err = usb_ref_device(cpd, &refs, 0); - if (err) + err = usb_ref_device(cpd, &refs, + 2 /* uref and allow detached state */); + if (err) { + DPRINTFN(0, "Cannot grab USB reference when " + "closing USB file handle\n"); goto done; - - /* - * If this function is not called directly from the root HUB - * thread, there is usually a need to lock the enumeration - * lock. Check this. - */ - if (!usbd_enum_is_locked(cpd->udev)) { - - DPRINTFN(2, "Locking enumeration\n"); - - /* reference device */ - err = usb_usb_ref_device(cpd, &refs); - if (err) - goto done; } if (cpd->fflags & FREAD) { usb_fifo_close(refs.rxfifo, cpd->fflags); Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Fri Jan 24 08:01:42 2014 (r261107) +++ stable/8/sys/dev/usb/usb_device.c Fri Jan 24 08:06:14 2014 (r261108) @@ -2036,6 +2036,8 @@ usb_free_device(struct usb_device *udev, DPRINTFN(4, "udev=%p port=%d\n", udev, udev->port_no); bus = udev->bus; + + /* set DETACHED state to prevent any further references */ usb_set_device_state(udev, USB_STATE_DETACHED); #if USB_HAVE_DEVCTL @@ -2051,16 +2053,7 @@ usb_free_device(struct usb_device *udev, usb_free_symlink(udev->ugen_symlink); udev->ugen_symlink = NULL; } -#endif - /* - * Unregister our device first which will prevent any further - * references: - */ - usb_bus_port_set_device(bus, udev->parent_hub ? - udev->parent_hub->hub->ports + udev->port_index : NULL, - NULL, USB_ROOT_HUB_ADDR); -#if USB_HAVE_UGEN /* wait for all pending references to go away: */ mtx_lock(&usb_ref_lock); udev->refcount--; @@ -2080,6 +2073,11 @@ usb_free_device(struct usb_device *udev, /* the following will get the device unconfigured in software */ usb_unconfigure(udev, USB_UNCFG_FLAG_FREE_EP0); + /* final device unregister after all character devices are closed */ + usb_bus_port_set_device(bus, udev->parent_hub ? + udev->parent_hub->hub->ports + udev->port_index : NULL, + NULL, USB_ROOT_HUB_ADDR); + /* unsetup any leftover default USB transfers */ usbd_transfer_unsetup(udev->ctrl_xfer, USB_CTRL_XFER_MAX); @@ -2688,8 +2686,14 @@ usb_set_device_state(struct usb_device * DPRINTF("udev %p state %s -> %s\n", udev, usb_statestr(udev->state), usb_statestr(state)); - udev->state = state; +#if USB_HAVE_UGEN + mtx_lock(&usb_ref_lock); +#endif + udev->state = state; +#if USB_HAVE_UGEN + mtx_unlock(&usb_ref_lock); +#endif if (udev->bus->methods->device_state_change != NULL) (udev->bus->methods->device_state_change) (udev); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:08:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D731E937; Fri, 24 Jan 2014 08:08:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C25B0109D; Fri, 24 Jan 2014 08:08:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O88SD8019248; Fri, 24 Jan 2014 08:08:28 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O88SGO019246; Fri, 24 Jan 2014 08:08:28 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240808.s0O88SGO019246@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261109 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:08:28 -0000 Author: hselasky Date: Fri Jan 24 08:08:28 2014 New Revision: 261109 URL: http://svnweb.freebsd.org/changeset/base/261109 Log: MFC r260808 and r260814: - Close a minor deadlock. - Fix a possible memory use after free and leak situation associated with USB device detach when using character device handles. This also includes LibUSB. It turns out that "usb_close()" cannot always get a reference to clean up its USB transfers and such, if called during the kernel USB device detach. Modified: stable/9/sys/dev/usb/usb_dev.c stable/9/sys/dev/usb/usb_device.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_dev.c ============================================================================== --- stable/9/sys/dev/usb/usb_dev.c Fri Jan 24 08:06:14 2014 (r261108) +++ stable/9/sys/dev/usb/usb_dev.c Fri Jan 24 08:08:28 2014 (r261109) @@ -203,6 +203,11 @@ usb_ref_device(struct usb_cdev_privdata DPRINTFN(2, "no device at %u\n", cpd->dev_index); goto error; } + if (cpd->udev->state == USB_STATE_DETACHED && + (need_uref != 2)) { + DPRINTFN(2, "device is detached\n"); + goto error; + } if (cpd->udev->refcount == USB_DEV_REF_MAX) { DPRINTFN(2, "no dev ref\n"); goto error; @@ -593,6 +598,13 @@ usb_fifo_free(struct usb_fifo *f) mtx_unlock(f->priv_mtx); mtx_lock(&usb_ref_lock); + /* + * Check if the "f->refcount" variable reached zero + * during the unlocked time before entering wait: + */ + if (f->refcount == 0) + break; + /* wait for sync */ cv_wait(&f->cv_drain, &usb_ref_lock); } @@ -911,23 +923,12 @@ usb_close(void *arg) DPRINTFN(2, "cpd=%p\n", cpd); - err = usb_ref_device(cpd, &refs, 0); - if (err) + err = usb_ref_device(cpd, &refs, + 2 /* uref and allow detached state */); + if (err) { + DPRINTFN(0, "Cannot grab USB reference when " + "closing USB file handle\n"); goto done; - - /* - * If this function is not called directly from the root HUB - * thread, there is usually a need to lock the enumeration - * lock. Check this. - */ - if (!usbd_enum_is_locked(cpd->udev)) { - - DPRINTFN(2, "Locking enumeration\n"); - - /* reference device */ - err = usb_usb_ref_device(cpd, &refs); - if (err) - goto done; } if (cpd->fflags & FREAD) { usb_fifo_close(refs.rxfifo, cpd->fflags); Modified: stable/9/sys/dev/usb/usb_device.c ============================================================================== --- stable/9/sys/dev/usb/usb_device.c Fri Jan 24 08:06:14 2014 (r261108) +++ stable/9/sys/dev/usb/usb_device.c Fri Jan 24 08:08:28 2014 (r261109) @@ -2036,6 +2036,8 @@ usb_free_device(struct usb_device *udev, DPRINTFN(4, "udev=%p port=%d\n", udev, udev->port_no); bus = udev->bus; + + /* set DETACHED state to prevent any further references */ usb_set_device_state(udev, USB_STATE_DETACHED); #if USB_HAVE_DEVCTL @@ -2051,16 +2053,7 @@ usb_free_device(struct usb_device *udev, usb_free_symlink(udev->ugen_symlink); udev->ugen_symlink = NULL; } -#endif - /* - * Unregister our device first which will prevent any further - * references: - */ - usb_bus_port_set_device(bus, udev->parent_hub ? - udev->parent_hub->hub->ports + udev->port_index : NULL, - NULL, USB_ROOT_HUB_ADDR); -#if USB_HAVE_UGEN /* wait for all pending references to go away: */ mtx_lock(&usb_ref_lock); udev->refcount--; @@ -2080,6 +2073,11 @@ usb_free_device(struct usb_device *udev, /* the following will get the device unconfigured in software */ usb_unconfigure(udev, USB_UNCFG_FLAG_FREE_EP0); + /* final device unregister after all character devices are closed */ + usb_bus_port_set_device(bus, udev->parent_hub ? + udev->parent_hub->hub->ports + udev->port_index : NULL, + NULL, USB_ROOT_HUB_ADDR); + /* unsetup any leftover default USB transfers */ usbd_transfer_unsetup(udev->ctrl_xfer, USB_CTRL_XFER_MAX); @@ -2613,8 +2611,14 @@ usb_set_device_state(struct usb_device * DPRINTF("udev %p state %s -> %s\n", udev, usb_statestr(udev->state), usb_statestr(state)); - udev->state = state; +#if USB_HAVE_UGEN + mtx_lock(&usb_ref_lock); +#endif + udev->state = state; +#if USB_HAVE_UGEN + mtx_unlock(&usb_ref_lock); +#endif if (udev->bus->methods->device_state_change != NULL) (udev->bus->methods->device_state_change) (udev); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:10:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F33EBAB; Fri, 24 Jan 2014 08:10:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4183310B6; Fri, 24 Jan 2014 08:10:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O8A9Lo019618; Fri, 24 Jan 2014 08:10:09 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O8A8pP019615; Fri, 24 Jan 2014 08:10:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240810.s0O8A8pP019615@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261110 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:10:09 -0000 Author: hselasky Date: Fri Jan 24 08:10:08 2014 New Revision: 261110 URL: http://svnweb.freebsd.org/changeset/base/261110 Log: MFC r260808 and r260814: - Close a minor deadlock. - Fix a possible memory use after free and leak situation associated with USB device detach when using character device handles. This also includes LibUSB. It turns out that "usb_close()" cannot always get a reference to clean up its USB transfers and such, if called during the kernel USB device detach. Modified: stable/10/sys/dev/usb/usb_dev.c stable/10/sys/dev/usb/usb_device.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_dev.c ============================================================================== --- stable/10/sys/dev/usb/usb_dev.c Fri Jan 24 08:08:28 2014 (r261109) +++ stable/10/sys/dev/usb/usb_dev.c Fri Jan 24 08:10:08 2014 (r261110) @@ -207,6 +207,11 @@ usb_ref_device(struct usb_cdev_privdata DPRINTFN(2, "no device at %u\n", cpd->dev_index); goto error; } + if (cpd->udev->state == USB_STATE_DETACHED && + (need_uref != 2)) { + DPRINTFN(2, "device is detached\n"); + goto error; + } if (cpd->udev->refcount == USB_DEV_REF_MAX) { DPRINTFN(2, "no dev ref\n"); goto error; @@ -597,6 +602,13 @@ usb_fifo_free(struct usb_fifo *f) mtx_unlock(f->priv_mtx); mtx_lock(&usb_ref_lock); + /* + * Check if the "f->refcount" variable reached zero + * during the unlocked time before entering wait: + */ + if (f->refcount == 0) + break; + /* wait for sync */ cv_wait(&f->cv_drain, &usb_ref_lock); } @@ -915,23 +927,12 @@ usb_close(void *arg) DPRINTFN(2, "cpd=%p\n", cpd); - err = usb_ref_device(cpd, &refs, 0); - if (err) + err = usb_ref_device(cpd, &refs, + 2 /* uref and allow detached state */); + if (err) { + DPRINTFN(0, "Cannot grab USB reference when " + "closing USB file handle\n"); goto done; - - /* - * If this function is not called directly from the root HUB - * thread, there is usually a need to lock the enumeration - * lock. Check this. - */ - if (!usbd_enum_is_locked(cpd->udev)) { - - DPRINTFN(2, "Locking enumeration\n"); - - /* reference device */ - err = usb_usb_ref_device(cpd, &refs); - if (err) - goto done; } if (cpd->fflags & FREAD) { usb_fifo_close(refs.rxfifo, cpd->fflags); Modified: stable/10/sys/dev/usb/usb_device.c ============================================================================== --- stable/10/sys/dev/usb/usb_device.c Fri Jan 24 08:08:28 2014 (r261109) +++ stable/10/sys/dev/usb/usb_device.c Fri Jan 24 08:10:08 2014 (r261110) @@ -2070,6 +2070,8 @@ usb_free_device(struct usb_device *udev, DPRINTFN(4, "udev=%p port=%d\n", udev, udev->port_no); bus = udev->bus; + + /* set DETACHED state to prevent any further references */ usb_set_device_state(udev, USB_STATE_DETACHED); #if USB_HAVE_DEVCTL @@ -2085,16 +2087,7 @@ usb_free_device(struct usb_device *udev, usb_free_symlink(udev->ugen_symlink); udev->ugen_symlink = NULL; } -#endif - /* - * Unregister our device first which will prevent any further - * references: - */ - usb_bus_port_set_device(bus, udev->parent_hub ? - udev->parent_hub->hub->ports + udev->port_index : NULL, - NULL, USB_ROOT_HUB_ADDR); -#if USB_HAVE_UGEN /* wait for all pending references to go away: */ mtx_lock(&usb_ref_lock); udev->refcount--; @@ -2114,6 +2107,11 @@ usb_free_device(struct usb_device *udev, /* the following will get the device unconfigured in software */ usb_unconfigure(udev, USB_UNCFG_FLAG_FREE_EP0); + /* final device unregister after all character devices are closed */ + usb_bus_port_set_device(bus, udev->parent_hub ? + udev->parent_hub->hub->ports + udev->port_index : NULL, + NULL, USB_ROOT_HUB_ADDR); + /* unsetup any leftover default USB transfers */ usbd_transfer_unsetup(udev->ctrl_xfer, USB_CTRL_XFER_MAX); @@ -2647,8 +2645,14 @@ usb_set_device_state(struct usb_device * DPRINTF("udev %p state %s -> %s\n", udev, usb_statestr(udev->state), usb_statestr(state)); - udev->state = state; +#if USB_HAVE_UGEN + mtx_lock(&usb_ref_lock); +#endif + udev->state = state; +#if USB_HAVE_UGEN + mtx_unlock(&usb_ref_lock); +#endif if (udev->bus->methods->device_state_change != NULL) (udev->bus->methods->device_state_change) (udev); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:15:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF7A4D73; Fri, 24 Jan 2014 08:15:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C91E5115C; Fri, 24 Jan 2014 08:15:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O8FLeC023010; Fri, 24 Jan 2014 08:15:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O8FLKA023009; Fri, 24 Jan 2014 08:15:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240815.s0O8FLKA023009@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261111 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:15:22 -0000 Author: hselasky Date: Fri Jan 24 08:15:21 2014 New Revision: 261111 URL: http://svnweb.freebsd.org/changeset/base/261111 Log: MFC r258545: Comply to the XHCI specification. Certain input context fields should always be zero. Modified: stable/10/sys/dev/usb/controller/xhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Fri Jan 24 08:10:08 2014 (r261110) +++ stable/10/sys/dev/usb/controller/xhci.c Fri Jan 24 08:15:21 2014 (r261111) @@ -2614,7 +2614,11 @@ xhci_configure_device(struct usb_device xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx2, temp); - temp = XHCI_SCTX_3_DEV_ADDR_SET(udev->address) | + /* + * These fields should be initialized to zero, according to + * XHCI section 6.2.2 - slot context: + */ + temp = XHCI_SCTX_3_DEV_ADDR_SET(0) | XHCI_SCTX_3_SLOT_STATE_SET(0); xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx3, temp); From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:16:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 859DEEBB; Fri, 24 Jan 2014 08:16:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 71110116D; Fri, 24 Jan 2014 08:16:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O8GKWT023156; Fri, 24 Jan 2014 08:16:20 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O8GKQN023155; Fri, 24 Jan 2014 08:16:20 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240816.s0O8GKQN023155@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261112 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:16:20 -0000 Author: hselasky Date: Fri Jan 24 08:16:19 2014 New Revision: 261112 URL: http://svnweb.freebsd.org/changeset/base/261112 Log: MFC r258545: Comply to the XHCI specification. Certain input context fields should always be zero. Modified: stable/9/sys/dev/usb/controller/xhci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Fri Jan 24 08:15:21 2014 (r261111) +++ stable/9/sys/dev/usb/controller/xhci.c Fri Jan 24 08:16:19 2014 (r261112) @@ -2544,7 +2544,11 @@ xhci_configure_device(struct usb_device xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx2, temp); - temp = XHCI_SCTX_3_DEV_ADDR_SET(udev->address) | + /* + * These fields should be initialized to zero, according to + * XHCI section 6.2.2 - slot context: + */ + temp = XHCI_SCTX_3_DEV_ADDR_SET(0) | XHCI_SCTX_3_SLOT_STATE_SET(0); xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx3, temp); From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:17:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6F43BC; Fri, 24 Jan 2014 08:17:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1C441172; Fri, 24 Jan 2014 08:17:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O8HlrD023365; Fri, 24 Jan 2014 08:17:47 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O8Hl4p023363; Fri, 24 Jan 2014 08:17:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240817.s0O8Hl4p023363@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r261113 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:17:47 -0000 Author: hselasky Date: Fri Jan 24 08:17:47 2014 New Revision: 261113 URL: http://svnweb.freebsd.org/changeset/base/261113 Log: MFC r258545: Comply to the XHCI specification. Certain input context fields should always be zero. Modified: stable/8/sys/dev/usb/controller/xhci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Fri Jan 24 08:16:19 2014 (r261112) +++ stable/8/sys/dev/usb/controller/xhci.c Fri Jan 24 08:17:47 2014 (r261113) @@ -2544,7 +2544,11 @@ xhci_configure_device(struct usb_device xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx2, temp); - temp = XHCI_SCTX_3_DEV_ADDR_SET(udev->address) | + /* + * These fields should be initialized to zero, according to + * XHCI section 6.2.2 - slot context: + */ + temp = XHCI_SCTX_3_DEV_ADDR_SET(0) | XHCI_SCTX_3_SLOT_STATE_SET(0); xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx3, temp); From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:19:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98F9623D; Fri, 24 Jan 2014 08:19:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 83FCD118C; Fri, 24 Jan 2014 08:19:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O8Jp32023643; Fri, 24 Jan 2014 08:19:51 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O8JpwQ023642; Fri, 24 Jan 2014 08:19:51 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240819.s0O8JpwQ023642@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261114 - stable/9/sys/dev/usb/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:19:51 -0000 Author: hselasky Date: Fri Jan 24 08:19:50 2014 New Revision: 261114 URL: http://svnweb.freebsd.org/changeset/base/261114 Log: MFC r260534: Move USB ID from u3g driver to uhso driver. Modified: stable/9/sys/dev/usb/net/uhso.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/uhso.c ============================================================================== --- stable/9/sys/dev/usb/net/uhso.c Fri Jan 24 08:17:47 2014 (r261113) +++ stable/9/sys/dev/usb/net/uhso.c Fri Jan 24 08:19:50 2014 (r261114) @@ -268,6 +268,8 @@ static const STRUCT_USB_HOST_ID uhso_dev UHSO_DEV(OPTION, ICON401, UHSO_AUTO_IFACE), /* Option GlobeTrotter Module 382 */ UHSO_DEV(OPTION, GMT382, UHSO_AUTO_IFACE), + /* Option GTM661W */ + UHSO_DEV(OPTION, GTM661W, UHSO_AUTO_IFACE), /* Option iCON EDGE */ UHSO_DEV(OPTION, ICONEDGE, UHSO_STATIC_IFACE), /* Option Module HSxPA */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:22:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F6413F7; Fri, 24 Jan 2014 08:22:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE33F11FB; Fri, 24 Jan 2014 08:22:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O8MTQZ026871; Fri, 24 Jan 2014 08:22:29 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O8MTvp026870; Fri, 24 Jan 2014 08:22:29 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240822.s0O8MTvp026870@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261115 - stable/10/sys/dev/usb/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:22:30 -0000 Author: hselasky Date: Fri Jan 24 08:22:29 2014 New Revision: 261115 URL: http://svnweb.freebsd.org/changeset/base/261115 Log: MFC r260534: Move USB ID from u3g driver to uhso driver. Modified: stable/10/sys/dev/usb/net/uhso.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/uhso.c ============================================================================== --- stable/10/sys/dev/usb/net/uhso.c Fri Jan 24 08:19:50 2014 (r261114) +++ stable/10/sys/dev/usb/net/uhso.c Fri Jan 24 08:22:29 2014 (r261115) @@ -268,6 +268,8 @@ static const STRUCT_USB_HOST_ID uhso_dev UHSO_DEV(OPTION, ICON401, UHSO_AUTO_IFACE), /* Option GlobeTrotter Module 382 */ UHSO_DEV(OPTION, GMT382, UHSO_AUTO_IFACE), + /* Option GTM661W */ + UHSO_DEV(OPTION, GTM661W, UHSO_AUTO_IFACE), /* Option iCON EDGE */ UHSO_DEV(OPTION, ICONEDGE, UHSO_STATIC_IFACE), /* Option Module HSxPA */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 08:27:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D729B64D; Fri, 24 Jan 2014 08:27:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C21471281; Fri, 24 Jan 2014 08:27:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O8RJ1I027474; Fri, 24 Jan 2014 08:27:19 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O8RJYt027473; Fri, 24 Jan 2014 08:27:19 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401240827.s0O8RJYt027473@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 08:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261116 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:27:19 -0000 Author: hselasky Date: Fri Jan 24 08:27:19 2014 New Revision: 261116 URL: http://svnweb.freebsd.org/changeset/base/261116 Log: MFC r257132: Add id for GTM661W. This also fixes kernel build breakage since last revision. Modified: stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Fri Jan 24 08:22:29 2014 (r261115) +++ stable/10/sys/dev/usb/usbdevs Fri Jan 24 08:27:19 2014 (r261116) @@ -3226,6 +3226,7 @@ product OPTION GMT382 0x7501 Globetrott product OPTION GE40X_1 0x7301 Globetrotter HSUPA product OPTION GE40X_2 0x7361 Globetrotter HSUPA product OPTION GE40X_3 0x7381 Globetrotter HSUPA +product OPTION GTM661W 0x9000 GTM661W product OPTION ICONEDGE 0xc031 GlobeSurfer iCON EDGE product OPTION MODHSXPA 0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 09:13:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FC681AF; Fri, 24 Jan 2014 09:13:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 213481655; Fri, 24 Jan 2014 09:13:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O9DVIr046441; Fri, 24 Jan 2014 09:13:31 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O9DUJm046437; Fri, 24 Jan 2014 09:13:30 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201401240913.s0O9DUJm046437@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Fri, 24 Jan 2014 09:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261117 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:13:31 -0000 Author: melifaro Date: Fri Jan 24 09:13:30 2014 New Revision: 261117 URL: http://svnweb.freebsd.org/changeset/base/261117 Log: Reorder struct ip_fw_chain: * move rarely-used fields down * move uh_lock to different cacheline * remove some usused fields Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Fri Jan 24 08:27:19 2014 (r261116) +++ head/sys/netpfil/ipfw/ip_fw2.c Fri Jan 24 09:13:30 2014 (r261117) @@ -2666,7 +2666,7 @@ vnet_ipfw_init(const void *unused) rule->set = RESVD_SET; rule->cmd[0].len = 1; rule->cmd[0].opcode = default_to_accept ? O_ACCEPT : O_DENY; - chain->rules = chain->default_rule = chain->map[0] = rule; + chain->default_rule = chain->map[0] = rule; chain->id = rule->id = 1; IPFW_LOCK_INIT(chain); Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Fri Jan 24 08:27:19 2014 (r261116) +++ head/sys/netpfil/ipfw/ip_fw_private.h Fri Jan 24 09:13:30 2014 (r261117) @@ -213,25 +213,27 @@ VNET_DECLARE(unsigned int, fw_tables_max #define V_fw_tables_max VNET(fw_tables_max) struct ip_fw_chain { - struct ip_fw *rules; /* list of rules */ - struct ip_fw *reap; /* list of rules to reap */ - struct ip_fw *default_rule; - int n_rules; /* number of static rules */ - int static_len; /* total len of static rules */ struct ip_fw **map; /* array of rule ptrs to ease lookup */ + uint32_t id; /* ruleset id */ + int n_rules; /* number of static rules */ LIST_HEAD(nat_list, cfg_nat) nat; /* list of nat entries */ struct radix_node_head **tables; /* IPv4 tables */ struct radix_node_head **xtables; /* extended tables */ uint8_t *tabletype; /* Array of table types */ #if defined( __linux__ ) || defined( _WIN32 ) spinlock_t rwmtx; - spinlock_t uh_lock; #else struct rwlock rwmtx; +#endif + int static_len; /* total len of static rules */ + uint32_t gencnt; /* NAT generation count */ + struct ip_fw *reap; /* list of rules to reap */ + struct ip_fw *default_rule; +#if defined( __linux__ ) || defined( _WIN32 ) + spinlock_t uh_lock; +#else struct rwlock uh_lock; /* lock for upper half */ #endif - uint32_t id; /* ruleset id */ - uint32_t gencnt; /* generation count */ }; struct sockopt; /* used by tcp_var.h */ Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Fri Jan 24 08:27:19 2014 (r261116) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Fri Jan 24 09:13:30 2014 (r261117) @@ -159,7 +159,7 @@ ipfw_add_rule(struct ip_fw_chain *chain, int i, l, insert_before; struct ip_fw **map; /* the new array of pointers */ - if (chain->rules == NULL || input_rule->rulenum > IPFW_DEFAULT_RULE-1) + if (chain->map == NULL || input_rule->rulenum > IPFW_DEFAULT_RULE - 1) return (EINVAL); l = RULESIZE(input_rule); From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 09:17:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2253C597; Fri, 24 Jan 2014 09:17:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E92951687; Fri, 24 Jan 2014 09:17:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0O9HT7n046992; Fri, 24 Jan 2014 09:17:29 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0O9HTBO046991; Fri, 24 Jan 2014 09:17:29 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201401240917.s0O9HTBO046991@svn.freebsd.org> From: Kevin Lo Date: Fri, 24 Jan 2014 09:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261118 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 09:17:30 -0000 Author: kevlo Date: Fri Jan 24 09:17:29 2014 New Revision: 261118 URL: http://svnweb.freebsd.org/changeset/base/261118 Log: Get rid of memmove(). It's not portable. Tested on RT3071, RT3573, RT3570, RT3572, and RT5572. Reviewed by: hselasky Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Jan 24 09:13:30 2014 (r261117) +++ head/sys/dev/usb/wlan/if_run.c Fri Jan 24 09:17:29 2014 (r261118) @@ -359,8 +359,6 @@ static int run_write(struct run_softc *, static int run_write_region_1(struct run_softc *, uint16_t, const uint8_t *, int); static int run_set_region_4(struct run_softc *, uint16_t, uint32_t, int); -static int run_rf3593_efuse_read_1(struct run_softc *, uint16_t, - uint16_t *); static int run_efuse_read(struct run_softc *, uint16_t, uint16_t *, int); static int run_efuse_read_2(struct run_softc *, uint16_t, uint16_t *); static int run_eeprom_read_2(struct run_softc *, uint16_t, uint16_t *); @@ -1344,12 +1342,6 @@ run_set_region_4(struct run_softc *sc, u } static int -run_rf3593_efuse_read_1(struct run_softc *sc, uint16_t addr, uint16_t *val) -{ - return (run_efuse_read(sc, addr * 2, val, 1)); -} - -static int run_efuse_read(struct run_softc *sc, uint16_t addr, uint16_t *val, int count) { uint32_t tmp; @@ -1390,12 +1382,9 @@ run_efuse_read(struct run_softc *sc, uin if ((error = run_read(sc, reg, &tmp)) != 0) return (error); - if (count == 2) - *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; - else { - tmp >>= (8 *(addr & 0x3)); - memmove(val, &tmp, sizeof(*val)); - } + tmp >>= (8 * (addr & 0x3)); + *val = (addr & 1) ? tmp >> 16 : tmp & 0xffff; + return (0); } @@ -1753,10 +1742,8 @@ run_read_eeprom(struct run_softc *sc) if (sc->mac_ver >= 0x3070) { run_read(sc, RT3070_EFUSE_CTRL, &tmp); DPRINTF("EFUSE_CTRL=0x%08x\n", tmp); - if ((tmp & RT3070_SEL_EFUSE) && sc->mac_ver != 0x3593) + if ((tmp & RT3070_SEL_EFUSE) || sc->mac_ver == 0x3593) sc->sc_srom_read = run_efuse_read_2; - else - sc->sc_srom_read = run_rf3593_efuse_read_1; } /* read ROM version */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 13:51:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38419760; Fri, 24 Jan 2014 13:51:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24F301EEC; Fri, 24 Jan 2014 13:51:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0ODpdBZ054071; Fri, 24 Jan 2014 13:51:39 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0ODpcnO054068; Fri, 24 Jan 2014 13:51:38 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401241351.s0ODpcnO054068@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 24 Jan 2014 13:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261120 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 13:51:39 -0000 Author: pfg Date: Fri Jan 24 13:51:38 2014 New Revision: 261120 URL: http://svnweb.freebsd.org/changeset/base/261120 Log: ext2fs: fix a bug in dirindex and re-enable. The IN_* flags should be set in i_flag instead of corrupting i_flags [1]. Re-enable HTree dirindex as the last series of bug fixes seems to have fixed the issues. Reported by: bde [1] Tested by: kevlo MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_htree.c head/sys/fs/ext2fs/ext2_lookup.c Modified: head/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- head/sys/fs/ext2fs/ext2_htree.c Fri Jan 24 13:36:41 2014 (r261119) +++ head/sys/fs/ext2fs/ext2_htree.c Fri Jan 24 13:51:38 2014 (r261120) @@ -89,12 +89,10 @@ static int ext2_htree_writebuf(struct ex int ext2_htree_has_idx(struct inode *ip) { -#ifdef EXT2FS_HTREE if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && ip->i_flags & E4_INDEX) return (1); else -#endif return (0); } Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Fri Jan 24 13:36:41 2014 (r261119) +++ head/sys/fs/ext2fs/ext2_lookup.c Fri Jan 24 13:51:38 2014 (r261120) @@ -884,13 +884,11 @@ ext2_direnter(struct inode *ip, struct v bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1); newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen); -#ifdef EXT2FS_HTREE if (ext2_htree_has_idx(dp)) { error = ext2_htree_add_entry(dvp, &newdir, cnp); if (error) { - /* XXX: These are set in the wrong place. */ dp->i_flags &= ~E4_INDEX; - dp->i_flags |= IN_CHANGE | IN_UPDATE; + dp->i_flag |= IN_CHANGE | IN_UPDATE; } return (error); } @@ -906,7 +904,6 @@ ext2_direnter(struct inode *ip, struct v return ext2_htree_create_index(dvp, cnp, &newdir); } } -#endif /* EXT2FS_HTREE */ if (dp->i_count == 0) { /* From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 14:31:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1952F473; Fri, 24 Jan 2014 14:31:49 +0000 (UTC) Received: from mail-qc0-x22d.google.com (mail-qc0-x22d.google.com [IPv6:2607:f8b0:400d:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 954B7128D; Fri, 24 Jan 2014 14:31:48 +0000 (UTC) Received: by mail-qc0-f173.google.com with SMTP id i8so4414016qcq.18 for ; Fri, 24 Jan 2014 06:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Fj+EiKm3xM0nF2Pm7brsEaW4NYG0BPASTKANmXmfHmw=; b=FMdX6gtKFzY9wivtNjMPzo5623yI+9m4kDRFO7odVyE2hGY7oPeUEGul5N+y/FOG55 dKmSZ68HJBgoHY28Xhvu+sH8kGzkbleS15x3PIQTF0BxTAcoNtDtTrUcX86Dst5grbg5 E6gRuqWpVNwhFguRnLA+9HfneFXGv451mS9c6Kpm+TgoW1h/8zgMRIDXeexiaOLaiN/s EKf5qVAVPNsQAOFSFkxZrjiWrrAJK88SdXs3bCP0XCFnsmRSKeMTIbkgN5/SzdAg3/70 hnZpbbLBzcF7MiJWbwfapLJR/4aCF35dQJaa2bMPkPMqtLp4dCwe67k4gzGDeqlWUBTt /XBg== MIME-Version: 1.0 X-Received: by 10.224.46.8 with SMTP id h8mr21065485qaf.49.1390573907085; Fri, 24 Jan 2014 06:31:47 -0800 (PST) Received: by 10.224.52.8 with HTTP; Fri, 24 Jan 2014 06:31:46 -0800 (PST) Received: by 10.224.52.8 with HTTP; Fri, 24 Jan 2014 06:31:46 -0800 (PST) In-Reply-To: <201401240917.s0O9HTBO046991@svn.freebsd.org> References: <201401240917.s0O9HTBO046991@svn.freebsd.org> Date: Fri, 24 Jan 2014 06:31:46 -0800 Message-ID: Subject: Re: svn commit: r261118 - head/sys/dev/usb/wlan From: Adrian Chadd To: Kevin Lo Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 14:31:49 -0000 Memmove() isn't portable? To what? Adrian On Jan 24, 2014 4:17 AM, "Kevin Lo" wrote: > Author: kevlo > Date: Fri Jan 24 09:17:29 2014 > New Revision: 261118 > URL: http://svnweb.freebsd.org/changeset/base/261118 > > Log: > Get rid of memmove(). It's not portable. > > Tested on RT3071, RT3573, RT3570, RT3572, and RT5572. > > Reviewed by: hselasky > > Modified: > head/sys/dev/usb/wlan/if_run.c > > Modified: head/sys/dev/usb/wlan/if_run.c > > ============================================================================== > --- head/sys/dev/usb/wlan/if_run.c Fri Jan 24 09:13:30 2014 > (r261117) > +++ head/sys/dev/usb/wlan/if_run.c Fri Jan 24 09:17:29 2014 > (r261118) > @@ -359,8 +359,6 @@ static int run_write(struct run_softc *, > static int run_write_region_1(struct run_softc *, uint16_t, > const uint8_t *, int); > static int run_set_region_4(struct run_softc *, uint16_t, uint32_t, > int); > -static int run_rf3593_efuse_read_1(struct run_softc *, uint16_t, > - uint16_t *); > static int run_efuse_read(struct run_softc *, uint16_t, uint16_t *, > int); > static int run_efuse_read_2(struct run_softc *, uint16_t, uint16_t *); > static int run_eeprom_read_2(struct run_softc *, uint16_t, uint16_t > *); > @@ -1344,12 +1342,6 @@ run_set_region_4(struct run_softc *sc, u > } > > static int > -run_rf3593_efuse_read_1(struct run_softc *sc, uint16_t addr, uint16_t > *val) > -{ > - return (run_efuse_read(sc, addr * 2, val, 1)); > -} > - > -static int > run_efuse_read(struct run_softc *sc, uint16_t addr, uint16_t *val, int > count) > { > uint32_t tmp; > @@ -1390,12 +1382,9 @@ run_efuse_read(struct run_softc *sc, uin > if ((error = run_read(sc, reg, &tmp)) != 0) > return (error); > > - if (count == 2) > - *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; > - else { > - tmp >>= (8 *(addr & 0x3)); > - memmove(val, &tmp, sizeof(*val)); > - } > + tmp >>= (8 * (addr & 0x3)); > + *val = (addr & 1) ? tmp >> 16 : tmp & 0xffff; > + > return (0); > } > > @@ -1753,10 +1742,8 @@ run_read_eeprom(struct run_softc *sc) > if (sc->mac_ver >= 0x3070) { > run_read(sc, RT3070_EFUSE_CTRL, &tmp); > DPRINTF("EFUSE_CTRL=0x%08x\n", tmp); > - if ((tmp & RT3070_SEL_EFUSE) && sc->mac_ver != 0x3593) > + if ((tmp & RT3070_SEL_EFUSE) || sc->mac_ver == 0x3593) > sc->sc_srom_read = run_efuse_read_2; > - else > - sc->sc_srom_read = run_rf3593_efuse_read_1; > } > > /* read ROM version */ > From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 14:33:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E02DC5E5; Fri, 24 Jan 2014 14:33:44 +0000 (UTC) Received: from mta05.bitpro.no (mta05.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id 9706012A4; Fri, 24 Jan 2014 14:33:44 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta05.bitpro.no (Postfix) with ESMTPS id 9DDA017FCAF; Fri, 24 Jan 2014 15:33:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id 17DB7160BE9; Fri, 24 Jan 2014 15:34:27 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BhQQDRG7YIbF; Fri, 24 Jan 2014 15:34:26 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 308AF160BE6; Fri, 24 Jan 2014 15:34:26 +0100 (CET) Message-ID: <52E279FD.70909@bitfrost.no> Date: Fri, 24 Jan 2014 15:34:37 +0100 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd , Kevin Lo Subject: Re: svn commit: r261118 - head/sys/dev/usb/wlan References: <201401240917.s0O9HTBO046991@svn.freebsd.org> In-Reply-To: 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 14:33:45 -0000 On 01/24/14 15:31, Adrian Chadd wrote: > Memmove() isn't portable? To what? > Hi, memmove() doesn't know about the byte order when you copy inside an integer. s/memmove/code/ is not portable. --HPS From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:03:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34C515C4; Fri, 24 Jan 2014 15:03:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 206A71594; Fri, 24 Jan 2014 15:03:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OF3uH6084274; Fri, 24 Jan 2014 15:03:56 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OF3uvI084270; Fri, 24 Jan 2014 15:03:56 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201401241503.s0OF3uvI084270@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 24 Jan 2014 15:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261121 - head/bin/sh/tests/parser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:03:57 -0000 Author: jilles Date: Fri Jan 24 15:03:56 2014 New Revision: 261121 URL: http://svnweb.freebsd.org/changeset/base/261121 Log: sh: Add test for nested alias. Added: head/bin/sh/tests/parser/alias11.0 (contents, props changed) Modified: head/bin/sh/tests/parser/Makefile Modified: head/bin/sh/tests/parser/Makefile ============================================================================== --- head/bin/sh/tests/parser/Makefile Fri Jan 24 13:51:38 2014 (r261120) +++ head/bin/sh/tests/parser/Makefile Fri Jan 24 15:03:56 2014 (r261121) @@ -15,6 +15,7 @@ FILES+= alias7.0 FILES+= alias8.0 FILES+= alias9.0 FILES+= alias10.0 +FILES+= alias11.0 FILES+= and-pipe-not.0 FILES+= case1.0 FILES+= case2.0 Added: head/bin/sh/tests/parser/alias11.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parser/alias11.0 Fri Jan 24 15:03:56 2014 (r261121) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +alias alias0=alias1 +alias alias1=exit +alias0 0 +exit 3 From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:04:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 090B2697; Fri, 24 Jan 2014 15:04:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA5951595; Fri, 24 Jan 2014 15:04:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OF42hW084339; Fri, 24 Jan 2014 15:04:02 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OF42PD084338; Fri, 24 Jan 2014 15:04:02 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201401241504.s0OF42PD084338@svn.freebsd.org> From: Andriy Gapon Date: Fri, 24 Jan 2014 15:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261122 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:04:03 -0000 Author: avg Date: Fri Jan 24 15:04:02 2014 New Revision: 261122 URL: http://svnweb.freebsd.org/changeset/base/261122 Log: dtrace: remove unexplained 16MB limitation from dt_alloc/dt_zalloc The limitation was introduced in r178556 without any note or comment. It seems pretty artificial and now it leads to problems like the following: $ dtrace -x bufsize=17m -n ... dtrace: processing aborted: Memory allocation failure OpenSolaris and illumos never had this limitation. Sponsored by: HybridCluster Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Fri Jan 24 15:03:56 2014 (r261121) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Fri Jan 24 15:04:02 2014 (r261122) @@ -734,11 +734,6 @@ dt_zalloc(dtrace_hdl_t *dtp, size_t size { void *data; - if (size > 16 * 1024 * 1024) { - (void) dt_set_errno(dtp, EDT_NOMEM); - return (NULL); - } - if ((data = malloc(size)) == NULL) (void) dt_set_errno(dtp, EDT_NOMEM); else @@ -752,11 +747,6 @@ dt_alloc(dtrace_hdl_t *dtp, size_t size) { void *data; - if (size > 16 * 1024 * 1024) { - (void) dt_set_errno(dtp, EDT_NOMEM); - return (NULL); - } - if ((data = malloc(size)) == NULL) (void) dt_set_errno(dtp, EDT_NOMEM); From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:05:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29B4A87E; Fri, 24 Jan 2014 15:05:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15CD315A6; Fri, 24 Jan 2014 15:05:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OF5SF5084603; Fri, 24 Jan 2014 15:05:28 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OF5SuS084602; Fri, 24 Jan 2014 15:05:28 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401241505.s0OF5SuS084602@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 15:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261123 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:05:29 -0000 Author: hselasky Date: Fri Jan 24 15:05:28 2014 New Revision: 261123 URL: http://svnweb.freebsd.org/changeset/base/261123 Log: Hide now harmless warning from dmesg. MFC after: 1 week Modified: head/sys/dev/usb/usb_dev.c Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Fri Jan 24 15:04:02 2014 (r261122) +++ head/sys/dev/usb/usb_dev.c Fri Jan 24 15:05:28 2014 (r261123) @@ -930,7 +930,7 @@ usb_close(void *arg) err = usb_ref_device(cpd, &refs, 2 /* uref and allow detached state */); if (err) { - DPRINTFN(0, "Cannot grab USB reference when " + DPRINTFN(2, "Cannot grab USB reference when " "closing USB file handle\n"); goto done; } From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:12:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F36D2B3E; Fri, 24 Jan 2014 15:11:59 +0000 (UTC) Received: from mail-qc0-x22b.google.com (mail-qc0-x22b.google.com [IPv6:2607:f8b0:400d:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7B45A163D; Fri, 24 Jan 2014 15:11:59 +0000 (UTC) Received: by mail-qc0-f171.google.com with SMTP id n7so4486705qcx.2 for ; Fri, 24 Jan 2014 07:11:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1yrSS0DKKdyXJlmET8ht/OV4vC31ipTIZYqH7PBX23o=; b=u99hHb9KFV6hJmwIF6LvfQR9BLtMynV9ym69T+Mjy7LiG3GBcsfhOdrdeuq8K59tsD fbAXUD7Of+9nviLxH3EJJmPrASOE1Pr9Pl6P2kIaqn9JHxVH9MUbGWNuosfm98+s+lZg ym7NPSVrTt6fsyg28F6X/yb1HxZytGnnJcW8WpDLNnaPB4wMdn3M8oJW9Bw4cRRKr/+3 RmphNSYV2pE6XPZbHp4TOoZdKttI0ksn159kAy1ktjLDp61infRSyS32i6JUXy4zm4P6 NOD0lmMa+VbipiyFGYLglts6UUFK6vF5STHUu5zhhQWh/v9l0aRy/Euq+oFks+kvexuw ApPA== MIME-Version: 1.0 X-Received: by 10.229.56.200 with SMTP id z8mr21235381qcg.1.1390576318606; Fri, 24 Jan 2014 07:11:58 -0800 (PST) Received: by 10.224.52.8 with HTTP; Fri, 24 Jan 2014 07:11:58 -0800 (PST) Received: by 10.224.52.8 with HTTP; Fri, 24 Jan 2014 07:11:58 -0800 (PST) In-Reply-To: <52E279FD.70909@bitfrost.no> References: <201401240917.s0O9HTBO046991@svn.freebsd.org> <52E279FD.70909@bitfrost.no> Date: Fri, 24 Jan 2014 07:11:58 -0800 Message-ID: Subject: Re: svn commit: r261118 - head/sys/dev/usb/wlan From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: svn-src-head@freebsd.org, Kevin Lo , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:12:00 -0000 ... How's that matter? Adrian On Jan 24, 2014 9:33 AM, "Hans Petter Selasky" wrote: > On 01/24/14 15:31, Adrian Chadd wrote: > >> Memmove() isn't portable? To what? >> >> > Hi, > > memmove() doesn't know about the byte order when you copy inside an > integer. s/memmove/code/ is not portable. > > --HPS > > From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:16:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32E4BCA9; Fri, 24 Jan 2014 15:16:01 +0000 (UTC) Received: from mta05.bitpro.no (mta05.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id DB2AE1659; Fri, 24 Jan 2014 15:16:00 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta05.bitpro.no (Postfix) with ESMTPS id F20B317FCA0; Fri, 24 Jan 2014 16:15:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id 6EF9C160BDB; Fri, 24 Jan 2014 16:16:49 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nqONWgxXdPMy; Fri, 24 Jan 2014 16:16:48 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 90739160BDA; Fri, 24 Jan 2014 16:16:48 +0100 (CET) Message-ID: <52E283EA.1050708@bitfrost.no> Date: Fri, 24 Jan 2014 16:16:58 +0100 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r261118 - head/sys/dev/usb/wlan References: <201401240917.s0O9HTBO046991@svn.freebsd.org> <52E279FD.70909@bitfrost.no> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Kevin Lo , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:16:01 -0000 On 01/24/14 16:11, Adrian Chadd wrote: > ... How's that matter? > > Adrian Ok, read slowly: uint32_t x = 255U; uint8_t y; On Big endian: memcpy(&y, &x, 1); y == 0; On Little endian: memcpy(&y, &x, 1); y == 255; If I'm not mistaken. The code is wrong because result depends on endianness :-) --HPS From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:19:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA32BEAF; Fri, 24 Jan 2014 15:19:07 +0000 (UTC) Received: from mail-qc0-x229.google.com (mail-qc0-x229.google.com [IPv6:2607:f8b0:400d:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3250216C8; Fri, 24 Jan 2014 15:19:07 +0000 (UTC) Received: by mail-qc0-f169.google.com with SMTP id w7so4566562qcr.14 for ; Fri, 24 Jan 2014 07:19:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=L/RFRD8QnJ88B3wRr1hTcfyvFF18EH7KOMQ4gPzV2S0=; b=PyToNWv1ikpp9Q91L/utzD2jS/4ouvjhEmnRQIbj3YDq4llnZHTkY3VEljbevV1ylX fmdlF0/BRLlCJ/5F2maCJ7mp7cg1Pz2ROkplqlEWA3o3yTKhrePq6HO1Iknlv5xuitvW mhj/SFT5PMIRXnp0i/iGQtUpAvUBSh3KMdjrILICPIyshSHKOOHxEZvgvDrA0EWBi6Q4 pc8AEaRMJBaKgaz7GhO00YrjcYSu69ThPdxY2bftSsJuIdT7C5CAQ1v0zi0Yh46NltXn bXzHwsj47Ffil1GSX6EhgyFAk3KYeHtrLZ8HV8jvkmyU2E+OWhWI4amsRYyUt1tib06v F9fg== MIME-Version: 1.0 X-Received: by 10.224.122.208 with SMTP id m16mr21372343qar.55.1390576746283; Fri, 24 Jan 2014 07:19:06 -0800 (PST) Received: by 10.224.52.8 with HTTP; Fri, 24 Jan 2014 07:19:06 -0800 (PST) In-Reply-To: <52E283EA.1050708@bitfrost.no> References: <201401240917.s0O9HTBO046991@svn.freebsd.org> <52E279FD.70909@bitfrost.no> <52E283EA.1050708@bitfrost.no> Date: Fri, 24 Jan 2014 07:19:06 -0800 Message-ID: Subject: Re: svn commit: r261118 - head/sys/dev/usb/wlan From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , Kevin Lo , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:19:07 -0000 On 24 January 2014 07:16, Hans Petter Selasky wrote: > On 01/24/14 16:11, Adrian Chadd wrote: >> >> ... How's that matter? >> >> Adrian > > > Ok, read slowly: > > uint32_t x = 255U; > uint8_t y; > > On Big endian: > > memcpy(&y, &x, 1); > > y == 0; > > On Little endian: > > memcpy(&y, &x, 1); > > y == 255; > > If I'm not mistaken. The code is wrong because result depends on endianness > :-) Right. But that has nothing to do with the memory copy operation. That has to do with how its stored. So again - how's memmove() not portable here? :) -a From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:30:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9291033F; Fri, 24 Jan 2014 15:30:14 +0000 (UTC) Received: from valery.van-laarhoven.org (unknown [IPv6:2a02:2308::216:3eff:fe79:3a6c]) by mx1.freebsd.org (Postfix) with ESMTP id 52E541850; Fri, 24 Jan 2014 15:30:14 +0000 (UTC) Received: from hitske.fritz.box (thuis.van-laarhoven.org [80.100.41.4]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by valery.van-laarhoven.org (Postfix) with ESMTPSA id CFA6F67ED43; Fri, 24 Jan 2014 16:30:10 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_C218300F-9AA9-46CD-AE0D-8C587BCDF7FA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r261115 - stable/10/sys/dev/usb/net From: Nick Hibma In-Reply-To: <201401240822.s0O8MTvp026870@svn.freebsd.org> Date: Fri, 24 Jan 2014 16:30:09 +0100 Message-Id: <1B976032-5B0E-488B-806F-E71FE2F04803@van-laarhoven.org> References: <201401240822.s0O8MTvp026870@svn.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1827) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:30:14 -0000 --Apple-Mail=_C218300F-9AA9-46CD-AE0D-8C587BCDF7FA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 It=92s not just the GTM661 that supports uhso, the GTM382 does so to I = think. Perhaps you want to move them all in that case? Or add them to both and let devd decide? Nick On 24 Jan 2014, at 09:22, Hans Petter Selasky = wrote: > Author: hselasky > Date: Fri Jan 24 08:22:29 2014 > New Revision: 261115 > URL: http://svnweb.freebsd.org/changeset/base/261115 >=20 > Log: > MFC r260534: > Move USB ID from u3g driver to uhso driver. >=20 > Modified: > stable/10/sys/dev/usb/net/uhso.c > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/sys/dev/usb/net/uhso.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 > --- stable/10/sys/dev/usb/net/uhso.c Fri Jan 24 08:19:50 2014 = (r261114) > +++ stable/10/sys/dev/usb/net/uhso.c Fri Jan 24 08:22:29 2014 = (r261115) > @@ -268,6 +268,8 @@ static const STRUCT_USB_HOST_ID uhso_dev > UHSO_DEV(OPTION, ICON401, UHSO_AUTO_IFACE), > /* Option GlobeTrotter Module 382 */ > UHSO_DEV(OPTION, GMT382, UHSO_AUTO_IFACE), > + /* Option GTM661W */ > + UHSO_DEV(OPTION, GTM661W, UHSO_AUTO_IFACE), > /* Option iCON EDGE */ > UHSO_DEV(OPTION, ICONEDGE, UHSO_STATIC_IFACE), > /* Option Module HSxPA */ > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" --Apple-Mail=_C218300F-9AA9-46CD-AE0D-8C587BCDF7FA Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlLihwEACgkQBxE2H56uaYm/8wCfRgENDtTXND58TCQk3PChMXod xJMAoIZLG131JOp5dB10c13Yr44JKSWr =D2uX -----END PGP SIGNATURE----- --Apple-Mail=_C218300F-9AA9-46CD-AE0D-8C587BCDF7FA-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:34:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 809075CD; Fri, 24 Jan 2014 15:34:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D07618DD; Fri, 24 Jan 2014 15:34:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OFYNk7095959; Fri, 24 Jan 2014 15:34:23 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OFYNct095958; Fri, 24 Jan 2014 15:34:23 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201401241534.s0OFYNct095958@svn.freebsd.org> From: Kevin Lo Date: Fri, 24 Jan 2014 15:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261124 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 15:34:23 -0000 Author: kevlo Date: Fri Jan 24 15:34:22 2014 New Revision: 261124 URL: http://svnweb.freebsd.org/changeset/base/261124 Log: Fix comment. Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Jan 24 15:05:28 2014 (r261123) +++ head/sys/dev/usb/wlan/if_run.c Fri Jan 24 15:34:22 2014 (r261124) @@ -1388,7 +1388,7 @@ run_efuse_read(struct run_softc *sc, uin return (0); } -/* Read 16-bit from eFUSE ROM (RT3070 only.) */ +/* Read 16-bit from eFUSE ROM for RT3xxx. */ static int run_efuse_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 16:40:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 988ED40B; Fri, 24 Jan 2014 16:40:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7882F115C; Fri, 24 Jan 2014 16:40:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OGeqsu021573; Fri, 24 Jan 2014 16:40:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OGepC0021562; Fri, 24 Jan 2014 16:40:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201401241640.s0OGepC0021562@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 24 Jan 2014 16:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261125 - in head/bin/sh: . tests/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:40:52 -0000 Author: jilles Date: Fri Jan 24 16:40:51 2014 New Revision: 261125 URL: http://svnweb.freebsd.org/changeset/base/261125 Log: sh: Solve the alias recursion problem in a less hackish way. Add the space to avoid alias recursion when the alias is expanded, not when it is added. As a result, displaying an alias via command -v, command -V or type no longer erroneously appends a space. Adjust the tests so they now require this bug to be absent. Modified: head/bin/sh/alias.c head/bin/sh/input.c head/bin/sh/tests/builtins/command3.0.stdout head/bin/sh/tests/builtins/command5.0.stdout head/bin/sh/tests/builtins/command6.0.stdout Modified: head/bin/sh/alias.c ============================================================================== --- head/bin/sh/alias.c Fri Jan 24 15:34:22 2014 (r261124) +++ head/bin/sh/alias.c Fri Jan 24 16:40:51 2014 (r261125) @@ -68,18 +68,7 @@ setalias(const char *name, const char *v if (equal(name, ap->name)) { INTOFF; ckfree(ap->val); - /* See HACK below. */ -#ifdef notyet ap->val = savestr(val); -#else - { - size_t len = strlen(val); - ap->val = ckmalloc(len + 2); - memcpy(ap->val, val, len); - ap->val[len] = ' '; - ap->val[len+1] = '\0'; - } -#endif INTON; return; } @@ -88,34 +77,7 @@ setalias(const char *name, const char *v INTOFF; ap = ckmalloc(sizeof (struct alias)); ap->name = savestr(name); - /* - * XXX - HACK: in order that the parser will not finish reading the - * alias value off the input before processing the next alias, we - * dummy up an extra space at the end of the alias. This is a crock - * and should be re-thought. The idea (if you feel inclined to help) - * is to avoid alias recursions. The mechanism used is: when - * expanding an alias, the value of the alias is pushed back on the - * input as a string and a pointer to the alias is stored with the - * string. The alias is marked as being in use. When the input - * routine finishes reading the string, it marks the alias not - * in use. The problem is synchronization with the parser. Since - * it reads ahead, the alias is marked not in use before the - * resulting token(s) is next checked for further alias sub. The - * H A C K is that we add a little fluff after the alias value - * so that the string will not be exhausted. This is a good - * idea ------- ***NOT*** - */ -#ifdef notyet ap->val = savestr(val); -#else /* hack */ - { - size_t len = strlen(val); - ap->val = ckmalloc(len + 2); - memcpy(ap->val, val, len); - ap->val[len] = ' '; /* fluff */ - ap->val[len+1] = '\0'; - } -#endif ap->flag = 0; ap->next = *app; *app = ap; @@ -207,14 +169,8 @@ comparealiases(const void *p1, const voi static void printalias(const struct alias *a) { - char *p; - out1fmt("%s=", a->name); - /* Don't print the space added above. */ - p = a->val + strlen(a->val) - 1; - *p = '\0'; out1qstr(a->val); - *p = ' '; out1c('\n'); } Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Fri Jan 24 15:34:22 2014 (r261124) +++ head/bin/sh/input.c Fri Jan 24 16:40:51 2014 (r261125) @@ -226,7 +226,14 @@ preadbuffer(void) int more; char savec; - if (parsefile->strpush) { + while (parsefile->strpush) { + /* + * Add a space to the end of an alias to ensure that the + * alias remains in use while parsing its last word. + * This avoids alias recursions. + */ + if (parsenleft == -1 && parsefile->strpush->ap != NULL) + return ' '; popstring(); if (--parsenleft >= 0) return (*parsenextc++); Modified: head/bin/sh/tests/builtins/command3.0.stdout ============================================================================== --- head/bin/sh/tests/builtins/command3.0.stdout Fri Jan 24 15:34:22 2014 (r261124) +++ head/bin/sh/tests/builtins/command3.0.stdout Fri Jan 24 16:40:51 2014 (r261125) @@ -4,4 +4,4 @@ true fun break if -alias foo='bar ' +alias foo=bar Modified: head/bin/sh/tests/builtins/command5.0.stdout ============================================================================== --- head/bin/sh/tests/builtins/command5.0.stdout Fri Jan 24 15:34:22 2014 (r261124) +++ head/bin/sh/tests/builtins/command5.0.stdout Fri Jan 24 16:40:51 2014 (r261125) @@ -5,4 +5,4 @@ fun is a shell function break is a special shell builtin if is a shell keyword { is a shell keyword -foo is an alias for bar +foo is an alias for bar Modified: head/bin/sh/tests/builtins/command6.0.stdout ============================================================================== --- head/bin/sh/tests/builtins/command6.0.stdout Fri Jan 24 15:34:22 2014 (r261124) +++ head/bin/sh/tests/builtins/command6.0.stdout Fri Jan 24 16:40:51 2014 (r261125) @@ -4,4 +4,4 @@ fun is a shell function break is a special shell builtin if is a shell keyword { is a shell keyword -foo is an alias for bar +foo is an alias for bar From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 16:50:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7853F824; Fri, 24 Jan 2014 16:50:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 654291227; Fri, 24 Jan 2014 16:50:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OGoG8m026189; Fri, 24 Jan 2014 16:50:16 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OGoGPp026187; Fri, 24 Jan 2014 16:50:16 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401241650.s0OGoGPp026187@svn.freebsd.org> From: Warner Losh Date: Fri, 24 Jan 2014 16:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261126 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:50:16 -0000 Author: imp Date: Fri Jan 24 16:50:15 2014 New Revision: 261126 URL: http://svnweb.freebsd.org/changeset/base/261126 Log: Remove redundant declaration for uart devclass. Commint some unrelated, but harmless, FDT ifdefs. Modified: head/sys/arm/at91/uart_bus_at91usart.c head/sys/arm/at91/uart_cpu_at91usart.c Modified: head/sys/arm/at91/uart_bus_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_bus_at91usart.c Fri Jan 24 16:40:51 2014 (r261125) +++ head/sys/arm/at91/uart_bus_at91usart.c Fri Jan 24 16:50:15 2014 (r261126) @@ -48,8 +48,6 @@ __FBSDID("$FreeBSD$"); static int usart_at91_probe(device_t dev); -extern struct uart_class at91_usart_class; - static device_method_t usart_at91_methods[] = { /* Device interface */ DEVMETHOD(device_probe, usart_at91_probe), Modified: head/sys/arm/at91/uart_cpu_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_cpu_at91usart.c Fri Jan 24 16:40:51 2014 (r261125) +++ head/sys/arm/at91/uart_cpu_at91usart.c Fri Jan 24 16:50:15 2014 (r261126) @@ -26,8 +26,10 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" #include "opt_uart.h" +#ifndef FDT #include __FBSDID("$FreeBSD$"); @@ -48,7 +50,6 @@ __FBSDID("$FreeBSD$"); bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; -extern struct uart_class at91_usart_class; extern struct bus_space at91_bs_tag; int @@ -86,3 +87,4 @@ uart_cpu_getdev(int devtype, struct uart uart_getenv(devtype, di, class); return (0); } +#endif From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 16:56:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28C8DCA3; Fri, 24 Jan 2014 16:56:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF3C21275; Fri, 24 Jan 2014 16:56:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OGuR5o027735; Fri, 24 Jan 2014 16:56:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OGuRB5027734; Fri, 24 Jan 2014 16:56:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401241656.s0OGuRB5027734@svn.freebsd.org> From: Warner Losh Date: Fri, 24 Jan 2014 16:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261127 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:56:28 -0000 Author: imp Date: Fri Jan 24 16:56:27 2014 New Revision: 261127 URL: http://svnweb.freebsd.org/changeset/base/261127 Log: Add NAND support Fix comment This board has 4 wire support Modified: head/sys/arm/conf/SAM9G20EK Modified: head/sys/arm/conf/SAM9G20EK ============================================================================== --- head/sys/arm/conf/SAM9G20EK Fri Jan 24 16:50:15 2014 (r261126) +++ head/sys/arm/conf/SAM9G20EK Fri Jan 24 16:56:27 2014 (r261127) @@ -37,7 +37,8 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk +options NANDFS #NAND file system options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager @@ -91,6 +92,9 @@ option AT91_ATE_USE_RMII device at91_twi # TWI: Two Wire Interface (EEPROM) device at91_wdt # WDT: Watchdog timer +# NAND Flash - Reference design has Samsung 256MB but others possible +device nand # NAND interface on CS3 + # NOTE: SPI DataFlash and mci/mmc/mmcsd have hardware # confilict on this card. Use one or the other. # see board_sam9g20ek.c @@ -105,7 +109,7 @@ device at91_mci device mmc device mmcsd option AT91_MCI_SLOT_B -#option AT91_MCI_HAS_4WIRE +option AT91_MCI_HAS_4WIRE # iic device iic @@ -128,14 +132,14 @@ device uhid # "Human Interface Devices #device udbp # USB Double Bulk Pipe devices # USB Ethernet, requires miibus -device miibus +#device miibus #device aue # ADMtek USB Ethernet #device axe # ASIX Electronics USB Ethernet #device cdce # Generic USB over Ethernet #device cue # CATC USB Ethernet #device kue # Kawasaki LSI USB Ethernet #device rue # RealTek RTL8150 USB Ethernet -device udav # Davicom DM9601E USB +#device udav # Davicom DM9601E USB # USB Wireless #device rum # Ralink Technology RT2501USB wireless NICs @@ -149,4 +153,3 @@ device udav # Davicom DM9601E USB #device wlan_ccmp # 802.11 CCMP support #device wlan_tkip # 802.11 TKIP support #device wlan_amrr # AMRR transmit rate control algorithm - From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 16:57:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10C26DF0; Fri, 24 Jan 2014 16:57:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D77BB127F; Fri, 24 Jan 2014 16:57:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OGvhdv027899; Fri, 24 Jan 2014 16:57:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OGvhBS027896; Fri, 24 Jan 2014 16:57:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401241657.s0OGvhBS027896@svn.freebsd.org> From: Warner Losh Date: Fri, 24 Jan 2014 16:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261128 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:57:44 -0000 Author: imp Date: Fri Jan 24 16:57:42 2014 New Revision: 261128 URL: http://svnweb.freebsd.org/changeset/base/261128 Log: Fix comment to match option Modified: head/sys/arm/conf/BWCT head/sys/arm/conf/QILA9G20 head/sys/arm/conf/SN9G45 Modified: head/sys/arm/conf/BWCT ============================================================================== --- head/sys/arm/conf/BWCT Fri Jan 24 16:56:27 2014 (r261127) +++ head/sys/arm/conf/BWCT Fri Jan 24 16:57:42 2014 (r261128) @@ -41,7 +41,7 @@ options SOFTUPDATES #Enable FFS soft u #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk #options ROOTDEVNAME=\"ufs:md0\" #options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" options NFSCL #New Network Filesystem Client Modified: head/sys/arm/conf/QILA9G20 ============================================================================== --- head/sys/arm/conf/QILA9G20 Fri Jan 24 16:56:27 2014 (r261127) +++ head/sys/arm/conf/QILA9G20 Fri Jan 24 16:57:42 2014 (r261128) @@ -38,7 +38,7 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager Modified: head/sys/arm/conf/SN9G45 ============================================================================== --- head/sys/arm/conf/SN9G45 Fri Jan 24 16:56:27 2014 (r261127) +++ head/sys/arm/conf/SN9G45 Fri Jan 24 16:57:42 2014 (r261128) @@ -37,7 +37,7 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 16:58:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE335F3F; Fri, 24 Jan 2014 16:58:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BAEB2128B; Fri, 24 Jan 2014 16:58:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OGwLA8028017; Fri, 24 Jan 2014 16:58:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OGwLZo028016; Fri, 24 Jan 2014 16:58:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401241658.s0OGwLZo028016@svn.freebsd.org> From: Warner Losh Date: Fri, 24 Jan 2014 16:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261129 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:58:21 -0000 Author: imp Date: Fri Jan 24 16:58:21 2014 New Revision: 261129 URL: http://svnweb.freebsd.org/changeset/base/261129 Log: Fix comment to match option Modified: head/sys/arm/conf/HL200 Modified: head/sys/arm/conf/HL200 ============================================================================== --- head/sys/arm/conf/HL200 Fri Jan 24 16:57:42 2014 (r261128) +++ head/sys/arm/conf/HL200 Fri Jan 24 16:58:21 2014 (r261129) @@ -37,7 +37,7 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk #options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 16:58:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAFFD109; Fri, 24 Jan 2014 16:58:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9787B128F; Fri, 24 Jan 2014 16:58:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OGwoMY028107; Fri, 24 Jan 2014 16:58:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OGwo0u028106; Fri, 24 Jan 2014 16:58:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401241658.s0OGwo0u028106@svn.freebsd.org> From: Warner Losh Date: Fri, 24 Jan 2014 16:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261130 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:58:50 -0000 Author: imp Date: Fri Jan 24 16:58:50 2014 New Revision: 261130 URL: http://svnweb.freebsd.org/changeset/base/261130 Log: Fix comment to match option Modified: head/sys/arm/conf/SAM9X25EK Modified: head/sys/arm/conf/SAM9X25EK ============================================================================== --- head/sys/arm/conf/SAM9X25EK Fri Jan 24 16:58:21 2014 (r261129) +++ head/sys/arm/conf/SAM9X25EK Fri Jan 24 16:58:50 2014 (r261130) @@ -38,7 +38,7 @@ options FFS #Berkeley Fast Filesystem #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device -#options MD_ROOT_SIZE=4096 # 3MB ram disk +#options MD_ROOT_SIZE=4096 # 4MB ram disk options NFSCL #New Network Filesystem Client #options NFSD #New Network Filesystem Server #options NFSLOCKD #Network Lock Manager From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 17:00:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57A01280; Fri, 24 Jan 2014 17:00:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29FDA12A7; Fri, 24 Jan 2014 17:00:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OH0SKP028564; Fri, 24 Jan 2014 17:00:28 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OH0R28028559; Fri, 24 Jan 2014 17:00:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401241700.s0OH0R28028559@svn.freebsd.org> From: Warner Losh Date: Fri, 24 Jan 2014 17:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261131 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 17:00:28 -0000 Author: imp Date: Fri Jan 24 17:00:27 2014 New Revision: 261131 URL: http://svnweb.freebsd.org/changeset/base/261131 Log: Remove obsolete option Modified: head/sys/arm/conf/QILA9G20 head/sys/arm/conf/SAM9G20EK head/sys/arm/conf/SAM9X25EK head/sys/arm/conf/SN9G45 Modified: head/sys/arm/conf/QILA9G20 ============================================================================== --- head/sys/arm/conf/QILA9G20 Fri Jan 24 16:58:50 2014 (r261130) +++ head/sys/arm/conf/QILA9G20 Fri Jan 24 17:00:27 2014 (r261131) @@ -63,7 +63,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT Modified: head/sys/arm/conf/SAM9G20EK ============================================================================== --- head/sys/arm/conf/SAM9G20EK Fri Jan 24 16:58:50 2014 (r261130) +++ head/sys/arm/conf/SAM9G20EK Fri Jan 24 17:00:27 2014 (r261131) @@ -63,7 +63,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT Modified: head/sys/arm/conf/SAM9X25EK ============================================================================== --- head/sys/arm/conf/SAM9X25EK Fri Jan 24 16:58:50 2014 (r261130) +++ head/sys/arm/conf/SAM9X25EK Fri Jan 24 17:00:27 2014 (r261131) @@ -63,7 +63,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT Modified: head/sys/arm/conf/SN9G45 ============================================================================== --- head/sys/arm/conf/SN9G45 Fri Jan 24 16:58:50 2014 (r261130) +++ head/sys/arm/conf/SN9G45 Fri Jan 24 17:00:27 2014 (r261131) @@ -62,7 +62,6 @@ options SYSVSHM #SYSV-style shared me options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options SYSCTL_OMIT_DESCR options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 18:01:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB7044B8; Fri, 24 Jan 2014 18:01:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB81C1988; Fri, 24 Jan 2014 18:01:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OI1kXM054369; Fri, 24 Jan 2014 18:01:46 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OI1kdU054368; Fri, 24 Jan 2014 18:01:46 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201401241801.s0OI1kdU054368@svn.freebsd.org> From: Alan Somers Date: Fri, 24 Jan 2014 18:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261132 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:01:47 -0000 Author: asomers Date: Fri Jan 24 18:01:46 2014 New Revision: 261132 URL: http://svnweb.freebsd.org/changeset/base/261132 Log: Fix the build so -DNO_TESTS is passed in various phases that don't require tests in order to build or install. Crucially, don't try to install tests during the lib32 install phase. This commit supersedes r261081, which fixed the lib32 install phase problem, but didn't fix other phases. Submitted by: Garrett Cooper Reviewed by: sjg MFC after: 13 days Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jan 24 17:00:27 2014 (r261131) +++ head/Makefile.inc1 Fri Jan 24 18:01:46 2014 (r261132) @@ -246,7 +246,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ SSP_CFLAGS= \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DNO_PIC -DNO_PROFILE -DNO_SHARED \ - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD -DNO_TESTS # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ @@ -256,12 +256,12 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ -DNO_LINT \ - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD -DNO_TESTS # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - -DWITHOUT_GDB + -DWITHOUT_GDB -DNO_TESTS # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ @@ -414,10 +414,11 @@ LIB32WMAKEFLAGS+= \ -DLIBRARIES_ONLY \ -DNO_CPU_CFLAGS \ -DNO_CTF \ - -DNO_LINT + -DNO_LINT \ + -DNO_TESTS LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \ - -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML -DNO_TESTS + -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \ ${IMAKE_INSTALL} .endif @@ -569,7 +570,7 @@ _libraries: @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; \ ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ - -DWITHOUT_MAN -DNO_PROFILE libraries + -DWITHOUT_MAN -DNO_PROFILE -DNO_TESTS libraries _depend: @echo @echo "--------------------------------------------------------------" @@ -1501,7 +1502,12 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_secure_lib_libcrypto} ${_lib_libldns} \ ${_secure_lib_libssh} ${_secure_lib_libssl} -.if ${MK_TESTS} != "no" +.if defined(WITH_ATF) || ${MK_TESTS} != "no" +.if !defined(WITH_ATF) +# Ensure that the ATF libraries will be built during make libraries, even +# though they will have -DNO_TESTS +MAKE+= -DWITH_ATF +.endif _lib_atf= lib/atf .endif @@ -1877,7 +1883,7 @@ XDEV_CPUTYPE?=${TARGET_CPUTYPE} NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ -DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE \ - -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS \ + -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_TESTS -DNO_WARNS \ TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \ CPUTYPE=${XDEV_CPUTYPE} From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 18:04:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10A70628; Fri, 24 Jan 2014 18:04:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F131219A5; Fri, 24 Jan 2014 18:04:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OI4G3c054768; Fri, 24 Jan 2014 18:04:16 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OI4G1f054765; Fri, 24 Jan 2014 18:04:16 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201401241804.s0OI4G1f054765@svn.freebsd.org> From: Alan Somers Date: Fri, 24 Jan 2014 18:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261133 - in head/tests: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:04:17 -0000 Author: asomers Date: Fri Jan 24 18:04:16 2014 New Revision: 261133 URL: http://svnweb.freebsd.org/changeset/base/261133 Log: Fix the Makefiles so that the tests I submitted in r261081 will actually get built. Sponsored by: Spectra Logic MFC after: 13 days X-MFC-With: r261081 Modified: head/tests/Makefile head/tests/sys/Makefile Modified: head/tests/Makefile ============================================================================== --- head/tests/Makefile Fri Jan 24 18:01:46 2014 (r261132) +++ head/tests/Makefile Fri Jan 24 18:04:16 2014 (r261133) @@ -2,7 +2,7 @@ .include -SUBDIR= # still empty +SUBDIR= sys TESTSDIR= ${TESTSBASE} KYUAFILE= yes Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Fri Jan 24 18:01:46 2014 (r261132) +++ head/tests/sys/Makefile Fri Jan 24 18:04:16 2014 (r261133) @@ -2,6 +2,7 @@ .include +SUBDIR= kern TESTSDIR= ${TESTSBASE}/sys KYUAFILE= yes From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 18:52:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAE49979; Fri, 24 Jan 2014 18:52:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A65CB1E94; Fri, 24 Jan 2014 18:52:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OIq5SH073953; Fri, 24 Jan 2014 18:52:05 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OIq5t3073951; Fri, 24 Jan 2014 18:52:05 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401241852.s0OIq5t3073951@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 24 Jan 2014 18:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261134 - in head/sys/dev/usb: . quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:52:05 -0000 Author: hselasky Date: Fri Jan 24 18:52:04 2014 New Revision: 261134 URL: http://svnweb.freebsd.org/changeset/base/261134 Log: Add more USB quirks. Submitted by: Gerrit Kuehn MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Fri Jan 24 18:04:16 2014 (r261133) +++ head/sys/dev/usb/quirk/usb_quirk.c Fri Jan 24 18:52:04 2014 (r261134) @@ -164,6 +164,7 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(ASAHIOPTICAL, OPTIO330, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), + USB_QUIRK(ATP, EUSB, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(BELKIN, USB2SCSI, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(CASIO, QV_DIGICAM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Jan 24 18:04:16 2014 (r261133) +++ head/sys/dev/usb/usbdevs Fri Jan 24 18:52:04 2014 (r261134) @@ -643,6 +643,7 @@ vendor ABOCOM2 0x1482 AboCom Systems vendor SILICOM 0x1485 Silicom vendor RALINK 0x148f Ralink Technology vendor IMAGINATION 0x149a Imagination Technologies +vendor ATP 0x14af ATP Electronics vendor CONCEPTRONIC2 0x14b2 Conceptronic vendor SUPERTOP 0x14cd Super Top vendor PLANEX3 0x14ea Planex Communications @@ -1162,6 +1163,9 @@ product ATEN UC232A 0x2008 Serial product ATEN UC210T 0x2009 UC-210T Ethernet product ATEN DSB650C 0x4000 DSB-650C +/* ATP Electronics products */ +product ATP EUSB 0xaf01 ATP IG eUSB SSD + /* Atheros Communications products */ product ATHEROS AR5523 0x0001 AR5523 product ATHEROS AR5523_NF 0x0002 AR5523 (no firmware) From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 19:08:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AB86F0B; Fri, 24 Jan 2014 19:08:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6702A1F8A; Fri, 24 Jan 2014 19:08:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OJ8hRg078969; Fri, 24 Jan 2014 19:08:43 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OJ8h0T078968; Fri, 24 Jan 2014 19:08:43 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201401241908.s0OJ8h0T078968@svn.freebsd.org> From: Alan Cox Date: Fri, 24 Jan 2014 19:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261135 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:08:43 -0000 Author: alc Date: Fri Jan 24 19:08:42 2014 New Revision: 261135 URL: http://svnweb.freebsd.org/changeset/base/261135 Log: In an effort to diagnose possible corruption of struct vm_page on some sparc64 machines make the page queue assert in vm_page_dequeue() more precise. While I'm here switch the page lock assert to the newer style. Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Jan 24 18:52:04 2014 (r261134) +++ head/sys/vm/vm_page.c Fri Jan 24 19:08:42 2014 (r261135) @@ -2028,8 +2028,8 @@ vm_page_dequeue(vm_page_t m) { struct vm_pagequeue *pq; - vm_page_lock_assert(m, MA_OWNED); - KASSERT(m->queue != PQ_NONE, + vm_page_assert_locked(m); + KASSERT(m->queue == PQ_ACTIVE || m->queue == PQ_INACTIVE, ("vm_page_dequeue: page %p is not queued", m)); pq = vm_page_pagequeue(m); vm_pagequeue_lock(pq); From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 20:26:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E8375D6; Fri, 24 Jan 2014 20:26:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A60415AC; Fri, 24 Jan 2014 20:26:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OKQ0al009718; Fri, 24 Jan 2014 20:26:00 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OKQ0gp009717; Fri, 24 Jan 2014 20:26:00 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401242026.s0OKQ0gp009717@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 24 Jan 2014 20:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261136 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:26:00 -0000 Author: pfg Date: Fri Jan 24 20:26:00 2014 New Revision: 261136 URL: http://svnweb.freebsd.org/changeset/base/261136 Log: ext2fs: Re-enable reallocblk. The major corruption issues affecting this code have been fixed a while ago. MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_alloc.c Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Fri Jan 24 19:08:42 2014 (r261135) +++ head/sys/fs/ext2fs/ext2_alloc.c Fri Jan 24 20:26:00 2014 (r261136) @@ -147,11 +147,11 @@ nospace: static SYSCTL_NODE(_vfs, OID_AUTO, ext2fs, CTLFLAG_RW, 0, "EXT2FS filesystem"); -static int doasyncfree = 0; +static int doasyncfree = 1; SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "Use asychronous writes to update block pointers when freeing blocks"); -static int doreallocblks = 0; +static int doreallocblks = 1; SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); int From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 20:51:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B69AAC4; Fri, 24 Jan 2014 20:51:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB4F3178C; Fri, 24 Jan 2014 20:51:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OKpuZd020341; Fri, 24 Jan 2014 20:51:56 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OKpun0020340; Fri, 24 Jan 2014 20:51:56 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201401242051.s0OKpun0020340@svn.freebsd.org> From: Andrew Turner Date: Fri, 24 Jan 2014 20:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261137 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:51:57 -0000 Author: andrew Date: Fri Jan 24 20:51:56 2014 New Revision: 261137 URL: http://svnweb.freebsd.org/changeset/base/261137 Log: Correct the alignment of sp through functions that use UNWINDSVCFRAME. We were incorrectly adding the trap frame padding to the stack pointer after reading it's value and unaligning it. Modified: head/sys/arm/include/asmacros.h Modified: head/sys/arm/include/asmacros.h ============================================================================== --- head/sys/arm/include/asmacros.h Fri Jan 24 20:26:00 2014 (r261136) +++ head/sys/arm/include/asmacros.h Fri Jan 24 20:51:56 2014 (r261137) @@ -216,8 +216,13 @@ ldmia sp, {sp, lr, pc}^ /* Restore lr and exit */ #endif #if defined(__ARM_EABI__) +/* + * Unwind hints so we can unwind past functions that use + * PULLFRAMEFROMSVCANDEXIT. They are run in reverse order. + * As the last thing we do is restore the stack pointer + * we can ignore the padding at the end of struct trapframe. + */ #define UNWINDSVCFRAME \ - .pad #(4); /* Skip stack alignment */ \ .save {r13-r15}; /* Restore sp, lr, pc */ \ .pad #(2*4); /* Skip user sp and lr */ \ .save {r0-r12}; /* Restore r0-r12 */ \ From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 21:05:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4F4EE7A; Fri, 24 Jan 2014 21:05:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91AA4187F; Fri, 24 Jan 2014 21:05:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OL57JV024747; Fri, 24 Jan 2014 21:05:07 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OL57Ph024746; Fri, 24 Jan 2014 21:05:07 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201401242105.s0OL57Ph024746@svn.freebsd.org> From: Robert Millan Date: Fri, 24 Jan 2014 21:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261138 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:05:07 -0000 Author: rmh Date: Fri Jan 24 21:05:07 2014 New Revision: 261138 URL: http://svnweb.freebsd.org/changeset/base/261138 Log: Accept O_CLOEXEC in shm_open(). Reviewed by: jilles, jhb MFC after: 1 week Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Fri Jan 24 20:51:56 2014 (r261137) +++ head/sys/kern/uipc_shm.c Fri Jan 24 21:05:07 2014 (r261138) @@ -704,7 +704,7 @@ sys_shm_open(struct thread *td, struct s (uap->flags & O_ACCMODE) != O_RDWR) return (EINVAL); - if ((uap->flags & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC)) != 0) + if ((uap->flags & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC)) != 0) return (EINVAL); fdp = td->td_proc->p_fd; From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 22:01:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F22430E; Fri, 24 Jan 2014 22:01:44 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 32E691DD7; Fri, 24 Jan 2014 22:01:44 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D86B1B95D; Fri, 24 Jan 2014 17:01:41 -0500 (EST) From: John Baldwin To: Peter Wemm Subject: Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster Date: Fri, 24 Jan 2014 16:19:14 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401221659.s0MGxrc7056036@svn.freebsd.org> <201401231712.51610.jhb@freebsd.org> <52E19C42.2030700@wemm.org> In-Reply-To: <52E19C42.2030700@wemm.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201401241619.14744.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 24 Jan 2014 17:01:41 -0500 (EST) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, David Chisnall , Glen Barber , svn-src-head@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:01:44 -0000 On Thursday, January 23, 2014 5:48:34 pm Peter Wemm wrote: > On 1/23/14, 2:12 PM, John Baldwin wrote: > > On Thursday, January 23, 2014 4:22:56 pm Bryan Drewery wrote: > >> On Thu, Jan 23, 2014 at 03:03:42PM -0500, John Baldwin wrote: > >>> On Thursday, January 23, 2014 2:48:41 pm Bryan Drewery wrote: > >>>> On Thu, Jan 23, 2014 at 02:39:14PM -0500, John Baldwin wrote: > >>>>> On Thursday, January 23, 2014 10:42:36 am David Chisnall wrote: > >>>>>> On 22 Jan 2014, at 22:36, Glen Barber wrote: > >>>>>> > >>>>>>> It needs to use the build host version, because using (for example) > >>>>>>> powerpc resulting binary won't work on and amd64 system. > >>>>>> > >>>>>> If it's used as part of the build, then it should be part of the toolchain > >>>>> target and we should be using the version built there. > >>>>> > >>>>> 'make distribute' is not a normal part of the build (it's not part of > >>>>> buildworld or installworld). Both mergemaster and etcupdate only run it > >>>>> after an installworld has been performed, in which case an up-to-date > >>>>> services_mkdb should already be installed. > >>>>> > >>>>> Bryan, what are you running 'make distribute' for? Is this to populate > >>>>> a new jail from a world build? > >>>> > >>>> Yes, poudriere uses this to create jails. It runs: > >>>> > >>>> export TARGET_ARCH=... > >>>> make buildworld > >>>> make installworld DESTDIR=... > >>>> make distrib-dirs DESTDIR=... DB_FROM_SRC=1 > >>>> make distribution DESTDIR=... > >>>> > >>>> > >>>> No mergemaster or etc-update is ran, we just install all of the > >>>> defaults. > >>> > >>> Yes, but you are attemping to install a newer jail than the host, and strictly > >>> speaking that isn't supported. (Rather, we only guarantee that a jail will work > >>> so long as its world is older or equal in age to the host.) > >> > >> I am aware of *running* newer jails not being suppored, but *building* > >> seems to be an absolute must to be supported. How else would you > >> upgrade? > > > > A normal upgrade does 'installworld' followed by some sort of /etc updating > > tool. It doesn't do 'make distribute'. Also, this is related to why one > > is not guaranteed to be able to do an 'installworld' unless you've booted into > > the new kernel first (though it often works, and 'make distribute' also often > > works, but often != always). > > > > The thing is, there is no notion of cross-tools, etc. for things like > > installworld and distribution. We have always expected the host to have > > ITOOLS that work. > > > > Note that this exact situation has happened before back when cap_mkdb and > > pwd_mkdb grew endianness flags for release cross-builds. The pwd_mkdb > > flag and the change to enable it in etc/Makefile were both made on the same > > day. (The cap_mkdb change was made earlier, but that appears to be more > > a result of the testing cycle for cross-building releases than an > > intentional delay.) > > FWIW, we do this at work and ran into the same problem. We do the same > things that poudriere does, almost exactly. > > We added: "CAP_MKDB_ENDIAN= PWD_MKDB_ENDIAN=" to the "make DESTDIR=/stage > distribution" phase. This currently works all the way back to stable/4. > > Is there a middle ground where we could only specify -l / -b in a cross > build perhaps? I would be fine with that, definitely. Not sure what the proper test for that is though. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 22:37:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 121D71EA; Fri, 24 Jan 2014 22:37:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F23CF1FFE; Fri, 24 Jan 2014 22:37:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0OMbZkq068655; Fri, 24 Jan 2014 22:37:35 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0OMbZo4068654; Fri, 24 Jan 2014 22:37:35 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201401242237.s0OMbZo4068654@svn.freebsd.org> From: Bryan Drewery Date: Fri, 24 Jan 2014 22:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261140 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:37:36 -0000 Author: bdrewery Date: Fri Jan 24 22:37:35 2014 New Revision: 261140 URL: http://svnweb.freebsd.org/changeset/base/261140 Log: Add MLINK for fdclosedir.3 to directory.3 and sort fdopendir(3) entry. Reported by: bde Approved by: bapt (mentor) Modified: head/lib/libc/gen/Makefile.inc Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Fri Jan 24 22:12:59 2014 (r261139) +++ head/lib/libc/gen/Makefile.inc Fri Jan 24 22:37:35 2014 (r261140) @@ -304,8 +304,9 @@ MLINKS+=devname.3 fdevname.3 MLINKS+=devname.3 fdevname_r.3 MLINKS+=directory.3 closedir.3 \ directory.3 dirfd.3 \ - directory.3 opendir.3 \ + directory.3 fdclosedir.3 \ directory.3 fdopendir.3 \ + directory.3 opendir.3 \ directory.3 readdir.3 \ directory.3 readdir_r.3 \ directory.3 rewinddir.3 \ From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 23:00:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60DDD9FB; Fri, 24 Jan 2014 23:00:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35314119F; Fri, 24 Jan 2014 23:00:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0ON0aSj077464; Fri, 24 Jan 2014 23:00:36 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0ON0alf077463; Fri, 24 Jan 2014 23:00:36 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201401242300.s0ON0alf077463@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 24 Jan 2014 23:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261141 - head/bin/sh/tests/parser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 23:00:36 -0000 Author: jilles Date: Fri Jan 24 23:00:35 2014 New Revision: 261141 URL: http://svnweb.freebsd.org/changeset/base/261141 Log: sh: Do not depend on parse/execute split in new alias test. Modified: head/bin/sh/tests/parser/alias11.0 Modified: head/bin/sh/tests/parser/alias11.0 ============================================================================== --- head/bin/sh/tests/parser/alias11.0 Fri Jan 24 22:37:35 2014 (r261140) +++ head/bin/sh/tests/parser/alias11.0 Fri Jan 24 23:00:35 2014 (r261141) @@ -2,5 +2,5 @@ alias alias0=alias1 alias alias1=exit -alias0 0 +eval 'alias0 0' exit 3 From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 00:03:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21BF5CA2; Sat, 25 Jan 2014 00:03:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E34316EA; Sat, 25 Jan 2014 00:03:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P03X3S004611; Sat, 25 Jan 2014 00:03:33 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P03Xu1004610; Sat, 25 Jan 2014 00:03:33 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201401250003.s0P03Xu1004610@svn.freebsd.org> From: Glen Barber Date: Sat, 25 Jan 2014 00:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261142 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 00:03:34 -0000 Author: gjb Date: Sat Jan 25 00:03:33 2014 New Revision: 261142 URL: http://svnweb.freebsd.org/changeset/base/261142 Log: Temporarily turn off the services.db generation during distributeworld. I'll work on an update to test for endianness-compatibility. Submitted by: many Sponsored by: The FreeBSD Foundation Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri Jan 24 23:00:35 2014 (r261141) +++ head/etc/Makefile Sat Jan 25 00:03:33 2014 (r261142) @@ -198,8 +198,6 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ - services_mkdb ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \ - ${DESTDIR}/etc/services; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${BIN2} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 01:06:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D50DDDE6; Sat, 25 Jan 2014 01:06:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C03D11C9F; Sat, 25 Jan 2014 01:06:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P16KU1029728; Sat, 25 Jan 2014 01:06:20 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P16KN2029727; Sat, 25 Jan 2014 01:06:20 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201401250106.s0P16KN2029727@svn.freebsd.org> From: Baptiste Daroussin Date: Sat, 25 Jan 2014 01:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261143 - stable/10/etc/defaults X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:06:20 -0000 Author: bapt Date: Sat Jan 25 01:06:20 2014 New Revision: 261143 URL: http://svnweb.freebsd.org/changeset/base/261143 Log: MFH: r261027 Remove pkg_* related info from periodic.conf Reported by Robin Brocks Modified: stable/10/etc/defaults/periodic.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/periodic.conf ============================================================================== --- stable/10/etc/defaults/periodic.conf Sat Jan 25 00:03:33 2014 (r261142) +++ stable/10/etc/defaults/periodic.conf Sat Jan 25 01:06:20 2014 (r261143) @@ -140,10 +140,6 @@ daily_status_mail_rejects_shorten="NO" # 480.status-ntpd daily_status_ntpd_enable="NO" # Check NTP status -# 490.status-pkg-changes -daily_status_pkg_changes_enable="NO" # Show package changes -pkg_info="pkg_info" # Use this program - # 500.queuerun daily_queuerun_enable="YES" # Run mail queue daily_submit_queuerun="YES" # Also submit queue @@ -183,11 +179,6 @@ weekly_catman_enable="NO" # Preformat weekly_noid_enable="NO" # Find unowned files weekly_noid_dirs="/" # Look here -# 400.status-pkg -weekly_status_pkg_enable="NO" # Find out-of-date pkgs -pkg_version=pkg_version # Use this program -pkg_version_index=/usr/ports/INDEX-10 # Use this index file - # 450.status-security weekly_status_security_enable="YES" # Security check # See also "Security options" above for more options From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 01:08:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70E94DB; Sat, 25 Jan 2014 01:08:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C0291CC5; Sat, 25 Jan 2014 01:08:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P18afL030084; Sat, 25 Jan 2014 01:08:36 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P18aP2030083; Sat, 25 Jan 2014 01:08:36 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201401250108.s0P18aP2030083@svn.freebsd.org> From: Baptiste Daroussin Date: Sat, 25 Jan 2014 01:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261144 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:08:36 -0000 Author: bapt Date: Sat Jan 25 01:08:35 2014 New Revision: 261144 URL: http://svnweb.freebsd.org/changeset/base/261144 Log: Implicit include of sys/queue.h instead of relying on gelf.h/libelf.h to bring it Newer version of gelf.h and libelf.h does not include sys/queue.h anymore Submitted by: kaiw Modified: stable/10/usr.sbin/pkg/config.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/config.c ============================================================================== --- stable/10/usr.sbin/pkg/config.c Sat Jan 25 01:06:20 2014 (r261143) +++ stable/10/usr.sbin/pkg/config.c Sat Jan 25 01:08:35 2014 (r261144) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 01:58:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27E90BF6; Sat, 25 Jan 2014 01:58:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 138F2102E; Sat, 25 Jan 2014 01:58:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P1wFJ7048763; Sat, 25 Jan 2014 01:58:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P1wFgv048762; Sat, 25 Jan 2014 01:58:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401250158.s0P1wFgv048762@svn.freebsd.org> From: Alexander Motin Date: Sat, 25 Jan 2014 01:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261145 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 01:58:16 -0000 Author: mav Date: Sat Jan 25 01:58:15 2014 New Revision: 261145 URL: http://svnweb.freebsd.org/changeset/base/261145 Log: MFC r260549: Move xpt_run_devq() call before request completion callback where it was originally. I am not sure why exactly have I moved it during one of many refactorings during camlock project, but obviously it opens race window that may cause use after free panics during SIM (in reported cases umass(4)) detach. Modified: stable/10/sys/cam/cam_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Sat Jan 25 01:08:35 2014 (r261144) +++ stable/10/sys/cam/cam_xpt.c Sat Jan 25 01:58:15 2014 (r261145) @@ -5186,8 +5186,7 @@ xpt_done_process(struct ccb_hdr *ccb_h) if ((ccb_h->flags & CAM_DEV_QFRZDIS) && (ccb_h->status & CAM_DEV_QFRZN)) { - xpt_release_devq(ccb_h->path, /*count*/1, - /*run_queue*/FALSE); + xpt_release_devq(ccb_h->path, /*count*/1, /*run_queue*/TRUE); ccb_h->status &= ~CAM_DEV_QFRZN; } @@ -5216,6 +5215,7 @@ xpt_done_process(struct ccb_hdr *ccb_h) if (!device_is_queued(dev)) (void)xpt_schedule_devq(devq, dev); + xpt_run_devq(devq); mtx_unlock(&devq->send_mtx); if ((dev->flags & CAM_DEV_TAG_AFTER_COUNT) != 0) { @@ -5245,10 +5245,6 @@ xpt_done_process(struct ccb_hdr *ccb_h) (*ccb_h->cbfcnp)(ccb_h->path->periph, (union ccb *)ccb_h); if (mtx != NULL) mtx_unlock(mtx); - - mtx_lock(&devq->send_mtx); - xpt_run_devq(devq); - mtx_unlock(&devq->send_mtx); } void From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 02:16:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BC3FFD7; Sat, 25 Jan 2014 02:16:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4787C118D; Sat, 25 Jan 2014 02:16:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P2GA5U056852; Sat, 25 Jan 2014 02:16:10 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P2GAN4056851; Sat, 25 Jan 2014 02:16:10 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201401250216.s0P2GAN4056851@svn.freebsd.org> From: "Andrey A. Chernov" Date: Sat, 25 Jan 2014 02:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261146 - head/usr.sbin/cron/cron X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 02:16:10 -0000 Author: ache Date: Sat Jan 25 02:16:09 2014 New Revision: 261146 URL: http://svnweb.freebsd.org/changeset/base/261146 Log: Bad timespec_subtract() calculations produce negative tv_nsec on i386 which cause EINVAL returned from nanosleep() which cause loop in cron_sleep() and making all cron jobs to start about 30 seconds earlier (which cause f.e. logfiles rotation by newsyslog delayed by 1 hour). Use simple and proved calculations from kernel's timespecsub() instead. MFC after: 3 days Modified: head/usr.sbin/cron/cron/cron.c Modified: head/usr.sbin/cron/cron/cron.c ============================================================================== --- head/usr.sbin/cron/cron/cron.c Sat Jan 25 01:58:15 2014 (r261145) +++ head/usr.sbin/cron/cron/cron.c Sat Jan 25 02:16:09 2014 (r261146) @@ -376,30 +376,17 @@ cron_sync(int secres) { } } -static int +static void timespec_subtract(struct timespec *result, struct timespec *x, struct timespec *y) { - time_t nsec; - - /* Perform the carry for the later subtraction by updating y. */ - if (x->tv_nsec < y->tv_nsec) { - nsec = (y->tv_nsec - x->tv_nsec) / 10000000 + 1; - y->tv_nsec -= 1000000000 * nsec; - y->tv_sec += nsec; - } - if (x->tv_nsec - y->tv_nsec > 1000000000) { - nsec = (x->tv_nsec - y->tv_nsec) / 1000000000; - y->tv_nsec += 1000000000 * nsec; - y->tv_sec -= nsec; - } - - /* tv_nsec is certainly positive. */ - result->tv_sec = x->tv_sec - y->tv_sec; - result->tv_nsec = x->tv_nsec - y->tv_nsec; - - /* Return True if result is negative. */ - return (x->tv_sec < y->tv_sec); + *result = *x; + result->tv_sec -= y->tv_sec; + result->tv_nsec -= y->tv_nsec; + if (result->tv_nsec < 0) { + result->tv_sec--; + result->tv_nsec += 1000000000; + } } static void From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 03:46:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A422302; Sat, 25 Jan 2014 03:46:05 +0000 (UTC) Received: from mail-qa0-x235.google.com (mail-qa0-x235.google.com [IPv6:2607:f8b0:400d:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 903F01827; Sat, 25 Jan 2014 03:46:04 +0000 (UTC) Received: by mail-qa0-f53.google.com with SMTP id cm18so4904915qab.12 for ; Fri, 24 Jan 2014 19:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IBTMMmKh4TfxTLb0IJGzmliAoonKDxBjHdz7POaUwvM=; b=0fdV0N3zcwNlcaf6AXaWUtfoq+DMQCmK1nKZsmxEwdI9vt+Ye0cBu1qzWAzVf272L+ e8/Eri63Zu0LB+ABSAGvvQfcsXI/kQGR+rsOmWxY7aHMXbxGr1fxjeRgD1TJA4EYRehQ ggJAvJ/IWPMutRUKITSQVDS+3S7+rxEHM+mAeJDk8rY1D+5jlQPzd8mJ64WDSMM0dDWA MPX84S6LTms3UEqyd5lob5ic7hVxP+op5yAeJXSgUsefDfV0fuzC7fW5p14/z1w3+0n4 0Uv+9Nycz7K4D7fBYAtweUdFrHIWNA065yWFn+qW44l8KQmx4QGuRrVsGCNbpgZwbzaw G+ww== MIME-Version: 1.0 X-Received: by 10.140.96.180 with SMTP id k49mr24100525qge.4.1390621563650; Fri, 24 Jan 2014 19:46:03 -0800 (PST) Received: by 10.224.52.8 with HTTP; Fri, 24 Jan 2014 19:46:03 -0800 (PST) In-Reply-To: References: <201401240917.s0O9HTBO046991@svn.freebsd.org> <52E279FD.70909@bitfrost.no> <52E283EA.1050708@bitfrost.no> Date: Fri, 24 Jan 2014 19:46:03 -0800 Message-ID: Subject: Re: svn commit: r261118 - head/sys/dev/usb/wlan From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , Kevin Lo , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 03:46:05 -0000 oooh. Sorry, I shouldn't read code whilst medicated. I see now. Yes, memmove() is fine, you're just removing an invalid use of it. Sorry! -a From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 06:54:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15E0E6F6; Sat, 25 Jan 2014 06:54:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 017AD15D1; Sat, 25 Jan 2014 06:54:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P6s4Qs064984; Sat, 25 Jan 2014 06:54:04 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P6s4tl064983; Sat, 25 Jan 2014 06:54:04 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201401250654.s0P6s4tl064983@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 06:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261147 - head/sys/dev/virtio/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 06:54:05 -0000 Author: bryanv Date: Sat Jan 25 06:54:04 2014 New Revision: 261147 URL: http://svnweb.freebsd.org/changeset/base/261147 Log: Remove spaces before tabs in the function prototype list Modified: head/sys/dev/virtio/scsi/virtio_scsi.c Modified: head/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- head/sys/dev/virtio/scsi/virtio_scsi.c Sat Jan 25 02:16:09 2014 (r261146) +++ head/sys/dev/virtio/scsi/virtio_scsi.c Sat Jan 25 06:54:04 2014 (r261147) @@ -81,7 +81,7 @@ static void vtscsi_write_device_config(s static int vtscsi_reinit(struct vtscsi_softc *); static int vtscsi_alloc_cam(struct vtscsi_softc *); -static int vtscsi_register_cam(struct vtscsi_softc *); +static int vtscsi_register_cam(struct vtscsi_softc *); static void vtscsi_free_cam(struct vtscsi_softc *); static void vtscsi_cam_async(void *, uint32_t, struct cam_path *, void *); static int vtscsi_register_async(struct vtscsi_softc *); @@ -91,7 +91,7 @@ static void vtscsi_cam_poll(struct cam_s static void vtscsi_cam_scsi_io(struct vtscsi_softc *, struct cam_sim *, union ccb *); -static void vtscsi_cam_get_tran_settings(struct vtscsi_softc *, +static void vtscsi_cam_get_tran_settings(struct vtscsi_softc *, union ccb *); static void vtscsi_cam_reset_bus(struct vtscsi_softc *, union ccb *); static void vtscsi_cam_reset_dev(struct vtscsi_softc *, union ccb *); @@ -99,69 +99,69 @@ static void vtscsi_cam_abort(struct vtsc static void vtscsi_cam_path_inquiry(struct vtscsi_softc *, struct cam_sim *, union ccb *); -static int vtscsi_sg_append_scsi_buf(struct vtscsi_softc *, +static int vtscsi_sg_append_scsi_buf(struct vtscsi_softc *, struct sglist *, struct ccb_scsiio *); -static int vtscsi_fill_scsi_cmd_sglist(struct vtscsi_softc *, +static int vtscsi_fill_scsi_cmd_sglist(struct vtscsi_softc *, struct vtscsi_request *, int *, int *); -static int vtscsi_execute_scsi_cmd(struct vtscsi_softc *, +static int vtscsi_execute_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_start_scsi_cmd(struct vtscsi_softc *, union ccb *); +static int vtscsi_start_scsi_cmd(struct vtscsi_softc *, union ccb *); static void vtscsi_complete_abort_timedout_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_abort_timedout_scsi_cmd(struct vtscsi_softc *, +static int vtscsi_abort_timedout_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); static void vtscsi_timedout_scsi_cmd(void *); static cam_status vtscsi_scsi_cmd_cam_status(struct virtio_scsi_cmd_resp *); static cam_status vtscsi_complete_scsi_cmd_response(struct vtscsi_softc *, struct ccb_scsiio *, struct virtio_scsi_cmd_resp *); -static void vtscsi_complete_scsi_cmd(struct vtscsi_softc *, +static void vtscsi_complete_scsi_cmd(struct vtscsi_softc *, struct vtscsi_request *); static void vtscsi_poll_ctrl_req(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_execute_ctrl_req(struct vtscsi_softc *, +static int vtscsi_execute_ctrl_req(struct vtscsi_softc *, struct vtscsi_request *, struct sglist *, int, int, int); -static void vtscsi_complete_abort_task_cmd(struct vtscsi_softc *c, +static void vtscsi_complete_abort_task_cmd(struct vtscsi_softc *c, struct vtscsi_request *); -static int vtscsi_execute_abort_task_cmd(struct vtscsi_softc *, +static int vtscsi_execute_abort_task_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static int vtscsi_execute_reset_dev_cmd(struct vtscsi_softc *, +static int vtscsi_execute_reset_dev_cmd(struct vtscsi_softc *, struct vtscsi_request *); -static void vtscsi_get_request_lun(uint8_t [], target_id_t *, lun_id_t *); +static void vtscsi_get_request_lun(uint8_t [], target_id_t *, lun_id_t *); static void vtscsi_set_request_lun(struct ccb_hdr *, uint8_t []); static void vtscsi_init_scsi_cmd_req(struct ccb_scsiio *, struct virtio_scsi_cmd_req *); static void vtscsi_init_ctrl_tmf_req(struct ccb_hdr *, uint32_t, uintptr_t, struct virtio_scsi_ctrl_tmf_req *); -static void vtscsi_freeze_simq(struct vtscsi_softc *, int); +static void vtscsi_freeze_simq(struct vtscsi_softc *, int); static int vtscsi_thaw_simq(struct vtscsi_softc *, int); -static void vtscsi_announce(struct vtscsi_softc *, uint32_t, target_id_t, +static void vtscsi_announce(struct vtscsi_softc *, uint32_t, target_id_t, lun_id_t); -static void vtscsi_execute_rescan(struct vtscsi_softc *, target_id_t, +static void vtscsi_execute_rescan(struct vtscsi_softc *, target_id_t, lun_id_t); -static void vtscsi_execute_rescan_bus(struct vtscsi_softc *); +static void vtscsi_execute_rescan_bus(struct vtscsi_softc *); -static void vtscsi_handle_event(struct vtscsi_softc *, +static void vtscsi_handle_event(struct vtscsi_softc *, struct virtio_scsi_event *); -static int vtscsi_enqueue_event_buf(struct vtscsi_softc *, +static int vtscsi_enqueue_event_buf(struct vtscsi_softc *, struct virtio_scsi_event *); static int vtscsi_init_event_vq(struct vtscsi_softc *); -static void vtscsi_reinit_event_vq(struct vtscsi_softc *); -static void vtscsi_drain_event_vq(struct vtscsi_softc *); +static void vtscsi_reinit_event_vq(struct vtscsi_softc *); +static void vtscsi_drain_event_vq(struct vtscsi_softc *); -static void vtscsi_complete_vqs_locked(struct vtscsi_softc *); -static void vtscsi_complete_vqs(struct vtscsi_softc *); -static void vtscsi_drain_vqs(struct vtscsi_softc *); -static void vtscsi_cancel_request(struct vtscsi_softc *, +static void vtscsi_complete_vqs_locked(struct vtscsi_softc *); +static void vtscsi_complete_vqs(struct vtscsi_softc *); +static void vtscsi_drain_vqs(struct vtscsi_softc *); +static void vtscsi_cancel_request(struct vtscsi_softc *, struct vtscsi_request *); static void vtscsi_drain_vq(struct vtscsi_softc *, struct virtqueue *); static void vtscsi_stop(struct vtscsi_softc *); static int vtscsi_reset_bus(struct vtscsi_softc *); -static void vtscsi_init_request(struct vtscsi_softc *, +static void vtscsi_init_request(struct vtscsi_softc *, struct vtscsi_request *); static int vtscsi_alloc_requests(struct vtscsi_softc *); static void vtscsi_free_requests(struct vtscsi_softc *); @@ -170,18 +170,18 @@ static void vtscsi_enqueue_request(struc static struct vtscsi_request * vtscsi_dequeue_request(struct vtscsi_softc *); static void vtscsi_complete_request(struct vtscsi_request *); -static void vtscsi_complete_vq(struct vtscsi_softc *, struct virtqueue *); +static void vtscsi_complete_vq(struct vtscsi_softc *, struct virtqueue *); static void vtscsi_control_vq_intr(void *); static void vtscsi_event_vq_intr(void *); static void vtscsi_request_vq_intr(void *); -static void vtscsi_disable_vqs_intr(struct vtscsi_softc *); -static void vtscsi_enable_vqs_intr(struct vtscsi_softc *); +static void vtscsi_disable_vqs_intr(struct vtscsi_softc *); +static void vtscsi_enable_vqs_intr(struct vtscsi_softc *); -static void vtscsi_get_tunables(struct vtscsi_softc *); -static void vtscsi_add_sysctl(struct vtscsi_softc *); +static void vtscsi_get_tunables(struct vtscsi_softc *); +static void vtscsi_add_sysctl(struct vtscsi_softc *); -static void vtscsi_printf_req(struct vtscsi_request *, const char *, +static void vtscsi_printf_req(struct vtscsi_request *, const char *, const char *, ...); /* Global tunables. */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 06:58:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9E0584E; Sat, 25 Jan 2014 06:58:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A5D8C15E5; Sat, 25 Jan 2014 06:58:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P6wf3u065596; Sat, 25 Jan 2014 06:58:41 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P6wfDI065595; Sat, 25 Jan 2014 06:58:41 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201401250658.s0P6wfDI065595@svn.freebsd.org> From: Peter Grehan Date: Sat, 25 Jan 2014 06:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261148 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 06:58:41 -0000 Author: grehan Date: Sat Jan 25 06:58:41 2014 New Revision: 261148 URL: http://svnweb.freebsd.org/changeset/base/261148 Log: Change RWX to XWR in comments to match intent and bit patterns in discussion of valid EPT pte protections. Discussed with: neel MFC after: 3 days Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jan 25 06:54:04 2014 (r261147) +++ head/sys/amd64/amd64/pmap.c Sat Jan 25 06:58:41 2014 (r261148) @@ -5575,7 +5575,7 @@ safe_to_clear_referenced(pmap_t pmap, pt KASSERT(pmap->pm_type == PT_EPT, ("invalid pm_type %d", pmap->pm_type)); /* - * RWX = 010 or 110 will cause an unconditional EPT misconfiguration + * XWR = 010 or 110 will cause an unconditional EPT misconfiguration * so we don't let the referenced (aka EPT_PG_READ) bit to be cleared * if the EPT_PG_WRITE bit is set. */ @@ -5583,7 +5583,7 @@ safe_to_clear_referenced(pmap_t pmap, pt return (FALSE); /* - * RWX = 100 is allowed only if the PMAP_SUPPORTS_EXEC_ONLY is set. + * XWR = 100 is allowed only if the PMAP_SUPPORTS_EXEC_ONLY is set. */ if ((pte & EPT_PG_EXECUTE) == 0 || ((pmap->pm_flags & PMAP_SUPPORTS_EXEC_ONLY) != 0)) From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 07:01:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3305FA26; Sat, 25 Jan 2014 07:01:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 04FB81654; Sat, 25 Jan 2014 07:01:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P71p6P068829; Sat, 25 Jan 2014 07:01:51 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P71pIW068828; Sat, 25 Jan 2014 07:01:51 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201401250701.s0P71pIW068828@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 07:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261149 - head/sys/dev/virtio/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:01:52 -0000 Author: bryanv Date: Sat Jan 25 07:01:51 2014 New Revision: 261149 URL: http://svnweb.freebsd.org/changeset/base/261149 Log: Read each field of the configuration individually In the forthcoming VirtIO spec, the device configuration is always in little endian instead of guest edian. This is a noop change for now. Modified: head/sys/dev/virtio/scsi/virtio_scsi.c Modified: head/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- head/sys/dev/virtio/scsi/virtio_scsi.c Sat Jan 25 06:58:41 2014 (r261148) +++ head/sys/dev/virtio/scsi/virtio_scsi.c Sat Jan 25 07:01:51 2014 (r261149) @@ -75,6 +75,8 @@ static int vtscsi_suspend(device_t); static int vtscsi_resume(device_t); static void vtscsi_negotiate_features(struct vtscsi_softc *); +static void vtscsi_read_config(struct vtscsi_softc *, + struct virtio_scsi_config *); static int vtscsi_maximum_segments(struct vtscsi_softc *, int); static int vtscsi_alloc_virtqueues(struct vtscsi_softc *); static void vtscsi_write_device_config(struct vtscsi_softc *); @@ -287,8 +289,7 @@ vtscsi_attach(device_t dev) if (virtio_with_feature(dev, VIRTIO_SCSI_F_HOTPLUG)) sc->vtscsi_flags |= VTSCSI_FLAG_HOTPLUG; - virtio_read_device_config(dev, 0, &scsicfg, - sizeof(struct virtio_scsi_config)); + vtscsi_read_config(sc, &scsicfg); sc->vtscsi_max_channel = scsicfg.max_channel; sc->vtscsi_max_target = scsicfg.max_target; @@ -408,6 +409,35 @@ vtscsi_negotiate_features(struct vtscsi_ sc->vtscsi_features = features; } +#define VTSCSI_GET_CONFIG(_dev, _field, _cfg) \ + virtio_read_device_config(_dev, \ + offsetof(struct virtio_scsi_config, _field), \ + &(_cfg)->_field, sizeof((_cfg)->_field)) \ + +static void +vtscsi_read_config(struct vtscsi_softc *sc, + struct virtio_scsi_config *scsicfg) +{ + device_t dev; + + dev = sc->vtscsi_dev; + + bzero(scsicfg, sizeof(struct virtio_scsi_config)); + + VTSCSI_GET_CONFIG(dev, num_queues, scsicfg); + VTSCSI_GET_CONFIG(dev, seg_max, scsicfg); + VTSCSI_GET_CONFIG(dev, max_sectors, scsicfg); + VTSCSI_GET_CONFIG(dev, cmd_per_lun, scsicfg); + VTSCSI_GET_CONFIG(dev, event_info_size, scsicfg); + VTSCSI_GET_CONFIG(dev, sense_size, scsicfg); + VTSCSI_GET_CONFIG(dev, cdb_size, scsicfg); + VTSCSI_GET_CONFIG(dev, max_channel, scsicfg); + VTSCSI_GET_CONFIG(dev, max_target, scsicfg); + VTSCSI_GET_CONFIG(dev, max_lun, scsicfg); +} + +#undef VTSCSI_GET_CONFIG + static int vtscsi_maximum_segments(struct vtscsi_softc *sc, int seg_max) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 07:13:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3664CC4B; Sat, 25 Jan 2014 07:13:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2302116E0; Sat, 25 Jan 2014 07:13:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P7Dm7v073154; Sat, 25 Jan 2014 07:13:48 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P7DlAo073153; Sat, 25 Jan 2014 07:13:47 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201401250713.s0P7DlAo073153@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 07:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261150 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:13:48 -0000 Author: bryanv Date: Sat Jan 25 07:13:47 2014 New Revision: 261150 URL: http://svnweb.freebsd.org/changeset/base/261150 Log: Read and write the MAC address in the config space byte by byte Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 07:01:51 2014 (r261149) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 07:13:47 2014 (r261150) @@ -3485,6 +3485,7 @@ static void vtnet_set_hwaddr(struct vtnet_softc *sc) { device_t dev; + int i; dev = sc->vtnet_dev; @@ -3492,9 +3493,11 @@ vtnet_set_hwaddr(struct vtnet_softc *sc) if (vtnet_ctrl_mac_cmd(sc, sc->vtnet_hwaddr) != 0) device_printf(dev, "unable to set MAC address\n"); } else if (sc->vtnet_flags & VTNET_FLAG_MAC) { - virtio_write_device_config(dev, - offsetof(struct virtio_net_config, mac), - sc->vtnet_hwaddr, ETHER_ADDR_LEN); + for (i = 0; i < ETHER_ADDR_LEN; i++) { + virtio_write_dev_config_1(dev, + offsetof(struct virtio_net_config, mac) + i, + sc->vtnet_hwaddr[i]); + } } } @@ -3502,6 +3505,7 @@ static void vtnet_get_hwaddr(struct vtnet_softc *sc) { device_t dev; + int i; dev = sc->vtnet_dev; @@ -3519,8 +3523,10 @@ vtnet_get_hwaddr(struct vtnet_softc *sc) return; } - virtio_read_device_config(dev, offsetof(struct virtio_net_config, mac), - sc->vtnet_hwaddr, ETHER_ADDR_LEN); + for (i = 0; i < ETHER_ADDR_LEN; i++) { + sc->vtnet_hwaddr[i] = virtio_read_dev_config_1(dev, + offsetof(struct virtio_net_config, mac) + i); + } } static void From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 07:24:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 60DA7FA8; Sat, 25 Jan 2014 07:24:58 +0000 (UTC) Date: Sat, 25 Jan 2014 07:24:58 +0000 From: Alexey Dokuchaev To: Bryan Venteicher Subject: Re: svn commit: r261150 - head/sys/dev/virtio/network Message-ID: <20140125072458.GB13904@FreeBSD.org> References: <201401250713.s0P7DlAo073153@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201401250713.s0P7DlAo073153@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:24:58 -0000 On Sat, Jan 25, 2014 at 07:13:47AM +0000, Bryan Venteicher wrote: > New Revision: 261150 > URL: http://svnweb.freebsd.org/changeset/base/261150 > > Log: > Read and write the MAC address in the config space byte by byte Commit log looks incomplete: it does not tell what is the problem and how (why) committed change fixes it. ./danfe From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 07:33:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0A7A1E8; Sat, 25 Jan 2014 07:33:14 +0000 (UTC) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64AA9180E; Sat, 25 Jan 2014 07:33:14 +0000 (UTC) Received: by mail-ig0-f173.google.com with SMTP id c10so4570103igq.0 for ; Fri, 24 Jan 2014 23:33:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=6+RKWtwPNaGA6vUV52WqmosPwdaF658l6gz6nU1pxsk=; b=EZs6IwxKQcpzNXZMLtP3QrUj9cctvuhGaiHWXmSZHuV1h+eRn4hQd6xUolfmlUve0l 3ASJaGxewlPMeBol3z3s0xakVAUdfE8ZQ99HkHCCV2/g5bjVAUazenm4RV5sKkbv7tzk DzwETsK227gX9p0VK6OcPtBVe9Nag6sasjSE5h83r+0//PnppIfann2SI9aECMrZ38of DhC6NaAEeHALcWp2Lp0B4QJ1Bt/ADqJhosaE+zp/9/HaCf8a4b+RU5fIiyvBoJ9V8o1Y P0Oj2BF9nSu06VExF/rj71FyijmdAv2+kl2+ATs/bdi1o8SJ0/WCmxRuDJXaoAKKHHfR jffQ== X-Received: by 10.42.40.83 with SMTP id k19mr13590641ice.3.1390635192393; Fri, 24 Jan 2014 23:33:12 -0800 (PST) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.96.73 with HTTP; Fri, 24 Jan 2014 23:32:42 -0800 (PST) In-Reply-To: <20140125072458.GB13904@FreeBSD.org> References: <201401250713.s0P7DlAo073153@svn.freebsd.org> <20140125072458.GB13904@FreeBSD.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 01:32:42 -0600 X-Google-Sender-Auth: z-QVcjoKt0O0McFzTyTFiKJ1Ujk Message-ID: Subject: Re: svn commit: r261150 - head/sys/dev/virtio/network To: Alexey Dokuchaev Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: svn-src-head@freebsd.org, Bryan Venteicher , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:33:14 -0000 On Sat, Jan 25, 2014 at 1:24 AM, Alexey Dokuchaev wrote: > On Sat, Jan 25, 2014 at 07:13:47AM +0000, Bryan Venteicher wrote: > > New Revision: 261150 > > URL: http://svnweb.freebsd.org/changeset/base/261150 > > > > Log: > > Read and write the MAC address in the config space byte by byte > > Commit log looks incomplete: it does not tell what is the problem and how > (why) committed change fixes it. > > Same reason as for r261149. > ./danfe > From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 07:35:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEA9D32B; Sat, 25 Jan 2014 07:35:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB1311819; Sat, 25 Jan 2014 07:35:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0P7Z9Bg080890; Sat, 25 Jan 2014 07:35:09 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0P7Z9FV080889; Sat, 25 Jan 2014 07:35:09 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201401250735.s0P7Z9FV080889@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 07:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261151 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 07:35:09 -0000 Author: bryanv Date: Sat Jan 25 07:35:09 2014 New Revision: 261151 URL: http://svnweb.freebsd.org/changeset/base/261151 Log: Also include the mbuf's csum_flags in an assert message Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 07:13:47 2014 (r261150) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 07:35:09 2014 (r261151) @@ -2027,7 +2027,8 @@ vtnet_txq_offload(struct vtnet_txq *txq, } KASSERT(hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM, - ("%s: mbuf %p TSO without checksum offload", __func__, m)); + ("%s: mbuf %p TSO without checksum offload %#x", + __func__, m, flags)); error = vtnet_txq_offload_tso(txq, m, etype, csum_start, hdr); if (error) From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 08:38:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5E4CC7D; Sat, 25 Jan 2014 08:38:18 +0000 (UTC) Received: from mail-pb0-x230.google.com (mail-pb0-x230.google.com [IPv6:2607:f8b0:400e:c01::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AABAD1C85; Sat, 25 Jan 2014 08:38:18 +0000 (UTC) Received: by mail-pb0-f48.google.com with SMTP id rr13so4111461pbb.7 for ; Sat, 25 Jan 2014 00:38:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qOKqNATuzhnMn0VdplEsBurTzv3CPD0NN0bxgnzwPlU=; b=abeIDSnMpcJA63A+Dx3gjFGef559bgu94qW02UuivqfwEcajOTwv64DZQLfzVWKH9C sYthp4FzRTwigZRGvyVFhUaGu9mR2rq58qjNOiLim58Rs1U5SaWpQx9UWlt4/Hdu54lH JdEyk/YNqORwupVNlNvnoM6hX5bSOnT2xzF65Xm/x0WZs+kuArOUvnZwETAJe0UIkmi4 LcV467D8DjbldVXDENYIbZSZEhIDY7MHFN625uUYHwVs5u0Tq4oYZ6Otr8flXMN5u4YM GYCRLAVk3VSJHy39Kjs4+lWhZ3Q226C2KO/PAsLtY7av+P3GODku+ZOyAGZLaLiXj+iI uBcA== MIME-Version: 1.0 X-Received: by 10.66.122.201 with SMTP id lu9mr18754070pab.40.1390639097428; Sat, 25 Jan 2014 00:38:17 -0800 (PST) Received: by 10.68.155.38 with HTTP; Sat, 25 Jan 2014 00:38:17 -0800 (PST) In-Reply-To: <201401250701.s0P71pIW068828@svn.freebsd.org> References: <201401250701.s0P71pIW068828@svn.freebsd.org> Date: Sat, 25 Jan 2014 03:38:17 -0500 Message-ID: Subject: Re: svn commit: r261149 - head/sys/dev/virtio/scsi From: Aryeh Friedman To: Bryan Venteicher Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 08:38:19 -0000 On Sat, Jan 25, 2014 at 2:01 AM, Bryan Venteicher wrote: > Author: bryanv > Date: Sat Jan 25 07:01:51 2014 > New Revision: 261149 > URL: http://svnweb.freebsd.org/changeset/base/261149 > > Log: > Read each field of the configuration individually > > In the forthcoming VirtIO spec, the device configuration is > always in little endian instead of guest edian. This is a > noop change for now. > > Could this lead to weird interactions between VM's made on linux and then ported to FreeBSD (I am having this issue in Qemu right now [see qemu-devel for details]).? -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 10:43:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABCED6D1; Sat, 25 Jan 2014 10:43:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9709E15A3; Sat, 25 Jan 2014 10:43:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PAhlHV054130; Sat, 25 Jan 2014 10:43:47 GMT (envelope-from demon@svn.freebsd.org) Received: (from demon@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PAhl5J054129; Sat, 25 Jan 2014 10:43:47 GMT (envelope-from demon@svn.freebsd.org) Message-Id: <201401251043.s0PAhl5J054129@svn.freebsd.org> From: Dmitry Sivachenko Date: Sat, 25 Jan 2014 10:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261153 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 10:43:47 -0000 Author: demon (ports committer) Date: Sat Jan 25 10:43:47 2014 New Revision: 261153 URL: http://svnweb.freebsd.org/changeset/base/261153 Log: Merge r260987: Do not exit with non-zero return code if sysctl.conf or sysctl.conf.local files are absent. Approved by: delphij Modified: stable/10/etc/rc.d/sysctl Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/sysctl ============================================================================== --- stable/10/etc/rc.d/sysctl Sat Jan 25 09:07:55 2014 (r261152) +++ stable/10/etc/rc.d/sysctl Sat Jan 25 10:43:47 2014 (r261153) @@ -27,7 +27,9 @@ sysctl_start() esac for _f in /etc/sysctl.conf /etc/sysctl.conf.local; do - [ -r ${_f} ] && ${command} ${command_args} ${_f} > /dev/null + if [ -r ${_f} ]; then + ${command} ${command_args} ${_f} > /dev/null + fi done } From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 14:59:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15050670; Sat, 25 Jan 2014 14:59:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00BAF181F; Sat, 25 Jan 2014 14:59:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PEx8vr054614; Sat, 25 Jan 2014 14:59:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PEx8Z4054611; Sat, 25 Jan 2014 14:59:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201401251459.s0PEx8Z4054611@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 25 Jan 2014 14:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261160 - head/bin/sh/tests/parser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 14:59:09 -0000 Author: jilles Date: Sat Jan 25 14:59:08 2014 New Revision: 261160 URL: http://svnweb.freebsd.org/changeset/base/261160 Log: sh: Add tests for alias names after another alias. Since the first alias's value does not end with a blank, the next word should not be checked for aliases. Added: head/bin/sh/tests/parser/alias12.0 (contents, props changed) head/bin/sh/tests/parser/alias13.0 (contents, props changed) Modified: head/bin/sh/tests/parser/Makefile Modified: head/bin/sh/tests/parser/Makefile ============================================================================== --- head/bin/sh/tests/parser/Makefile Sat Jan 25 14:02:02 2014 (r261159) +++ head/bin/sh/tests/parser/Makefile Sat Jan 25 14:59:08 2014 (r261160) @@ -16,6 +16,8 @@ FILES+= alias8.0 FILES+= alias9.0 FILES+= alias10.0 FILES+= alias11.0 +FILES+= alias12.0 +FILES+= alias13.0 FILES+= and-pipe-not.0 FILES+= case1.0 FILES+= case2.0 Added: head/bin/sh/tests/parser/alias12.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parser/alias12.0 Sat Jan 25 14:59:08 2014 (r261160) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +unalias -a +alias alias0=command +alias true='echo bad' +eval 'alias0 true' Added: head/bin/sh/tests/parser/alias13.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parser/alias13.0 Sat Jan 25 14:59:08 2014 (r261160) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +unalias -a +alias command=command +alias true='echo bad' +eval 'command true' From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 16:03:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60A952C0; Sat, 25 Jan 2014 16:03:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4CBFE1D46; Sat, 25 Jan 2014 16:03:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PG39Td081056; Sat, 25 Jan 2014 16:03:09 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PG39wB081055; Sat, 25 Jan 2014 16:03:09 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201401251603.s0PG39wB081055@svn.freebsd.org> From: Andrew Turner Date: Sat, 25 Jan 2014 16:03:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261161 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:03:09 -0000 Author: andrew Date: Sat Jan 25 16:03:08 2014 New Revision: 261161 URL: http://svnweb.freebsd.org/changeset/base/261161 Log: Use __fenv_static for all static inline functions. Modified: head/lib/msun/src/fenv-softfloat.h Modified: head/lib/msun/src/fenv-softfloat.h ============================================================================== --- head/lib/msun/src/fenv-softfloat.h Sat Jan 25 14:59:08 2014 (r261160) +++ head/lib/msun/src/fenv-softfloat.h Sat Jan 25 16:03:08 2014 (r261161) @@ -156,7 +156,7 @@ feupdateenv(const fenv_t *__envp) /* We currently provide no external definitions of the functions below. */ -static inline int +__fenv_static inline int feenableexcept(int __mask) { int __omask = __softfloat_float_exception_mask; @@ -165,7 +165,7 @@ feenableexcept(int __mask) return (__omask); } -static inline int +__fenv_static inline int fedisableexcept(int __mask) { int __omask = __softfloat_float_exception_mask; @@ -174,7 +174,7 @@ fedisableexcept(int __mask) return (__omask); } -static inline int +__fenv_static inline int fegetexcept(void) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 16:35:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 658DCAA9; Sat, 25 Jan 2014 16:35:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5148A1F05; Sat, 25 Jan 2014 16:35:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PGZvFN093632; Sat, 25 Jan 2014 16:35:57 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PGZvdE093631; Sat, 25 Jan 2014 16:35:57 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201401251635.s0PGZvdE093631@svn.freebsd.org> From: Dimitry Andric Date: Sat, 25 Jan 2014 16:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261162 - head/contrib/llvm/lib/Target/X86/MCTargetDesc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 16:35:57 -0000 Author: dim Date: Sat Jan 25 16:35:56 2014 New Revision: 261162 URL: http://svnweb.freebsd.org/changeset/base/261162 Log: Pull in r195679 from upstream llvm trunk: Don't use nopl in cpus that don't support it. Patch by Mikulas Patocka. I added the test. I checked that for cpu names that gas knows about, it also doesn't generate nopl. The modified cpus: i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta Crusoe, Microsoft VirtualBox - see https://bbs.archlinux.org/viewtopic.php?pid=775414 k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that Via c3 and c3-Nehemiah don't have nopl PR: bin/185777 MFC after: 3 days Modified: head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Modified: head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Sat Jan 25 16:03:08 2014 (r261161) +++ head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Sat Jan 25 16:35:56 2014 (r261162) @@ -308,8 +308,12 @@ bool X86AsmBackend::writeNopData(uint64_ // This CPU doesnt support long nops. If needed add more. // FIXME: Can we get this from the subtarget somehow? + // FIXME: We could generated something better than plain 0x90. if (CPU == "generic" || CPU == "i386" || CPU == "i486" || CPU == "i586" || - CPU == "pentium" || CPU == "pentium-mmx" || CPU == "geode") { + CPU == "pentium" || CPU == "pentium-mmx" || CPU == "i686" || + CPU == "k6" || CPU == "k6-2" || CPU == "k6-3" || CPU == "geode" || + CPU == "winchip-c6" || CPU == "winchip2" || CPU == "c3" || + CPU == "c3-2") { for (uint64_t i = 0; i < Count; ++i) OW->Write8(0x90); return true; From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 18:13:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 283CD3E7; Sat, 25 Jan 2014 18:13:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 146AA1635; Sat, 25 Jan 2014 18:13:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PIDhqJ031879; Sat, 25 Jan 2014 18:13:43 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PIDhAa031878; Sat, 25 Jan 2014 18:13:43 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201401251813.s0PIDhAa031878@svn.freebsd.org> From: Andrew Turner Date: Sat, 25 Jan 2014 18:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261163 - head/lib/msun/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:13:44 -0000 Author: andrew Date: Sat Jan 25 18:13:43 2014 New Revision: 261163 URL: http://svnweb.freebsd.org/changeset/base/261163 Log: * Mark static inline functions with __fenv_static. * Correctly shift the mask when masking/unmasking exceptions. Modified: head/lib/msun/arm/fenv.h Modified: head/lib/msun/arm/fenv.h ============================================================================== --- head/lib/msun/arm/fenv.h Sat Jan 25 16:35:56 2014 (r261162) +++ head/lib/msun/arm/fenv.h Sat Jan 25 18:13:43 2014 (r261163) @@ -98,6 +98,8 @@ int feupdateenv(const fenv_t *__envp); #define vmrs_fpscr(__r) __asm __volatile("vmrs %0, fpscr" : "=&r"(__r)) #define vmsr_fpscr(__r) __asm __volatile("vmsr fpscr, %0" : : "r"(__r)) +#define _FPU_MASK_SHIFT 8 + __fenv_static inline int feclearexcept(int __excepts) { @@ -213,29 +215,31 @@ feupdateenv(const fenv_t *__envp) /* We currently provide no external definitions of the functions below. */ -static inline int +__fenv_static inline int feenableexcept(int __mask) { fenv_t __old_fpsr, __new_fpsr; vmrs_fpscr(__old_fpsr); - __new_fpsr = __old_fpsr | (__mask & FE_ALL_EXCEPT); + __new_fpsr = __old_fpsr | + ((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); vmsr_fpscr(__new_fpsr); - return (__old_fpsr & FE_ALL_EXCEPT); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); } -static inline int +__fenv_static inline int fedisableexcept(int __mask) { fenv_t __old_fpsr, __new_fpsr; vmrs_fpscr(__old_fpsr); - __new_fpsr = __old_fpsr & ~(__mask & FE_ALL_EXCEPT); + __new_fpsr = __old_fpsr & + ~((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); vmsr_fpscr(__new_fpsr); - return (__old_fpsr & FE_ALL_EXCEPT); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); } -static inline int +__fenv_static inline int fegetexcept(void) { fenv_t __fpsr; From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 18:23:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75AB96AF; Sat, 25 Jan 2014 18:23:25 +0000 (UTC) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2274816DD; Sat, 25 Jan 2014 18:23:25 +0000 (UTC) Received: by mail-ig0-f179.google.com with SMTP id c10so5410665igq.0 for ; Sat, 25 Jan 2014 10:23:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=SEyHJrkNJrJsIm5qNfmW1DN/krzuSNbwecfZ3LaVhn0=; b=w7g3mbb3b1NgCZ8KTBCpNid1EoDB/ZCgRwKicSg3RtaZIGakcoHMxubnxy1Aye1iVU YkJI5N1SlguFSi4Xe8NQ1oKTkSb5T7KetqQ5vodFr5EhHm4kLMN167znUIo9rPEU4jsF oIVaRyx28jo2abVzPh+hFQQhat7vmaXYscXwcpYbaNKa53ZQ8RlGKl3ufhqtWzhNWgRo 9ONVje292YlX1NYjQ/5Oi/XJoihwf5bj8I0o0zugPZ7bbx/dx6bG2UXINa83NGMpZ/Ox 4g97wikl03eH0EE2dIX1Zawlu79bIw1A2V8pefKDuYPFS8AuWRkBinfEBFfa3jpBiAYo Bo0Q== X-Received: by 10.50.73.231 with SMTP id o7mr10302053igv.8.1390674204459; Sat, 25 Jan 2014 10:23:24 -0800 (PST) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.96.73 with HTTP; Sat, 25 Jan 2014 10:22:53 -0800 (PST) In-Reply-To: References: <201401250701.s0P71pIW068828@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 12:22:53 -0600 X-Google-Sender-Auth: qzeQz0SZCoh1im8_ddXfRjIXxu0 Message-ID: Subject: Re: svn commit: r261149 - head/sys/dev/virtio/scsi To: Aryeh Friedman Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: svn-src-head@freebsd.org, Bryan Venteicher , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:23:25 -0000 On Sat, Jan 25, 2014 at 2:38 AM, Aryeh Friedman wrote: > > > > On Sat, Jan 25, 2014 at 2:01 AM, Bryan Venteicher wrote: > >> Author: bryanv >> Date: Sat Jan 25 07:01:51 2014 >> New Revision: 261149 >> URL: http://svnweb.freebsd.org/changeset/base/261149 >> >> Log: >> Read each field of the configuration individually >> >> In the forthcoming VirtIO spec, the device configuration is >> always in little endian instead of guest edian. This is a >> noop change for now. >> >> > Could this lead to weird interactions between VM's made on linux and then > ported to FreeBSD (I am having this issue in Qemu right now [see qemu-devel > for details]).? > > > Nope. > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 18:34:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1B66E08; Sat, 25 Jan 2014 18:34:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD91417B5; Sat, 25 Jan 2014 18:34:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PIYveB039947; Sat, 25 Jan 2014 18:34:57 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PIYvbk039946; Sat, 25 Jan 2014 18:34:57 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201401251834.s0PIYvbk039946@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 18:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261164 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 18:34:57 -0000 Author: bryanv Date: Sat Jan 25 18:34:57 2014 New Revision: 261164 URL: http://svnweb.freebsd.org/changeset/base/261164 Log: Remove stray space Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 18:13:43 2014 (r261163) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 18:34:57 2014 (r261164) @@ -843,7 +843,7 @@ vtnet_alloc_virtqueues(struct vtnet_soft if (sc->vtnet_flags & VTNET_FLAG_CTRL_VQ) nvqs++; - info = malloc(sizeof(struct vq_alloc_info) * nvqs , M_TEMP, M_NOWAIT); + info = malloc(sizeof(struct vq_alloc_info) * nvqs, M_TEMP, M_NOWAIT); if (info == NULL) return (ENOMEM); From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 19:36:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68DE373C; Sat, 25 Jan 2014 19:36:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B6741D45; Sat, 25 Jan 2014 19:36:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PJaSmv063506; Sat, 25 Jan 2014 19:36:28 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PJaSAT063505; Sat, 25 Jan 2014 19:36:28 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201401251936.s0PJaSAT063505@svn.freebsd.org> From: Andrew Turner Date: Sat, 25 Jan 2014 19:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261165 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 19:36:28 -0000 Author: andrew Date: Sat Jan 25 19:36:27 2014 New Revision: 261165 URL: http://svnweb.freebsd.org/changeset/base/261165 Log: Fix gcc with -Wstrict-prototypes by telling it bi_emac takes no parameters. Modified: head/sys/arm/at91/board_sam9260ek.c Modified: head/sys/arm/at91/board_sam9260ek.c ============================================================================== --- head/sys/arm/at91/board_sam9260ek.c Sat Jan 25 18:34:57 2014 (r261164) +++ head/sys/arm/at91/board_sam9260ek.c Sat Jan 25 19:36:27 2014 (r261165) @@ -83,7 +83,7 @@ bi_dbgu(void) } static void -bi_emac() +bi_emac(void) { /* From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 20:00:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C15CC2EC; Sat, 25 Jan 2014 20:00:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [8.8.178.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE3001063; Sat, 25 Jan 2014 20:00:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PJwrPe071838; Sat, 25 Jan 2014 19:58:53 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PJwr9w071837; Sat, 25 Jan 2014 19:58:53 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201401251958.s0PJwr9w071837@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 19:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261168 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:00:06 -0000 Author: bryanv Date: Sat Jan 25 19:58:53 2014 New Revision: 261168 URL: http://svnweb.freebsd.org/changeset/base/261168 Log: Check for a full virtqueue in the multiqueue transmit path With most hosts, we'll negotiate indirect descriptors, so all we need is one available descriptor to transmit a frame. Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 19:57:30 2014 (r261167) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 19:58:53 2014 (r261168) @@ -2243,6 +2243,12 @@ vtnet_txq_mq_start_locked(struct vtnet_t vtnet_txq_eof(txq); while ((m = drbr_peek(ifp, br)) != NULL) { + if (virtqueue_full(vq)) { + drbr_putback(ifp, br, m); + error = ENOBUFS; + break; + } + error = vtnet_txq_encap(txq, &m); if (error) { if (m != NULL) From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 20:12:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9937A94; Sat, 25 Jan 2014 20:12:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A54BF11D3; Sat, 25 Jan 2014 20:12:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PJvUR9071676; Sat, 25 Jan 2014 19:57:30 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PJvUaC071675; Sat, 25 Jan 2014 19:57:30 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201401251957.s0PJvUaC071675@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 19:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261167 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:12:08 -0000 Author: bryanv Date: Sat Jan 25 19:57:30 2014 New Revision: 261167 URL: http://svnweb.freebsd.org/changeset/base/261167 Log: Avoid queue unlock followed by relock when the enable interrupt race is lost This already happens infrequently, and the hold time is still bounded since we defer to a taskqueue after a few tries. Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 19:55:42 2014 (r261166) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 19:57:30 2014 (r261167) @@ -1821,9 +1821,9 @@ vtnet_rx_vq_intr(void *xrxq) return; } -again: VTNET_RXQ_LOCK(rxq); +again: if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { VTNET_RXQ_UNLOCK(rxq); return; @@ -1837,10 +1837,11 @@ again: * This is an occasional condition or race (when !more), * so retry a few times before scheduling the taskqueue. */ - rxq->vtnrx_stats.vrxs_rescheduled++; - VTNET_RXQ_UNLOCK(rxq); if (tries++ < VTNET_INTR_DISABLE_RETRIES) goto again; + + VTNET_RXQ_UNLOCK(rxq); + rxq->vtnrx_stats.vrxs_rescheduled++; taskqueue_enqueue(rxq->vtnrx_tq, &rxq->vtnrx_intrtask); } else VTNET_RXQ_UNLOCK(rxq); @@ -2408,9 +2409,9 @@ vtnet_tx_vq_intr(void *xtxq) return; } -again: VTNET_TXQ_LOCK(txq); +again: if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { VTNET_TXQ_UNLOCK(txq); return; @@ -2426,9 +2427,10 @@ again: * This is an occasional race, so retry a few times * before scheduling the taskqueue. */ - VTNET_TXQ_UNLOCK(txq); if (tries++ < VTNET_INTR_DISABLE_RETRIES) goto again; + + VTNET_TXQ_UNLOCK(txq); txq->vtntx_stats.vtxs_rescheduled++; taskqueue_enqueue(txq->vtntx_tq, &txq->vtntx_intrtask); } else From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 20:12:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1D3AA95; Sat, 25 Jan 2014 20:12:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B483B11D4; Sat, 25 Jan 2014 20:12:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PJthpW071464; Sat, 25 Jan 2014 19:55:43 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PJthUY071463; Sat, 25 Jan 2014 19:55:43 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201401251955.s0PJthUY071463@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 19:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261166 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:12:09 -0000 Author: bryanv Date: Sat Jan 25 19:55:42 2014 New Revision: 261166 URL: http://svnweb.freebsd.org/changeset/base/261166 Log: Move duplicated transmit start code into a single function Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 19:36:27 2014 (r261165) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 19:55:42 2014 (r261166) @@ -147,6 +147,7 @@ static int vtnet_txq_mq_start_locked(str static int vtnet_txq_mq_start(struct ifnet *, struct mbuf *); static void vtnet_txq_tq_deferred(void *, int); #endif +static void vtnet_txq_start(struct vtnet_txq *); static void vtnet_txq_tq_intr(void *, int); static void vtnet_txq_eof(struct vtnet_txq *); static void vtnet_tx_vq_intr(void *); @@ -2309,6 +2310,24 @@ vtnet_txq_tq_deferred(void *xtxq, int pe #endif /* VTNET_LEGACY_TX */ static void +vtnet_txq_start(struct vtnet_txq *txq) +{ + struct vtnet_softc *sc; + struct ifnet *ifp; + + sc = txq->vtntx_sc; + ifp = sc->vtnet_ifp; + +#ifdef VTNET_LEGACY_TX + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + vtnet_start_locked(txq, ifp); +#else + if (!drbr_empty(ifp, txq->vtntx_br)) + vtnet_txq_mq_start_locked(txq, NULL); +#endif +} + +static void vtnet_txq_tq_intr(void *xtxq, int pending) { struct vtnet_softc *sc; @@ -2328,13 +2347,7 @@ vtnet_txq_tq_intr(void *xtxq, int pendin vtnet_txq_eof(txq); -#ifdef VTNET_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vtnet_start_locked(txq, ifp); -#else - if (!drbr_empty(ifp, txq->vtntx_br)) - vtnet_txq_mq_start_locked(txq, NULL); -#endif + vtnet_txq_start(txq); if (vtnet_txq_enable_intr(txq) != 0) { vtnet_txq_disable_intr(txq); @@ -2405,13 +2418,7 @@ again: vtnet_txq_eof(txq); -#ifdef VTNET_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vtnet_start_locked(txq, ifp); -#else - if (!drbr_empty(ifp, txq->vtntx_br)) - vtnet_txq_mq_start_locked(txq, NULL); -#endif + vtnet_txq_start(txq); if (vtnet_txq_enable_intr(txq) != 0) { vtnet_txq_disable_intr(txq); @@ -2431,24 +2438,16 @@ again: static void vtnet_tx_start_all(struct vtnet_softc *sc) { - struct ifnet *ifp; struct vtnet_txq *txq; int i; - ifp = sc->vtnet_ifp; VTNET_CORE_LOCK_ASSERT(sc); for (i = 0; i < sc->vtnet_act_vq_pairs; i++) { txq = &sc->vtnet_txqs[i]; VTNET_TXQ_LOCK(txq); -#ifdef VTNET_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vtnet_start_locked(txq, ifp); -#else - if (!drbr_empty(ifp, txq->vtntx_br)) - vtnet_txq_mq_start_locked(txq, NULL); -#endif + vtnet_txq_start(txq); VTNET_TXQ_UNLOCK(txq); } } From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 20:39:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47AC195A; Sat, 25 Jan 2014 20:39:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 340241452; Sat, 25 Jan 2014 20:39:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PKdOM9088135; Sat, 25 Jan 2014 20:39:24 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PKdOAn088134; Sat, 25 Jan 2014 20:39:24 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201401252039.s0PKdOAn088134@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 25 Jan 2014 20:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261169 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:39:24 -0000 Author: glebius Date: Sat Jan 25 20:39:23 2014 New Revision: 261169 URL: http://svnweb.freebsd.org/changeset/base/261169 Log: Fix compilation with IGB_LEGACY_TX defined. PR: 185909 Submitted by: Aurelien Rougemont Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Sat Jan 25 19:58:53 2014 (r261168) +++ head/sys/dev/e1000/if_igb.c Sat Jan 25 20:39:23 2014 (r261169) @@ -2381,7 +2381,9 @@ igb_allocate_legacy(struct adapter *adap { device_t dev = adapter->dev; struct igb_queue *que = adapter->queues; +#ifndef IGB_LEGACY_TX struct tx_ring *txr = adapter->tx_rings; +#endif int error, rid = 0; /* Turn off all interrupts */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 20:58:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2953180E; Sat, 25 Jan 2014 20:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0ADC11601; Sat, 25 Jan 2014 20:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PKw6HC019026; Sat, 25 Jan 2014 20:58:06 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PKw5ZN019015; Sat, 25 Jan 2014 20:58:05 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201401252058.s0PKw5ZN019015@svn.freebsd.org> From: Neel Natu Date: Sat, 25 Jan 2014 20:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261170 - in head/sys/amd64: include vmm vmm/intel vmm/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 20:58:07 -0000 Author: neel Date: Sat Jan 25 20:58:05 2014 New Revision: 261170 URL: http://svnweb.freebsd.org/changeset/base/261170 Log: Support level triggered interrupts with VT-x virtual interrupt delivery. The VMCS field EOI_bitmap[] is an array of 256 bits - one for each vector. If a bit is set to '1' in the EOI_bitmap[] then the processor will trigger an EOI-induced VM-exit when it is doing EOI virtualization. The EOI-induced VM-exit results in the EOI being forwarded to the vioapic so that level triggered interrupts can be properly handled. Tested by: Anish Gupta (akgupt3@gmail.com) Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/intel/vmcs.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/io/vlapic.c head/sys/amd64/vmm/io/vlapic_priv.h head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Sat Jan 25 20:39:23 2014 (r261169) +++ head/sys/amd64/include/vmm.h Sat Jan 25 20:58:05 2014 (r261170) @@ -298,6 +298,7 @@ enum vm_exitcode { VM_EXITCODE_SPINUP_AP, VM_EXITCODE_SPINDOWN_CPU, VM_EXITCODE_RENDEZVOUS, + VM_EXITCODE_IOAPIC_EOI, VM_EXITCODE_MAX }; @@ -354,6 +355,9 @@ struct vm_exit { struct { uint64_t rflags; } hlt; + struct { + int vector; + } ioapic_eoi; } u; }; Modified: head/sys/amd64/vmm/intel/vmcs.h ============================================================================== --- head/sys/amd64/vmm/intel/vmcs.h Sat Jan 25 20:39:23 2014 (r261169) +++ head/sys/amd64/vmm/intel/vmcs.h Sat Jan 25 20:58:05 2014 (r261170) @@ -136,6 +136,7 @@ vmcs_write(uint32_t encoding, uint64_t v #define VMCS_EOI_EXIT1 0x0000201E #define VMCS_EOI_EXIT2 0x00002020 #define VMCS_EOI_EXIT3 0x00002022 +#define VMCS_EOI_EXIT(vector) (VMCS_EOI_EXIT0 + ((vector) / 64) * 2) /* 64-bit read-only fields */ #define VMCS_GUEST_PHYSICAL_ADDRESS 0x00002400 @@ -318,6 +319,7 @@ vmcs_write(uint32_t encoding, uint64_t v #define EXIT_REASON_MCE 41 #define EXIT_REASON_TPR 43 #define EXIT_REASON_APIC_ACCESS 44 +#define EXIT_REASON_VIRTUALIZED_EOI 45 #define EXIT_REASON_GDTR_IDTR 46 #define EXIT_REASON_LDTR_TR 47 #define EXIT_REASON_EPT_FAULT 48 Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sat Jan 25 20:39:23 2014 (r261169) +++ head/sys/amd64/vmm/intel/vmx.c Sat Jan 25 20:58:05 2014 (r261170) @@ -1726,6 +1726,11 @@ vmx_exit_process(struct vmx *vmx, int vc (qual & EXIT_QUAL_NMIUDTI) != 0) vmx_restore_nmi_blocking(vmx, vcpu); break; + case EXIT_REASON_VIRTUALIZED_EOI: + vmexit->exitcode = VM_EXITCODE_IOAPIC_EOI; + vmexit->u.ioapic_eoi.vector = qual & 0xFF; + vmexit->inst_length = 0; /* trap-like */ + break; case EXIT_REASON_APIC_ACCESS: handled = vmx_handle_apic_access(vmx, vcpu, vmexit); break; @@ -2320,6 +2325,7 @@ vmx_setcap(void *arg, int vcpu, int type struct vlapic_vtx { struct vlapic vlapic; struct pir_desc *pir_desc; + struct vmx *vmx; }; #define VMX_CTR_PIR(vm, vcpuid, pir_desc, notify, vector, level, msg) \ @@ -2345,9 +2351,6 @@ vmx_set_intr_ready(struct vlapic *vlapic uint64_t mask; int idx, notify; - /* - * XXX need to deal with level triggered interrupts - */ vlapic_vtx = (struct vlapic_vtx *)vlapic; pir_desc = vlapic_vtx->pir_desc; @@ -2422,6 +2425,33 @@ vmx_intr_accepted(struct vlapic *vlapic, } static void +vmx_set_tmr(struct vlapic *vlapic, int vector, bool level) +{ + struct vlapic_vtx *vlapic_vtx; + struct vmx *vmx; + struct vmcs *vmcs; + uint64_t mask, val; + + KASSERT(vector >= 0 && vector <= 255, ("invalid vector %d", vector)); + KASSERT(!vcpu_is_running(vlapic->vm, vlapic->vcpuid, NULL), + ("vmx_set_tmr: vcpu cannot be running")); + + vlapic_vtx = (struct vlapic_vtx *)vlapic; + vmx = vlapic_vtx->vmx; + vmcs = &vmx->vmcs[vlapic->vcpuid]; + mask = 1UL << (vector % 64); + + VMPTRLD(vmcs); + val = vmcs_read(VMCS_EOI_EXIT(vector)); + if (level) + val |= mask; + else + val &= ~mask; + vmcs_write(VMCS_EOI_EXIT(vector), val); + VMCLEAR(vmcs); +} + +static void vmx_post_intr(struct vlapic *vlapic, int hostcpu) { @@ -2519,11 +2549,13 @@ vmx_vlapic_init(void *arg, int vcpuid) vlapic_vtx = (struct vlapic_vtx *)vlapic; vlapic_vtx->pir_desc = &vmx->pir_desc[vcpuid]; + vlapic_vtx->vmx = vmx; if (virtual_interrupt_delivery) { vlapic->ops.set_intr_ready = vmx_set_intr_ready; vlapic->ops.pending_intr = vmx_pending_intr; vlapic->ops.intr_accepted = vmx_intr_accepted; + vlapic->ops.set_tmr = vmx_set_tmr; } if (posted_interrupts) Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Sat Jan 25 20:39:23 2014 (r261169) +++ head/sys/amd64/vmm/io/vlapic.c Sat Jan 25 20:58:05 2014 (r261170) @@ -1300,6 +1300,7 @@ vlapic_reset(struct vlapic *vlapic) lapic->dfr = 0xffffffff; lapic->svr = APIC_SVR_VECTOR; vlapic_mask_lvts(vlapic); + vlapic_reset_tmr(vlapic); lapic->dcr_timer = 0; vlapic_dcr_write_handler(vlapic); @@ -1457,32 +1458,42 @@ vlapic_enabled(struct vlapic *vlapic) return (false); } +static void +vlapic_set_tmr(struct vlapic *vlapic, int vector, bool level) +{ + struct LAPIC *lapic; + uint32_t *tmrptr, mask; + int idx; + + lapic = vlapic->apic_page; + tmrptr = &lapic->tmr0; + idx = (vector / 32) * 4; + mask = 1 << (vector % 32); + if (level) + tmrptr[idx] |= mask; + else + tmrptr[idx] &= ~mask; + + if (vlapic->ops.set_tmr != NULL) + (*vlapic->ops.set_tmr)(vlapic, vector, level); +} + void vlapic_reset_tmr(struct vlapic *vlapic) { - struct LAPIC *lapic; + int vector; VLAPIC_CTR0(vlapic, "vlapic resetting all vectors to edge-triggered"); - lapic = vlapic->apic_page; - lapic->tmr0 = 0; - lapic->tmr1 = 0; - lapic->tmr2 = 0; - lapic->tmr3 = 0; - lapic->tmr4 = 0; - lapic->tmr5 = 0; - lapic->tmr6 = 0; - lapic->tmr7 = 0; + for (vector = 0; vector <= 255; vector++) + vlapic_set_tmr(vlapic, vector, false); } void vlapic_set_tmr_level(struct vlapic *vlapic, uint32_t dest, bool phys, int delmode, int vector) { - struct LAPIC *lapic; - uint32_t *tmrptr, mask; cpuset_t dmask; - int idx; bool lowprio; KASSERT(vector >= 0 && vector <= 255, ("invalid vector %d", vector)); @@ -1502,11 +1513,6 @@ vlapic_set_tmr_level(struct vlapic *vlap if (!CPU_ISSET(vlapic->vcpuid, &dmask)) return; - lapic = vlapic->apic_page; - tmrptr = &lapic->tmr0; - idx = (vector / 32) * 4; - mask = 1 << (vector % 32); - tmrptr[idx] |= mask; - VLAPIC_CTR1(vlapic, "vector %d set to level-triggered", vector); + vlapic_set_tmr(vlapic, vector, true); } Modified: head/sys/amd64/vmm/io/vlapic_priv.h ============================================================================== --- head/sys/amd64/vmm/io/vlapic_priv.h Sat Jan 25 20:39:23 2014 (r261169) +++ head/sys/amd64/vmm/io/vlapic_priv.h Sat Jan 25 20:58:05 2014 (r261170) @@ -139,6 +139,7 @@ struct vlapic_ops { int (*pending_intr)(struct vlapic *vlapic, int *vecptr); void (*intr_accepted)(struct vlapic *vlapic, int vector); void (*post_intr)(struct vlapic *vlapic, int hostcpu); + void (*set_tmr)(struct vlapic *vlapic, int vector, bool level); }; struct vlapic { Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sat Jan 25 20:39:23 2014 (r261169) +++ head/sys/amd64/vmm/vmm.c Sat Jan 25 20:58:05 2014 (r261170) @@ -1150,6 +1150,10 @@ restart: if (error == 0) { retu = false; switch (vme->exitcode) { + case VM_EXITCODE_IOAPIC_EOI: + vioapic_process_eoi(vm, vcpuid, + vme->u.ioapic_eoi.vector); + break; case VM_EXITCODE_RENDEZVOUS: vm_handle_rendezvous(vm, vcpuid); error = 0; From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 21:52:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EFF64D6; Sat, 25 Jan 2014 21:52:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A8ED1A83; Sat, 25 Jan 2014 21:52:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PLqKux014520; Sat, 25 Jan 2014 21:52:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PLqJQ6014519; Sat, 25 Jan 2014 21:52:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401252152.s0PLqJQ6014519@svn.freebsd.org> From: Warner Losh Date: Sat, 25 Jan 2014 21:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261171 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:52:20 -0000 Author: imp Date: Sat Jan 25 21:52:19 2014 New Revision: 261171 URL: http://svnweb.freebsd.org/changeset/base/261171 Log: Bus space handles need to be the VA of the requested resource, not the rounded page VA. Correct so the DBGU device can be mapped for FDT console since it isn't on a page boundary. Modified: head/sys/arm/at91/at91.c Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Sat Jan 25 20:58:05 2014 (r261170) +++ head/sys/arm/at91/at91.c Sat Jan 25 21:52:19 2014 (r261171) @@ -65,11 +65,13 @@ at91_bs_map(void *t, bus_addr_t bpa, bus pa = trunc_page(bpa); if (pa >= AT91_PA_BASE + 0xff00000) { - *bshp = pa - AT91_PA_BASE + AT91_BASE; + *bshp = bpa - AT91_PA_BASE + AT91_BASE; return (0); } - if (pa >= AT91_BASE + 0xff00000) + if (pa >= AT91_BASE + 0xff00000) { + *bshp = bpa; return (0); + } endpa = round_page(bpa + size); *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa); From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 21:57:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 145E9745; Sat, 25 Jan 2014 21:57:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0016F1AA6; Sat, 25 Jan 2014 21:57:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PLvjGB020773; Sat, 25 Jan 2014 21:57:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PLvjsm020772; Sat, 25 Jan 2014 21:57:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401252157.s0PLvjsm020772@svn.freebsd.org> From: Warner Losh Date: Sat, 25 Jan 2014 21:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261172 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 21:57:46 -0000 Author: imp Date: Sat Jan 25 21:57:45 2014 New Revision: 261172 URL: http://svnweb.freebsd.org/changeset/base/261172 Log: Make early printf output nicer by inserting a carriage return before any linefeeds that are output. Modified: head/sys/arm/at91/uart_dev_at91usart.c Modified: head/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_dev_at91usart.c Sat Jan 25 21:52:19 2014 (r261171) +++ head/sys/arm/at91/uart_dev_at91usart.c Sat Jan 25 21:57:45 2014 (r261172) @@ -288,6 +288,10 @@ volatile uint32_t *at91_dbgu = (volatile void eputc(int c) { + + if (c == '\n') + eputc('\r'); + while (!(at91_dbgu[USART_CSR / 4] & USART_CSR_TXRDY)) continue; at91_dbgu[USART_THR / 4] = c; From owner-svn-src-all@FreeBSD.ORG Sat Jan 25 22:50:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A00E0D53; Sat, 25 Jan 2014 22:50:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8BCE91EF9; Sat, 25 Jan 2014 22:50:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PMohlk062499; Sat, 25 Jan 2014 22:50:43 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PMohC9062498; Sat, 25 Jan 2014 22:50:43 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201401252250.s0PMohC9062498@svn.freebsd.org> From: Justin Hibbits Date: Sat, 25 Jan 2014 22:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261173 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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 Jan 2014 22:50:43 -0000 Author: jhibbits Date: Sat Jan 25 22:50:42 2014 New Revision: 261173 URL: http://svnweb.freebsd.org/changeset/base/261173 Log: MPC74xx should not fall through, to the error case. MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Sat Jan 25 21:57:45 2014 (r261172) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Sat Jan 25 22:50:42 2014 (r261173) @@ -147,6 +147,7 @@ pmc_md_initialize() case MPC7455: case MPC7457: error = pmc_mpc7xxx_initialize(pmc_mdep); + break; case IBM970: case IBM970FX: case IBM970MP: