From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 00:54:23 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 7AAAC91C; Sun, 22 Sep 2013 00:54:23 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 67FB121B8; Sun, 22 Sep 2013 00:54: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 r8M0sNFV092887; Sun, 22 Sep 2013 00:54:23 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8M0sNw8092886; Sun, 22 Sep 2013 00:54:23 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309220054.r8M0sNw8092886@svn.freebsd.org> From: "Justin T. Gibbs" Date: Sun, 22 Sep 2013 00:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255781 - head/sys/i386/include/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 00:54:23 -0000 Author: gibbs Date: Sun Sep 22 00:54:22 2013 New Revision: 255781 URL: http://svnweb.freebsd.org/changeset/base/255781 Log: Fix compilation of the i386 PAE kernel config. sys/i386/include/xen/xenvar.h: Provide vtomach() when PAE is defined. Approved by: re (blanket Xen) Modified: head/sys/i386/include/xen/xenvar.h Modified: head/sys/i386/include/xen/xenvar.h ============================================================================== --- head/sys/i386/include/xen/xenvar.h Sat Sep 21 23:30:32 2013 (r255780) +++ head/sys/i386/include/xen/xenvar.h Sun Sep 22 00:54:22 2013 (r255781) @@ -107,9 +107,7 @@ void xen_destroy_contiguous_region(void #elif defined(XENHVM) -#if !defined(PAE) #define vtomach(va) pmap_kextract((vm_offset_t) (va)) -#endif #define PFNTOMFN(pa) (pa) #define MFNTOPFN(ma) (ma) From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 02:30:01 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 2DBB1497; Sun, 22 Sep 2013 02:30:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A67AB24D6; Sun, 22 Sep 2013 02:30:00 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r8M2TtOb060487; Sun, 22 Sep 2013 05:29:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r8M2TtOb060487 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r8M2TtEo060486; Sun, 22 Sep 2013 05:29:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 22 Sep 2013 05:29:55 +0300 From: Konstantin Belousov To: "Bjoern A. Zeeb" Subject: Re: svn commit: r255759 - head/sys/netinet Message-ID: <20130922022955.GX41229@kib.kiev.ua> References: <201309211001.r8LA1pi1012735@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Mk6ex6FO95Eep5hX" Content-Disposition: inline In-Reply-To: <201309211001.r8LA1pi1012735@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 02:30:01 -0000 --Mk6ex6FO95Eep5hX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 21, 2013 at 10:01:51AM +0000, Bjoern A. Zeeb wrote: > Author: bz > Date: Sat Sep 21 10:01:51 2013 > New Revision: 255759 > URL: http://svnweb.freebsd.org/changeset/base/255759 >=20 > Log: > Introduce spares in the TCP syncache and timewait structures > so that fixed TCP_SIGNATURE handling can later be merged. > =20 > This is derived from follow-up work to SVN r183001 posted to > net@ on Sep 13 2008. > =20 > Approved by: re (gjb) >=20 > Modified: > head/sys/netinet/tcp_syncache.h > head/sys/netinet/tcp_var.h >=20 > Modified: head/sys/netinet/tcp_syncache.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/tcp_syncache.h Sat Sep 21 09:17:14 2013 (r255758) > +++ head/sys/netinet/tcp_syncache.h Sat Sep 21 10:01:51 2013 (r255759) > @@ -75,6 +75,7 @@ struct syncache { > struct label *sc_label; /* MAC label reference */ > struct ucred *sc_cred; /* cred cache for jail checks */ > =20 > + void *sc_pspare; /* TCP_SIGNATURE */ > u_int32_t sc_spare[2]; /* UTO */ > }; > =20 >=20 > Modified: head/sys/netinet/tcp_var.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/tcp_var.h Sat Sep 21 09:17:14 2013 (r255758) > +++ head/sys/netinet/tcp_var.h Sat Sep 21 10:01:51 2013 (r255759) > @@ -211,7 +211,7 @@ struct tcpcb { > u_int t_tsomax; /* tso burst length limit */ > =20 > uint32_t t_ispare[8]; /* 5 UTO, 3 TBD */ > - void *t_pspare2[4]; /* 4 TBD */ > + void *t_pspare2[4]; /* 1 TCP_SIGNATURE, 3 TBD */ I think the way to do the KBI padding in head is to introduce new members as needed, leaving spares for consumption during the stable branch lifetime. You did that right for two other changes in the commit. > uint64_t _pad[6]; /* 6 TBD (1-2 CC/RTT?) */ > }; > =20 > @@ -353,6 +353,8 @@ struct tcptw { > u_int t_starttime; > int tw_time; > TAILQ_ENTRY(tcptw) tw_2msl; > + void *tw_pspare; /* TCP_SIGNATURE */ > + u_int *tw_spare; /* TCP_SIGNATURE */ > }; > =20 > #define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb) --Mk6ex6FO95Eep5hX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSPlYiAAoJEJDCuSvBvK1B6IoP/ioE9bA5njhOQ9kTnZESECAk IWv8lVZeuC3qHAriBCUhat8H30hXyKHnmfQVfNy+PeTyX1dA3H41wiPzApUqxjWw 2S/28m4q+SEqNVl5CQTOXWbPyPvyL8OQA3NWzUag6VfpZQDXhYulMtPBNjMsV5bR Xz6o6EHluQBACWrZE43/T9YbC8xsNTeNzICAQEpYthg9vYGAdqvnnZ70fCOC0+va iz4kC0sX6ExnadD+TPF+ka6WLlruQVY/YEKLOfu6gqR5IT2VijxAeXSbYczbMIPI HTAKYnqwI0o5aNRKdNSwvOh2o6TLPZu6QVLs+TgLeDZe1a4vZT3LXZDohIItkZee 4+SdXoMZipc4f2HhwhjOypeFjPHGinlcAQFELT1skVag1i6V7R9QoJ7RrmHmzVrW 5JG+v44KUHI0Fnrgy1vRZiTN/bvwsZpedSXQA6AvvYF7UU9PobItgWak8Ll13K94 ELvPrMQMtrq5nSDQjPgqqb1gfc6mEll8Fm2t894vKu0v6v/CL0EpQQJenhmxraZs +NkUwIo7BlV0oCv+Qb573kZfEgfupMx1hG+/DtN442IO6ysttwUnsT7tWP+auDES vf2pwMEnswcYjaxkZXP/WazoFLscsbvrH6Ui5lFplPBv4mawMcegLZdKfx2QXUie 2BfpzT8YbkBkIX2Xfv4b =NCHx -----END PGP SIGNATURE----- --Mk6ex6FO95Eep5hX-- From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 02:46:14 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 5001B666; Sun, 22 Sep 2013 02:46:14 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3E61B256C; Sun, 22 Sep 2013 02:46: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 r8M2kE1f054173; Sun, 22 Sep 2013 02:46:14 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8M2kEIN054172; Sun, 22 Sep 2013 02:46:14 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309220246.r8M2kEIN054172@svn.freebsd.org> From: "Justin T. Gibbs" Date: Sun, 22 Sep 2013 02:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255783 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 02:46:14 -0000 Author: gibbs Date: Sun Sep 22 02:46:13 2013 New Revision: 255783 URL: http://svnweb.freebsd.org/changeset/base/255783 Log: Fix ia64 and mips kernel builds due to XENHVM=>GENERIC integration in revision 255744. sys/kern/subr_smp.c: IPI_SUSPEND is only available on amd64 and i386. Protect new uses of this constant with #ifdefs to avoid impacting other platforms. Approved by: re (blanket Xen) Modified: head/sys/kern/subr_smp.c Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Sun Sep 22 02:14:54 2013 (r255782) +++ head/sys/kern/subr_smp.c Sun Sep 22 02:46:13 2013 (r255783) @@ -225,6 +225,7 @@ generic_stop_cpus(cpuset_t map, u_int ty CTR2(KTR_SMP, "stop_cpus(%s) with %u type", cpusetobj_strprint(cpusetbuf, &map), type); +#if defined(__amd64__) || defined(__i386__) /* * When suspending, ensure there are are no IPIs in progress. * IPIs that have been issued, but not yet delivered (e.g. @@ -234,6 +235,7 @@ generic_stop_cpus(cpuset_t map, u_int ty */ if (type == IPI_SUSPEND) mtx_lock_spin(&smp_ipi_mtx); +#endif if (stopping_cpu != PCPU_GET(cpuid)) while (atomic_cmpset_int(&stopping_cpu, NOCPU, @@ -262,8 +264,10 @@ generic_stop_cpus(cpuset_t map, u_int ty } } +#if defined(__amd64__) || defined(__i386__) if (type == IPI_SUSPEND) mtx_unlock_spin(&smp_ipi_mtx); +#endif stopping_cpu = NOCPU; return (1); From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 03:34:20 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 6FD17BD9; Sun, 22 Sep 2013 03:34:20 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtpauth2.wiscmail.wisc.edu (wmauth2.doit.wisc.edu [144.92.197.222]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3FEEB27A4; Sun, 22 Sep 2013 03:34:19 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0MTI00I00BIN2J00@smtpauth2.wiscmail.wisc.edu>; Sat, 21 Sep 2013 22:34:17 -0500 (CDT) X-Spam-PmxInfo: Server=avs-2, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.9.22.32715, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from comporellon.tachypleus.net (adsl-76-208-67-251.dsl.mdsnwi.sbcglobal.net [76.208.67.251]) by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MTI00CQ8CL4IT00@smtpauth2.wiscmail.wisc.edu>; Sat, 21 Sep 2013 22:34:17 -0500 (CDT) Message-id: <523E6538.5090301@freebsd.org> Date: Sat, 21 Sep 2013 22:34:16 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130907 Thunderbird/17.0.8 To: "Justin T. Gibbs" Subject: Re: svn commit: r255783 - head/sys/kern References: <201309220246.r8M2kEIN054172@svn.freebsd.org> In-reply-to: <201309220246.r8M2kEIN054172@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 03:34:20 -0000 On 09/21/13 21:46, Justin T. Gibbs wrote: > Author: gibbs > Date: Sun Sep 22 02:46:13 2013 > New Revision: 255783 > URL: http://svnweb.freebsd.org/changeset/base/255783 > > Log: > Fix ia64 and mips kernel builds due to XENHVM=>GENERIC integration in > revision 255744. > > sys/kern/subr_smp.c: > IPI_SUSPEND is only available on amd64 and i386. Protect > new uses of this constant with #ifdefs to avoid impacting > other platforms. Would it make more sense just to add this to other platforms? It needn't actually be sent, of course, and it would cut down on platform-specific #ifdef in MI code, which is universally a good thing. -Nathan From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 03:46:34 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id F233FE12; Sun, 22 Sep 2013 03:46:33 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from aslan.scsiguy.com (aslan.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B9067280C; Sun, 22 Sep 2013 03:46:33 +0000 (UTC) Received: from macbook.scsiguy.com (macbook.scsiguy.com [192.168.0.99]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r8M3kVLb069597 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 21 Sep 2013 21:46:32 -0600 (MDT) (envelope-from gibbs@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255783 - head/sys/kern From: "Justin T. Gibbs" In-Reply-To: <523E6538.5090301@freebsd.org> Date: Sat, 21 Sep 2013 21:46:30 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <0CCA0163-C649-4A61-B6E6-06096327461E@FreeBSD.org> References: <201309220246.r8M2kEIN054172@svn.freebsd.org> <523E6538.5090301@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1510) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [192.168.0.4]); Sat, 21 Sep 2013 21:46:32 -0600 (MDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 03:46:34 -0000 On Sep 21, 2013, at 9:34 PM, Nathan Whitehorn = wrote: > On 09/21/13 21:46, Justin T. Gibbs wrote: >> Author: gibbs >> Date: Sun Sep 22 02:46:13 2013 >> New Revision: 255783 >> URL: http://svnweb.freebsd.org/changeset/base/255783 >>=20 >> Log: >> Fix ia64 and mips kernel builds due to XENHVM=3D>GENERIC = integration in >> revision 255744. >> sys/kern/subr_smp.c: >> IPI_SUSPEND is only available on amd64 and i386. Protect >> new uses of this constant with #ifdefs to avoid impacting >> other platforms. >=20 > Would it make more sense just to add this to other platforms? It = needn't actually be sent, of course, and it would cut down on = platform-specific #ifdef in MI code, which is universally a good thing. > -Nathan Sure. But the build was broken and I opted to restore the status quo = rather than take the more time consuming path of trying to clean up all = of the other #ifdefs and then having to reverify builds on all supported = platforms. -- Justin= From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 06:38:33 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 72D712D9; Sun, 22 Sep 2013 06:38:33 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D7DC2DD2; Sun, 22 Sep 2013 06:38:33 +0000 (UTC) Received: by mail-pa0-f47.google.com with SMTP id kp14so1048141pab.34 for ; Sat, 21 Sep 2013 23:38:32 -0700 (PDT) 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=U3S8RZKoKsHC1tKGpVI9K2Hv99HL09rWywG5vy9Q3ug=; b=blaOWVKFggycPTRPD3wlX9dn4PprKiEMZH2bnWEwMIC3+5ruOfFUFEeT4nsh6n2bCH p6rBg/nMmm8PaE5D8YAnyqVKYVYmysx9sXsIPvxKcOxGzz/ibG65S+cejPxjd8yIgADL dPqK2YsTpbwcJJO98eCb0oo8mh3TzSYb+HTbaRdVKYoer0APPJ0KrmzSGuVoCOTPhjbV gLRtdzJeQQBFLfyqL1z4PVv4c27pliahv9hxarHOIFJhFH/ctleXlZHJlZ6shxv13C1w Zl+SyzgSo2a4TbKFWl2In725OC1nk7OcXfX4KjOflm6WTXXW/oQvBkR/NpoZMyk40jxP wJeA== MIME-Version: 1.0 X-Received: by 10.68.189.5 with SMTP id ge5mr17378472pbc.42.1379831912825; Sat, 21 Sep 2013 23:38:32 -0700 (PDT) Received: by 10.68.253.162 with HTTP; Sat, 21 Sep 2013 23:38:32 -0700 (PDT) In-Reply-To: <201309220246.r8M2kEIN054172@svn.freebsd.org> References: <201309220246.r8M2kEIN054172@svn.freebsd.org> Date: Sun, 22 Sep 2013 02:38:32 -0400 Message-ID: Subject: Re: svn commit: r255783 - head/sys/kern From: Aryeh Friedman To: "Justin T. Gibbs" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 06:38:33 -0000 On Sat, Sep 21, 2013 at 10:46 PM, Justin T. Gibbs wrote: > Author: gibbs > Date: Sun Sep 22 02:46:13 2013 > New Revision: 255783 > URL: http://svnweb.freebsd.org/changeset/base/255783 > > Log: > Fix ia64 and mips kernel builds due to XENHVM=>GENERIC integration in > revision 255744. > > sys/kern/subr_smp.c: > IPI_SUSPEND is only available on amd64 and i386. Protect > new uses of this constant with #ifdefs to avoid impacting > other platforms. > > Approved by: re (blanket Xen) > > Modified: > head/sys/kern/subr_smp.c > > Modified: head/sys/kern/subr_smp.c > > ============================================================================== > --- head/sys/kern/subr_smp.c Sun Sep 22 02:14:54 2013 (r255782) > +++ head/sys/kern/subr_smp.c Sun Sep 22 02:46:13 2013 (r255783) > @@ -225,6 +225,7 @@ generic_stop_cpus(cpuset_t map, u_int ty > CTR2(KTR_SMP, "stop_cpus(%s) with %u type", > cpusetobj_strprint(cpusetbuf, &map), type); > > +#if defined(__amd64__) || defined(__i386__) > /* > * When suspending, ensure there are are no IPIs in progress. > * IPIs that have been issued, but not yet delivered (e.g. > @@ -234,6 +235,7 @@ generic_stop_cpus(cpuset_t map, u_int ty > */ > if (type == IPI_SUSPEND) > mtx_lock_spin(&smp_ipi_mtx); > +#endif > > if (stopping_cpu != PCPU_GET(cpuid)) > while (atomic_cmpset_int(&stopping_cpu, NOCPU, > @@ -262,8 +264,10 @@ generic_stop_cpus(cpuset_t map, u_int ty > } > } > > +#if defined(__amd64__) || defined(__i386__) > if (type == IPI_SUSPEND) > mtx_unlock_spin(&smp_ipi_mtx); > +#endif > > stopping_cpu = NOCPU; > return (1); > _______________________________________________ > 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" > This seems to cause a kernel panic if the machine is left idle for too long From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 07:30:18 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 80CEA909; Sun, 22 Sep 2013 07:30:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F44B2FF8; Sun, 22 Sep 2013 07:30: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 r8M7UIgU031191; Sun, 22 Sep 2013 07:30:18 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8M7UIPD031188; Sun, 22 Sep 2013 07:30:18 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201309220730.r8M7UIPD031188@svn.freebsd.org> From: Andrew Turner Date: Sun, 22 Sep 2013 07:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255784 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 07:30:18 -0000 Author: andrew Date: Sun Sep 22 07:30:17 2013 New Revision: 255784 URL: http://svnweb.freebsd.org/changeset/base/255784 Log: Remove the armv6eb architecture as it is unused, and almost certainly broken. None of our kernels can boot armv6eb. The little-endian kernels do not have the required code to be able to switch endian when running a big-endian executable. Approved by: re (gjb) Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Sun Sep 22 02:46:13 2013 (r255783) +++ head/Makefile Sun Sep 22 07:30:17 2013 (r255784) @@ -374,7 +374,7 @@ kernel-toolchains: # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 -TARGET_ARCHES_arm?= arm armeb armv6 armv6eb +TARGET_ARCHES_arm?= arm armeb armv6 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 TARGET_ARCHES_powerpc?= powerpc powerpc64 TARGET_ARCHES_pc98?= i386 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Sep 22 02:46:13 2013 (r255783) +++ head/Makefile.inc1 Sun Sep 22 07:30:17 2013 (r255784) @@ -132,7 +132,7 @@ VERSION!= uname -srp VERSION+= ${OSRELDATE} .endif -KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm armv6eb/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 +KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 12:33:30 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 922C9D8; Sun, 22 Sep 2013 12:33:30 +0000 (UTC) (envelope-from gibbs@freebsd.org) Received: from aslan.scsiguy.com (www.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 674E02CB0; Sun, 22 Sep 2013 12:33:30 +0000 (UTC) Received: from macbook.scsiguy.com (macbook.scsiguy.com [192.168.0.99]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r8MCXSTf071390 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 22 Sep 2013 06:33:29 -0600 (MDT) (envelope-from gibbs@freebsd.org) Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255783 - head/sys/kern From: "Justin T. Gibbs" In-Reply-To: Date: Sun, 22 Sep 2013 06:33:29 -0600 Message-Id: References: <201309220246.r8M2kEIN054172@svn.freebsd.org> To: Aryeh Friedman X-Mailer: Apple Mail (2.1510) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Sun, 22 Sep 2013 06:33:29 -0600 (MDT) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 12:33:30 -0000 On Sep 22, 2013, at 12:38 AM, Aryeh Friedman = wrote: > On Sat, Sep 21, 2013 at 10:46 PM, Justin T. Gibbs = wrote: > Author: gibbs > Date: Sun Sep 22 02:46:13 2013 > New Revision: 255783 > URL: http://svnweb.freebsd.org/changeset/base/255783 >=20 > Log: > Fix ia64 and mips kernel builds due to XENHVM=3D>GENERIC integration = in > revision 255744. >=20 > sys/kern/subr_smp.c: > IPI_SUSPEND is only available on amd64 and i386. Protect > new uses of this constant with #ifdefs to avoid impacting > other platforms. >=20 > Approved by: re (blanket Xen) >=20 > Modified: > head/sys/kern/subr_smp.c >=20 > Modified: head/sys/kern/subr_smp.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/kern/subr_smp.c Sun Sep 22 02:14:54 2013 = (r255782) > +++ head/sys/kern/subr_smp.c Sun Sep 22 02:46:13 2013 = (r255783) > @@ -225,6 +225,7 @@ generic_stop_cpus(cpuset_t map, u_int ty > CTR2(KTR_SMP, "stop_cpus(%s) with %u type", > cpusetobj_strprint(cpusetbuf, &map), type); >=20 > +#if defined(__amd64__) || defined(__i386__) > /* > * When suspending, ensure there are are no IPIs in progress. > * IPIs that have been issued, but not yet delivered (e.g. > @@ -234,6 +235,7 @@ generic_stop_cpus(cpuset_t map, u_int ty > */ > if (type =3D=3D IPI_SUSPEND) > mtx_lock_spin(&smp_ipi_mtx); > +#endif >=20 > if (stopping_cpu !=3D PCPU_GET(cpuid)) > while (atomic_cmpset_int(&stopping_cpu, NOCPU, > @@ -262,8 +264,10 @@ generic_stop_cpus(cpuset_t map, u_int ty > } > } >=20 > +#if defined(__amd64__) || defined(__i386__) > if (type =3D=3D IPI_SUSPEND) > mtx_unlock_spin(&smp_ipi_mtx); > +#endif >=20 > stopping_cpu =3D NOCPU; > return (1); > _______________________________________________ > 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" >=20 >=20 > This seems to cause a kernel panic if the machine is left idle for too = long Seeing the actual panic text would help me to address the issue. -- Justin= From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 13:36:54 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 99788933; Sun, 22 Sep 2013 13:36:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 862712F74; Sun, 22 Sep 2013 13:36: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 r8MDas5a035216; Sun, 22 Sep 2013 13:36:54 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MDaqYa035192; Sun, 22 Sep 2013 13:36:52 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309221336.r8MDaqYa035192@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 22 Sep 2013 13:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255786 - in head/sys: arm/arm i386/i386 kern mips/mips powerpc/aim powerpc/booke sparc64/sparc64 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 13:36:54 -0000 Author: glebius Date: Sun Sep 22 13:36:52 2013 New Revision: 255786 URL: http://svnweb.freebsd.org/changeset/base/255786 Log: - Create kern.ipc.sendfile namespace, and put the new "readhead" OID there as "kern.ipc.sendfile.readahead". - Push all nsfbuf related tunables into MD code. Don't move them to new namespace in favor of POLA. Reviewed by: scottl Approved by: re (gjb) Modified: head/sys/arm/arm/vm_machdep.c head/sys/i386/i386/vm_machdep.c head/sys/kern/uipc_syscalls.c head/sys/mips/mips/vm_machdep.c head/sys/powerpc/aim/vm_machdep.c head/sys/powerpc/booke/vm_machdep.c head/sys/sparc64/sparc64/vm_machdep.c head/sys/sys/sf_buf.h Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Sun Sep 22 10:41:01 2013 (r255785) +++ head/sys/arm/arm/vm_machdep.c Sun Sep 22 13:36:52 2013 (r255786) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -80,16 +81,27 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct switchframe) == 24); CTASSERT(sizeof(struct trapframe) == 80); +#ifndef ARM_USE_SMALL_ALLOC + #ifndef NSFBUFS #define NSFBUFS (512 + maxusers * 16) #endif -#ifndef ARM_USE_SMALL_ALLOC +static int nsfbufs; +static int nsfbufspeak; +static int nsfbufsused; + +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, + "Maximum number of sendfile(2) sf_bufs available"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, + "Number of sendfile(2) sf_bufs at peak usage"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, + "Number of sendfile(2) sf_bufs in use"); + static void sf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); LIST_HEAD(sf_head, sf_buf); - /* * A hash table of active sendfile(2) buffers @@ -106,7 +118,7 @@ static u_int sf_buf_alloc_want; * A lock used to synchronize access to the hash table and free list */ static struct mtx sf_buf_lock; -#endif +#endif /* !ARM_USE_SMALL_ALLOC */ /* * Finish a fork operation, with process p2 nearly set up. Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Sun Sep 22 10:41:01 2013 (r255785) +++ head/sys/i386/i386/vm_machdep.c Sun Sep 22 13:36:52 2013 (r255786) @@ -117,6 +117,18 @@ static void cpu_reset_proxy(void); static u_int cpu_reset_proxyid; static volatile u_int cpu_reset_proxy_active; #endif + +static int nsfbufs; +static int nsfbufspeak; +static int nsfbufsused; + +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, + "Maximum number of sendfile(2) sf_bufs available"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, + "Number of sendfile(2) sf_bufs at peak usage"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, + "Number of sendfile(2) sf_bufs in use"); + static void sf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sun Sep 22 10:41:01 2013 (r255785) +++ head/sys/kern/uipc_syscalls.c Sun Sep 22 13:36:52 2013 (r255786) @@ -123,19 +123,11 @@ counter_u64_t sfstat[sizeof(struct sfsta /* * sendfile(2)-related variables and associated sysctls */ -int nsfbufs; -int nsfbufspeak; -int nsfbufsused; +static SYSCTL_NODE(_kern_ipc, OID_AUTO, sendfile, CTLFLAG_RW, 0, + "sendfile(2) tunables"); static int sfreadahead = 1; - -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, - "Maximum number of sendfile(2) sf_bufs available"); -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, - "Number of sendfile(2) sf_bufs at peak usage"); -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, - "Number of sendfile(2) sf_bufs in use"); -SYSCTL_INT(_kern_ipc, OID_AUTO, sfreadahead, CTLFLAG_RW, &sfreadahead, 0, - "Number of sendfile(2) read-ahead MAXBSIZE blocks"); +SYSCTL_INT(_kern_ipc_sendfile, OID_AUTO, readahead, CTLFLAG_RW, + &sfreadahead, 0, "Number of sendfile(2) read-ahead MAXBSIZE blocks"); static void Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Sun Sep 22 10:41:01 2013 (r255785) +++ head/sys/mips/mips/vm_machdep.c Sun Sep 22 13:36:52 2013 (r255786) @@ -80,10 +80,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#ifndef NSFBUFS -#define NSFBUFS (512 + maxusers * 16) -#endif - /* Duplicated from asm.h */ #if defined(__mips_o32) #define SZREG 4 @@ -97,6 +93,22 @@ __FBSDID("$FreeBSD$"); #endif #ifndef __mips_n64 + +#ifndef NSFBUFS +#define NSFBUFS (512 + maxusers * 16) +#endif + +static int nsfbufs; +static int nsfbufspeak; +static int nsfbufsused; + +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, + "Maximum number of sendfile(2) sf_bufs available"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, + "Number of sendfile(2) sf_bufs at peak usage"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, + "Number of sendfile(2) sf_bufs in use"); + static void sf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); @@ -110,7 +122,7 @@ static struct { } sf_freelist; static u_int sf_buf_alloc_want; -#endif +#endif /* !__mips_n64 */ /* * Finish a fork operation, with process p2 nearly set up. Modified: head/sys/powerpc/aim/vm_machdep.c ============================================================================== --- head/sys/powerpc/aim/vm_machdep.c Sun Sep 22 10:41:01 2013 (r255785) +++ head/sys/powerpc/aim/vm_machdep.c Sun Sep 22 13:36:52 2013 (r255786) @@ -111,6 +111,17 @@ #define NSFBUFS (512 + maxusers * 16) #endif +static int nsfbufs; +static int nsfbufspeak; +static int nsfbufsused; + +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, + "Maximum number of sendfile(2) sf_bufs available"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, + "Number of sendfile(2) sf_bufs at peak usage"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, + "Number of sendfile(2) sf_bufs in use"); + static void sf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); Modified: head/sys/powerpc/booke/vm_machdep.c ============================================================================== --- head/sys/powerpc/booke/vm_machdep.c Sun Sep 22 10:41:01 2013 (r255785) +++ head/sys/powerpc/booke/vm_machdep.c Sun Sep 22 13:36:52 2013 (r255786) @@ -137,6 +137,17 @@ __FBSDID("$FreeBSD$"); #define NSFBUFS (512 + maxusers * 16) #endif +static int nsfbufs; +static int nsfbufspeak; +static int nsfbufsused; + +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, + "Maximum number of sendfile(2) sf_bufs available"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, + "Number of sendfile(2) sf_bufs at peak usage"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, + "Number of sendfile(2) sf_bufs in use"); + static void sf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Sun Sep 22 10:41:01 2013 (r255785) +++ head/sys/sparc64/sparc64/vm_machdep.c Sun Sep 22 13:36:52 2013 (r255786) @@ -88,6 +88,17 @@ __FBSDID("$FreeBSD$"); #define NSFBUFS (512 + maxusers * 16) #endif +static int nsfbufs; +static int nsfbufspeak; +static int nsfbufsused; + +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, + "Maximum number of sendfile(2) sf_bufs available"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, + "Number of sendfile(2) sf_bufs at peak usage"); +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, + "Number of sendfile(2) sf_bufs in use"); + static void sf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); Modified: head/sys/sys/sf_buf.h ============================================================================== --- head/sys/sys/sf_buf.h Sun Sep 22 10:41:01 2013 (r255785) +++ head/sys/sys/sf_buf.h Sun Sep 22 13:36:52 2013 (r255786) @@ -42,10 +42,6 @@ struct vm_page; -extern int nsfbufs; /* Number of sendfile(2) bufs alloced */ -extern int nsfbufspeak; /* Peak of nsfbufsused */ -extern int nsfbufsused; /* Number of sendfile(2) bufs in use */ - struct sfstat { /* sendfile statistics */ uint64_t sf_iocnt; /* times sendfile had to do disk I/O */ uint64_t sf_allocfail; /* times sfbuf allocation failed */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 14:09:08 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 0FF5E312; Sun, 22 Sep 2013 14:09:08 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EFFAF214D; Sun, 22 Sep 2013 14:09: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 r8ME97vj051962; Sun, 22 Sep 2013 14:09:07 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8ME97Gr051958; Sun, 22 Sep 2013 14:09:07 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309221409.r8ME97Gr051958@svn.freebsd.org> From: Davide Italiano Date: Sun, 22 Sep 2013 14:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255788 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 14:09:08 -0000 Author: davide Date: Sun Sep 22 14:09:07 2013 New Revision: 255788 URL: http://svnweb.freebsd.org/changeset/base/255788 Log: Consistently use the same value to indicate exclusively-held and shared-held locks for all the primitives in lc_lock/lc_unlock routines. This fixes the problems introduced in r255747, which indeed introduced an inversion in the logic. Reported by: many Tested by: bdrewery, pho, lme, Adam McDougall, O. Hartmann Approved by: re (glebius) Modified: head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sun Sep 22 13:54:08 2013 (r255787) +++ head/sys/kern/kern_rwlock.c Sun Sep 22 14:09:07 2013 (r255788) @@ -147,9 +147,9 @@ lock_rw(struct lock_object *lock, uintpt rw = (struct rwlock *)lock; if (how) - rw_wlock(rw); - else rw_rlock(rw); + else + rw_wlock(rw); } uintptr_t @@ -161,10 +161,10 @@ unlock_rw(struct lock_object *lock) rw_assert(rw, RA_LOCKED | LA_NOTRECURSED); if (rw->rw_lock & RW_LOCK_READ) { rw_runlock(rw); - return (0); + return (1); } else { rw_wunlock(rw); - return (1); + return (0); } } Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Sep 22 13:54:08 2013 (r255787) +++ head/sys/kern/kern_sx.c Sun Sep 22 14:09:07 2013 (r255788) @@ -162,9 +162,9 @@ lock_sx(struct lock_object *lock, uintpt sx = (struct sx *)lock; if (how) - sx_xlock(sx); - else sx_slock(sx); + else + sx_xlock(sx); } uintptr_t @@ -176,10 +176,10 @@ unlock_sx(struct lock_object *lock) sx_assert(sx, SA_LOCKED | SA_NOTRECURSED); if (sx_xlocked(sx)) { sx_xunlock(sx); - return (1); + return (0); } else { sx_sunlock(sx); - return (0); + return (1); } } From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 14:53:07 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 96CE1D68; Sun, 22 Sep 2013 14:53:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8291E25DC; Sun, 22 Sep 2013 14:53: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 r8MEr7Ln076079; Sun, 22 Sep 2013 14:53:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MEr72i076078; Sun, 22 Sep 2013 14:53:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201309221453.r8MEr72i076078@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 22 Sep 2013 14:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255792 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 14:53:07 -0000 Author: bz Date: Sun Sep 22 14:53:07 2013 New Revision: 255792 URL: http://svnweb.freebsd.org/changeset/base/255792 Log: Update comment from draft to RFC number. Submitted by: Loganaden Velvindron (logan elandsys.com) Approved by: re (gjb) MFC after: 6 days Modified: head/sys/netinet6/frag6.c Modified: head/sys/netinet6/frag6.c ============================================================================== --- head/sys/netinet6/frag6.c Sun Sep 22 14:23:22 2013 (r255791) +++ head/sys/netinet6/frag6.c Sun Sep 22 14:53:07 2013 (r255792) @@ -222,9 +222,8 @@ frag6_input(struct mbuf **mp, int *offp, offset += sizeof(struct ip6_frag); /* - * XXX-BZ RFC XXXX (draft-gont-6man-ipv6-atomic-fragments) - * Handle "atomic" fragments (offset and m bit set to 0) upfront, - * unrelated to any reassembly. Just skip the fragment header. + * RFC 6946: Handle "atomic" fragments (offset and m bit set to 0) + * upfront, unrelated to any reassembly. Just skip the fragment header. */ if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { /* XXX-BZ we want dedicated counters for this. */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 17:48:11 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 82587D8A; Sun, 22 Sep 2013 17:48:11 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 557B42D04; Sun, 22 Sep 2013 17:48: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 r8MHmB6T067680; Sun, 22 Sep 2013 17:48:11 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MHmBWV067679; Sun, 22 Sep 2013 17:48:11 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201309221748.r8MHmBWV067679@svn.freebsd.org> From: Alan Cox Date: Sun, 22 Sep 2013 17:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255793 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 17:48:11 -0000 Author: alc Date: Sun Sep 22 17:48:10 2013 New Revision: 255793 URL: http://svnweb.freebsd.org/changeset/base/255793 Log: Both the vm_map and vmspace zones are defined as "no free". So, there is no point in defining a fini function for these zones. Reviewed by: kib Approved by: re (glebius) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Sep 22 14:53:07 2013 (r255792) +++ head/sys/vm/vm_map.c Sun Sep 22 17:48:10 2013 (r255793) @@ -127,9 +127,7 @@ static uma_zone_t kmapentzone; static uma_zone_t mapzone; static uma_zone_t vmspace_zone; static int vmspace_zinit(void *mem, int size, int flags); -static void vmspace_zfini(void *mem, int size); static int vm_map_zinit(void *mem, int ize, int flags); -static void vm_map_zfini(void *mem, int size); static void _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, vm_offset_t max); static void vm_map_entry_deallocate(vm_map_entry_t entry, boolean_t system_map); @@ -192,7 +190,7 @@ vm_map_startup(void) #else NULL, #endif - vm_map_zinit, vm_map_zfini, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + vm_map_zinit, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_prealloc(mapzone, MAX_KMAP); kmapentzone = uma_zcreate("KMAP ENTRY", sizeof(struct vm_map_entry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, @@ -205,16 +203,7 @@ vm_map_startup(void) #else NULL, #endif - vmspace_zinit, vmspace_zfini, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); -} - -static void -vmspace_zfini(void *mem, int size) -{ - struct vmspace *vm; - - vm = (struct vmspace *)mem; - vm_map_zfini(&vm->vm_map, sizeof(vm->vm_map)); + vmspace_zinit, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); } static int @@ -230,16 +219,6 @@ vmspace_zinit(void *mem, int size, int f return (0); } -static void -vm_map_zfini(void *mem, int size) -{ - vm_map_t map; - - map = (vm_map_t)mem; - mtx_destroy(&map->system_mtx); - sx_destroy(&map->lock); -} - static int vm_map_zinit(void *mem, int size, int flags) { From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 18:31:50 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 2EA1EA1C; Sun, 22 Sep 2013 18:31:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5ED2F2F; Sun, 22 Sep 2013 18:31: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 r8MIVnho094482; Sun, 22 Sep 2013 18:31:49 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MIVnWb094481; Sun, 22 Sep 2013 18:31:49 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309221831.r8MIVnWb094481@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 22 Sep 2013 18:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255794 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 18:31:50 -0000 Author: des Date: Sun Sep 22 18:31:49 2013 New Revision: 255794 URL: http://svnweb.freebsd.org/changeset/base/255794 Log: Fix indentation. Approved by: re (blanket) Modified: head/etc/mtree/BSD.var.dist Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Sun Sep 22 17:48:10 2013 (r255793) +++ head/etc/mtree/BSD.var.dist Sun Sep 22 18:31:49 2013 (r255794) @@ -97,7 +97,7 @@ vi.recover mode=01777 .. .. - unbound uname=unbound gname=unbound mode=0750 + unbound uname=unbound gname=unbound mode=0755 .. yp .. From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 19:09:44 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id E18A414B; Sun, 22 Sep 2013 19:09:43 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CC50120DB; Sun, 22 Sep 2013 19:09: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 r8MJ9hZI013089; Sun, 22 Sep 2013 19:09:43 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MJ9hJ5013087; Sun, 22 Sep 2013 19:09:43 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309221909.r8MJ9hJ5013087@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 22 Sep 2013 19:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255795 - in head/contrib/unbound: . util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 19:09:44 -0000 Author: des Date: Sun Sep 22 19:09:43 2013 New Revision: 255795 URL: http://svnweb.freebsd.org/changeset/base/255795 Log: Due to a missing command-line argument, yacc regenerated the parser but not its header file, resulting in a mismatch between the lexer and parser and strange errors when reading the configuration file. Approved by: re (blanket) Modified: head/contrib/unbound/freebsd-configure.sh head/contrib/unbound/util/configparser.h Modified: head/contrib/unbound/freebsd-configure.sh ============================================================================== --- head/contrib/unbound/freebsd-configure.sh Sun Sep 22 18:31:49 2013 (r255794) +++ head/contrib/unbound/freebsd-configure.sh Sun Sep 22 19:09:43 2013 (r255795) @@ -39,4 +39,4 @@ EOF /usr/bin/flex -L -t util/configlexer.lex } >util/configlexer.c -/usr/bin/yacc -o util/configparser.c util/configparser.y +/usr/bin/yacc -d -o util/configparser.c util/configparser.y Modified: head/contrib/unbound/util/configparser.h ============================================================================== --- head/contrib/unbound/util/configparser.h Sun Sep 22 18:31:49 2013 (r255794) +++ head/contrib/unbound/util/configparser.h Sun Sep 22 19:09:43 2013 (r255795) @@ -1,342 +1,138 @@ -/* A Bison parser, made by GNU Bison 2.6.1. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_UTIL_CONFIGPARSER_H -# define YY_UTIL_CONFIGPARSER_H -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - SPACE = 258, - LETTER = 259, - NEWLINE = 260, - COMMENT = 261, - COLON = 262, - ANY = 263, - ZONESTR = 264, - STRING_ARG = 265, - VAR_SERVER = 266, - VAR_VERBOSITY = 267, - VAR_NUM_THREADS = 268, - VAR_PORT = 269, - VAR_OUTGOING_RANGE = 270, - VAR_INTERFACE = 271, - VAR_DO_IP4 = 272, - VAR_DO_IP6 = 273, - VAR_DO_UDP = 274, - VAR_DO_TCP = 275, - VAR_CHROOT = 276, - VAR_USERNAME = 277, - VAR_DIRECTORY = 278, - VAR_LOGFILE = 279, - VAR_PIDFILE = 280, - VAR_MSG_CACHE_SIZE = 281, - VAR_MSG_CACHE_SLABS = 282, - VAR_NUM_QUERIES_PER_THREAD = 283, - VAR_RRSET_CACHE_SIZE = 284, - VAR_RRSET_CACHE_SLABS = 285, - VAR_OUTGOING_NUM_TCP = 286, - VAR_INFRA_HOST_TTL = 287, - VAR_INFRA_LAME_TTL = 288, - VAR_INFRA_CACHE_SLABS = 289, - VAR_INFRA_CACHE_NUMHOSTS = 290, - VAR_INFRA_CACHE_LAME_SIZE = 291, - VAR_NAME = 292, - VAR_STUB_ZONE = 293, - VAR_STUB_HOST = 294, - VAR_STUB_ADDR = 295, - VAR_TARGET_FETCH_POLICY = 296, - VAR_HARDEN_SHORT_BUFSIZE = 297, - VAR_HARDEN_LARGE_QUERIES = 298, - VAR_FORWARD_ZONE = 299, - VAR_FORWARD_HOST = 300, - VAR_FORWARD_ADDR = 301, - VAR_DO_NOT_QUERY_ADDRESS = 302, - VAR_HIDE_IDENTITY = 303, - VAR_HIDE_VERSION = 304, - VAR_IDENTITY = 305, - VAR_VERSION = 306, - VAR_HARDEN_GLUE = 307, - VAR_MODULE_CONF = 308, - VAR_TRUST_ANCHOR_FILE = 309, - VAR_TRUST_ANCHOR = 310, - VAR_VAL_OVERRIDE_DATE = 311, - VAR_BOGUS_TTL = 312, - VAR_VAL_CLEAN_ADDITIONAL = 313, - VAR_VAL_PERMISSIVE_MODE = 314, - VAR_INCOMING_NUM_TCP = 315, - VAR_MSG_BUFFER_SIZE = 316, - VAR_KEY_CACHE_SIZE = 317, - VAR_KEY_CACHE_SLABS = 318, - VAR_TRUSTED_KEYS_FILE = 319, - VAR_VAL_NSEC3_KEYSIZE_ITERATIONS = 320, - VAR_USE_SYSLOG = 321, - VAR_OUTGOING_INTERFACE = 322, - VAR_ROOT_HINTS = 323, - VAR_DO_NOT_QUERY_LOCALHOST = 324, - VAR_CACHE_MAX_TTL = 325, - VAR_HARDEN_DNSSEC_STRIPPED = 326, - VAR_ACCESS_CONTROL = 327, - VAR_LOCAL_ZONE = 328, - VAR_LOCAL_DATA = 329, - VAR_INTERFACE_AUTOMATIC = 330, - VAR_STATISTICS_INTERVAL = 331, - VAR_DO_DAEMONIZE = 332, - VAR_USE_CAPS_FOR_ID = 333, - VAR_STATISTICS_CUMULATIVE = 334, - VAR_OUTGOING_PORT_PERMIT = 335, - VAR_OUTGOING_PORT_AVOID = 336, - VAR_DLV_ANCHOR_FILE = 337, - VAR_DLV_ANCHOR = 338, - VAR_NEG_CACHE_SIZE = 339, - VAR_HARDEN_REFERRAL_PATH = 340, - VAR_PRIVATE_ADDRESS = 341, - VAR_PRIVATE_DOMAIN = 342, - VAR_REMOTE_CONTROL = 343, - VAR_CONTROL_ENABLE = 344, - VAR_CONTROL_INTERFACE = 345, - VAR_CONTROL_PORT = 346, - VAR_SERVER_KEY_FILE = 347, - VAR_SERVER_CERT_FILE = 348, - VAR_CONTROL_KEY_FILE = 349, - VAR_CONTROL_CERT_FILE = 350, - VAR_EXTENDED_STATISTICS = 351, - VAR_LOCAL_DATA_PTR = 352, - VAR_JOSTLE_TIMEOUT = 353, - VAR_STUB_PRIME = 354, - VAR_UNWANTED_REPLY_THRESHOLD = 355, - VAR_LOG_TIME_ASCII = 356, - VAR_DOMAIN_INSECURE = 357, - VAR_PYTHON = 358, - VAR_PYTHON_SCRIPT = 359, - VAR_VAL_SIG_SKEW_MIN = 360, - VAR_VAL_SIG_SKEW_MAX = 361, - VAR_CACHE_MIN_TTL = 362, - VAR_VAL_LOG_LEVEL = 363, - VAR_AUTO_TRUST_ANCHOR_FILE = 364, - VAR_KEEP_MISSING = 365, - VAR_ADD_HOLDDOWN = 366, - VAR_DEL_HOLDDOWN = 367, - VAR_SO_RCVBUF = 368, - VAR_EDNS_BUFFER_SIZE = 369, - VAR_PREFETCH = 370, - VAR_PREFETCH_KEY = 371, - VAR_SO_SNDBUF = 372, - VAR_HARDEN_BELOW_NXDOMAIN = 373, - VAR_IGNORE_CD_FLAG = 374, - VAR_LOG_QUERIES = 375, - VAR_TCP_UPSTREAM = 376, - VAR_SSL_UPSTREAM = 377, - VAR_SSL_SERVICE_KEY = 378, - VAR_SSL_SERVICE_PEM = 379, - VAR_SSL_PORT = 380, - VAR_FORWARD_FIRST = 381, - VAR_STUB_FIRST = 382, - VAR_MINIMAL_RESPONSES = 383, - VAR_RRSET_ROUNDROBIN = 384 - }; -#endif -/* Tokens. */ -#define SPACE 258 -#define LETTER 259 -#define NEWLINE 260 -#define COMMENT 261 -#define COLON 262 -#define ANY 263 -#define ZONESTR 264 -#define STRING_ARG 265 -#define VAR_SERVER 266 -#define VAR_VERBOSITY 267 -#define VAR_NUM_THREADS 268 -#define VAR_PORT 269 -#define VAR_OUTGOING_RANGE 270 -#define VAR_INTERFACE 271 -#define VAR_DO_IP4 272 -#define VAR_DO_IP6 273 -#define VAR_DO_UDP 274 -#define VAR_DO_TCP 275 -#define VAR_CHROOT 276 -#define VAR_USERNAME 277 -#define VAR_DIRECTORY 278 -#define VAR_LOGFILE 279 -#define VAR_PIDFILE 280 -#define VAR_MSG_CACHE_SIZE 281 -#define VAR_MSG_CACHE_SLABS 282 -#define VAR_NUM_QUERIES_PER_THREAD 283 -#define VAR_RRSET_CACHE_SIZE 284 -#define VAR_RRSET_CACHE_SLABS 285 -#define VAR_OUTGOING_NUM_TCP 286 -#define VAR_INFRA_HOST_TTL 287 -#define VAR_INFRA_LAME_TTL 288 -#define VAR_INFRA_CACHE_SLABS 289 -#define VAR_INFRA_CACHE_NUMHOSTS 290 -#define VAR_INFRA_CACHE_LAME_SIZE 291 -#define VAR_NAME 292 -#define VAR_STUB_ZONE 293 -#define VAR_STUB_HOST 294 -#define VAR_STUB_ADDR 295 -#define VAR_TARGET_FETCH_POLICY 296 -#define VAR_HARDEN_SHORT_BUFSIZE 297 -#define VAR_HARDEN_LARGE_QUERIES 298 -#define VAR_FORWARD_ZONE 299 -#define VAR_FORWARD_HOST 300 -#define VAR_FORWARD_ADDR 301 -#define VAR_DO_NOT_QUERY_ADDRESS 302 -#define VAR_HIDE_IDENTITY 303 -#define VAR_HIDE_VERSION 304 -#define VAR_IDENTITY 305 -#define VAR_VERSION 306 -#define VAR_HARDEN_GLUE 307 -#define VAR_MODULE_CONF 308 -#define VAR_TRUST_ANCHOR_FILE 309 -#define VAR_TRUST_ANCHOR 310 -#define VAR_VAL_OVERRIDE_DATE 311 -#define VAR_BOGUS_TTL 312 -#define VAR_VAL_CLEAN_ADDITIONAL 313 -#define VAR_VAL_PERMISSIVE_MODE 314 -#define VAR_INCOMING_NUM_TCP 315 -#define VAR_MSG_BUFFER_SIZE 316 -#define VAR_KEY_CACHE_SIZE 317 -#define VAR_KEY_CACHE_SLABS 318 -#define VAR_TRUSTED_KEYS_FILE 319 -#define VAR_VAL_NSEC3_KEYSIZE_ITERATIONS 320 -#define VAR_USE_SYSLOG 321 -#define VAR_OUTGOING_INTERFACE 322 -#define VAR_ROOT_HINTS 323 -#define VAR_DO_NOT_QUERY_LOCALHOST 324 -#define VAR_CACHE_MAX_TTL 325 -#define VAR_HARDEN_DNSSEC_STRIPPED 326 -#define VAR_ACCESS_CONTROL 327 -#define VAR_LOCAL_ZONE 328 -#define VAR_LOCAL_DATA 329 -#define VAR_INTERFACE_AUTOMATIC 330 -#define VAR_STATISTICS_INTERVAL 331 -#define VAR_DO_DAEMONIZE 332 -#define VAR_USE_CAPS_FOR_ID 333 -#define VAR_STATISTICS_CUMULATIVE 334 -#define VAR_OUTGOING_PORT_PERMIT 335 -#define VAR_OUTGOING_PORT_AVOID 336 -#define VAR_DLV_ANCHOR_FILE 337 -#define VAR_DLV_ANCHOR 338 -#define VAR_NEG_CACHE_SIZE 339 -#define VAR_HARDEN_REFERRAL_PATH 340 -#define VAR_PRIVATE_ADDRESS 341 -#define VAR_PRIVATE_DOMAIN 342 -#define VAR_REMOTE_CONTROL 343 -#define VAR_CONTROL_ENABLE 344 -#define VAR_CONTROL_INTERFACE 345 -#define VAR_CONTROL_PORT 346 -#define VAR_SERVER_KEY_FILE 347 -#define VAR_SERVER_CERT_FILE 348 -#define VAR_CONTROL_KEY_FILE 349 -#define VAR_CONTROL_CERT_FILE 350 -#define VAR_EXTENDED_STATISTICS 351 -#define VAR_LOCAL_DATA_PTR 352 -#define VAR_JOSTLE_TIMEOUT 353 -#define VAR_STUB_PRIME 354 -#define VAR_UNWANTED_REPLY_THRESHOLD 355 -#define VAR_LOG_TIME_ASCII 356 -#define VAR_DOMAIN_INSECURE 357 -#define VAR_PYTHON 358 -#define VAR_PYTHON_SCRIPT 359 -#define VAR_VAL_SIG_SKEW_MIN 360 -#define VAR_VAL_SIG_SKEW_MAX 361 -#define VAR_CACHE_MIN_TTL 362 -#define VAR_VAL_LOG_LEVEL 363 -#define VAR_AUTO_TRUST_ANCHOR_FILE 364 -#define VAR_KEEP_MISSING 365 -#define VAR_ADD_HOLDDOWN 366 -#define VAR_DEL_HOLDDOWN 367 -#define VAR_SO_RCVBUF 368 -#define VAR_EDNS_BUFFER_SIZE 369 -#define VAR_PREFETCH 370 -#define VAR_PREFETCH_KEY 371 -#define VAR_SO_SNDBUF 372 -#define VAR_HARDEN_BELOW_NXDOMAIN 373 -#define VAR_IGNORE_CD_FLAG 374 -#define VAR_LOG_QUERIES 375 -#define VAR_TCP_UPSTREAM 376 -#define VAR_SSL_UPSTREAM 377 -#define VAR_SSL_SERVICE_KEY 378 -#define VAR_SSL_SERVICE_PEM 379 -#define VAR_SSL_PORT 380 -#define VAR_FORWARD_FIRST 381 -#define VAR_STUB_FIRST 382 -#define VAR_MINIMAL_RESPONSES 383 -#define VAR_RRSET_ROUNDROBIN 384 - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ -/* Line 2049 of yacc.c */ -#line 64 "util/configparser.y" - +#define SPACE 257 +#define LETTER 258 +#define NEWLINE 259 +#define COMMENT 260 +#define COLON 261 +#define ANY 262 +#define ZONESTR 263 +#define STRING_ARG 264 +#define VAR_SERVER 265 +#define VAR_VERBOSITY 266 +#define VAR_NUM_THREADS 267 +#define VAR_PORT 268 +#define VAR_OUTGOING_RANGE 269 +#define VAR_INTERFACE 270 +#define VAR_DO_IP4 271 +#define VAR_DO_IP6 272 +#define VAR_DO_UDP 273 +#define VAR_DO_TCP 274 +#define VAR_CHROOT 275 +#define VAR_USERNAME 276 +#define VAR_DIRECTORY 277 +#define VAR_LOGFILE 278 +#define VAR_PIDFILE 279 +#define VAR_MSG_CACHE_SIZE 280 +#define VAR_MSG_CACHE_SLABS 281 +#define VAR_NUM_QUERIES_PER_THREAD 282 +#define VAR_RRSET_CACHE_SIZE 283 +#define VAR_RRSET_CACHE_SLABS 284 +#define VAR_OUTGOING_NUM_TCP 285 +#define VAR_INFRA_HOST_TTL 286 +#define VAR_INFRA_LAME_TTL 287 +#define VAR_INFRA_CACHE_SLABS 288 +#define VAR_INFRA_CACHE_NUMHOSTS 289 +#define VAR_INFRA_CACHE_LAME_SIZE 290 +#define VAR_NAME 291 +#define VAR_STUB_ZONE 292 +#define VAR_STUB_HOST 293 +#define VAR_STUB_ADDR 294 +#define VAR_TARGET_FETCH_POLICY 295 +#define VAR_HARDEN_SHORT_BUFSIZE 296 +#define VAR_HARDEN_LARGE_QUERIES 297 +#define VAR_FORWARD_ZONE 298 +#define VAR_FORWARD_HOST 299 +#define VAR_FORWARD_ADDR 300 +#define VAR_DO_NOT_QUERY_ADDRESS 301 +#define VAR_HIDE_IDENTITY 302 +#define VAR_HIDE_VERSION 303 +#define VAR_IDENTITY 304 +#define VAR_VERSION 305 +#define VAR_HARDEN_GLUE 306 +#define VAR_MODULE_CONF 307 +#define VAR_TRUST_ANCHOR_FILE 308 +#define VAR_TRUST_ANCHOR 309 +#define VAR_VAL_OVERRIDE_DATE 310 +#define VAR_BOGUS_TTL 311 +#define VAR_VAL_CLEAN_ADDITIONAL 312 +#define VAR_VAL_PERMISSIVE_MODE 313 +#define VAR_INCOMING_NUM_TCP 314 +#define VAR_MSG_BUFFER_SIZE 315 +#define VAR_KEY_CACHE_SIZE 316 +#define VAR_KEY_CACHE_SLABS 317 +#define VAR_TRUSTED_KEYS_FILE 318 +#define VAR_VAL_NSEC3_KEYSIZE_ITERATIONS 319 +#define VAR_USE_SYSLOG 320 +#define VAR_OUTGOING_INTERFACE 321 +#define VAR_ROOT_HINTS 322 +#define VAR_DO_NOT_QUERY_LOCALHOST 323 +#define VAR_CACHE_MAX_TTL 324 +#define VAR_HARDEN_DNSSEC_STRIPPED 325 +#define VAR_ACCESS_CONTROL 326 +#define VAR_LOCAL_ZONE 327 +#define VAR_LOCAL_DATA 328 +#define VAR_INTERFACE_AUTOMATIC 329 +#define VAR_STATISTICS_INTERVAL 330 +#define VAR_DO_DAEMONIZE 331 +#define VAR_USE_CAPS_FOR_ID 332 +#define VAR_STATISTICS_CUMULATIVE 333 +#define VAR_OUTGOING_PORT_PERMIT 334 +#define VAR_OUTGOING_PORT_AVOID 335 +#define VAR_DLV_ANCHOR_FILE 336 +#define VAR_DLV_ANCHOR 337 +#define VAR_NEG_CACHE_SIZE 338 +#define VAR_HARDEN_REFERRAL_PATH 339 +#define VAR_PRIVATE_ADDRESS 340 +#define VAR_PRIVATE_DOMAIN 341 +#define VAR_REMOTE_CONTROL 342 +#define VAR_CONTROL_ENABLE 343 +#define VAR_CONTROL_INTERFACE 344 +#define VAR_CONTROL_PORT 345 +#define VAR_SERVER_KEY_FILE 346 +#define VAR_SERVER_CERT_FILE 347 +#define VAR_CONTROL_KEY_FILE 348 +#define VAR_CONTROL_CERT_FILE 349 +#define VAR_EXTENDED_STATISTICS 350 +#define VAR_LOCAL_DATA_PTR 351 +#define VAR_JOSTLE_TIMEOUT 352 +#define VAR_STUB_PRIME 353 +#define VAR_UNWANTED_REPLY_THRESHOLD 354 +#define VAR_LOG_TIME_ASCII 355 +#define VAR_DOMAIN_INSECURE 356 +#define VAR_PYTHON 357 +#define VAR_PYTHON_SCRIPT 358 +#define VAR_VAL_SIG_SKEW_MIN 359 +#define VAR_VAL_SIG_SKEW_MAX 360 +#define VAR_CACHE_MIN_TTL 361 +#define VAR_VAL_LOG_LEVEL 362 +#define VAR_AUTO_TRUST_ANCHOR_FILE 363 +#define VAR_KEEP_MISSING 364 +#define VAR_ADD_HOLDDOWN 365 +#define VAR_DEL_HOLDDOWN 366 +#define VAR_SO_RCVBUF 367 +#define VAR_EDNS_BUFFER_SIZE 368 +#define VAR_PREFETCH 369 +#define VAR_PREFETCH_KEY 370 +#define VAR_SO_SNDBUF 371 +#define VAR_HARDEN_BELOW_NXDOMAIN 372 +#define VAR_IGNORE_CD_FLAG 373 +#define VAR_LOG_QUERIES 374 +#define VAR_TCP_UPSTREAM 375 +#define VAR_SSL_UPSTREAM 376 +#define VAR_SSL_SERVICE_KEY 377 +#define VAR_SSL_SERVICE_PEM 378 +#define VAR_SSL_PORT 379 +#define VAR_FORWARD_FIRST 380 +#define VAR_STUB_FIRST 381 +#define VAR_MINIMAL_RESPONSES 382 +#define VAR_RRSET_ROUNDROBIN 383 +#ifdef YYSTYPE +#undef YYSTYPE_IS_DECLARED +#define YYSTYPE_IS_DECLARED 1 +#endif +#ifndef YYSTYPE_IS_DECLARED +#define YYSTYPE_IS_DECLARED 1 +typedef union { char* str; - - -/* Line 2049 of yacc.c */ -#line 320 "util/configparser.h" } YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - +#endif /* !YYSTYPE_IS_DECLARED */ extern YYSTYPE yylval; - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_UTIL_CONFIGPARSER_H */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 19:15:25 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 1D0232C3; Sun, 22 Sep 2013 19:15:25 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0A39D2126; Sun, 22 Sep 2013 19:15: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 r8MJFOsT017382; Sun, 22 Sep 2013 19:15:24 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MJFO5k017381; Sun, 22 Sep 2013 19:15:24 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201309221915.r8MJFO5k017381@svn.freebsd.org> From: Ian Lepore Date: Sun, 22 Sep 2013 19:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255796 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 19:15:25 -0000 Author: ian Date: Sun Sep 22 19:15:24 2013 New Revision: 255796 URL: http://svnweb.freebsd.org/changeset/base/255796 Log: Launch the shell, passing it the path to the mk-osreldate script, rather than launching the script directly and relying on #! to launch the shell. This avoids problems when the source is mounted with the noexec flag. MFC this together with r255775. Approved by: re (kib) MFC after: 2 weeks Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Sep 22 19:09:43 2013 (r255795) +++ head/include/Makefile Sun Sep 22 19:15:24 2013 (r255796) @@ -113,7 +113,7 @@ osreldate.h vers.c: ${NEWVERS_SH} ${PARA MAKE="${MAKE}" \ NEWVERS_SH=${NEWVERS_SH} \ PARAM_H=${PARAM_H} \ - ${MK_OSRELDATE_SH} + ${SHELL} ${MK_OSRELDATE_SH} .for i in ${LHDRS} INCSLINKS+= sys/$i ${INCLUDEDIR}/$i From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 19:23:49 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 08B44656; Sun, 22 Sep 2013 19:23:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E9772219A; Sun, 22 Sep 2013 19:23: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 r8MJNmga021658; Sun, 22 Sep 2013 19:23:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MJNm3u021657; Sun, 22 Sep 2013 19:23:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309221923.r8MJNm3u021657@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 22 Sep 2013 19:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255797 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 19:23:49 -0000 Author: kib Date: Sun Sep 22 19:23:48 2013 New Revision: 255797 URL: http://svnweb.freebsd.org/changeset/base/255797 Log: Increase the chance of the buffer write from the bufdaemon helper context to succeed. If the locked vnode which owns the buffer to be written is shared locked, try the non-blocking upgrade of the lock to exclusive. PR: kern/178997 Reported and tested by: Klaus Weber Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (marius) Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun Sep 22 19:15:24 2013 (r255796) +++ head/sys/kern/vfs_bio.c Sun Sep 22 19:23:48 2013 (r255797) @@ -2624,6 +2624,8 @@ flushbufqueues(struct vnode *lvp, int ta int hasdeps; int flushed; int queue; + int error; + bool unlock; flushed = 0; queue = QUEUE_DIRTY; @@ -2699,7 +2701,16 @@ flushbufqueues(struct vnode *lvp, int ta BUF_UNLOCK(bp); continue; } - if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_CANRECURSE) == 0) { + if (lvp == NULL) { + unlock = true; + error = vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT); + } else { + ASSERT_VOP_LOCKED(vp, "getbuf"); + unlock = false; + error = VOP_ISLOCKED(vp) == LK_EXCLUSIVE ? 0 : + vn_lock(vp, LK_UPGRADE | LK_NOWAIT); + } + if (error == 0) { mtx_unlock(&bqdirty); CTR3(KTR_BUF, "flushbufqueue(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); @@ -2711,7 +2722,8 @@ flushbufqueues(struct vnode *lvp, int ta notbufdflushes++; } vn_finished_write(mp); - VOP_UNLOCK(vp, 0); + if (unlock) + VOP_UNLOCK(vp, 0); flushwithdeps += hasdeps; flushed++; From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 19:54:48 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id F195AAFA; Sun, 22 Sep 2013 19:54:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CEF4422D0; Sun, 22 Sep 2013 19:54: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 r8MJslqd037261; Sun, 22 Sep 2013 19:54:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MJsljY037260; Sun, 22 Sep 2013 19:54:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309221954.r8MJsljY037260@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 22 Sep 2013 19:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255798 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 19:54:48 -0000 Author: kib Date: Sun Sep 22 19:54:47 2013 New Revision: 255798 URL: http://svnweb.freebsd.org/changeset/base/255798 Log: Pre-acquire the filedesc sx when a possibility exists that the later code could need to remove a kqueue from the filedesc list. Global lock is already locked, which causes sleepable after non-sleepable lock acquisition. Reported and tested by: pho Reviewed by: jmg Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Approved by: re (gjb) Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Sun Sep 22 19:23:48 2013 (r255797) +++ head/sys/kern/kern_event.c Sun Sep 22 19:54:47 2013 (r255798) @@ -968,12 +968,13 @@ kqueue_register(struct kqueue *kq, struc struct knote *kn, *tkn; cap_rights_t rights; int error, filt, event; - int haskqglobal; + int haskqglobal, filedesc_unlock; fp = NULL; kn = NULL; error = 0; haskqglobal = 0; + filedesc_unlock = 0; filt = kev->filter; fops = kqueue_fo_find(filt); @@ -1014,6 +1015,13 @@ findkn: goto done; } + /* + * Pre-lock the filedesc before the global + * lock mutex, see the comment in + * kqueue_close(). + */ + FILEDESC_XLOCK(td->td_proc->p_fd); + filedesc_unlock = 1; KQ_GLOBAL_LOCK(&kq_global, haskqglobal); } @@ -1043,6 +1051,10 @@ findkn: /* knote is in the process of changing, wait for it to stablize. */ if (kn != NULL && (kn->kn_status & KN_INFLUX) == KN_INFLUX) { KQ_GLOBAL_UNLOCK(&kq_global, haskqglobal); + if (filedesc_unlock) { + FILEDESC_XUNLOCK(td->td_proc->p_fd); + filedesc_unlock = 0; + } kq->kq_state |= KQ_FLUXWAIT; msleep(kq, &kq->kq_lock, PSOCK | PDROP, "kqflxwt", 0); if (fp != NULL) { @@ -1159,6 +1171,8 @@ done_ev_add: done: KQ_GLOBAL_UNLOCK(&kq_global, haskqglobal); + if (filedesc_unlock) + FILEDESC_XUNLOCK(td->td_proc->p_fd); if (fp != NULL) fdrop(fp, td); if (tkn != NULL) @@ -1652,10 +1666,12 @@ kqueue_close(struct file *fp, struct thr struct knote *kn; int i; int error; + int filedesc_unlock; if ((error = kqueue_acquire(fp, &kq))) return error; + filedesc_unlock = 0; KQ_LOCK(kq); KASSERT((kq->kq_state & KQ_CLOSING) != KQ_CLOSING, @@ -1717,9 +1733,20 @@ kqueue_close(struct file *fp, struct thr KQ_UNLOCK(kq); - FILEDESC_XLOCK(fdp); + /* + * We could be called due to the knote_drop() doing fdrop(), + * called from kqueue_register(). In this case the global + * lock is owned, and filedesc sx is locked before, to not + * take the sleepable lock after non-sleepable. + */ + if (!sx_xlocked(FILEDESC_LOCK(fdp))) { + FILEDESC_XLOCK(fdp); + filedesc_unlock = 1; + } else + filedesc_unlock = 0; TAILQ_REMOVE(&fdp->fd_kqlist, kq, kq_list); - FILEDESC_XUNLOCK(fdp); + if (filedesc_unlock) + FILEDESC_XUNLOCK(fdp); seldrain(&kq->kq_sel); knlist_destroy(&kq->kq_sel.si_note); From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 20:14:23 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 23455433; Sun, 22 Sep 2013 20:14:23 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-ob0-x22b.google.com (mail-ob0-x22b.google.com [IPv6:2607:f8b0:4003: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 AC0F62413; Sun, 22 Sep 2013 20:14:22 +0000 (UTC) Received: by mail-ob0-f171.google.com with SMTP id wm4so2883946obc.16 for ; Sun, 22 Sep 2013 13:14:22 -0700 (PDT) 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=ylXmO4s8HOAoWMvKqQWKTQ2aTaW9oNW1YGTmKsdeRwE=; b=Ofm6YIiA7hasgu7SnxZ8K80iHu42oUVSv6QFZza67USJ/cnglkl4/vTsSzPgn9YKoW 2/ybIrAX6Kmdtg+UNXLOdq9dO4atrdcSZAYd1G4HsPOgfZH8QGCR2AaNhQV4pzKPJ2+0 wL8O0+gK4w4GGocUgNQor/6VtpmAL2ECF4j/iX8muMmScxMVw5fXHtJC+GOz+u5yFP/n aPXZsbpR8Iczt67dyZ10Ng4eGucgm8QMsy5UxXoRrXgSVpWpYmXjsinnOkYi11jxRqFM e1tV9ifoKohoUqDMD7zWsp2jyu588aRSTlFGJH8SqwimXarvkC02MaIL0fIM1ab3cbkC zxNw== MIME-Version: 1.0 X-Received: by 10.182.130.131 with SMTP id oe3mr216643obb.34.1379880861963; Sun, 22 Sep 2013 13:14:21 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.182.75.9 with HTTP; Sun, 22 Sep 2013 13:14:21 -0700 (PDT) In-Reply-To: <201309221923.r8MJNm3u021657@svn.freebsd.org> References: <201309221923.r8MJNm3u021657@svn.freebsd.org> Date: Sun, 22 Sep 2013 13:14:21 -0700 X-Google-Sender-Auth: uvyHNtFyWm0SgWpQYsFfGz4Ds2k Message-ID: Subject: Re: svn commit: r255797 - head/sys/kern From: Matthew Fleming To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , Attilio Rao , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 20:14:23 -0000 On Sun, Sep 22, 2013 at 12:23 PM, Konstantin Belousov wrote: > Author: kib > Date: Sun Sep 22 19:23:48 2013 > New Revision: 255797 > URL: http://svnweb.freebsd.org/changeset/base/255797 > > Log: > Increase the chance of the buffer write from the bufdaemon helper > context to succeed. If the locked vnode which owns the buffer to be > written is shared locked, try the non-blocking upgrade of the lock to > exclusive. > > PR: kern/178997 > Reported and tested by: Klaus Weber < > fbsd-bugs-2013-1@unix-admin.de> > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Approved by: re (marius) > > Modified: > head/sys/kern/vfs_bio.c > > Modified: head/sys/kern/vfs_bio.c > > ============================================================================== > --- head/sys/kern/vfs_bio.c Sun Sep 22 19:15:24 2013 (r255796) > +++ head/sys/kern/vfs_bio.c Sun Sep 22 19:23:48 2013 (r255797) > @@ -2624,6 +2624,8 @@ flushbufqueues(struct vnode *lvp, int ta > int hasdeps; > int flushed; > int queue; > + int error; > + bool unlock; > > flushed = 0; > queue = QUEUE_DIRTY; > @@ -2699,7 +2701,16 @@ flushbufqueues(struct vnode *lvp, int ta > BUF_UNLOCK(bp); > continue; > } > - if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_CANRECURSE) > == 0) { > + if (lvp == NULL) { > + unlock = true; > + error = vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT); > + } else { > + ASSERT_VOP_LOCKED(vp, "getbuf"); > + unlock = false; > + error = VOP_ISLOCKED(vp) == LK_EXCLUSIVE ? 0 : > + vn_lock(vp, LK_UPGRADE | LK_NOWAIT); > I don't think this is quite right. When the lock is held shared, and VOP_LOCK is implemented by lockmgr(9), (i.e. all in-tree filesystems?), LK_UPGRADE may drop the lock, and not reacquire it. This would happen when the vnode is locked shared, the upgrade fails (2 shared owners), then lockmgr(9) will try to lock EX, which will also fail (still one shared owner). The caller's lock is no longer held. Doesn't that scenario (LK_UPGRADE failing) cause problems both for the caller (unexpected unlock) and for flushbufqueues(), which expects the vnode lock to be held since lvp is non-NULL? Thanks, matthew From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 20:19:22 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 32C5868B; Sun, 22 Sep 2013 20:19:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A047D2435; Sun, 22 Sep 2013 20:19:21 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r8MKJGSo085622; Sun, 22 Sep 2013 23:19:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r8MKJGSo085622 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r8MKJGF7085621; Sun, 22 Sep 2013 23:19:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 22 Sep 2013 23:19:16 +0300 From: Konstantin Belousov To: Matthew Fleming Subject: Re: svn commit: r255797 - head/sys/kern Message-ID: <20130922201916.GL41229@kib.kiev.ua> References: <201309221923.r8MJNm3u021657@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UZ6ltp17Ke3Obxch" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: "svn-src-head@freebsd.org" , Attilio Rao , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 20:19:22 -0000 --UZ6ltp17Ke3Obxch Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 22, 2013 at 01:14:21PM -0700, Matthew Fleming wrote: > On Sun, Sep 22, 2013 at 12:23 PM, Konstantin Belousov wr= ote: >=20 > > Author: kib > > Date: Sun Sep 22 19:23:48 2013 > > New Revision: 255797 > > URL: http://svnweb.freebsd.org/changeset/base/255797 > > > > Log: > > Increase the chance of the buffer write from the bufdaemon helper > > context to succeed. If the locked vnode which owns the buffer to be > > written is shared locked, try the non-blocking upgrade of the lock to > > exclusive. > > > > PR: kern/178997 > > Reported and tested by: Klaus Weber < > > fbsd-bugs-2013-1@unix-admin.de> > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > Approved by: re (marius) > > > > Modified: > > head/sys/kern/vfs_bio.c > > > > Modified: head/sys/kern/vfs_bio.c > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/kern/vfs_bio.c Sun Sep 22 19:15:24 2013 (r25579= 6) > > +++ head/sys/kern/vfs_bio.c Sun Sep 22 19:23:48 2013 (r25579= 7) > > @@ -2624,6 +2624,8 @@ flushbufqueues(struct vnode *lvp, int ta > > int hasdeps; > > int flushed; > > int queue; > > + int error; > > + bool unlock; > > > > flushed =3D 0; > > queue =3D QUEUE_DIRTY; > > @@ -2699,7 +2701,16 @@ flushbufqueues(struct vnode *lvp, int ta > > BUF_UNLOCK(bp); > > continue; > > } > > - if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_CANRECURS= E) > > =3D=3D 0) { > > + if (lvp =3D=3D NULL) { > > + unlock =3D true; > > + error =3D vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT); > > + } else { > > + ASSERT_VOP_LOCKED(vp, "getbuf"); > > + unlock =3D false; > > + error =3D VOP_ISLOCKED(vp) =3D=3D LK_EXCLUSIVE = ? 0 : > > + vn_lock(vp, LK_UPGRADE | LK_NOWAIT); > > >=20 > I don't think this is quite right. >=20 > When the lock is held shared, and VOP_LOCK is implemented by lockmgr(9), > (i.e. all in-tree filesystems?), LK_UPGRADE may drop the lock, and not > reacquire it. This would happen when the vnode is locked shared, the > upgrade fails (2 shared owners), then lockmgr(9) will try to lock EX, whi= ch > will also fail (still one shared owner). The caller's lock is no longer > held. >=20 > Doesn't that scenario (LK_UPGRADE failing) cause problems both for the > caller (unexpected unlock) and for flushbufqueues(), which expects the > vnode lock to be held since lvp is non-NULL? Does it ? If the lock is dropped, the code is indeed in trouble. Please note that LK_NOWAIT is specified for upgrade, and I believe that this causes lockmgr to return with EBUSY without dropping the lock. --UZ6ltp17Ke3Obxch Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSP1DDAAoJEJDCuSvBvK1BvdEQAKNEXVW1leB8fpsX8NIbAn4x CGspvlWPta2+UQdnAxh7Z9+Uy2peE9lEHBfC+Hq+OHNH5VcstfACs44/fILxVr0t U7GWX/+XOYWawlP3Y8ui9oYeZ5XlWpMqjrXk60eDNBhw15n/7RS20yfOGZ0SfzCW 5aZ8QljGReSHrUIlL2VaO7dRH28hiB3OUsGMtQCl3wPGM6OlHBWV3IWbsIMXyN3b vJBQAo9HjOj4e9fA3HSrFzTFpsC3O/PSiNB+qsqxnirgzTg0jylWYS5DqyropDc6 gN8LfkV1bZTBM8pfzYaJnMMgpWMTrTdXmyJ8WALD0aGkurlbSvaQ6csgMt3NdL8G 6HOwbZKQIhhhOmIL12WnskLRMTgvqcrlYnRN5TnUHlDV5/99UU0DSuSMFWj978uU IA55I3TTbeVfb4ASvpRcowGY/qWdnM15H2uUNPzZlE2PdbB0runi9tbrk6g79GNV Yd0HOkdeKPpcvvNkqsqYrh8YF5AcXif94UJJmLwRxDV8rWSC3ccp/MU9IfedWaBo BTsQF9EXtbhGrOD6+8cvE03LsPoTGjRvse69/YkaMamw84ktvv6dtPYnmHinrGfV LMgh245v8O0EntVlB76NHrAGaVd+sKLzToHFGByZOOejby+lYAlLMr9fCqgQkCrt oYnPmDosY9C0EKgMrt0f =dfwX -----END PGP SIGNATURE----- --UZ6ltp17Ke3Obxch-- From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 20:29:04 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 8B7B8BAA; Sun, 22 Sep 2013 20:29:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7843024B5; Sun, 22 Sep 2013 20:29: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 r8MKT4jV055495; Sun, 22 Sep 2013 20:29:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MKT45U055492; Sun, 22 Sep 2013 20:29:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309222029.r8MKT45U055492@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 22 Sep 2013 20:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255800 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 20:29:04 -0000 Author: kib Date: Sun Sep 22 20:29:03 2013 New Revision: 255800 URL: http://svnweb.freebsd.org/changeset/base/255800 Log: Revert r255797. The LK_UPGRADE | LK_NOWAIT drops the lock. Approved by: re (marius, implicit) Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun Sep 22 20:22:08 2013 (r255799) +++ head/sys/kern/vfs_bio.c Sun Sep 22 20:29:03 2013 (r255800) @@ -2624,8 +2624,6 @@ flushbufqueues(struct vnode *lvp, int ta int hasdeps; int flushed; int queue; - int error; - bool unlock; flushed = 0; queue = QUEUE_DIRTY; @@ -2701,16 +2699,7 @@ flushbufqueues(struct vnode *lvp, int ta BUF_UNLOCK(bp); continue; } - if (lvp == NULL) { - unlock = true; - error = vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT); - } else { - ASSERT_VOP_LOCKED(vp, "getbuf"); - unlock = false; - error = VOP_ISLOCKED(vp) == LK_EXCLUSIVE ? 0 : - vn_lock(vp, LK_UPGRADE | LK_NOWAIT); - } - if (error == 0) { + if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_CANRECURSE) == 0) { mtx_unlock(&bqdirty); CTR3(KTR_BUF, "flushbufqueue(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); @@ -2722,8 +2711,7 @@ flushbufqueues(struct vnode *lvp, int ta notbufdflushes++; } vn_finished_write(mp); - if (unlock) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp, 0); flushwithdeps += hasdeps; flushed++; From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 20:30:56 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id ABC61CF7; Sun, 22 Sep 2013 20:30:56 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 96F7C24ED; Sun, 22 Sep 2013 20:30: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 r8MKUufc058227; Sun, 22 Sep 2013 20:30:56 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MKUtfY058223; Sun, 22 Sep 2013 20:30:55 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309222030.r8MKUtfY058223@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 22 Sep 2013 20:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255801 - in head: contrib/ldns/drill usr.bin usr.bin/drill X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 20:30:56 -0000 Author: des Date: Sun Sep 22 20:30:55 2013 New Revision: 255801 URL: http://svnweb.freebsd.org/changeset/base/255801 Log: Build and install drill(1). Approved by: re (blanket) Added: head/contrib/ldns/drill/config.h (contents, props changed) head/contrib/ldns/drill/drill.1 (contents, props changed) head/usr.bin/drill/ head/usr.bin/drill/Makefile (contents, props changed) Modified: head/usr.bin/Makefile Added: head/contrib/ldns/drill/config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ldns/drill/config.h Sun Sep 22 20:30:55 2013 (r255801) @@ -0,0 +1,297 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ASSERT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_CTYPE_H 1 + +/* Whether getaddrinfo is available */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* If you have HMAC_CTX_init */ +#define HAVE_HMAC_CTX_INIT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `isblank' function. */ +#define HAVE_ISBLANK 1 + +/* Define to 1 if you have the `ldns' library (-lldns). */ +#define HAVE_LIBLDNS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IF_ETHER_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_SYSTM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IP6_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_UDP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_ERR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_RAND_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_SSL_H 1 + +/* Define if you have the SSL libraries installed. */ +#define HAVE_SSL /**/ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MOUNT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Default trust anchor file */ +#define LDNS_TRUST_ANCHOR_FILE "/etc/unbound/root.key" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "libdns@nlnetlabs.nl" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "ldns" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "ldns 1.6.16" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libdns" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.6.16" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Whether the windows socket API is used */ +/* #undef USE_WINSOCK */ + +/* the version of the windows API enabled */ +#define WINVER 0x0502 + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* in_addr_t */ +/* #undef in_addr_t */ + +/* in_port_t */ +/* #undef in_port_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `short' if does not define. */ +/* #undef int16_t */ + +/* Define to `int' if does not define. */ +/* #undef int32_t */ + +/* Define to `long long' if does not define. */ +/* #undef int64_t */ + +/* Define to `char' if does not define. */ +/* #undef int8_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to 'int' if not defined */ +/* #undef socklen_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define to `unsigned short' if does not define. */ +/* #undef uint16_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef uint32_t */ + +/* Define to `unsigned long long' if does not define. */ +/* #undef uint64_t */ + +/* Define to `unsigned char' if does not define. */ +/* #undef uint8_t */ + + + +#include +#include +#include +#include + +#if STDC_HEADERS +#include +#include +#endif + +#ifdef HAVE_STDINT_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_ARPA_INET_H +#include +#endif + +#ifdef HAVE_NETINET_UDP_H +#include +#endif + +#ifdef HAVE_TIME_H +#include +#endif + +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif + +#ifdef HAVE_NETINET_IP_H +#include +#endif + +#ifdef HAVE_NET_IF_H +#include +#endif + +#ifdef HAVE_NETINET_IF_ETHER_H +#include +#endif + +#ifdef HAVE_WINSOCK2_H +#define USE_WINSOCK 1 +#include +#endif + +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +extern char *optarg; +extern int optind, opterr; + +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif + +#ifdef S_SPLINT_S +#define FD_ZERO(a) /* a */ +#define FD_SET(a,b) /* a, b */ +#endif + Added: head/contrib/ldns/drill/drill.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ldns/drill/drill.1 Sun Sep 22 20:30:55 2013 (r255801) @@ -0,0 +1,242 @@ +.\" @(#)drill.1 1.7.0 14-Jul-2004 OF; +.TH drill 1 "28 May 2006" +.SH NAME +drill \- get (debug) information out of DNS(SEC) +.SH SYNOPSIS +.B drill +[ +.IR OPTIONS +] +.IR name +[ +.IR @server +] +[ +.IR type +] +[ +.IR class +] + +.SH DESCRIPTION +\fBdrill\fR is a tool to designed to get all sorts of information out of the +DNS. It is specificly designed to be used with DNSSEC. +.PP +The name \fBdrill\fR is a pun on \fBdig\fR. With \fBdrill\fR you should be able +get even more information than with \fBdig\fR. +.PP +If no arguments are given class defaults to 'IN' and type to 'A'. The +server(s) specified in /etc/resolv.conf are used to query against. + +.PP +\fIname\fR +Ask for this name. + +.PP +\fI@server\fR +Send to query to this server. If not specified use the nameservers from +\fI/etc/resolv.conf\fR. + +.PP +\fItype\fR +Ask for this RR type. If type is not given on the command line it defaults +to 'A'. Except when doing to reverse lookup when it defaults to 'PTR'. + +.PP +\fIclass\fR +Use this class when querying. + +.SH SAMPLE USAGE +\fBdrill mx miek.nl\fR +Show the MX records of the domain miek.nl + +.TP +\fBdrill -S jelte.nlnetlabs.nl\fR +Chase any signatures in the jelte.nlnetlab.nl domain. This option is +only available when ldns has been compiled with openssl-support. + +.TP +\fBdrill -TD www.example.com\fR +Do a DNSSEC (-D) trace (-T) from the rootservers down to www.example.com. +This option only works when ldns has been compiled with openssl support. + +.TP +\fBdrill -s dnskey jelte.nlnetlabs.nl\fR +Show the DNSKEY record(s) for jelte.nlnetlabs.nl. For each found DNSKEY +record also print the DS record. + +.SH OPTIONS + +.TP +\fB\-D +Enable DNSSEC in the query. When querying for DNSSEC types (DNSKEY, RRSIG, +DS and NSEC) this is \fInot\fR automaticly enabled. + +.TP +\fB\-T +Trace \fIname\fR from the root down. When using this option the @server and +the type arguments are not used. + +.TP +\fB\-S +Chase the signature(s) of 'name' to a known key or as high up in +the tree as possible. + +.TP +\fB\-V \fIlevel\fR +Be more verbose. Set level to 5 to see the actual query that is sent. + +.TP +\fB\-Q +Quiet mode, this overrules -V. + +.TP +\fB\-f \fIfile\fR +Read the query from a file. The query must be dumped with -w. + +.TP +\fB\-i \fIfile\fR +read the answer from the file instead from the network. This aids +in debugging and can be used to check if a query on disk is valid. +If the file contains binary data it is assumed to be a query in +network order. + +.TP +\fB\-w \fIfile\fR +Write an answer packet to file. + +.TP +\fB\-q \fIfile\fR +Write the query packet to file. + +.TP +\fB\-v +Show drill's version. + +.TP +\fB\-h +Show a short help message. + +.SS QUERY OPTIONS + +.TP +\fB\-4 +Stay on ip4. Only send queries to ip4 enabled nameservers. + +.TP +\fB\-6 +Stay on ip6. Only send queries to ip6 enabled nameservers. + +.TP +\fB\-a +Use the resolver structure's fallback mechanism if the answer +is truncated (TC=1). If a truncated packet is received and this +option is set, drill will first send a new query with EDNS0 +buffer size 4096. + +If the EDNS0 buffer size was already set to 512+ bytes, or the +above retry also results in a truncated answer, the resolver +structure will fall back to TCP. + +.TP +\fB\-b \fIsize\fR +Use size as the buffer size in the EDNS0 pseudo RR. + +.TP +\fB\-c \fIfile\fR +Use file instead of /etc/resolv.conf for nameserver configuration. + +.TP +\fB\-d \fIdomain\fR +When tracing (-T), start from this domain instead of the root. + +.TP +\fB\-t +Use TCP/IP when querying a server + +.TP +\fB\-k \fIkeyfile\fR +Use this file to read a (trusted) key from. When this options is +given \fBdrill\fR tries to validate the current answer with this +key. No chasing is done. When \fBdrill\fR is doing a secure trace, this +key will be used as trust anchor. Can contain a DNSKEY or a DS record. + +Alternatively, when DNSSEC enabled tracing (\fB-TD\fR) or signature +chasing (\fB-S\fR), if \fB-k\fR is not specified, and a default trust anchor +(/etc/unbound/root.key) exists and contains a valid DNSKEY or DS record, +it will be used as the trust anchor. + +.TP +\fB\-o \fImnemonic\fR +Use this option to set or unset specific header bits. A bit is +set by using the bit mnemonic in CAPITAL letters. A bit is unset when +the mnemonic is given in lowercase. The following mnemonics are +understood by \fBdrill\fR: + + QR, qr: set, unset QueRy (default: on) + AA, aa: set, unset Authoritative Answer (default: off) + TC, tc: set, unset TrunCated (default: off) + RD, rd: set, unset Recursion Desired (default: on) + CD, cd: set, unset Checking Disabled (default: off) + RA, ra: set, unset Recursion Available (default: off) + AD, ad: set, unset Authenticated Data (default: off) + +Thus: \fB-o CD\fR, will enable Checking Disabled, which instructs the +cache to not validate the answers it gives out. + +.TP +\fB\-p \fIport\fR +Use this port instead of the default of 53. + +.TP +\fB\-r \fIfile\fR +When tracing (-T), use file as a root servers hint file. + +.TP +\fB\-s +When encountering a DNSKEY print the equivalent DS also. + +.TP +\fB\-u +Use UDP when querying a server. This is the default. + +.TP +\fB\-w \fIfile\fR +write the answer to a file. The file will contain a hexadecimal dump +of the query. This can be used in conjunction with -f. + +.TP +\fB\-x +Do a reverse loopup. The type argument is not used, it is preset to PTR. + +.TP +\fB\-y \fI\fR +specify named base64 tsig key, and optional an algorithm (defaults to hmac-md5.sig-alg.reg.int) + +.TP +\fB\-z \fR +don't randomize the nameserver list before sending queries. + +.SH "FILES" +.TP +/etc/unbound/root.key +The file from which trusted keys are loaded when no \fB-k\fR option is given. +.SH "SEE ALSO" +.LP +unbound-anchor(8) + +.SH AUTHOR +Jelte Jansen and Miek Gieben. Both of NLnet Labs. + +.SH REPORTING BUGS +Report bugs to . + +.SH BUGS + +.SH COPYRIGHT +Copyright (c) 2004-2008 NLnet Labs. +Licensed under the revised BSD license. There is NO warranty; not even for MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. + +.SH SEE ALSO +\fBdig\fR(1), \fIRFC403{3,4,5}\fR. Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sun Sep 22 20:29:03 2013 (r255800) +++ head/usr.bin/Makefile Sun Sep 22 20:30:55 2013 (r255801) @@ -265,6 +265,7 @@ SUBDIR+= compile_et .endif .if ${MK_LDNS_UTILS} != "no" +SUBDIR+= drill SUBDIR+= host .endif Added: head/usr.bin/drill/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/drill/Makefile Sun Sep 22 20:30:55 2013 (r255801) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +# Vendor sources and generated files +LDNSDIR= ${.CURDIR}/../../contrib/ldns + +.PATH: ${LDNSDIR}/drill + +PROG= drill +SRCS= drill.c drill_util.c error.c root.c work.c \ + chasetrace.c dnssec.c securetrace.c +CFLAGS+= -I${LDNSDIR} +NO_WERROR= true +MAN= drill.1 + +DPADD+= ${LIBLDNS} ${LIBCRYPTO} +LDADD+= -lldns -lcrypto +USEPRIVATELIB= ldns + +.include From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 20:32:28 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id C51C8F52; Sun, 22 Sep 2013 20:32:28 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1125250C; Sun, 22 Sep 2013 20:32: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 r8MKWSrh058513; Sun, 22 Sep 2013 20:32:28 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MKWSxw058512; Sun, 22 Sep 2013 20:32:28 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309222032.r8MKWSxw058512@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 22 Sep 2013 20:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255802 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 20:32:28 -0000 Author: des Date: Sun Sep 22 20:32:28 2013 New Revision: 255802 URL: http://svnweb.freebsd.org/changeset/base/255802 Log: Remove drill(1) if MK_LDNS_UTILS is false. Remove host(1) if both MK_BIND and MK_LDNS_UTILS are false. Approved by: re (blanket) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Sep 22 20:30:55 2013 (r255801) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Sep 22 20:32:28 2013 (r255802) @@ -214,7 +214,6 @@ OLD_FILES+=usr/share/man/man8/authpf-noi .if ${MK_BIND} == no OLD_FILES+=etc/periodic/daily/470.status-named OLD_FILES+=usr/bin/dig -OLD_FILES+=usr/bin/host OLD_FILES+=usr/bin/nslookup OLD_FILES+=usr/bin/nsupdate OLD_FILES+=usr/include/lwres/context.h @@ -270,7 +269,6 @@ OLD_FILES+=usr/share/doc/bind9/COPYRIGHT OLD_FILES+=usr/share/doc/bind9/FAQ OLD_FILES+=usr/share/doc/bind9/README OLD_FILES+=usr/share/man/man1/dig.1.gz -OLD_FILES+=usr/share/man/man1/host.1.gz OLD_FILES+=usr/share/man/man1/nslookup.1.gz OLD_FILES+=usr/share/man/man3/lwres.3.gz OLD_FILES+=usr/share/man/man3/lwres_buffer.3.gz @@ -3402,6 +3400,15 @@ OLD_FILES+=usr/lib32/private/libldns_p.a .endif .endif +.if ${MK_LDNS_UTILS} == no +OLD_FILES+=usr/bin/drill +OLD_FILES+=usr/share/man/man1/drill.1.gz +.if ${MK_BIND} == no +OLD_FILES+=usr/bin/host +OLD_FILES+=usr/share/man/man1/host.1.gz +.endif +.endif + #.if ${MK_LIB32} == no # to be filled in #.endif From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 20:34:32 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 2E693135; Sun, 22 Sep 2013 20:34:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A1FB3251E; Sun, 22 Sep 2013 20:34:31 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r8MKYQ1A088879; Sun, 22 Sep 2013 23:34:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r8MKYQ1A088879 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r8MKYQSX088878; Sun, 22 Sep 2013 23:34:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 22 Sep 2013 23:34:26 +0300 From: Konstantin Belousov To: Matthew Fleming Subject: Re: svn commit: r255797 - head/sys/kern Message-ID: <20130922203426.GM41229@kib.kiev.ua> References: <201309221923.r8MJNm3u021657@svn.freebsd.org> <20130922201916.GL41229@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dgZ3gzdqzaCbtzwD" Content-Disposition: inline In-Reply-To: <20130922201916.GL41229@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: "svn-src-head@freebsd.org" , Attilio Rao , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 20:34:32 -0000 --dgZ3gzdqzaCbtzwD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 22, 2013 at 11:19:16PM +0300, Konstantin Belousov wrote: > On Sun, Sep 22, 2013 at 01:14:21PM -0700, Matthew Fleming wrote: > > On Sun, Sep 22, 2013 at 12:23 PM, Konstantin Belousov = wrote: > >=20 > > > Author: kib > > > Date: Sun Sep 22 19:23:48 2013 > > > New Revision: 255797 > > > URL: http://svnweb.freebsd.org/changeset/base/255797 > > > > > > Log: > > > Increase the chance of the buffer write from the bufdaemon helper > > > context to succeed. If the locked vnode which owns the buffer to be > > > written is shared locked, try the non-blocking upgrade of the lock = to > > > exclusive. > > > > > > PR: kern/178997 > > > Reported and tested by: Klaus Weber < > > > fbsd-bugs-2013-1@unix-admin.de> > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 1 week > > > Approved by: re (marius) > > > > > > Modified: > > > head/sys/kern/vfs_bio.c > > > > > > Modified: head/sys/kern/vfs_bio.c > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > --- head/sys/kern/vfs_bio.c Sun Sep 22 19:15:24 2013 (r255= 796) > > > +++ head/sys/kern/vfs_bio.c Sun Sep 22 19:23:48 2013 (r255= 797) > > > @@ -2624,6 +2624,8 @@ flushbufqueues(struct vnode *lvp, int ta > > > int hasdeps; > > > int flushed; > > > int queue; > > > + int error; > > > + bool unlock; > > > > > > flushed =3D 0; > > > queue =3D QUEUE_DIRTY; > > > @@ -2699,7 +2701,16 @@ flushbufqueues(struct vnode *lvp, int ta > > > BUF_UNLOCK(bp); > > > continue; > > > } > > > - if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_CANRECU= RSE) > > > =3D=3D 0) { > > > + if (lvp =3D=3D NULL) { > > > + unlock =3D true; > > > + error =3D vn_lock(vp, LK_EXCLUSIVE | LK_NOWAI= T); > > > + } else { > > > + ASSERT_VOP_LOCKED(vp, "getbuf"); > > > + unlock =3D false; > > > + error =3D VOP_ISLOCKED(vp) =3D=3D LK_EXCLUSIV= E ? 0 : > > > + vn_lock(vp, LK_UPGRADE | LK_NOWAIT); > > > > >=20 > > I don't think this is quite right. > >=20 > > When the lock is held shared, and VOP_LOCK is implemented by lockmgr(9), > > (i.e. all in-tree filesystems?), LK_UPGRADE may drop the lock, and not > > reacquire it. This would happen when the vnode is locked shared, the > > upgrade fails (2 shared owners), then lockmgr(9) will try to lock EX, w= hich > > will also fail (still one shared owner). The caller's lock is no longer > > held. > >=20 > > Doesn't that scenario (LK_UPGRADE failing) cause problems both for the > > caller (unexpected unlock) and for flushbufqueues(), which expects the > > vnode lock to be held since lvp is non-NULL? >=20 > Does it ? If the lock is dropped, the code is indeed in trouble. > Please note that LK_NOWAIT is specified for upgrade, and I believe > that this causes lockmgr to return with EBUSY without dropping > the lock. Yes, you are right, I reverted the patch. Thank you for noting this. I am bitten by unreasonable behaviour of non-blocking upgrade once more. It has a history. Some time ago I proposed the following patch, which was turned down. That time, I was able to work-around the case. For the bufdaemon helper, I do not see any way to avoid this, except of sometimes locking the reader vnode exclusive in anticipation of the too high dirty buffer mark. diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 74a5b19..2f2dbf6 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -694,6 +692,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct loc= k_object *ilk, } break; case LK_UPGRADE: + case LK_TRYUPGRADE: _lockmgr_assert(lk, KA_SLOCKED, file, line); v =3D lk->lk_lock; x =3D v & LK_ALL_WAITERS; @@ -714,6 +713,17 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo= ck_object *ilk, } =20 /* + * In LK_TRYUPGRADE mode, do not drop the lock, + * returning EBUSY instead. + */ + if (op =3D=3D LK_TRYUPGRADE) { + LOCK_LOG2(lk, "%s: %p failed the nowait upgrade", + __func__, lk); + error =3D EBUSY; + break; + } + + /* * We have been unable to succeed in upgrading, so just * give up the shared lock. */ diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h index f525a06..7c51830 100644 --- a/sys/sys/lockmgr.h +++ b/sys/sys/lockmgr.h @@ -169,6 +168,7 @@ _lockmgr_args_rw(struct lock *lk, u_int flags, struct r= wlock *ilk, #define LK_RELEASE 0x100000 #define LK_SHARED 0x200000 #define LK_UPGRADE 0x400000 +#define LK_TRYUPGRADE 0x800000 =20 #define LK_TOTAL_MASK (LK_INIT_MASK | LK_EATTR_MASK | LK_TYPE_MASK) =20 --dgZ3gzdqzaCbtzwD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSP1RRAAoJEJDCuSvBvK1BrvAP/0W+SSKTKV3lg+bEjwRWEF4W aV9nEKqDKbmdjeH+wiVU+EQ1I2uyFWj8z4+JhheoRTlvtB0QOfruvuAy7xXAcVun F8yUA8ssdEzNka9BSbbv9cD4oGJ+/kZJks+l4ncOCRnATQfDMErk9GrWQGSB/TIG 6edDD3NQc6ixxo1sB0kS6ciVzMd9QWP6SQnLripjJC6OaSKsFnM0YiVwaKPt+hZ5 cbk8JTdULvftFvY/3PjaNhWVSHUvqoNa9b0Hf5CkaeysScmE5QV+LMRSXRHI3iVO zz8tazcJV5JKl9VaLn7cjM9hEkez4NHRrQ2AayHOt5z/k6m6QMxJCY7Rsxcy0TQc qVnBixODgTbrfyyeSiAg1mbAMvs9cnnxdyf/vvFUAV2Tpw5BDb8e1LW/fO/ooxgj vyTkzY6aWrzf5YMiXIhU3SInlKeWJYEOdUpRrSqWY2fjWpQrq3sAb849g2Zve4K2 jlbxY9gRwluisZDiVkbPO4nDF+6o6w3Y/CfsB0mEPK2VspfJbdFYF+WCgpNVARnt 4FnToefcmv/0NdDVNt/2ufvskiCafKPHN8d6529/PItN60b/Vl5R/i6HldXBfWLP 6l+AoYJT6zNjjnFC/q3thDAS5JhaSQKskgFpQYBXe4lMs82DS/Sm/J59qs3lv5Ig FedWIS7IKQp/1iRsM1yl =y/NC -----END PGP SIGNATURE----- --dgZ3gzdqzaCbtzwD-- From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 20:49:37 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 6798E7D3; Sun, 22 Sep 2013 20:49:37 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85BFD25D3; Sun, 22 Sep 2013 20:49:36 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id l18so1456494wgh.0 for ; Sun, 22 Sep 2013 13:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=TemLH2bN4ERmQ5+laFADrJ9yDxQMGCt9LF2frcks2YI=; b=AjtR8Obw1HwNJ3Gf2Dt796xSCU3KesFAgOKKFsRuhbYVnzdYis2Plj5/eOafzaiMDA 6KnxS1wCxpPOAV0/1NRzu22Aj2JvAQIs8rUIuPFibhW0YHUyL1LKzt+xgt9kJ3Zee3c9 QCY5UByobVC6kik2ao0ca8TFwUBcVZTrlTi12AZJIEQpbRe0CB5DHU1HRPcEYp2mqZa4 r52H+Omzzm9t97EjcleRzUmhSz2OiIFU/0XS9sauFQgIO2XYBEF45KXTqUxVmddAhI6b L6Bm3dKWKP6QgXpSC6BY71cpqkOO93kPJ2f5miJXqIovHi04KjsPb68NBdkmn74Gjs2M QU3Q== MIME-Version: 1.0 X-Received: by 10.181.12.104 with SMTP id ep8mr10772969wid.54.1379882974909; Sun, 22 Sep 2013 13:49:34 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.216.189.129 with HTTP; Sun, 22 Sep 2013 13:49:34 -0700 (PDT) In-Reply-To: <20130922203426.GM41229@kib.kiev.ua> References: <201309221923.r8MJNm3u021657@svn.freebsd.org> <20130922201916.GL41229@kib.kiev.ua> <20130922203426.GM41229@kib.kiev.ua> Date: Sun, 22 Sep 2013 21:49:34 +0100 X-Google-Sender-Auth: 8E3RDbGZ_YqeqT-4uL_AF04XxdA Message-ID: Subject: Re: svn commit: r255797 - head/sys/kern From: Attilio Rao To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , Matthew Fleming , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 20:49:37 -0000 On Sun, Sep 22, 2013 at 9:34 PM, Konstantin Belousov wrote: > On Sun, Sep 22, 2013 at 11:19:16PM +0300, Konstantin Belousov wrote: >> On Sun, Sep 22, 2013 at 01:14:21PM -0700, Matthew Fleming wrote: >> > On Sun, Sep 22, 2013 at 12:23 PM, Konstantin Belousov wrote: >> >> > > Author: kib >> > > Date: Sun Sep 22 19:23:48 2013 >> > > New Revision: 255797 >> > > URL: http://svnweb.freebsd.org/changeset/base/255797 >> > > >> > > Log: >> > > Increase the chance of the buffer write from the bufdaemon helper >> > > context to succeed. If the locked vnode which owns the buffer to be >> > > written is shared locked, try the non-blocking upgrade of the lock to >> > > exclusive. >> > > >> > > PR: kern/178997 >> > > Reported and tested by: Klaus Weber < >> > > fbsd-bugs-2013-1@unix-admin.de> >> > > Sponsored by: The FreeBSD Foundation >> > > MFC after: 1 week >> > > Approved by: re (marius) >> > > >> > > Modified: >> > > head/sys/kern/vfs_bio.c >> > > >> > > Modified: head/sys/kern/vfs_bio.c >> > > >> > > ============================================================================== >> > > --- head/sys/kern/vfs_bio.c Sun Sep 22 19:15:24 2013 (r255796) >> > > +++ head/sys/kern/vfs_bio.c Sun Sep 22 19:23:48 2013 (r255797) >> > > @@ -2624,6 +2624,8 @@ flushbufqueues(struct vnode *lvp, int ta >> > > int hasdeps; >> > > int flushed; >> > > int queue; >> > > + int error; >> > > + bool unlock; >> > > >> > > flushed = 0; >> > > queue = QUEUE_DIRTY; >> > > @@ -2699,7 +2701,16 @@ flushbufqueues(struct vnode *lvp, int ta >> > > BUF_UNLOCK(bp); >> > > continue; >> > > } >> > > - if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_CANRECURSE) >> > > == 0) { >> > > + if (lvp == NULL) { >> > > + unlock = true; >> > > + error = vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT); >> > > + } else { >> > > + ASSERT_VOP_LOCKED(vp, "getbuf"); >> > > + unlock = false; >> > > + error = VOP_ISLOCKED(vp) == LK_EXCLUSIVE ? 0 : >> > > + vn_lock(vp, LK_UPGRADE | LK_NOWAIT); >> > > >> > >> > I don't think this is quite right. >> > >> > When the lock is held shared, and VOP_LOCK is implemented by lockmgr(9), >> > (i.e. all in-tree filesystems?), LK_UPGRADE may drop the lock, and not >> > reacquire it. This would happen when the vnode is locked shared, the >> > upgrade fails (2 shared owners), then lockmgr(9) will try to lock EX, which >> > will also fail (still one shared owner). The caller's lock is no longer >> > held. >> > >> > Doesn't that scenario (LK_UPGRADE failing) cause problems both for the >> > caller (unexpected unlock) and for flushbufqueues(), which expects the >> > vnode lock to be held since lvp is non-NULL? >> >> Does it ? If the lock is dropped, the code is indeed in trouble. >> Please note that LK_NOWAIT is specified for upgrade, and I believe >> that this causes lockmgr to return with EBUSY without dropping >> the lock. > > Yes, you are right, I reverted the patch. Thank you for noting this. > > I am bitten by unreasonable behaviour of non-blocking upgrade once more. > It has a history. > > Some time ago I proposed the following patch, which was turned down. > That time, I was able to work-around the case. For the bufdaemon helper, > I do not see any way to avoid this, except of sometimes locking the > reader vnode exclusive in anticipation of the too high dirty buffer > mark. If you are speaking about me, you are mistaken, I never turned out this patch. What I said is completely different: I said that LK_UPGRADE is a completely wrong semantic because it can hide wrong things like the one you hit today. I wanted to see it removed and replaced by explicit LK_RELEASE + LK_EXCLUSIVE operations. Note that this would have avoided this patch. I'm completely in favour of LK_TRYUPGRADE. Attilio From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 20:55:15 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 1E116A36; Sun, 22 Sep 2013 20:55:15 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B07442621; Sun, 22 Sep 2013 20:55:14 +0000 (UTC) Received: by mail-ob0-f172.google.com with SMTP id gq1so2896237obb.17 for ; Sun, 22 Sep 2013 13:55:14 -0700 (PDT) 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=xqsafAaawTihM6Ex1RMUEK/oGahZ51V5TrDgRrFm1N4=; b=rc99SUIjBqr3t8G1KLbtYjszd26LrIztAAEjU1U/g1dYjJWKaZGa0UwYupT86bg3+e yAll7CC1ahyIqrueov/iBiEm7Mz/eJ5dPmWA4O6kWLjmrpE648ANjobdHLvKdt/Y+KgS bm+pzYhVnSCul0e+I2IK4zKhz5N8uO5L722TMEK0+vSaPhIm3buPIwxTcFsZhxcyhrJD 4jZer1UwSXjfu0z5o5/H5tm5SnLzifs9xYBFKq1sMS+3ss9/SYAD+vGoumX4AVlaysmf 4MOjomnKDPUVKXQrYDE3+Zbq27rXxU6n6naUJJvdFzuuWfF21lpxL3pUddCGyKLvLC39 182Q== MIME-Version: 1.0 X-Received: by 10.182.88.129 with SMTP id bg1mr172478obb.36.1379883313894; Sun, 22 Sep 2013 13:55:13 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.182.75.9 with HTTP; Sun, 22 Sep 2013 13:55:13 -0700 (PDT) In-Reply-To: References: <201309221923.r8MJNm3u021657@svn.freebsd.org> <20130922201916.GL41229@kib.kiev.ua> <20130922203426.GM41229@kib.kiev.ua> Date: Sun, 22 Sep 2013 13:55:13 -0700 X-Google-Sender-Auth: 9HAyg9YLLzTJyRvPQMGP3ZQTHOE Message-ID: Subject: Re: svn commit: r255797 - head/sys/kern From: Matthew Fleming To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 20:55:15 -0000 On Sun, Sep 22, 2013 at 1:49 PM, Attilio Rao wrote: > On Sun, Sep 22, 2013 at 9:34 PM, Konstantin Belousov > wrote: > > On Sun, Sep 22, 2013 at 11:19:16PM +0300, Konstantin Belousov wrote: > >> On Sun, Sep 22, 2013 at 01:14:21PM -0700, Matthew Fleming wrote: > >> > On Sun, Sep 22, 2013 at 12:23 PM, Konstantin Belousov < > kib@freebsd.org>wrote: > >> >> > > Author: kib > >> > > Date: Sun Sep 22 19:23:48 2013 > >> > > New Revision: 255797 > >> > > URL: http://svnweb.freebsd.org/changeset/base/255797 > >> > > > >> > > Log: > >> > > Increase the chance of the buffer write from the bufdaemon helper > >> > > context to succeed. If the locked vnode which owns the buffer to > be > >> > > written is shared locked, try the non-blocking upgrade of the > lock to > >> > > exclusive. > >> > > > >> > > PR: kern/178997 > >> > > Reported and tested by: Klaus Weber < > >> > > fbsd-bugs-2013-1@unix-admin.de> > >> > > Sponsored by: The FreeBSD Foundation > >> > > MFC after: 1 week > >> > > Approved by: re (marius) > >> > > > >> > > Modified: > >> > > head/sys/kern/vfs_bio.c > >> > > > >> > > Modified: head/sys/kern/vfs_bio.c > >> > > > >> > > > ============================================================================== > >> > > --- head/sys/kern/vfs_bio.c Sun Sep 22 19:15:24 2013 > (r255796) > >> > > +++ head/sys/kern/vfs_bio.c Sun Sep 22 19:23:48 2013 > (r255797) > >> > > @@ -2624,6 +2624,8 @@ flushbufqueues(struct vnode *lvp, int ta > >> > > int hasdeps; > >> > > int flushed; > >> > > int queue; > >> > > + int error; > >> > > + bool unlock; > >> > > > >> > > flushed = 0; > >> > > queue = QUEUE_DIRTY; > >> > > @@ -2699,7 +2701,16 @@ flushbufqueues(struct vnode *lvp, int ta > >> > > BUF_UNLOCK(bp); > >> > > continue; > >> > > } > >> > > - if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT | > LK_CANRECURSE) > >> > > == 0) { > >> > > + if (lvp == NULL) { > >> > > + unlock = true; > >> > > + error = vn_lock(vp, LK_EXCLUSIVE | > LK_NOWAIT); > >> > > + } else { > >> > > + ASSERT_VOP_LOCKED(vp, "getbuf"); > >> > > + unlock = false; > >> > > + error = VOP_ISLOCKED(vp) == LK_EXCLUSIVE ? > 0 : > >> > > + vn_lock(vp, LK_UPGRADE | LK_NOWAIT); > >> > > > >> > > >> > I don't think this is quite right. > >> > > >> > When the lock is held shared, and VOP_LOCK is implemented by > lockmgr(9), > >> > (i.e. all in-tree filesystems?), LK_UPGRADE may drop the lock, and not > >> > reacquire it. This would happen when the vnode is locked shared, the > >> > upgrade fails (2 shared owners), then lockmgr(9) will try to lock EX, > which > >> > will also fail (still one shared owner). The caller's lock is no > longer > >> > held. > >> > > >> > Doesn't that scenario (LK_UPGRADE failing) cause problems both for the > >> > caller (unexpected unlock) and for flushbufqueues(), which expects the > >> > vnode lock to be held since lvp is non-NULL? > >> > >> Does it ? If the lock is dropped, the code is indeed in trouble. > >> Please note that LK_NOWAIT is specified for upgrade, and I believe > >> that this causes lockmgr to return with EBUSY without dropping > >> the lock. > > > > Yes, you are right, I reverted the patch. Thank you for noting this. > > > > I am bitten by unreasonable behaviour of non-blocking upgrade once more. > > It has a history. > > > > Some time ago I proposed the following patch, which was turned down. > > That time, I was able to work-around the case. For the bufdaemon helper, > > I do not see any way to avoid this, except of sometimes locking the > > reader vnode exclusive in anticipation of the too high dirty buffer > > mark. > > If you are speaking about me, you are mistaken, I never turned out this > patch. > What I said is completely different: I said that LK_UPGRADE is a > completely wrong semantic because it can hide wrong things like the > one you hit today. > I wanted to see it removed and replaced by explicit LK_RELEASE + > LK_EXCLUSIVE operations. > Note that this would have avoided this patch. > > I'm completely in favour of LK_TRYUPGRADE. I agree, here a LK_TRYUPGRADE semantic looks like what is needed. Cheers, matthew From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 20:59:32 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id C554ACBA; Sun, 22 Sep 2013 20:59:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 46F872651; Sun, 22 Sep 2013 20:59:32 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r8MKxPgY094210; Sun, 22 Sep 2013 23:59:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r8MKxPgY094210 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r8MKxPHD094209; Sun, 22 Sep 2013 23:59:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 22 Sep 2013 23:59:25 +0300 From: Konstantin Belousov To: Attilio Rao Subject: Re: svn commit: r255797 - head/sys/kern Message-ID: <20130922205925.GN41229@kib.kiev.ua> References: <201309221923.r8MJNm3u021657@svn.freebsd.org> <20130922201916.GL41229@kib.kiev.ua> <20130922203426.GM41229@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="anPoB0msPFVAi9r1" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: "svn-src-head@freebsd.org" , Matthew Fleming , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 20:59:33 -0000 --anPoB0msPFVAi9r1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 22, 2013 at 09:49:34PM +0100, Attilio Rao wrote: > On Sun, Sep 22, 2013 at 9:34 PM, Konstantin Belousov > wrote: > > On Sun, Sep 22, 2013 at 11:19:16PM +0300, Konstantin Belousov wrote: > >> On Sun, Sep 22, 2013 at 01:14:21PM -0700, Matthew Fleming wrote: > >> > On Sun, Sep 22, 2013 at 12:23 PM, Konstantin Belousov wrote: > >> >> > > Author: kib > >> > > Date: Sun Sep 22 19:23:48 2013 > >> > > New Revision: 255797 > >> > > URL: http://svnweb.freebsd.org/changeset/base/255797 > >> > > > >> > > Log: > >> > > Increase the chance of the buffer write from the bufdaemon helper > >> > > context to succeed. If the locked vnode which owns the buffer t= o be > >> > > written is shared locked, try the non-blocking upgrade of the lo= ck to > >> > > exclusive. > >> > > > >> > > PR: kern/178997 > >> > > Reported and tested by: Klaus Weber < > >> > > fbsd-bugs-2013-1@unix-admin.de> > >> > > Sponsored by: The FreeBSD Foundation > >> > > MFC after: 1 week > >> > > Approved by: re (marius) > >> > > > >> > > Modified: > >> > > head/sys/kern/vfs_bio.c > >> > > > >> > > Modified: head/sys/kern/vfs_bio.c > >> > > > >> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > >> > > --- head/sys/kern/vfs_bio.c Sun Sep 22 19:15:24 2013 (r= 255796) > >> > > +++ head/sys/kern/vfs_bio.c Sun Sep 22 19:23:48 2013 (r= 255797) > >> > > @@ -2624,6 +2624,8 @@ flushbufqueues(struct vnode *lvp, int ta > >> > > int hasdeps; > >> > > int flushed; > >> > > int queue; > >> > > + int error; > >> > > + bool unlock; > >> > > > >> > > flushed =3D 0; > >> > > queue =3D QUEUE_DIRTY; > >> > > @@ -2699,7 +2701,16 @@ flushbufqueues(struct vnode *lvp, int ta > >> > > BUF_UNLOCK(bp); > >> > > continue; > >> > > } > >> > > - if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_CANR= ECURSE) > >> > > =3D=3D 0) { > >> > > + if (lvp =3D=3D NULL) { > >> > > + unlock =3D true; > >> > > + error =3D vn_lock(vp, LK_EXCLUSIVE | LK_NO= WAIT); > >> > > + } else { > >> > > + ASSERT_VOP_LOCKED(vp, "getbuf"); > >> > > + unlock =3D false; > >> > > + error =3D VOP_ISLOCKED(vp) =3D=3D LK_EXCLU= SIVE ? 0 : > >> > > + vn_lock(vp, LK_UPGRADE | LK_NOWAIT); > >> > > > >> > > >> > I don't think this is quite right. > >> > > >> > When the lock is held shared, and VOP_LOCK is implemented by lockmgr= (9), > >> > (i.e. all in-tree filesystems?), LK_UPGRADE may drop the lock, and n= ot > >> > reacquire it. This would happen when the vnode is locked shared, the > >> > upgrade fails (2 shared owners), then lockmgr(9) will try to lock EX= , which > >> > will also fail (still one shared owner). The caller's lock is no lo= nger > >> > held. > >> > > >> > Doesn't that scenario (LK_UPGRADE failing) cause problems both for t= he > >> > caller (unexpected unlock) and for flushbufqueues(), which expects t= he > >> > vnode lock to be held since lvp is non-NULL? > >> > >> Does it ? If the lock is dropped, the code is indeed in trouble. > >> Please note that LK_NOWAIT is specified for upgrade, and I believe > >> that this causes lockmgr to return with EBUSY without dropping > >> the lock. > > > > Yes, you are right, I reverted the patch. Thank you for noting this. > > > > I am bitten by unreasonable behaviour of non-blocking upgrade once more. > > It has a history. > > > > Some time ago I proposed the following patch, which was turned down. > > That time, I was able to work-around the case. For the bufdaemon helper, > > I do not see any way to avoid this, except of sometimes locking the > > reader vnode exclusive in anticipation of the too high dirty buffer > > mark. >=20 > If you are speaking about me, you are mistaken, I never turned out this p= atch. > What I said is completely different: I said that LK_UPGRADE is a > completely wrong semantic because it can hide wrong things like the > one you hit today. > I wanted to see it removed and replaced by explicit LK_RELEASE + > LK_EXCLUSIVE operations. > Note that this would have avoided this patch. >=20 > I'm completely in favour of LK_TRYUPGRADE. Excellent, I will expedite the LK_TRYUPGRADE into tree and then reinstantia= te the bufdaemon helper patch. Thank you. --anPoB0msPFVAi9r1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSP1osAAoJEJDCuSvBvK1BbjYP/2XleBxWaB+GZXZAHiyGY1Hc 3Zkn1lfOKHGJWe+a+qeGpuvEtFki4JZJbuoiW1nmT60ljksJPDmQuhVpSgsTIaH4 HfIKqDFgaGrcrKUk2nMLuHYGKjivY65/sMTMAD4EQxk7OGby25ejmS4cY7NvnuVE jbQ3YijrbsVthJrb7BkXUfZB2GBoZ9AYC+/EJfJDZuJeEPZxsLSjcQTFligIhMjQ t96N/dHpxpbSg935sN86LvKpW1W2ttsznrdxlJaNcUbofLlNpapXEx6TovUd5dS2 K6Co6EnV26RAhSZtMylM7fcEBfyy9Bpllxe/dP4xdDlwuWjLMXMzwXN6ZduySalU UoCXJcGD7q0eflEPWq88ehgKyr9ty0Cn+eMMgY/tNkbuckPxcztdCESkBmseDgAg CfuNGI3jKQAUk3Fh0bFuN4gwk1p5Z0I9iSQNmvwx8d1S7Ec8ImW3VvEoDFy30gKW lpFRI61WK8N3Sd6hBse/C3nr/bYLb1+rF4mMr1Lqf+uidaOJsnbSltSJtYc4DKwc zKwcZaPOHGAfuRsyYB82vtT+xUfDs0dJGqj9tBBV3ToSCWOqaLqivYF9M67Qhzrn InAG+iKtjLioqgOsOfNWozWIryVe/YgCshbI38yMI7uAGp3qu+HMmqHBKs8E00J9 SDlmIjtYNnU/WxbpGh3s =donU -----END PGP SIGNATURE----- --anPoB0msPFVAi9r1-- From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 22:03:33 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 8FBCA8BE; Sun, 22 Sep 2013 22:03:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7B3772987; Sun, 22 Sep 2013 22:03: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 r8MM3XrN006599; Sun, 22 Sep 2013 22:03:33 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MM3UjJ006580; Sun, 22 Sep 2013 22:03:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201309222203.r8MM3UjJ006580@svn.freebsd.org> From: Dimitry Andric Date: Sun, 22 Sep 2013 22:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255804 - in head/contrib/llvm/lib: CodeGen/SelectionDAG Target/AArch64 Target/ARM Target/Hexagon Target/MSP430 Target/Mips Target/NVPTX Target/PowerPC Target/R600 Target/Sparc Target/S... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 22:03:33 -0000 Author: dim Date: Sun Sep 22 22:03:30 2013 New Revision: 255804 URL: http://svnweb.freebsd.org/changeset/base/255804 Log: Pull in r191165 from upstream llvm trunk: ISelDAG: spot chain cycles involving MachineNodes Previously, the DAGISel function WalkChainUsers was spotting that it had entered already-selected territory by whether a node was a MachineNode (amongst other things). Since it's fairly common practice to insert MachineNodes during ISelLowering, this was not the correct check. Looking around, it seems that other nodes get their NodeId set to -1 upon selection, so this makes sure the same thing happens to all MachineNodes and uses that characteristic to determine whether we should stop looking for a loop during selection. This should fix PR15840. Specifically, this fixes the long-standing assertion failure when compiling the multimedia/gstreamer port on i386. Thanks to Tijl Coosemans for his help in getting upstream to fix it. Approved by: re (marius) Modified: head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/R600/AMDILISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -1736,15 +1736,15 @@ WalkChainUsers(const SDNode *ChainedNode SDNode *User = *UI; + if (User->getOpcode() == ISD::HANDLENODE) // Root of the graph. + continue; + // If we see an already-selected machine node, then we've gone beyond the // pattern that we're selecting down into the already selected chunk of the // DAG. - if (User->isMachineOpcode() || - User->getOpcode() == ISD::HANDLENODE) // Root of the graph. - continue; - unsigned UserOpcode = User->getOpcode(); - if (UserOpcode == ISD::CopyToReg || + if (User->isMachineOpcode() || + UserOpcode == ISD::CopyToReg || UserOpcode == ISD::CopyFromReg || UserOpcode == ISD::INLINEASM || UserOpcode == ISD::EH_LABEL || Modified: head/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -395,6 +395,7 @@ SDNode *AArch64DAGToDAGISel::Select(SDNo if (Node->isMachineOpcode()) { DEBUG(dbgs() << "== "; Node->dump(CurDAG); dbgs() << "\n"); + Node->setNodeId(-1); return NULL; } Modified: head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -2546,8 +2546,10 @@ SDNode *ARMDAGToDAGISel::SelectAtomic64( SDNode *ARMDAGToDAGISel::Select(SDNode *N) { DebugLoc dl = N->getDebugLoc(); - if (N->isMachineOpcode()) + if (N->isMachineOpcode()) { + N->setNodeId(-1); return NULL; // Already selected. + } switch (N->getOpcode()) { default: break; Modified: head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -1334,8 +1334,10 @@ SDNode *HexagonDAGToDAGISel::SelectAdd(S SDNode *HexagonDAGToDAGISel::Select(SDNode *N) { - if (N->isMachineOpcode()) + if (N->isMachineOpcode()) { + N->setNodeId(-1); return NULL; // Already selected. + } switch (N->getOpcode()) { Modified: head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -394,6 +394,7 @@ SDNode *MSP430DAGToDAGISel::Select(SDNod DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); + Node->setNodeId(-1); return NULL; } Modified: head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -97,6 +97,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); + Node->setNodeId(-1); return NULL; } Modified: head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -91,8 +91,10 @@ NVPTXDAGToDAGISel::NVPTXDAGToDAGISel(NVP /// expanded, promoted and normal instructions. SDNode *NVPTXDAGToDAGISel::Select(SDNode *N) { - if (N->isMachineOpcode()) + if (N->isMachineOpcode()) { + N->setNodeId(-1); return NULL; // Already selected. + } SDNode *ResNode = NULL; switch (N->getOpcode()) { Modified: head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -895,8 +895,10 @@ SDNode *PPCDAGToDAGISel::SelectSETCC(SDN // target-specific node if it hasn't already been changed. SDNode *PPCDAGToDAGISel::Select(SDNode *N) { DebugLoc dl = N->getDebugLoc(); - if (N->isMachineOpcode()) + if (N->isMachineOpcode()) { + N->setNodeId(-1); return NULL; // Already selected. + } switch (N->getOpcode()) { default: break; Modified: head/contrib/llvm/lib/Target/R600/AMDILISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/R600/AMDILISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/R600/AMDILISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -158,6 +158,7 @@ bool AMDGPUDAGToDAGISel::SelectADDR64(SD SDNode *AMDGPUDAGToDAGISel::Select(SDNode *N) { unsigned int Opc = N->getOpcode(); if (N->isMachineOpcode()) { + N->setNodeId(-1); return NULL; // Already selected. } switch (Opc) { Modified: head/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -137,8 +137,10 @@ bool SparcDAGToDAGISel::SelectADDRrr(SDV SDNode *SparcDAGToDAGISel::Select(SDNode *N) { DebugLoc dl = N->getDebugLoc(); - if (N->isMachineOpcode()) + if (N->isMachineOpcode()) { + N->setNodeId(-1); return NULL; // Already selected. + } switch (N->getOpcode()) { default: break; Modified: head/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -540,6 +540,7 @@ SDNode *SystemZDAGToDAGISel::Select(SDNo // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); + Node->setNodeId(-1); return 0; } Modified: head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Sun Sep 22 21:58:59 2013 (r255803) +++ head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Sun Sep 22 22:03:30 2013 (r255804) @@ -1988,6 +1988,7 @@ SDNode *X86DAGToDAGISel::Select(SDNode * if (Node->isMachineOpcode()) { DEBUG(dbgs() << "== "; Node->dump(CurDAG); dbgs() << '\n'); + Node->setNodeId(-1); return NULL; // Already selected. } From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 22:05:27 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id AA9FCAD5; Sun, 22 Sep 2013 22:05:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 679E129B6; Sun, 22 Sep 2013 22:05:27 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::fc32:4a94:3a4c:ac46] (unknown [IPv6:2001:7b8:3a7:0:fc32:4a94:3a4c:ac46]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 02DE85C44; Mon, 23 Sep 2013 00:05:25 +0200 (CEST) From: Dimitry Andric Content-Type: multipart/signed; boundary="Apple-Mail=_3A138EFF-51E4-4225-AC3A-C67DB491AEB7"; protocol="application/pgp-signature"; micalg=pgp-sha1 Message-Id: <427467AD-F9D7-47AF-A271-DEB719985F18@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255804 - in head/contrib/llvm/lib: CodeGen/SelectionDAG Target/AArch64 Target/ARM Target/Hexagon Target/MSP430 Target/Mips Target/NVPTX Target/PowerPC Target/R600 Target/Sparc Target/S... Date: Mon, 23 Sep 2013 00:05:23 +0200 References: <201309222203.r8MM3UjJ006580@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201309222203.r8MM3UjJ006580@svn.freebsd.org> X-Mailer: Apple Mail (2.1510) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 22:05:27 -0000 --Apple-Mail=_3A138EFF-51E4-4225-AC3A-C67DB491AEB7 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Sep 23, 2013, at 00:03, Dimitry Andric wrote: > Author: dim > Date: Sun Sep 22 22:03:30 2013 > New Revision: 255804 > URL: http://svnweb.freebsd.org/changeset/base/255804 > > Log: > Pull in r191165 from upstream llvm trunk: > > ISelDAG: spot chain cycles involving MachineNodes > > Previously, the DAGISel function WalkChainUsers was spotting that it > had entered already-selected territory by whether a node was a > MachineNode (amongst other things). Since it's fairly common practice > to insert MachineNodes during ISelLowering, this was not the correct > check. > > Looking around, it seems that other nodes get their NodeId set to -1 > upon selection, so this makes sure the same thing happens to all > MachineNodes and uses that characteristic to determine whether we > should stop looking for a loop during selection. > > This should fix PR15840. > > Specifically, this fixes the long-standing assertion failure when > compiling the multimedia/gstreamer port on i386. Thanks to Tijl > Coosemans for his help in getting upstream to fix it. > > Approved by: re (marius) MFC after: 3 days --Apple-Mail=_3A138EFF-51E4-4225-AC3A-C67DB491AEB7 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.20 (Darwin) iEYEARECAAYFAlI/aaMACgkQsF6jCi4glqPOQwCfWhHkw2NxAtnzeNheaI9Wno7V 6CIAn0ICLjCrg8onPhj53dwjkhrlI6zz =rFia -----END PGP SIGNATURE----- --Apple-Mail=_3A138EFF-51E4-4225-AC3A-C67DB491AEB7-- From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 23:47:56 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 9EBAFA82; Sun, 22 Sep 2013 23:47:56 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8BAF4201C; Sun, 22 Sep 2013 23:47: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 r8MNlu6C061789; Sun, 22 Sep 2013 23:47:56 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MNluGE061788; Sun, 22 Sep 2013 23:47:56 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309222347.r8MNluGE061788@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 22 Sep 2013 23:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255805 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 23:47:56 -0000 Author: des Date: Sun Sep 22 23:47:56 2013 New Revision: 255805 URL: http://svnweb.freebsd.org/changeset/base/255805 Log: Always request zeroed memory, in case we're dumb enough to leak it later. Approved by: re (gjb) Modified: head/sys/kern/subr_sbuf.c Modified: head/sys/kern/subr_sbuf.c ============================================================================== --- head/sys/kern/subr_sbuf.c Sun Sep 22 22:03:30 2013 (r255804) +++ head/sys/kern/subr_sbuf.c Sun Sep 22 23:47:56 2013 (r255805) @@ -52,11 +52,11 @@ __FBSDID("$FreeBSD$"); #ifdef _KERNEL static MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers"); -#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK) +#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK|M_ZERO) #define SBFREE(buf) free(buf, M_SBUF) #else /* _KERNEL */ #define KASSERT(e, m) -#define SBMALLOC(size) malloc(size) +#define SBMALLOC(size) calloc(1, size) #define SBFREE(buf) free(buf) #endif /* _KERNEL */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 22 23:48:42 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 120F2BC7; Sun, 22 Sep 2013 23:48:42 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 000402028; Sun, 22 Sep 2013 23:48: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 r8MNmfjw061941; Sun, 22 Sep 2013 23:48:41 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MNmfjb061940; Sun, 22 Sep 2013 23:48:41 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201309222348.r8MNmfjb061940@svn.freebsd.org> From: Sean Bruno Date: Sun, 22 Sep 2013 23:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255806 - head/sys/dev/mfi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 23:48:42 -0000 Author: sbruno Date: Sun Sep 22 23:48:41 2013 New Revision: 255806 URL: http://svnweb.freebsd.org/changeset/base/255806 Log: Export two new DCMD enums. These allow set/get of the mfi_ctrl_properties structure in the driver. Having these in 10.0 means that mfiutil can be modified to take adavantage of new updates without a kernel recompile. Approved by: re (gjb) MFC after: 2 weeks Modified: head/sys/dev/mfi/mfireg.h Modified: head/sys/dev/mfi/mfireg.h ============================================================================== --- head/sys/dev/mfi/mfireg.h Sun Sep 22 23:47:56 2013 (r255805) +++ head/sys/dev/mfi/mfireg.h Sun Sep 22 23:48:41 2013 (r255806) @@ -192,6 +192,8 @@ typedef enum { MFI_DCMD_CTRL_MFC_DEFAULTS_GET =0x010e0201, MFI_DCMD_CTRL_MFC_DEFAULTS_SET =0x010e0202, MFI_DCMD_CTRL_FLUSHCACHE = 0x01101000, + MFI_DCMD_CTRL_GET_PROPS = 0x01020100, + MFI_DCMD_CTRL_SET_PROPS = 0x01020200, MFI_DCMD_CTRL_SHUTDOWN = 0x01050000, MFI_DCMD_CTRL_EVENT_GETINFO = 0x01040100, MFI_DCMD_CTRL_EVENT_GET = 0x01040300, From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 00:04:37 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 2176530C; Mon, 23 Sep 2013 00:04:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0F8362124; Mon, 23 Sep 2013 00:04: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 r8N04aMf071939; Mon, 23 Sep 2013 00:04:36 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8N04atk071938; Mon, 23 Sep 2013 00:04:36 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201309230004.r8N04atk071938@svn.freebsd.org> From: Ian Lepore Date: Mon, 23 Sep 2013 00:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255807 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 00:04:37 -0000 Author: ian Date: Mon Sep 23 00:04:36 2013 New Revision: 255807 URL: http://svnweb.freebsd.org/changeset/base/255807 Log: Launch the bourne shell using "sh" rather than "${SHELL}", as the latter may come in from the environment and reflect the user's interactive shell. Using bare "sh" is the dominant pattern in existing makefiles. MFC this together with r255775. Approved by: re () MFC after: 2 weeks Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Sep 22 23:48:41 2013 (r255806) +++ head/include/Makefile Mon Sep 23 00:04:36 2013 (r255807) @@ -113,7 +113,7 @@ osreldate.h vers.c: ${NEWVERS_SH} ${PARA MAKE="${MAKE}" \ NEWVERS_SH=${NEWVERS_SH} \ PARAM_H=${PARAM_H} \ - ${SHELL} ${MK_OSRELDATE_SH} + sh ${MK_OSRELDATE_SH} .for i in ${LHDRS} INCSLINKS+= sys/$i ${INCLUDEDIR}/$i From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 00:19:47 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id D5FF85B8 for ; Mon, 23 Sep 2013 00:19:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D309219B for ; Mon, 23 Sep 2013 00:19:47 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8N0JlWg020085 for ; Mon, 23 Sep 2013 00:19:47 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8N0Jl7k020078 for svn-src-head@freebsd.org; Mon, 23 Sep 2013 00:19:47 GMT (envelope-from bdrewery) Received: (qmail 47102 invoked from network); 22 Sep 2013 19:19:46 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 22 Sep 2013 19:19:46 -0500 Message-ID: <523F891F.6010401@FreeBSD.org> Date: Sun, 22 Sep 2013 19:19:43 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: svn commit: r255804 - in head/contrib/llvm/lib: CodeGen/SelectionDAG Target/AArch64 Target/ARM Target/Hexagon Target/MSP430 Target/Mips Target/NVPTX Target/PowerPC Target/R600 Target/Sparc Target/S... References: <201309222203.r8MM3UjJ006580@svn.freebsd.org> In-Reply-To: <201309222203.r8MM3UjJ006580@svn.freebsd.org> X-Enigmail-Version: 1.5.2 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jej3OleV2532OLvTKbaSK0wAHCNuTg2lc" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 00:19:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jej3OleV2532OLvTKbaSK0wAHCNuTg2lc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 9/22/2013 5:03 PM, Dimitry Andric wrote: > Author: dim > Date: Sun Sep 22 22:03:30 2013 > New Revision: 255804 > URL: http://svnweb.freebsd.org/changeset/base/255804 >=20 > Log: > Pull in r191165 from upstream llvm trunk: > =20 > ISelDAG: spot chain cycles involving MachineNodes > =20 > Previously, the DAGISel function WalkChainUsers was spotting that i= t > had entered already-selected territory by whether a node was a > MachineNode (amongst other things). Since it's fairly common practi= ce > to insert MachineNodes during ISelLowering, this was not the correc= t > check. > =20 > Looking around, it seems that other nodes get their NodeId set to -= 1 > upon selection, so this makes sure the same thing happens to all > MachineNodes and uses that characteristic to determine whether we > should stop looking for a loop during selection. > =20 > This should fix PR15840. 15840 is for x11-fonts/ucs-fixed. Did you put the wrong one? > =20 > Specifically, this fixes the long-standing assertion failure when > compiling the multimedia/gstreamer port on i386. Thanks to Tijl I will update the package builder with this. Thanks! > Coosemans for his help in getting upstream to fix it. > =20 > Approved by: re (marius) --=20 Regards, Bryan Drewery --jej3OleV2532OLvTKbaSK0wAHCNuTg2lc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSP4kfAAoJEG54KsA8mwz5eyYP+gO/PQgbujnUSdx3FIK77iC9 ZuK2/Qs8Z7DrPqm2ejw5C1E/OX56cNiTQ/gQnTOdEkSK78yDJOQzxqhKSJ+63bi5 dg46onIYcUcmhOlxkHGRVv5gJlqrFHeJaByVzuwtRjTumf21ESouZsptmHwRinbv pDXNjsw2j/717vb18BPMPsq59ylFRpmz5x424iLgEivSMvJsPjutWYsKt9o0FfFL T1CLOxEHC6ZbVZI2LiKBjngdR75DWDABFmxWyfrxJToqu25T4cb3jk4SewHewByd F2PHeVlcqrZ+S+d53lZPqAnARoqFewXY89Y+YXMc7+syKE69Q9jLR5UEXXUOc0LA pS7yI33OdpwfBgBWj8n22Cg15Xzr86CQ3iNmtKwik4YYDVA2K7ygm9VgE1R0b9TF 0r0gGu6ptKVYULOGCWmmwhEm/My+b4Sp76fRP8kVruA/UFPC9FgUYwNQ6nuKGhJi m6xCsVNCAfMiO7t5rBTqjznuVK0O6/yaBRMSZ+plZQCfpQsGbjjhDrOeJcWzF5WF M0Pa45QEm3dqZ8qUrOOr3SblOC10RU+DO5a0QtQJirJuXhVeeOoZNSAqwrszIEq2 TWdKpwIxuGvwTVtsOI1U5nuJjXKga89uyv+Ib2uwkkfCCyN+SkNh4Lm9SfH+TyoS EAIZj9R/3ZkK7PV4zjDK =BMhw -----END PGP SIGNATURE----- --jej3OleV2532OLvTKbaSK0wAHCNuTg2lc-- From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 04:36:53 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id C31E286F; Mon, 23 Sep 2013 04:36:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ACDA22AFF; Mon, 23 Sep 2013 04:36: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 r8N4arlo019719; Mon, 23 Sep 2013 04:36:53 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8N4apZZ019707; Mon, 23 Sep 2013 04:36:51 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309230436.r8N4apZZ019707@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 23 Sep 2013 04:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255809 - in head: etc etc/defaults etc/rc.d share/man/man5 share/man/man8 tools/build/mk usr.sbin/unbound usr.sbin/unbound/local-setup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 04:36:53 -0000 Author: des Date: Mon Sep 23 04:36:51 2013 New Revision: 255809 URL: http://svnweb.freebsd.org/changeset/base/255809 Log: Add a setup script for unbound(8) called local-unbound-setup. It generates a configuration suitable for running unbound as a caching forwarding resolver, and configures resolvconf(8) to update unbound's list of forwarders in addition to /etc/resolv.conf. The initial list is taken from the existing resolv.conf, which is rewritten to point to localhost. Alternatively, a list of forwarders can be provided on the command line. To assist this script, add an rc.subr command called "enabled" which does nothing except return 0 if the service is enabled and 1 if it is not, without going through the usual checks. We should consider doing the same for "status", which is currently pointless. Add an rc script for unbound, called local_unbound. If there is no configuration file, the rc script runs local-unbound-setup to generate one. Note that these scripts place the unbound configuration files in /var/unbound rather than /etc/unbound. This is necessary so that unbound can reload its configuration while chrooted. We should probably provide symlinks in /etc. Approved by: re (blanket) Added: head/etc/rc.d/local_unbound (contents, props changed) head/usr.sbin/unbound/local-setup/ head/usr.sbin/unbound/local-setup/Makefile (contents, props changed) head/usr.sbin/unbound/local-setup/local-unbound-setup.sh (contents, props changed) Modified: head/etc/defaults/rc.conf head/etc/rc.d/Makefile head/etc/rc.subr head/share/man/man5/rc.conf.5 head/share/man/man8/rc.8 head/share/man/man8/rc.subr.8 head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/unbound/Makefile Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Sep 23 00:16:19 2013 (r255808) +++ head/etc/defaults/rc.conf Mon Sep 23 04:36:51 2013 (r255809) @@ -270,6 +270,7 @@ hastd_enable="NO" # Run the HAST daemon hastd_program="/sbin/hastd" # path to hastd, if you want a different one. hastd_flags="" # Optional flags to hastd. ctld_enable="NO" # CAM Target Layer / iSCSI target daemon. +local_unbound_enable="NO" # local caching resolver # # named. It may be possible to run named in a sandbox, man security for # details. Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Sep 23 00:16:19 2013 (r255808) +++ head/etc/rc.d/Makefile Mon Sep 23 04:36:51 2013 (r255809) @@ -150,6 +150,7 @@ FILES= DAEMON \ tmp \ ${_ubthidhci} \ ugidfw \ + ${_unbound} \ ${_utx} \ var \ virecover \ @@ -184,6 +185,10 @@ _nscd= nscd _ubthidhci= ubthidhci .endif +.if ${MK_UNBOUND} != "no" +_unbound= local_unbound +.endif + .if ${MK_UTMPX} != "no" _utx= utx .endif Added: head/etc/rc.d/local_unbound ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/local_unbound Mon Sep 23 04:36:51 2013 (r255809) @@ -0,0 +1,91 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: local_unbound +# REQUIRE: SERVERS cleanvar +# KEYWORD: shutdown + +. /etc/rc.subr + +name="local_unbound" +desc="local caching forwarding resolver" +rcvar="local_unbound_enable" + +command="/usr/sbin/unbound" +extra_commands="anchor configtest reload setup" +start_precmd="local_unbound_prestart" +reload_precmd="local_unbound_configtest" +anchor_cmd="local_unbound_anchor" +configtest_cmd="local_unbound_configtest" +setup_cmd="local_unbound_setup" +pidfile="/var/run/${name}.pid" + +: ${local_unbound_workdir:=/var/unbound} +: ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} +: ${local_unbound_flags:=-c${local_unbound_config}} +: ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf} +: ${local_unbound_anchor:=${local_unbound_workdir}/root.key} +: ${local_unbound_forwarders:=} + +load_rc_config $name + +do_as_unbound() +{ + echo "$@" | su -m unbound +} + +# +# Retrieve or update the DNSSEC root anchor +# +local_unbound_anchor() +{ + do_as_unbound /usr/sbin/unbound-anchor -a ${local_unbound_anchor} + # we can't trust the exit code - check if the file exists + [ -f ${local_unbound_anchor} ] +} + +# +# Check the unbound configuration file +# +local_unbound_configtest() +{ + do_as_unbound /usr/sbin/unbound-checkconf ${local_unbound_config} +} + +# +# Create the unbound configuration file and update resolv.conf to +# point to unbound. +# +local_unbound_setup() +{ + echo "Performing initial setup." + /usr/sbin/local-unbound-setup -n \ + -u unbound \ + -w ${local_unbound_workdir} \ + -c ${local_unbound_config} \ + -f ${local_unbound_forwardconf} \ + -a ${local_unbound_anchor} \ + ${local_unbound_forwarders} +} + +# +# Before starting, check that the configuration file and root anchor +# exist. If not, attempt to generate them. +# +local_unbound_prestart() +{ + # Create configuration file + if [ ! -f ${local_unbound_config} ] ; then + run_rc_command setup + fi + + # Retrieve DNSSEC root key + if [ ! -f ${local_unbound_anchor} ] ; then + run_rc_command anchor + fi +} + +load_rc_config $name +run_rc_command "$1" Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Mon Sep 23 00:16:19 2013 (r255808) +++ head/etc/rc.subr Mon Sep 23 04:36:51 2013 (r255809) @@ -546,6 +546,8 @@ check_startmsgs() # # rcvar Display what rc.conf variable is used (if any). # +# enabled Return true if the service is enabled. +# # Variables available to methods, and after run_rc_command() has # completed: # @@ -614,7 +616,7 @@ run_rc_command() eval _override_command=\$${name}_program command=${_override_command:-$command} - _keywords="start stop restart rcvar $extra_commands" + _keywords="start stop restart rcvar enabled $extra_commands" rc_pid= _pidcmd= _procname=${procname:-${command}} @@ -635,6 +637,11 @@ run_rc_command() rc_usage $_keywords fi + if [ "$rc_arg" = "enabled" ] ; then + checkyesno ${rcvar} + return $? + fi + if [ -n "$flags" ]; then # allow override from environment rc_flags=$flags else Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Sep 23 00:16:19 2013 (r255808) +++ head/share/man/man5/rc.conf.5 Mon Sep 23 04:36:51 2013 (r255809) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2013 +.Dd September 23, 2013 .Dt RC.CONF 5 .Os .Sh NAME @@ -2041,6 +2041,13 @@ is set to .Dq Li YES , these are the flags to pass to .Xr hastd 8 . +.It Va local_unbound_enable +.Pq Vt bool +If set to +.Dq Li YES , +run the +.Xr unbound 8 +daemon as a local caching resolver. .It Va named_enable .Pq Vt bool If set to @@ -4786,6 +4793,7 @@ The default is 30. .Xr sysctl 8 , .Xr syslogd 8 , .Xr timed 8 , +.Xr unbound 8 , .Xr usbconfig 8 , .Xr wlandebug 8 , .Xr yp 8 , Modified: head/share/man/man8/rc.8 ============================================================================== --- head/share/man/man8/rc.8 Mon Sep 23 00:16:19 2013 (r255808) +++ head/share/man/man8/rc.8 Mon Sep 23 04:36:51 2013 (r255809) @@ -35,7 +35,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd January 14, 2012 +.Dd September 23, 2013 .Dt RC 8 .Os .Sh NAME @@ -312,6 +312,9 @@ Defaults to displaying the process ID of If the script starts a process (rather than performing a one-off operation), wait for the command to exit. Otherwise it is not necessary to support this argument. +.It Cm enabled +Return 0 if the service is enabled and 1 if it is not. +This command does not print anything. .It Cm rcvar Display which .Xr rc.conf 5 Modified: head/share/man/man8/rc.subr.8 ============================================================================== --- head/share/man/man8/rc.subr.8 Mon Sep 23 00:16:19 2013 (r255808) +++ head/share/man/man8/rc.subr.8 Mon Sep 23 04:36:51 2013 (r255809) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2012 +.Dd September 23, 2012 .Dt RC.SUBR 8 .Os .Sh NAME @@ -379,6 +379,9 @@ Perform a then a .Cm start . Defaults to displaying the process ID of the program (if running). +.It Cm enabled +Return 0 if the service is enabled and 1 if it is not. +This command does not print anything. .It Cm rcvar Display which .Xr rc.conf 5 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Sep 23 00:16:19 2013 (r255808) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Sep 23 04:36:51 2013 (r255809) @@ -4375,6 +4375,7 @@ OLD_FILES+=usr/share/man/man8/telnetd.8. #.endif .if ${MK_UNBOUND} == no +OLD_FILES+=etc/rc.d/local_unbound OLD_FILES+=usr/lib/private/libunbound.a OLD_FILES+=usr/lib/private/libunbound.so OLD_LIBS+=usr/lib/private/libunbound.so.5 @@ -4385,6 +4386,7 @@ OLD_FILES+=usr/lib32/private/libunbound. OLD_LIBS+=usr/lib32/private/libunbound.so.5 OLD_FILES+=usr/lib32/private/libunbound_p.a .endif +OLD_FILES+=usr/sbin/local-unbound-setup OLD_FILES+=usr/sbin/unbound OLD_FILES+=usr/sbin/unbound-anchor OLD_FILES+=usr/sbin/unbound-checkconf Modified: head/usr.sbin/unbound/Makefile ============================================================================== --- head/usr.sbin/unbound/Makefile Mon Sep 23 00:16:19 2013 (r255808) +++ head/usr.sbin/unbound/Makefile Mon Sep 23 04:36:51 2013 (r255809) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR= daemon anchor checkconf control +SUBDIR+= local-setup .include Added: head/usr.sbin/unbound/local-setup/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/unbound/local-setup/Makefile Mon Sep 23 04:36:51 2013 (r255809) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +SCRIPTS= local-unbound-setup.sh +MAN= # + +.include Added: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Mon Sep 23 04:36:51 2013 (r255809) @@ -0,0 +1,357 @@ +#!/bin/sh +#- +# Copyright (c) 2013 Dag-Erling Smørgrav +# 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$ +# + +# +# Configuration variables +# +user="" +unbound_conf="" +forward_conf="" +workdir="" +chrootdir="" +anchor="" +pidfile="" +resolv_conf="" +resolvconf_conf="" +service="" +start_unbound="" +forwarders="" + +# +# Global variables +# +self=$(basename $(realpath "$0")) +bkext=$(date "+%Y%m%d.%H%M%S") + +# +# Set default values for unset configuration variables. +# +set_defaults() { + : ${user:=unbound} + : ${workdir:=/var/unbound} + : ${unbound_conf:=${workdir}/unbound.conf} + : ${forward_conf:=${workdir}/forward.conf} + : ${anchor:=${workdir}/root.key} + : ${pidfile:=/var/run/local_unbound.pid} + : ${resolv_conf:=/etc/resolv.conf} + : ${resolvconf_conf:=/etc/resolvconf.conf} + : ${service:=local_unbound} + : ${start_unbound:=yes} +} + +# +# Verify that the configuration files are inside the working +# directory, and if so, set the chroot directory accordingly. +# +set_chrootdir() { + chrootdir="${workdir}" + for file in "${unbound_conf}" "${forward_conf}" "${anchor}" ; do + if [ "${file#${workdir%/}/}" = "${file}" ] ; then + echo "warning: ${file} is outside ${workdir}" >&2 + chrootdir="" + fi + done + if [ -z "${chrootdir}" ] ; then + echo "warning: disabling chroot" >&2 + fi +} + +# +# Scan through /etc/resolv.conf looking for uncommented nameserver +# lines that don't point to localhost and return their values. +# +get_nameservers() { + while read line ; do + local bareline=${line%%\#*} + local key=${bareline%% *} + local value=${bareline#* } + case ${key} in + nameserver) + case ${value} in + 127.0.0.1|::1|localhost|localhost.*) + ;; + *) + echo "${value}" + ;; + esac + ;; + esac + done +} + +# +# Scan through /etc/resolv.conf looking for uncommented nameserver +# lines. Comment out any that don't point to localhost. Finally, +# append a nameserver line that points to localhost, if there wasn't +# one already, and enable the edns0 option. +# +gen_resolv_conf() { + local localhost=no + local edns0=no + while read line ; do + local bareline=${line%%\#*} + local key=${bareline%% *} + local value=${bareline#* } + case ${key} in + nameserver) + case ${value} in + 127.0.0.1|::1|localhost|localhost.*) + localhost=yes + ;; + *) + echo -n "# " + ;; + esac + ;; + options) + case ${value} in + *edns0*) + edns0=yes + ;; + esac + ;; + esac + echo "${line}" + done + if [ "${localhost}" = "no" ] ; then + echo "nameserver 127.0.0.1" + fi + if [ "${edns0}" = "no" ] ; then + echo "options edns0" + fi +} + +# +# Generate resolvconf.conf so it updates forward.conf in addition to +# resolv.conf. Note "in addition to" rather than "instead of", +# because we still want it to update the domain name and search path +# if they change. Setting name_servers to "127.0.0.1" ensures that +# the libc resolver will try unbound first. +# +gen_resolvconf_conf() { + echo "# Generated by $self" + echo "name_servers=\"127.0.0.1\"" + echo "unbound_conf=\"${forward_conf}\"" + echo "unbound_pid=\"${pidfile}\"" + echo "unbound_service=\"${service}\"" + # resolvconf(8) likes to restart rather than reload - consider + # forcing its hand? + #echo "unbound_restart=\"service ${service} reload\"" +} + +# +# Generate forward.conf +# +gen_forward_conf() { + echo "# Generated by $self" + echo "forward-zone:" + echo " name: ." + for forwarder ; do + if expr "${forwarder}" : "^[0-9:.]\{1,\}$" >/dev/null ; then + echo " forward-addr: ${forwarder}" + else + echo " forward-host: ${forwarder}" + fi + done +} + +# +# Generate unbound.conf +# +gen_unbound_conf() { + echo "# Generated by $self" + echo "server:" + echo " username: ${user}" + echo " directory: ${workdir}" + echo " chroot: ${chrootdir}" + echo " pidfile: ${pidfile}" + echo " auto-trust-anchor-file: ${anchor}" + echo "" + if [ -f "${forward_conf}" ] ; then + echo "include: ${forward_conf}" + fi +} + +# +# Replace one file with another, making a backup copy of the first, +# but only if the new file is different from the old. +# +replace() { + local file="$1" + local newfile="$2" + if [ ! -f "${file}" ] ; then + echo "${file} created" + mv "${newfile}" "${file}" + elif ! cmp -s "${file}" "${newfile}" ; then + local oldfile="${file}.${bkext}" + echo "original ${file} saved as ${oldfile}" + mv "${file}" "${oldfile}" + mv "${newfile}" "${file}" + else + echo "${file} not modified" + rm "${newfile}" + fi +} + +# +# Print usage message and exit +# +usage() { + exec >&2 + echo "usage: $self [options] [forwarder ...]" + echo "options:" + echo " -n do not start unbound" + echo " -a path full path to trust anchor file" + echo " -c path full path to unbound configuration" + echo " -f path full path to forwarding configuration" + echo " -p path full path to pid file" + echo " -R path full path to resolvconf.conf" + echo " -r path full path to resolv.conf" + echo " -s service name of unbound service" + echo " -u user user to run unbound as" + echo " -w path full path to working directory" + exit 1 +} + +# +# Main +# +main() { + umask 022 + + # + # Parse and validate command-line options + # + while getopts "a:c:f:np:R:r:s:u:w:" option ; do + case $option in + a) + anchor="$OPTARG" + ;; + c) + unbound_conf="$OPTARG" + ;; + f) + forward_conf="$OPTARG" + ;; + n) + start_unbound="no" + ;; + p) + pidfile="$OPTARG" + ;; + R) + resolvconf_conf="$OPTARG" + ;; + r) + resolv_conf="$OPTARG" + ;; + s) + service="$OPTARG" + ;; + u) + user="$OPTARG" + ;; + w) + workdir="$OPTARG" + ;; + *) + usage + ;; + esac + done + shift $((OPTIND-1)) + set_defaults + + # + # Get the list of forwarders, either from the command line or + # from resolv.conf. + # + forwarders="$@" + if [ -z "$forwarders" ] ; then + echo "Extracting forwarders from ${resolv_conf}." + forwarders=$(get_nameservers <"${resolv_conf}") + fi + + # + # Generate forward.conf. + # + if [ -z "${forwarders}" ] ; then + echo -n "No forwarders found in ${resolv_conf##*/}, " + if [ -f "${forward_conf}" ] ; then + echo "using existing ${forward_conf##*/}." + else + echo "unbound will recurse." + fi + else + local tmp_forward_conf=$(mktemp -u "${forward_conf}.XXXXX") + gen_forward_conf ${forwarders} >"${tmp_forward_conf}" + replace "${forward_conf}" "${tmp_forward_conf}" + fi + + # + # Generate unbound.conf. + # + local tmp_unbound_conf=$(mktemp -u "${unbound_conf}.XXXXX") + set_chrootdir + gen_unbound_conf >"${tmp_unbound_conf}" + replace "${unbound_conf}" "${tmp_unbound_conf}" + + # + # Start unbound, unless requested not to. Stop immediately if + # it is not enabled so we don't end up with a resolv.conf that + # points into nothingness. We could "onestart" it, but it + # wouldn't stick. + # + if [ "${start_unbound}" = "no" ] ; then + # skip + elif ! service "${service}" enabled ; then + echo "Please enable $service in rc.conf(5) and try again." + return 1 + elif ! service "${service}" restart ; then + echo "Failed to start $service." + return 1 + fi + + # + # Rewrite resolvconf.conf so resolvconf updates forward.conf + # instead of resolv.conf. + # + local tmp_resolvconf_conf=$(mktemp -u "${resolvconf_conf}.XXXXX") + gen_resolvconf_conf >"${tmp_resolvconf_conf}" + replace "${resolvconf_conf}" "${tmp_resolvconf_conf}" + + # + # Finally, rewrite resolv.conf. + # + local tmp_resolv_conf=$(mktemp -u "${resolv_conf}.XXXXX") + gen_resolv_conf <"${resolv_conf}" >"${tmp_resolv_conf}" + replace "${resolv_conf}" "${tmp_resolv_conf}" +} + +main "$@" From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 06:40:05 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id D154411C; Mon, 23 Sep 2013 06:40:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8EAFD2242; Mon, 23 Sep 2013 06:40:05 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::d0ae:d672:86a8:19c1] (unknown [IPv6:2001:7b8:3a7:0:d0ae:d672:86a8:19c1]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9A70A5C44; Mon, 23 Sep 2013 08:40:02 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_0B7B53B3-9FA8-404A-B244-1A8D476F8276"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255804 - in head/contrib/llvm/lib: CodeGen/SelectionDAG Target/AArch64 Target/ARM Target/Hexagon Target/MSP430 Target/Mips Target/NVPTX Target/PowerPC Target/R600 Target/Sparc Target/S... From: Dimitry Andric In-Reply-To: <523F891F.6010401@FreeBSD.org> Date: Mon, 23 Sep 2013 08:39:56 +0200 Message-Id: <925ED02E-E2DF-4BC9-91EC-47E20353834F@FreeBSD.org> References: <201309222203.r8MM3UjJ006580@svn.freebsd.org> <523F891F.6010401@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.1510) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 06:40:05 -0000 --Apple-Mail=_0B7B53B3-9FA8-404A-B244-1A8D476F8276 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=iso-8859-1 On Sep 23, 2013, at 02:19, Bryan Drewery wrote: > On 9/22/2013 5:03 PM, Dimitry Andric wrote: >> Author: dim >> Date: Sun Sep 22 22:03:30 2013 >> New Revision: 255804 >> URL: http://svnweb.freebsd.org/changeset/base/255804 >> >> Log: >> Pull in r191165 from upstream llvm trunk: >> >> ISelDAG: spot chain cycles involving MachineNodes >> >> Previously, the DAGISel function WalkChainUsers was spotting that it >> had entered already-selected territory by whether a node was a >> MachineNode (amongst other things). Since it's fairly common practice >> to insert MachineNodes during ISelLowering, this was not the correct >> check. >> >> Looking around, it seems that other nodes get their NodeId set to -1 >> upon selection, so this makes sure the same thing happens to all >> MachineNodes and uses that characteristic to determine whether we >> should stop looking for a loop during selection. >> >> This should fix PR15840. > > 15840 is for x11-fonts/ucs-fixed. Did you put the wrong one? No, this is a quote from the upstream commit message, which is referring to http://llvm.org/PR15840 :-) -Dimitry --Apple-Mail=_0B7B53B3-9FA8-404A-B244-1A8D476F8276 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.20 (Darwin) iEYEARECAAYFAlI/4kEACgkQsF6jCi4glqPI4gCgiPG4ELjTo9cv7HKubLz8IQVZ DTIAmwf1XJ6sMzpZxAp+TjYk9zgBj6b8 =072r -----END PGP SIGNATURE----- --Apple-Mail=_0B7B53B3-9FA8-404A-B244-1A8D476F8276-- From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 07:15:57 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 278E0E59; Mon, 23 Sep 2013 07:15:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A60832417; Mon, 23 Sep 2013 07:15:55 +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 KAA07670; Mon, 23 Sep 2013 10:15:47 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VO0N1-000K0v-IP; Mon, 23 Sep 2013 10:15:47 +0300 Message-ID: <523FEA6B.6020402@FreeBSD.org> Date: Mon, 23 Sep 2013 10:14:51 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Davide Italiano , Xin LI Subject: Re: svn commit: r255437 - in head: cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/... References: <201309100146.r8A1kmri091170@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 07:15:57 -0000 on 10/09/2013 15:03 Davide Italiano said the following: > The Illumos cv_timedwait_hires() doesn't use 'res' argument so if you > want to be consistent with their behaviour you should pass '0' as > precision argument to cv_timedwait_sbt(). As far as I can see, illumos does use the resolution. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 10:36:03 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id BF2411B9; Mon, 23 Sep 2013 10:36:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD0B32F0B; Mon, 23 Sep 2013 10:36: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 r8NAa3FH017730; Mon, 23 Sep 2013 10:36:03 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NAa3C3017729; Mon, 23 Sep 2013 10:36:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309231036.r8NAa3C3017729@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Sep 2013 10:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255812 - head/sys/dev/iscsi_initiator X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 10:36:03 -0000 Author: trasz Date: Mon Sep 23 10:36:03 2013 New Revision: 255812 URL: http://svnweb.freebsd.org/changeset/base/255812 Log: Prevent "lock (iscsi) sx does not match earlier (sleep mutex) lock" panic triggered by "kldload iscsi_initiator; kldunload iscsi_initiator; kldload iscsi". Approved by: re (marius) Modified: head/sys/dev/iscsi_initiator/iscsi.c Modified: head/sys/dev/iscsi_initiator/iscsi.c ============================================================================== --- head/sys/dev/iscsi_initiator/iscsi.c Mon Sep 23 07:53:58 2013 (r255811) +++ head/sys/dev/iscsi_initiator/iscsi.c Mon Sep 23 10:36:03 2013 (r255812) @@ -717,7 +717,7 @@ iscsi_start(void) isc = malloc(sizeof(struct isc_softc), M_ISCSI, M_ZERO|M_WAITOK); isc->dev = make_dev(&iscsi_cdevsw, max_sessions, UID_ROOT, GID_WHEEL, 0600, "iscsi"); isc->dev->si_drv1 = isc; - mtx_init(&isc->isc_mtx, "iscsi", NULL, MTX_DEF); + mtx_init(&isc->isc_mtx, "iscsi-isc", NULL, MTX_DEF); TAILQ_INIT(&isc->isc_sess); /* From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 11:41:30 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 9EA328F4; Mon, 23 Sep 2013 11:41:30 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vc0-x231.google.com (mail-vc0-x231.google.com [IPv6:2607:f8b0:400c:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FA06255A; Mon, 23 Sep 2013 11:41:29 +0000 (UTC) Received: by mail-vc0-f177.google.com with SMTP id hv10so2024839vcb.36 for ; Mon, 23 Sep 2013 04:41:29 -0700 (PDT) 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=XIKKrqhATFr/D2j9yWNfJ+eDOpr16CtGIfG6AkNf9pY=; b=Djhzxyexj3FIX5ttmRHfNRvy4nkKEE5m0xOtMzE6oH7Lt17ZIo+BsSEJV9md6pzAIB Uy8WufE4VkytEXguBwDarLPTWl6pkR8hXR6Fm6qKfMv9KfIqQ0un2dlWwiafGW8fVKhk FHM9U4WUuWyTdaeIDt3CjgujCUWzRpvESn57emGaf5/5zjML++A961CJnQdTrjntm1rv +ayWJvkphnZqzcWputxqcyPdCDQDv1UtJr1ttYeafuYNN4nx+OMxxdXg60mHaFgUDNx+ vL/dfyo78TRBMJaTF5YtGHurPVmxPuVnRbcB6d1epRHL29ZsWoAZwLiE2w9CnHaL/qlt ST7w== MIME-Version: 1.0 X-Received: by 10.220.169.203 with SMTP id a11mr231699vcz.26.1379936489084; Mon, 23 Sep 2013 04:41:29 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Mon, 23 Sep 2013 04:41:29 -0700 (PDT) In-Reply-To: <523FEA6B.6020402@FreeBSD.org> References: <201309100146.r8A1kmri091170@svn.freebsd.org> <523FEA6B.6020402@FreeBSD.org> Date: Mon, 23 Sep 2013 13:41:29 +0200 X-Google-Sender-Auth: d5563D4OnQ0gJpoEMWEWHxfz5XQ Message-ID: Subject: Re: svn commit: r255437 - in head: cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/... From: Davide Italiano To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 11:41:30 -0000 On Mon, Sep 23, 2013 at 9:14 AM, Andriy Gapon wrote: > on 10/09/2013 15:03 Davide Italiano said the following: >> The Illumos cv_timedwait_hires() doesn't use 'res' argument so if you >> want to be consistent with their behaviour you should pass '0' as >> precision argument to cv_timedwait_sbt(). > > As far as I can see, illumos does use the resolution. > > -- > Andriy Gapon Hmm, it looks like I was looking at the wrong version of cv_timedwait_sbt() (the one in lib/libzpool/common/kernel.c), thanks for noticing. That said, I'm not still sure there's an 1:1 mapping between our precision concept and their (but I might be wrong here), and I think gethrestime is not suitable for the amount of precision required. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 11:59:34 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 1E556216; Mon, 23 Sep 2013 11:59:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 972FA2640; Mon, 23 Sep 2013 11:59:32 +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 OAA12226; Mon, 23 Sep 2013 14:59:30 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VO4na-000KIy-Fa; Mon, 23 Sep 2013 14:59:30 +0300 Message-ID: <52402CEA.1090805@FreeBSD.org> Date: Mon, 23 Sep 2013 14:58:34 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Davide Italiano Subject: Re: svn commit: r255437 - in head: cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/... References: <201309100146.r8A1kmri091170@svn.freebsd.org> <523FEA6B.6020402@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 11:59:34 -0000 on 23/09/2013 14:41 Davide Italiano said the following: > I think gethrestime is not suitable for the amount of precision > required I agree on this. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 13:16:22 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id B5E3323F; Mon, 23 Sep 2013 13:16:22 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 939F12BC1; Mon, 23 Sep 2013 13:16: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 r8NDGMtE010402; Mon, 23 Sep 2013 13:16:22 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NDGMfe010395; Mon, 23 Sep 2013 13:16:22 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309231316.r8NDGMfe010395@svn.freebsd.org> From: David Chisnall Date: Mon, 23 Sep 2013 13:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255815 - head/contrib/libcxxrt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 13:16:22 -0000 Author: theraven Date: Mon Sep 23 13:16:21 2013 New Revision: 255815 URL: http://svnweb.freebsd.org/changeset/base/255815 Log: Import a new libcxxrt. This fixes some potential crashing in the demangler. Approved by: re (gjb) MFC after: 1 week Modified: head/contrib/libcxxrt/libelftc_dem_gnu3.c head/contrib/libcxxrt/typeinfo.cc head/contrib/libcxxrt/unwind-itanium.h Modified: head/contrib/libcxxrt/libelftc_dem_gnu3.c ============================================================================== --- head/contrib/libcxxrt/libelftc_dem_gnu3.c Mon Sep 23 11:36:38 2013 (r255814) +++ head/contrib/libcxxrt/libelftc_dem_gnu3.c Mon Sep 23 13:16:21 2013 (r255815) @@ -405,6 +405,7 @@ static int cpp_demangle_read_expression_ const char *, size_t, const char *, size_t); static int cpp_demangle_read_function(struct cpp_demangle_data *, int *, struct vector_type_qualifier *); +static int cpp_demangle_local_source_name(struct cpp_demangle_data *ddata); static int cpp_demangle_read_local_name(struct cpp_demangle_data *); static int cpp_demangle_read_name(struct cpp_demangle_data *); static int cpp_demangle_read_nested_name(struct cpp_demangle_data *); @@ -453,13 +454,22 @@ __cxa_demangle_gnu3(const char *org) struct cpp_demangle_data ddata; ssize_t org_len; unsigned int limit; - char *rtn; + char *rtn = NULL; if (org == NULL) return (NULL); + org_len = strlen(org); + if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { + if ((rtn = malloc(org_len + 19)) == NULL) + return (NULL); + snprintf(rtn, org_len + 19, + "global constructors keyed to %s", org + 11); + return (rtn); + } + // Try demangling as a type for short encodings - if (((org_len = strlen(org)) < 2) || (org[0] != '_' || org[1] != 'Z' )) { + if ((org_len < 2) || (org[0] != '_' || org[1] != 'Z' )) { if (!cpp_demangle_data_init(&ddata, org)) return (NULL); if (!cpp_demangle_read_type(&ddata, 0)) @@ -467,13 +477,6 @@ __cxa_demangle_gnu3(const char *org) rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); goto clean; } - if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { - if ((rtn = malloc(org_len + 19)) == NULL) - return (NULL); - snprintf(rtn, org_len + 19, - "global constructors keyed to %s", org + 11); - return (rtn); - } if (!cpp_demangle_data_init(&ddata, org + 2)) @@ -604,13 +607,12 @@ cpp_demangle_push_fp(struct cpp_demangle return (0); rtn = 0; - if ((len = strlen(f)) > 0 && - cpp_demangle_push_str(ddata, f, len)) - rtn = 1; + if ((len = strlen(f)) > 0) + rtn = cpp_demangle_push_str(ddata, f, len); free(f); - return (0); + return (rtn); } static int @@ -655,6 +657,7 @@ cpp_demangle_push_subst_v(struct cpp_dem return (0); rtn = cpp_demangle_push_subst(ddata, str, str_len); + free(str); return (rtn); @@ -1868,9 +1871,18 @@ static int cpp_demangle_read_sname(struct cpp_demangle_data *ddata) { long len; + int err; if (ddata == NULL || cpp_demangle_read_number(ddata, &len) == 0 || - len <= 0 || cpp_demangle_push_str(ddata, ddata->cur, len) == 0) + len <= 0) + return (0); + + if (len == 12 && (memcmp("_GLOBAL__N_1", ddata->cur, 12) == 0)) + err = cpp_demangle_push_str(ddata, "(anonymous namespace)", 21); + else + err = cpp_demangle_push_str(ddata, ddata->cur, len); + + if (err == 0) return (0); assert(ddata->output.size > 0); @@ -2054,7 +2066,7 @@ clean: free(subst_str); vector_str_dest(&v); - return (1); + return (rtn); } static int @@ -2996,6 +3008,40 @@ cpp_demangle_read_uqname(struct cpp_dema if (ELFTC_ISDIGIT(*ddata->cur) != 0) return (cpp_demangle_read_sname(ddata)); + + /* local source name */ + if (*ddata->cur == 'L') + return (cpp_demangle_local_source_name(ddata)); + + return (1); +} + +/* + * Read local source name. + * + * References: + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775 + * http://gcc.gnu.org/viewcvs?view=rev&revision=124467 + */ +static int +cpp_demangle_local_source_name(struct cpp_demangle_data *ddata) +{ + /* L */ + if (ddata == NULL || *ddata->cur != 'L') + return (0); + ++ddata->cur; + + /* source name */ + if (!cpp_demangle_read_sname(ddata)) + return (0); + + /* discriminator */ + if (*ddata->cur == '_') { + ++ddata->cur; + while (ELFTC_ISDIGIT(*ddata->cur) != 0) + ++ddata->cur; + } + return (1); } Modified: head/contrib/libcxxrt/typeinfo.cc ============================================================================== --- head/contrib/libcxxrt/typeinfo.cc Mon Sep 23 11:36:38 2013 (r255814) +++ head/contrib/libcxxrt/typeinfo.cc Mon Sep 23 13:16:21 2013 (r255815) @@ -86,7 +86,18 @@ extern "C" char* __cxa_demangle(const ch if (NULL != demangled) { size_t len = strlen(demangled); - buf = (char*)realloc(buf, len+1); + if (buf == NULL) + { + if (n) + { + *n = len; + } + return demangled; + } + if (*n < len+1) + { + buf = (char*)realloc(buf, len+1); + } if (0 != buf) { memcpy(buf, demangled, len); Modified: head/contrib/libcxxrt/unwind-itanium.h ============================================================================== --- head/contrib/libcxxrt/unwind-itanium.h Mon Sep 23 11:36:38 2013 (r255814) +++ head/contrib/libcxxrt/unwind-itanium.h Mon Sep 23 13:16:21 2013 (r255815) @@ -80,7 +80,7 @@ struct _Unwind_Exception _Unwind_Exception_Cleanup_Fn exception_cleanup; unsigned long private_1; unsigned long private_2; - }; + } ; extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 13:34:01 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id F0CCFCB4 for ; Mon, 23 Sep 2013 13:34:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE87B2D27 for ; Mon, 23 Sep 2013 13:34:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8NDY07k006731 for ; Mon, 23 Sep 2013 13:34:00 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8NDY0ZR006725 for svn-src-head@freebsd.org; Mon, 23 Sep 2013 13:34:00 GMT (envelope-from bdrewery) Received: (qmail 16854 invoked from network); 23 Sep 2013 08:33:59 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 23 Sep 2013 08:33:59 -0500 Message-ID: <52404344.2080002@FreeBSD.org> Date: Mon, 23 Sep 2013 08:33:56 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= Subject: Re: svn commit: r255809 - in head: etc etc/defaults etc/rc.d share/man/man5 share/man/man8 tools/build/mk usr.sbin/unbound usr.sbin/unbound/local-setup References: <201309230436.r8N4apZZ019707@svn.freebsd.org> In-Reply-To: <201309230436.r8N4apZZ019707@svn.freebsd.org> X-Enigmail-Version: 1.5.2 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/mixed; boundary="------------040907060502040105050102" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 13:34:01 -0000 This is a multi-part message in MIME format. --------------040907060502040105050102 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 9/22/2013 11:36 PM, Dag-Erling Smørgrav wrote: > Author: des > Date: Mon Sep 23 04:36:51 2013 > New Revision: 255809 > URL: http://svnweb.freebsd.org/changeset/base/255809 > > Log: > Add a setup script for unbound(8) called local-unbound-setup. It > generates a configuration suitable for running unbound as a caching > forwarding resolver, and configures resolvconf(8) to update unbound's > list of forwarders in addition to /etc/resolv.conf. The initial list > is taken from the existing resolv.conf, which is rewritten to point to > localhost. Alternatively, a list of forwarders can be provided on the > command line. > > To assist this script, add an rc.subr command called "enabled" which > does nothing except return 0 if the service is enabled and 1 if it is > not, without going through the usual checks. We should consider doing > the same for "status", which is currently pointless. > > Add an rc script for unbound, called local_unbound. If there is no > configuration file, the rc script runs local-unbound-setup to generate > one. > > Note that these scripts place the unbound configuration files in > /var/unbound rather than /etc/unbound. This is necessary so that > unbound can reload its configuration while chrooted. We should > probably provide symlinks in /etc. Why not add a link now in etc/Makefile? This would be surprising to not find unbound.conf in /etc/ Named was doing this as well: .if ${MK_BIND_MTREE} != "no" if [ ! -e ${DESTDIR}/etc/namedb ]; then \ ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ fi .endif Should use ${INSTALL_SYMLINK} though so brooks' work is used. Patch attached. -- Regards, Bryan Drewery --------------040907060502040105050102 Content-Type: text/plain; charset=windows-1252; name="etc-unbound.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="etc-unbound.patch" ZGlmZiAtLWdpdCBldGMvTWFrZWZpbGUgZXRjL01ha2VmaWxlCmluZGV4IGFlNTJkNzkuLjVh NmRhYmQgMTAwNjQ0Ci0tLSBldGMvTWFrZWZpbGUKKysrIGV0Yy9NYWtlZmlsZQpAQCAtMjQ3 LDYgKzI0NywxMSBAQCBkaXN0cmlidXRpb246CiAJCWxuIC1zIC4uL3Zhci9uYW1lZC9ldGMv bmFtZWRiICR7REVTVERJUn0vZXRjL25hbWVkYjsgXAogCWZpCiAuZW5kaWYKKy5pZiAke01L X1VOQk9VTkR9ICE9ICJubyIKKwlpZiBbICEgLWUgJHtERVNURElSfS9ldGMvdW5ib3VuZCBd OyB0aGVuIFwKKwkJJHtJTlNUQUxMX1NZTUxJTkt9IC4uL3Zhci91bmJvdW5kICR7REVTVERJ Un0vZXRjL3VuYm91bmQ7IFwKKwlmaQorLmVuZGlmCiAuaWYgJHtNS19CSU5EX0VUQ30gIT0g Im5vIgogCSR7XytffWNkICR7LkNVUkRJUn0vbmFtZWRiOyAke01BS0V9IGluc3RhbGwKIC5l bmRpZgo= --------------040907060502040105050102-- From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 13:49:18 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 17809545; Mon, 23 Sep 2013 13:49:18 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DDC432E8C; Mon, 23 Sep 2013 13:49:17 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r8NDnH5g013825; Mon, 23 Sep 2013 13:49:17 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.123] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id ddq8mrjhiaqukz2z5bj7hs25ia; Mon, 23 Sep 2013 13:49:17 +0000 (UTC) (envelope-from tim@kientzle.com) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255775 - head/include From: Tim Kientzle In-Reply-To: <201309212236.r8LMa7mB019988@svn.freebsd.org> Date: Mon, 23 Sep 2013 06:49:16 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <46908E9F-A9B3-4ADF-A5A4-C77F5A479E65@kientzle.com> References: <201309212236.r8LMa7mB019988@svn.freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1510) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 13:49:18 -0000 This breaks the build in the peculiar case where you have a git checkout of some other project, then a FreeBSD SVN checkout inside of that: Project/.git Project/src/ -- FreeBSD source tree. For some reason newvers.sh is now looking one level too far up, so it's seeing the dir containing the source tree instead of the root of the source tree. This may be related to the use of '.' to run newvers.sh combined with newvers.sh using $(basename $0) to determine the script dir, but I haven't dug through in detail yet. Tim On Sep 21, 2013, at 3:36 PM, Ian Lepore wrote: > Author: ian > Date: Sat Sep 21 22:36:07 2013 > New Revision: 255775 > URL: http://svnweb.freebsd.org/changeset/base/255775 >=20 > Log: > Create a separate script to generate osreldate.h rather than sourcing > newvers.sh into a temporary subshell with inline make rules. >=20 > Using a separate script fixes a variety of problems, including = establishing > the correct dependencies in the makefiles. It also eliminates a = problem > with the way newvers.sh uses `realpath $0`, because $0 expands = differently > within a script sourced into a rule in a makefile depending on the = version > of make and of /bin/sh being used. The latter can cause build = breakage in a > cross-build environment, and can also make it difficult to compile = 10.0 on > older pre-10.0 systems. >=20 > PR: 160646 174422 > Submitted by: Garrett Cooper > Approved by: re (gjb) > MFC after: 2 weeks >=20 > Added: > head/include/mk-osreldate.sh (contents, props changed) > Modified: > head/include/Makefile >=20 > Modified: head/include/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/include/Makefile Sat Sep 21 22:24:10 2013 = (r255774) > +++ head/include/Makefile Sat Sep 21 22:36:07 2013 = (r255775) > @@ -104,19 +104,16 @@ SHARED?=3D copies >=20 > INCS+=3D osreldate.h >=20 > -osreldate.h: ${.CURDIR}/../sys/conf/newvers.sh = ${.CURDIR}/../sys/sys/param.h \ > - ${.CURDIR}/Makefile > - @${ECHO} creating osreldate.h from newvers.sh > - @MAKE=3D${MAKE}; \ > - PARAMFILE=3D${.CURDIR}/../sys/sys/param.h; \ > - . ${.CURDIR}/../sys/conf/newvers.sh; \ > - echo "$$COPYRIGHT" > osreldate.h; \ > - echo "#ifdef _KERNEL" >> osreldate.h; \ > - echo "#error \" cannot be used in the kernel, use = \"" >> osreldate.h; \ > - echo "#else" >> osreldate.h; \ > - echo "#undef __FreeBSD_version" >> osreldate.h; \ > - echo "#define __FreeBSD_version $$RELDATE" >> osreldate.h; \ > - echo "#endif" >> osreldate.h > +NEWVERS_SH=3D ${.CURDIR}/../sys/conf/newvers.sh > +PARAM_H=3D ${.CURDIR}/../sys/sys/param.h > +MK_OSRELDATE_SH=3D ${.CURDIR}/mk-osreldate.sh > + > +osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} > + env ECHO=3D"${ECHO}" \ > + MAKE=3D"${MAKE}" \ > + NEWVERS_SH=3D${NEWVERS_SH} \ > + PARAM_H=3D${PARAM_H} \ > + ${MK_OSRELDATE_SH} >=20 > .for i in ${LHDRS} > INCSLINKS+=3D sys/$i ${INCLUDEDIR}/$i >=20 > Added: head/include/mk-osreldate.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 > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/include/mk-osreldate.sh Sat Sep 21 22:36:07 2013 = (r255775) > @@ -0,0 +1,49 @@ > +#!/bin/sh - > +# Copyright (c) 2013 Garrett Cooper > +# 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$ > + > +set -e > + > +CURDIR=3D$(pwd) > +ECHO=3D${ECHO:=3Decho} > + > +tmpfile=3D$(mktemp osreldate.XXXXXXXX) > +trap "rm -f $tmpfile" EXIT > + > +${ECHO} creating osreldate.h from newvers.sh > + > +export PARAMFILE=3D"${PARAM_H:=3D$CURDIR/../sys/sys/param.h}" > +. "${NEWVERS_SH:=3D$CURDIR/../sys/conf/newvers.sh}" > +cat > $tmpfile < +$COPYRIGHT > +#ifdef _KERNEL > +#error " cannot be used in the kernel, use = " > +#else > +#undef __FreeBSD_version > +#define __FreeBSD_version $RELDATE > +#endif > +EOF > +mv $tmpfile osreldate.h From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 14:00:19 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 27EE3ABF; Mon, 23 Sep 2013 14:00:19 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15A3E2F46; Mon, 23 Sep 2013 14:00: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 r8NE0IX4035181; Mon, 23 Sep 2013 14:00:18 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NE0IsY035179; Mon, 23 Sep 2013 14:00:18 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201309231400.r8NE0IsY035179@svn.freebsd.org> From: Luiz Otavio O Souza Date: Mon, 23 Sep 2013 14:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255816 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 14:00:19 -0000 Author: loos Date: Mon Sep 23 14:00:18 2013 New Revision: 255816 URL: http://svnweb.freebsd.org/changeset/base/255816 Log: Fix DELAY() on RPi, the wrong math was making it take twice it should. Reported by: Alexander Approved by: adrian (mentor) Approved by: re (gjb) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Mon Sep 23 13:16:21 2013 (r255815) +++ head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Mon Sep 23 14:00:18 2013 (r255816) @@ -296,7 +296,7 @@ DELAY(int usec) } /* Get the number of times to count */ - counts = usec * ((bcm_systimer_tc.tc_frequency / 1000000) + 1); + counts = usec * (bcm_systimer_tc.tc_frequency / 1000000) + 1; first = bcm_systimer_tc_read_4(SYSTIMER_CLO); From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 14:18:35 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 8DA53232; Mon, 23 Sep 2013 14:18:35 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7887220BC; Mon, 23 Sep 2013 14:18: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 r8NEIZbX044492; Mon, 23 Sep 2013 14:18:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NEIZjP044490; Mon, 23 Sep 2013 14:18:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309231418.r8NEIZjP044490@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 23 Sep 2013 14:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255817 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 14:18:35 -0000 Author: nwhitehorn Date: Mon Sep 23 14:18:34 2013 New Revision: 255817 URL: http://svnweb.freebsd.org/changeset/base/255817 Log: Add installer support for CHRP/PAPR PowerPC systems that use MBR+BSD formatting, like x86, but with an additional MBR slice containing a raw boot partition. Approved by: re (gjb) Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Mon Sep 23 14:00:18 2013 (r255816) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Mon Sep 23 14:18:34 2013 (r255817) @@ -954,7 +954,8 @@ addpartform: } /* If there isn't one, and we need one, ask */ - if (strcmp(items[2].text, "/") == 0 && bootpart_size(scheme) > 0 && + if ((strcmp(items[0].text, "freebsd") == 0 || + strcmp(items[2].text, "/") == 0) && bootpart_size(scheme) > 0 && pp == NULL) { if (interactive) choice = dialog_yesno("Boot Partition", Modified: head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Mon Sep 23 14:00:18 2013 (r255816) +++ head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Mon Sep 23 14:18:34 2013 (r255817) @@ -59,7 +59,8 @@ is_scheme_bootable(const char *part_type return (1); if (strcmp(platform, "ps3") == 0 && strcmp(part_type, "GPT") == 0) return (1); - if (strcmp(platform, "chrp") == 0 && strcmp(part_type, "MBR") == 0) + if (strcmp(platform, "chrp") == 0 && + (strcmp(part_type, "MBR") == 0 || strcmp(part_type, "BSD") == 0)) return (1); return (0); From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 14:38:41 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id AD8AB916; Mon, 23 Sep 2013 14:38:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D45C2243; Mon, 23 Sep 2013 14:38:41 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VO7Hc-0009we-8Z; Mon, 23 Sep 2013 14:38:40 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r8NEcbRf023571; Mon, 23 Sep 2013 08:38:37 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/CWHv8qsylPo/qO8AUxETc Subject: Re: svn commit: r255775 - head/include From: Ian Lepore To: Tim Kientzle In-Reply-To: <46908E9F-A9B3-4ADF-A5A4-C77F5A479E65@kientzle.com> References: <201309212236.r8LMa7mB019988@svn.freebsd.org> <46908E9F-A9B3-4ADF-A5A4-C77F5A479E65@kientzle.com> Content-Type: multipart/mixed; boundary="=-BcCy0TL32pUsyEGsMP7N" Date: Mon, 23 Sep 2013 08:38:37 -0600 Message-ID: <1379947117.1197.137.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 14:38:41 -0000 --=-BcCy0TL32pUsyEGsMP7N Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Yeah, I think the moral of this neverending story is that relying on $0 for pathnames is a Bad Idea. Apparently in addition to the patch from PR 160646, we still need something like the patch I proposed in PR 174422. I'll attach an updated version of that. I've got a test build running now, I'll see about getting it commited if it fixes the problem you're seeing. -- Ian On Mon, 2013-09-23 at 06:49 -0700, Tim Kientzle wrote: > This breaks the build in the peculiar case where you have > a git checkout of some other project, then a FreeBSD SVN > checkout inside of that: > > Project/.git > Project/src/ -- FreeBSD source tree. > > For some reason newvers.sh is now looking one level too far > up, so it's seeing the dir containing the source tree instead of the > root of the source tree. > > This may be related to the use of '.' to run newvers.sh > combined with newvers.sh using $(basename $0) to determine > the script dir, but I haven't dug through in detail yet. > > Tim > > > > On Sep 21, 2013, at 3:36 PM, Ian Lepore wrote: > > > Author: ian > > Date: Sat Sep 21 22:36:07 2013 > > New Revision: 255775 > > URL: http://svnweb.freebsd.org/changeset/base/255775 > > > > Log: > > Create a separate script to generate osreldate.h rather than sourcing > > newvers.sh into a temporary subshell with inline make rules. > > > > Using a separate script fixes a variety of problems, including establishing > > the correct dependencies in the makefiles. It also eliminates a problem > > with the way newvers.sh uses `realpath $0`, because $0 expands differently > > within a script sourced into a rule in a makefile depending on the version > > of make and of /bin/sh being used. The latter can cause build breakage in a > > cross-build environment, and can also make it difficult to compile 10.0 on > > older pre-10.0 systems. > > > > PR: 160646 174422 > > Submitted by: Garrett Cooper > > Approved by: re (gjb) > > MFC after: 2 weeks > > > > Added: > > head/include/mk-osreldate.sh (contents, props changed) > > Modified: > > head/include/Makefile > > > > Modified: head/include/Makefile > > ============================================================================== > > --- head/include/Makefile Sat Sep 21 22:24:10 2013 (r255774) > > +++ head/include/Makefile Sat Sep 21 22:36:07 2013 (r255775) > > @@ -104,19 +104,16 @@ SHARED?= copies > > > > INCS+= osreldate.h > > > > -osreldate.h: ${.CURDIR}/../sys/conf/newvers.sh ${.CURDIR}/../sys/sys/param.h \ > > - ${.CURDIR}/Makefile > > - @${ECHO} creating osreldate.h from newvers.sh > > - @MAKE=${MAKE}; \ > > - PARAMFILE=${.CURDIR}/../sys/sys/param.h; \ > > - . ${.CURDIR}/../sys/conf/newvers.sh; \ > > - echo "$$COPYRIGHT" > osreldate.h; \ > > - echo "#ifdef _KERNEL" >> osreldate.h; \ > > - echo "#error \" cannot be used in the kernel, use \"" >> osreldate.h; \ > > - echo "#else" >> osreldate.h; \ > > - echo "#undef __FreeBSD_version" >> osreldate.h; \ > > - echo "#define __FreeBSD_version $$RELDATE" >> osreldate.h; \ > > - echo "#endif" >> osreldate.h > > +NEWVERS_SH= ${.CURDIR}/../sys/conf/newvers.sh > > +PARAM_H= ${.CURDIR}/../sys/sys/param.h > > +MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh > > + > > +osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} > > + env ECHO="${ECHO}" \ > > + MAKE="${MAKE}" \ > > + NEWVERS_SH=${NEWVERS_SH} \ > > + PARAM_H=${PARAM_H} \ > > + ${MK_OSRELDATE_SH} > > > > .for i in ${LHDRS} > > INCSLINKS+= sys/$i ${INCLUDEDIR}/$i > > > > Added: head/include/mk-osreldate.sh > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/include/mk-osreldate.sh Sat Sep 21 22:36:07 2013 (r255775) > > @@ -0,0 +1,49 @@ > > +#!/bin/sh - > > +# Copyright (c) 2013 Garrett Cooper > > +# 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$ > > + > > +set -e > > + > > +CURDIR=$(pwd) > > +ECHO=${ECHO:=echo} > > + > > +tmpfile=$(mktemp osreldate.XXXXXXXX) > > +trap "rm -f $tmpfile" EXIT > > + > > +${ECHO} creating osreldate.h from newvers.sh > > + > > +export PARAMFILE="${PARAM_H:=$CURDIR/../sys/sys/param.h}" > > +. "${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh}" > > +cat > $tmpfile < > +$COPYRIGHT > > +#ifdef _KERNEL > > +#error " cannot be used in the kernel, use " > > +#else > > +#undef __FreeBSD_version > > +#define __FreeBSD_version $RELDATE > > +#endif > > +EOF > > +mv $tmpfile osreldate.h > --=-BcCy0TL32pUsyEGsMP7N Content-Disposition: inline; filename="osreldate_sysdir.diff" Content-Type: text/x-patch; name="osreldate_sysdir.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: include/Makefile =================================================================== --- include/Makefile (revision 255808) +++ include/Makefile (working copy) @@ -104,8 +104,9 @@ SHARED?= copies INCS+= osreldate.h -NEWVERS_SH= ${.CURDIR}/../sys/conf/newvers.sh -PARAM_H= ${.CURDIR}/../sys/sys/param.h +SYSDIR= ${.CURDIR}/../sys +NEWVERS_SH= ${SYSDIR}/conf/newvers.sh +PARAM_H= ${SYSDIR}/sys/param.h MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} @@ -113,6 +114,7 @@ osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_ MAKE="${MAKE}" \ NEWVERS_SH=${NEWVERS_SH} \ PARAM_H=${PARAM_H} \ + SYSDIR=${SYSDIR} \ sh ${MK_OSRELDATE_SH} .for i in ${LHDRS} Index: sys/conf/newvers.sh =================================================================== --- sys/conf/newvers.sh (revision 255808) +++ sys/conf/newvers.sh (working copy) @@ -38,8 +38,11 @@ if [ "X${BRANCH_OVERRIDE}" != "X" ]; then fi RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" -SYSDIR=$(dirname $0)/.. +if [ "X${SYSDIR}" = "X" ]; then + SYSDIR=$(dirname $0)/.. +fi + if [ "X${PARAMFILE}" != "X" ]; then RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ ${PARAMFILE}) --=-BcCy0TL32pUsyEGsMP7N-- From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 15:06:06 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 8E1B492; Mon, 23 Sep 2013 15:06:06 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4944923D8; Mon, 23 Sep 2013 15:06:06 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 681556D9F; Mon, 23 Sep 2013 15:06:05 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 4FA06625; Mon, 23 Sep 2013 17:05:37 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bryan Drewery Subject: Re: svn commit: r255809 - in head: etc etc/defaults etc/rc.d share/man/man5 share/man/man8 tools/build/mk usr.sbin/unbound usr.sbin/unbound/local-setup References: <201309230436.r8N4apZZ019707@svn.freebsd.org> <52404344.2080002@FreeBSD.org> Date: Mon, 23 Sep 2013 17:05:37 +0200 In-Reply-To: <52404344.2080002@FreeBSD.org> (Bryan Drewery's message of "Mon, 23 Sep 2013 08:33:56 -0500") Message-ID: <86r4cfwpby.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 15:06:06 -0000 Bryan Drewery writes: > Why not add a link now in etc/Makefile? This would be surprising to not > find unbound.conf in /etc/ Yep, I'm going to do that, but I need to figure out how not to break installworld for people who already have /etc/unbound (since it's currently in BSD.root.mtree). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 16:47:54 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 38FA02A7; Mon, 23 Sep 2013 16:47:54 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 16C452A4E; Mon, 23 Sep 2013 16:47: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 r8NGlrPr025953; Mon, 23 Sep 2013 16:47:53 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NGlrZa025949; Mon, 23 Sep 2013 16:47:53 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201309231647.r8NGlrZa025949@svn.freebsd.org> From: Devin Teske Date: Mon, 23 Sep 2013 16:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255818 - in head/usr.sbin/bsdconfig: examples share/media X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 16:47:54 -0000 Author: dteske Date: Mon Sep 23 16:47:52 2013 New Revision: 255818 URL: http://svnweb.freebsd.org/changeset/base/255818 Log: Fix a bug in HTTP checking/fetching. Fix a bug in HTTP checking/fetching. Add Main Site to HTTP menu. Add new example script browse_packages_http.sh and move existing example script browse_packages.sh -> browse_packages_ftp.sh Reviewed by: gjb, brd Approved by: re (gjb), clusteradm (brd) MFC after: 3 days Added: head/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh - copied unchanged from r255712, head/usr.sbin/bsdconfig/examples/browse_packages.sh head/usr.sbin/bsdconfig/examples/browse_packages_http.sh (contents, props changed) Deleted: head/usr.sbin/bsdconfig/examples/browse_packages.sh Modified: head/usr.sbin/bsdconfig/examples/Makefile head/usr.sbin/bsdconfig/share/media/http.subr Modified: head/usr.sbin/bsdconfig/examples/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/examples/Makefile Mon Sep 23 14:18:34 2013 (r255817) +++ head/usr.sbin/bsdconfig/examples/Makefile Mon Sep 23 16:47:52 2013 (r255818) @@ -3,7 +3,7 @@ NO_OBJ= FILESDIR= ${SHAREDIR}/examples/bsdconfig -FILES= browse_packages.sh bsdconfigrc +FILES= browse_packages_ftp.sh browse_packages_http.sh bsdconfigrc beforeinstall: mkdir -p ${DESTDIR}${FILESDIR} Copied: head/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh (from r255712, head/usr.sbin/bsdconfig/examples/browse_packages.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh Mon Sep 23 16:47:52 2013 (r255818, copy of r255712, head/usr.sbin/bsdconfig/examples/browse_packages.sh) @@ -0,0 +1,25 @@ +#!/bin/sh +# $FreeBSD$ +# +# This sample downloads the package INDEX file from FTP to /tmp (if it doesn't +# already exist) and then displays the package configuration/management screen +# using the local INDEX file (results in faster browsing of packages from-start +# since the INDEX can be loaded from local media). +# +# NOTE: Packages cannot be installed unless staged to /tmp/packages/All +# +. /usr/share/bsdconfig/script.subr +nonInteractive=1 +TMPDIR=/tmp +if [ ! -e "$TMPDIR/packages/INDEX" ]; then + [ -d "$TMPDIR/packages" ] || mkdir -p "$TMPDIR/packages" || exit 1 + _ftpPath=ftp://ftp.freebsd.org + # For older releases, use ftp://ftp-archive.freebsd.org + mediaSetFTP + mediaOpen + f_show_info "Downloading packages/INDEX from\n %s" "$_ftpPath" + f_device_get media packages/INDEX > $TMPDIR/packages/INDEX +fi +_directoryPath=$TMPDIR +mediaSetDirectory +configPackages Added: head/usr.sbin/bsdconfig/examples/browse_packages_http.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/examples/browse_packages_http.sh Mon Sep 23 16:47:52 2013 (r255818) @@ -0,0 +1,25 @@ +#!/bin/sh +# $FreeBSD$ +# +# This sample downloads the package INDEX file from HTTP to /tmp (if it doesn't +# already exist) and then displays the package configuration/management screen +# using the local INDEX file (results in faster browsing of packages from-start +# since the INDEX can be loaded from local media). +# +# NOTE: Packages cannot be installed unless staged to /tmp/packages/All +# +. /usr/share/bsdconfig/script.subr +nonInteractive=1 +TMPDIR=/tmp +if [ ! -e "$TMPDIR/packages/INDEX" ]; then + [ -d "$TMPDIR/packages" ] || mkdir -p "$TMPDIR/packages" || exit 1 + _httpPath=http://ftp.freebsd.org + # For older releases, use http://ftp-archive.freebsd.org + mediaSetHTTP + mediaOpen + f_show_info "Downloading packages/INDEX from\n %s" "$_httpPath" + f_device_get media packages/INDEX > $TMPDIR/packages/INDEX +fi +_directoryPath=$TMPDIR +mediaSetDirectory +configPackages Modified: head/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/http.subr Mon Sep 23 14:18:34 2013 (r255817) +++ head/usr.sbin/bsdconfig/share/media/http.subr Mon Sep 23 16:47:52 2013 (r255818) @@ -77,7 +77,8 @@ f_dialog_menu_media_http() f_dialog_title_restore local prompt="$msg_please_select_the_site_closest_to_you_or_other" local menu_list=" - 'URL' '$msg_specify_some_other_http_site' + '$msg_main_site' 'ftp.freebsd.org' + 'URL' '$msg_specify_some_other_http_site' " # END-QUOTE local hline="$msg_select_a_site_thats_close" @@ -390,8 +391,12 @@ f_http_check_access() f_show_info "$msg_checking_access_to" "$http_path" local rx + case "$http_path" in + http://*|/*) : valid request ;; + *) http_path="/$http_path" # full URI requests only + esac if ! rx=$( - printf "GET /%s/ HTTP/1.0\r\n\r\n" "${http_path%/}" | + printf "GET %s/ HTTP/1.0\r\n\r\n" "${http_path%/}" | nc -n "$host" "$http_port" ); then f_show_msg "$msg_couldnt_connect_to_server http://%s:%s/" \ @@ -583,8 +588,12 @@ f_media_get_http() local http_path f_getvar $VAR_HTTP_PATH%/ http_path - local url="/$http_path/$file" rx + case "$http_path" in + http://*|/*) : valid request ;; + *) http_path="/$http_path" # full URI requests only + esac + local url="$http_path/$file" rx f_dprintf "sending http request for: %s" "$url" printf "GET %s HTTP/1.0\r\n\r\n" "$url" | nc -n "$host" "$http_port" | ( From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 17:35:23 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 8EDC1D31; Mon, 23 Sep 2013 17:35:23 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7C65F2CF1; Mon, 23 Sep 2013 17:35: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 r8NHZNtt052080; Mon, 23 Sep 2013 17:35:23 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NHZNhd052079; Mon, 23 Sep 2013 17:35:23 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309231735.r8NHZNhd052079@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 23 Sep 2013 17:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255819 - head/usr.sbin/unbound/local-setup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 17:35:23 -0000 Author: des Date: Mon Sep 23 17:35:23 2013 New Revision: 255819 URL: http://svnweb.freebsd.org/changeset/base/255819 Log: Ensure that resolvconf(8) preserves the edns0 setting. Approved by: re (blanket) Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh ============================================================================== --- head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Mon Sep 23 16:47:52 2013 (r255818) +++ head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Mon Sep 23 17:35:23 2013 (r255819) @@ -157,6 +157,7 @@ gen_resolv_conf() { gen_resolvconf_conf() { echo "# Generated by $self" echo "name_servers=\"127.0.0.1\"" + echo "resolv_conf_options=\"edns0\"" echo "unbound_conf=\"${forward_conf}\"" echo "unbound_pid=\"${pidfile}\"" echo "unbound_service=\"${service}\"" From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 17:56:05 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id D73681AF; Mon, 23 Sep 2013 17:56:05 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 92CCB2E20; Mon, 23 Sep 2013 17:56:05 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id B148F6F54; Mon, 23 Sep 2013 17:56:04 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 9C384732; Mon, 23 Sep 2013 19:55:36 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bryan Drewery Subject: Re: svn commit: r255809 - in head: etc etc/defaults etc/rc.d share/man/man5 share/man/man8 tools/build/mk usr.sbin/unbound usr.sbin/unbound/local-setup References: <201309230436.r8N4apZZ019707@svn.freebsd.org> <52404344.2080002@FreeBSD.org> <86r4cfwpby.fsf@nine.des.no> Date: Mon, 23 Sep 2013 19:55:36 +0200 In-Reply-To: <86r4cfwpby.fsf@nine.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8r?= =?utf-8?Q?grav=22's?= message of "Mon, 23 Sep 2013 17:05:37 +0200") Message-ID: <86ioxrjucn.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 17:56:05 -0000 Dag-Erling Sm=C3=B8rgrav writes: > Bryan Drewery writes: > > Why not add a link now in etc/Makefile? This would be surprising to not > > find unbound.conf in /etc/ > Yep, I'm going to do that, but I need to figure out how not to break > installworld for people who already have /etc/unbound (since it's > currently in BSD.root.mtree). To elaborate: my original plan was to have the configuration in /etc/unbound and things like the root anchor and unbound-control keys (which I still haven't hooked up) in /var/unbound, which is why /var/unbound was originally 0750 (it is now 0755). Unfortunately, this doesn't work, because all of this needs to be inside the chroot, and unbound refuses to start unless it is. The only alternative is to not chroot it, which is a questionable decision, to put it mildly. So there's no escaping placing everything either in /etc/unbound or in /var/unbound. I'm not sure which poison I prefer. I also need to change the rcorder so unbound starts much earlier. I should probably just have NETWORKING require local_unbound require netif, and then try to figure out whether local_unbound requires resolv or the other way around, since local_unbound plays reindeer games with resolvconf on first start. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 18:12:25 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id D5F43A2B; Mon, 23 Sep 2013 18:12:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C3C062F53; Mon, 23 Sep 2013 18:12: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 r8NICPKu073077; Mon, 23 Sep 2013 18:12:25 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NICPq5073076; Mon, 23 Sep 2013 18:12:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309231812.r8NICPq5073076@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 23 Sep 2013 18:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255821 - head/usr.sbin/arp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 18:12:25 -0000 Author: glebius Date: Mon Sep 23 18:12:25 2013 New Revision: 255821 URL: http://svnweb.freebsd.org/changeset/base/255821 Log: Fix coredump on 'arp -d'. Submitted by: az Approved by: re (kib) Modified: head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Mon Sep 23 18:12:19 2013 (r255820) +++ head/usr.sbin/arp/arp.c Mon Sep 23 18:12:25 2013 (r255821) @@ -187,8 +187,11 @@ main(int argc, char *argv[]) if (argc != 0) usage(); search(0, nuke_entry); - } else + } else { + if (argc != 1) + usage(); rtn = delete(argv[0]); + } break; case F_FILESET: if (argc != 1) From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 19:54:45 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 40A17B55; Mon, 23 Sep 2013 19:54:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA352514; Mon, 23 Sep 2013 19:54: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 r8NJsiFk027250; Mon, 23 Sep 2013 19:54:44 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NJsixj027245; Mon, 23 Sep 2013 19:54:44 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309231954.r8NJsixj027245@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Sep 2013 19:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255824 - in head/sys: cam/ctl dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 19:54:45 -0000 Author: trasz Date: Mon Sep 23 19:54:44 2013 New Revision: 255824 URL: http://svnweb.freebsd.org/changeset/base/255824 Log: Don't use M_WAITOK when running from context where sleeping is prohibited, such as callout or a geom thread. Approved by: re (marius) Sponsored by: FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/dev/iscsi/iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Sep 23 18:53:48 2013 (r255823) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Sep 23 19:54:44 2013 (r255824) @@ -930,7 +930,11 @@ cfiscsi_callout(void *context) if (cs->cs_timeout < 2) return; - cp = icl_pdu_new_bhs(cs->cs_conn, M_WAITOK); + cp = icl_pdu_new_bhs(cs->cs_conn, M_NOWAIT); + if (cp == NULL) { + CFISCSI_SESSION_WARN(cs, "failed to allocate PDU"); + return; + } bhsni = (struct iscsi_bhs_nop_in *)cp->ip_bhs; bhsni->bhsni_opcode = ISCSI_BHS_OPCODE_NOP_IN; bhsni->bhsni_flags = 0x80; @@ -2245,7 +2249,7 @@ cfiscsi_datamove(union ctl_io *io) struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; size_t copy_len, len, off; const char *addr; - int ctl_sg_count, i; + int ctl_sg_count, error, i; uint32_t target_transfer_tag; bool done; @@ -2298,7 +2302,13 @@ cfiscsi_datamove(union ctl_io *io) KASSERT(i < ctl_sg_count, ("i >= ctl_sg_count")); if (response == NULL) { response = - cfiscsi_pdu_new_response(request, M_WAITOK); + cfiscsi_pdu_new_response(request, M_NOWAIT); + if (response == NULL) { + CFISCSI_SESSION_WARN(cs, "failed to " + "allocate memory; dropping connection"); + cfiscsi_session_terminate(cs); + return; + } bhsdi = (struct iscsi_bhs_data_in *) response->ip_bhs; bhsdi->bhsdi_opcode = @@ -2323,7 +2333,14 @@ cfiscsi_datamove(union ctl_io *io) copy_len = cs->cs_max_data_segment_length - response->ip_data_len; KASSERT(copy_len <= len, ("copy_len > len")); - icl_pdu_append_data(response, addr, copy_len, M_WAITOK); + error = icl_pdu_append_data(response, addr, copy_len, M_NOWAIT); + if (error != 0) { + CFISCSI_SESSION_WARN(cs, "failed to " + "allocate memory; dropping connection"); + icl_pdu_free(response); + cfiscsi_session_terminate(cs); + return; + } addr += copy_len; len -= copy_len; off += copy_len; Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Mon Sep 23 18:53:48 2013 (r255823) +++ head/sys/dev/iscsi/iscsi.c Mon Sep 23 19:54:44 2013 (r255824) @@ -558,7 +558,11 @@ iscsi_callout(void *context) if (is->is_timeout < 2) return; - request = icl_pdu_new_bhs(is->is_conn, M_WAITOK); + request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT); + if (request == NULL) { + ISCSI_SESSION_WARN(is, "failed to allocate PDU"); + return; + } bhsno = (struct iscsi_bhs_nop_out *)request->ip_bhs; bhsno->bhsno_opcode = ISCSI_BHS_OPCODE_NOP_OUT | ISCSI_BHS_OPCODE_IMMEDIATE; From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 20:03:24 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 392C3150; Mon, 23 Sep 2013 20:03:24 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 26D85259A; Mon, 23 Sep 2013 20:03: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 r8NK3OSl033268; Mon, 23 Sep 2013 20:03:24 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NK3O9L033267; Mon, 23 Sep 2013 20:03:24 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309232003.r8NK3O9L033267@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 23 Sep 2013 20:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255825 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 20:03:24 -0000 Author: des Date: Mon Sep 23 20:03:23 2013 New Revision: 255825 URL: http://svnweb.freebsd.org/changeset/base/255825 Log: Move local_unbound up in the rc order. Approved by: re (blanket) Modified: head/etc/rc.d/local_unbound Modified: head/etc/rc.d/local_unbound ============================================================================== --- head/etc/rc.d/local_unbound Mon Sep 23 19:54:44 2013 (r255824) +++ head/etc/rc.d/local_unbound Mon Sep 23 20:03:23 2013 (r255825) @@ -4,7 +4,7 @@ # # PROVIDE: local_unbound -# REQUIRE: SERVERS cleanvar +# REQUIRE: FILESYSTEMS netif resolv # KEYWORD: shutdown . /etc/rc.subr From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 20:06:59 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id EEFF23A5; Mon, 23 Sep 2013 20:06:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DBCED25EE; Mon, 23 Sep 2013 20:06: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 r8NK6xha034100; Mon, 23 Sep 2013 20:06:59 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NK6xrG034099; Mon, 23 Sep 2013 20:06:59 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309232006.r8NK6xrG034099@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 23 Sep 2013 20:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255826 - head/usr.sbin/unbound/local-setup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 20:07:00 -0000 Author: des Date: Mon Sep 23 20:06:59 2013 New Revision: 255826 URL: http://svnweb.freebsd.org/changeset/base/255826 Log: Prevent resolvconf from updating /etc/resolv.conf. As Jakob Schlyter pointed out, having additional nameservers listed in /etc/resolv.conf can break DNSSEC verification by providing a false positive if unbound returns SERVFAIL due to an invalid signature. The downside is that the domain / search path won't get updated either, but we can live with that. Approved by: re (blanket) Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh ============================================================================== --- head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Mon Sep 23 20:03:23 2013 (r255825) +++ head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Mon Sep 23 20:06:59 2013 (r255826) @@ -156,14 +156,12 @@ gen_resolv_conf() { # gen_resolvconf_conf() { echo "# Generated by $self" - echo "name_servers=\"127.0.0.1\"" - echo "resolv_conf_options=\"edns0\"" + echo "resolv_conf=\"/dev/null\" # prevent updating ${resolv_conf}" echo "unbound_conf=\"${forward_conf}\"" echo "unbound_pid=\"${pidfile}\"" echo "unbound_service=\"${service}\"" - # resolvconf(8) likes to restart rather than reload - consider - # forcing its hand? - #echo "unbound_restart=\"service ${service} reload\"" + # resolvconf(8) likes to restart rather than reload + echo "unbound_restart=\"service ${service} reload\"" } # From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 20:14:16 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 92CFD80E; Mon, 23 Sep 2013 20:14:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7FE3C2666; Mon, 23 Sep 2013 20:14: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 r8NKEGrx038806; Mon, 23 Sep 2013 20:14:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NKEGto038804; Mon, 23 Sep 2013 20:14:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309232014.r8NKEGto038804@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 23 Sep 2013 20:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255827 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 20:14:16 -0000 Author: kib Date: Mon Sep 23 20:14:15 2013 New Revision: 255827 URL: http://svnweb.freebsd.org/changeset/base/255827 Log: Free both KVA and backing pages when freeing TSS memory. Reported and tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (marius) Modified: head/sys/amd64/amd64/vm_machdep.c head/sys/i386/i386/vm_machdep.c Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Mon Sep 23 20:06:59 2013 (r255826) +++ head/sys/amd64/amd64/vm_machdep.c Mon Sep 23 20:14:15 2013 (r255827) @@ -341,7 +341,7 @@ cpu_thread_clean(struct thread *td) * Clean TSS/iomap */ if (pcb->pcb_tssp != NULL) { - kva_free((vm_offset_t)pcb->pcb_tssp, + kmem_free(kernel_arena, (vm_offset_t)pcb->pcb_tssp, ctob(IOPAGES + 1)); pcb->pcb_tssp = NULL; } Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Mon Sep 23 20:06:59 2013 (r255826) +++ head/sys/i386/i386/vm_machdep.c Mon Sep 23 20:14:15 2013 (r255827) @@ -367,7 +367,7 @@ cpu_thread_clean(struct thread *td) * XXX do we need to move the TSS off the allocated pages * before freeing them? (not done here) */ - kva_free((vm_offset_t)pcb->pcb_ext, + kmem_free(kernel_arena, (vm_offset_t)pcb->pcb_ext, ctob(IOPAGES + 1)); pcb->pcb_ext = NULL; } From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 20:30:25 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 9B2B25E7; Mon, 23 Sep 2013 20:30:25 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 88A6B27A0; Mon, 23 Sep 2013 20:30: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 r8NKUPWT046835; Mon, 23 Sep 2013 20:30:25 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NKUPes046833; Mon, 23 Sep 2013 20:30:25 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201309232030.r8NKUPes046833@svn.freebsd.org> From: Hiren Panchasara Date: Mon, 23 Sep 2013 20:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255828 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 20:30:25 -0000 Author: hiren Date: Mon Sep 23 20:30:25 2013 New Revision: 255828 URL: http://svnweb.freebsd.org/changeset/base/255828 Log: Correcting EXAMPLES section. Approved by: re (gjb) Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Mon Sep 23 20:14:15 2013 (r255827) +++ head/share/man/man4/netmap.4 Mon Sep 23 20:30:25 2013 (r255828) @@ -28,7 +28,7 @@ .\" $FreeBSD$ .\" $Id: netmap.4 11563 2012-08-02 08:59:12Z luigi $: stable/8/share/man/man4/bpf.4 181694 2008-08-13 17:45:06Z ed $ .\" -.Dd February 27, 2012 +.Dd September 23, 2013 .Dt NETMAP 4 .Os .Sh NAME @@ -267,14 +267,14 @@ The following code implements a traffic #include struct netmap_if *nifp; struct netmap_ring *ring; -struct netmap_request nmr; +struct nmreq nmr; fd = open("/dev/netmap", O_RDWR); bzero(&nmr, sizeof(nmr)); -strcpy(nmr.nm_name, "ix0"); -nmr.nm_version = NETMAP_API; +strcpy(nmr.nr_name, "ix0"); +nmr.nr_version = NETMAP_API; ioctl(fd, NIOCREG, &nmr); -p = mmap(0, nmr.memsize, fd); +p = mmap(0, nmr.nr_memsize, fd); nifp = NETMAP_IF(p, nmr.offset); ring = NETMAP_TXRING(nifp, 0); fds.fd = fd; From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 20:35:57 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 4213E97C; Mon, 23 Sep 2013 20:35:57 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2E2192829; Mon, 23 Sep 2013 20: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 r8NKZvp7050943; Mon, 23 Sep 2013 20:35:57 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NKZts7050929; Mon, 23 Sep 2013 20:35:55 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309232035.r8NKZts7050929@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 23 Sep 2013 20:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255829 - in head: crypto/openssh secure/lib/libssh secure/usr.bin/ssh secure/usr.sbin/sshd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 20:35:57 -0000 Author: des Date: Mon Sep 23 20:35:54 2013 New Revision: 255829 URL: http://svnweb.freebsd.org/changeset/base/255829 Log: Unbreak the WITHOUT_KERBEROS build and try to reduce the odds of a repeat performance by introducing a script that runs configure with and without Kerberos, diffs the result and generates krb5_config.h, which contains the preprocessor macros that need to be defined in the Kerberos case and undefined otherwise. Approved by: re (marius) Added: head/crypto/openssh/freebsd-configure.sh (contents, props changed) head/crypto/openssh/krb5_config.h (contents, props changed) Modified: head/crypto/openssh/FREEBSD-upgrade head/crypto/openssh/config.h head/crypto/openssh/ssh-gss.h head/crypto/openssh/sshd.c head/secure/lib/libssh/Makefile head/secure/usr.bin/ssh/Makefile head/secure/usr.sbin/sshd/Makefile Modified: head/crypto/openssh/FREEBSD-upgrade ============================================================================== --- head/crypto/openssh/FREEBSD-upgrade Mon Sep 23 20:30:25 2013 (r255828) +++ head/crypto/openssh/FREEBSD-upgrade Mon Sep 23 20:35:54 2013 (r255829) @@ -3,7 +3,13 @@ FreeBSD maintainer's guide to OpenSSH-portable ============================================== -[needs rewriting for svn] +XXX +XXX this needs a complete rewrite +XXX svn merge from vendor branch, resolve conflicts manually +XXX (see FREEBSD-tricks for tips on how to reduce conflicts) +XXX run freebsd-configure.sh to generate config.h and krb5_config.h +XXX svn diff Makefile.in to see if the Makefiles need adjusting +XXX 0) Make sure your mail spool has plenty of free space. It'll fill up pretty fast once you're done with this checklist. @@ -116,7 +122,7 @@ B) Re-commit everything on repoman (you This port was brought to you by (in no particular order) DARPA, NAI -Labs, ThinkSec, Nescafé, the Aberlour Glenlivet Distillery Co., +Labs, ThinkSec, Nescafé, the Aberlour Glenlivet Distillery Co., Suzanne Vega, and a Sanford's #69 Deluxe Marker. -- des@FreeBSD.org Modified: head/crypto/openssh/config.h ============================================================================== --- head/crypto/openssh/config.h Mon Sep 23 20:30:25 2013 (r255828) +++ head/crypto/openssh/config.h Mon Sep 23 20:35:54 2013 (r255829) @@ -157,7 +157,7 @@ /* #undef GLOB_HAS_GL_STATV */ /* Define this if you want GSSAPI support in the version 2 protocol */ -#define GSSAPI 1 +/* #undef GSSAPI */ /* Define if you want to use shadow password expire field */ /* #undef HAS_SHADOW_EXPIRE */ @@ -271,7 +271,7 @@ /* Define to 1 if you have the declaration of `GSS_C_NT_HOSTBASED_SERVICE', and to 0 if you don't. */ -#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE 1 +/* #undef HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE */ /* Define to 1 if you have the declaration of `howmany', and to 0 if you don't. */ @@ -535,10 +535,10 @@ /* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */ /* Define to 1 if you have the header file. */ -#define HAVE_GSSAPI_GSSAPI_H 1 +/* #undef HAVE_GSSAPI_GSSAPI_H */ /* Define to 1 if you have the header file. */ -#define HAVE_GSSAPI_GSSAPI_KRB5_H 1 +/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_GSSAPI_H */ @@ -601,13 +601,13 @@ #define HAVE_ISBLANK 1 /* Define to 1 if you have the `krb5_cc_new_unique' function. */ -#define HAVE_KRB5_CC_NEW_UNIQUE 1 +/* #undef HAVE_KRB5_CC_NEW_UNIQUE */ /* Define to 1 if you have the `krb5_free_error_message' function. */ -#define HAVE_KRB5_FREE_ERROR_MESSAGE 1 +/* #undef HAVE_KRB5_FREE_ERROR_MESSAGE */ /* Define to 1 if you have the `krb5_get_error_message' function. */ -#define HAVE_KRB5_GET_ERROR_MESSAGE 1 +/* #undef HAVE_KRB5_GET_ERROR_MESSAGE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LASTLOG_H */ @@ -1310,7 +1310,7 @@ #define HAVE___func__ 1 /* Define this if you are using the Heimdal version of Kerberos V5 */ -#define HEIMDAL 1 +/* #undef HEIMDAL */ /* Define if you need to use IP address instead of hostname in $DISPLAY */ /* #undef IPADDR_IN_DISPLAY */ @@ -1322,7 +1322,7 @@ /* #undef IP_TOS_IS_BROKEN */ /* Define if you want Kerberos 5 support */ -#define KRB5 1 +/* #undef KRB5 */ /* Define if pututxline updates lastlog too */ /* #undef LASTLOG_WRITE_PUTUTXLINE */ Added: head/crypto/openssh/freebsd-configure.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/crypto/openssh/freebsd-configure.sh Mon Sep 23 20:35:54 2013 (r255829) @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +configure_args=" + --prefix=/usr + --sysconfdir=/etc/ssh + --with-pam + --with-tcp-wrappers + --with-libedit + --with-ssl-engine + --without-xauth +" + +set -e + +# generate config.h with krb5 and stash it +sh configure $configure_args --with-kerberos5 +mv config.log config.log.orig +mv config.h config.h.orig + +# generate config.h without krb5 +sh configure $configure_args --without-kerberos5 + +# extract the difference +echo '/* $Free''BSD$ */' > krb5_config.h +diff -u config.h.orig config.h | + sed -n '/^-#define/s/^-//p' | + grep -Ff /dev/stdin config.h.orig >> krb5_config.h Added: head/crypto/openssh/krb5_config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/crypto/openssh/krb5_config.h Mon Sep 23 20:35:54 2013 (r255829) @@ -0,0 +1,11 @@ +/* $FreeBSD$ */ +#define GSSAPI 1 +#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE 1 +#define HAVE_GSSAPI_GSSAPI_H 1 +#define HAVE_GSSAPI_GSSAPI_KRB5_H 1 +#define HAVE_GSSAPI_H 1 +#define HAVE_KRB5_CC_NEW_UNIQUE 1 +#define HAVE_KRB5_FREE_ERROR_MESSAGE 1 +#define HAVE_KRB5_GET_ERROR_MESSAGE 1 +#define HEIMDAL 1 +#define KRB5 1 Modified: head/crypto/openssh/ssh-gss.h ============================================================================== --- head/crypto/openssh/ssh-gss.h Mon Sep 23 20:30:25 2013 (r255828) +++ head/crypto/openssh/ssh-gss.h Mon Sep 23 20:35:54 2013 (r255829) @@ -28,10 +28,10 @@ #ifdef GSSAPI -#ifdef HAVE_GSSAPI_H -#include -#elif defined(HAVE_GSSAPI_GSSAPI_H) +#if defined(HAVE_GSSAPI_GSSAPI_H) #include +#elif defined(HAVE_GSSAPI_H) +#include #endif #ifdef KRB5 Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Mon Sep 23 20:30:25 2013 (r255828) +++ head/crypto/openssh/sshd.c Mon Sep 23 20:35:54 2013 (r255829) @@ -88,10 +88,10 @@ __RCSID("$FreeBSD$"); #ifdef __FreeBSD__ #include -#if defined(GSSAPI) && defined(HAVE_GSSAPI_H) -#include -#elif defined(GSSAPI) && defined(HAVE_GSSAPI_GSSAPI_H) +#if defined(GSSAPI) && defined(HAVE_GSSAPI_GSSAPI_H) #include +#elif defined(GSSAPI) && defined(HAVE_GSSAPI_H) +#include #endif #endif Modified: head/secure/lib/libssh/Makefile ============================================================================== --- head/secure/lib/libssh/Makefile Mon Sep 23 20:30:25 2013 (r255828) +++ head/secure/lib/libssh/Makefile Mon Sep 23 20:35:54 2013 (r255829) @@ -39,7 +39,7 @@ USEPRIVATELIB+= ldns CFLAGS+= -I${SSHDIR} -include ssh_namespace.h .if ${MK_KERBEROS_SUPPORT} != "no" -CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DKRB5 -DHEIMDAL +CFLAGS+= -include krb5_config.h DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCOM_ERR} ${LIBMD} ${LIBROKEN} LDADD+= -lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken .endif @@ -58,3 +58,6 @@ LDADD+= -lcrypto -lcrypt -lz .PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat ${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h +.if ${MK_KERBEROS_SUPPORT} != "no" +${OBJS} ${POBJS} ${SOBJS}: krb5_config.h +.endif Modified: head/secure/usr.bin/ssh/Makefile ============================================================================== --- head/secure/usr.bin/ssh/Makefile Mon Sep 23 20:30:25 2013 (r255828) +++ head/secure/usr.bin/ssh/Makefile Mon Sep 23 20:35:54 2013 (r255829) @@ -27,7 +27,7 @@ USEPRIVATELIB+= ldns .endif .if ${MK_KERBEROS_SUPPORT} != "no" -CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DKRB5 -DHEIMDAL +CFLAGS+= -include krb5_config.h DPADD+= ${LIBGSSAPI} LDADD+= -lgssapi .endif @@ -48,3 +48,6 @@ CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin .PATH: ${SSHDIR} ${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h +.if ${MK_KERBEROS_SUPPORT} != "no" +${OBJS} ${POBJS} ${SOBJS}: krb5_config.h +.endif Modified: head/secure/usr.sbin/sshd/Makefile ============================================================================== --- head/secure/usr.sbin/sshd/Makefile Mon Sep 23 20:30:25 2013 (r255828) +++ head/secure/usr.sbin/sshd/Makefile Mon Sep 23 20:35:54 2013 (r255829) @@ -42,8 +42,7 @@ LDADD+= -lbsm .endif .if ${MK_KERBEROS_SUPPORT} != "no" -CFLAGS+= -DGSSAPI -DKRB5 -DHEIMDAL \ - -DHAVE_GSSAPI_GSSAPI_H=1 -DHAVE_GSSAPI_GSSAPI_KRB5_H=1 +CFLAGS+= -include krb5_config.h DPADD+= ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} \ ${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBHEIMBASE} ${LIBHEIMIPCC} LDADD+= -lgssapi_krb5 -lgssapi -lkrb5 -lhx509 -lasn1 \ @@ -66,3 +65,6 @@ CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin .PATH: ${SSHDIR} ${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h +.if ${MK_KERBEROS_SUPPORT} != "no" +${OBJS} ${POBJS} ${SOBJS}: krb5_config.h +.endif From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 04:00:50 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 2F477458; Tue, 24 Sep 2013 04:00:50 +0000 (UTC) (envelope-from danilo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 008DF2DEF; Tue, 24 Sep 2013 04:00: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 r8O40nJn092533; Tue, 24 Sep 2013 04:00:49 GMT (envelope-from danilo@svn.freebsd.org) Received: (from danilo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8O40nub092531; Tue, 24 Sep 2013 04:00:49 GMT (envelope-from danilo@svn.freebsd.org) Message-Id: <201309240400.r8O40nub092531@svn.freebsd.org> From: Danilo Egea Gondolfo Date: Tue, 24 Sep 2013 04:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255833 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 04:00:50 -0000 Author: danilo (ports committer) Date: Tue Sep 24 04:00:49 2013 New Revision: 255833 URL: http://svnweb.freebsd.org/changeset/base/255833 Log: - Add myself as port commiter and my mentors relationship. - Add myself to calendar.freebsd. Approved by: re (gjb), wg (mentor) Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Sep 24 02:47:18 2013 (r255832) +++ head/share/misc/committers-ports.dot Tue Sep 24 04:00:49 2013 (r255833) @@ -77,6 +77,7 @@ cs [label="Carlo Strub\ncs@FreeBSD.org\n culot [label="Frederic Culot\nculot@FreeBSD.org\n2010/10/16"] daichi [label="Daichi Goto\ndaichi@FreeBSD.org\n2002/10/17"] danfe [label="Alexey Dokuchaev\ndanfe@FreeBSD.org\n2004/08/20"] +danilo [label="Danilo E. Gondolfo\ndanilo@FreeBSD.org\n2013/09/23"] db [label="Diane Bruce\ndb@FreeBSD.org\n2007/01/18"] dbn [label="David Naylor\ndbn@FreeBSD.org\n2013/01/14"] decke [label="Bernhard Froehlich\ndecke@FreeBSD.org\n2010/03/21"] @@ -278,9 +279,10 @@ crees -> madpilot crees -> gblach crees -> tijl +culot -> danilo culot -> jase -culot -> wg culot -> marino +culot -> wg db -> tj @@ -532,6 +534,7 @@ wen -> cs wen -> culot wen -> pawel +wg -> danilo wg -> nemysis will -> lioux Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Sep 24 02:47:18 2013 (r255832) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Sep 24 04:00:49 2013 (r255833) @@ -329,6 +329,7 @@ 11/09 Coleman Kane born in Cincinnati, Ohio, United States, 1980 11/09 Antoine Brodin born in Bagnolet, France, 1981 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 +11/11 Danilo E. Gondolfo born in Lobato, Parana, Brazil, 1987 11/13 John Baldwin born in Stuart, Virginia, United States, 1977 11/14 Jeremie Le Hen born in Nancy, France, 1980 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 07:03:16 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id BA132244; Tue, 24 Sep 2013 07:03:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A7B22261D; Tue, 24 Sep 2013 07:03: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 r8O73GE4090697; Tue, 24 Sep 2013 07:03:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8O73Gs2090696; Tue, 24 Sep 2013 07:03:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309240703.r8O73Gs2090696@svn.freebsd.org> From: Alexander Motin Date: Tue, 24 Sep 2013 07:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255835 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 07:03:16 -0000 Author: mav Date: Tue Sep 24 07:03:16 2013 New Revision: 255835 URL: http://svnweb.freebsd.org/changeset/base/255835 Log: Make load average sampling asynchronous to hardclock ticks. This improves measurement of load caused by time-related events still using hardclock. For example, without this change dummynet, scheduling events each hardclock tick, was always miscounted as load of 1. There is still aliasing with events delayed by the new precision mechanism, but it probably can't be avoided without moving this sampling from using callout to some lower-level code or handling it in some other special way. Reviewed by: davide Approved by: re (marius) Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue Sep 24 06:48:28 2013 (r255834) +++ head/sys/kern/kern_synch.c Tue Sep 24 07:03:16 2013 (r255835) @@ -570,8 +570,8 @@ loadav(void *arg) * run at regular intervals. */ callout_reset_sbt(&loadav_callout, - tick_sbt * (hz * 4 + (int)(random() % (hz * 2 + 1))), 0, - loadav, NULL, C_DIRECT_EXEC | C_HARDCLOCK); + SBT_1US * (4000000 + (int)(random() % 2000001)), SBT_1US, + loadav, NULL, C_DIRECT_EXEC | C_PREL(32)); } /* ARGSUSED */ From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 09:33:31 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id E4A41FA1; Tue, 24 Sep 2013 09:33:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B664A2E2B; Tue, 24 Sep 2013 09:33: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 r8O9XVnw071472; Tue, 24 Sep 2013 09:33:31 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8O9XVUq071471; Tue, 24 Sep 2013 09:33:31 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309240933.r8O9XVUq071471@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 24 Sep 2013 09:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255837 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 09:33:32 -0000 Author: trasz Date: Tue Sep 24 09:33:31 2013 New Revision: 255837 URL: http://svnweb.freebsd.org/changeset/base/255837 Log: Fix a few instances of M_WAITOK in threads marked as prohibited from sleep, missed in r255824. Approved by: re (kib) Sponsored by: FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Tue Sep 24 08:40:41 2013 (r255836) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Tue Sep 24 09:33:31 2013 (r255837) @@ -2306,6 +2306,7 @@ cfiscsi_datamove(union ctl_io *io) if (response == NULL) { CFISCSI_SESSION_WARN(cs, "failed to " "allocate memory; dropping connection"); + icl_pdu_free(request); cfiscsi_session_terminate(cs); return; } @@ -2337,6 +2338,7 @@ cfiscsi_datamove(union ctl_io *io) if (error != 0) { CFISCSI_SESSION_WARN(cs, "failed to " "allocate memory; dropping connection"); + icl_pdu_free(request); icl_pdu_free(response); cfiscsi_session_terminate(cs); return; @@ -2406,7 +2408,13 @@ cfiscsi_datamove(union ctl_io *io) "task tag 0x%x, target transfer tag 0x%x", bhssc->bhssc_initiator_task_tag, target_transfer_tag); #endif - cdw = uma_zalloc(cfiscsi_data_wait_zone, M_WAITOK | M_ZERO); + cdw = uma_zalloc(cfiscsi_data_wait_zone, M_NOWAIT | M_ZERO); + if (cdw == NULL) { + CFISCSI_SESSION_WARN(cs, "failed to " + "allocate memory; dropping connection"); + icl_pdu_free(request); + cfiscsi_session_terminate(cs); + } cdw->cdw_ctl_io = io; cdw->cdw_target_transfer_tag = htonl(target_transfer_tag); cdw->cdw_initiator_task_tag = bhssc->bhssc_initiator_task_tag; @@ -2435,7 +2443,13 @@ cfiscsi_datamove(union ctl_io *io) * XXX: We should limit the number of outstanding R2T PDUs * per task to MaxOutstandingR2T. */ - response = cfiscsi_pdu_new_response(request, M_WAITOK); + response = cfiscsi_pdu_new_response(request, M_NOWAIT); + if (response == NULL) { + CFISCSI_SESSION_WARN(cs, "failed to " + "allocate memory; dropping connection"); + icl_pdu_free(request); + cfiscsi_session_terminate(cs); + } bhsr2t = (struct iscsi_bhs_r2t *)response->ip_bhs; bhsr2t->bhsr2t_opcode = ISCSI_BHS_OPCODE_R2T; bhsr2t->bhsr2t_flags = 0x80; From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 09:54:08 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 95FC049D; Tue, 24 Sep 2013 09:54:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 834B92F36; Tue, 24 Sep 2013 09:54: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 r8O9s8xt082053; Tue, 24 Sep 2013 09:54:08 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8O9s8CO082043; Tue, 24 Sep 2013 09:54:08 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309240954.r8O9s8CO082043@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 24 Sep 2013 09:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255838 - in head/contrib/unbound: . daemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 09:54:08 -0000 Author: des Date: Tue Sep 24 09:54:07 2013 New Revision: 255838 URL: http://svnweb.freebsd.org/changeset/base/255838 Log: Don't include the build date or command-line arguments in the binary. Approved by: re (blanket) Modified: head/contrib/unbound/configure.ac head/contrib/unbound/daemon/unbound.c Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Tue Sep 24 09:33:31 2013 (r255837) +++ head/contrib/unbound/configure.ac Tue Sep 24 09:54:07 2013 (r255838) @@ -69,19 +69,6 @@ AC_SUBST(LIBUNBOUND_CURRENT) AC_SUBST(LIBUNBOUND_REVISION) AC_SUBST(LIBUNBOUND_AGE) -pretty_cmdline() { - cmdline="" - while test -n "$1"; do - cmdline="$cmdline '"`echo $1 | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/g' `"'" - shift - done -} -pretty_cmdline $@ -AC_DEFINE_UNQUOTED(CONFIGURE_BUILD_WITH, ["$cmdline"], [configure flags]) -AC_CANONICAL_TARGET -AC_DEFINE_UNQUOTED(CONFIGURE_TARGET, ["$target"], [configure target system]) -AC_DEFINE_UNQUOTED(CONFIGURE_DATE, ["`date`"], [configure date]) - CFLAGS="$CFLAGS" AC_AIX Modified: head/contrib/unbound/daemon/unbound.c ============================================================================== --- head/contrib/unbound/daemon/unbound.c Tue Sep 24 09:33:31 2013 (r255837) +++ head/contrib/unbound/daemon/unbound.c Tue Sep 24 09:54:07 2013 (r255838) @@ -177,8 +177,6 @@ static void usage() for(m = module_list_avail(); *m; m++) printf(" %s", *m); printf("\n"); - printf("configured for %s on %s with options:%s\n", - CONFIGURE_TARGET, CONFIGURE_DATE, CONFIGURE_BUILD_WITH); printf("BSD licensed, see LICENSE in source package for details.\n"); printf("Report bugs to %s\n", PACKAGE_BUGREPORT); } From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 09:56:11 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 77F805E7; Tue, 24 Sep 2013 09:56:11 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 650B02F42; Tue, 24 Sep 2013 09: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 r8O9uBkX083057; Tue, 24 Sep 2013 09:56:11 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8O9uBg0083056; Tue, 24 Sep 2013 09:56:11 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309240956.r8O9uBg0083056@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 24 Sep 2013 09:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255839 - head/contrib/unbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 09:56:11 -0000 Author: des Date: Tue Sep 24 09:56:10 2013 New Revision: 255839 URL: http://svnweb.freebsd.org/changeset/base/255839 Log: Regenerate the configure script before running it. Set the default config file to /var/unbound/unbound.conf. Approved by: re (blanket) Modified: head/contrib/unbound/freebsd-configure.sh Modified: head/contrib/unbound/freebsd-configure.sh ============================================================================== --- head/contrib/unbound/freebsd-configure.sh Tue Sep 24 09:54:07 2013 (r255838) +++ head/contrib/unbound/freebsd-configure.sh Tue Sep 24 09:56:10 2013 (r255839) @@ -24,9 +24,11 @@ ldnsobj=$(realpath $(make -C$ldnsbld -V. [ -f $ldnsobj/libldns.a ] || error "can't find LDNS object directory" export LDFLAGS="-L$ldnsobj" +autoconf +autoheader ./configure \ --prefix= --exec-prefix=/usr \ - --with-conf-file=/etc/unbound/unbound.conf \ + --with-conf-file=/var/unbound/unbound.conf \ --with-run-dir=/var/unbound \ --with-username=unbound From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 09:57:00 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id B4595729; Tue, 24 Sep 2013 09:57:00 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 86DBE2F4E; Tue, 24 Sep 2013 09:57: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 r8O9v0wF083466; Tue, 24 Sep 2013 09:57:00 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8O9uxth083452; Tue, 24 Sep 2013 09:56:59 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309240956.r8O9uxth083452@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 24 Sep 2013 09:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255840 - in head/contrib/unbound: . doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 09:57:00 -0000 Author: des Date: Tue Sep 24 09:56:58 2013 New Revision: 255840 URL: http://svnweb.freebsd.org/changeset/base/255840 Log: Regenerate Approved by: re (blanket) Modified: head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure head/contrib/unbound/doc/unbound-checkconf.8 head/contrib/unbound/doc/unbound-control.8 head/contrib/unbound/doc/unbound.8 head/contrib/unbound/doc/unbound.conf.5 Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Tue Sep 24 09:56:10 2013 (r255839) +++ head/contrib/unbound/config.h Tue Sep 24 09:56:58 2013 (r255840) @@ -5,16 +5,7 @@ #define CHROOT_DIR "/var/unbound" /* Pathname to the Unbound configuration file */ -#define CONFIGFILE "/etc/unbound/unbound.conf" - -/* configure flags */ -#define CONFIGURE_BUILD_WITH " '--prefix=' '--exec-prefix=/usr' '--with-conf-file=/etc/unbound/unbound.conf' '--with-run-dir=/var/unbound' '--with-username=unbound'" - -/* configure date */ -#define CONFIGURE_DATE "Sun Sep 15 15:38:41 CEST 2013" - -/* configure target system */ -#define CONFIGURE_TARGET "x86_64-unknown-freebsd10.0" +#define CONFIGFILE "/var/unbound/unbound.conf" /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work */ @@ -240,7 +231,7 @@ #define HAVE_RECVMSG 1 /* Define to 1 if you have the `sbrk' function. */ -/* #undef HAVE_SBRK */ +#define HAVE_SBRK 1 /* Define to 1 if you have the `sendmsg' function. */ #define HAVE_SENDMSG 1 Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Tue Sep 24 09:56:10 2013 (r255839) +++ head/contrib/unbound/config.h.in Tue Sep 24 09:56:58 2013 (r255840) @@ -6,15 +6,6 @@ /* Pathname to the Unbound configuration file */ #undef CONFIGFILE -/* configure flags */ -#undef CONFIGURE_BUILD_WITH - -/* configure date */ -#undef CONFIGURE_DATE - -/* configure target system */ -#undef CONFIGURE_TARGET - /* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work */ #undef DARWIN_BROKEN_SETREUID Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Tue Sep 24 09:56:10 2013 (r255839) +++ head/contrib/unbound/configure Tue Sep 24 09:56:58 2013 (r255840) @@ -700,6 +700,14 @@ FGREP SED LIBTOOL AR +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build libtool STRIP doxygen @@ -728,18 +736,6 @@ CPPFLAGS LDFLAGS CFLAGS CC -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build LIBUNBOUND_AGE LIBUNBOUND_REVISION LIBUNBOUND_CURRENT @@ -1435,7 +1431,6 @@ _ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi @@ -2545,169 +2540,6 @@ LIBUNBOUND_AGE=1 -pretty_cmdline() { - cmdline="" - while test -n "$1"; do - cmdline="$cmdline '"`echo $1 | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/g' `"'" - shift - done -} -pretty_cmdline $@ - -cat >>confdefs.h <<_ACEOF -#define CONFIGURE_BUILD_WITH "$cmdline" -_ACEOF - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if ${ac_cv_target+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -cat >>confdefs.h <<_ACEOF -#define CONFIGURE_TARGET "$target" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define CONFIGURE_DATE "`date`" -_ACEOF - - CFLAGS="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6262,6 +6094,106 @@ else STRIP="$ac_cv_prog_STRIP" fi +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + # skip these tests, we do not need them. @@ -12552,10 +12484,14 @@ fi # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi # We used to test for /lib/ld.so.1 and disable shared libraries on Modified: head/contrib/unbound/doc/unbound-checkconf.8 ============================================================================== --- head/contrib/unbound/doc/unbound-checkconf.8 Tue Sep 24 09:56:10 2013 (r255839) +++ head/contrib/unbound/doc/unbound-checkconf.8 Tue Sep 24 09:56:58 2013 (r255840) @@ -42,7 +42,7 @@ The unbound\-checkconf program exits wit 0 for a correct config file. .SH "FILES" .TP -.I /etc/unbound/unbound.conf +.I /var/unbound/unbound.conf unbound configuration file. .SH "SEE ALSO" \fIunbound.conf\fR(5), Modified: head/contrib/unbound/doc/unbound-control.8 ============================================================================== --- head/contrib/unbound/doc/unbound-control.8 Tue Sep 24 09:56:10 2013 (r255839) +++ head/contrib/unbound/doc/unbound-control.8 Tue Sep 24 09:56:58 2013 (r255840) @@ -33,7 +33,7 @@ Show the version and commandline option .TP .B \-c \fIcfgfile The config file to read with settings. If not given the default -config file /etc/unbound/unbound.conf is used. +config file /var/unbound/unbound.conf is used. .TP .B \-s \fIserver[@port] IPv4 or IPv6 address of the server to contact. If not given, the @@ -445,7 +445,7 @@ Some low level of late answers and delay with the UDP protocol. Very high values could indicate a threat (spoofing). .SH "FILES" .TP -.I /etc/unbound/unbound.conf +.I /var/unbound/unbound.conf unbound configuration file. .TP .I /var/unbound Modified: head/contrib/unbound/doc/unbound.8 ============================================================================== --- head/contrib/unbound/doc/unbound.8 Tue Sep 24 09:56:10 2013 (r255839) +++ head/contrib/unbound/doc/unbound.8 Tue Sep 24 09:56:58 2013 (r255840) @@ -32,7 +32,7 @@ Show the version and commandline option .TP .B \-c\fI cfgfile Set the config file with settings for unbound to read instead of reading the -file at the default location, /etc/unbound/unbound.conf. The syntax is +file at the default location, /var/unbound/unbound.conf. The syntax is described in \fIunbound.conf\fR(5). .TP .B \-d Modified: head/contrib/unbound/doc/unbound.conf.5 ============================================================================== --- head/contrib/unbound/doc/unbound.conf.5 Tue Sep 24 09:56:10 2013 (r255839) +++ head/contrib/unbound/doc/unbound.conf.5 Tue Sep 24 09:56:58 2013 (r255840) @@ -1080,7 +1080,7 @@ default \fIchroot\fR(2) location. .TP -.I /etc/unbound/unbound.conf +.I /var/unbound/unbound.conf unbound configuration file. .TP .I /var/unbound/unbound.pid From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 10:04:52 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id A7280BD0; Tue, 24 Sep 2013 10:04:52 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 943B72FF9; Tue, 24 Sep 2013 10:04: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 r8OA4qni087924; Tue, 24 Sep 2013 10:04:52 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OA4qi9087922; Tue, 24 Sep 2013 10:04:52 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309241004.r8OA4qi9087922@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 24 Sep 2013 10:04:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255841 - in head/etc: . mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 10:04:52 -0000 Author: des Date: Tue Sep 24 10:04:51 2013 New Revision: 255841 URL: http://svnweb.freebsd.org/changeset/base/255841 Log: Replace the unused /etc/unbound directory with a symlink to /var/unbound. Approved by: re (blanket) Modified: head/etc/Makefile head/etc/mtree/BSD.root.dist Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Sep 24 09:56:58 2013 (r255840) +++ head/etc/Makefile Tue Sep 24 10:04:51 2013 (r255841) @@ -250,6 +250,11 @@ distribution: .if ${MK_BIND_ETC} != "no" ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install .endif +.if ${MK_UNBOUND} != "no" + if [ ! -e ${DESTDIR}/etc/unbound ]; then \ + ${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \ + fi +.endif .if ${MK_SENDMAIL} != "no" ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution .endif Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Tue Sep 24 09:56:58 2013 (r255840) +++ head/etc/mtree/BSD.root.dist Tue Sep 24 10:04:51 2013 (r255841) @@ -66,8 +66,6 @@ .. ssl .. - unbound - .. zfs .. .. From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 11:49:05 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id F1316D1D; Tue, 24 Sep 2013 11:49:04 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF0CD2639; Tue, 24 Sep 2013 11:49: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 r8OBn4JS042929; Tue, 24 Sep 2013 11:49:04 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OBn4KS042927; Tue, 24 Sep 2013 11:49:04 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309241149.r8OBn4KS042927@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 24 Sep 2013 11:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255843 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 11:49:05 -0000 Author: des Date: Tue Sep 24 11:49:04 2013 New Revision: 255843 URL: http://svnweb.freebsd.org/changeset/base/255843 Log: Forgotten in r255825: NETWORKING requires local_unbound. Approved by: re (blanket) Modified: head/etc/rc.d/NETWORKING Modified: head/etc/rc.d/NETWORKING ============================================================================== --- head/etc/rc.d/NETWORKING Tue Sep 24 10:57:44 2013 (r255842) +++ head/etc/rc.d/NETWORKING Tue Sep 24 11:49:04 2013 (r255843) @@ -6,7 +6,7 @@ # PROVIDE: NETWORKING NETWORK # REQUIRE: netif netoptions routing ppp ipfw stf faith # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge -# REQUIRE: static_arp static_ndp +# REQUIRE: static_arp static_ndp local_unbound # This is a dummy dependency, for services which require networking # to be operational before starting. From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 12:24:49 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 117FDE7C; Tue, 24 Sep 2013 12:24:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2A8228EC; Tue, 24 Sep 2013 12:24: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 r8OCOmaB063333; Tue, 24 Sep 2013 12:24:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OCOmxB063332; Tue, 24 Sep 2013 12:24:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309241224.r8OCOmxB063332@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Sep 2013 12:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255844 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 12:24:49 -0000 Author: kib Date: Tue Sep 24 12:24:48 2013 New Revision: 255844 URL: http://svnweb.freebsd.org/changeset/base/255844 Log: Ensure that the ERESTART return from the syscall reloads the registers, to make the restarted syscall instruction pass the correct arguments. PR: kern/182161 Reported by: Russ Cox Sponsored by: The FreeBSD Foundation MFC after: 3 days Approved by: re (marius) Modified: head/sys/amd64/amd64/vm_machdep.c Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Tue Sep 24 11:49:04 2013 (r255843) +++ head/sys/amd64/amd64/vm_machdep.c Tue Sep 24 12:24:48 2013 (r255844) @@ -400,9 +400,13 @@ cpu_set_syscall_retval(struct thread *td * for the next iteration. * %r10 restore is only required for freebsd/amd64 processes, * but shall be innocent for any ia32 ABI. + * + * Require full context restore to get the arguments + * in the registers reloaded at return to usermode. */ td->td_frame->tf_rip -= td->td_frame->tf_err; td->td_frame->tf_r10 = td->td_frame->tf_rcx; + set_pcb_flags(td->td_pcb, PCB_FULL_IRET); break; case EJUSTRETURN: From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 12:26:44 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 58712FD2; Tue, 24 Sep 2013 12:26:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2BF0328FC; Tue, 24 Sep 2013 12:26: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 r8OCQilj063797; Tue, 24 Sep 2013 12:26:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OCQitH063795; Tue, 24 Sep 2013 12:26:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309241226.r8OCQitH063795@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Sep 2013 12:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255845 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 12:26:44 -0000 Author: kib Date: Tue Sep 24 12:26:43 2013 New Revision: 255845 URL: http://svnweb.freebsd.org/changeset/base/255845 Log: Use the pv lists generation count to read-lock the pvh_global_lock in pmap_clear_modify(). Noted and reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (marius) Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Sep 24 12:24:48 2013 (r255844) +++ head/sys/amd64/amd64/pmap.c Tue Sep 24 12:26:43 2013 (r255845) @@ -5314,7 +5314,9 @@ pmap_clear_modify(vm_page_t m) pv_entry_t next_pv, pv; pd_entry_t oldpde, *pde; pt_entry_t oldpte, *pte; + struct rwlock *lock; vm_offset_t va; + int md_gen, pvh_gen; KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_modify: page %p is not managed", m)); @@ -5329,18 +5331,30 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - rw_wlock(&pvh_global_lock); + rw_rlock(&pvh_global_lock); + lock = VM_PAGE_TO_PV_LIST_LOCK(m); + rw_wlock(lock); +restart: if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); + if (!PMAP_TRYLOCK(pmap)) { + pvh_gen = pvh->pv_gen; + rw_wunlock(lock); + PMAP_LOCK(pmap); + rw_wlock(lock); + if (pvh_gen != pvh->pv_gen) { + PMAP_UNLOCK(pmap); + goto restart; + } + } va = pv->pv_va; pde = pmap_pde(pmap, va); oldpde = *pde; if ((oldpde & PG_RW) != 0) { - if (pmap_demote_pde(pmap, pde, va)) { + if (pmap_demote_pde_locked(pmap, pde, va, &lock)) { if ((oldpde & PG_W) == 0) { /* * Write protect the mapping to a @@ -5367,7 +5381,17 @@ pmap_clear_modify(vm_page_t m) small_mappings: TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); + if (!PMAP_TRYLOCK(pmap)) { + md_gen = m->md.pv_gen; + pvh_gen = pvh->pv_gen; + rw_wunlock(lock); + PMAP_LOCK(pmap); + rw_wlock(lock); + if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { + PMAP_UNLOCK(pmap); + goto restart; + } + } pde = pmap_pde(pmap, pv->pv_va); KASSERT((*pde & PG_PS) == 0, ("pmap_clear_modify: found" " a 2mpage in page %p's pv list", m)); @@ -5378,7 +5402,8 @@ small_mappings: } PMAP_UNLOCK(pmap); } - rw_wunlock(&pvh_global_lock); + rw_wunlock(lock); + rw_runlock(&pvh_global_lock); } /* From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 13:46:14 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 921B8F4D; Tue, 24 Sep 2013 13:46:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7086B2EA6; Tue, 24 Sep 2013 13:46: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 r8ODkEEv007017; Tue, 24 Sep 2013 13:46:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8ODkEOM007016; Tue, 24 Sep 2013 13:46:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309241346.r8ODkEOM007016@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 24 Sep 2013 13:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255848 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 13:46:14 -0000 Author: trasz Date: Tue Sep 24 13:46:13 2013 New Revision: 255848 URL: http://svnweb.freebsd.org/changeset/base/255848 Log: Properly ignore PDUs with CmdSN outside of allowed range. Approved by: re (glebius) Sponsored by: FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Tue Sep 24 12:50:04 2013 (r255847) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Tue Sep 24 13:46:13 2013 (r255848) @@ -147,7 +147,7 @@ static int cfiscsi_devid(struct ctl_scsi static void cfiscsi_datamove(union ctl_io *io); static void cfiscsi_done(union ctl_io *io); static uint32_t cfiscsi_map_lun(void *arg, uint32_t lun); -static void cfiscsi_pdu_update_cmdsn(const struct icl_pdu *request); +static bool cfiscsi_pdu_update_cmdsn(const struct icl_pdu *request); static void cfiscsi_pdu_handle_nop_out(struct icl_pdu *request); static void cfiscsi_pdu_handle_scsi_command(struct icl_pdu *request); static void cfiscsi_pdu_handle_task_request(struct icl_pdu *request); @@ -182,7 +182,7 @@ cfiscsi_pdu_new_response(struct icl_pdu return (icl_pdu_new_bhs(request->ip_conn, flags)); } -static void +static bool cfiscsi_pdu_update_cmdsn(const struct icl_pdu *request) { const struct iscsi_bhs_scsi_command *bhssc; @@ -206,7 +206,7 @@ cfiscsi_pdu_update_cmdsn(const struct ic */ if ((request->ip_bhs->bhs_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) == ISCSI_BHS_OPCODE_SCSI_DATA_OUT) - return; + return (false); /* * We're only using fields common for all the request @@ -226,38 +226,39 @@ cfiscsi_pdu_update_cmdsn(const struct ic #endif /* - * XXX: The target MUST silently ignore any non-immediate command - * outside of this range or non-immediate duplicates within - * the range. + * The target MUST silently ignore any non-immediate command outside + * of this range. + * + * XXX: ... or non-immediate duplicates within the range. */ - if (cmdsn != cs->cs_cmdsn) { + if (cmdsn < cs->cs_cmdsn || cmdsn > cs->cs_cmdsn + maxcmdsn_delta) { + CFISCSI_SESSION_UNLOCK(cs); CFISCSI_SESSION_WARN(cs, "received PDU with CmdSN %d, " "while expected CmdSN was %d", cmdsn, cs->cs_cmdsn); - cs->cs_cmdsn = cmdsn + 1; - CFISCSI_SESSION_UNLOCK(cs); - return; + return (true); } - /* - * XXX: The CmdSN of the rejected command PDU (if it is a non-immediate - * command) MUST NOT be considered received by the target - * (i.e., a command sequence gap must be assumed for the CmdSN) - */ - if ((request->ip_bhs->bhs_opcode & ISCSI_BHS_OPCODE_IMMEDIATE) == 0) cs->cs_cmdsn++; CFISCSI_SESSION_UNLOCK(cs); + + return (false); } static void cfiscsi_pdu_handle(struct icl_pdu *request) { struct cfiscsi_session *cs; + bool ignore; cs = PDU_SESSION(request); - cfiscsi_pdu_update_cmdsn(request); + ignore = cfiscsi_pdu_update_cmdsn(request); + if (ignore) { + icl_pdu_free(request); + return; + } /* * Handle the PDU; this includes e.g. receiving the remaining From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 13:52:48 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 12D052A9; Tue, 24 Sep 2013 13:52:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F29082F2F; Tue, 24 Sep 2013 13:52: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 r8ODql4K010937; Tue, 24 Sep 2013 13:52:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8ODqlHP010936; Tue, 24 Sep 2013 13:52:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309241352.r8ODqlHP010936@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Sep 2013 13:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255849 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 13:52:48 -0000 Author: kib Date: Tue Sep 24 13:52:47 2013 New Revision: 255849 URL: http://svnweb.freebsd.org/changeset/base/255849 Log: In pmap_clear_modify(), initialize pvh even for fictitious managed page, otherwise the small mappings loop would use uninitialized value. Note that currently pmap_clear_modify() is not called for fictitious pages. Sponsored by: The FreeBSD Foundation Approved by: re (glebius) Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Sep 24 13:46:13 2013 (r255848) +++ head/sys/amd64/amd64/pmap.c Tue Sep 24 13:52:47 2013 (r255849) @@ -5331,13 +5331,13 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); rw_rlock(&pvh_global_lock); lock = VM_PAGE_TO_PV_LIST_LOCK(m); rw_wlock(lock); restart: if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 14:33:32 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 93521E3D; Tue, 24 Sep 2013 14:33:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 66A642184; Tue, 24 Sep 2013 14: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 r8OEXWbB033247; Tue, 24 Sep 2013 14:33:32 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OEXV74033244; Tue, 24 Sep 2013 14:33:31 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309241433.r8OEXV74033244@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 24 Sep 2013 14:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255850 - in head: 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 14:33:32 -0000 Author: des Date: Tue Sep 24 14:33:31 2013 New Revision: 255850 URL: http://svnweb.freebsd.org/changeset/base/255850 Log: Flip the switch: disable BIND and enable LDNS_UTILS. Approved by: re (blanket) Added: head/tools/build/options/WITHOUT_LDNS_UTILS - copied, changed from r255826, head/tools/build/options/WITH_LDNS_UTILS head/tools/build/options/WITH_BIND - copied, changed from r255849, head/tools/build/options/WITHOUT_BIND Deleted: head/tools/build/options/WITHOUT_BIND head/tools/build/options/WITH_LDNS_UTILS Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Sep 24 13:52:47 2013 (r255849) +++ head/share/mk/bsd.own.mk Tue Sep 24 14:33:31 2013 (r255850) @@ -255,7 +255,6 @@ __DEFAULT_YES_OPTIONS = \ ATM \ AUDIT \ AUTHPF \ - BIND \ BIND_DNSSEC \ BIND_ETC \ BIND_LIBS_LWRES \ @@ -308,6 +307,7 @@ __DEFAULT_YES_OPTIONS = \ KERNEL_SYMBOLS \ KVM \ LDNS \ + LDNS_UTILS \ LEGACY_CONSOLE \ LIB32 \ LIBPTHREAD \ @@ -367,6 +367,7 @@ __DEFAULT_YES_OPTIONS = \ ZONEINFO __DEFAULT_NO_OPTIONS = \ + BIND \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ @@ -380,7 +381,6 @@ __DEFAULT_NO_OPTIONS = \ HESIOD \ LIBICONV_COMPAT \ INSTALL_AS_USER \ - LDNS_UTILS \ LLDB \ NMTREE \ NAND \ Copied and modified: head/tools/build/options/WITHOUT_LDNS_UTILS (from r255826, head/tools/build/options/WITH_LDNS_UTILS) ============================================================================== --- head/tools/build/options/WITH_LDNS_UTILS Mon Sep 23 20:06:59 2013 (r255826, copy source) +++ head/tools/build/options/WITHOUT_LDNS_UTILS Tue Sep 24 14:33:31 2013 (r255850) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -Setting this variable will enable the LDNS-based versions of -.Xr dig 1 +Setting this variable will prevent building the LDNS utilities +.Xr drill 1 and .Xr host 1 . Copied and modified: head/tools/build/options/WITH_BIND (from r255849, head/tools/build/options/WITHOUT_BIND) ============================================================================== --- head/tools/build/options/WITHOUT_BIND Tue Sep 24 13:52:47 2013 (r255849, copy source) +++ head/tools/build/options/WITH_BIND Tue Sep 24 14:33:31 2013 (r255850) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Setting this variable will prevent any part of BIND from being built. +Setting this variable will enable BIND. From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 14:46:11 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 50A002CE; Tue, 24 Sep 2013 14:46:11 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EC36220C; Tue, 24 Sep 2013 14:46: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 r8OEkBGU039607; Tue, 24 Sep 2013 14:46:11 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OEkBhd039606; Tue, 24 Sep 2013 14:46:11 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309241446.r8OEkBhd039606@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 24 Sep 2013 14:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255851 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 14:46:11 -0000 Author: des Date: Tue Sep 24 14:46:10 2013 New Revision: 255851 URL: http://svnweb.freebsd.org/changeset/base/255851 Log: Regenerate. Approved by: re (blanket) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Sep 24 14:33:31 2013 (r255850) +++ head/share/man/man5/src.conf.5 Tue Sep 24 14:46:10 2013 (r255851) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt .\" $FreeBSD$ -.Dd September 19, 2013 +.Dd September 24, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -127,37 +127,33 @@ Set to not build audit support into syst .\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . -.It Va WITHOUT_BIND -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND 156932 2006-03-21 07:50:50Z ru -Setting this variable will prevent any part of BIND from being built. -When set, it also enforces the following options: +.It Va WITH_BIND +.\" from FreeBSD: head/tools/build/options/WITH_BIND 255850 2013-09-24 14:33:31Z des +Setting this variable will enable BIND. +When set, the following options are also in effect: .Pp -.Bl -item -compact -.It +.Bl -inset -compact +.It Va WITH_BIND_DNSSEC +(unless .Va WITHOUT_BIND_DNSSEC -.It +is set explicitly) +.It Va WITH_BIND_ETC +(unless .Va WITHOUT_BIND_ETC -.It -.Va WITHOUT_BIND_LIBS -.It +is set explicitly) +.It Va WITH_BIND_LIBS_LWRES +(unless .Va WITHOUT_BIND_LIBS_LWRES -.It +is set explicitly) +.It Va WITH_BIND_MTREE +(unless .Va WITHOUT_BIND_MTREE -.It +is set explicitly) +.It Va WITH_BIND_NAMED +(unless .Va WITHOUT_BIND_NAMED -.It -.Va WITHOUT_BIND_UTILS +is set explicitly) .El -.It Va WITHOUT_BIND_DNSSEC -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_DNSSEC 156932 2006-03-21 07:50:50Z ru -Set to avoid building or installing the DNSSEC related binaries, -.Xr dnssec-keygen 8 -and -.Xr dnssec-signzone 8 . -.It Va WITHOUT_BIND_ETC -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_ETC 156932 2006-03-21 07:50:50Z ru -Set to avoid installing the default files to -.Pa /var/named/etc/namedb . .It Va WITH_BIND_IDN .\" from FreeBSD: head/tools/build/options/WITH_BIND_IDN 193280 2009-06-01 21:58:59Z dougb Set to enable IDN support for dig, host, and nslookup. @@ -168,46 +164,9 @@ Set to enable 64-bit file support. .It Va WITH_BIND_LIBS .\" from FreeBSD: head/tools/build/options/WITH_BIND_LIBS 193280 2009-06-01 21:58:59Z dougb Set to install BIND libraries and include files. -.It Va WITHOUT_BIND_LIBS_LWRES -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_LIBS_LWRES 156932 2006-03-21 07:50:50Z ru -Set to avoid installing the lightweight resolver library in -.Pa /usr/lib . -.It Va WITHOUT_BIND_MTREE -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_MTREE 157717 2006-04-13 10:37:29Z ru -Set to avoid running -.Xr mtree 8 -to create the chroot directory structure under -.Pa /var/named , -and avoid creating an -.Pa /etc/namedb -symlink to the chroot directory. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_BIND_ETC -.El -.It Va WITHOUT_BIND_NAMED -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_NAMED 156932 2006-03-21 07:50:50Z ru -Set to avoid building or installing -.Xr named 8 , -.Xr named.reload 8 , -.Xr named-checkconf 8 , -.Xr named-checkzone 8 , -.Xr rndc 8 , -and -.Xr rndc-confgen 8 . .It Va WITH_BIND_SIGCHASE .\" from FreeBSD: head/tools/build/options/WITH_BIND_SIGCHASE 193280 2009-06-01 21:58:59Z dougb Set to enable DNSSEC validation support for dig, host, and nslookup. -.It Va WITHOUT_BIND_UTILS -.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_UTILS 156932 2006-03-21 07:50:50Z ru -Set to avoid building or installing the BIND userland utilities, -.Xr dig 1 , -.Xr host 1 , -.Xr nslookup 1 , -and -.Xr nsupdate 8 . .It Va WITH_BIND_XML .\" from FreeBSD: head/tools/build/options/WITH_BIND_XML 193280 2009-06-01 21:58:59Z dougb Set to enable the http statistics interface for named. @@ -706,18 +665,12 @@ When set, it also enforces the following .It .Va WITHOUT_UNBOUND .El -.It Va WITH_LDNS_UTILS -.\" from FreeBSD: head/tools/build/options/WITH_LDNS_UTILS 246830 2013-02-15 13:57:51Z des -Setting this variable will enable the LDNS-based versions of -.Xr dig 1 +.It Va WITHOUT_LDNS_UTILS +.\" from FreeBSD: head/tools/build/options/WITHOUT_LDNS_UTILS 255850 2013-09-24 14:33:31Z des +Setting this variable will prevent building the LDNS utilities +.Xr drill 1 and .Xr host 1 . -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_BIND_UTILS -.El .It Va WITHOUT_LEGACY_CONSOLE .\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 249966 2013-04-27 04:09:09Z eadler Set to not build programs that support a legacy PC console; e.g., @@ -759,8 +712,6 @@ When set, it also enforces the following .It .Va WITHOUT_BIND_NAMED .It -.Va WITHOUT_BIND_UTILS -.It .Va WITHOUT_LIBTHR .El .It Va WITHOUT_LIBTHR @@ -786,8 +737,6 @@ When set, it also enforces the following .Va WITHOUT_BIND_MTREE .It .Va WITHOUT_BIND_NAMED -.It -.Va WITHOUT_BIND_UTILS .El .It Va WITH_LLDB .\" from FreeBSD: head/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 14:52:44 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 0C0CD575; Tue, 24 Sep 2013 14:52:44 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E9B482277; Tue, 24 Sep 2013 14:52: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 r8OEqhT0043369; Tue, 24 Sep 2013 14:52:43 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OEqhlx043365; Tue, 24 Sep 2013 14:52:43 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201309241452.r8OEqhlx043365@svn.freebsd.org> From: Devin Teske Date: Tue, 24 Sep 2013 14:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255852 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/package/freebsd contrib/dialog/po contrib/dialog/samples gnu/lib/libdialog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 14:52:44 -0000 Author: dteske Date: Tue Sep 24 14:52:43 2013 New Revision: 255852 URL: http://svnweb.freebsd.org/changeset/base/255852 Log: Update dialog to 1.2-20130923. Approved by: re (marius) Added: head/contrib/dialog/package/freebsd/ head/contrib/dialog/package/freebsd/Makefile (contents, props changed) head/contrib/dialog/package/freebsd/distinfo head/contrib/dialog/package/freebsd/pkg-descr head/contrib/dialog/package/freebsd/pkg-plist head/contrib/dialog/po/fa.po Modified: head/contrib/dialog/CHANGES head/contrib/dialog/VERSION head/contrib/dialog/aclocal.m4 head/contrib/dialog/arrows.c head/contrib/dialog/buildlist.c head/contrib/dialog/checklist.c head/contrib/dialog/config.guess head/contrib/dialog/config.sub head/contrib/dialog/configure head/contrib/dialog/configure.in head/contrib/dialog/dialog.1 head/contrib/dialog/dialog.3 head/contrib/dialog/dialog.c head/contrib/dialog/dialog.h head/contrib/dialog/formbox.c head/contrib/dialog/guage.c head/contrib/dialog/inputstr.c head/contrib/dialog/makefile.in head/contrib/dialog/menubox.c head/contrib/dialog/mixedform.c head/contrib/dialog/package/debian/changelog head/contrib/dialog/package/debian/copyright head/contrib/dialog/package/dialog.spec head/contrib/dialog/po/lt.po head/contrib/dialog/samples/inputbox6-utf8 head/contrib/dialog/samples/report-tempfile head/contrib/dialog/treeview.c head/contrib/dialog/util.c head/gnu/lib/libdialog/dlg_config.h Modified: head/contrib/dialog/CHANGES ============================================================================== --- head/contrib/dialog/CHANGES Tue Sep 24 14:46:10 2013 (r255851) +++ head/contrib/dialog/CHANGES Tue Sep 24 14:52:43 2013 (r255852) @@ -1,9 +1,38 @@ --- $Id: CHANGES,v 1.458 2013/05/24 00:23:22 tom Exp $ +-- $Id: CHANGES,v 1.476 2013/09/24 00:06:47 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done this to it: +2013/09/23 + + fix samples/inputbox6-utf8, which had depended unnecessarily on bash. + + improve memory caching for wide-character manipulation in gauge + widget (report by Devin Teske). + + add dlg_reallocate_gauge (discussion with Devin Teske). + + updated configure macros to use msys changes from ncurses. + + update config.guess, config.sub + +2013/09/02 + + modify makefile rule to make the ".png" filenames created by groff + predictable. + + add option --help-tags to allow scripts to get the item's tag field + consistently from help- and help-item button results rather than + getting the item's text for the latter (discussion with Florent + Rougon). + + correct manpage discussion of DIALOG_ITEM_HELP versus --item-help, + as well as --help-button return status (report by Florent Rougon). + + correct limit used for --hline option (report by Devin Teske, + cf: 2011/06/30). + + do not print empty "[]" if a --hline option was given with an empty + value (report by Devin Teske). + + miscellaneous configure script fixes/updates. In particular, add + option --with-shared which builds shared libraries without a libtool + dependency. + + add FreeBSD port-files for test-builds. + + update lt.po, add fa.po from + http://translationproject.org/latest/dialog/ + + update config.guess, config.sub + 2013/05/23 + modify ifdef in arrows.c to work around packages which use the wide-character ncursesw headers with the ncurses library (report @@ -298,7 +327,7 @@ to it: separate ncurses' header files. + CF_DISABLE_RPATH_HACK, fix garbled message + CF_LD_RPATH_OPT, add mirbsd - + CF_MAKEFLAGS, filter out GNU make's entering/leaving messages. + + CF_MAKEFLAGS, filter out GNU make's entering/leaving messages. This only appeared when using the macro in a dpkg script, though it should have in other cases. + CF_RPATH_HACK, add a check for libraries not found, e.g., from Modified: head/contrib/dialog/VERSION ============================================================================== --- head/contrib/dialog/VERSION Tue Sep 24 14:46:10 2013 (r255851) +++ head/contrib/dialog/VERSION Tue Sep 24 14:52:43 2013 (r255852) @@ -1 +1 @@ -11:1:0 1.2 20130523 +11:1:0 1.2 20130923 Modified: head/contrib/dialog/aclocal.m4 ============================================================================== --- head/contrib/dialog/aclocal.m4 Tue Sep 24 14:46:10 2013 (r255851) +++ head/contrib/dialog/aclocal.m4 Tue Sep 24 14:52:43 2013 (r255852) @@ -1,7 +1,7 @@ dnl macros used for DIALOG configure script -dnl $Id: aclocal.m4,v 1.90 2012/12/02 20:07:30 tom Exp $ +dnl $Id: aclocal.m4,v 1.94 2013/09/22 14:26:24 tom Exp $ dnl --------------------------------------------------------------------------- -dnl Copyright 1999-2011,2012 -- Thomas E. Dickey +dnl Copyright 1999-2012,2013 -- Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -590,7 +590,7 @@ changequote([,])dnl AC_SUBST(GENCAT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ACVERSION_CHECK version: 3 updated: 2012/10/03 18:39:53 +dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56 dnl ------------------ dnl Conditionally generate script according to whether we're using a given autoconf. dnl @@ -599,6 +599,7 @@ dnl $2 = code to use if AC_ACVERSION is dnl $3 = code to use if AC_ACVERSION is older than $1. define([CF_ACVERSION_CHECK], [ +ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl ifdef([m4_version_compare], [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], [CF_ACVERSION_COMPARE( @@ -1125,6 +1126,27 @@ if test ".$system_name" != ".$cf_cv_syst fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 +dnl ------------------------ +dnl Show the version of libtool +dnl +dnl Save the version in a cache variable - this is not entirely a good thing, +dnl but the version string from libtool is very ugly, and for bug reports it +dnl might be useful to have the original string. +AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[ +if test -n "$LIBTOOL" && test "$LIBTOOL" != none +then + AC_MSG_CHECKING(version of $LIBTOOL) + CF_LIBTOOL_VERSION + AC_MSG_RESULT($cf_cv_libtool_version) + if test -z "$cf_cv_libtool_version" ; then + AC_MSG_ERROR(This is not GNU libtool) + fi +else + AC_MSG_ERROR(GNU libtool has not been found) +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39 dnl ----------------- dnl Check if the given compiler is really clang. clang's C driver defines @@ -1293,7 +1315,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 36 updated: 2012/07/07 21:02:48 +dnl CF_CURSES_LIBS version: 37 updated: 2013/02/09 17:33:50 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -1330,7 +1352,7 @@ hpux10.*) #(vi ac_cv_func_initscr=yes ])]) fi - ;; + ;; linux*) case `arch 2>/dev/null` in x86_64) @@ -1345,7 +1367,7 @@ linux*) CF_ADD_LIBDIR(/lib) ;; esac - ;; + ;; sunos3*|sunos4*) if test "x$cf_cv_screen" = "xcurses_5lib" then @@ -1359,59 +1381,63 @@ sunos3*|sunos4*) esac if test ".$ac_cv_func_initscr" != .yes ; then - cf_save_LIBS="$LIBS" - cf_term_lib="" - cf_curs_lib="" + cf_save_LIBS="$LIBS" - if test ".${cf_cv_ncurses_version:-no}" != .no - then - cf_check_list="ncurses curses cursesX" - else - cf_check_list="cursesX curses ncurses" - fi + if test ".${cf_cv_ncurses_version:-no}" != .no + then + cf_check_list="ncurses curses cursesX" + else + cf_check_list="cursesX curses ncurses" + fi - # Check for library containing tgoto. Do this before curses library - # because it may be needed to link the test-case for initscr. - AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ - for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown - do - AC_CHECK_LIB($cf_term_lib,tgoto,[break]) - done - ]) + # Check for library containing tgoto. Do this before curses library + # because it may be needed to link the test-case for initscr. + if test "x$cf_term_lib" = x + then + AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ + for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown + do + AC_CHECK_LIB($cf_term_lib,tgoto,[break]) + done + ]) + fi - # Check for library containing initscr - test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" - for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown - do - AC_CHECK_LIB($cf_curs_lib,initscr,[break]) - done - test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found) + # Check for library containing initscr + test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" + if test "x$cf_curs_lib" = x + then + for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown + do + AC_CHECK_LIB($cf_curs_lib,initscr,[break]) + done + fi + test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found) - LIBS="-l$cf_curs_lib $cf_save_LIBS" - if test "$cf_term_lib" = unknown ; then - AC_MSG_CHECKING(if we can link with $cf_curs_lib library) - AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], - [initscr()], - [cf_result=yes], - [cf_result=no]) - AC_MSG_RESULT($cf_result) - test $cf_result = no && AC_MSG_ERROR(Cannot link curses library) - elif test "$cf_curs_lib" = "$cf_term_lib" ; then - : - elif test "$cf_term_lib" != predefined ; then - AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) - AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], - [initscr(); tgoto((char *)0, 0, 0);], - [cf_result=no], - [ - LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" - AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], - [initscr()], - [cf_result=yes], - [cf_result=error]) - ]) - AC_MSG_RESULT($cf_result) - fi + LIBS="-l$cf_curs_lib $cf_save_LIBS" + if test "$cf_term_lib" = unknown ; then + AC_MSG_CHECKING(if we can link with $cf_curs_lib library) + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], + [initscr()], + [cf_result=yes], + [cf_result=no]) + AC_MSG_RESULT($cf_result) + test $cf_result = no && AC_MSG_ERROR(Cannot link curses library) + elif test "$cf_curs_lib" = "$cf_term_lib" ; then + : + elif test "$cf_term_lib" != predefined ; then + AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], + [initscr(); tgoto((char *)0, 0, 0);], + [cf_result=no], + [ + LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], + [initscr()], + [cf_result=yes], + [cf_result=error]) + ]) + AC_MSG_RESULT($cf_result) + fi fi fi @@ -1708,6 +1734,20 @@ if test "$cf_disable_rpath_hack" = no ; fi ]) dnl --------------------------------------------------------------------------- +dnl CF_ENABLE_RPATH version: 2 updated: 2010/03/27 18:39:42 +dnl --------------- +dnl Check if the rpath option should be used, setting cache variable +dnl cf_cv_enable_rpath if so. +AC_DEFUN([CF_ENABLE_RPATH], +[ +AC_MSG_CHECKING(if rpath option should be used) +AC_ARG_ENABLE(rpath, +[ --enable-rpath use rpath option when generating shared libraries], +[cf_cv_enable_rpath=$enableval], +[cf_cv_enable_rpath=no]) +AC_MSG_RESULT($cf_cv_enable_rpath) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54 dnl --------------- dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We @@ -1888,6 +1928,15 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_FORGET_TOOL version: 1 updated: 2013/04/06 18:03:09 +dnl -------------- +dnl Forget that we saw the given tool. +AC_DEFUN([CF_FORGET_TOOL],[ +unset ac_cv_prog_ac_ct_$1 +unset ac_ct_$1 +unset $1 +])dnl +dnl --------------------------------------------------------------------------- dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51 dnl ------------ dnl Test for the presence of , 'union wait', arg-type of 'wait()' @@ -2256,7 +2305,7 @@ test -d "$oldincludedir" && { $1="[$]$1 $cf_header_path_list" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42 +dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05 dnl ----------------- dnl Check if the given compiler is really the Intel compiler for Linux. It dnl tries to imitate gcc, but does not return an error when it finds a mismatch @@ -2270,6 +2319,7 @@ dnl $1 = GCC (default) or GXX dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS dnl $3 = CFLAGS (default) or CXXFLAGS AC_DEFUN([CF_INTEL_COMPILER],[ +AC_REQUIRE([AC_CANONICAL_HOST]) ifelse([$2],,INTEL_COMPILER,[$2])=no if test "$ifelse([$1],,[$1],GCC)" = yes ; then @@ -2415,6 +2465,18 @@ CF_SUBDIR_PATH($1,$2,lib) $1="$cf_library_path_list [$]$1" ])dnl dnl --------------------------------------------------------------------------- +dnl CF_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 +dnl ------------------ +AC_DEFUN([CF_LIBTOOL_VERSION],[ +if test -n "$LIBTOOL" && test "$LIBTOOL" != none +then + cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'` +else + cf_cv_libtool_version= +fi +test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version +])dnl +dnl --------------------------------------------------------------------------- dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 dnl ------------- dnl Compute the library-prefix for the given host system @@ -2432,6 +2494,69 @@ ifelse($1,,,[$1=$LIB_PREFIX]) AC_SUBST(LIB_PREFIX) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_LIB_SUFFIX version: 22 updated: 2013/09/07 13:54:05 +dnl ------------- +dnl Compute the library file-suffix from the given model name +dnl $1 = model name +dnl $2 = variable to set (the nominal library suffix) +dnl $3 = dependency variable to set (actual filename) +dnl The variable $LIB_SUFFIX, if set, prepends the variable to set. +AC_DEFUN([CF_LIB_SUFFIX], +[ + case X$1 in #(vi + Xlibtool) #(vi + $2='.la' + $3=[$]$2 + ;; + Xdebug) #(vi + $2='_g.a' + $3=[$]$2 + ;; + Xprofile) #(vi + $2='_p.a' + $3=[$]$2 + ;; + Xshared) #(vi + case $cf_cv_system_name in + aix[[5-7]]*) #(vi + $2='.a' + $3=[$]$2 + ;; + cygwin*|msys*|mingw*) #(vi + $2='.dll' + $3='.dll.a' + ;; + darwin*) #(vi + $2='.dylib' + $3=[$]$2 + ;; + hpux*) #(vi + case $target in + ia64*) #(vi + $2='.so' + $3=[$]$2 + ;; + *) #(vi + $2='.sl' + $3=[$]$2 + ;; + esac + ;; + *) #(vi + $2='.so' + $3=[$]$2 + ;; + esac + ;; + *) + $2='.a' + $3=[$]$2 + ;; + esac + test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}" + test -n "$LIB_SUFFIX" && $3="${LIB_SUFFIX}[$]{$3}" +])dnl +dnl --------------------------------------------------------------------------- dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46 dnl ------------ dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make' @@ -2569,7 +2694,7 @@ if test "$cf_cv_mbstate_t" != unknown ; fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03 +dnl CF_MIXEDCASE_FILENAMES version: 5 updated: 2013/09/07 13:54:05 dnl ---------------------- dnl Check if the file-system supports mixed-case filenames. If we're able to dnl create a lowercase name and see it as uppercase, it doesn't support that. @@ -2578,7 +2703,7 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES], AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[ if test "$cross_compiling" = yes ; then case $target_alias in #(vi - *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi + *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw32*|*-uwin*) #(vi cf_cv_mixedcase=no ;; *) @@ -2959,6 +3084,25 @@ case .$with_cflags in #(vi esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49 +dnl ---------------- +dnl Check if the given variable is a number. If not, report an error. +dnl $1 is the variable +dnl $2 is the message +AC_DEFUN([CF_NUMBER_SYNTAX],[ +if test -n "$1" ; then + case $1 in #(vi + [[0-9]]*) #(vi + ;; + *) + AC_MSG_ERROR($2 is not a number: $1) + ;; + esac +else + AC_MSG_ERROR($2 value is empty) +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_OUR_MESSAGES version: 7 updated: 2004/09/12 19:45:55 dnl --------------- dnl Check if we use the messages included with this program @@ -3049,6 +3193,40 @@ case ".[$]$1" in #(vi esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22 +dnl ------------- +dnl Check for the package-config program, unless disabled by command-line. +AC_DEFUN([CF_PKG_CONFIG], +[ +AC_MSG_CHECKING(if you want to use pkg-config) +AC_ARG_WITH(pkg-config, + [ --with-pkg-config{=path} enable/disable use of pkg-config], + [cf_pkg_config=$withval], + [cf_pkg_config=yes]) +AC_MSG_RESULT($cf_pkg_config) + +case $cf_pkg_config in #(vi +no) #(vi + PKG_CONFIG=none + ;; +yes) #(vi + CF_ACVERSION_CHECK(2.52, + [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)], + [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)]) + ;; +*) + PKG_CONFIG=$withval + ;; +esac + +test -z "$PKG_CONFIG" && PKG_CONFIG=none +if test "$PKG_CONFIG" != none ; then + CF_PATH_SYNTAX(PKG_CONFIG) +fi + +AC_SUBST(PKG_CONFIG) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. @@ -3168,6 +3346,28 @@ AC_CHECK_PROGS(LINT, tdlint lint alint s AC_SUBST(LINT_OPTS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37 +dnl ------------ +dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f" +dnl option if it is supported. +AC_DEFUN([CF_PROG_LN_S],[ +AC_PROG_LN_S +AC_MSG_CHECKING(if $LN_S -f options work) + +rm -f conf$$.src conf$$dst +echo >conf$$.dst +echo first >conf$$.src +if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then + cf_prog_ln_sf=yes +else + cf_prog_ln_sf=no +fi +rm -f conf$$.dst conf$$src +AC_MSG_RESULT($cf_prog_ln_sf) + +test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" +])dnl +dnl --------------------------------------------------------------------------- dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 dnl ---------------- dnl Remove all -U and -D options that refer to the given symbol from a list @@ -3185,7 +3385,7 @@ $1=`echo "$2" | \ -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33 +dnl CF_RPATH_HACK version: 11 updated: 2013/09/01 13:02:00 dnl ------------- AC_DEFUN([CF_RPATH_HACK], [ @@ -3202,8 +3402,8 @@ if test -n "$LD_RPATH_OPT" ; then AC_TRY_LINK([#include ], [printf("Hello");], - [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u` - cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`]) + [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq` + cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort | uniq`]) # If we passed the link-test, but get a "not found" on a given library, # this could be due to inept reconfiguration of gcc to make it only @@ -3236,6 +3436,8 @@ AC_TRY_LINK([#include ], CF_RPATH_HACK_2(LIBS) CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS) +else + AC_MSG_RESULT(no) fi AC_SUBST(EXTRA_LDFLAGS) ])dnl @@ -3300,6 +3502,440 @@ CF_VERBOSE(...checked $1 [$]$1) AC_SUBST(EXTRA_LDFLAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_SHARED_OPTS version: 83 updated: 2013/09/21 17:34:53 +dnl -------------- +dnl -------------- +dnl Attempt to determine the appropriate CC/LD options for creating a shared +dnl library. +dnl +dnl Notes: +dnl a) ${LOCAL_LDFLAGS} is used to link executables that will run within +dnl the build-tree, i.e., by making use of the libraries that are compiled in +dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path for the +dnl shared library since that can lead to unexpected results at runtime. +dnl b) ${LOCAL_LDFLAGS2} has the same intention but assumes that the shared +dnl libraries are compiled in ../../lib +dnl +dnl The variable 'cf_cv_do_symlinks' is used to control whether we configure +dnl to install symbolic links to the rel/abi versions of shared libraries. +dnl +dnl The variable 'cf_cv_shlib_version' controls whether we use the rel or abi +dnl version when making symbolic links. +dnl +dnl The variable 'cf_cv_shlib_version_infix' controls whether shared library +dnl version numbers are infix (ex: libncurses..dylib) or postfix +dnl (ex: libncurses.so.). +dnl +dnl Some loaders leave 'so_locations' lying around. It's nice to clean up. +AC_DEFUN([CF_SHARED_OPTS], +[ + AC_REQUIRE([CF_LD_RPATH_OPT]) + RM_SHARED_OPTS= + LOCAL_LDFLAGS= + LOCAL_LDFLAGS2= + LD_SHARED_OPTS= + INSTALL_LIB="-m 644" + : ${rel_builddir:=.} + + cf_cv_do_symlinks=no + cf_ld_rpath_opt= + test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" + + AC_MSG_CHECKING(if release/abi version should be used for shared libs) + AC_ARG_WITH(shlib-version, + [ --with-shlib-version=X Specify rel or abi version for shared libs], + [test -z "$withval" && withval=auto + case $withval in #(vi + yes) #(vi + cf_cv_shlib_version=auto + ;; + rel|abi|auto|no) #(vi + cf_cv_shlib_version=$withval + ;; + *) + AC_MSG_ERROR([option value must be one of: rel, abi, auto or no]) + ;; + esac + ],[cf_cv_shlib_version=auto]) + AC_MSG_RESULT($cf_cv_shlib_version) + + cf_cv_rm_so_locs=no + cf_try_cflags= + + # Some less-capable ports of gcc support only -fpic + CC_SHARED_OPTS= + if test "$GCC" = yes + then + AC_MSG_CHECKING(which $CC option to use) + cf_save_CFLAGS="$CFLAGS" + for CC_SHARED_OPTS in -fPIC -fpic '' + do + CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" + AC_TRY_COMPILE([#include ],[int x = 1],[break],[]) + done + AC_MSG_RESULT($CC_SHARED_OPTS) + CFLAGS="$cf_save_CFLAGS" + fi + + cf_cv_shlib_version_infix=no + + case $cf_cv_system_name in #(vi + aix4.[3-9]*|aix[[5-7]]*) #(vi + if test "$GCC" = yes; then + CC_SHARED_OPTS= + MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@' + else + # CC_SHARED_OPTS='-qpic=large -G' + # perhaps "-bM:SRE -bnoentry -bexpall" + MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@' + fi + ;; + beos*) #(vi + MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0' + ;; + cygwin*) #(vi + CC_SHARED_OPTS= + MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' + RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" + cf_cv_shlib_version=cygdll + cf_cv_shlib_version_infix=cygdll + cat >mk_shared_lib.sh <<-CF_EOF + #!/bin/sh + SHARED_LIB=\[$]1 + IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` + shift + cat <<-EOF + Linking shared library + ** SHARED_LIB \[$]SHARED_LIB + ** IMPORT_LIB \[$]IMPORT_LIB +EOF + exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} +CF_EOF + chmod +x mk_shared_lib.sh + ;; + msys*) #(vi + CC_SHARED_OPTS= + MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' + RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" + cf_cv_shlib_version=msysdll + cf_cv_shlib_version_infix=msysdll + cat >mk_shared_lib.sh <<-CF_EOF + #!/bin/sh + SHARED_LIB=\[$]1 + IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` + shift + cat <<-EOF + Linking shared library + ** SHARED_LIB \[$]SHARED_LIB + ** IMPORT_LIB \[$]IMPORT_LIB +EOF + exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} +CF_EOF + chmod +x mk_shared_lib.sh + ;; + darwin*) #(vi + cf_try_cflags="no-cpp-precomp" + CC_SHARED_OPTS="-dynamic" + MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]' + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi + cf_cv_shlib_version_infix=yes + AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [ + cf_save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + AC_TRY_LINK(, [int i;], cf_cv_ldflags_search_paths_first=yes, cf_cv_ldflags_search_paths_first=no) + LDFLAGS=$cf_save_LDFLAGS]) + if test $cf_cv_ldflags_search_paths_first = yes; then + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + fi + ;; + hpux[[7-8]]*) #(vi + # HP-UX 8.07 ld lacks "+b" option used for libdir search-list + if test "$GCC" != yes; then + CC_SHARED_OPTS='+Z' + fi + MK_SHARED_LIB='${LD} -b -o $[@]' + INSTALL_LIB="-m 555" + ;; + hpux*) #(vi + # (tested with gcc 2.7.2 -- I don't have c89) + if test "$GCC" = yes; then + LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}' + else + CC_SHARED_OPTS='+Z' + LD_SHARED_OPTS='-Wl,+b,${libdir}' + fi + MK_SHARED_LIB='${LD} +b ${libdir} -b -o $[@]' + # HP-UX shared libraries must be executable, and should be + # readonly to exploit a quirk in the memory manager. + INSTALL_LIB="-m 555" + ;; + interix*) + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel + if test "$cf_cv_shlib_version" = rel; then + cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}' + else + cf_shared_soname='`basename $@`' + fi + CC_SHARED_OPTS= + MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@' + ;; + irix*) #(vi + if test "$cf_cv_enable_rpath" = yes ; then + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" + fi + # tested with IRIX 5.2 and 'cc'. + if test "$GCC" != yes; then + CC_SHARED_OPTS='-KPIC' + MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]' + else + MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]' + fi + cf_cv_rm_so_locs=yes + ;; + linux*|gnu*|k*bsd*-gnu) #(vi + if test "$DFT_LWR_MODEL" = "shared" ; then + LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" + fi + if test "$cf_cv_enable_rpath" = yes ; then + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" + fi + CF_SHARED_SONAME + MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' + ;; + mingw*) #(vi + cf_cv_shlib_version=mingw + cf_cv_shlib_version_infix=mingw + if test "$DFT_LWR_MODEL" = "shared" ; then + LOCAL_LDFLAGS="-Wl,--enable-auto-import" + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" + EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS" + fi + CC_SHARED_OPTS= + MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' + RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" + cat >mk_shared_lib.sh <<-CF_EOF + #!/bin/sh + SHARED_LIB=\[$]1 + IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` + shift + cat <<-EOF + Linking shared library + ** SHARED_LIB \[$]SHARED_LIB + ** IMPORT_LIB \[$]IMPORT_LIB +EOF + exec \[$]* -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} +CF_EOF + chmod +x mk_shared_lib.sh + ;; + openbsd[[2-9]].*|mirbsd*) #(vi + if test "$DFT_LWR_MODEL" = "shared" ; then + LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" + fi + if test "$cf_cv_enable_rpath" = yes ; then + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" + fi + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" + CF_SHARED_SONAME + MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' + ;; + nto-qnx*|openbsd*|freebsd[[12]].*) #(vi + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" + MK_SHARED_LIB='${LD} -Bshareable -o $[@]' + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel + ;; + dragonfly*|freebsd*) #(vi + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" + if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then + LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" + LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS" + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" + fi + CF_SHARED_SONAME + MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]' + ;; + netbsd*) #(vi + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" + if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then + LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" + if test "$cf_cv_shlib_version" = auto; then + if test -f /usr/libexec/ld.elf_so; then + cf_cv_shlib_version=abi + else + cf_cv_shlib_version=rel + fi + fi + CF_SHARED_SONAME + MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]' + else + MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $[@]' + fi + ;; + osf*|mls+*) #(vi + # tested with OSF/1 V3.2 and 'cc' + # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't + # link with shared libs). + MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $[@]`' + case $host_os in #(vi + osf4*) + MK_SHARED_LIB="${MK_SHARED_LIB} -msym" + ;; + esac + MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]' + if test "$DFT_LWR_MODEL" = "shared" ; then + LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" + fi + cf_cv_rm_so_locs=yes + ;; + sco3.2v5*) # (also uw2* and UW7: hops 13-Apr-98 + # tested with osr5.0.5 + if test "$GCC" != yes; then + CC_SHARED_OPTS='-belf -KPIC' + fi + MK_SHARED_LIB='${LD} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@' + if test "$cf_cv_enable_rpath" = yes ; then + # only way is to set LD_RUN_PATH but no switch for it + RUN_PATH=$libdir + fi + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel + LINK_PROGS='LD_RUN_PATH=${libdir}' + LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib' + ;; + sunos4*) #(vi + # tested with SunOS 4.1.1 and gcc 2.7.0 + if test "$GCC" != yes; then + CC_SHARED_OPTS='-KPIC' + fi + MK_SHARED_LIB='${LD} -assert pure-text -o $[@]' + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel + ;; + solaris2*) #(vi + # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 + # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 + if test "$DFT_LWR_MODEL" = "shared" ; then + LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}" + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" + fi + if test "$cf_cv_enable_rpath" = yes ; then + EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS" + fi + CF_SHARED_SONAME + if test "$GCC" != yes; then + cf_save_CFLAGS="$CFLAGS" + for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O + do + CFLAGS="$cf_shared_opts $cf_save_CFLAGS" + AC_TRY_COMPILE([#include ],[printf("Hello\n");],[break]) + done + CFLAGS="$cf_save_CFLAGS" + CC_SHARED_OPTS=$cf_shared_opts + MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]' + else + MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]' + fi + ;; + sysv5uw7*|unix_sv*) #(vi + # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc) + if test "$GCC" != yes; then + CC_SHARED_OPTS='-KPIC' + fi + MK_SHARED_LIB='${LD} -d y -G -o [$]@' + ;; + *) + CC_SHARED_OPTS='unknown' + MK_SHARED_LIB='echo unknown' + ;; + esac + + # This works if the last tokens in $MK_SHARED_LIB are the -o target. + case "$cf_cv_shlib_version" in #(vi + rel|abi) + case "$MK_SHARED_LIB" in #(vi + *'-o $[@]') #(vi + test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes + ;; + *) + AC_MSG_WARN(ignored --with-shlib-version) + ;; + esac + ;; + esac + + if test -n "$cf_try_cflags" + then +cat > conftest.$ac_ext < +int main(int argc, char *argv[[]]) +{ + printf("hello\n"); + return (argv[[argc-1]] == 0) ; +} +EOF + cf_save_CFLAGS="$CFLAGS" + for cf_opt in $cf_try_cflags + do + CFLAGS="$cf_save_CFLAGS -$cf_opt" + AC_MSG_CHECKING(if CFLAGS option -$cf_opt works) + if AC_TRY_EVAL(ac_compile); then + AC_MSG_RESULT(yes) + cf_save_CFLAGS="$CFLAGS" + else + AC_MSG_RESULT(no) + fi + done + CFLAGS="$cf_save_CFLAGS" + fi + + + # RPATH_LIST is a colon-separated list of directories + test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}" + test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}" + + test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations" + + CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS) + CF_VERBOSE(MK_SHARED_LIB: $MK_SHARED_LIB) + + AC_SUBST(CC_SHARED_OPTS) + AC_SUBST(LD_RPATH_OPT) + AC_SUBST(LD_SHARED_OPTS) + AC_SUBST(MK_SHARED_LIB) + AC_SUBST(RM_SHARED_OPTS) + + AC_SUBST(LINK_PROGS) + AC_SUBST(LINK_TESTS) + + AC_SUBST(EXTRA_LDFLAGS) + AC_SUBST(LOCAL_LDFLAGS) + AC_SUBST(LOCAL_LDFLAGS2) + + AC_SUBST(INSTALL_LIB) + AC_SUBST(RPATH_LIST) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43 +dnl ---------------- +dnl utility macro for CF_SHARED_OPTS, constructs "$cf_cv_shared_soname" for +dnl substitution into MK_SHARED_LIB string for the "-soname" (or similar) +dnl option. +dnl +dnl $1 is the default that should be used for "$cf_cv_shlib_version". +dnl If missing, use "rel". +define([CF_SHARED_SONAME], +[ + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=ifelse($1,,rel,$1) + if test "$cf_cv_shlib_version" = rel; then + cf_cv_shared_soname='`basename $[@] .${REL_VERSION}`.${ABI_VERSION}' + else + cf_cv_shared_soname='`basename $[@]`' + fi +]) +dnl --------------------------------------------------------------------------- dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50 dnl -------------- dnl Construct a search-list for a nonstandard header/lib-file @@ -3492,7 +4128,7 @@ AC_DEFUN([CF_VERBOSE], CF_MSG_LOG([$1]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_VERSION_INFO version: 5 updated: 2012/10/06 08:57:51 +dnl CF_VERSION_INFO version: 6 updated: 2013/06/16 10:25:53 dnl --------------- dnl Define several useful symbols derived from the VERSION file. A separate dnl file is preferred to embedding the version numbers in various scripts. @@ -3557,7 +4193,7 @@ else fi # show the actual data that we have for versions: -CF_VERBOSE(VERSION $VERSION) +CF_VERBOSE(ABI VERSION $VERSION) CF_VERBOSE(VERSION_MAJOR $VERSION_MAJOR) CF_VERBOSE(VERSION_MINOR $VERSION_MINOR) CF_VERBOSE(VERSION_PATCH $VERSION_PATCH) @@ -3611,6 +4247,26 @@ fi fi *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 16:41:21 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 814C5A55; Tue, 24 Sep 2013 16:41:21 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A235C291E; Tue, 24 Sep 2013 16:41:20 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id m15so4962558wgh.7 for ; Tue, 24 Sep 2013 09:41:19 -0700 (PDT) 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=AZmubI7CeboB+Kpm0hd6tR3TrRBjWffVXivJ/FpJiRk=; b=FBePs4smLhGxi7nDBLItBTj68h5I443QIY7oxYeHrnCCql9DVfBcfDx1rqz8S92xZN eEG8FrqWUYzMJOrFhjjUT7RQZ07IV4riZhdJZ6Ig0DC55gbC+VDvYCQVIuDeuxIRNXkx bDWVSWQmjnCjW7/GwpJrqpr+3Ju7c4LIKA2N+lbjKzt0XYWzWsyFXk0vdifHbf+YSDt5 0798Vo/xrfpmvwqHyXNsGPjREgccLmwcO6WGu+TdlKuMZSW0sS3uhR8Ohipoc8GkTNoy qjDnIpqeV9sAjPCvGORdx3zkh9HB+oMF81uXqDVLFOG9U23Jo0JRyFpUFySRKCN/aKxh MoIQ== MIME-Version: 1.0 X-Received: by 10.180.206.42 with SMTP id ll10mr18966110wic.50.1380040879125; Tue, 24 Sep 2013 09:41:19 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.216.62.5 with HTTP; Tue, 24 Sep 2013 09:41:19 -0700 (PDT) In-Reply-To: <201308161847.r7GIlIGW006139@svn.freebsd.org> References: <201308161847.r7GIlIGW006139@svn.freebsd.org> Date: Tue, 24 Sep 2013 20:41:19 +0400 X-Google-Sender-Auth: iwEigrtWvrYfNCdDunh_k95-foQ Message-ID: Subject: Re: svn commit: r254419 - head/contrib/bmake From: Sergey Kandaurov To: "Simon J. Gerraty" 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 16:41:21 -0000 On 16 August 2013 22:47, Simon J. Gerraty wrote: > Author: sjg > Date: Fri Aug 16 18:47:18 2013 > New Revision: 254419 > URL: http://svnweb.freebsd.org/changeset/base/254419 > > Log: > Add .MAKE.ALWAYS_PASS_JOB_QUEUE knob (default yes) > for backwards compatability. > > Modified: > head/contrib/bmake/job.c > head/contrib/bmake/make.1 > [...] > Modified: head/contrib/bmake/make.1 > ============================================================================== > --- head/contrib/bmake/make.1 Fri Aug 16 16:55:39 2013 (r254418) > +++ head/contrib/bmake/make.1 Fri Aug 16 18:47:18 2013 (r254419) > @@ -721,6 +721,17 @@ The preferred variable to use is the env > because it is more compatible with other versions of > .Nm > and cannot be confused with the special target with the same name. > +.It Va .MAKE.ALWAYS_PASS_JOB_QUEUE > +Tells > +.Nm > +whether to pass the descriptors of the job token queue > +even if the target is not tagged with > +.Ic .MAKE > +The default is > +.Ql Pa yes > +for backwards compatability with compatibility > +.Fx 9 This results in mdoc warning. :mdoc warning: .Fx: Unknown FreeBSD version `9' (#733) -- wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 16:50:58 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 1FCDC3A8; Tue, 24 Sep 2013 16:50:58 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0BCF82A12; Tue, 24 Sep 2013 16:50: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 r8OGowFI009043; Tue, 24 Sep 2013 16:50:58 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OGorvJ008976; Tue, 24 Sep 2013 16:50:53 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201309241650.r8OGorvJ008976@svn.freebsd.org> From: Scott Long Date: Tue, 24 Sep 2013 16:50:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255853 - in head/sys: cam cam/scsi dev/asr dev/firewire dev/hpt27xx dev/hptiop dev/hptmv dev/hptnr dev/hptrr dev/iir dev/tws X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 16:50:58 -0000 Author: scottl Date: Tue Sep 24 16:50:53 2013 New Revision: 255853 URL: http://svnweb.freebsd.org/changeset/base/255853 Log: Update the CAM API for FreeBSD 10: - Remove the timeout_ch field. It's been deprecated since FreeBSD 7.0; MPSAFE drivers should be managing their own timeout storage. The remaining non-MPSAFE drivers have been modified to also manage their own storage, and should be considered for updating to MPSAFE (or removal) during the FreeBSD 10.x lifecycle. - Add fields related to soft timeouts and quality of service, to be used in upcoming work. - Add room for more flags in the CCB header and path_inq structures. - Begin support for extended 64-bit LUNs. - Bump the CAM version number to 0x18, but add compat shims. Tested with camcontrol and smartctl. Reviewed by: nathanw, ken, kib Approved by: re Obtained from: Netflix Modified: head/sys/cam/cam.h head/sys/cam/cam_ccb.h head/sys/cam/cam_compat.c head/sys/cam/cam_compat.h head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_pass.c head/sys/dev/asr/asr.c head/sys/dev/firewire/sbp.c head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c head/sys/dev/hpt27xx/os_bsd.h head/sys/dev/hptiop/hptiop.c head/sys/dev/hptiop/hptiop.h head/sys/dev/hptmv/entry.c head/sys/dev/hptmv/osbsd.h head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptnr/os_bsd.h head/sys/dev/hptrr/hptrr_osm_bsd.c head/sys/dev/hptrr/os_bsd.h head/sys/dev/iir/iir.c head/sys/dev/iir/iir.h head/sys/dev/tws/tws.c head/sys/dev/tws/tws_cam.c Modified: head/sys/cam/cam.h ============================================================================== --- head/sys/cam/cam.h Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/cam/cam.h Tue Sep 24 16:50:53 2013 (r255853) @@ -40,6 +40,10 @@ typedef u_int path_id_t; typedef u_int target_id_t; typedef u_int lun_id_t; +typedef union { + u_int64_t lun64; + u_int8_t lun[8]; +} lun64_id_t; #define CAM_XPT_PATH_ID ((path_id_t)~0) #define CAM_BUS_WILDCARD ((path_id_t)~0) @@ -120,69 +124,184 @@ enum { /* CAM Status field values */ typedef enum { - CAM_REQ_INPROG, /* CCB request is in progress */ - CAM_REQ_CMP, /* CCB request completed without error */ - CAM_REQ_ABORTED, /* CCB request aborted by the host */ - CAM_UA_ABORT, /* Unable to abort CCB request */ - CAM_REQ_CMP_ERR, /* CCB request completed with an error */ - CAM_BUSY, /* CAM subsystem is busy */ - CAM_REQ_INVALID, /* CCB request was invalid */ - CAM_PATH_INVALID, /* Supplied Path ID is invalid */ - CAM_DEV_NOT_THERE, /* SCSI Device Not Installed/there */ - CAM_UA_TERMIO, /* Unable to terminate I/O CCB request */ - CAM_SEL_TIMEOUT, /* Target Selection Timeout */ - CAM_CMD_TIMEOUT, /* Command timeout */ - CAM_SCSI_STATUS_ERROR, /* SCSI error, look at error code in CCB */ - CAM_MSG_REJECT_REC, /* Message Reject Received */ - CAM_SCSI_BUS_RESET, /* SCSI Bus Reset Sent/Received */ - CAM_UNCOR_PARITY, /* Uncorrectable parity error occurred */ - CAM_AUTOSENSE_FAIL = 0x10,/* Autosense: request sense cmd fail */ - CAM_NO_HBA, /* No HBA Detected error */ - CAM_DATA_RUN_ERR, /* Data Overrun error */ - CAM_UNEXP_BUSFREE, /* Unexpected Bus Free */ - CAM_SEQUENCE_FAIL, /* Target Bus Phase Sequence Failure */ - CAM_CCB_LEN_ERR, /* CCB length supplied is inadequate */ - CAM_PROVIDE_FAIL, /* Unable to provide requested capability */ - CAM_BDR_SENT, /* A SCSI BDR msg was sent to target */ - CAM_REQ_TERMIO, /* CCB request terminated by the host */ - CAM_UNREC_HBA_ERROR, /* Unrecoverable Host Bus Adapter Error */ - CAM_REQ_TOO_BIG, /* The request was too large for this host */ - CAM_REQUEUE_REQ, /* - * This request should be requeued to preserve - * transaction ordering. This typically occurs - * when the SIM recognizes an error that should - * freeze the queue and must place additional - * requests for the target at the sim level - * back into the XPT queue. - */ - CAM_ATA_STATUS_ERROR, /* ATA error, look at error code in CCB */ - CAM_SCSI_IT_NEXUS_LOST, /* Initiator/Target Nexus lost. */ - CAM_SMP_STATUS_ERROR, /* SMP error, look at error code in CCB */ - CAM_IDE = 0x33, /* Initiator Detected Error */ - CAM_RESRC_UNAVAIL, /* Resource Unavailable */ - CAM_UNACKED_EVENT, /* Unacknowledged Event by Host */ - CAM_MESSAGE_RECV, /* Message Received in Host Target Mode */ - CAM_INVALID_CDB, /* Invalid CDB received in Host Target Mode */ - CAM_LUN_INVALID, /* Lun supplied is invalid */ - CAM_TID_INVALID, /* Target ID supplied is invalid */ - CAM_FUNC_NOTAVAIL, /* The requested function is not available */ - CAM_NO_NEXUS, /* Nexus is not established */ - CAM_IID_INVALID, /* The initiator ID is invalid */ - CAM_CDB_RECVD, /* The SCSI CDB has been received */ - CAM_LUN_ALRDY_ENA, /* The LUN is already enabled for target mode */ - CAM_SCSI_BUSY, /* SCSI Bus Busy */ - - CAM_DEV_QFRZN = 0x40, /* The DEV queue is frozen w/this err */ - - /* Autosense data valid for target */ - CAM_AUTOSNS_VALID = 0x80, - CAM_RELEASE_SIMQ = 0x100,/* SIM ready to take more commands */ - CAM_SIM_QUEUED = 0x200,/* SIM has this command in it's queue */ + /* CCB request is in progress */ + CAM_REQ_INPROG = 0x00, - CAM_STATUS_MASK = 0x3F, /* Mask bits for just the status # */ + /* CCB request completed without error */ + CAM_REQ_CMP = 0x01, - /* Target Specific Adjunct Status */ - CAM_SENT_SENSE = 0x40000000 /* sent sense with status */ + /* CCB request aborted by the host */ + CAM_REQ_ABORTED = 0x02, + + /* Unable to abort CCB request */ + CAM_UA_ABORT = 0x03, + + /* CCB request completed with an error */ + CAM_REQ_CMP_ERR = 0x04, + + /* CAM subsystem is busy */ + CAM_BUSY = 0x05, + + /* CCB request was invalid */ + CAM_REQ_INVALID = 0x06, + + /* Supplied Path ID is invalid */ + CAM_PATH_INVALID = 0x07, + + /* SCSI Device Not Installed/there */ + CAM_DEV_NOT_THERE = 0x08, + + /* Unable to terminate I/O CCB request */ + CAM_UA_TERMIO = 0x09, + + /* Target Selection Timeout */ + CAM_SEL_TIMEOUT = 0x0a, + + /* Command timeout */ + CAM_CMD_TIMEOUT = 0x0b, + + /* SCSI error, look at error code in CCB */ + CAM_SCSI_STATUS_ERROR = 0x0c, + + /* Message Reject Received */ + CAM_MSG_REJECT_REC = 0x0d, + + /* SCSI Bus Reset Sent/Received */ + CAM_SCSI_BUS_RESET = 0x0e, + + /* Uncorrectable parity error occurred */ + CAM_UNCOR_PARITY = 0x0f, + + /* Autosense: request sense cmd fail */ + CAM_AUTOSENSE_FAIL = 0x10, + + /* No HBA Detected error */ + CAM_NO_HBA = 0x11, + + /* Data Overrun error */ + CAM_DATA_RUN_ERR = 0x12, + + /* Unexpected Bus Free */ + CAM_UNEXP_BUSFREE = 0x13, + + /* Target Bus Phase Sequence Failure */ + CAM_SEQUENCE_FAIL = 0x14, + + /* CCB length supplied is inadequate */ + CAM_CCB_LEN_ERR = 0x15, + + /* Unable to provide requested capability*/ + CAM_PROVIDE_FAIL = 0x16, + + /* A SCSI BDR msg was sent to target */ + CAM_BDR_SENT = 0x17, + + /* CCB request terminated by the host */ + CAM_REQ_TERMIO = 0x18, + + /* Unrecoverable Host Bus Adapter Error */ + CAM_UNREC_HBA_ERROR = 0x19, + + /* Request was too large for this host */ + CAM_REQ_TOO_BIG = 0x1a, + + /* + * This request should be requeued to preserve + * transaction ordering. This typically occurs + * when the SIM recognizes an error that should + * freeze the queue and must place additional + * requests for the target at the sim level + * back into the XPT queue. + */ + CAM_REQUEUE_REQ = 0x1b, + + /* ATA error, look at error code in CCB */ + CAM_ATA_STATUS_ERROR = 0x1c, + + /* Initiator/Target Nexus lost. */ + CAM_SCSI_IT_NEXUS_LOST = 0x1d, + + /* SMP error, look at error code in CCB */ + CAM_SMP_STATUS_ERROR = 0x1e, + + /* + * Command completed without error but exceeded the soft + * timeout threshold. + */ + CAM_REQ_SOFTTIMEOUT = 0x1f, + + /* + * 0x20 - 0x32 are unassigned + */ + + /* Initiator Detected Error */ + CAM_IDE = 0x33, + + /* Resource Unavailable */ + CAM_RESRC_UNAVAIL = 0x34, + + /* Unacknowledged Event by Host */ + CAM_UNACKED_EVENT = 0x35, + + /* Message Received in Host Target Mode */ + CAM_MESSAGE_RECV = 0x36, + + /* Invalid CDB received in Host Target Mode */ + CAM_INVALID_CDB = 0x37, + + /* Lun supplied is invalid */ + CAM_LUN_INVALID = 0x38, + + /* Target ID supplied is invalid */ + CAM_TID_INVALID = 0x39, + + /* The requested function is not available */ + CAM_FUNC_NOTAVAIL = 0x3a, + + /* Nexus is not established */ + CAM_NO_NEXUS = 0x3b, + + /* The initiator ID is invalid */ + CAM_IID_INVALID = 0x3c, + + /* The SCSI CDB has been received */ + CAM_CDB_RECVD = 0x3d, + + /* The LUN is already enabled for target mode */ + CAM_LUN_ALRDY_ENA = 0x3e, + + /* SCSI Bus Busy */ + CAM_SCSI_BUSY = 0x3f, + + + /* + * Flags + */ + + /* The DEV queue is frozen w/this err */ + CAM_DEV_QFRZN = 0x40, + + /* Autosense data valid for target */ + CAM_AUTOSNS_VALID = 0x80, + + /* SIM ready to take more commands */ + CAM_RELEASE_SIMQ = 0x100, + + /* SIM has this command in it's queue */ + CAM_SIM_QUEUED = 0x200, + + /* Quality of service data is valid */ + CAM_QOS_VALID = 0x400, + + /* Mask bits for just the status # */ + CAM_STATUS_MASK = 0x3F, + + /* + * Target Specific Adjunct Status + */ + + /* sent sense with status */ + CAM_SENT_SENSE = 0x40000000 } cam_status; typedef enum { Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/cam/cam_ccb.h Tue Sep 24 16:50:53 2013 (r255853) @@ -107,6 +107,10 @@ typedef enum { CAM_SEND_STATUS = 0x40000000 /* Send status after data phase */ } ccb_flags; +typedef enum { + CAM_EXTLUN_VALID = 0x00000001,/* 64bit lun field is valid */ +} ccb_xflags; + /* XPT Opcodes for xpt_action */ typedef enum { /* Function code flags are bits greater than 0xff */ @@ -296,6 +300,12 @@ typedef union { u_int8_t bytes[CCB_SIM_PRIV_SIZE * sizeof(ccb_priv_entry)]; } ccb_spriv_area; +typedef struct { + struct timeval *etime; + uintptr_t sim_data; + uintptr_t periph_data; +} ccb_qos_area; + struct ccb_hdr { cam_pinfo pinfo; /* Info for priority scheduling */ camq_entry xpt_links; /* For chaining in the XPT layer */ @@ -310,16 +320,14 @@ struct ccb_hdr { path_id_t path_id; /* Path ID for the request */ target_id_t target_id; /* Target device ID */ lun_id_t target_lun; /* Target LUN number */ + lun64_id_t ext_lun; /* 64bit extended/multi-level LUNs */ u_int32_t flags; /* ccb_flags */ + u_int32_t xflags; /* Extended flags */ ccb_ppriv_area periph_priv; ccb_spriv_area sim_priv; - u_int32_t timeout; /* Timeout value */ - - /* - * Deprecated, only for use by non-MPSAFE SIMs. All others must - * allocate and initialize their own callout storage. - */ - struct callout_handle timeout_ch; + ccb_qos_area qos; + u_int32_t timeout; /* Hard timeout value in seconds */ + struct timeval softtimeout; /* Soft timeout value in sec + usec */ }; /* Get Device Information CCB */ @@ -541,7 +549,7 @@ struct ccb_dev_match { /* * Definitions for the path inquiry CCB fields. */ -#define CAM_VERSION 0x17 /* Hex value for current version */ +#define CAM_VERSION 0x18 /* Hex value for current version */ typedef enum { PI_MDP_ABLE = 0x80, /* Supports MDP message */ @@ -564,6 +572,7 @@ typedef enum { } pi_tmflag; typedef enum { + PIM_EXTLUNS = 0x100,/* 64bit extended LUNs supported */ PIM_SCANHILO = 0x80, /* Bus scans from high ID to low ID */ PIM_NOREMOVE = 0x40, /* Removeable devices not included in scan */ PIM_NOINITIATOR = 0x20, /* Initiator role not supported. */ @@ -595,8 +604,8 @@ struct ccb_pathinq { struct ccb_hdr ccb_h; u_int8_t version_num; /* Version number for the SIM/HBA */ u_int8_t hba_inquiry; /* Mimic of INQ byte 7 for the HBA */ - u_int8_t target_sprt; /* Flags for target mode support */ - u_int8_t hba_misc; /* Misc HBA features */ + u_int16_t target_sprt; /* Flags for target mode support */ + u_int32_t hba_misc; /* Misc HBA features */ u_int16_t hba_eng_cnt; /* HBA engine count */ /* Vendor Unique capabilities */ u_int8_t vuhba_flags[VUHBALEN]; Modified: head/sys/cam/cam_compat.c ============================================================================== --- head/sys/cam/cam_compat.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/cam/cam_compat.c Tue Sep 24 16:50:53 2013 (r255853) @@ -44,23 +44,28 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include "opt_cam.h" +static int cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, + int flag, struct thread *td, d_ioctl_t *cbfnp); + int -cam_compat_ioctl(struct cdev *dev, u_long *cmd, caddr_t *addr, int *flag, struct thread *td) +cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *td, d_ioctl_t *cbfnp) { int error; - switch (*cmd) { + switch (cmd) { case CAMIOCOMMAND_0x16: { union ccb *ccb; - ccb = (union ccb *)*addr; + ccb = (union ccb *)addr; if (ccb->ccb_h.flags & CAM_SG_LIST_PHYS_0x16) { ccb->ccb_h.flags &= ~CAM_SG_LIST_PHYS_0x16; ccb->ccb_h.flags |= CAM_DATA_SG_PADDR; @@ -73,13 +78,21 @@ cam_compat_ioctl(struct cdev *dev, u_lon ccb->ccb_h.flags &= CAM_SCATTER_VALID_0x16; ccb->ccb_h.flags |= CAM_DATA_SG; } - *cmd = CAMIOCOMMAND; - error = EAGAIN; + cmd = CAMIOCOMMAND; + error = (cbfnp)(dev, cmd, addr, flag, td); break; } case CAMGETPASSTHRU_0x16: - *cmd = CAMGETPASSTHRU; - error = EAGAIN; + cmd = CAMGETPASSTHRU; + error = (cbfnp)(dev, cmd, addr, flag, td); + break; + case CAMIOCOMMAND_0x17: + cmd = CAMIOCOMMAND; + error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); + break; + case CAMGETPASSTHRU_0x17: + cmd = CAMGETPASSTHRU; + error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); break; default: error = ENOTTY; @@ -87,3 +100,105 @@ cam_compat_ioctl(struct cdev *dev, u_lon return (error); } + +static int +cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *td, d_ioctl_t *cbfnp) +{ + union ccb *ccb; + struct ccb_hdr *hdr; + struct ccb_hdr_0x17 *hdr17; + uint8_t *ccbb, *ccbb17; + u_int error; + + hdr17 = (struct ccb_hdr_0x17 *)addr; + ccb = xpt_alloc_ccb(); + hdr = &ccb->ccb_h; + + hdr->pinfo = hdr17->pinfo; + hdr->xpt_links = hdr17->xpt_links; + hdr->sim_links = hdr17->sim_links; + hdr->periph_links = hdr17->periph_links; + hdr->retry_count = hdr17->retry_count; + hdr->cbfcnp = hdr17->cbfcnp; + hdr->func_code = hdr17->func_code; + hdr->status = hdr17->status; + hdr->path = hdr17->path; + hdr->path_id = hdr17->path_id; + hdr->target_id = hdr17->target_id; + hdr->target_lun = hdr17->target_lun; + hdr->ext_lun.lun64 = 0; + hdr->flags = hdr17->flags; + hdr->xflags = 0; + hdr->periph_priv = hdr17->periph_priv; + hdr->sim_priv = hdr17->sim_priv; + hdr->timeout = hdr17->timeout; + hdr->softtimeout.tv_sec = 0; + hdr->softtimeout.tv_usec = 0; + + ccbb = (uint8_t *)&hdr[1]; + ccbb17 = (uint8_t *)&hdr17[1]; + bcopy(ccbb17, ccbb, CAM_0X17_DATA_LEN); + + error = (cbfnp)(dev, cmd, (caddr_t)ccb, flag, td); + + hdr17->pinfo = hdr->pinfo; + hdr17->xpt_links = hdr->xpt_links; + hdr17->sim_links = hdr->sim_links; + hdr17->periph_links = hdr->periph_links; + hdr17->retry_count = hdr->retry_count; + hdr17->cbfcnp = hdr->cbfcnp; + hdr17->func_code = hdr->func_code; + hdr17->status = hdr->status; + hdr17->path = hdr->path; + hdr17->path_id = hdr->path_id; + hdr17->target_id = hdr->target_id; + hdr17->target_lun = hdr->target_lun; + hdr17->flags = hdr->flags; + hdr17->periph_priv = hdr->periph_priv; + hdr17->sim_priv = hdr->sim_priv; + hdr17->timeout = hdr->timeout; + + /* The PATH_INQ only needs special handling on the way out */ + if (ccb->ccb_h.func_code != XPT_PATH_INQ) { + bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN); + } else { + struct ccb_pathinq *cpi; + struct ccb_pathinq_0x17 *cpi17; + + cpi = &ccb->cpi; + cpi17 = (struct ccb_pathinq_0x17 *)hdr17; + cpi17->version_num = cpi->version_num; + cpi17->hba_inquiry = cpi->hba_inquiry; + cpi17->target_sprt = (u_int8_t)cpi->target_sprt; + cpi17->hba_misc = (u_int8_t)cpi->hba_misc; + cpi17->hba_eng_cnt = cpi->hba_eng_cnt; + bcopy(&cpi->vuhba_flags[0], &cpi17->vuhba_flags[0], VUHBALEN); + cpi17->max_target = cpi->max_target; + cpi17->max_lun = cpi->max_lun; + cpi17->async_flags = cpi->async_flags; + cpi17->hpath_id = cpi->hpath_id; + cpi17->initiator_id = cpi->initiator_id; + bcopy(&cpi->sim_vid[0], &cpi17->sim_vid[0], SIM_IDLEN); + bcopy(&cpi->hba_vid[0], &cpi17->hba_vid[0], HBA_IDLEN); + bcopy(&cpi->dev_name[0], &cpi17->dev_name[0], DEV_IDLEN); + cpi17->unit_number = cpi->unit_number; + cpi17->bus_id = cpi->bus_id; + cpi17->base_transfer_speed = cpi->base_transfer_speed; + cpi17->protocol = cpi->protocol; + cpi17->protocol_version = cpi->protocol_version; + cpi17->transport = cpi->transport; + cpi17->transport_version = cpi->transport_version; + bcopy(&cpi->xport_specific, &cpi17->xport_specific, + PATHINQ_SETTINGS_SIZE); + cpi17->maxio = cpi->maxio; + cpi17->hba_vendor = cpi->hba_vendor; + cpi17->hba_device = cpi->hba_device; + cpi17->hba_subvendor = cpi->hba_subvendor; + cpi17->hba_subdevice = cpi->hba_subdevice; + } + + xpt_free_ccb(ccb); + + return (error); +} Modified: head/sys/cam/cam_compat.h ============================================================================== --- head/sys/cam/cam_compat.h Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/cam/cam_compat.h Tue Sep 24 16:50:53 2013 (r255853) @@ -31,7 +31,7 @@ #ifndef _CAM_CAM_COMPAT_H #define _CAM_CAM_COMPAT_H -int cam_compat_ioctl(struct cdev *dev, u_long *cmd, caddr_t *addr, int *flag, struct thread *td); +int cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp); /* Version 0x16 compatibility */ #define CAM_VERSION_0x16 0x16 @@ -44,5 +44,71 @@ int cam_compat_ioctl(struct cdev *dev, u #define CAM_SG_LIST_PHYS_0x16 0x00040000 #define CAM_DATA_PHYS_0x16 0x00200000 +/* Version 0x17 compatibility */ +#define CAM_VERSION_0x17 0x17 + +struct ccb_hdr_0x17 { + cam_pinfo pinfo; /* Info for priority scheduling */ + camq_entry xpt_links; /* For chaining in the XPT layer */ + camq_entry sim_links; /* For chaining in the SIM layer */ + camq_entry periph_links; /* For chaining in the type driver */ + u_int32_t retry_count; + void (*cbfcnp)(struct cam_periph *, union ccb *); + xpt_opcode func_code; /* XPT function code */ + u_int32_t status; /* Status returned by CAM subsystem */ + struct cam_path *path; /* Compiled path for this ccb */ + path_id_t path_id; /* Path ID for the request */ + target_id_t target_id; /* Target device ID */ + lun_id_t target_lun; /* Target LUN number */ + u_int32_t flags; /* ccb_flags */ + ccb_ppriv_area periph_priv; + ccb_spriv_area sim_priv; + u_int32_t timeout; /* Hard timeout value in seconds */ + struct callout_handle timeout_ch; +}; + +struct ccb_pathinq_0x17 { + struct ccb_hdr_0x17 ccb_h; + u_int8_t version_num; /* Version number for the SIM/HBA */ + u_int8_t hba_inquiry; /* Mimic of INQ byte 7 for the HBA */ + u_int8_t target_sprt; /* Flags for target mode support */ + u_int8_t hba_misc; /* Misc HBA features */ + u_int16_t hba_eng_cnt; /* HBA engine count */ + /* Vendor Unique capabilities */ + u_int8_t vuhba_flags[VUHBALEN]; + u_int32_t max_target; /* Maximum supported Target */ + u_int32_t max_lun; /* Maximum supported Lun */ + u_int32_t async_flags; /* Installed Async handlers */ + path_id_t hpath_id; /* Highest Path ID in the subsystem */ + target_id_t initiator_id; /* ID of the HBA on the SCSI bus */ + char sim_vid[SIM_IDLEN]; /* Vendor ID of the SIM */ + char hba_vid[HBA_IDLEN]; /* Vendor ID of the HBA */ + char dev_name[DEV_IDLEN];/* Device name for SIM */ + u_int32_t unit_number; /* Unit number for SIM */ + u_int32_t bus_id; /* Bus ID for SIM */ + u_int32_t base_transfer_speed;/* Base bus speed in KB/sec */ + cam_proto protocol; + u_int protocol_version; + cam_xport transport; + u_int transport_version; + union { + struct ccb_pathinq_settings_spi spi; + struct ccb_pathinq_settings_fc fc; + struct ccb_pathinq_settings_sas sas; + char ccb_pathinq_settings_opaque[PATHINQ_SETTINGS_SIZE]; + } xport_specific; + u_int maxio; /* Max supported I/O size, in bytes. */ + u_int16_t hba_vendor; /* HBA vendor ID */ + u_int16_t hba_device; /* HBA device ID */ + u_int16_t hba_subvendor; /* HBA subvendor ID */ + u_int16_t hba_subdevice; /* HBA subdevice ID */ +}; + +#define CAM_0X17_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr) + sizeof(struct ccb_hdr_0x17)) +#define CAM_0X17_DATA_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr_0x17)) + +#define CAMIOCOMMAND_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 2, CAM_0X17_LEN) +#define CAMGETPASSTHRU_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 3, CAM_0X17_LEN) + #endif Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/cam/cam_xpt.c Tue Sep 24 16:50:53 2013 (r255853) @@ -397,9 +397,7 @@ xptioctl(struct cdev *dev, u_long cmd, c int error; if ((error = xptdoioctl(dev, cmd, addr, flag, td)) == ENOTTY) { - error = cam_compat_ioctl(dev, &cmd, &addr, &flag, td); - if (error == EAGAIN) - return (xptdoioctl(dev, cmd, addr, flag, td)); + error = cam_compat_ioctl(dev, cmd, addr, flag, td, xptdoioctl); } return (error); } @@ -4385,8 +4383,6 @@ xpt_get_ccb(struct cam_ed *device) if (new_ccb == NULL) { return (NULL); } - if ((sim->flags & CAM_SIM_MPSAFE) == 0) - callout_handle_init(&new_ccb->ccb_h.timeout_ch); SLIST_INSERT_HEAD(&sim->ccb_freeq, &new_ccb->ccb_h, xpt_links.sle); sim->ccb_count++; Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/cam/scsi/scsi_pass.c Tue Sep 24 16:50:53 2013 (r255853) @@ -580,9 +580,7 @@ passioctl(struct cdev *dev, u_long cmd, int error; if ((error = passdoioctl(dev, cmd, addr, flag, td)) == ENOTTY) { - error = cam_compat_ioctl(dev, &cmd, &addr, &flag, td); - if (error == EAGAIN) - return (passdoioctl(dev, cmd, addr, flag, td)); + error = cam_compat_ioctl(dev, cmd, addr, flag, td, passdoioctl); } return (error); } Modified: head/sys/dev/asr/asr.c ============================================================================== --- head/sys/dev/asr/asr.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/asr/asr.c Tue Sep 24 16:50:53 2013 (r255853) @@ -385,6 +385,21 @@ typedef struct Asr_softc { static STAILQ_HEAD(, Asr_softc) Asr_softc_list = STAILQ_HEAD_INITIALIZER(Asr_softc_list); +static __inline void +set_ccb_timeout_ch(union asr_ccb *ccb, struct callout_handle ch) +{ + ccb->ccb_h.sim_priv.entries[0].ptr = ch.callout; +} + +static __inline struct callout_handle +get_ccb_timeout_ch(union asr_ccb *ccb) +{ + struct callout_handle ch; + + ch.callout = ccb->ccb_h.sim_priv.entries[0].ptr; + return ch; +} + /* * Prototypes of the routines we have in this object. */ @@ -797,8 +812,8 @@ ASR_ccbAdd(Asr_softc_t *sc, union asr_cc */ ccb->ccb_h.timeout = 6 * 60 * 1000; } - ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000); + set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, + (ccb->ccb_h.timeout * hz) / 1000)); } splx(s); } /* ASR_ccbAdd */ @@ -812,7 +827,7 @@ ASR_ccbRemove(Asr_softc_t *sc, union asr int s; s = splcam(); - untimeout(asr_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch); + untimeout(asr_timeout, (caddr_t)ccb, get_ccb_timeout_ch(ccb)); LIST_REMOVE(&(ccb->ccb_h), sim_links.le); splx(s); } /* ASR_ccbRemove */ @@ -1322,9 +1337,9 @@ asr_timeout(void *arg) cam_sim_unit(xpt_path_sim(ccb->ccb_h.path)), s); if (ASR_reset (sc) == ENXIO) { /* Try again later */ - ccb->ccb_h.timeout_ch = timeout(asr_timeout, + set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000); + (ccb->ccb_h.timeout * hz) / 1000)); } return; } @@ -1338,9 +1353,9 @@ asr_timeout(void *arg) if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_CMD_TIMEOUT) { debug_asr_printf (" AGAIN\nreinitializing adapter\n"); if (ASR_reset (sc) == ENXIO) { - ccb->ccb_h.timeout_ch = timeout(asr_timeout, + set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000); + (ccb->ccb_h.timeout * hz) / 1000)); } splx(s); return; @@ -1349,8 +1364,8 @@ asr_timeout(void *arg) /* If the BUS reset does not take, then an adapter reset is next! */ ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_CMD_TIMEOUT; - ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000); + set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, + (ccb->ccb_h.timeout * hz) / 1000)); ASR_resetBus (sc, cam_sim_bus(xpt_path_sim(ccb->ccb_h.path))); xpt_async (AC_BUS_RESET, ccb->ccb_h.path, NULL); splx(s); Modified: head/sys/dev/firewire/sbp.c ============================================================================== --- head/sys/dev/firewire/sbp.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/firewire/sbp.c Tue Sep 24 16:50:53 2013 (r255853) @@ -177,6 +177,7 @@ struct sbp_ocb { struct sbp_dev *sdev; int flags; /* XXX should be removed */ bus_dmamap_t dmamap; + struct callout_handle timeout_ch; }; #define OCB_ACT_MGM 0 @@ -591,6 +592,7 @@ END_DEBUG /* XXX */ goto next; } + callout_handle_init(&ocb->timeout_ch); sbp_free_ocb(sdev, ocb); } next: @@ -2763,7 +2765,7 @@ END_DEBUG STAILQ_REMOVE(&sdev->ocbs, ocb, sbp_ocb, ocb); if (ocb->ccb != NULL) untimeout(sbp_timeout, (caddr_t)ocb, - ocb->ccb->ccb_h.timeout_ch); + ocb->timeout_ch); if (ntohl(ocb->orb[4]) & 0xffff) { bus_dmamap_sync(sdev->target->sbp->dmat, ocb->dmamap, @@ -2836,7 +2838,7 @@ END_DEBUG STAILQ_INSERT_TAIL(&sdev->ocbs, ocb, ocb); if (ocb->ccb != NULL) - ocb->ccb->ccb_h.timeout_ch = timeout(sbp_timeout, (caddr_t)ocb, + ocb->timeout_ch = timeout(sbp_timeout, (caddr_t)ocb, (ocb->ccb->ccb_h.timeout * hz) / 1000); if (use_doorbell && prev == NULL) @@ -2930,7 +2932,7 @@ END_DEBUG } if (ocb->ccb != NULL) { untimeout(sbp_timeout, (caddr_t)ocb, - ocb->ccb->ccb_h.timeout_ch); + ocb->timeout_ch); ocb->ccb->ccb_h.status = status; SBP_LOCK(sdev->target->sbp); xpt_done(ocb->ccb); Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Sep 24 16:50:53 2013 (r255853) @@ -432,7 +432,7 @@ static void os_cmddone(PCOMMAND pCmd) KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch); + untimeout(hpt_timeout, pCmd, ext->timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -510,8 +510,7 @@ static void hpt_io_dmamap_callback(void BUS_DMASYNC_PREWRITE); } } - - ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); ldm_queue_cmd(pCmd); } @@ -1048,6 +1047,7 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } + callout_handle_init(&ext->timeout_ch); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { Modified: head/sys/dev/hpt27xx/os_bsd.h ============================================================================== --- head/sys/dev/hpt27xx/os_bsd.h Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hpt27xx/os_bsd.h Tue Sep 24 16:50:53 2013 (r255853) @@ -174,6 +174,7 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; + struct callout_handle timeout_ch; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; Modified: head/sys/dev/hptiop/hptiop.c ============================================================================== --- head/sys/dev/hptiop/hptiop.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hptiop/hptiop.c Tue Sep 24 16:50:53 2013 (r255853) @@ -643,7 +643,7 @@ static void hptiop_request_callback_mvfr ccb = (union ccb *)srb->ccb; - untimeout(hptiop_reset_adapter, hba, ccb->ccb_h.timeout_ch); + untimeout(hptiop_reset_adapter, hba, srb->timeout_ch); if (ccb->ccb_h.flags & CAM_CDB_POINTER) cdb = ccb->csio.cdb_io.cdb_ptr; @@ -2629,7 +2629,7 @@ static void hptiop_post_req_mvfrey(struc BUS_SPACE_RD4_MVFREY2(inbound_write_ptr); if (req->header.type == IOP_REQUEST_TYPE_SCSI_COMMAND) { - ccb->ccb_h.timeout_ch = timeout(hptiop_reset_adapter, hba, 20*hz); + srb->timeout_ch = timeout(hptiop_reset_adapter, hba, 20*hz); } } @@ -2741,6 +2741,7 @@ static void hptiop_map_srb(void *arg, bu tmp_srb->phy_addr = phy_addr; } + callout_handle_init(&tmp_srb->timeout_ch); hptiop_free_srb(hba, tmp_srb); hba->srb[i] = tmp_srb; phy_addr += HPT_SRB_MAX_SIZE; Modified: head/sys/dev/hptiop/hptiop.h ============================================================================== --- head/sys/dev/hptiop/hptiop.h Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hptiop/hptiop.h Tue Sep 24 16:50:53 2013 (r255853) @@ -460,6 +460,7 @@ struct hpt_iop_srb { u_int64_t phy_addr; u_int32_t srb_flag; int index; + struct callout_handle timeout_ch; }; #define hptiop_lock_adapter(hba) mtx_lock(&(hba)->lock) Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hptmv/entry.c Tue Sep 24 16:50:53 2013 (r255853) @@ -1438,6 +1438,7 @@ unregister: free(pAdapter->pbus_dmamap, M_DEVBUF); goto unregister; } + callout_handle_init(&pmap->timeout_ch); } /* setup PRD Tables */ KdPrint(("Allocate PRD Tables\n")); @@ -2758,7 +2759,7 @@ hpt_io_dmamap_callback(void *arg, bus_dm } } - ccb->ccb_h.timeout_ch = timeout(hpt_timeout, (caddr_t)ccb, 20*hz); + pmap->timeout_ch = timeout(hpt_timeout, (caddr_t)ccb, 20*hz); pVDev->pfnSendCommand(_VBUS_P pCmd); CheckPendingCall(_VBUS_P0); } @@ -2980,7 +2981,7 @@ fOsCommandDone(_VBUS_ARG PCommand pCmd) KdPrint(("fOsCommandDone(pcmd=%p, result=%d)\n", pCmd, pCmd->Result)); - untimeout(hpt_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch); + untimeout(hpt_timeout, (caddr_t)ccb, pmap->timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: Modified: head/sys/dev/hptmv/osbsd.h ============================================================================== --- head/sys/dev/hptmv/osbsd.h Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hptmv/osbsd.h Tue Sep 24 16:50:53 2013 (r255853) @@ -153,6 +153,7 @@ typedef struct _BUS_DMAMAP { struct _BUS_DMAMAP *next; struct IALAdapter *pAdapter; bus_dmamap_t dma_map; + struct callout_handle timeout_ch; SCAT_GATH psg[MAX_SG_DESCRIPTORS]; } BUS_DMAMAP, *PBUS_DMAMAP; Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- head/sys/dev/hptnr/hptnr_osm_bsd.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hptnr/hptnr_osm_bsd.c Tue Sep 24 16:50:53 2013 (r255853) @@ -432,7 +432,7 @@ static void os_cmddone(PCOMMAND pCmd) KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch); + untimeout(hpt_timeout, pCmd, ext->timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -511,7 +511,7 @@ static void hpt_io_dmamap_callback(void } } - ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); ldm_queue_cmd(pCmd); } @@ -1048,6 +1048,7 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } + callout_handle_init(&ext->timeout_ch); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { Modified: head/sys/dev/hptnr/os_bsd.h ============================================================================== --- head/sys/dev/hptnr/os_bsd.h Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hptnr/os_bsd.h Tue Sep 24 16:50:53 2013 (r255853) @@ -176,6 +176,7 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; + struct callout_handle timeout_ch; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- head/sys/dev/hptrr/hptrr_osm_bsd.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hptrr/hptrr_osm_bsd.c Tue Sep 24 16:50:53 2013 (r255853) @@ -440,7 +440,7 @@ static void os_cmddone(PCOMMAND pCmd) KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch); + untimeout(hpt_timeout, pCmd, ext->timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -519,7 +519,7 @@ static void hpt_io_dmamap_callback(void BUS_DMASYNC_PREWRITE); } } - ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); ldm_queue_cmd(pCmd); } @@ -1058,6 +1058,7 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } + callout_handle_init(&ext->timeout_ch); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { Modified: head/sys/dev/hptrr/os_bsd.h ============================================================================== --- head/sys/dev/hptrr/os_bsd.h Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/hptrr/os_bsd.h Tue Sep 24 16:50:53 2013 (r255853) @@ -174,6 +174,7 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; + struct callout_handle timeout_ch; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; Modified: head/sys/dev/iir/iir.c ============================================================================== --- head/sys/dev/iir/iir.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/iir/iir.c Tue Sep 24 16:50:53 2013 (r255853) @@ -270,6 +270,7 @@ iir_init(struct gdt_softc *gdt) gccb->gc_map_flag = TRUE; gccb->gc_scratch = &gdt->sc_gcscratch[GDT_SCRATCH_SZ * i]; gccb->gc_scratch_busbase = gdt->sc_gcscratch_busbase + GDT_SCRATCH_SZ * i; + callout_handle_init(&gccb->gc_timeout_ch); SLIST_INSERT_HEAD(&gdt->sc_free_gccb, gccb, sle); } gdt->sc_init_level++; @@ -1239,7 +1240,7 @@ gdtexecuteccb(void *arg, bus_dma_segment ccb->ccb_h.status |= CAM_SIM_QUEUED; /* timeout handling */ - ccb->ccb_h.timeout_ch = + gccb->gc_timeout_ch = timeout(iir_timeout, (caddr_t)gccb, (ccb->ccb_h.timeout * hz) / 1000); @@ -1747,7 +1748,7 @@ gdt_sync_event(struct gdt_softc *gdt, in printf("\n"); return (0); } else { - untimeout(iir_timeout, gccb, ccb->ccb_h.timeout_ch); + untimeout(iir_timeout, gccb, gccb->gc_timeout_ch); if (gdt->sc_status == GDT_S_BSY) { GDT_DPRINTF(GDT_D_DEBUG, ("gdt_sync_event(%p) gccb %p busy\n", gdt, gccb)); Modified: head/sys/dev/iir/iir.h ============================================================================== --- head/sys/dev/iir/iir.h Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/iir/iir.h Tue Sep 24 16:50:53 2013 (r255853) @@ -684,6 +684,7 @@ struct gdt_ccb { union ccb *gc_ccb; gdt_ucmd_t *gc_ucmd; bus_dmamap_t gc_dmamap; + struct callout_handle gc_timeout_ch; int gc_map_flag; int gc_timeout; u_int8_t gc_service; Modified: head/sys/dev/tws/tws.c ============================================================================== --- head/sys/dev/tws/tws.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/tws/tws.c Tue Sep 24 16:50:53 2013 (r255853) @@ -696,6 +696,7 @@ tws_init_reqs(struct tws_softc *sc, u_in sc->reqs[i].cmd_pkt->hdr.header_desc.size_header = 128; + callout_handle_init(&sc->reqs[i].thandle); sc->reqs[i].state = TWS_REQ_STATE_FREE; if ( i >= TWS_RESERVED_REQS ) tws_q_insert_tail(sc, &sc->reqs[i], TWS_FREE_Q); Modified: head/sys/dev/tws/tws_cam.c ============================================================================== --- head/sys/dev/tws/tws_cam.c Tue Sep 24 14:52:43 2013 (r255852) +++ head/sys/dev/tws/tws_cam.c Tue Sep 24 16:50:53 2013 (r255853) @@ -341,7 +341,7 @@ tws_scsi_complete(struct tws_request *re tws_q_remove_request(sc, req, TWS_BUSY_Q); mtx_unlock(&sc->q_lock); - untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch); + untimeout(tws_timeout, req, req->thandle); tws_unmap_request(req->sc, req); @@ -454,7 +454,7 @@ tws_cmd_complete(struct tws_request *req { struct tws_softc *sc = req->sc; - untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch); + untimeout(tws_timeout, req, req->thandle); tws_unmap_request(sc, req); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 16:59:29 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 5B5E067E; Tue, 24 Sep 2013 16:59:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 487B92A9D; Tue, 24 Sep 2013 16:59: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 r8OGxTXw011736; Tue, 24 Sep 2013 16:59:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OGxT2R011735; Tue, 24 Sep 2013 16:59:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309241659.r8OGxT2R011735@svn.freebsd.org> From: Glen Barber Date: Tue, 24 Sep 2013 16:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255854 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 16:59:29 -0000 Author: gjb Date: Tue Sep 24 16:59:28 2013 New Revision: 255854 URL: http://svnweb.freebsd.org/changeset/base/255854 Log: Update head/ to -ALPHA3. This commit marks the point the final KBI change was made as part of the 10.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Tue Sep 24 16:50:53 2013 (r255853) +++ head/sys/conf/newvers.sh Tue Sep 24 16:59:28 2013 (r255854) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="ALPHA2" +BRANCH="ALPHA3" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 17:01:30 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 9E847818; Tue, 24 Sep 2013 17:01:30 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7200D2AF2; Tue, 24 Sep 2013 17:01: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 r8OH1UXc014689; Tue, 24 Sep 2013 17:01:30 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OH1URq014688; Tue, 24 Sep 2013 17:01:30 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309241701.r8OH1URq014688@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 24 Sep 2013 17:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255855 - head/sys/dev/iscsi_initiator X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 17:01:30 -0000 Author: trasz Date: Tue Sep 24 17:01:29 2013 New Revision: 255855 URL: http://svnweb.freebsd.org/changeset/base/255855 Log: Improve error handling in the old initiator, preventing panic on attempt to load iscsi_initiator.ko when iscsi.ko is already loaded. Approved by: re (glebius) Sponsored by: FreeBSD Foundation Modified: head/sys/dev/iscsi_initiator/iscsi.c Modified: head/sys/dev/iscsi_initiator/iscsi.c ============================================================================== --- head/sys/dev/iscsi_initiator/iscsi.c Tue Sep 24 16:59:28 2013 (r255854) +++ head/sys/dev/iscsi_initiator/iscsi.c Tue Sep 24 17:01:29 2013 (r255855) @@ -706,7 +706,7 @@ free_pdus(struct isc_softc *sc) } } -static void +static int iscsi_start(void) { debug_called(8); @@ -715,8 +715,6 @@ iscsi_start(void) TUNABLE_INT_FETCH("net.iscsi_initiator.max_pdus", &max_pdus); isc = malloc(sizeof(struct isc_softc), M_ISCSI, M_ZERO|M_WAITOK); - isc->dev = make_dev(&iscsi_cdevsw, max_sessions, UID_ROOT, GID_WHEEL, 0600, "iscsi"); - isc->dev->si_drv1 = isc; mtx_init(&isc->isc_mtx, "iscsi-isc", NULL, MTX_DEF); TAILQ_INIT(&isc->isc_sess); @@ -726,10 +724,6 @@ iscsi_start(void) isc->pdu_zone = uma_zcreate("pdu", sizeof(pduq_t), NULL, NULL, NULL, NULL, 0, 0); - if(isc->pdu_zone == NULL) { - xdebug("iscsi_initiator: uma_zcreate failed"); - // XXX: should fail... - } uma_zone_set_max(isc->pdu_zone, max_pdus); isc->unit = new_unrhdr(0, max_sessions-1, NULL); sx_init(&isc->unit_sx, "iscsi sx"); @@ -782,7 +776,16 @@ iscsi_start(void) mtx_init(&iscsi_dbg_mtx, "iscsi_dbg", NULL, MTX_DEF); #endif + isc->dev = make_dev_credf(MAKEDEV_CHECKNAME, &iscsi_cdevsw, max_sessions, + NULL, UID_ROOT, GID_WHEEL, 0600, "iscsi"); + if (isc->dev == NULL) { + xdebug("iscsi_initiator: make_dev_credf failed"); + return (EEXIST); + } + isc->dev->si_drv1 = isc; + printf("iscsi: version %s\n", iscsi_driver_version); + return (0); } /* @@ -830,11 +833,13 @@ iscsi_stop(void) static int iscsi_modevent(module_t mod, int what, void *arg) { + int error = 0; + debug_called(8); switch(what) { case MOD_LOAD: - iscsi_start(); + error = iscsi_start(); break; case MOD_QUIESCE: @@ -854,7 +859,7 @@ iscsi_modevent(module_t mod, int what, v default: break; } - return 0; + return (error); } moduledata_t iscsi_mod = { From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 17:27:30 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id C4C2EF9D; Tue, 24 Sep 2013 17:27:30 +0000 (UTC) (envelope-from lists@yamagi.org) Received: from mail1.yamagi.org (yugo.yamagi.org [84.201.39.245]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 578A62C4A; Tue, 24 Sep 2013 17:27:29 +0000 (UTC) Received: from pd95234d5.dip0.t-ipconnect.de ([217.82.52.213] helo=maka.home.yamagi.org) by mail1.yamagi.org with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VNHLN-000NCV-1k; Sat, 21 Sep 2013 09:11:07 +0200 Date: Sat, 21 Sep 2013 09:10:58 +0200 From: Yamagi Burmeister To: trociny@FreeBSD.org Subject: Re: svn commit: r255716 - head/sbin/hastd Message-Id: <20130921091058.5137e5dcbea8b628c81f5207@yamagi.org> In-Reply-To: <201309192019.r8JKJ9Sw001364@svn.freebsd.org> References: <201309192019.r8JKJ9Sw001364@svn.freebsd.org> X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.19; amd64-portbld-freebsd8.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 17:27:30 -0000 Thank you for your hard work and help :) On Thu, 19 Sep 2013 20:19:09 +0000 (UTC) Mikolaj Golub wrote: > Author: trociny > Date: Thu Sep 19 20:19:08 2013 > New Revision: 255716 > URL: http://svnweb.freebsd.org/changeset/base/255716 > > Log: > When updating the map of dirty extents, most recently used extents are > kept dirty to reduce the number of on-disk metadata updates. The > sequence of operations is: > > 1) acquire the activemap lock; > 2) update in-memory map; > 3) if the list of keepdirty extents is changed, update on-disk metadata; > 4) release the lock. > > On-disk updates are not frequent in comparison with in-memory updates, > while require much more time. So situations are possible when one > thread is updating on-disk metadata and another one is waiting for the > activemap lock just to update the in-memory map. > > Improve this by introducing additional, on-disk map lock: when > in-memory map is updated and it is detected that the on-disk map needs > update too, the on-disk map lock is acquired and the on-memory lock is > released before flushing the map. > > Reported by: Yamagi Burmeister yamagi.org > Tested by: Yamagi Burmeister yamagi.org > Reviewed by: pjd > Approved by: re (marius) > MFC after: 2 weeks > > Modified: > head/sbin/hastd/hast.h > head/sbin/hastd/primary.c > > Modified: head/sbin/hastd/hast.h > ============================================================================== > --- head/sbin/hastd/hast.h Thu Sep 19 20:17:50 2013 (r255715) > +++ head/sbin/hastd/hast.h Thu Sep 19 20:19:08 2013 (r255716) > @@ -226,8 +226,10 @@ struct hast_resource { > > /* Activemap structure. */ > struct activemap *hr_amp; > - /* Locked used to synchronize access to hr_amp. */ > + /* Lock used to synchronize access to hr_amp. */ > pthread_mutex_t hr_amp_lock; > + /* Lock used to synchronize access to hr_amp diskmap. */ > + pthread_mutex_t hr_amp_diskmap_lock; > > /* Number of BIO_READ requests. */ > uint64_t hr_stat_read; > > Modified: head/sbin/hastd/primary.c > ============================================================================== > --- head/sbin/hastd/primary.c Thu Sep 19 20:17:50 2013 (r255715) > +++ head/sbin/hastd/primary.c Thu Sep 19 20:19:08 2013 (r255716) > @@ -291,22 +291,28 @@ primary_exitx(int exitcode, const char * > exit(exitcode); > } > > +/* Expects res->hr_amp locked, returns unlocked. */ > static int > hast_activemap_flush(struct hast_resource *res) > { > const unsigned char *buf; > size_t size; > + int ret; > > + mtx_lock(&res->hr_amp_diskmap_lock); > buf = activemap_bitmap(res->hr_amp, &size); > + mtx_unlock(&res->hr_amp_lock); > PJDLOG_ASSERT(buf != NULL); > PJDLOG_ASSERT((size % res->hr_local_sectorsize) == 0); > + ret = 0; > if (pwrite(res->hr_localfd, buf, size, METADATA_SIZE) != > (ssize_t)size) { > pjdlog_errno(LOG_ERR, "Unable to flush activemap to disk"); > res->hr_stat_activemap_write_error++; > - return (-1); > + ret = -1; > } > - if (res->hr_metaflush == 1 && g_flush(res->hr_localfd) == -1) { > + if (ret == 0 && res->hr_metaflush == 1 && > + g_flush(res->hr_localfd) == -1) { > if (errno == EOPNOTSUPP) { > pjdlog_warning("The %s provider doesn't support flushing write cache. Disabling it.", > res->hr_localpath); > @@ -315,10 +321,11 @@ hast_activemap_flush(struct hast_resourc > pjdlog_errno(LOG_ERR, > "Unable to flush disk cache on activemap update"); > res->hr_stat_activemap_flush_error++; > - return (-1); > + ret = -1; > } > } > - return (0); > + mtx_unlock(&res->hr_amp_diskmap_lock); > + return (ret); > } > > static bool > @@ -783,6 +790,7 @@ init_remote(struct hast_resource *res, s > * Now that we merged bitmaps from both nodes, flush it to the > * disk before we start to synchronize. > */ > + mtx_lock(&res->hr_amp_lock); > (void)hast_activemap_flush(res); > } > nv_free(nvin); > @@ -1288,8 +1296,9 @@ ggate_recv_thread(void *arg) > ggio->gctl_offset, ggio->gctl_length)) { > res->hr_stat_activemap_update++; > (void)hast_activemap_flush(res); > + } else { > + mtx_unlock(&res->hr_amp_lock); > } > - mtx_unlock(&res->hr_amp_lock); > break; > case BIO_DELETE: > res->hr_stat_delete++; > @@ -1650,8 +1659,9 @@ done_queue: > if (activemap_need_sync(res->hr_amp, ggio->gctl_offset, > ggio->gctl_length)) { > (void)hast_activemap_flush(res); > + } else { > + mtx_unlock(&res->hr_amp_lock); > } > - mtx_unlock(&res->hr_amp_lock); > if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) > (void)refcnt_release(&hio->hio_countdown); > } > @@ -1918,8 +1928,9 @@ ggate_send_thread(void *arg) > ggio->gctl_offset, ggio->gctl_length)) { > res->hr_stat_activemap_update++; > (void)hast_activemap_flush(res); > + } else { > + mtx_unlock(&res->hr_amp_lock); > } > - mtx_unlock(&res->hr_amp_lock); > } > if (ggio->gctl_cmd == BIO_WRITE) { > /* > @@ -2015,8 +2026,11 @@ sync_thread(void *arg __unused) > */ > if (activemap_extent_complete(res->hr_amp, syncext)) > (void)hast_activemap_flush(res); > + else > + mtx_unlock(&res->hr_amp_lock); > + } else { > + mtx_unlock(&res->hr_amp_lock); > } > - mtx_unlock(&res->hr_amp_lock); > if (dorewind) { > dorewind = false; > if (offset == -1) > _______________________________________________ > 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" -- Homepage: www.yamagi.org XMPP: yamagi@yamagi.org GnuPG/GPG: 0xEFBCCBCB From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 18:24:02 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 607B3753; Tue, 24 Sep 2013 18:24:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4DE642FD2; Tue, 24 Sep 2013 18:24: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 r8OIO2Hw059633; Tue, 24 Sep 2013 18:24:02 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OIO2fs059632; Tue, 24 Sep 2013 18:24:02 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309241824.r8OIO2fs059632@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 24 Sep 2013 18:24:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255857 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 18:24:02 -0000 Author: trasz Date: Tue Sep 24 18:24:01 2013 New Revision: 255857 URL: http://svnweb.freebsd.org/changeset/base/255857 Log: As it turns out, when MOD_LOAD handler returns error, kernel calls MOD_UNLOAD handler. Make the new iSCSI initiator not panic when this happens. Approved by: re (glebius) Sponsored by: FreeBSD Foundation Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Tue Sep 24 17:09:28 2013 (r255856) +++ head/sys/dev/iscsi/iscsi.c Tue Sep 24 18:24:01 2013 (r255857) @@ -2036,10 +2036,6 @@ iscsi_load(void) NULL, UID_ROOT, GID_WHEEL, 0600, "iscsi"); if (error != 0) { ISCSI_WARN("failed to create device node, error %d", error); - sx_destroy(&sc->sc_lock); - cv_destroy(&sc->sc_cv); - uma_zdestroy(iscsi_outstanding_zone); - free(sc, M_ISCSI); return (error); } sc->sc_cdev->si_drv1 = sc; @@ -2056,16 +2052,16 @@ iscsi_load(void) static int iscsi_unload(void) { - /* - * XXX: kldunload hangs on "devdrn". - */ struct iscsi_session *is, *tmp; - ISCSI_DEBUG("removing device node"); - destroy_dev(sc->sc_cdev); - ISCSI_DEBUG("device node removed"); + if (sc->sc_cdev != NULL) { + ISCSI_DEBUG("removing device node"); + destroy_dev(sc->sc_cdev); + ISCSI_DEBUG("device node removed"); + } - EVENTHANDLER_DEREGISTER(shutdown_post_sync, sc->sc_shutdown_eh); + if (sc->sc_shutdown_eh != NULL) + EVENTHANDLER_DEREGISTER(shutdown_post_sync, sc->sc_shutdown_eh); sx_slock(&sc->sc_lock); TAILQ_FOREACH_SAFE(is, &sc->sc_sessions, is_next, tmp) From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 19:09:22 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 0C5BB3E5; Tue, 24 Sep 2013 19:09:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ED8322283; Tue, 24 Sep 2013 19:09: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 r8OJ9LF6085320; Tue, 24 Sep 2013 19:09:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OJ9LjQ085319; Tue, 24 Sep 2013 19:09:21 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201309241909.r8OJ9LjQ085319@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Sep 2013 19:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255859 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 19:09:22 -0000 Author: jhb Date: Tue Sep 24 19:09:21 2013 New Revision: 255859 URL: http://svnweb.freebsd.org/changeset/base/255859 Log: Don't parse NO_ROOT metadata for extra kernels if NO_ROOT isn't defined. Approved by: re (gjb) MFC after: 1 week Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Sep 24 18:46:18 2013 (r255858) +++ head/Makefile.inc1 Tue Sep 24 19:09:21 2013 (r255859) @@ -1089,9 +1089,11 @@ distributekernel distributekernel.debug: KERNEL=${INSTKERNNAME}.${_kernel} \ DESTDIR=${INSTALL_DDIR}/kernel.${_kernel} \ ${.TARGET:S/distributekernel/install/} +.if defined(NO_ROOT) sed -e 's|^./kernel|.|' \ ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta > \ ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta +.endif .endfor packagekernel: From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 19:18:12 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 37AC383C; Tue, 24 Sep 2013 19:18:12 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from db8outboundpool.messaging.microsoft.com (mail-db8lp0187.outbound.messaging.microsoft.com [213.199.154.187]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA0C72316; Tue, 24 Sep 2013 19:18:11 +0000 (UTC) Received: from mail83-db8-R.bigfish.com (10.174.8.231) by DB8EHSOBE015.bigfish.com (10.174.4.78) with Microsoft SMTP Server id 14.1.225.22; Tue, 24 Sep 2013 18:32:37 +0000 Received: from mail83-db8 (localhost [127.0.0.1]) by mail83-db8-R.bigfish.com (Postfix) with ESMTP id 8C2B1540181; Tue, 24 Sep 2013 18:32:37 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.129.224.54; KIP:(null); UIP:(null); IPV:NLI; H:P-EMF01-SAC.jnpr.net; RD:none; EFVD:NLI X-SpamScore: 2 X-BigFish: VPS2(zzda00h1432Idc73hzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082kzzz2fh2a8h839hd25hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1b88h1fb3h1d0ch1d2eh1d3fh1de2h1dfeh1dffh1e23h1fe8h1ff5h1155h) Received-SPF: pass (mail83-db8: domain of juniper.net designates 66.129.224.54 as permitted sender) client-ip=66.129.224.54; envelope-from=sjg@juniper.net; helo=P-EMF01-SAC.jnpr.net ; SAC.jnpr.net ; Received: from mail83-db8 (localhost.localdomain [127.0.0.1]) by mail83-db8 (MessageSwitch) id 1380047553846031_6538; Tue, 24 Sep 2013 18:32:33 +0000 (UTC) Received: from DB8EHSMHS026.bigfish.com (unknown [10.174.8.248]) by mail83-db8.bigfish.com (Postfix) with ESMTP id B6004CC004C; Tue, 24 Sep 2013 18:32:33 +0000 (UTC) Received: from P-EMF01-SAC.jnpr.net (66.129.224.54) by DB8EHSMHS026.bigfish.com (10.174.4.36) with Microsoft SMTP Server (TLS) id 14.16.227.3; Tue, 24 Sep 2013 18:32:32 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Tue, 24 Sep 2013 11:32:29 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r8OIWIL58151; Tue, 24 Sep 2013 11:32:22 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id ADE455807E; Tue, 24 Sep 2013 11:32:14 -0700 (PDT) To: Sergey Kandaurov Subject: Re: svn commit: r254419 - head/contrib/bmake In-Reply-To: References: <201308161847.r7GIlIGW006139@svn.freebsd.org> Comments: In-reply-to: Sergey Kandaurov message dated "Tue, 24 Sep 2013 20:41:19 +0400." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 24 Sep 2013 11:32:14 -0700 Message-ID: <20130924183214.ADE455807E@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-OriginatorOrg: juniper.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 19:18:12 -0000 On Tue, 24 Sep 2013 20:41:19 +0400, Sergey Kandaurov writes: >> +.Fx 9 > >This results in mdoc warning. >:mdoc warning: .Fx: Unknown FreeBSD version `9' (#733) On what release? Surely 9 and later know about 9? From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 19:23:46 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 8F0A9B41; Tue, 24 Sep 2013 19:23:46 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-qc0-x236.google.com (mail-qc0-x236.google.com [IPv6:2607:f8b0:400d:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2BA7D2380; Tue, 24 Sep 2013 19:23:46 +0000 (UTC) Received: by mail-qc0-f182.google.com with SMTP id n4so3378875qcx.41 for ; Tue, 24 Sep 2013 12:23:45 -0700 (PDT) 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=p45Eay6elWUrhXSubp6A5VApcNx+8knkndr5tpb0BYs=; b=sUVeHBUmsxa47SW20dMswd6mIET8dnSc97fD+ZFFxeLRQ9uXS+YDbZECx0juHd4yt1 /Vw1e8pTYvO3sasdE+jIcnenMO4eNirsDjZiNOmqcOhSU/slC7JeSAgTymjzrO668fow PAfLK5qo/11J5m92ks+p74p+cuap2KELTKPjlZTIiURITiZjfRZ9UDpPU8RhBjn920LC qXaowV6ohmMM0yaZ3eHlG1KTGcGOCsHXEKipSl1Up6BIHZzw9rM9d+Dt3APZUZcmvWub PtkdHA+NRBQr/0xOK0umDH5xhfksYLVEMBfUqtujACf8zW2S7/H+JlUy5JEQj7L5GA7L OcsQ== MIME-Version: 1.0 X-Received: by 10.224.64.202 with SMTP id f10mr11869330qai.48.1380050624889; Tue, 24 Sep 2013 12:23:44 -0700 (PDT) Received: by 10.49.14.225 with HTTP; Tue, 24 Sep 2013 12:23:44 -0700 (PDT) In-Reply-To: <20130924183214.ADE455807E@chaos.jnpr.net> References: <201308161847.r7GIlIGW006139@svn.freebsd.org> <20130924183214.ADE455807E@chaos.jnpr.net> Date: Tue, 24 Sep 2013 15:23:44 -0400 Message-ID: Subject: Re: svn commit: r254419 - head/contrib/bmake From: Benjamin Kaduk To: "Simon J. Gerraty" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 19:23:46 -0000 On Tue, Sep 24, 2013 at 2:32 PM, Simon J. Gerraty wrote: > > On Tue, 24 Sep 2013 20:41:19 +0400, Sergey Kandaurov writes: > >> +.Fx 9 > > > >This results in mdoc warning. > >:mdoc warning: .Fx: Unknown FreeBSD version `9' (#733) > > On what release? > Surely 9 and later know about 9? > > There is no "FreeBSD 9,", only "FreeBSD 9.0", "FreeBSD 9.1", etc. -Ben From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 20:05:17 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 855E131C; Tue, 24 Sep 2013 20:05:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57FD725AD; Tue, 24 Sep 2013 20:05: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 r8OK5HJi016521; Tue, 24 Sep 2013 20:05:17 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OK5GBL016518; Tue, 24 Sep 2013 20:05:16 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309242005.r8OK5GBL016518@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 24 Sep 2013 20:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255860 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 20:05:17 -0000 Author: des Date: Tue Sep 24 20:05:16 2013 New Revision: 255860 URL: http://svnweb.freebsd.org/changeset/base/255860 Log: Introduce a kern.geom.notaste sysctl that can be used to temporarily disable GEOM tasting to avoid the "bouncing GEOM" problem where, when you shut down the consumer of a provider which can be viewed in multiple ways (typically a mirror whose members are labeled partitions), GEOM will immediately taste that provider's alter ego and reattach the consumer. Approved by: re (glebius) Modified: head/sys/geom/geom_int.h head/sys/geom/geom_kern.c head/sys/geom/geom_subr.c Modified: head/sys/geom/geom_int.h ============================================================================== --- head/sys/geom/geom_int.h Tue Sep 24 19:09:21 2013 (r255859) +++ head/sys/geom/geom_int.h Tue Sep 24 20:05:16 2013 (r255860) @@ -75,6 +75,7 @@ void g_io_schedule_up(struct thread *tp) /* geom_kern.c / geom_kernsim.c */ void g_init(void); extern int g_shutdown; +extern int g_notaste; /* geom_ctl.c */ void g_ctl_init(void); Modified: head/sys/geom/geom_kern.c ============================================================================== --- head/sys/geom/geom_kern.c Tue Sep 24 19:09:21 2013 (r255859) +++ head/sys/geom/geom_kern.c Tue Sep 24 20:05:16 2013 (r255860) @@ -66,6 +66,7 @@ static struct thread *g_event_td; int g_debugflags; int g_collectstats = 1; int g_shutdown; +int g_notaste; /* * G_UP and G_DOWN are the two threads which push I/O through the @@ -208,6 +209,9 @@ TUNABLE_INT("kern.geom.debugflags", &g_d SYSCTL_INT(_kern_geom, OID_AUTO, debugflags, CTLFLAG_RW, &g_debugflags, 0, "Set various trace levels for GEOM debugging"); +SYSCTL_INT(_kern_geom, OID_AUTO, notaste, CTLFLAG_RW, + &g_notaste, 0, "Prevent GEOM tasting"); + SYSCTL_INT(_kern_geom, OID_AUTO, collectstats, CTLFLAG_RW, &g_collectstats, 0, "Control statistics collection on GEOM providers and consumers"); Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Tue Sep 24 19:09:21 2013 (r255859) +++ head/sys/geom/geom_subr.c Tue Sep 24 20:05:16 2013 (r255860) @@ -271,7 +271,7 @@ g_retaste_event(void *arg, int flag) g_topology_assert(); if (flag == EV_CANCEL) /* XXX: can't happen ? */ return; - if (g_shutdown) + if (g_shutdown || g_notaste) return; hh = arg; @@ -540,6 +540,8 @@ g_new_provider_event(void *arg, int flag cp->geom->attrchanged != NULL) cp->geom->attrchanged(cp, "GEOM::media"); } + if (g_notaste) + return; LIST_FOREACH(mp, &g_classes, class) { if (mp->taste == NULL) continue; From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 20:15:00 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 21CDF51F; Tue, 24 Sep 2013 20:15:00 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F332C262A; Tue, 24 Sep 2013 20:14: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 r8OKExkn021819; Tue, 24 Sep 2013 20:14:59 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OKExTa021818; Tue, 24 Sep 2013 20:14:59 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201309242014.r8OKExTa021818@svn.freebsd.org> From: Joel Dahl Date: Tue, 24 Sep 2013 20:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255861 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 20:15:00 -0000 Author: joel (doc committer) Date: Tue Sep 24 20:14:59 2013 New Revision: 255861 URL: http://svnweb.freebsd.org/changeset/base/255861 Log: Minor mdoc fixes. Approved by: re (blanket) Modified: head/share/man/man4/bxe.4 Modified: head/share/man/man4/bxe.4 ============================================================================== --- head/share/man/man4/bxe.4 Tue Sep 24 20:05:16 2013 (r255860) +++ head/share/man/man4/bxe.4 Tue Sep 24 20:14:59 2013 (r255861) @@ -32,10 +32,7 @@ .Os .Sh NAME .Nm bxe -.Nd "Broadcom NetXtreme II Ethernet adapter driver for BCM57710 / BCM57711 / -BCM57711E / BCM57712 / BCM57712-MF / BCM57800 / BCM57800-MF / BCM57810 / -BCM57810-MF / BCM57840 / BCM57840-MF 10Gb PCIE Ethernet Network Controllers -and Broadcom NetXtreme II BCM57840 10Gb/20Gb PCIE Ethernet Network Controllers. +.Nd Broadcom NetXtreme II Ethernet 10Gb PCIe adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -54,7 +51,8 @@ if_bxe_load="YES" The .Nm driver provides support for PCIe 10Gb Ethernet adapters based on the Broadcom -NetXtreme II family of 10Gb chips. The driver supports Jumbo Frames, VLAN +NetXtreme II family of 10Gb chips. +The driver supports Jumbo Frames, VLAN tagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X interrupts, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), and Receive Side Scaling (RSS). @@ -90,35 +88,45 @@ Broadcom NetXtreme II BCM57840-MF 10Gb .El .Sh CONFIGURATION There a number of configuration parameters that can be set to tweak the -driver's behavior. These parameters can be set via the +driver's behavior. +These parameters can be set via the .Xr loader.conf 5 -file to take affect during the next system boot. The following parameters affect +file to take affect during the next system boot. +The following parameters affect ALL instances of the driver. .Bl -tag -width indent .It Va hw.bxe.debug DEFAULT = 0 .br -Sets the default logging level of the driver. See the Diagnostics and Debugging +Sets the default logging level of the driver. +See the Diagnostics and Debugging section below for more details. .It Va hw.bxe.interrupt_mode DEFAULT = 2 .br -Sets the default interrupt mode: 0=IRQ, 1=MSI, 2=MSIX. If set to MSIX and -allocation fails, the driver will roll back and attempt MSI allocation. If MSI +Sets the default interrupt mode: 0=IRQ, 1=MSI, 2=MSIX. +If set to MSIX and +allocation fails, the driver will roll back and attempt MSI allocation. +If MSI allocation fails, the driver will roll back and attempt fixed level IRQ -allocation. If IRQ allocation fails, then the driver load fails. With MSI/MSIX, +allocation. +If IRQ allocation fails, then the driver load fails. +With MSI/MSIX, the driver attempts to allocate a vector for each queue in addition to one more for default processing. .It Va hw.bxe.queue_count DEFAULT = 4 .br -Sets the default number of fast path packet processing queues. Note that one +Sets the default number of fast path packet processing queues. +Note that one MSI/MSIX interrupt vector is allocated per-queue. .It Va hw.bxe.max_rx_bufs DEFAULT = 0 .br -Sets the maximum number of receive buffers to allocate per-queue. Zero(0) means -to allocate a receive buffer for every buffer descriptor. By default this +Sets the maximum number of receive buffers to allocate per-queue. +Zero(0) means +to allocate a receive buffer for every buffer descriptor. +By default this equates to 4080 buffers per-queue which is the maximum value for this config parameter. .It Va hw.bxe.hc_rx_ticks @@ -132,14 +140,17 @@ Sets the number of ticks for host interr .It Va hw.bxe.rx_budget DEFAULT = 0xffffffff .br -Sets the maximum number of receive packets to process in an interrupt. If the +Sets the maximum number of receive packets to process in an interrupt. +If the budget is reached then the remaining/pending packets will be processed in a scheduled taskqueue. .It Va hw.bxe.max_aggregation_size DEFAULT = 32768 .br -Sets the maximum LRO aggregration byte size. The higher the value the more -packets the hardware will aggregate. Maximum is 65K. +Sets the maximum LRO aggregration byte size. +The higher the value the more +packets the hardware will aggregate. +Maximum is 65K. .It Va hw.bxe.mrrs DEFAULT = -1 .br @@ -155,11 +166,15 @@ Enable/Disable 4-tuple RSS for UDP: 0=DI .El .Pp Special care must be taken when modifying the number of queues and receive -buffers. FreeBSD imposes a limit on the maximum number of +buffers. +FreeBSD imposes a limit on the maximum number of .Xr mbuf 9 -allocations. If buffer allocations fail, the interface initialization will fail -and the interface will not be usable. The driver does not make a best effort -for buffer allocations. It is an all or nothing effort. +allocations. +If buffer allocations fail, the interface initialization will fail +and the interface will not be usable. +The driver does not make a best effort +for buffer allocations. +It is an all or nothing effort. .Pp You can tweak the .Xr mbuf 9 @@ -175,19 +190,26 @@ as follows: .Ed .Pp There are additional configuration parameters that can be set on a per-instance -basis to dynamically override the default configuration. The '#' below must be +basis to dynamically override the default configuration. +The '#' below must be replaced with the driver instance / interface unit number: .Bl -tag -width indent .It Va dev.bxe.#.debug DEFAULT = 0 .br -Sets the default logging level of the driver instance. See hw.bxe.debug above and +Sets the default logging level of the driver instance. +See +.Va hw.bxe.debug +above and the Diagnostics and Debugging section below for more details. .It Va dev.bxe.#.rx_budget DEFAULT = 0xffffffff .br Sets the maximum number of receive packets to process in an interrupt for the -driver instance. See hw.bxe.rx_budget above for more details. +driver instance. +See +.Va hw.bxe.rx_budget +above for more details. .El .Pp Additional items can be configured using @@ -221,7 +243,8 @@ DEFAULT = ON .Sh DIAGNOSTICS AND DEBUGGING There are many statistics exposed by .Nm -via sysctl. +via +.Xr sysctl 8 . .Pp To dump the default driver configuration: .Bd -literal -offset indent @@ -253,12 +276,20 @@ additional '#' with the queue number): The .Nm driver has the ability to dump a ton of debug messages to the system -log. The default level of logging can be set with the 'hw.bxe.debug' -configuration parameter. Take care with this setting as it can result in too -many logs being dumped. Since this parameter is the default one, it affects -every instance and will dramatically change the timing in the driver. A better +log. +The default level of logging can be set with the +.Va hw.bxe.debug +.Xr sysctl 8 . +Take care with this setting as it can result in too +many logs being dumped. +Since this parameter is the default one, it affects +every instance and will dramatically change the timing in the driver. +A better alternative to aid in debugging is to dynamically change the debug level of a -specific instance with the 'dev.bxe.#.debug' configuration parameter. This allows +specific instance with the +.Va dev.bxe.#.debug +.Xr sysctl 8 . +This allows you to turn on/off logging of various debug groups on-the-fly. .Pp The different debug groups that can be toggled are: @@ -288,13 +319,13 @@ When finished turn the logging back off: # sysctl dev.bxe.0.debug=0 .Ed .Sh SEE ALSO +.Xr netstat 1 , .Xr altq 4 , .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , .Xr ifconfig 8 -.Xr netstat 1 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 21:04:37 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 76C874D4; Tue, 24 Sep 2013 21:04:37 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com [216.32.181.184]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F8E32B31; Tue, 24 Sep 2013 21:04:36 +0000 (UTC) Received: from mail121-ch1-R.bigfish.com (10.43.68.233) by CH1EHSOBE007.bigfish.com (10.43.70.57) with Microsoft SMTP Server id 14.1.225.22; Tue, 24 Sep 2013 20:19:08 +0000 Received: from mail121-ch1 (localhost [127.0.0.1]) by mail121-ch1-R.bigfish.com (Postfix) with ESMTP id 3E3524400B0; Tue, 24 Sep 2013 20:19:08 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.129.224.53; KIP:(null); UIP:(null); IPV:NLI; H:P-EMF01-SAC.jnpr.net; RD:none; EFVD:NLI X-SpamScore: 3 X-BigFish: VPS3(zzda00hdc73hzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082kz8dhzz2fh2a8h839hd25hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1b88h1fb3h1d0ch1d2eh1d3fh1de2h1dfeh1dffh1e23h1fe8h1ff5h1155h) Received-SPF: pass (mail121-ch1: domain of juniper.net designates 66.129.224.53 as permitted sender) client-ip=66.129.224.53; envelope-from=sjg@juniper.net; helo=P-EMF01-SAC.jnpr.net ; SAC.jnpr.net ; Received: from mail121-ch1 (localhost.localdomain [127.0.0.1]) by mail121-ch1 (MessageSwitch) id 1380053946777614_20049; Tue, 24 Sep 2013 20:19:06 +0000 (UTC) Received: from CH1EHSMHS035.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.235]) by mail121-ch1.bigfish.com (Postfix) with ESMTP id AEC0F2C0072; Tue, 24 Sep 2013 20:19:06 +0000 (UTC) Received: from P-EMF01-SAC.jnpr.net (66.129.224.53) by CH1EHSMHS035.bigfish.com (10.43.70.35) with Microsoft SMTP Server (TLS) id 14.16.227.3; Tue, 24 Sep 2013 20:19:02 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Tue, 24 Sep 2013 13:19:01 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r8OKJ0L30758; Tue, 24 Sep 2013 13:19:00 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 795D85807E; Tue, 24 Sep 2013 13:18:56 -0700 (PDT) To: Benjamin Kaduk Subject: Re: svn commit: r254419 - head/contrib/bmake In-Reply-To: References: <201308161847.r7GIlIGW006139@svn.freebsd.org> <20130924183214.ADE455807E@chaos.jnpr.net> Comments: In-reply-to: Benjamin Kaduk message dated "Tue, 24 Sep 2013 15:23:44 -0400." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 24 Sep 2013 13:18:56 -0700 Message-ID: <20130924201856.795D85807E@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-OriginatorOrg: juniper.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 21:04:37 -0000 On Tue, 24 Sep 2013 15:23:44 -0400, Benjamin Kaduk writes: >> There is no "FreeBSD 9,", only "FreeBSD 9.0", "FreeBSD 9.1", etc. Ah - sorry. From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 01:48:50 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 870B3A89; Wed, 25 Sep 2013 01:48:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73FBA2C0B; Wed, 25 Sep 2013 01:48: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 r8P1movn005718; Wed, 25 Sep 2013 01:48:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8P1mjYW005685; Wed, 25 Sep 2013 01:48:45 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309250148.r8P1mjYW005685@svn.freebsd.org> From: Glen Barber Date: Wed, 25 Sep 2013 01:48:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255865 - in head/sys: cam cam/scsi dev/asr dev/firewire dev/hpt27xx dev/hptiop dev/hptmv dev/hptnr dev/hptrr dev/iir dev/tws X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 01:48:50 -0000 Author: gjb Date: Wed Sep 25 01:48:45 2013 New Revision: 255865 URL: http://svnweb.freebsd.org/changeset/base/255865 Log: Revert r255853 pending fixes to build errors in usr.bin/kdump Approved by: re (implicit) Modified: head/sys/cam/cam.h head/sys/cam/cam_ccb.h head/sys/cam/cam_compat.c head/sys/cam/cam_compat.h head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_pass.c head/sys/dev/asr/asr.c head/sys/dev/firewire/sbp.c head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c head/sys/dev/hpt27xx/os_bsd.h head/sys/dev/hptiop/hptiop.c head/sys/dev/hptiop/hptiop.h head/sys/dev/hptmv/entry.c head/sys/dev/hptmv/osbsd.h head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptnr/os_bsd.h head/sys/dev/hptrr/hptrr_osm_bsd.c head/sys/dev/hptrr/os_bsd.h head/sys/dev/iir/iir.c head/sys/dev/iir/iir.h head/sys/dev/tws/tws.c head/sys/dev/tws/tws_cam.c Modified: head/sys/cam/cam.h ============================================================================== --- head/sys/cam/cam.h Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/cam/cam.h Wed Sep 25 01:48:45 2013 (r255865) @@ -40,10 +40,6 @@ typedef u_int path_id_t; typedef u_int target_id_t; typedef u_int lun_id_t; -typedef union { - u_int64_t lun64; - u_int8_t lun[8]; -} lun64_id_t; #define CAM_XPT_PATH_ID ((path_id_t)~0) #define CAM_BUS_WILDCARD ((path_id_t)~0) @@ -124,184 +120,69 @@ enum { /* CAM Status field values */ typedef enum { - /* CCB request is in progress */ - CAM_REQ_INPROG = 0x00, + CAM_REQ_INPROG, /* CCB request is in progress */ + CAM_REQ_CMP, /* CCB request completed without error */ + CAM_REQ_ABORTED, /* CCB request aborted by the host */ + CAM_UA_ABORT, /* Unable to abort CCB request */ + CAM_REQ_CMP_ERR, /* CCB request completed with an error */ + CAM_BUSY, /* CAM subsystem is busy */ + CAM_REQ_INVALID, /* CCB request was invalid */ + CAM_PATH_INVALID, /* Supplied Path ID is invalid */ + CAM_DEV_NOT_THERE, /* SCSI Device Not Installed/there */ + CAM_UA_TERMIO, /* Unable to terminate I/O CCB request */ + CAM_SEL_TIMEOUT, /* Target Selection Timeout */ + CAM_CMD_TIMEOUT, /* Command timeout */ + CAM_SCSI_STATUS_ERROR, /* SCSI error, look at error code in CCB */ + CAM_MSG_REJECT_REC, /* Message Reject Received */ + CAM_SCSI_BUS_RESET, /* SCSI Bus Reset Sent/Received */ + CAM_UNCOR_PARITY, /* Uncorrectable parity error occurred */ + CAM_AUTOSENSE_FAIL = 0x10,/* Autosense: request sense cmd fail */ + CAM_NO_HBA, /* No HBA Detected error */ + CAM_DATA_RUN_ERR, /* Data Overrun error */ + CAM_UNEXP_BUSFREE, /* Unexpected Bus Free */ + CAM_SEQUENCE_FAIL, /* Target Bus Phase Sequence Failure */ + CAM_CCB_LEN_ERR, /* CCB length supplied is inadequate */ + CAM_PROVIDE_FAIL, /* Unable to provide requested capability */ + CAM_BDR_SENT, /* A SCSI BDR msg was sent to target */ + CAM_REQ_TERMIO, /* CCB request terminated by the host */ + CAM_UNREC_HBA_ERROR, /* Unrecoverable Host Bus Adapter Error */ + CAM_REQ_TOO_BIG, /* The request was too large for this host */ + CAM_REQUEUE_REQ, /* + * This request should be requeued to preserve + * transaction ordering. This typically occurs + * when the SIM recognizes an error that should + * freeze the queue and must place additional + * requests for the target at the sim level + * back into the XPT queue. + */ + CAM_ATA_STATUS_ERROR, /* ATA error, look at error code in CCB */ + CAM_SCSI_IT_NEXUS_LOST, /* Initiator/Target Nexus lost. */ + CAM_SMP_STATUS_ERROR, /* SMP error, look at error code in CCB */ + CAM_IDE = 0x33, /* Initiator Detected Error */ + CAM_RESRC_UNAVAIL, /* Resource Unavailable */ + CAM_UNACKED_EVENT, /* Unacknowledged Event by Host */ + CAM_MESSAGE_RECV, /* Message Received in Host Target Mode */ + CAM_INVALID_CDB, /* Invalid CDB received in Host Target Mode */ + CAM_LUN_INVALID, /* Lun supplied is invalid */ + CAM_TID_INVALID, /* Target ID supplied is invalid */ + CAM_FUNC_NOTAVAIL, /* The requested function is not available */ + CAM_NO_NEXUS, /* Nexus is not established */ + CAM_IID_INVALID, /* The initiator ID is invalid */ + CAM_CDB_RECVD, /* The SCSI CDB has been received */ + CAM_LUN_ALRDY_ENA, /* The LUN is already enabled for target mode */ + CAM_SCSI_BUSY, /* SCSI Bus Busy */ + + CAM_DEV_QFRZN = 0x40, /* The DEV queue is frozen w/this err */ + + /* Autosense data valid for target */ + CAM_AUTOSNS_VALID = 0x80, + CAM_RELEASE_SIMQ = 0x100,/* SIM ready to take more commands */ + CAM_SIM_QUEUED = 0x200,/* SIM has this command in it's queue */ - /* CCB request completed without error */ - CAM_REQ_CMP = 0x01, + CAM_STATUS_MASK = 0x3F, /* Mask bits for just the status # */ - /* CCB request aborted by the host */ - CAM_REQ_ABORTED = 0x02, - - /* Unable to abort CCB request */ - CAM_UA_ABORT = 0x03, - - /* CCB request completed with an error */ - CAM_REQ_CMP_ERR = 0x04, - - /* CAM subsystem is busy */ - CAM_BUSY = 0x05, - - /* CCB request was invalid */ - CAM_REQ_INVALID = 0x06, - - /* Supplied Path ID is invalid */ - CAM_PATH_INVALID = 0x07, - - /* SCSI Device Not Installed/there */ - CAM_DEV_NOT_THERE = 0x08, - - /* Unable to terminate I/O CCB request */ - CAM_UA_TERMIO = 0x09, - - /* Target Selection Timeout */ - CAM_SEL_TIMEOUT = 0x0a, - - /* Command timeout */ - CAM_CMD_TIMEOUT = 0x0b, - - /* SCSI error, look at error code in CCB */ - CAM_SCSI_STATUS_ERROR = 0x0c, - - /* Message Reject Received */ - CAM_MSG_REJECT_REC = 0x0d, - - /* SCSI Bus Reset Sent/Received */ - CAM_SCSI_BUS_RESET = 0x0e, - - /* Uncorrectable parity error occurred */ - CAM_UNCOR_PARITY = 0x0f, - - /* Autosense: request sense cmd fail */ - CAM_AUTOSENSE_FAIL = 0x10, - - /* No HBA Detected error */ - CAM_NO_HBA = 0x11, - - /* Data Overrun error */ - CAM_DATA_RUN_ERR = 0x12, - - /* Unexpected Bus Free */ - CAM_UNEXP_BUSFREE = 0x13, - - /* Target Bus Phase Sequence Failure */ - CAM_SEQUENCE_FAIL = 0x14, - - /* CCB length supplied is inadequate */ - CAM_CCB_LEN_ERR = 0x15, - - /* Unable to provide requested capability*/ - CAM_PROVIDE_FAIL = 0x16, - - /* A SCSI BDR msg was sent to target */ - CAM_BDR_SENT = 0x17, - - /* CCB request terminated by the host */ - CAM_REQ_TERMIO = 0x18, - - /* Unrecoverable Host Bus Adapter Error */ - CAM_UNREC_HBA_ERROR = 0x19, - - /* Request was too large for this host */ - CAM_REQ_TOO_BIG = 0x1a, - - /* - * This request should be requeued to preserve - * transaction ordering. This typically occurs - * when the SIM recognizes an error that should - * freeze the queue and must place additional - * requests for the target at the sim level - * back into the XPT queue. - */ - CAM_REQUEUE_REQ = 0x1b, - - /* ATA error, look at error code in CCB */ - CAM_ATA_STATUS_ERROR = 0x1c, - - /* Initiator/Target Nexus lost. */ - CAM_SCSI_IT_NEXUS_LOST = 0x1d, - - /* SMP error, look at error code in CCB */ - CAM_SMP_STATUS_ERROR = 0x1e, - - /* - * Command completed without error but exceeded the soft - * timeout threshold. - */ - CAM_REQ_SOFTTIMEOUT = 0x1f, - - /* - * 0x20 - 0x32 are unassigned - */ - - /* Initiator Detected Error */ - CAM_IDE = 0x33, - - /* Resource Unavailable */ - CAM_RESRC_UNAVAIL = 0x34, - - /* Unacknowledged Event by Host */ - CAM_UNACKED_EVENT = 0x35, - - /* Message Received in Host Target Mode */ - CAM_MESSAGE_RECV = 0x36, - - /* Invalid CDB received in Host Target Mode */ - CAM_INVALID_CDB = 0x37, - - /* Lun supplied is invalid */ - CAM_LUN_INVALID = 0x38, - - /* Target ID supplied is invalid */ - CAM_TID_INVALID = 0x39, - - /* The requested function is not available */ - CAM_FUNC_NOTAVAIL = 0x3a, - - /* Nexus is not established */ - CAM_NO_NEXUS = 0x3b, - - /* The initiator ID is invalid */ - CAM_IID_INVALID = 0x3c, - - /* The SCSI CDB has been received */ - CAM_CDB_RECVD = 0x3d, - - /* The LUN is already enabled for target mode */ - CAM_LUN_ALRDY_ENA = 0x3e, - - /* SCSI Bus Busy */ - CAM_SCSI_BUSY = 0x3f, - - - /* - * Flags - */ - - /* The DEV queue is frozen w/this err */ - CAM_DEV_QFRZN = 0x40, - - /* Autosense data valid for target */ - CAM_AUTOSNS_VALID = 0x80, - - /* SIM ready to take more commands */ - CAM_RELEASE_SIMQ = 0x100, - - /* SIM has this command in it's queue */ - CAM_SIM_QUEUED = 0x200, - - /* Quality of service data is valid */ - CAM_QOS_VALID = 0x400, - - /* Mask bits for just the status # */ - CAM_STATUS_MASK = 0x3F, - - /* - * Target Specific Adjunct Status - */ - - /* sent sense with status */ - CAM_SENT_SENSE = 0x40000000 + /* Target Specific Adjunct Status */ + CAM_SENT_SENSE = 0x40000000 /* sent sense with status */ } cam_status; typedef enum { Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/cam/cam_ccb.h Wed Sep 25 01:48:45 2013 (r255865) @@ -107,10 +107,6 @@ typedef enum { CAM_SEND_STATUS = 0x40000000 /* Send status after data phase */ } ccb_flags; -typedef enum { - CAM_EXTLUN_VALID = 0x00000001,/* 64bit lun field is valid */ -} ccb_xflags; - /* XPT Opcodes for xpt_action */ typedef enum { /* Function code flags are bits greater than 0xff */ @@ -300,12 +296,6 @@ typedef union { u_int8_t bytes[CCB_SIM_PRIV_SIZE * sizeof(ccb_priv_entry)]; } ccb_spriv_area; -typedef struct { - struct timeval *etime; - uintptr_t sim_data; - uintptr_t periph_data; -} ccb_qos_area; - struct ccb_hdr { cam_pinfo pinfo; /* Info for priority scheduling */ camq_entry xpt_links; /* For chaining in the XPT layer */ @@ -320,14 +310,16 @@ struct ccb_hdr { path_id_t path_id; /* Path ID for the request */ target_id_t target_id; /* Target device ID */ lun_id_t target_lun; /* Target LUN number */ - lun64_id_t ext_lun; /* 64bit extended/multi-level LUNs */ u_int32_t flags; /* ccb_flags */ - u_int32_t xflags; /* Extended flags */ ccb_ppriv_area periph_priv; ccb_spriv_area sim_priv; - ccb_qos_area qos; - u_int32_t timeout; /* Hard timeout value in seconds */ - struct timeval softtimeout; /* Soft timeout value in sec + usec */ + u_int32_t timeout; /* Timeout value */ + + /* + * Deprecated, only for use by non-MPSAFE SIMs. All others must + * allocate and initialize their own callout storage. + */ + struct callout_handle timeout_ch; }; /* Get Device Information CCB */ @@ -549,7 +541,7 @@ struct ccb_dev_match { /* * Definitions for the path inquiry CCB fields. */ -#define CAM_VERSION 0x18 /* Hex value for current version */ +#define CAM_VERSION 0x17 /* Hex value for current version */ typedef enum { PI_MDP_ABLE = 0x80, /* Supports MDP message */ @@ -572,7 +564,6 @@ typedef enum { } pi_tmflag; typedef enum { - PIM_EXTLUNS = 0x100,/* 64bit extended LUNs supported */ PIM_SCANHILO = 0x80, /* Bus scans from high ID to low ID */ PIM_NOREMOVE = 0x40, /* Removeable devices not included in scan */ PIM_NOINITIATOR = 0x20, /* Initiator role not supported. */ @@ -604,8 +595,8 @@ struct ccb_pathinq { struct ccb_hdr ccb_h; u_int8_t version_num; /* Version number for the SIM/HBA */ u_int8_t hba_inquiry; /* Mimic of INQ byte 7 for the HBA */ - u_int16_t target_sprt; /* Flags for target mode support */ - u_int32_t hba_misc; /* Misc HBA features */ + u_int8_t target_sprt; /* Flags for target mode support */ + u_int8_t hba_misc; /* Misc HBA features */ u_int16_t hba_eng_cnt; /* HBA engine count */ /* Vendor Unique capabilities */ u_int8_t vuhba_flags[VUHBALEN]; Modified: head/sys/cam/cam_compat.c ============================================================================== --- head/sys/cam/cam_compat.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/cam/cam_compat.c Wed Sep 25 01:48:45 2013 (r255865) @@ -44,28 +44,23 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include "opt_cam.h" -static int cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, - int flag, struct thread *td, d_ioctl_t *cbfnp); - int -cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, - struct thread *td, d_ioctl_t *cbfnp) +cam_compat_ioctl(struct cdev *dev, u_long *cmd, caddr_t *addr, int *flag, struct thread *td) { int error; - switch (cmd) { + switch (*cmd) { case CAMIOCOMMAND_0x16: { union ccb *ccb; - ccb = (union ccb *)addr; + ccb = (union ccb *)*addr; if (ccb->ccb_h.flags & CAM_SG_LIST_PHYS_0x16) { ccb->ccb_h.flags &= ~CAM_SG_LIST_PHYS_0x16; ccb->ccb_h.flags |= CAM_DATA_SG_PADDR; @@ -78,21 +73,13 @@ cam_compat_ioctl(struct cdev *dev, u_lon ccb->ccb_h.flags &= CAM_SCATTER_VALID_0x16; ccb->ccb_h.flags |= CAM_DATA_SG; } - cmd = CAMIOCOMMAND; - error = (cbfnp)(dev, cmd, addr, flag, td); + *cmd = CAMIOCOMMAND; + error = EAGAIN; break; } case CAMGETPASSTHRU_0x16: - cmd = CAMGETPASSTHRU; - error = (cbfnp)(dev, cmd, addr, flag, td); - break; - case CAMIOCOMMAND_0x17: - cmd = CAMIOCOMMAND; - error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); - break; - case CAMGETPASSTHRU_0x17: - cmd = CAMGETPASSTHRU; - error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); + *cmd = CAMGETPASSTHRU; + error = EAGAIN; break; default: error = ENOTTY; @@ -100,105 +87,3 @@ cam_compat_ioctl(struct cdev *dev, u_lon return (error); } - -static int -cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, int flag, - struct thread *td, d_ioctl_t *cbfnp) -{ - union ccb *ccb; - struct ccb_hdr *hdr; - struct ccb_hdr_0x17 *hdr17; - uint8_t *ccbb, *ccbb17; - u_int error; - - hdr17 = (struct ccb_hdr_0x17 *)addr; - ccb = xpt_alloc_ccb(); - hdr = &ccb->ccb_h; - - hdr->pinfo = hdr17->pinfo; - hdr->xpt_links = hdr17->xpt_links; - hdr->sim_links = hdr17->sim_links; - hdr->periph_links = hdr17->periph_links; - hdr->retry_count = hdr17->retry_count; - hdr->cbfcnp = hdr17->cbfcnp; - hdr->func_code = hdr17->func_code; - hdr->status = hdr17->status; - hdr->path = hdr17->path; - hdr->path_id = hdr17->path_id; - hdr->target_id = hdr17->target_id; - hdr->target_lun = hdr17->target_lun; - hdr->ext_lun.lun64 = 0; - hdr->flags = hdr17->flags; - hdr->xflags = 0; - hdr->periph_priv = hdr17->periph_priv; - hdr->sim_priv = hdr17->sim_priv; - hdr->timeout = hdr17->timeout; - hdr->softtimeout.tv_sec = 0; - hdr->softtimeout.tv_usec = 0; - - ccbb = (uint8_t *)&hdr[1]; - ccbb17 = (uint8_t *)&hdr17[1]; - bcopy(ccbb17, ccbb, CAM_0X17_DATA_LEN); - - error = (cbfnp)(dev, cmd, (caddr_t)ccb, flag, td); - - hdr17->pinfo = hdr->pinfo; - hdr17->xpt_links = hdr->xpt_links; - hdr17->sim_links = hdr->sim_links; - hdr17->periph_links = hdr->periph_links; - hdr17->retry_count = hdr->retry_count; - hdr17->cbfcnp = hdr->cbfcnp; - hdr17->func_code = hdr->func_code; - hdr17->status = hdr->status; - hdr17->path = hdr->path; - hdr17->path_id = hdr->path_id; - hdr17->target_id = hdr->target_id; - hdr17->target_lun = hdr->target_lun; - hdr17->flags = hdr->flags; - hdr17->periph_priv = hdr->periph_priv; - hdr17->sim_priv = hdr->sim_priv; - hdr17->timeout = hdr->timeout; - - /* The PATH_INQ only needs special handling on the way out */ - if (ccb->ccb_h.func_code != XPT_PATH_INQ) { - bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN); - } else { - struct ccb_pathinq *cpi; - struct ccb_pathinq_0x17 *cpi17; - - cpi = &ccb->cpi; - cpi17 = (struct ccb_pathinq_0x17 *)hdr17; - cpi17->version_num = cpi->version_num; - cpi17->hba_inquiry = cpi->hba_inquiry; - cpi17->target_sprt = (u_int8_t)cpi->target_sprt; - cpi17->hba_misc = (u_int8_t)cpi->hba_misc; - cpi17->hba_eng_cnt = cpi->hba_eng_cnt; - bcopy(&cpi->vuhba_flags[0], &cpi17->vuhba_flags[0], VUHBALEN); - cpi17->max_target = cpi->max_target; - cpi17->max_lun = cpi->max_lun; - cpi17->async_flags = cpi->async_flags; - cpi17->hpath_id = cpi->hpath_id; - cpi17->initiator_id = cpi->initiator_id; - bcopy(&cpi->sim_vid[0], &cpi17->sim_vid[0], SIM_IDLEN); - bcopy(&cpi->hba_vid[0], &cpi17->hba_vid[0], HBA_IDLEN); - bcopy(&cpi->dev_name[0], &cpi17->dev_name[0], DEV_IDLEN); - cpi17->unit_number = cpi->unit_number; - cpi17->bus_id = cpi->bus_id; - cpi17->base_transfer_speed = cpi->base_transfer_speed; - cpi17->protocol = cpi->protocol; - cpi17->protocol_version = cpi->protocol_version; - cpi17->transport = cpi->transport; - cpi17->transport_version = cpi->transport_version; - bcopy(&cpi->xport_specific, &cpi17->xport_specific, - PATHINQ_SETTINGS_SIZE); - cpi17->maxio = cpi->maxio; - cpi17->hba_vendor = cpi->hba_vendor; - cpi17->hba_device = cpi->hba_device; - cpi17->hba_subvendor = cpi->hba_subvendor; - cpi17->hba_subdevice = cpi->hba_subdevice; - } - - xpt_free_ccb(ccb); - - return (error); -} Modified: head/sys/cam/cam_compat.h ============================================================================== --- head/sys/cam/cam_compat.h Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/cam/cam_compat.h Wed Sep 25 01:48:45 2013 (r255865) @@ -31,7 +31,7 @@ #ifndef _CAM_CAM_COMPAT_H #define _CAM_CAM_COMPAT_H -int cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp); +int cam_compat_ioctl(struct cdev *dev, u_long *cmd, caddr_t *addr, int *flag, struct thread *td); /* Version 0x16 compatibility */ #define CAM_VERSION_0x16 0x16 @@ -44,71 +44,5 @@ int cam_compat_ioctl(struct cdev *dev, u #define CAM_SG_LIST_PHYS_0x16 0x00040000 #define CAM_DATA_PHYS_0x16 0x00200000 -/* Version 0x17 compatibility */ -#define CAM_VERSION_0x17 0x17 - -struct ccb_hdr_0x17 { - cam_pinfo pinfo; /* Info for priority scheduling */ - camq_entry xpt_links; /* For chaining in the XPT layer */ - camq_entry sim_links; /* For chaining in the SIM layer */ - camq_entry periph_links; /* For chaining in the type driver */ - u_int32_t retry_count; - void (*cbfcnp)(struct cam_periph *, union ccb *); - xpt_opcode func_code; /* XPT function code */ - u_int32_t status; /* Status returned by CAM subsystem */ - struct cam_path *path; /* Compiled path for this ccb */ - path_id_t path_id; /* Path ID for the request */ - target_id_t target_id; /* Target device ID */ - lun_id_t target_lun; /* Target LUN number */ - u_int32_t flags; /* ccb_flags */ - ccb_ppriv_area periph_priv; - ccb_spriv_area sim_priv; - u_int32_t timeout; /* Hard timeout value in seconds */ - struct callout_handle timeout_ch; -}; - -struct ccb_pathinq_0x17 { - struct ccb_hdr_0x17 ccb_h; - u_int8_t version_num; /* Version number for the SIM/HBA */ - u_int8_t hba_inquiry; /* Mimic of INQ byte 7 for the HBA */ - u_int8_t target_sprt; /* Flags for target mode support */ - u_int8_t hba_misc; /* Misc HBA features */ - u_int16_t hba_eng_cnt; /* HBA engine count */ - /* Vendor Unique capabilities */ - u_int8_t vuhba_flags[VUHBALEN]; - u_int32_t max_target; /* Maximum supported Target */ - u_int32_t max_lun; /* Maximum supported Lun */ - u_int32_t async_flags; /* Installed Async handlers */ - path_id_t hpath_id; /* Highest Path ID in the subsystem */ - target_id_t initiator_id; /* ID of the HBA on the SCSI bus */ - char sim_vid[SIM_IDLEN]; /* Vendor ID of the SIM */ - char hba_vid[HBA_IDLEN]; /* Vendor ID of the HBA */ - char dev_name[DEV_IDLEN];/* Device name for SIM */ - u_int32_t unit_number; /* Unit number for SIM */ - u_int32_t bus_id; /* Bus ID for SIM */ - u_int32_t base_transfer_speed;/* Base bus speed in KB/sec */ - cam_proto protocol; - u_int protocol_version; - cam_xport transport; - u_int transport_version; - union { - struct ccb_pathinq_settings_spi spi; - struct ccb_pathinq_settings_fc fc; - struct ccb_pathinq_settings_sas sas; - char ccb_pathinq_settings_opaque[PATHINQ_SETTINGS_SIZE]; - } xport_specific; - u_int maxio; /* Max supported I/O size, in bytes. */ - u_int16_t hba_vendor; /* HBA vendor ID */ - u_int16_t hba_device; /* HBA device ID */ - u_int16_t hba_subvendor; /* HBA subvendor ID */ - u_int16_t hba_subdevice; /* HBA subdevice ID */ -}; - -#define CAM_0X17_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr) + sizeof(struct ccb_hdr_0x17)) -#define CAM_0X17_DATA_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr_0x17)) - -#define CAMIOCOMMAND_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 2, CAM_0X17_LEN) -#define CAMGETPASSTHRU_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 3, CAM_0X17_LEN) - #endif Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/cam/cam_xpt.c Wed Sep 25 01:48:45 2013 (r255865) @@ -397,7 +397,9 @@ xptioctl(struct cdev *dev, u_long cmd, c int error; if ((error = xptdoioctl(dev, cmd, addr, flag, td)) == ENOTTY) { - error = cam_compat_ioctl(dev, cmd, addr, flag, td, xptdoioctl); + error = cam_compat_ioctl(dev, &cmd, &addr, &flag, td); + if (error == EAGAIN) + return (xptdoioctl(dev, cmd, addr, flag, td)); } return (error); } @@ -4383,6 +4385,8 @@ xpt_get_ccb(struct cam_ed *device) if (new_ccb == NULL) { return (NULL); } + if ((sim->flags & CAM_SIM_MPSAFE) == 0) + callout_handle_init(&new_ccb->ccb_h.timeout_ch); SLIST_INSERT_HEAD(&sim->ccb_freeq, &new_ccb->ccb_h, xpt_links.sle); sim->ccb_count++; Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/cam/scsi/scsi_pass.c Wed Sep 25 01:48:45 2013 (r255865) @@ -580,7 +580,9 @@ passioctl(struct cdev *dev, u_long cmd, int error; if ((error = passdoioctl(dev, cmd, addr, flag, td)) == ENOTTY) { - error = cam_compat_ioctl(dev, cmd, addr, flag, td, passdoioctl); + error = cam_compat_ioctl(dev, &cmd, &addr, &flag, td); + if (error == EAGAIN) + return (passdoioctl(dev, cmd, addr, flag, td)); } return (error); } Modified: head/sys/dev/asr/asr.c ============================================================================== --- head/sys/dev/asr/asr.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/asr/asr.c Wed Sep 25 01:48:45 2013 (r255865) @@ -385,21 +385,6 @@ typedef struct Asr_softc { static STAILQ_HEAD(, Asr_softc) Asr_softc_list = STAILQ_HEAD_INITIALIZER(Asr_softc_list); -static __inline void -set_ccb_timeout_ch(union asr_ccb *ccb, struct callout_handle ch) -{ - ccb->ccb_h.sim_priv.entries[0].ptr = ch.callout; -} - -static __inline struct callout_handle -get_ccb_timeout_ch(union asr_ccb *ccb) -{ - struct callout_handle ch; - - ch.callout = ccb->ccb_h.sim_priv.entries[0].ptr; - return ch; -} - /* * Prototypes of the routines we have in this object. */ @@ -812,8 +797,8 @@ ASR_ccbAdd(Asr_softc_t *sc, union asr_cc */ ccb->ccb_h.timeout = 6 * 60 * 1000; } - set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000)); + ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb, + (ccb->ccb_h.timeout * hz) / 1000); } splx(s); } /* ASR_ccbAdd */ @@ -827,7 +812,7 @@ ASR_ccbRemove(Asr_softc_t *sc, union asr int s; s = splcam(); - untimeout(asr_timeout, (caddr_t)ccb, get_ccb_timeout_ch(ccb)); + untimeout(asr_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch); LIST_REMOVE(&(ccb->ccb_h), sim_links.le); splx(s); } /* ASR_ccbRemove */ @@ -1337,9 +1322,9 @@ asr_timeout(void *arg) cam_sim_unit(xpt_path_sim(ccb->ccb_h.path)), s); if (ASR_reset (sc) == ENXIO) { /* Try again later */ - set_ccb_timeout_ch(ccb, timeout(asr_timeout, + ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000)); + (ccb->ccb_h.timeout * hz) / 1000); } return; } @@ -1353,9 +1338,9 @@ asr_timeout(void *arg) if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_CMD_TIMEOUT) { debug_asr_printf (" AGAIN\nreinitializing adapter\n"); if (ASR_reset (sc) == ENXIO) { - set_ccb_timeout_ch(ccb, timeout(asr_timeout, + ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000)); + (ccb->ccb_h.timeout * hz) / 1000); } splx(s); return; @@ -1364,8 +1349,8 @@ asr_timeout(void *arg) /* If the BUS reset does not take, then an adapter reset is next! */ ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_CMD_TIMEOUT; - set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000)); + ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb, + (ccb->ccb_h.timeout * hz) / 1000); ASR_resetBus (sc, cam_sim_bus(xpt_path_sim(ccb->ccb_h.path))); xpt_async (AC_BUS_RESET, ccb->ccb_h.path, NULL); splx(s); Modified: head/sys/dev/firewire/sbp.c ============================================================================== --- head/sys/dev/firewire/sbp.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/firewire/sbp.c Wed Sep 25 01:48:45 2013 (r255865) @@ -177,7 +177,6 @@ struct sbp_ocb { struct sbp_dev *sdev; int flags; /* XXX should be removed */ bus_dmamap_t dmamap; - struct callout_handle timeout_ch; }; #define OCB_ACT_MGM 0 @@ -592,7 +591,6 @@ END_DEBUG /* XXX */ goto next; } - callout_handle_init(&ocb->timeout_ch); sbp_free_ocb(sdev, ocb); } next: @@ -2765,7 +2763,7 @@ END_DEBUG STAILQ_REMOVE(&sdev->ocbs, ocb, sbp_ocb, ocb); if (ocb->ccb != NULL) untimeout(sbp_timeout, (caddr_t)ocb, - ocb->timeout_ch); + ocb->ccb->ccb_h.timeout_ch); if (ntohl(ocb->orb[4]) & 0xffff) { bus_dmamap_sync(sdev->target->sbp->dmat, ocb->dmamap, @@ -2838,7 +2836,7 @@ END_DEBUG STAILQ_INSERT_TAIL(&sdev->ocbs, ocb, ocb); if (ocb->ccb != NULL) - ocb->timeout_ch = timeout(sbp_timeout, (caddr_t)ocb, + ocb->ccb->ccb_h.timeout_ch = timeout(sbp_timeout, (caddr_t)ocb, (ocb->ccb->ccb_h.timeout * hz) / 1000); if (use_doorbell && prev == NULL) @@ -2932,7 +2930,7 @@ END_DEBUG } if (ocb->ccb != NULL) { untimeout(sbp_timeout, (caddr_t)ocb, - ocb->timeout_ch); + ocb->ccb->ccb_h.timeout_ch); ocb->ccb->ccb_h.status = status; SBP_LOCK(sdev->target->sbp); xpt_done(ocb->ccb); Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Wed Sep 25 01:48:45 2013 (r255865) @@ -432,7 +432,7 @@ static void os_cmddone(PCOMMAND pCmd) KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - untimeout(hpt_timeout, pCmd, ext->timeout_ch); + untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -510,7 +510,8 @@ static void hpt_io_dmamap_callback(void BUS_DMASYNC_PREWRITE); } } - ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + + ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); ldm_queue_cmd(pCmd); } @@ -1047,7 +1048,6 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } - callout_handle_init(&ext->timeout_ch); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { Modified: head/sys/dev/hpt27xx/os_bsd.h ============================================================================== --- head/sys/dev/hpt27xx/os_bsd.h Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hpt27xx/os_bsd.h Wed Sep 25 01:48:45 2013 (r255865) @@ -174,7 +174,6 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; - struct callout_handle timeout_ch; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; Modified: head/sys/dev/hptiop/hptiop.c ============================================================================== --- head/sys/dev/hptiop/hptiop.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hptiop/hptiop.c Wed Sep 25 01:48:45 2013 (r255865) @@ -643,7 +643,7 @@ static void hptiop_request_callback_mvfr ccb = (union ccb *)srb->ccb; - untimeout(hptiop_reset_adapter, hba, srb->timeout_ch); + untimeout(hptiop_reset_adapter, hba, ccb->ccb_h.timeout_ch); if (ccb->ccb_h.flags & CAM_CDB_POINTER) cdb = ccb->csio.cdb_io.cdb_ptr; @@ -2629,7 +2629,7 @@ static void hptiop_post_req_mvfrey(struc BUS_SPACE_RD4_MVFREY2(inbound_write_ptr); if (req->header.type == IOP_REQUEST_TYPE_SCSI_COMMAND) { - srb->timeout_ch = timeout(hptiop_reset_adapter, hba, 20*hz); + ccb->ccb_h.timeout_ch = timeout(hptiop_reset_adapter, hba, 20*hz); } } @@ -2741,7 +2741,6 @@ static void hptiop_map_srb(void *arg, bu tmp_srb->phy_addr = phy_addr; } - callout_handle_init(&tmp_srb->timeout_ch); hptiop_free_srb(hba, tmp_srb); hba->srb[i] = tmp_srb; phy_addr += HPT_SRB_MAX_SIZE; Modified: head/sys/dev/hptiop/hptiop.h ============================================================================== --- head/sys/dev/hptiop/hptiop.h Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hptiop/hptiop.h Wed Sep 25 01:48:45 2013 (r255865) @@ -460,7 +460,6 @@ struct hpt_iop_srb { u_int64_t phy_addr; u_int32_t srb_flag; int index; - struct callout_handle timeout_ch; }; #define hptiop_lock_adapter(hba) mtx_lock(&(hba)->lock) Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hptmv/entry.c Wed Sep 25 01:48:45 2013 (r255865) @@ -1438,7 +1438,6 @@ unregister: free(pAdapter->pbus_dmamap, M_DEVBUF); goto unregister; } - callout_handle_init(&pmap->timeout_ch); } /* setup PRD Tables */ KdPrint(("Allocate PRD Tables\n")); @@ -2759,7 +2758,7 @@ hpt_io_dmamap_callback(void *arg, bus_dm } } - pmap->timeout_ch = timeout(hpt_timeout, (caddr_t)ccb, 20*hz); + ccb->ccb_h.timeout_ch = timeout(hpt_timeout, (caddr_t)ccb, 20*hz); pVDev->pfnSendCommand(_VBUS_P pCmd); CheckPendingCall(_VBUS_P0); } @@ -2981,7 +2980,7 @@ fOsCommandDone(_VBUS_ARG PCommand pCmd) KdPrint(("fOsCommandDone(pcmd=%p, result=%d)\n", pCmd, pCmd->Result)); - untimeout(hpt_timeout, (caddr_t)ccb, pmap->timeout_ch); + untimeout(hpt_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: Modified: head/sys/dev/hptmv/osbsd.h ============================================================================== --- head/sys/dev/hptmv/osbsd.h Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hptmv/osbsd.h Wed Sep 25 01:48:45 2013 (r255865) @@ -153,7 +153,6 @@ typedef struct _BUS_DMAMAP { struct _BUS_DMAMAP *next; struct IALAdapter *pAdapter; bus_dmamap_t dma_map; - struct callout_handle timeout_ch; SCAT_GATH psg[MAX_SG_DESCRIPTORS]; } BUS_DMAMAP, *PBUS_DMAMAP; Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- head/sys/dev/hptnr/hptnr_osm_bsd.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hptnr/hptnr_osm_bsd.c Wed Sep 25 01:48:45 2013 (r255865) @@ -432,7 +432,7 @@ static void os_cmddone(PCOMMAND pCmd) KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - untimeout(hpt_timeout, pCmd, ext->timeout_ch); + untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -511,7 +511,7 @@ static void hpt_io_dmamap_callback(void } } - ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); ldm_queue_cmd(pCmd); } @@ -1048,7 +1048,6 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } - callout_handle_init(&ext->timeout_ch); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { Modified: head/sys/dev/hptnr/os_bsd.h ============================================================================== --- head/sys/dev/hptnr/os_bsd.h Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hptnr/os_bsd.h Wed Sep 25 01:48:45 2013 (r255865) @@ -176,7 +176,6 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; - struct callout_handle timeout_ch; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- head/sys/dev/hptrr/hptrr_osm_bsd.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hptrr/hptrr_osm_bsd.c Wed Sep 25 01:48:45 2013 (r255865) @@ -440,7 +440,7 @@ static void os_cmddone(PCOMMAND pCmd) KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - untimeout(hpt_timeout, pCmd, ext->timeout_ch); + untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -519,7 +519,7 @@ static void hpt_io_dmamap_callback(void BUS_DMASYNC_PREWRITE); } } - ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); ldm_queue_cmd(pCmd); } @@ -1058,7 +1058,6 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } - callout_handle_init(&ext->timeout_ch); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { Modified: head/sys/dev/hptrr/os_bsd.h ============================================================================== --- head/sys/dev/hptrr/os_bsd.h Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/hptrr/os_bsd.h Wed Sep 25 01:48:45 2013 (r255865) @@ -174,7 +174,6 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; - struct callout_handle timeout_ch; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; Modified: head/sys/dev/iir/iir.c ============================================================================== --- head/sys/dev/iir/iir.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/iir/iir.c Wed Sep 25 01:48:45 2013 (r255865) @@ -270,7 +270,6 @@ iir_init(struct gdt_softc *gdt) gccb->gc_map_flag = TRUE; gccb->gc_scratch = &gdt->sc_gcscratch[GDT_SCRATCH_SZ * i]; gccb->gc_scratch_busbase = gdt->sc_gcscratch_busbase + GDT_SCRATCH_SZ * i; - callout_handle_init(&gccb->gc_timeout_ch); SLIST_INSERT_HEAD(&gdt->sc_free_gccb, gccb, sle); } gdt->sc_init_level++; @@ -1240,7 +1239,7 @@ gdtexecuteccb(void *arg, bus_dma_segment ccb->ccb_h.status |= CAM_SIM_QUEUED; /* timeout handling */ - gccb->gc_timeout_ch = + ccb->ccb_h.timeout_ch = timeout(iir_timeout, (caddr_t)gccb, (ccb->ccb_h.timeout * hz) / 1000); @@ -1748,7 +1747,7 @@ gdt_sync_event(struct gdt_softc *gdt, in printf("\n"); return (0); } else { - untimeout(iir_timeout, gccb, gccb->gc_timeout_ch); + untimeout(iir_timeout, gccb, ccb->ccb_h.timeout_ch); if (gdt->sc_status == GDT_S_BSY) { GDT_DPRINTF(GDT_D_DEBUG, ("gdt_sync_event(%p) gccb %p busy\n", gdt, gccb)); Modified: head/sys/dev/iir/iir.h ============================================================================== --- head/sys/dev/iir/iir.h Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/iir/iir.h Wed Sep 25 01:48:45 2013 (r255865) @@ -684,7 +684,6 @@ struct gdt_ccb { union ccb *gc_ccb; gdt_ucmd_t *gc_ucmd; bus_dmamap_t gc_dmamap; - struct callout_handle gc_timeout_ch; int gc_map_flag; int gc_timeout; u_int8_t gc_service; Modified: head/sys/dev/tws/tws.c ============================================================================== --- head/sys/dev/tws/tws.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/tws/tws.c Wed Sep 25 01:48:45 2013 (r255865) @@ -696,7 +696,6 @@ tws_init_reqs(struct tws_softc *sc, u_in sc->reqs[i].cmd_pkt->hdr.header_desc.size_header = 128; - callout_handle_init(&sc->reqs[i].thandle); sc->reqs[i].state = TWS_REQ_STATE_FREE; if ( i >= TWS_RESERVED_REQS ) tws_q_insert_tail(sc, &sc->reqs[i], TWS_FREE_Q); Modified: head/sys/dev/tws/tws_cam.c ============================================================================== --- head/sys/dev/tws/tws_cam.c Tue Sep 24 21:44:23 2013 (r255864) +++ head/sys/dev/tws/tws_cam.c Wed Sep 25 01:48:45 2013 (r255865) @@ -341,7 +341,7 @@ tws_scsi_complete(struct tws_request *re tws_q_remove_request(sc, req, TWS_BUSY_Q); mtx_unlock(&sc->q_lock); - untimeout(tws_timeout, req, req->thandle); + untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch); tws_unmap_request(req->sc, req); @@ -454,7 +454,7 @@ tws_cmd_complete(struct tws_request *req { struct tws_softc *sc = req->sc; - untimeout(tws_timeout, req, req->thandle); + untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch); tws_unmap_request(sc, req); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 02:48:12 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id B354D836; Wed, 25 Sep 2013 02:48:12 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A18F32EC7; Wed, 25 Sep 2013 02:48: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 r8P2mCqT038671; Wed, 25 Sep 2013 02:48:12 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8P2mCkX038670; Wed, 25 Sep 2013 02:48:12 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201309250248.r8P2mCkX038670@svn.freebsd.org> From: John-Mark Gurney Date: Wed, 25 Sep 2013 02:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255866 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 02:48:12 -0000 Author: jmg Date: Wed Sep 25 02:48:12 2013 New Revision: 255866 URL: http://svnweb.freebsd.org/changeset/base/255866 Log: fix a bug where we access a bread buffer after we have brelse'd it... The kernel normally didn't unmap/context switch away before we accessed the buffer most of the time, but under heavy I/O pressure and lots of mount/unmounting this would cause a fault on nofault panic... Reviewed by: dteske Approved by: re (kib) Sponsored by: Vicor MFC after: 3 days Modified: head/sys/fs/cd9660/cd9660_vfsops.c Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Wed Sep 25 01:48:45 2013 (r255865) +++ head/sys/fs/cd9660/cd9660_vfsops.c Wed Sep 25 02:48:12 2013 (r255866) @@ -390,11 +390,11 @@ iso_mountfs(devvp, mp) /* Check the Rock Ridge Extension support */ if (!(isomp->im_flags & ISOFSMNT_NORRIP)) { - if ((error = bread(isomp->im_devvp, - (isomp->root_extent + isonum_711(rootp->ext_attr_length)) << - (isomp->im_bshift - DEV_BSHIFT), - isomp->logical_block_size, NOCRED, &bp)) != 0) - goto out; + if ((error = bread(isomp->im_devvp, (isomp->root_extent + + isonum_711(((struct iso_directory_record *)isomp->root)-> + ext_attr_length)) << (isomp->im_bshift - DEV_BSHIFT), + isomp->logical_block_size, NOCRED, &bp)) != 0) + goto out; rootp = (struct iso_directory_record *)bp->b_data; From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 02:49:19 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 2DCD3A9B; Wed, 25 Sep 2013 02:49:19 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C5C12EE0; Wed, 25 Sep 2013 02:49: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 r8P2nIGo039119; Wed, 25 Sep 2013 02:49:18 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8P2nIAg039118; Wed, 25 Sep 2013 02:49:18 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201309250249.r8P2nIAg039118@svn.freebsd.org> From: John-Mark Gurney Date: Wed, 25 Sep 2013 02:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255867 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 02:49:19 -0000 Author: jmg Date: Wed Sep 25 02:49:18 2013 New Revision: 255867 URL: http://svnweb.freebsd.org/changeset/base/255867 Log: NULL stale pointers (should be a no-op as they should no longer be used)... Reviewed by: dteske Approved by: re (kib) Sponsored by: Vicor MFC after: 3 days Modified: head/sys/fs/cd9660/cd9660_vfsops.c Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Wed Sep 25 02:48:12 2013 (r255866) +++ head/sys/fs/cd9660/cd9660_vfsops.c Wed Sep 25 02:49:18 2013 (r255867) @@ -369,6 +369,9 @@ iso_mountfs(devvp, mp) pribp->b_flags |= B_AGE; brelse(pribp); pribp = NULL; + rootp = NULL; + pri = NULL; + pri_sierra = NULL; mp->mnt_data = isomp; mp->mnt_stat.f_fsid.val[0] = dev2udev(dev); @@ -411,6 +414,7 @@ iso_mountfs(devvp, mp) bp->b_flags |= B_AGE; brelse(bp); bp = NULL; + rootp = NULL; } if (isomp->im_flags & ISOFSMNT_KICONV && cd9660_iconv) { @@ -465,6 +469,7 @@ iso_mountfs(devvp, mp) if (supbp) { brelse(supbp); supbp = NULL; + sup = NULL; } return 0; From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 10:34:07 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 70DB4251 for ; Wed, 25 Sep 2013 10:34:07 +0000 (UTC) (envelope-from bryan@shatow.net) 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 1CD492A56 for ; Wed, 25 Sep 2013 10:34:07 +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=aEd53gR/f4Gb7p3WXK3tGckESm3BJgspn uYS8H+rb+n1fxMbfiT2ebAwwPL+hUfDTIQlkOCpeIhAsa0U/MnBjGet8Jm2YSk8J q4C7XLdtJRJxSln0DZiCzEBdorR68q/UfwOup1cKdTsb/GjMAP7qEnbZFfbkyfpa pD9wxgG+x0= 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=vIgIoW5ZcQPFO4sZ5IOhB/qg1J5g7DJRrLu+JHa 4Jks=; b=O153tPwTOAswkUpKCDuYGyWt8VSX2VOgBeLgr3amkHHC387F7ryzQ/9 +5WBzS92OTpro9TCkpkLMMH/QzJ7682NYsP0d88W7kNYG+W23ACcPc8qdsTIsAMo CyTy9pQSkCjiPTQ9Qw1bq2BREnLUjARQ+60b1HOBukfXW/0k8PSE= Received: (qmail 4592 invoked from network); 25 Sep 2013 05:34:03 -0500 Received: from unknown (HELO admin.xzibition.com) (bryan@shatow.net@173.160.118.90) by sweb.xzibition.com with ESMTPA; 25 Sep 2013 05:34:03 -0500 Date: Wed, 25 Sep 2013 05:34:02 -0500 From: Bryan Drewery To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r255850 - in head: share/mk tools/build/options Message-ID: <20130925103402.GH74496@admin.xzibition.com> References: <201309241433.r8OEXV74033244@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/Gk0KcsbyUMelFU1" Content-Disposition: inline In-Reply-To: <201309241433.r8OEXV74033244@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 10:34:07 -0000 --/Gk0KcsbyUMelFU1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 24, 2013 at 02:33:31PM +0000, Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Tue Sep 24 14:33:31 2013 > New Revision: 255850 > URL: http://svnweb.freebsd.org/changeset/base/255850 >=20 > Log: > Flip the switch: disable BIND and enable LDNS_UTILS. > =20 > Approved by: re (blanket) >=20 > Added: > head/tools/build/options/WITHOUT_LDNS_UTILS > - copied, changed from r255826, head/tools/build/options/WITH_LDNS_U= TILS > head/tools/build/options/WITH_BIND > - copied, changed from r255849, head/tools/build/options/WITHOUT_BIND > Deleted: > head/tools/build/options/WITHOUT_BIND > head/tools/build/options/WITH_LDNS_UTILS > Modified: > head/share/mk/bsd.own.mk >=20 Saw this on 'make delete-old': rmdir: /usr/share/doc/bind9/arm: Directory not empty rmdir: /usr/share/doc/bind9/misc: Directory not empty rmdir: /usr/share/doc/bind9: Directory not empty There are some leftover files that need to be added to ObsoleteFiles: /usr/share/doc/bind9 /usr/share/doc/bind9/HISTORY /usr/share/doc/bind9/misc /usr/share/doc/bind9/misc/sort-options.pl /usr/share/doc/bind9/arm /usr/share/doc/bind9/arm/man.nsec3hash.html /usr/share/doc/bind9/arm/man.rndc-confgen.html /usr/share/doc/bind9/arm/man.dnssec-signzone.html /usr/share/doc/bind9/arm/man.named.html /usr/share/doc/bind9/arm/Bv9ARM.pdf /usr/share/doc/bind9/arm/man.named-checkconf.html /usr/share/doc/bind9/arm/man.host.html /usr/share/doc/bind9/arm/man.dig.html /usr/share/doc/bind9/arm/man.isc-hmac-fixup.html /usr/share/doc/bind9/arm/man.dnssec-keyfromlabel.html /usr/share/doc/bind9/arm/man.rndc.conf.html /usr/share/doc/bind9/arm/man.named-checkzone.html /usr/share/doc/bind9/arm/man.nsupdate.html /usr/share/doc/bind9/arm/man.arpaname.html /usr/share/doc/bind9/arm/man.dnssec-dsfromkey.html /usr/share/doc/bind9/arm/man.dnssec-settime.html /usr/share/doc/bind9/arm/man.dnssec-keygen.html /usr/share/doc/bind9/arm/man.named-journalprint.html /usr/share/doc/bind9/arm/man.ddns-confgen.html /usr/share/doc/bind9/arm/man.rndc.html /usr/share/doc/bind9/arm/man.genrandom.html /usr/share/doc/bind9/arm/man.dnssec-revoke.html /usr/share/doc/bind9/arm/man.dnssec-verify.html /usr/share/doc/bind9/arm/Bv9ARM.ch10.html --/Gk0KcsbyUMelFU1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQJ8BAEBCgBmBQJSQrwZXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNkZFQkU5OTJGNTI4MERGNDgxMTM2MkE2 RTc4MkFDMDNDOUIwQ0Y5AAoJEG54KsA8mwz5cL4P/2OTpS3FyZMeeuyl/rSculQI Ukxt5jVP+owl7HYyt7MXazal+Sqq4m/Mb0FKqqjVYI60tQwBGCnz7gnnENUOXrQt xqCwSk6qcJXm6IriU2l219+LdZC62zFY10oAO0st5meCjkpuHiCy/6/OE1AChoTw FUAh3osPYk2HJnxYgDPHrWw+zObR8c7WEQxKiablfW0szp3xAWlvycsFsNsB9n3n S2+yGYi1np158hxK4qAt2n+/9MsSuuiFEZTAZDdtRVOypn7GpITR+hfnjJs4/04n 7q4iza0hLRmKH3XhavEvQCGDGy1aziobG/rUS6iL7O+5P5aVFRXIr4WCdxJh5D9C Y3WDklmXpM80O+gdUL8pJbvxgg8qhIVuYSOuW6YUN9RMWfO1uoavXJEVoCaTKtwH yDUYz6Dwqh1H2VjAnl/enlp99q9NhnqgJyv0A+PuKbtHJpnfaJRIrKFNH9rgBWaX wv5UC/LOzPJqPx8GSbyETWGdAqGNCIELAtsmgbTJKW69LREYIcneQcOBHrix5Irm UHkbAWJdEk5ufb2HPAmMcHyYJORlZ3Hn9MW0wbakN4X2pO9ViCHQ+VVsPXowJX1Y 5/GzV/6hrYAuKgf4HVKqHFgup5waMLKbtWph6iQu/ZTh36eVPjudu3MV21EXhUFj owp0S6acPF+mrFG6Bmi4 =ixPA -----END PGP SIGNATURE----- --/Gk0KcsbyUMelFU1-- From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 13:37:53 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 7E7EAC74; Wed, 25 Sep 2013 13:37:53 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6BA1C2631; Wed, 25 Sep 2013 13:37: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 r8PDbrbb092441; Wed, 25 Sep 2013 13:37:53 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8PDbrOp092440; Wed, 25 Sep 2013 13:37:53 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201309251337.r8PDbrOp092440@svn.freebsd.org> From: Attilio Rao Date: Wed, 25 Sep 2013 13:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255868 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 13:37:53 -0000 Author: attilio Date: Wed Sep 25 13:37:52 2013 New Revision: 255868 URL: http://svnweb.freebsd.org/changeset/base/255868 Log: Avoid memory accesses reordering which can result in fget_unlocked() seeing a stale fd_ofiles table once fd_nfiles is already updated, resulting in OOB accesses. Approved by: re (kib) Sponsored by: EMC / Isilon storage division Reported and tested by: pho Reviewed by: benno Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Sep 25 02:49:18 2013 (r255867) +++ head/sys/kern/kern_descrip.c Wed Sep 25 13:37:52 2013 (r255868) @@ -1512,12 +1512,20 @@ fdgrowtable(struct filedesc *fdp, int nf memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap)); /* update the pointers and counters */ - fdp->fd_nfiles = nnfiles; memcpy(ntable, otable, onfiles * sizeof(ntable[0])); fdp->fd_ofiles = ntable; fdp->fd_map = nmap; /* + * In order to have a valid pattern for fget_unlocked() + * fdp->fd_nfiles might be the last member to be updated, otherwise + * fget_unlocked() consumers may reference a new, higher value for + * fdp->fd_nfiles before to access the fdp->fd_ofiles array, + * resulting in OOB accesses. + */ + atomic_store_rel_int(&fdp->fd_nfiles, nnfiles); + + /* * Do not free the old file table, as some threads may still * reference entries within it. Instead, place it on a freelist * which will be processed when the struct filedesc is released. @@ -2308,7 +2316,11 @@ fget_unlocked(struct filedesc *fdp, int int error; #endif - if (fd < 0 || fd >= fdp->fd_nfiles) + /* + * Avoid reads reordering and then a first access to the + * fdp->fd_ofiles table which could result in OOB operation. + */ + if (fd < 0 || fd >= atomic_load_acq_int(&fdp->fd_nfiles)) return (EBADF); /* * Fetch the descriptor locklessly. We avoid fdrop() races by From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 15:48:33 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 69947315; Wed, 25 Sep 2013 15:48:33 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5721C2EB2; Wed, 25 Sep 2013 15:48: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 r8PFmXTd062564; Wed, 25 Sep 2013 15:48:33 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8PFmXM9062562; Wed, 25 Sep 2013 15:48:33 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <201309251548.r8PFmXM9062562@svn.freebsd.org> From: Doug Ambrisko Date: Wed, 25 Sep 2013 15:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255869 - head/sys/dev/mfi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 15:48:33 -0000 Author: ambrisko Date: Wed Sep 25 15:48:32 2013 New Revision: 255869 URL: http://svnweb.freebsd.org/changeset/base/255869 Log: Add PCI device ID for MegaRAID Invader cards. This was the only change needed to make it work on my card. Approved by: re (glebius) Modified: head/sys/dev/mfi/mfi_pci.c Modified: head/sys/dev/mfi/mfi_pci.c ============================================================================== --- head/sys/dev/mfi/mfi_pci.c Wed Sep 25 13:37:52 2013 (r255868) +++ head/sys/dev/mfi/mfi_pci.c Wed Sep 25 15:48:32 2013 (r255869) @@ -131,6 +131,7 @@ struct mfi_ident { {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Intel (R) RAID Controller RS25DB080"}, {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Intel (R) RAID Controller RS25NB008"}, {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "ThunderBolt"}, + {0x1000, 0x005d, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Invader"}, {0x1000, 0x0060, 0x1028, 0xffff, MFI_FLAGS_1078, "Dell PERC 6"}, {0x1000, 0x0060, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, {0x1000, 0x0071, 0xffff, 0xffff, MFI_FLAGS_SKINNY, "Drake Skinny"}, From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 15:55:58 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 5892F753; Wed, 25 Sep 2013 15:55:58 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 458712F3D; Wed, 25 Sep 2013 15:55: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 r8PFtwme067618; Wed, 25 Sep 2013 15:55:58 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8PFtvoH067612; Wed, 25 Sep 2013 15:55:57 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201309251555.r8PFtvoH067612@svn.freebsd.org> From: Scott Long Date: Wed, 25 Sep 2013 15:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255870 - in 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 15:55:58 -0000 Author: scottl Date: Wed Sep 25 15:55:56 2013 New Revision: 255870 URL: http://svnweb.freebsd.org/changeset/base/255870 Log: Re-do r255853. Along with adding back the API/ABI changes from the original, this hides the contents of cam_compat.h from ktrace/kdump/truss, avoiding problems there. There are no user-servicable parts in there, so no need for those tools to be groping around in there. Approved by: re Modified: head/sys/cam/cam.h head/sys/cam/cam_ccb.h head/sys/cam/cam_compat.c head/sys/cam/cam_compat.h head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_pass.c Modified: head/sys/cam/cam.h ============================================================================== --- head/sys/cam/cam.h Wed Sep 25 15:48:32 2013 (r255869) +++ head/sys/cam/cam.h Wed Sep 25 15:55:56 2013 (r255870) @@ -40,6 +40,10 @@ typedef u_int path_id_t; typedef u_int target_id_t; typedef u_int lun_id_t; +typedef union { + u_int64_t lun64; + u_int8_t lun[8]; +} lun64_id_t; #define CAM_XPT_PATH_ID ((path_id_t)~0) #define CAM_BUS_WILDCARD ((path_id_t)~0) @@ -120,69 +124,184 @@ enum { /* CAM Status field values */ typedef enum { - CAM_REQ_INPROG, /* CCB request is in progress */ - CAM_REQ_CMP, /* CCB request completed without error */ - CAM_REQ_ABORTED, /* CCB request aborted by the host */ - CAM_UA_ABORT, /* Unable to abort CCB request */ - CAM_REQ_CMP_ERR, /* CCB request completed with an error */ - CAM_BUSY, /* CAM subsystem is busy */ - CAM_REQ_INVALID, /* CCB request was invalid */ - CAM_PATH_INVALID, /* Supplied Path ID is invalid */ - CAM_DEV_NOT_THERE, /* SCSI Device Not Installed/there */ - CAM_UA_TERMIO, /* Unable to terminate I/O CCB request */ - CAM_SEL_TIMEOUT, /* Target Selection Timeout */ - CAM_CMD_TIMEOUT, /* Command timeout */ - CAM_SCSI_STATUS_ERROR, /* SCSI error, look at error code in CCB */ - CAM_MSG_REJECT_REC, /* Message Reject Received */ - CAM_SCSI_BUS_RESET, /* SCSI Bus Reset Sent/Received */ - CAM_UNCOR_PARITY, /* Uncorrectable parity error occurred */ - CAM_AUTOSENSE_FAIL = 0x10,/* Autosense: request sense cmd fail */ - CAM_NO_HBA, /* No HBA Detected error */ - CAM_DATA_RUN_ERR, /* Data Overrun error */ - CAM_UNEXP_BUSFREE, /* Unexpected Bus Free */ - CAM_SEQUENCE_FAIL, /* Target Bus Phase Sequence Failure */ - CAM_CCB_LEN_ERR, /* CCB length supplied is inadequate */ - CAM_PROVIDE_FAIL, /* Unable to provide requested capability */ - CAM_BDR_SENT, /* A SCSI BDR msg was sent to target */ - CAM_REQ_TERMIO, /* CCB request terminated by the host */ - CAM_UNREC_HBA_ERROR, /* Unrecoverable Host Bus Adapter Error */ - CAM_REQ_TOO_BIG, /* The request was too large for this host */ - CAM_REQUEUE_REQ, /* - * This request should be requeued to preserve - * transaction ordering. This typically occurs - * when the SIM recognizes an error that should - * freeze the queue and must place additional - * requests for the target at the sim level - * back into the XPT queue. - */ - CAM_ATA_STATUS_ERROR, /* ATA error, look at error code in CCB */ - CAM_SCSI_IT_NEXUS_LOST, /* Initiator/Target Nexus lost. */ - CAM_SMP_STATUS_ERROR, /* SMP error, look at error code in CCB */ - CAM_IDE = 0x33, /* Initiator Detected Error */ - CAM_RESRC_UNAVAIL, /* Resource Unavailable */ - CAM_UNACKED_EVENT, /* Unacknowledged Event by Host */ - CAM_MESSAGE_RECV, /* Message Received in Host Target Mode */ - CAM_INVALID_CDB, /* Invalid CDB received in Host Target Mode */ - CAM_LUN_INVALID, /* Lun supplied is invalid */ - CAM_TID_INVALID, /* Target ID supplied is invalid */ - CAM_FUNC_NOTAVAIL, /* The requested function is not available */ - CAM_NO_NEXUS, /* Nexus is not established */ - CAM_IID_INVALID, /* The initiator ID is invalid */ - CAM_CDB_RECVD, /* The SCSI CDB has been received */ - CAM_LUN_ALRDY_ENA, /* The LUN is already enabled for target mode */ - CAM_SCSI_BUSY, /* SCSI Bus Busy */ - - CAM_DEV_QFRZN = 0x40, /* The DEV queue is frozen w/this err */ - - /* Autosense data valid for target */ - CAM_AUTOSNS_VALID = 0x80, - CAM_RELEASE_SIMQ = 0x100,/* SIM ready to take more commands */ - CAM_SIM_QUEUED = 0x200,/* SIM has this command in it's queue */ + /* CCB request is in progress */ + CAM_REQ_INPROG = 0x00, - CAM_STATUS_MASK = 0x3F, /* Mask bits for just the status # */ + /* CCB request completed without error */ + CAM_REQ_CMP = 0x01, - /* Target Specific Adjunct Status */ - CAM_SENT_SENSE = 0x40000000 /* sent sense with status */ + /* CCB request aborted by the host */ + CAM_REQ_ABORTED = 0x02, + + /* Unable to abort CCB request */ + CAM_UA_ABORT = 0x03, + + /* CCB request completed with an error */ + CAM_REQ_CMP_ERR = 0x04, + + /* CAM subsystem is busy */ + CAM_BUSY = 0x05, + + /* CCB request was invalid */ + CAM_REQ_INVALID = 0x06, + + /* Supplied Path ID is invalid */ + CAM_PATH_INVALID = 0x07, + + /* SCSI Device Not Installed/there */ + CAM_DEV_NOT_THERE = 0x08, + + /* Unable to terminate I/O CCB request */ + CAM_UA_TERMIO = 0x09, + + /* Target Selection Timeout */ + CAM_SEL_TIMEOUT = 0x0a, + + /* Command timeout */ + CAM_CMD_TIMEOUT = 0x0b, + + /* SCSI error, look at error code in CCB */ + CAM_SCSI_STATUS_ERROR = 0x0c, + + /* Message Reject Received */ + CAM_MSG_REJECT_REC = 0x0d, + + /* SCSI Bus Reset Sent/Received */ + CAM_SCSI_BUS_RESET = 0x0e, + + /* Uncorrectable parity error occurred */ + CAM_UNCOR_PARITY = 0x0f, + + /* Autosense: request sense cmd fail */ + CAM_AUTOSENSE_FAIL = 0x10, + + /* No HBA Detected error */ + CAM_NO_HBA = 0x11, + + /* Data Overrun error */ + CAM_DATA_RUN_ERR = 0x12, + + /* Unexpected Bus Free */ + CAM_UNEXP_BUSFREE = 0x13, + + /* Target Bus Phase Sequence Failure */ + CAM_SEQUENCE_FAIL = 0x14, + + /* CCB length supplied is inadequate */ + CAM_CCB_LEN_ERR = 0x15, + + /* Unable to provide requested capability*/ + CAM_PROVIDE_FAIL = 0x16, + + /* A SCSI BDR msg was sent to target */ + CAM_BDR_SENT = 0x17, + + /* CCB request terminated by the host */ + CAM_REQ_TERMIO = 0x18, + + /* Unrecoverable Host Bus Adapter Error */ + CAM_UNREC_HBA_ERROR = 0x19, + + /* Request was too large for this host */ + CAM_REQ_TOO_BIG = 0x1a, + + /* + * This request should be requeued to preserve + * transaction ordering. This typically occurs + * when the SIM recognizes an error that should + * freeze the queue and must place additional + * requests for the target at the sim level + * back into the XPT queue. + */ + CAM_REQUEUE_REQ = 0x1b, + + /* ATA error, look at error code in CCB */ + CAM_ATA_STATUS_ERROR = 0x1c, + + /* Initiator/Target Nexus lost. */ + CAM_SCSI_IT_NEXUS_LOST = 0x1d, + + /* SMP error, look at error code in CCB */ + CAM_SMP_STATUS_ERROR = 0x1e, + + /* + * Command completed without error but exceeded the soft + * timeout threshold. + */ + CAM_REQ_SOFTTIMEOUT = 0x1f, + + /* + * 0x20 - 0x32 are unassigned + */ + + /* Initiator Detected Error */ + CAM_IDE = 0x33, + + /* Resource Unavailable */ + CAM_RESRC_UNAVAIL = 0x34, + + /* Unacknowledged Event by Host */ + CAM_UNACKED_EVENT = 0x35, + + /* Message Received in Host Target Mode */ + CAM_MESSAGE_RECV = 0x36, + + /* Invalid CDB received in Host Target Mode */ + CAM_INVALID_CDB = 0x37, + + /* Lun supplied is invalid */ + CAM_LUN_INVALID = 0x38, + + /* Target ID supplied is invalid */ + CAM_TID_INVALID = 0x39, + + /* The requested function is not available */ + CAM_FUNC_NOTAVAIL = 0x3a, + + /* Nexus is not established */ + CAM_NO_NEXUS = 0x3b, + + /* The initiator ID is invalid */ + CAM_IID_INVALID = 0x3c, + + /* The SCSI CDB has been received */ + CAM_CDB_RECVD = 0x3d, + + /* The LUN is already enabled for target mode */ + CAM_LUN_ALRDY_ENA = 0x3e, + + /* SCSI Bus Busy */ + CAM_SCSI_BUSY = 0x3f, + + + /* + * Flags + */ + + /* The DEV queue is frozen w/this err */ + CAM_DEV_QFRZN = 0x40, + + /* Autosense data valid for target */ + CAM_AUTOSNS_VALID = 0x80, + + /* SIM ready to take more commands */ + CAM_RELEASE_SIMQ = 0x100, + + /* SIM has this command in it's queue */ + CAM_SIM_QUEUED = 0x200, + + /* Quality of service data is valid */ + CAM_QOS_VALID = 0x400, + + /* Mask bits for just the status # */ + CAM_STATUS_MASK = 0x3F, + + /* + * Target Specific Adjunct Status + */ + + /* sent sense with status */ + CAM_SENT_SENSE = 0x40000000 } cam_status; typedef enum { Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Wed Sep 25 15:48:32 2013 (r255869) +++ head/sys/cam/cam_ccb.h Wed Sep 25 15:55:56 2013 (r255870) @@ -107,6 +107,10 @@ typedef enum { CAM_SEND_STATUS = 0x40000000 /* Send status after data phase */ } ccb_flags; +typedef enum { + CAM_EXTLUN_VALID = 0x00000001,/* 64bit lun field is valid */ +} ccb_xflags; + /* XPT Opcodes for xpt_action */ typedef enum { /* Function code flags are bits greater than 0xff */ @@ -296,6 +300,12 @@ typedef union { u_int8_t bytes[CCB_SIM_PRIV_SIZE * sizeof(ccb_priv_entry)]; } ccb_spriv_area; +typedef struct { + struct timeval *etime; + uintptr_t sim_data; + uintptr_t periph_data; +} ccb_qos_area; + struct ccb_hdr { cam_pinfo pinfo; /* Info for priority scheduling */ camq_entry xpt_links; /* For chaining in the XPT layer */ @@ -310,16 +320,14 @@ struct ccb_hdr { path_id_t path_id; /* Path ID for the request */ target_id_t target_id; /* Target device ID */ lun_id_t target_lun; /* Target LUN number */ + lun64_id_t ext_lun; /* 64bit extended/multi-level LUNs */ u_int32_t flags; /* ccb_flags */ + u_int32_t xflags; /* Extended flags */ ccb_ppriv_area periph_priv; ccb_spriv_area sim_priv; - u_int32_t timeout; /* Timeout value */ - - /* - * Deprecated, only for use by non-MPSAFE SIMs. All others must - * allocate and initialize their own callout storage. - */ - struct callout_handle timeout_ch; + ccb_qos_area qos; + u_int32_t timeout; /* Hard timeout value in mseconds */ + struct timeval softtimeout; /* Soft timeout value in sec + usec */ }; /* Get Device Information CCB */ @@ -541,7 +549,7 @@ struct ccb_dev_match { /* * Definitions for the path inquiry CCB fields. */ -#define CAM_VERSION 0x17 /* Hex value for current version */ +#define CAM_VERSION 0x18 /* Hex value for current version */ typedef enum { PI_MDP_ABLE = 0x80, /* Supports MDP message */ @@ -564,6 +572,7 @@ typedef enum { } pi_tmflag; typedef enum { + PIM_EXTLUNS = 0x100,/* 64bit extended LUNs supported */ PIM_SCANHILO = 0x80, /* Bus scans from high ID to low ID */ PIM_NOREMOVE = 0x40, /* Removeable devices not included in scan */ PIM_NOINITIATOR = 0x20, /* Initiator role not supported. */ @@ -595,8 +604,8 @@ struct ccb_pathinq { struct ccb_hdr ccb_h; u_int8_t version_num; /* Version number for the SIM/HBA */ u_int8_t hba_inquiry; /* Mimic of INQ byte 7 for the HBA */ - u_int8_t target_sprt; /* Flags for target mode support */ - u_int8_t hba_misc; /* Misc HBA features */ + u_int16_t target_sprt; /* Flags for target mode support */ + u_int32_t hba_misc; /* Misc HBA features */ u_int16_t hba_eng_cnt; /* HBA engine count */ /* Vendor Unique capabilities */ u_int8_t vuhba_flags[VUHBALEN]; Modified: head/sys/cam/cam_compat.c ============================================================================== --- head/sys/cam/cam_compat.c Wed Sep 25 15:48:32 2013 (r255869) +++ head/sys/cam/cam_compat.c Wed Sep 25 15:55:56 2013 (r255870) @@ -44,23 +44,28 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include "opt_cam.h" +static int cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, + int flag, struct thread *td, d_ioctl_t *cbfnp); + int -cam_compat_ioctl(struct cdev *dev, u_long *cmd, caddr_t *addr, int *flag, struct thread *td) +cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *td, d_ioctl_t *cbfnp) { int error; - switch (*cmd) { + switch (cmd) { case CAMIOCOMMAND_0x16: { union ccb *ccb; - ccb = (union ccb *)*addr; + ccb = (union ccb *)addr; if (ccb->ccb_h.flags & CAM_SG_LIST_PHYS_0x16) { ccb->ccb_h.flags &= ~CAM_SG_LIST_PHYS_0x16; ccb->ccb_h.flags |= CAM_DATA_SG_PADDR; @@ -73,13 +78,21 @@ cam_compat_ioctl(struct cdev *dev, u_lon ccb->ccb_h.flags &= CAM_SCATTER_VALID_0x16; ccb->ccb_h.flags |= CAM_DATA_SG; } - *cmd = CAMIOCOMMAND; - error = EAGAIN; + cmd = CAMIOCOMMAND; + error = (cbfnp)(dev, cmd, addr, flag, td); break; } case CAMGETPASSTHRU_0x16: - *cmd = CAMGETPASSTHRU; - error = EAGAIN; + cmd = CAMGETPASSTHRU; + error = (cbfnp)(dev, cmd, addr, flag, td); + break; + case CAMIOCOMMAND_0x17: + cmd = CAMIOCOMMAND; + error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); + break; + case CAMGETPASSTHRU_0x17: + cmd = CAMGETPASSTHRU; + error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); break; default: error = ENOTTY; @@ -87,3 +100,105 @@ cam_compat_ioctl(struct cdev *dev, u_lon return (error); } + +static int +cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *td, d_ioctl_t *cbfnp) +{ + union ccb *ccb; + struct ccb_hdr *hdr; + struct ccb_hdr_0x17 *hdr17; + uint8_t *ccbb, *ccbb17; + u_int error; + + hdr17 = (struct ccb_hdr_0x17 *)addr; + ccb = xpt_alloc_ccb(); + hdr = &ccb->ccb_h; + + hdr->pinfo = hdr17->pinfo; + hdr->xpt_links = hdr17->xpt_links; + hdr->sim_links = hdr17->sim_links; + hdr->periph_links = hdr17->periph_links; + hdr->retry_count = hdr17->retry_count; + hdr->cbfcnp = hdr17->cbfcnp; + hdr->func_code = hdr17->func_code; + hdr->status = hdr17->status; + hdr->path = hdr17->path; + hdr->path_id = hdr17->path_id; + hdr->target_id = hdr17->target_id; + hdr->target_lun = hdr17->target_lun; + hdr->ext_lun.lun64 = 0; + hdr->flags = hdr17->flags; + hdr->xflags = 0; + hdr->periph_priv = hdr17->periph_priv; + hdr->sim_priv = hdr17->sim_priv; + hdr->timeout = hdr17->timeout; + hdr->softtimeout.tv_sec = 0; + hdr->softtimeout.tv_usec = 0; + + ccbb = (uint8_t *)&hdr[1]; + ccbb17 = (uint8_t *)&hdr17[1]; + bcopy(ccbb17, ccbb, CAM_0X17_DATA_LEN); + + error = (cbfnp)(dev, cmd, (caddr_t)ccb, flag, td); + + hdr17->pinfo = hdr->pinfo; + hdr17->xpt_links = hdr->xpt_links; + hdr17->sim_links = hdr->sim_links; + hdr17->periph_links = hdr->periph_links; + hdr17->retry_count = hdr->retry_count; + hdr17->cbfcnp = hdr->cbfcnp; + hdr17->func_code = hdr->func_code; + hdr17->status = hdr->status; + hdr17->path = hdr->path; + hdr17->path_id = hdr->path_id; + hdr17->target_id = hdr->target_id; + hdr17->target_lun = hdr->target_lun; + hdr17->flags = hdr->flags; + hdr17->periph_priv = hdr->periph_priv; + hdr17->sim_priv = hdr->sim_priv; + hdr17->timeout = hdr->timeout; + + /* The PATH_INQ only needs special handling on the way out */ + if (ccb->ccb_h.func_code != XPT_PATH_INQ) { + bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN); + } else { + struct ccb_pathinq *cpi; + struct ccb_pathinq_0x17 *cpi17; + + cpi = &ccb->cpi; + cpi17 = (struct ccb_pathinq_0x17 *)hdr17; + cpi17->version_num = cpi->version_num; + cpi17->hba_inquiry = cpi->hba_inquiry; + cpi17->target_sprt = (u_int8_t)cpi->target_sprt; + cpi17->hba_misc = (u_int8_t)cpi->hba_misc; + cpi17->hba_eng_cnt = cpi->hba_eng_cnt; + bcopy(&cpi->vuhba_flags[0], &cpi17->vuhba_flags[0], VUHBALEN); + cpi17->max_target = cpi->max_target; + cpi17->max_lun = cpi->max_lun; + cpi17->async_flags = cpi->async_flags; + cpi17->hpath_id = cpi->hpath_id; + cpi17->initiator_id = cpi->initiator_id; + bcopy(&cpi->sim_vid[0], &cpi17->sim_vid[0], SIM_IDLEN); + bcopy(&cpi->hba_vid[0], &cpi17->hba_vid[0], HBA_IDLEN); + bcopy(&cpi->dev_name[0], &cpi17->dev_name[0], DEV_IDLEN); + cpi17->unit_number = cpi->unit_number; + cpi17->bus_id = cpi->bus_id; + cpi17->base_transfer_speed = cpi->base_transfer_speed; + cpi17->protocol = cpi->protocol; + cpi17->protocol_version = cpi->protocol_version; + cpi17->transport = cpi->transport; + cpi17->transport_version = cpi->transport_version; + bcopy(&cpi->xport_specific, &cpi17->xport_specific, + PATHINQ_SETTINGS_SIZE); + cpi17->maxio = cpi->maxio; + cpi17->hba_vendor = cpi->hba_vendor; + cpi17->hba_device = cpi->hba_device; + cpi17->hba_subvendor = cpi->hba_subvendor; + cpi17->hba_subdevice = cpi->hba_subdevice; + } + + xpt_free_ccb(ccb); + + return (error); +} Modified: head/sys/cam/cam_compat.h ============================================================================== --- head/sys/cam/cam_compat.h Wed Sep 25 15:48:32 2013 (r255869) +++ head/sys/cam/cam_compat.h Wed Sep 25 15:55:56 2013 (r255870) @@ -31,7 +31,13 @@ #ifndef _CAM_CAM_COMPAT_H #define _CAM_CAM_COMPAT_H -int cam_compat_ioctl(struct cdev *dev, u_long *cmd, caddr_t *addr, int *flag, struct thread *td); +/* No user-servicable parts in here. */ +#ifdef _KERNEL + +int cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *td, int(*cbfnp)(struct cdev *, u_long, caddr_t, int, + struct thread *)); + /* Version 0x16 compatibility */ #define CAM_VERSION_0x16 0x16 @@ -44,5 +50,71 @@ int cam_compat_ioctl(struct cdev *dev, u #define CAM_SG_LIST_PHYS_0x16 0x00040000 #define CAM_DATA_PHYS_0x16 0x00200000 -#endif +/* Version 0x17 compatibility */ +#define CAM_VERSION_0x17 0x17 + +struct ccb_hdr_0x17 { + cam_pinfo pinfo; /* Info for priority scheduling */ + camq_entry xpt_links; /* For chaining in the XPT layer */ + camq_entry sim_links; /* For chaining in the SIM layer */ + camq_entry periph_links; /* For chaining in the type driver */ + u_int32_t retry_count; + void (*cbfcnp)(struct cam_periph *, union ccb *); + xpt_opcode func_code; /* XPT function code */ + u_int32_t status; /* Status returned by CAM subsystem */ + struct cam_path *path; /* Compiled path for this ccb */ + path_id_t path_id; /* Path ID for the request */ + target_id_t target_id; /* Target device ID */ + lun_id_t target_lun; /* Target LUN number */ + u_int32_t flags; /* ccb_flags */ + ccb_ppriv_area periph_priv; + ccb_spriv_area sim_priv; + u_int32_t timeout; /* Hard timeout value in seconds */ + struct callout_handle timeout_ch; +}; + +struct ccb_pathinq_0x17 { + struct ccb_hdr_0x17 ccb_h; + u_int8_t version_num; /* Version number for the SIM/HBA */ + u_int8_t hba_inquiry; /* Mimic of INQ byte 7 for the HBA */ + u_int8_t target_sprt; /* Flags for target mode support */ + u_int8_t hba_misc; /* Misc HBA features */ + u_int16_t hba_eng_cnt; /* HBA engine count */ + /* Vendor Unique capabilities */ + u_int8_t vuhba_flags[VUHBALEN]; + u_int32_t max_target; /* Maximum supported Target */ + u_int32_t max_lun; /* Maximum supported Lun */ + u_int32_t async_flags; /* Installed Async handlers */ + path_id_t hpath_id; /* Highest Path ID in the subsystem */ + target_id_t initiator_id; /* ID of the HBA on the SCSI bus */ + char sim_vid[SIM_IDLEN]; /* Vendor ID of the SIM */ + char hba_vid[HBA_IDLEN]; /* Vendor ID of the HBA */ + char dev_name[DEV_IDLEN];/* Device name for SIM */ + u_int32_t unit_number; /* Unit number for SIM */ + u_int32_t bus_id; /* Bus ID for SIM */ + u_int32_t base_transfer_speed;/* Base bus speed in KB/sec */ + cam_proto protocol; + u_int protocol_version; + cam_xport transport; + u_int transport_version; + union { + struct ccb_pathinq_settings_spi spi; + struct ccb_pathinq_settings_fc fc; + struct ccb_pathinq_settings_sas sas; + char ccb_pathinq_settings_opaque[PATHINQ_SETTINGS_SIZE]; + } xport_specific; + u_int maxio; /* Max supported I/O size, in bytes. */ + u_int16_t hba_vendor; /* HBA vendor ID */ + u_int16_t hba_device; /* HBA device ID */ + u_int16_t hba_subvendor; /* HBA subvendor ID */ + u_int16_t hba_subdevice; /* HBA subdevice ID */ +}; +#define CAM_0X17_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr) + sizeof(struct ccb_hdr_0x17)) +#define CAM_0X17_DATA_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr_0x17)) + +#define CAMIOCOMMAND_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 2, CAM_0X17_LEN) +#define CAMGETPASSTHRU_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 3, CAM_0X17_LEN) + +#endif +#endif Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Sep 25 15:48:32 2013 (r255869) +++ head/sys/cam/cam_xpt.c Wed Sep 25 15:55:56 2013 (r255870) @@ -397,9 +397,7 @@ xptioctl(struct cdev *dev, u_long cmd, c int error; if ((error = xptdoioctl(dev, cmd, addr, flag, td)) == ENOTTY) { - error = cam_compat_ioctl(dev, &cmd, &addr, &flag, td); - if (error == EAGAIN) - return (xptdoioctl(dev, cmd, addr, flag, td)); + error = cam_compat_ioctl(dev, cmd, addr, flag, td, xptdoioctl); } return (error); } @@ -4385,8 +4383,6 @@ xpt_get_ccb(struct cam_ed *device) if (new_ccb == NULL) { return (NULL); } - if ((sim->flags & CAM_SIM_MPSAFE) == 0) - callout_handle_init(&new_ccb->ccb_h.timeout_ch); SLIST_INSERT_HEAD(&sim->ccb_freeq, &new_ccb->ccb_h, xpt_links.sle); sim->ccb_count++; Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Wed Sep 25 15:48:32 2013 (r255869) +++ head/sys/cam/scsi/scsi_pass.c Wed Sep 25 15:55:56 2013 (r255870) @@ -580,9 +580,7 @@ passioctl(struct cdev *dev, u_long cmd, int error; if ((error = passdoioctl(dev, cmd, addr, flag, td)) == ENOTTY) { - error = cam_compat_ioctl(dev, &cmd, &addr, &flag, td); - if (error == EAGAIN) - return (passdoioctl(dev, cmd, addr, flag, td)); + error = cam_compat_ioctl(dev, cmd, addr, flag, td, passdoioctl); } return (error); } From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 17:16:25 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 7720542D; Wed, 25 Sep 2013 17:16:25 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5530324B5; Wed, 25 Sep 2013 17:16: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 r8PHGPxK011036; Wed, 25 Sep 2013 17:16:25 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8PHGMWb011009; Wed, 25 Sep 2013 17:16:22 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201309251716.r8PHGMWb011009@svn.freebsd.org> From: Scott Long Date: Wed, 25 Sep 2013 17:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255871 - in head/sys/dev: asr firewire hpt27xx hptiop hptmv hptnr hptrr iir tws X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 17:16:25 -0000 Author: scottl Date: Wed Sep 25 17:16:21 2013 New Revision: 255871 URL: http://svnweb.freebsd.org/changeset/base/255871 Log: Re-do r255853. Along with adding back the API/ABI changes from the original, this hides the contents of cam_compat.h from ktrace/kdump/truss, avoiding problems there. There are no user-servicable parts in there, so no need for those tools to be groping around in there. Approved by: re Modified: head/sys/dev/asr/asr.c head/sys/dev/firewire/sbp.c head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c head/sys/dev/hpt27xx/os_bsd.h head/sys/dev/hptiop/hptiop.c head/sys/dev/hptiop/hptiop.h head/sys/dev/hptmv/entry.c head/sys/dev/hptmv/osbsd.h head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptnr/os_bsd.h head/sys/dev/hptrr/hptrr_osm_bsd.c head/sys/dev/hptrr/os_bsd.h head/sys/dev/iir/iir.c head/sys/dev/iir/iir.h head/sys/dev/tws/tws.c head/sys/dev/tws/tws_cam.c Modified: head/sys/dev/asr/asr.c ============================================================================== --- head/sys/dev/asr/asr.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/asr/asr.c Wed Sep 25 17:16:21 2013 (r255871) @@ -385,6 +385,21 @@ typedef struct Asr_softc { static STAILQ_HEAD(, Asr_softc) Asr_softc_list = STAILQ_HEAD_INITIALIZER(Asr_softc_list); +static __inline void +set_ccb_timeout_ch(union asr_ccb *ccb, struct callout_handle ch) +{ + ccb->ccb_h.sim_priv.entries[0].ptr = ch.callout; +} + +static __inline struct callout_handle +get_ccb_timeout_ch(union asr_ccb *ccb) +{ + struct callout_handle ch; + + ch.callout = ccb->ccb_h.sim_priv.entries[0].ptr; + return ch; +} + /* * Prototypes of the routines we have in this object. */ @@ -797,8 +812,8 @@ ASR_ccbAdd(Asr_softc_t *sc, union asr_cc */ ccb->ccb_h.timeout = 6 * 60 * 1000; } - ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000); + set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, + (ccb->ccb_h.timeout * hz) / 1000)); } splx(s); } /* ASR_ccbAdd */ @@ -812,7 +827,7 @@ ASR_ccbRemove(Asr_softc_t *sc, union asr int s; s = splcam(); - untimeout(asr_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch); + untimeout(asr_timeout, (caddr_t)ccb, get_ccb_timeout_ch(ccb)); LIST_REMOVE(&(ccb->ccb_h), sim_links.le); splx(s); } /* ASR_ccbRemove */ @@ -1322,9 +1337,9 @@ asr_timeout(void *arg) cam_sim_unit(xpt_path_sim(ccb->ccb_h.path)), s); if (ASR_reset (sc) == ENXIO) { /* Try again later */ - ccb->ccb_h.timeout_ch = timeout(asr_timeout, + set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000); + (ccb->ccb_h.timeout * hz) / 1000)); } return; } @@ -1338,9 +1353,9 @@ asr_timeout(void *arg) if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_CMD_TIMEOUT) { debug_asr_printf (" AGAIN\nreinitializing adapter\n"); if (ASR_reset (sc) == ENXIO) { - ccb->ccb_h.timeout_ch = timeout(asr_timeout, + set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000); + (ccb->ccb_h.timeout * hz) / 1000)); } splx(s); return; @@ -1349,8 +1364,8 @@ asr_timeout(void *arg) /* If the BUS reset does not take, then an adapter reset is next! */ ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_CMD_TIMEOUT; - ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000); + set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, + (ccb->ccb_h.timeout * hz) / 1000)); ASR_resetBus (sc, cam_sim_bus(xpt_path_sim(ccb->ccb_h.path))); xpt_async (AC_BUS_RESET, ccb->ccb_h.path, NULL); splx(s); Modified: head/sys/dev/firewire/sbp.c ============================================================================== --- head/sys/dev/firewire/sbp.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/firewire/sbp.c Wed Sep 25 17:16:21 2013 (r255871) @@ -177,6 +177,7 @@ struct sbp_ocb { struct sbp_dev *sdev; int flags; /* XXX should be removed */ bus_dmamap_t dmamap; + struct callout_handle timeout_ch; }; #define OCB_ACT_MGM 0 @@ -591,6 +592,7 @@ END_DEBUG /* XXX */ goto next; } + callout_handle_init(&ocb->timeout_ch); sbp_free_ocb(sdev, ocb); } next: @@ -2763,7 +2765,7 @@ END_DEBUG STAILQ_REMOVE(&sdev->ocbs, ocb, sbp_ocb, ocb); if (ocb->ccb != NULL) untimeout(sbp_timeout, (caddr_t)ocb, - ocb->ccb->ccb_h.timeout_ch); + ocb->timeout_ch); if (ntohl(ocb->orb[4]) & 0xffff) { bus_dmamap_sync(sdev->target->sbp->dmat, ocb->dmamap, @@ -2836,7 +2838,7 @@ END_DEBUG STAILQ_INSERT_TAIL(&sdev->ocbs, ocb, ocb); if (ocb->ccb != NULL) - ocb->ccb->ccb_h.timeout_ch = timeout(sbp_timeout, (caddr_t)ocb, + ocb->timeout_ch = timeout(sbp_timeout, (caddr_t)ocb, (ocb->ccb->ccb_h.timeout * hz) / 1000); if (use_doorbell && prev == NULL) @@ -2930,7 +2932,7 @@ END_DEBUG } if (ocb->ccb != NULL) { untimeout(sbp_timeout, (caddr_t)ocb, - ocb->ccb->ccb_h.timeout_ch); + ocb->timeout_ch); ocb->ccb->ccb_h.status = status; SBP_LOCK(sdev->target->sbp); xpt_done(ocb->ccb); Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Wed Sep 25 17:16:21 2013 (r255871) @@ -432,7 +432,7 @@ static void os_cmddone(PCOMMAND pCmd) KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch); + untimeout(hpt_timeout, pCmd, ext->timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -510,8 +510,7 @@ static void hpt_io_dmamap_callback(void BUS_DMASYNC_PREWRITE); } } - - ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); ldm_queue_cmd(pCmd); } @@ -1048,6 +1047,7 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } + callout_handle_init(&ext->timeout_ch); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { Modified: head/sys/dev/hpt27xx/os_bsd.h ============================================================================== --- head/sys/dev/hpt27xx/os_bsd.h Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hpt27xx/os_bsd.h Wed Sep 25 17:16:21 2013 (r255871) @@ -174,6 +174,7 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; + struct callout_handle timeout_ch; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; Modified: head/sys/dev/hptiop/hptiop.c ============================================================================== --- head/sys/dev/hptiop/hptiop.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hptiop/hptiop.c Wed Sep 25 17:16:21 2013 (r255871) @@ -643,7 +643,7 @@ static void hptiop_request_callback_mvfr ccb = (union ccb *)srb->ccb; - untimeout(hptiop_reset_adapter, hba, ccb->ccb_h.timeout_ch); + untimeout(hptiop_reset_adapter, hba, srb->timeout_ch); if (ccb->ccb_h.flags & CAM_CDB_POINTER) cdb = ccb->csio.cdb_io.cdb_ptr; @@ -2629,7 +2629,7 @@ static void hptiop_post_req_mvfrey(struc BUS_SPACE_RD4_MVFREY2(inbound_write_ptr); if (req->header.type == IOP_REQUEST_TYPE_SCSI_COMMAND) { - ccb->ccb_h.timeout_ch = timeout(hptiop_reset_adapter, hba, 20*hz); + srb->timeout_ch = timeout(hptiop_reset_adapter, hba, 20*hz); } } @@ -2741,6 +2741,7 @@ static void hptiop_map_srb(void *arg, bu tmp_srb->phy_addr = phy_addr; } + callout_handle_init(&tmp_srb->timeout_ch); hptiop_free_srb(hba, tmp_srb); hba->srb[i] = tmp_srb; phy_addr += HPT_SRB_MAX_SIZE; Modified: head/sys/dev/hptiop/hptiop.h ============================================================================== --- head/sys/dev/hptiop/hptiop.h Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hptiop/hptiop.h Wed Sep 25 17:16:21 2013 (r255871) @@ -460,6 +460,7 @@ struct hpt_iop_srb { u_int64_t phy_addr; u_int32_t srb_flag; int index; + struct callout_handle timeout_ch; }; #define hptiop_lock_adapter(hba) mtx_lock(&(hba)->lock) Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hptmv/entry.c Wed Sep 25 17:16:21 2013 (r255871) @@ -1438,6 +1438,7 @@ unregister: free(pAdapter->pbus_dmamap, M_DEVBUF); goto unregister; } + callout_handle_init(&pmap->timeout_ch); } /* setup PRD Tables */ KdPrint(("Allocate PRD Tables\n")); @@ -2758,7 +2759,7 @@ hpt_io_dmamap_callback(void *arg, bus_dm } } - ccb->ccb_h.timeout_ch = timeout(hpt_timeout, (caddr_t)ccb, 20*hz); + pmap->timeout_ch = timeout(hpt_timeout, (caddr_t)ccb, 20*hz); pVDev->pfnSendCommand(_VBUS_P pCmd); CheckPendingCall(_VBUS_P0); } @@ -2980,7 +2981,7 @@ fOsCommandDone(_VBUS_ARG PCommand pCmd) KdPrint(("fOsCommandDone(pcmd=%p, result=%d)\n", pCmd, pCmd->Result)); - untimeout(hpt_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch); + untimeout(hpt_timeout, (caddr_t)ccb, pmap->timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: Modified: head/sys/dev/hptmv/osbsd.h ============================================================================== --- head/sys/dev/hptmv/osbsd.h Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hptmv/osbsd.h Wed Sep 25 17:16:21 2013 (r255871) @@ -153,6 +153,7 @@ typedef struct _BUS_DMAMAP { struct _BUS_DMAMAP *next; struct IALAdapter *pAdapter; bus_dmamap_t dma_map; + struct callout_handle timeout_ch; SCAT_GATH psg[MAX_SG_DESCRIPTORS]; } BUS_DMAMAP, *PBUS_DMAMAP; Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- head/sys/dev/hptnr/hptnr_osm_bsd.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hptnr/hptnr_osm_bsd.c Wed Sep 25 17:16:21 2013 (r255871) @@ -432,7 +432,7 @@ static void os_cmddone(PCOMMAND pCmd) KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch); + untimeout(hpt_timeout, pCmd, ext->timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -511,7 +511,7 @@ static void hpt_io_dmamap_callback(void } } - ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); ldm_queue_cmd(pCmd); } @@ -1048,6 +1048,7 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } + callout_handle_init(&ext->timeout_ch); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { Modified: head/sys/dev/hptnr/os_bsd.h ============================================================================== --- head/sys/dev/hptnr/os_bsd.h Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hptnr/os_bsd.h Wed Sep 25 17:16:21 2013 (r255871) @@ -176,6 +176,7 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; + struct callout_handle timeout_ch; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- head/sys/dev/hptrr/hptrr_osm_bsd.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hptrr/hptrr_osm_bsd.c Wed Sep 25 17:16:21 2013 (r255871) @@ -440,7 +440,7 @@ static void os_cmddone(PCOMMAND pCmd) KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch); + untimeout(hpt_timeout, pCmd, ext->timeout_ch); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -519,7 +519,7 @@ static void hpt_io_dmamap_callback(void BUS_DMASYNC_PREWRITE); } } - ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); ldm_queue_cmd(pCmd); } @@ -1058,6 +1058,7 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } + callout_handle_init(&ext->timeout_ch); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { Modified: head/sys/dev/hptrr/os_bsd.h ============================================================================== --- head/sys/dev/hptrr/os_bsd.h Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/hptrr/os_bsd.h Wed Sep 25 17:16:21 2013 (r255871) @@ -174,6 +174,7 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; + struct callout_handle timeout_ch; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; Modified: head/sys/dev/iir/iir.c ============================================================================== --- head/sys/dev/iir/iir.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/iir/iir.c Wed Sep 25 17:16:21 2013 (r255871) @@ -270,6 +270,7 @@ iir_init(struct gdt_softc *gdt) gccb->gc_map_flag = TRUE; gccb->gc_scratch = &gdt->sc_gcscratch[GDT_SCRATCH_SZ * i]; gccb->gc_scratch_busbase = gdt->sc_gcscratch_busbase + GDT_SCRATCH_SZ * i; + callout_handle_init(&gccb->gc_timeout_ch); SLIST_INSERT_HEAD(&gdt->sc_free_gccb, gccb, sle); } gdt->sc_init_level++; @@ -1239,7 +1240,7 @@ gdtexecuteccb(void *arg, bus_dma_segment ccb->ccb_h.status |= CAM_SIM_QUEUED; /* timeout handling */ - ccb->ccb_h.timeout_ch = + gccb->gc_timeout_ch = timeout(iir_timeout, (caddr_t)gccb, (ccb->ccb_h.timeout * hz) / 1000); @@ -1747,7 +1748,7 @@ gdt_sync_event(struct gdt_softc *gdt, in printf("\n"); return (0); } else { - untimeout(iir_timeout, gccb, ccb->ccb_h.timeout_ch); + untimeout(iir_timeout, gccb, gccb->gc_timeout_ch); if (gdt->sc_status == GDT_S_BSY) { GDT_DPRINTF(GDT_D_DEBUG, ("gdt_sync_event(%p) gccb %p busy\n", gdt, gccb)); Modified: head/sys/dev/iir/iir.h ============================================================================== --- head/sys/dev/iir/iir.h Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/iir/iir.h Wed Sep 25 17:16:21 2013 (r255871) @@ -684,6 +684,7 @@ struct gdt_ccb { union ccb *gc_ccb; gdt_ucmd_t *gc_ucmd; bus_dmamap_t gc_dmamap; + struct callout_handle gc_timeout_ch; int gc_map_flag; int gc_timeout; u_int8_t gc_service; Modified: head/sys/dev/tws/tws.c ============================================================================== --- head/sys/dev/tws/tws.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/tws/tws.c Wed Sep 25 17:16:21 2013 (r255871) @@ -696,6 +696,7 @@ tws_init_reqs(struct tws_softc *sc, u_in sc->reqs[i].cmd_pkt->hdr.header_desc.size_header = 128; + callout_handle_init(&sc->reqs[i].thandle); sc->reqs[i].state = TWS_REQ_STATE_FREE; if ( i >= TWS_RESERVED_REQS ) tws_q_insert_tail(sc, &sc->reqs[i], TWS_FREE_Q); Modified: head/sys/dev/tws/tws_cam.c ============================================================================== --- head/sys/dev/tws/tws_cam.c Wed Sep 25 15:55:56 2013 (r255870) +++ head/sys/dev/tws/tws_cam.c Wed Sep 25 17:16:21 2013 (r255871) @@ -341,7 +341,7 @@ tws_scsi_complete(struct tws_request *re tws_q_remove_request(sc, req, TWS_BUSY_Q); mtx_unlock(&sc->q_lock); - untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch); + untimeout(tws_timeout, req, req->thandle); tws_unmap_request(req->sc, req); @@ -454,7 +454,7 @@ tws_cmd_complete(struct tws_request *req { struct tws_softc *sc = req->sc; - untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch); + untimeout(tws_timeout, req, req->thandle); tws_unmap_request(sc, req); } @@ -561,7 +561,7 @@ tws_scsi_err_complete(struct tws_request xpt_done(ccb); mtx_unlock(&sc->sim_lock); - untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch); + untimeout(tws_timeout, req, req->thandle); tws_unmap_request(req->sc, req); mtx_lock(&sc->q_lock); tws_q_remove_request(sc, req, TWS_BUSY_Q); @@ -591,7 +591,7 @@ tws_drain_busy_queue(struct tws_softc *s mtx_unlock(&sc->q_lock); while ( req ) { TWS_TRACE_DEBUG(sc, "moved to TWS_COMPLETE_Q", 0, req->request_id); - untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch); + untimeout(tws_timeout, req, req->thandle); req->error_code = TWS_REQ_RET_RESET; ccb = (union ccb *)(req->ccb_ptr); @@ -747,7 +747,7 @@ tws_execute_scsi(struct tws_softc *sc, u * and submit the I/O. */ sc->stats.scsi_ios++; - ccb_h->timeout_ch = timeout(tws_timeout, req, (ccb_h->timeout * hz)/1000); + req->thandle = timeout(tws_timeout, req, (ccb_h->timeout * hz)/1000); error = tws_map_request(sc, req); return(error); } From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 20:06:02 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 66330A39; Wed, 25 Sep 2013 20:06:02 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 44C2D201A; Wed, 25 Sep 2013 20:06: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 r8PK62lK001668; Wed, 25 Sep 2013 20:06:02 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8PK62EM001667; Wed, 25 Sep 2013 20:06:02 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309252006.r8PK62EM001667@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 25 Sep 2013 20:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255872 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 20:06:02 -0000 Author: des Date: Wed Sep 25 20:06:01 2013 New Revision: 255872 URL: http://svnweb.freebsd.org/changeset/base/255872 Log: Additional BIND files. Submitted by: bdrewery Approved by: re (blanket) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Sep 25 17:16:21 2013 (r255871) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Sep 25 20:06:01 2013 (r255872) @@ -251,8 +251,33 @@ OLD_FILES+=usr/share/doc/bind9/arm/Bv9AR OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch07.html OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch08.html OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch09.html +OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch10.html OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.html +OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.pdf +OLD_FILES+=usr/share/doc/bind9/arm/man.arpaname.html +OLD_FILES+=usr/share/doc/bind9/arm/man.ddns-confgen.html +OLD_FILES+=usr/share/doc/bind9/arm/man.dig.html +OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-dsfromkey.html +OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-keyfromlabel.html +OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-keygen.html +OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-revoke.html +OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-settime.html +OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-signzone.html +OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-verify.html +OLD_FILES+=usr/share/doc/bind9/arm/man.genrandom.html +OLD_FILES+=usr/share/doc/bind9/arm/man.host.html +OLD_FILES+=usr/share/doc/bind9/arm/man.isc-hmac-fixup.html +OLD_FILES+=usr/share/doc/bind9/arm/man.named-checkconf.html +OLD_FILES+=usr/share/doc/bind9/arm/man.named-checkzone.html +OLD_FILES+=usr/share/doc/bind9/arm/man.named-journalprint.html +OLD_FILES+=usr/share/doc/bind9/arm/man.named.html +OLD_FILES+=usr/share/doc/bind9/arm/man.nsec3hash.html +OLD_FILES+=usr/share/doc/bind9/arm/man.nsupdate.html +OLD_FILES+=usr/share/doc/bind9/arm/man.rndc-confgen.html +OLD_FILES+=usr/share/doc/bind9/arm/man.rndc.conf.html +OLD_FILES+=usr/share/doc/bind9/arm/man.rndc.html OLD_DIRS+=usr/share/doc/bind9/arm +OLD_FILES+=usr/share/doc/bind9/misc OLD_FILES+=usr/share/doc/bind9/misc/dnssec OLD_FILES+=usr/share/doc/bind9/misc/format-options.pl OLD_FILES+=usr/share/doc/bind9/misc/ipv6 @@ -262,13 +287,16 @@ OLD_FILES+=usr/share/doc/bind9/misc/opti OLD_FILES+=usr/share/doc/bind9/misc/rfc-compliance OLD_FILES+=usr/share/doc/bind9/misc/roadmap OLD_FILES+=usr/share/doc/bind9/misc/sdb +OLD_FILES+=usr/share/doc/bind9/misc/sort-options.pl OLD_DIRS+=usr/share/doc/bind9/misc OLD_DIRS+=usr/share/doc/bind9 OLD_FILES+=usr/share/doc/bind9/CHANGES OLD_FILES+=usr/share/doc/bind9/COPYRIGHT OLD_FILES+=usr/share/doc/bind9/FAQ +OLD_FILES+=usr/share/doc/bind9/HISTORY OLD_FILES+=usr/share/doc/bind9/README OLD_FILES+=usr/share/man/man1/dig.1.gz +OLD_FILES+=usr/share/man/man1/host.1.gz OLD_FILES+=usr/share/man/man1/nslookup.1.gz OLD_FILES+=usr/share/man/man3/lwres.3.gz OLD_FILES+=usr/share/man/man3/lwres_buffer.3.gz From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 20:06:46 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 31469B77; Wed, 25 Sep 2013 20:06:46 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id E6CE02024; Wed, 25 Sep 2013 20:06:45 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 2E21A63A7; Wed, 25 Sep 2013 20:06:39 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 2790A96; Wed, 25 Sep 2013 22:06:12 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bryan Drewery Subject: Re: svn commit: r255850 - in head: share/mk tools/build/options References: <201309241433.r8OEXV74033244@svn.freebsd.org> <20130925103402.GH74496@admin.xzibition.com> Date: Wed, 25 Sep 2013 22:06:11 +0200 In-Reply-To: <20130925103402.GH74496@admin.xzibition.com> (Bryan Drewery's message of "Wed, 25 Sep 2013 05:34:02 -0500") Message-ID: <8638os7jkc.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 20:06:46 -0000 Bryan Drewery writes: > There are some leftover files that need to be added to > ObsoleteFiles: I noticed that as well. I just committed your patch. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Wed Sep 25 20:37:16 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id EA7BA62B; Wed, 25 Sep 2013 20:37:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D7E7F225D; Wed, 25 Sep 2013 20:37: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 r8PKbGj5018601; Wed, 25 Sep 2013 20:37:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8PKbG9K018599; Wed, 25 Sep 2013 20:37:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309252037.r8PKbG9K018599@svn.freebsd.org> From: Xin LI Date: Wed, 25 Sep 2013 20:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255873 - in head/contrib/bind9/bin: dig nsupdate X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 20:37:17 -0000 Author: delphij Date: Wed Sep 25 20:37:16 2013 New Revision: 255873 URL: http://svnweb.freebsd.org/changeset/base/255873 Log: Correct a NULL pointer deference in nslookup and nsupdate that would cause the utility to crash in interactive mode when the user gives an EOF on standard input. MFC after: 3 days Approved by: re (gjb) Modified: head/contrib/bind9/bin/dig/nslookup.c head/contrib/bind9/bin/nsupdate/nsupdate.c Modified: head/contrib/bind9/bin/dig/nslookup.c ============================================================================== --- head/contrib/bind9/bin/dig/nslookup.c Wed Sep 25 20:06:01 2013 (r255872) +++ head/contrib/bind9/bin/dig/nslookup.c Wed Sep 25 20:37:16 2013 (r255873) @@ -767,7 +767,8 @@ get_next_command(void) { if (interactive) { #ifdef HAVE_READLINE ptr = readline("> "); - add_history(ptr); + if (ptr != NULL && *ptr != '\0') + add_history(ptr); #else fputs("> ", stderr); fflush(stderr); Modified: head/contrib/bind9/bin/nsupdate/nsupdate.c ============================================================================== --- head/contrib/bind9/bin/nsupdate/nsupdate.c Wed Sep 25 20:06:01 2013 (r255872) +++ head/contrib/bind9/bin/nsupdate/nsupdate.c Wed Sep 25 20:37:16 2013 (r255873) @@ -2008,7 +2008,8 @@ get_next_command(void) { if (interactive) { #ifdef HAVE_READLINE cmdline = readline("> "); - add_history(cmdline); + if (cmdline != NULL && *cmdline != '\0') + add_history(cmdline); #else fprintf(stdout, "> "); fflush(stdout); From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 07:53:20 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 32A546EE; Thu, 26 Sep 2013 07:53:20 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 110D62528; Thu, 26 Sep 2013 07:53: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 r8Q7rJiO026021; Thu, 26 Sep 2013 07:53:19 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8Q7rJYF026004; Thu, 26 Sep 2013 07:53:19 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201309260753.r8Q7rJYF026004@svn.freebsd.org> From: Andrew Turner Date: Thu, 26 Sep 2013 07:53:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255874 - in head: contrib/binutils/binutils contrib/binutils/include/elf lib/csu/arm lib/csu/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 07:53:20 -0000 Author: andrew Date: Thu Sep 26 07:53:18 2013 New Revision: 255874 URL: http://svnweb.freebsd.org/changeset/base/255874 Log: Add an elf note on ARM to store the MACHINE_ARCH an executable was built for. This is useful for software needing to know which architecture a binary is built for as arm and armv6 have slight differences meaning only some binaries build for one will work as expected on the other. It is expected pkgng will be able to make use of this to simplify the logic to determine which package ABI to use. Approved by: re (kib) Modified: head/contrib/binutils/binutils/readelf.c head/contrib/binutils/include/elf/common.h head/lib/csu/arm/crt1.c head/lib/csu/common/notes.h Modified: head/contrib/binutils/binutils/readelf.c ============================================================================== --- head/contrib/binutils/binutils/readelf.c Wed Sep 25 20:37:16 2013 (r255873) +++ head/contrib/binutils/binutils/readelf.c Thu Sep 26 07:53:18 2013 (r255874) @@ -9169,6 +9169,8 @@ get_freebsd_note_type (unsigned e_type) return _("NT_FREEBSD_ABI_TAG"); case NT_FREEBSD_NOINIT_TAG: return _("NT_FREEBSD_NOINIT_TAG"); + case NT_FREEBSD_ARCH_TAG: + return _("NT_FREEBSD_ARCH_TAG"); default: break; } Modified: head/contrib/binutils/include/elf/common.h ============================================================================== --- head/contrib/binutils/include/elf/common.h Wed Sep 25 20:37:16 2013 (r255873) +++ head/contrib/binutils/include/elf/common.h Thu Sep 26 07:53:18 2013 (r255874) @@ -456,6 +456,7 @@ #define NT_FREEBSD_TAG 1 #define NT_FREEBSD_NOINIT_TAG 2 +#define NT_FREEBSD_ARCH_TAG 3 /* These three macros disassemble and assemble a symbol table st_info field, which contains the symbol binding and symbol type. The STB_ and STT_ Modified: head/lib/csu/arm/crt1.c ============================================================================== --- head/lib/csu/arm/crt1.c Wed Sep 25 20:37:16 2013 (r255873) +++ head/lib/csu/arm/crt1.c Thu Sep 26 07:53:18 2013 (r255874) @@ -115,6 +115,20 @@ __start(int argc, char **argv, char **en exit(main(argc, argv, env)); } +static const struct { + int32_t namesz; + int32_t descsz; + int32_t type; + char name[sizeof(NOTE_FREEBSD_VENDOR)]; + char desc[sizeof(MACHINE_ARCH)]; +} archtag __attribute__ ((section (NOTE_SECTION), aligned(4))) __used = { + .namesz = sizeof(NOTE_FREEBSD_VENDOR), + .descsz = sizeof(int32_t), + .type = ARCH_NOTETYPE, + .name = NOTE_FREEBSD_VENDOR, + .desc = MACHINE_ARCH +}; + #ifdef GCRT __asm__(".text"); __asm__("eprol:"); Modified: head/lib/csu/common/notes.h ============================================================================== --- head/lib/csu/common/notes.h Wed Sep 25 20:37:16 2013 (r255873) +++ head/lib/csu/common/notes.h Thu Sep 26 07:53:18 2013 (r255874) @@ -34,5 +34,6 @@ #define ABI_NOTETYPE 1 #define CRT_NOINIT_NOTETYPE 2 +#define ARCH_NOTETYPE 3 #endif From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 10:06:51 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 4B4E6E33; Thu, 26 Sep 2013 10:06:51 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3761B2FAD; Thu, 26 Sep 2013 10: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 r8QA6pKK071286; Thu, 26 Sep 2013 10:06:51 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QA6poc071285; Thu, 26 Sep 2013 10:06:51 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309261006.r8QA6poc071285@svn.freebsd.org> From: Davide Italiano Date: Thu, 26 Sep 2013 10:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255877 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 10:06:51 -0000 Author: davide Date: Thu Sep 26 10:06:50 2013 New Revision: 255877 URL: http://svnweb.freebsd.org/changeset/base/255877 Log: Make the callout arithmetic more robust adding checks for overflow. Without these, if the timeout value passed is "large enough", the value of the sum of it and other factors (e.g. current time as returned by sbinuptime() or 'precision' argument) might result in a negative number. This negative number is then passed to eventtimers(4), which causes et_start() routine to load et_min_period into eventtimer, making the CPU where the thread is stuck forever in timer interrupt handler routine. This is now avoided rounding to INT64_MAX the timeout period in case of overflow. Reported by: kib, pho Discussed with: kib, mav Tested by: pho (stress2 suite, kevent7.sh scenario) Approved by: re (kib) Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Thu Sep 26 09:16:57 2013 (r255876) +++ head/sys/kern/kern_timeout.c Thu Sep 26 10:06:50 2013 (r255877) @@ -572,6 +572,8 @@ callout_cc_add(struct callout *c, struct * Inform the eventtimers(4) subsystem there's a new callout * that has been inserted, but only if really required. */ + if (INT64_MAX - c->c_time < c->c_precision) + c->c_precision = INT64_MAX - c->c_time; sbt = c->c_time + c->c_precision; if (sbt < cc->cc_firstevent) { cc->cc_firstevent = sbt; @@ -949,7 +951,10 @@ callout_reset_sbt_on(struct callout *c, to_sbt += tick_sbt; } else to_sbt = sbinuptime(); - to_sbt += sbt; + if (INT64_MAX - to_sbt < sbt) + to_sbt = INT64_MAX; + else + to_sbt += sbt; pr = ((C_PRELGET(flags) < 0) ? sbt >> tc_precexp : sbt >> C_PRELGET(flags)); if (pr > precision) From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 10:33:16 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 38B0F96A; Thu, 26 Sep 2013 10:33:16 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2714C220A; Thu, 26 Sep 2013 10:33: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 r8QAXG8F080493; Thu, 26 Sep 2013 10:33:16 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QAXG5f080492; Thu, 26 Sep 2013 10:33:16 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201309261033.r8QAXG5f080492@svn.freebsd.org> From: Colin Percival Date: Thu, 26 Sep 2013 10:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255878 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 10:33:16 -0000 Author: cperciva Date: Thu Sep 26 10:33:15 2013 New Revision: 255878 URL: http://svnweb.freebsd.org/changeset/base/255878 Log: Now that the portsnap buildbox is generating the raw bits for INDEX-10, add it to the set of INDEX files built by portsnap. Approved by: re (marius), portmgr (erwin) MFC after: 3 days Modified: head/etc/portsnap.conf Modified: head/etc/portsnap.conf ============================================================================== --- head/etc/portsnap.conf Thu Sep 26 10:06:50 2013 (r255877) +++ head/etc/portsnap.conf Thu Sep 26 10:33:15 2013 (r255878) @@ -32,3 +32,4 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddb # List of INDEX files to build and the DESCRIBE file to use for each INDEX INDEX-8 DESCRIBE.8 INDEX INDEX-9 DESCRIBE.9 +INDEX INDEX-10 DESCRIBE.10 From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 13:14:52 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 1D1784E9; Thu, 26 Sep 2013 13:14:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0AE8F290C; Thu, 26 Sep 2013 13:14: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 r8QDEpD5037580; Thu, 26 Sep 2013 13:14:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QDEpR2037579; Thu, 26 Sep 2013 13:14:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309261314.r8QDEpR2037579@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 26 Sep 2013 13:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255880 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 13:14:52 -0000 Author: kib Date: Thu Sep 26 13:14:51 2013 New Revision: 255880 URL: http://svnweb.freebsd.org/changeset/base/255880 Log: Acquire a hold reference on the vnode when a knote is instantiated. Otherwise, knote keeps a pointer to a vnode which could become invalid any time. Reported by: many Tested by: Patrick Lamaiziere Discussed with: jmg Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (marius) Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Thu Sep 26 13:13:12 2013 (r255879) +++ head/sys/kern/vfs_subr.c Thu Sep 26 13:14:51 2013 (r255880) @@ -4398,6 +4398,7 @@ vfs_kqfilter(struct vop_kqfilter_args *a if (vp->v_pollinfo == NULL) return (ENOMEM); knl = &vp->v_pollinfo->vpi_selinfo.si_note; + vhold(vp); knlist_add(knl, kn, 0); return (0); @@ -4413,6 +4414,7 @@ filt_vfsdetach(struct knote *kn) KASSERT(vp->v_pollinfo != NULL, ("Missing v_pollinfo")); knlist_remove(&vp->v_pollinfo->vpi_selinfo.si_note, kn, 0); + vdrop(vp); } /*ARGSUSED*/ From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 13:17:31 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id DBD35725; Thu, 26 Sep 2013 13:17:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C94AD2933; Thu, 26 Sep 2013 13:17: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 r8QDHV4A038274; Thu, 26 Sep 2013 13:17:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QDHVeA038273; Thu, 26 Sep 2013 13:17:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309261317.r8QDHVeA038273@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 26 Sep 2013 13:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255882 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 13:17:31 -0000 Author: kib Date: Thu Sep 26 13:17:31 2013 New Revision: 255882 URL: http://svnweb.freebsd.org/changeset/base/255882 Log: Do not allow negative timeouts for kqueue timers, check for the negative timeout both before and after the conversion to sbintime_t. For periodic kqueue timer, convert zero timeout into 1ms, to avoid interrupt storm on fast event timers. Reported and tested by: pho Discussed with: mav Reviewed by: davide Sponsored by: The FreeBSD Foundation Approved by: re (marius) Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Thu Sep 26 13:15:33 2013 (r255881) +++ head/sys/kern/kern_event.c Thu Sep 26 13:17:31 2013 (r255882) @@ -554,8 +554,17 @@ static int filt_timerattach(struct knote *kn) { struct callout *calloutp; + sbintime_t to; unsigned int ncallouts; + if ((intptr_t)kn->kn_sdata < 0) + return (EINVAL); + if ((intptr_t)kn->kn_sdata == 0 && (kn->kn_flags & EV_ONESHOT) == 0) + kn->kn_sdata = 1; + to = timer2sbintime(kn->kn_sdata); + if (to < 0) + return (EINVAL); + ncallouts = atomic_load_explicit(&kq_ncallouts, memory_order_relaxed); do { if (ncallouts >= kq_calloutmax) @@ -569,8 +578,7 @@ filt_timerattach(struct knote *kn) calloutp = malloc(sizeof(*calloutp), M_KQUEUE, M_WAITOK); callout_init(calloutp, CALLOUT_MPSAFE); kn->kn_hook = calloutp; - callout_reset_sbt_on(calloutp, - timer2sbintime(kn->kn_sdata), 0 /* 1ms? */, + callout_reset_sbt_on(calloutp, to, 0 /* 1ms? */, filt_timerexpire, kn, PCPU_GET(cpuid), 0); return (0); From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 15:36:20 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id C45B4D1C; Thu, 26 Sep 2013 15:36:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B200D2327; Thu, 26 Sep 2013 15:36: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 r8QFaKRI096947; Thu, 26 Sep 2013 15:36:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QFaKkW096946; Thu, 26 Sep 2013 15:36:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201309261536.r8QFaKkW096946@svn.freebsd.org> From: Alan Cox Date: Thu, 26 Sep 2013 15:36:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255887 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 15:36:20 -0000 Author: alc Date: Thu Sep 26 15:36:20 2013 New Revision: 255887 URL: http://svnweb.freebsd.org/changeset/base/255887 Log: Eliminate the declaration for a method that is no longer used. (This change should have been a part of r255724.) Reminded by: nathan Approved by: re (gjb) Modified: head/sys/powerpc/powerpc/mmu_if.m Modified: head/sys/powerpc/powerpc/mmu_if.m ============================================================================== --- head/sys/powerpc/powerpc/mmu_if.m Thu Sep 26 15:17:49 2013 (r255886) +++ head/sys/powerpc/powerpc/mmu_if.m Thu Sep 26 15:36:20 2013 (r255887) @@ -179,17 +179,6 @@ METHOD void clear_modify { /** - * @brief Clear the 'referenced' bit on the given physical page - * - * @param _pg physical page - */ -METHOD void clear_reference { - mmu_t _mmu; - vm_page_t _pg; -}; - - -/** * @brief Clear the write and modified bits in each of the given * physical page's mappings * From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 16:25:07 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 57481482; Thu, 26 Sep 2013 16:25:07 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 448342729; Thu, 26 Sep 2013 16:25: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 r8QGP7IB023889; Thu, 26 Sep 2013 16:25:07 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QGP7rA023888; Thu, 26 Sep 2013 16:25:07 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309261625.r8QGP7rA023888@svn.freebsd.org> From: Peter Grehan Date: Thu, 26 Sep 2013 16:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255890 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 16:25:07 -0000 Author: grehan Date: Thu Sep 26 16:25:06 2013 New Revision: 255890 URL: http://svnweb.freebsd.org/changeset/base/255890 Log: Fix incorrect assertion on the minimum side. ZFS would trigger this. Reported by: Chris Torek, Allan Jude Approved by: re@ (blanket) Modified: head/usr.sbin/bhyve/pci_virtio_block.c Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Thu Sep 26 16:07:30 2013 (r255889) +++ head/usr.sbin/bhyve/pci_virtio_block.c Thu Sep 26 16:25:06 2013 (r255890) @@ -156,7 +156,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *s * XXX - note - this fails on crash dump, which does a * VIRTIO_BLK_T_FLUSH with a zero transfer length */ - assert (n >= 3 && n <= VTBLK_MAXSEGS + 2); + assert(n >= 2 && n <= VTBLK_MAXSEGS + 2); assert((flags[0] & VRING_DESC_F_WRITE) == 0); assert(iov[0].iov_len == sizeof(struct virtio_blk_hdr)); From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 17:54:59 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 635E693C; Thu, 26 Sep 2013 17:54:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 505E02D9A; Thu, 26 Sep 2013 17:54: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 r8QHsxZa073329; Thu, 26 Sep 2013 17:54:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QHsxvj073328; Thu, 26 Sep 2013 17:54:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309261754.r8QHsxvj073328@svn.freebsd.org> From: Xin LI Date: Thu, 26 Sep 2013 17:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255891 - head/lib/libedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 17:54:59 -0000 Author: delphij Date: Thu Sep 26 17:54:58 2013 New Revision: 255891 URL: http://svnweb.freebsd.org/changeset/base/255891 Log: Import NetBSD readline.c,v 1.104: do not crash with add_history(NULL). MFC after: 3 days Approved by: re (gjb) Modified: head/lib/libedit/readline.c Modified: head/lib/libedit/readline.c ============================================================================== --- head/lib/libedit/readline.c Thu Sep 26 16:25:06 2013 (r255890) +++ head/lib/libedit/readline.c Thu Sep 26 17:54:58 2013 (r255891) @@ -1363,6 +1363,9 @@ add_history(const char *line) TYPE(HistEvent) ev; const Char *wline; + if (line == NULL) + return 0; + if (h == NULL || e == NULL) rl_initialize(); From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 17:55:05 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 6C60DA09; Thu, 26 Sep 2013 17:55:05 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A39D2D9E; Thu, 26 Sep 2013 17:55: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 r8QHt5ft073498; Thu, 26 Sep 2013 17:55:05 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QHt58R073496; Thu, 26 Sep 2013 17:55:05 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201309261755.r8QHt58R073496@svn.freebsd.org> From: John-Mark Gurney Date: Thu, 26 Sep 2013 17:55:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255892 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 17:55:05 -0000 Author: jmg Date: Thu Sep 26 17:55:04 2013 New Revision: 255892 URL: http://svnweb.freebsd.org/changeset/base/255892 Log: it must be the last member, not might... Reviewed by: attilio Approved by: re (delphij, gjb) Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Sep 26 17:54:58 2013 (r255891) +++ head/sys/kern/kern_descrip.c Thu Sep 26 17:55:04 2013 (r255892) @@ -1518,7 +1518,7 @@ fdgrowtable(struct filedesc *fdp, int nf /* * In order to have a valid pattern for fget_unlocked() - * fdp->fd_nfiles might be the last member to be updated, otherwise + * fdp->fd_nfiles must be the last member to be updated, otherwise * fget_unlocked() consumers may reference a new, higher value for * fdp->fd_nfiles before to access the fdp->fd_ofiles array, * resulting in OOB accesses. From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 17:55:37 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 295E8BC8; Thu, 26 Sep 2013 17:55:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15E8A2DAB; Thu, 26 Sep 2013 17:55: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 r8QHtaNs073661; Thu, 26 Sep 2013 17:55:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QHtaiW073660; Thu, 26 Sep 2013 17:55:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309261755.r8QHtaiW073660@svn.freebsd.org> From: Xin LI Date: Thu, 26 Sep 2013 17:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255893 - head/lib/libarchive X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 17:55:37 -0000 Author: delphij Date: Thu Sep 26 17:55:36 2013 New Revision: 255893 URL: http://svnweb.freebsd.org/changeset/base/255893 Log: Temporarily disable iconv for non-shared library builds. The dynamic loading of conversation table is not yet compatible with static builds. Approved by: re (gjb) Modified: head/lib/libarchive/Makefile Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Thu Sep 26 17:55:04 2013 (r255892) +++ head/lib/libarchive/Makefile Thu Sep 26 17:55:36 2013 (r255893) @@ -35,7 +35,9 @@ LDADD+= -lmd .endif .if ${MK_ICONV} != "no" -CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const +# TODO: This can be changed back to CFLAGS once iconv works correctly +# with statically linked binaries. +SHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const .endif .if ${MACHINE_ARCH:Marm*} != "" || ${MACHINE_ARCH:Mmips*} != "" || \ From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 18:00:45 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id F0296F87; Thu, 26 Sep 2013 18:00:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C37872E30; Thu, 26 Sep 2013 18:00: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 r8QI0jWg077602; Thu, 26 Sep 2013 18:00:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QI0jVS077595; Thu, 26 Sep 2013 18:00:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309261800.r8QI0jVS077595@svn.freebsd.org> From: Xin LI Date: Thu, 26 Sep 2013 18:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255894 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 18:00:46 -0000 Author: delphij Date: Thu Sep 26 18:00:45 2013 New Revision: 255894 URL: http://svnweb.freebsd.org/changeset/base/255894 Log: Improve bsdpatch usability: - Ask only once for "Apply anyway". [1] - Tell user what file have failed patch rather than just how many hunks failed. Reported by: jmg via pfg [1] Tested by: pfg [1] Approved by: re (gjb) Modified: head/usr.bin/patch/patch.c head/usr.bin/patch/util.c Modified: head/usr.bin/patch/patch.c ============================================================================== --- head/usr.bin/patch/patch.c Thu Sep 26 17:55:36 2013 (r255893) +++ head/usr.bin/patch/patch.c Thu Sep 26 18:00:45 2013 (r255894) @@ -145,7 +145,7 @@ int main(int argc, char *argv[]) { int error = 0, hunk, failed, i, fd; - bool patch_seen; + bool patch_seen, reverse_seen; LINENUM where = 0, newwhere, fuzz, mymaxfuzz; const char *tmpdir; char *v; @@ -247,6 +247,7 @@ main(int argc, char *argv[]) /* apply each hunk of patch */ hunk = 0; failed = 0; + reverse_seen = false; out_of_mem = false; while (another_hunk()) { hunk++; @@ -257,7 +258,7 @@ main(int argc, char *argv[]) if (!skip_rest_of_patch) { do { where = locate_hunk(fuzz); - if (hunk == 1 && where == 0 && !force) { + if (hunk == 1 && where == 0 && !force && !reverse_seen) { /* dwim for reversed patch? */ if (!pch_swap()) { if (fuzz == 0) @@ -293,6 +294,8 @@ main(int argc, char *argv[]) ask("Apply anyway? [n] "); if (*buf != 'y') skip_rest_of_patch = true; + else + reverse_seen = true; where = 0; reverse = !reverse; if (!pch_swap()) @@ -406,8 +409,8 @@ main(int argc, char *argv[]) say("%d out of %d hunks %s--saving rejects to %s\n", failed, hunk, skip_rest_of_patch ? "ignored" : "failed", rejname); else - say("%d out of %d hunks %s\n", - failed, hunk, skip_rest_of_patch ? "ignored" : "failed"); + say("%d out of %d hunks %s while patching %s\n", + failed, hunk, skip_rest_of_patch ? "ignored" : "failed", filearg[0]); if (!check_only && move_file(TMPREJNAME, rejname) < 0) trejkeep = true; } Modified: head/usr.bin/patch/util.c ============================================================================== --- head/usr.bin/patch/util.c Thu Sep 26 17:55:36 2013 (r255893) +++ head/usr.bin/patch/util.c Thu Sep 26 18:00:45 2013 (r255894) @@ -412,7 +412,7 @@ checked_in(char *file) void version(void) { - fprintf(stderr, "patch 2.0-12u9 FreeBSD\n"); + fprintf(stderr, "patch 2.0-12u10 FreeBSD\n"); my_exit(EXIT_SUCCESS); } From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 18:01:33 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 06A0A209; Thu, 26 Sep 2013 18:01:33 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4AC02E43; Thu, 26 Sep 2013 18:01: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 r8QI1WGu078008; Thu, 26 Sep 2013 18:01:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QI1Wk2078007; Thu, 26 Sep 2013 18:01:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309261801.r8QI1Wk2078007@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Sep 2013 18:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255895 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 18:01:33 -0000 Author: nwhitehorn Date: Thu Sep 26 18:01:32 2013 New Revision: 255895 URL: http://svnweb.freebsd.org/changeset/base/255895 Log: Fix bug where UART unit number was not set properly, which prevented operation on systems with multiple serial ports. Also turn on interrupts for the UART device, which were disabled due to a now-fixed bug in QEMU. Approved by: re (gjb) Modified: head/sys/powerpc/pseries/phyp_console.c Modified: head/sys/powerpc/pseries/phyp_console.c ============================================================================== --- head/sys/powerpc/pseries/phyp_console.c Thu Sep 26 18:00:45 2013 (r255894) +++ head/sys/powerpc/pseries/phyp_console.c Thu Sep 26 18:01:32 2013 (r255895) @@ -150,6 +150,7 @@ uart_phyp_probe_node(struct uart_phyp_so OF_getprop(node, "reg", ®, sizeof(reg)); if (reg == -1) return (ENXIO); + sc->vtermid = reg; sc->node = node; if (OF_getprop(node, "compatible", buf, sizeof(buf)) <= 0) @@ -251,12 +252,8 @@ uart_phyp_attach(device_t dev) } sc->irqrid = 0; -#ifdef NOTYET sc->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqrid, RF_ACTIVE | RF_SHAREABLE); -#else - sc->irqres = NULL; -#endif if (sc->irqres != NULL) { bus_setup_intr(dev, sc->irqres, INTR_TYPE_TTY | INTR_MPSAFE, NULL, uart_phyp_intr, sc, &sc->sc_icookie); From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 21:18:47 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 72752383; Thu, 26 Sep 2013 21:18:47 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F7B62BB1; Thu, 26 Sep 2013 21:18: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 r8QLIlcK083477; Thu, 26 Sep 2013 21:18:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QLIlh9083476; Thu, 26 Sep 2013 21:18:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309262118.r8QLIlh9083476@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Sep 2013 21:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255903 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 21:18:47 -0000 Author: nwhitehorn Date: Thu Sep 26 21:18:46 2013 New Revision: 255903 URL: http://svnweb.freebsd.org/changeset/base/255903 Log: As idling the CPU no longer causes hangs on QEMU, reenable the pSeries cpu_idle() routine. Approved by: re (delphij) Modified: head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Thu Sep 26 21:04:42 2013 (r255902) +++ head/sys/powerpc/pseries/platform_chrp.c Thu Sep 26 21:18:46 2013 (r255903) @@ -386,9 +386,7 @@ chrp_reset(platform_t platform) static void phyp_cpu_idle(sbintime_t sbt) { - #ifdef NOTYET /* Causes hangs on QEMU */ phyp_hcall(H_CEDE); - #endif } static void From owner-svn-src-head@FreeBSD.ORG Thu Sep 26 22:47:03 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id B1FB670D; Thu, 26 Sep 2013 22:47:03 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8F4522FDC; Thu, 26 Sep 2013 22:47: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 r8QMl3LJ022771; Thu, 26 Sep 2013 22:47:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QMl3wx022767; Thu, 26 Sep 2013 22:47:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309262247.r8QMl3wx022767@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Sep 2013 22:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255904 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 22:47:03 -0000 Author: nwhitehorn Date: Thu Sep 26 22:47:02 2013 New Revision: 255904 URL: http://svnweb.freebsd.org/changeset/base/255904 Log: Allow Open Firmware syscons to attach to devices without an "address" property such as those found on some real and emulated IBM systems. The approach, which is taken from Linux, is to scan through the PCI bars until we find one large enough to contain the linear framebuffer and which is ideally prefetchable if no "address" property can be found. This makes the graphical console work with the pSeries target in QEMU. Approved by: re (delphij) Modified: head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/ofw/ofw_syscons.c head/sys/powerpc/ofw/ofw_syscons.h Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Thu Sep 26 21:18:46 2013 (r255903) +++ head/sys/powerpc/ofw/ofw_machdep.c Thu Sep 26 22:47:02 2013 (r255904) @@ -680,7 +680,7 @@ OF_decode_addr(phandle_t dev, int regno, bus_size_t size, rsize; uint32_t c, nbridge, naddr, nsize; phandle_t bridge, parent; - u_int spc, rspc; + u_int spc, rspc, prefetch; int pci, pcib, res; /* Sanity checking. */ @@ -707,6 +707,7 @@ OF_decode_addr(phandle_t dev, int regno, if (regno + naddr + nsize > res) return (EINVAL); spc = (pci) ? cell[regno] & OFW_PCI_PHYS_HI_SPACEMASK : ~0; + prefetch = (pci) ? cell[regno] & OFW_PCI_PHYS_HI_PREFETCHABLE : 0; addr = 0; for (c = 0; c < naddr; c++) addr = ((uint64_t)addr << 32) | cell[regno++]; @@ -763,6 +764,7 @@ OF_decode_addr(phandle_t dev, int regno, } *tag = &bs_le_tag; - return (bus_space_map(*tag, addr, size, 0, handle)); + return (bus_space_map(*tag, addr, size, + prefetch ? BUS_SPACE_MAP_PREFETCHABLE : 0, handle)); } Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Thu Sep 26 21:18:46 2013 (r255903) +++ head/sys/powerpc/ofw/ofw_syscons.c Thu Sep 26 22:47:02 2013 (r255904) @@ -199,13 +199,18 @@ ofwfb_foreground(uint8_t attr) } static u_int -ofwfb_pix32(int attr) +ofwfb_pix32(struct ofwfb_softc *sc, int attr) { u_int retval; - retval = (ofwfb_cmap[attr].blue << 16) | - (ofwfb_cmap[attr].green << 8) | - ofwfb_cmap[attr].red; + if (sc->sc_tag == &bs_le_tag) + retval = (ofwfb_cmap[attr].red << 16) | + (ofwfb_cmap[attr].green << 8) | + ofwfb_cmap[attr].blue; + else + retval = (ofwfb_cmap[attr].blue << 16) | + (ofwfb_cmap[attr].green << 8) | + ofwfb_cmap[attr].red; return (retval); } @@ -221,6 +226,7 @@ ofwfb_configure(int flags) int depth; int disable; int len; + int i; char type[16]; static int done = 0; @@ -265,7 +271,8 @@ ofwfb_configure(int flags) return (0); if (OF_getproplen(node, "height") != sizeof(sc->sc_height) || - OF_getproplen(node, "width") != sizeof(sc->sc_width)) + OF_getproplen(node, "width") != sizeof(sc->sc_width) || + OF_getproplen(node, "linebytes") != sizeof(sc->sc_stride)) return (0); sc->sc_depth = depth; @@ -276,20 +283,6 @@ ofwfb_configure(int flags) OF_getprop(node, "linebytes", &sc->sc_stride, sizeof(sc->sc_stride)); /* - * Grab the physical address of the framebuffer, and then map it - * into our memory space. If the MMU is not yet up, it will be - * remapped for us when relocation turns on. - * - * XXX We assume #address-cells is 1 at this point. - */ - if (OF_getproplen(node, "address") != sizeof(fb_phys)) - return (0); - OF_getprop(node, "address", &fb_phys, sizeof(fb_phys)); - - bus_space_map(&bs_be_tag, fb_phys, sc->sc_height * sc->sc_stride, - BUS_SPACE_MAP_PREFETCHABLE, &sc->sc_addr); - - /* * Get the PCI addresses of the adapter. The node may be the * child of the PCI device: in that case, try the parent for * the assigned-addresses property. @@ -300,9 +293,53 @@ ofwfb_configure(int flags) len = OF_getprop(OF_parent(node), "assigned-addresses", sc->sc_pciaddrs, sizeof(sc->sc_pciaddrs)); } + if (len == -1) + len = 0; + sc->sc_num_pciaddrs = len / sizeof(struct ofw_pci_register); - if (len != -1) { - sc->sc_num_pciaddrs = len / sizeof(struct ofw_pci_register); + /* + * Grab the physical address of the framebuffer, and then map it + * into our memory space. If the MMU is not yet up, it will be + * remapped for us when relocation turns on. + * + * XXX We assume #address-cells is 1 at this point. + */ + if (OF_getproplen(node, "address") == sizeof(fb_phys)) { + OF_getprop(node, "address", &fb_phys, sizeof(fb_phys)); + sc->sc_tag = &bs_be_tag; + bus_space_map(sc->sc_tag, fb_phys, sc->sc_height * + sc->sc_stride, BUS_SPACE_MAP_PREFETCHABLE, &sc->sc_addr); + } else { + /* + * Some IBM systems don't have an address property. Try to + * guess the framebuffer region from the assigned addresses. + * This is ugly, but there doesn't seem to be an alternative. + * Linux does the same thing. + */ + + fb_phys = sc->sc_num_pciaddrs; + for (i = 0; i < sc->sc_num_pciaddrs; i++) { + /* If it is too small, not the framebuffer */ + if (sc->sc_pciaddrs[i].size_lo < + sc->sc_stride*sc->sc_height) + continue; + /* If it is not memory, it isn't either */ + if (!(sc->sc_pciaddrs[i].phys_hi & + OFW_PCI_PHYS_HI_SPACE_MEM32)) + continue; + + /* This could be the framebuffer */ + fb_phys = i; + + /* If it is prefetchable, it certainly is */ + if (sc->sc_pciaddrs[i].phys_hi & + OFW_PCI_PHYS_HI_PREFETCHABLE) + break; + } + if (fb_phys == sc->sc_num_pciaddrs) + return (0); + + OF_decode_addr(node, fb_phys, &sc->sc_tag, &sc->sc_addr); } ofwfb_init(0, &sc->sc_va, 0); @@ -617,13 +654,14 @@ ofwfb_blank_display32(video_adapter_t *a { struct ofwfb_softc *sc; int i; - uint32_t *addr; + uint32_t *addr, blank; sc = (struct ofwfb_softc *)adp; addr = (uint32_t *) sc->sc_addr; + blank = ofwfb_pix32(sc, ofwfb_background(SC_NORM_ATTR)); for (i = 0; i < (sc->sc_stride/4)*sc->sc_height; i++) - *(addr + i) = ofwfb_pix32(ofwfb_background(SC_NORM_ATTR)); + *(addr + i) = blank; return (0); } @@ -821,7 +859,7 @@ ofwfb_putc32(video_adapter_t *adp, vm_of int row; int col; int i, j, k; - uint32_t *addr; + uint32_t *addr, fg, bg; u_char *p; sc = (struct ofwfb_softc *)adp; @@ -831,13 +869,16 @@ ofwfb_putc32(video_adapter_t *adp, vm_of addr = (uint32_t *)sc->sc_addr + (row + sc->sc_ymargin)*(sc->sc_stride/4) + col + sc->sc_xmargin; + + fg = ofwfb_pix32(sc, ofwfb_foreground(a)); + bg = ofwfb_pix32(sc, ofwfb_background(a)); for (i = 0; i < sc->sc_font_height; i++) { for (j = 0, k = 7; j < 8; j++, k--) { if ((p[i] & (1 << k)) == 0) - *(addr + j) = ofwfb_pix32(ofwfb_background(a)); + *(addr + j) = bg; else - *(addr + j) = ofwfb_pix32(ofwfb_foreground(a)); + *(addr + j) = fg; } addr += (sc->sc_stride/4); } @@ -928,8 +969,8 @@ ofwfb_putm32(video_adapter_t *adp, int x + (y + sc->sc_ymargin)*(sc->sc_stride/4) + x + sc->sc_xmargin; - fg = ofwfb_pix32(ofwfb_foreground(SC_NORM_ATTR)); - bg = ofwfb_pix32(ofwfb_background(SC_NORM_ATTR)); + fg = ofwfb_pix32(sc, ofwfb_foreground(SC_NORM_ATTR)); + bg = ofwfb_pix32(sc, ofwfb_background(SC_NORM_ATTR)); for (i = 0; i < size && i+y < sc->sc_height - 2*sc->sc_ymargin; i++) { for (j = 0, k = width; j < 8; j++, k--) { Modified: head/sys/powerpc/ofw/ofw_syscons.h ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.h Thu Sep 26 21:18:46 2013 (r255903) +++ head/sys/powerpc/ofw/ofw_syscons.h Thu Sep 26 22:47:02 2013 (r255904) @@ -32,6 +32,7 @@ struct ofwfb_softc { video_adapter_t sc_va; struct cdev *sc_si; + bus_space_tag_t sc_tag; phandle_t sc_node; int sc_console; From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 02:35:15 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id E821A1E9; Fri, 27 Sep 2013 02:35:15 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B63E32A84; Fri, 27 Sep 2013 02:35:14 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r8R2Z8g7035211; Fri, 27 Sep 2013 02:35:08 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.123] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id cg7etj83qx96ezw8zu3pw4dxh6; Fri, 27 Sep 2013 02:35:07 +0000 (UTC) (envelope-from tim@kientzle.com) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255775 - head/include From: Tim Kientzle In-Reply-To: <1379947117.1197.137.camel@revolution.hippie.lan> Date: Thu, 26 Sep 2013 19:35:07 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <6B2E36C3-C398-4B25-8DFC-93516B6E33CE@kientzle.com> References: <201309212236.r8LMa7mB019988@svn.freebsd.org> <46908E9F-A9B3-4ADF-A5A4-C77F5A479E65@kientzle.com> <1379947117.1197.137.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1510) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 02:35:16 -0000 Ian, Sorry for being a little slow to respond. It took me a while, but I have verified that a recent checkout, in my = environment: * Does build with this patch. * Does not build without it. Please commit. Thanks, Tim On Sep 23, 2013, at 7:38 AM, Ian Lepore wrote: > Yeah, I think the moral of this neverending story is that relying on = $0 > for pathnames is a Bad Idea. Apparently in addition to the patch from > PR 160646, we still need something like the patch I proposed in PR > 174422. I'll attach an updated version of that. I've got a test = build > running now, I'll see about getting it commited if it fixes the = problem > you're seeing. >=20 > -- Ian >=20 > On Mon, 2013-09-23 at 06:49 -0700, Tim Kientzle wrote: >> This breaks the build in the peculiar case where you have >> a git checkout of some other project, then a FreeBSD SVN >> checkout inside of that: >>=20 >> Project/.git >> Project/src/ -- FreeBSD source tree. >>=20 >> For some reason newvers.sh is now looking one level too far >> up, so it's seeing the dir containing the source tree instead of the >> root of the source tree. >>=20 >> This may be related to the use of '.' to run newvers.sh >> combined with newvers.sh using $(basename $0) to determine >> the script dir, but I haven't dug through in detail yet. >>=20 >> Tim >>=20 >>=20 >>=20 >> On Sep 21, 2013, at 3:36 PM, Ian Lepore wrote: >>=20 >>> Author: ian >>> Date: Sat Sep 21 22:36:07 2013 >>> New Revision: 255775 >>> URL: http://svnweb.freebsd.org/changeset/base/255775 >>>=20 >>> Log: >>> Create a separate script to generate osreldate.h rather than = sourcing >>> newvers.sh into a temporary subshell with inline make rules. >>>=20 >>> Using a separate script fixes a variety of problems, including = establishing >>> the correct dependencies in the makefiles. It also eliminates a = problem >>> with the way newvers.sh uses `realpath $0`, because $0 expands = differently >>> within a script sourced into a rule in a makefile depending on the = version >>> of make and of /bin/sh being used. The latter can cause build = breakage in a >>> cross-build environment, and can also make it difficult to compile = 10.0 on >>> older pre-10.0 systems. >>>=20 >>> PR: 160646 174422 >>> Submitted by: Garrett Cooper >>> Approved by: re (gjb) >>> MFC after: 2 weeks >>>=20 >>> Added: >>> head/include/mk-osreldate.sh (contents, props changed) >>> Modified: >>> head/include/Makefile >>>=20 >>> Modified: head/include/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/include/Makefile Sat Sep 21 22:24:10 2013 = (r255774) >>> +++ head/include/Makefile Sat Sep 21 22:36:07 2013 = (r255775) >>> @@ -104,19 +104,16 @@ SHARED?=3D copies >>>=20 >>> INCS+=3D osreldate.h >>>=20 >>> -osreldate.h: ${.CURDIR}/../sys/conf/newvers.sh = ${.CURDIR}/../sys/sys/param.h \ >>> - ${.CURDIR}/Makefile >>> - @${ECHO} creating osreldate.h from newvers.sh >>> - @MAKE=3D${MAKE}; \ >>> - PARAMFILE=3D${.CURDIR}/../sys/sys/param.h; \ >>> - . ${.CURDIR}/../sys/conf/newvers.sh; \ >>> - echo "$$COPYRIGHT" > osreldate.h; \ >>> - echo "#ifdef _KERNEL" >> osreldate.h; \ >>> - echo "#error \" cannot be used in the kernel, use = \"" >> osreldate.h; \ >>> - echo "#else" >> osreldate.h; \ >>> - echo "#undef __FreeBSD_version" >> osreldate.h; \ >>> - echo "#define __FreeBSD_version $$RELDATE" >> osreldate.h; \ >>> - echo "#endif" >> osreldate.h >>> +NEWVERS_SH=3D ${.CURDIR}/../sys/conf/newvers.sh >>> +PARAM_H=3D ${.CURDIR}/../sys/sys/param.h >>> +MK_OSRELDATE_SH=3D ${.CURDIR}/mk-osreldate.sh >>> + >>> +osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} >>> + env ECHO=3D"${ECHO}" \ >>> + MAKE=3D"${MAKE}" \ >>> + NEWVERS_SH=3D${NEWVERS_SH} \ >>> + PARAM_H=3D${PARAM_H} \ >>> + ${MK_OSRELDATE_SH} >>>=20 >>> .for i in ${LHDRS} >>> INCSLINKS+=3D sys/$i ${INCLUDEDIR}/$i >>>=20 >>> Added: head/include/mk-osreldate.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 >>> --- /dev/null 00:00:00 1970 (empty, because file is newly = added) >>> +++ head/include/mk-osreldate.sh Sat Sep 21 22:36:07 2013 = (r255775) >>> @@ -0,0 +1,49 @@ >>> +#!/bin/sh - >>> +# Copyright (c) 2013 Garrett Cooper >>> +# 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$ >>> + >>> +set -e >>> + >>> +CURDIR=3D$(pwd) >>> +ECHO=3D${ECHO:=3Decho} >>> + >>> +tmpfile=3D$(mktemp osreldate.XXXXXXXX) >>> +trap "rm -f $tmpfile" EXIT >>> + >>> +${ECHO} creating osreldate.h from newvers.sh >>> + >>> +export PARAMFILE=3D"${PARAM_H:=3D$CURDIR/../sys/sys/param.h}" >>> +. "${NEWVERS_SH:=3D$CURDIR/../sys/conf/newvers.sh}" >>> +cat > $tmpfile <>> +$COPYRIGHT >>> +#ifdef _KERNEL >>> +#error " cannot be used in the kernel, use = " >>> +#else >>> +#undef __FreeBSD_version >>> +#define __FreeBSD_version $RELDATE >>> +#endif >>> +EOF >>> +mv $tmpfile osreldate.h >>=20 >=20 > Index: include/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 > --- include/Makefile (revision 255808) > +++ include/Makefile (working copy) > @@ -104,8 +104,9 @@ SHARED?=3D copies >=20 > INCS+=3D osreldate.h >=20 > -NEWVERS_SH=3D ${.CURDIR}/../sys/conf/newvers.sh > -PARAM_H=3D ${.CURDIR}/../sys/sys/param.h > +SYSDIR=3D ${.CURDIR}/../sys > +NEWVERS_SH=3D ${SYSDIR}/conf/newvers.sh > +PARAM_H=3D ${SYSDIR}/sys/param.h > MK_OSRELDATE_SH=3D ${.CURDIR}/mk-osreldate.sh >=20 > osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} > @@ -113,6 +114,7 @@ osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_ > MAKE=3D"${MAKE}" \ > NEWVERS_SH=3D${NEWVERS_SH} \ > PARAM_H=3D${PARAM_H} \ > + SYSDIR=3D${SYSDIR} \ > sh ${MK_OSRELDATE_SH} >=20 > .for i in ${LHDRS} > Index: sys/conf/newvers.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 > --- sys/conf/newvers.sh (revision 255808) > +++ sys/conf/newvers.sh (working copy) > @@ -38,8 +38,11 @@ if [ "X${BRANCH_OVERRIDE}" !=3D "X" ]; then > fi > RELEASE=3D"${REVISION}-${BRANCH}" > VERSION=3D"${TYPE} ${RELEASE}" > -SYSDIR=3D$(dirname $0)/.. >=20 > +if [ "X${SYSDIR}" =3D "X" ]; then > + SYSDIR=3D$(dirname $0)/.. > +fi > + > if [ "X${PARAMFILE}" !=3D "X" ]; then > RELDATE=3D$(awk '/__FreeBSD_version.*propagated to newvers/ = {print $3}' \ > ${PARAMFILE}) From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 11:25:37 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id E215D498; Fri, 27 Sep 2013 11:25:37 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF4C9248E; Fri, 27 Sep 2013 11:25: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 r8RBPbFY033345; Fri, 27 Sep 2013 11:25:37 GMT (envelope-from brd@svn.freebsd.org) Received: (from brd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8RBPbG8033342; Fri, 27 Sep 2013 11:25:37 GMT (envelope-from brd@svn.freebsd.org) Message-Id: <201309271125.r8RBPbG8033342@svn.freebsd.org> From: Brad Davis Date: Fri, 27 Sep 2013 11:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255908 - in head/usr.sbin: bsdconfig/share/media 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 11:25:38 -0000 Author: brd (doc committer) Date: Fri Sep 27 11:25:37 2013 New Revision: 255908 URL: http://svnweb.freebsd.org/changeset/base/255908 Log: - Remove the is (Iceland) mirror per mail from the admins. Approved by: re With hat: clusteradm@ Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr head/usr.sbin/bsdinstall/scripts/mirrorselect Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/ftp.subr Fri Sep 27 09:55:06 2013 (r255907) +++ head/usr.sbin/bsdconfig/share/media/ftp.subr Fri Sep 27 11:25:37 2013 (r255908) @@ -125,7 +125,6 @@ f_dialog_menu_media_ftp() ' $msg_germany #8' 'ftp8.de.freebsd.org' '$msg_greece' 'ftp.gr.freebsd.org' ' $msg_greece #2' 'ftp2.gr.freebsd.org' - '$msg_iceland' 'ftp.is.freebsd.org' '$msg_ireland' 'ftp3.ie.freebsd.org' '$msg_israel' 'ftp.il.freebsd.org' '$msg_italy' 'ftp.it.freebsd.org' Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- head/usr.sbin/bsdinstall/scripts/mirrorselect Fri Sep 27 09:55:06 2013 (r255907) +++ head/usr.sbin/bsdinstall/scripts/mirrorselect Fri Sep 27 11:25:37 2013 (r255908) @@ -87,7 +87,6 @@ MIRROR=`dialog --backtitle "FreeBSD Inst ftp://ftp8.de.freebsd.org "Germany #8"\ ftp://ftp.gr.freebsd.org "Greece"\ ftp://ftp2.gr.freebsd.org "Greece #2"\ - ftp://ftp.is.freebsd.org "Iceland"\ ftp://ftp3.ie.freebsd.org "Ireland #3"\ ftp://ftp.il.freebsd.org "Israel"\ ftp://ftp.it.freebsd.org "Italy"\ From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 13:11:21 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 57F3BDEB; Fri, 27 Sep 2013 13:11:21 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2BE022C44; Fri, 27 Sep 2013 13:11: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 r8RDBKeQ090627; Fri, 27 Sep 2013 13:11:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8RDBKPH090625; Fri, 27 Sep 2013 13:11:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309271311.r8RDBKPH090625@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 27 Sep 2013 13:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255909 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 13:11:21 -0000 Author: nwhitehorn Date: Fri Sep 27 13:11:20 2013 New Revision: 255909 URL: http://svnweb.freebsd.org/changeset/base/255909 Log: Make sure that ref and changed bits propagate back to the VM layer whenever pages are unmapped. The old code had several races that could allow these to become stale. Approved by: re (kib) Modified: head/sys/powerpc/pseries/mmu_phyp.c Modified: head/sys/powerpc/pseries/mmu_phyp.c ============================================================================== --- head/sys/powerpc/pseries/mmu_phyp.c Fri Sep 27 11:25:37 2013 (r255908) +++ head/sys/powerpc/pseries/mmu_phyp.c Fri Sep 27 13:11:20 2013 (r255909) @@ -201,6 +201,7 @@ mphyp_pte_synch(mmu_t mmu, uintptr_t slo struct lpte pte; uint64_t junk; + __asm __volatile("ptesync"); phyp_pft_hcall(H_READ, 0, slot, 0, 0, &pte.pte_hi, &pte.pte_lo, &junk); @@ -221,9 +222,16 @@ mphyp_pte_clear(mmu_t mmu, uintptr_t slo static void mphyp_pte_unset(mmu_t mmu, uintptr_t slot, struct lpte *pvo_pt, uint64_t vpn) { + struct lpte pte; + uint64_t junk; + int err; + + err = phyp_pft_hcall(H_REMOVE, 1UL << 31, slot, + pvo_pt->pte_hi & LPTE_AVPN_MASK, 0, &pte.pte_hi, &pte.pte_lo, + &junk); + KASSERT(err == H_SUCCESS, ("Error removing page: %d", err)); - /* XXX: last argument can check the VPN -- set flag to enable */ - phyp_hcall(H_REMOVE, 0, slot, vpn); + pvo_pt->pte_lo |= pte.pte_lo & (LPTE_CHG | LPTE_REF); } static void @@ -242,9 +250,7 @@ mphyp_pte_change(mmu_t mmu, uintptr_t sl ("Locked pages not supported on PHYP")); /* XXX: optimization using H_PROTECT for common case? */ - result = phyp_hcall(H_REMOVE, 0, slot, vpn); - if (result != H_SUCCESS) - panic("mphyp_pte_change() invalidation failure: %ld\n", result); + mphyp_pte_unset(mmu, slot, pvo_pt, vpn); result = phyp_pft_hcall(H_ENTER, H_EXACT, slot, pvo_pt->pte_hi, pvo_pt->pte_lo, &index, &evicted.pte_lo, &junk); if (result != H_SUCCESS) @@ -360,7 +366,8 @@ mphyp_pte_insert(mmu_t mmu, u_int ptegid if (pvo->pvo_pte.lpte.pte_hi == evicted.pte_hi) { KASSERT(pvo->pvo_pte.lpte.pte_hi & LPTE_VALID, ("Invalid PVO for valid PTE!")); - phyp_hcall(H_REMOVE, 0, index, 0); + mphyp_pte_unset(mmu, index, &pvo->pvo_pte.lpte, + pvo->pvo_vpn); PVO_PTEGIDX_CLR(pvo); moea64_pte_overflow++; break; From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 13:12:48 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id C67DAFC0; Fri, 27 Sep 2013 13:12:48 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 988F52C6A; Fri, 27 Sep 2013 13:12: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 r8RDCmBj090940; Fri, 27 Sep 2013 13:12:48 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8RDClYW090933; Fri, 27 Sep 2013 13:12:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309271312.r8RDClYW090933@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 27 Sep 2013 13:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255910 - in head/sys/powerpc: include ofw powermac pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 13:12:48 -0000 Author: nwhitehorn Date: Fri Sep 27 13:12:47 2013 New Revision: 255910 URL: http://svnweb.freebsd.org/changeset/base/255910 Log: Rework handling of ofw_quiesce(), making it the responsibility of the platform modules. Whether to call this function or not is highly machine dependent: on some systems, it is required, while on others it breaks everything. Platform modules are in a better position to figure this out. This is required for POWER hypervisor SCSI to work correctly. There are no functional changes on Powermac systems. Approved by: re (kib) Modified: head/sys/powerpc/include/ofw_machdep.h head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/powermac/platform_powermac.c head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/include/ofw_machdep.h ============================================================================== --- head/sys/powerpc/include/ofw_machdep.h Fri Sep 27 13:11:20 2013 (r255909) +++ head/sys/powerpc/include/ofw_machdep.h Fri Sep 27 13:12:47 2013 (r255910) @@ -46,5 +46,6 @@ boolean_t OF_bootstrap(void); void OF_reboot(void); void ofw_mem_regions(struct mem_region **, int *, struct mem_region **, int *); +void ofw_quiesce(void); /* Must be called before VM is up! */ #endif /* _MACHINE_OFW_MACHDEP_H_ */ Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Fri Sep 27 13:11:20 2013 (r255909) +++ head/sys/powerpc/ofw/ofw_machdep.c Fri Sep 27 13:12:47 2013 (r255910) @@ -69,7 +69,6 @@ static void *fdt; int ofw_real_mode; int ofwcall(void *); -static void ofw_quiesce(void); static int openfirmware(void *args); /* @@ -472,12 +471,6 @@ OF_bootstrap() return status; OF_init(openfirmware); - - /* - * On some machines, we need to quiesce OF to turn off - * background processes. - */ - ofw_quiesce(); } else if (fdt != NULL) { status = OF_install(OFW_FDT, 0); @@ -490,37 +483,21 @@ OF_bootstrap() return (status); } -static void +void ofw_quiesce(void) { - phandle_t rootnode; - char model[32]; struct { cell_t name; cell_t nargs; cell_t nreturns; } args; - /* - * Only quiesce Open Firmware on PowerMac11,2 and 12,1. It is - * necessary there to shut down a background thread doing fan - * management, and is harmful on other machines. - * - * Note: we don't need to worry about which OF module we are - * using since this is called only from very early boot, within - * OF's boot context. - */ + KASSERT(!pmap_bootstrapped, ("Cannot call ofw_quiesce after VM is up")); - rootnode = OF_finddevice("/"); - if (OF_getprop(rootnode, "model", model, sizeof(model)) > 0) { - if (strcmp(model, "PowerMac11,2") == 0 || - strcmp(model, "PowerMac12,1") == 0) { - args.name = (cell_t)(uintptr_t)"quiesce"; - args.nargs = 0; - args.nreturns = 0; - openfirmware(&args); - } - } + args.name = (cell_t)(uintptr_t)"quiesce"; + args.nargs = 0; + args.nreturns = 0; + openfirmware(&args); } static int Modified: head/sys/powerpc/powermac/platform_powermac.c ============================================================================== --- head/sys/powerpc/powermac/platform_powermac.c Fri Sep 27 13:11:20 2013 (r255909) +++ head/sys/powerpc/powermac/platform_powermac.c Fri Sep 27 13:12:47 2013 (r255910) @@ -56,6 +56,7 @@ extern void *ap_pcpu; #endif static int powermac_probe(platform_t); +static int powermac_attach(platform_t); void powermac_mem_regions(platform_t, struct mem_region **phys, int *physsz, struct mem_region **avail, int *availsz); static u_long powermac_timebase_freq(platform_t, struct cpuref *cpuref); @@ -67,6 +68,7 @@ static void powermac_reset(platform_t); static platform_method_t powermac_methods[] = { PLATFORMMETHOD(platform_probe, powermac_probe), + PLATFORMMETHOD(platform_attach, powermac_attach), PLATFORMMETHOD(platform_mem_regions, powermac_mem_regions), PLATFORMMETHOD(platform_timebase_freq, powermac_timebase_freq), @@ -118,6 +120,35 @@ powermac_mem_regions(platform_t plat, st ofw_mem_regions(phys,physsz,avail,availsz); } +static int +powermac_attach(platform_t plat) +{ + phandle_t rootnode; + char model[32]; + + + /* + * Quiesce Open Firmware on PowerMac11,2 and 12,1. It is + * necessary there to shut down a background thread doing fan + * management, and is harmful on other machines (it will make OF + * shut off power to various system components it had turned on). + * + * Note: we don't need to worry about which OF module we are + * using since this is called only from very early boot, within + * OF's boot context. + */ + + rootnode = OF_finddevice("/"); + if (OF_getprop(rootnode, "model", model, sizeof(model)) > 0) { + if (strcmp(model, "PowerMac11,2") == 0 || + strcmp(model, "PowerMac12,1") == 0) { + ofw_quiesce(); + } + } + + return (0); +} + static u_long powermac_timebase_freq(platform_t plat, struct cpuref *cpuref) { Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Fri Sep 27 13:11:20 2013 (r255909) +++ head/sys/powerpc/pseries/platform_chrp.c Fri Sep 27 13:12:47 2013 (r255910) @@ -151,6 +151,9 @@ chrp_attach(platform_t plat) } #endif + /* Some systems (e.g. QEMU) need Open Firmware to stand down */ + ofw_quiesce(); + return (0); } From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 14:48:54 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id BFC14720; Fri, 27 Sep 2013 14:48:54 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw12.york.ac.uk (mail-gw12.york.ac.uk [144.32.129.162]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B758B26A4; Fri, 27 Sep 2013 14:48:53 +0000 (UTC) Received: from ury.york.ac.uk ([144.32.64.162]:55676) by mail-gw12.york.ac.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1VPZLY-00061a-4o; Fri, 27 Sep 2013 15:48:44 +0100 Date: Fri, 27 Sep 2013 15:48:43 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@thunderhorn.york.ac.uk To: Devin Teske Subject: Re: svn commit: r255852 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/package/freebsd contrib/dialog/po contrib/dialog/samples gnu/lib/libdialog In-Reply-To: <201309241452.r8OEqhlx043365@svn.freebsd.org> Message-ID: References: <201309241452.r8OEqhlx043365@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 14:48:54 -0000 On Tue, 24 Sep 2013, Devin Teske wrote: > Author: dteske > Date: Tue Sep 24 14:52:43 2013 > New Revision: 255852 > URL: http://svnweb.freebsd.org/changeset/base/255852 > > Log: > Update dialog to 1.2-20130923. Hi, It sounds like this is an official release, and therefore it looks like this should have been imported onto the vendor branch (vendor/dialog/) first, and copied over? If that's the case, can this be reverted please, and imported via the vendor branch? Thanks, Gavin > Added: > head/contrib/dialog/package/freebsd/ > head/contrib/dialog/package/freebsd/Makefile (contents, props changed) > head/contrib/dialog/package/freebsd/distinfo > head/contrib/dialog/package/freebsd/pkg-descr > head/contrib/dialog/package/freebsd/pkg-plist > head/contrib/dialog/po/fa.po > Modified: > head/contrib/dialog/CHANGES > head/contrib/dialog/VERSION > head/contrib/dialog/aclocal.m4 > head/contrib/dialog/arrows.c > head/contrib/dialog/buildlist.c > head/contrib/dialog/checklist.c > head/contrib/dialog/config.guess > head/contrib/dialog/config.sub > head/contrib/dialog/configure > head/contrib/dialog/configure.in > head/contrib/dialog/dialog.1 > head/contrib/dialog/dialog.3 > head/contrib/dialog/dialog.c > head/contrib/dialog/dialog.h > head/contrib/dialog/formbox.c > head/contrib/dialog/guage.c > head/contrib/dialog/inputstr.c > head/contrib/dialog/makefile.in > head/contrib/dialog/menubox.c > head/contrib/dialog/mixedform.c > head/contrib/dialog/package/debian/changelog > head/contrib/dialog/package/debian/copyright > head/contrib/dialog/package/dialog.spec > head/contrib/dialog/po/lt.po > head/contrib/dialog/samples/inputbox6-utf8 > head/contrib/dialog/samples/report-tempfile > head/contrib/dialog/treeview.c > head/contrib/dialog/util.c > head/gnu/lib/libdialog/dlg_config.h > > Modified: head/contrib/dialog/CHANGES > ============================================================================== > --- head/contrib/dialog/CHANGES Tue Sep 24 14:46:10 2013 (r255851) > +++ head/contrib/dialog/CHANGES Tue Sep 24 14:52:43 2013 (r255852) > @@ -1,9 +1,38 @@ > --- $Id: CHANGES,v 1.458 2013/05/24 00:23:22 tom Exp $ > +-- $Id: CHANGES,v 1.476 2013/09/24 00:06:47 tom Exp $ > -- Thomas E. Dickey > > This version of dialog was originally from a Debian snapshot. I've done this > to it: > > +2013/09/23 > + + fix samples/inputbox6-utf8, which had depended unnecessarily on bash. > + + improve memory caching for wide-character manipulation in gauge > + widget (report by Devin Teske). > + + add dlg_reallocate_gauge (discussion with Devin Teske). > + + updated configure macros to use msys changes from ncurses. > + + update config.guess, config.sub > + > +2013/09/02 > + + modify makefile rule to make the ".png" filenames created by groff > + predictable. > + + add option --help-tags to allow scripts to get the item's tag field > + consistently from help- and help-item button results rather than > + getting the item's text for the latter (discussion with Florent > + Rougon). > + + correct manpage discussion of DIALOG_ITEM_HELP versus --item-help, > + as well as --help-button return status (report by Florent Rougon). > + + correct limit used for --hline option (report by Devin Teske, > + cf: 2011/06/30). > + + do not print empty "[]" if a --hline option was given with an empty > + value (report by Devin Teske). > + + miscellaneous configure script fixes/updates. In particular, add > + option --with-shared which builds shared libraries without a libtool > + dependency. > + + add FreeBSD port-files for test-builds. > + + update lt.po, add fa.po from > + http://translationproject.org/latest/dialog/ > + + update config.guess, config.sub > + > 2013/05/23 > + modify ifdef in arrows.c to work around packages which use the > wide-character ncursesw headers with the ncurses library (report > @@ -298,7 +327,7 @@ to it: > separate ncurses' header files. > + CF_DISABLE_RPATH_HACK, fix garbled message > + CF_LD_RPATH_OPT, add mirbsd > - + CF_MAKEFLAGS, filter out GNU make's entering/leaving messages. > + + CF_MAKEFLAGS, filter out GNU make's entering/leaving messages. > This only appeared when using the macro in a dpkg script, though it > should have in other cases. > + CF_RPATH_HACK, add a check for libraries not found, e.g., from > > Modified: head/contrib/dialog/VERSION > ============================================================================== > --- head/contrib/dialog/VERSION Tue Sep 24 14:46:10 2013 (r255851) > +++ head/contrib/dialog/VERSION Tue Sep 24 14:52:43 2013 (r255852) > @@ -1 +1 @@ > -11:1:0 1.2 20130523 > +11:1:0 1.2 20130923 > > Modified: head/contrib/dialog/aclocal.m4 > ============================================================================== > --- head/contrib/dialog/aclocal.m4 Tue Sep 24 14:46:10 2013 (r255851) > +++ head/contrib/dialog/aclocal.m4 Tue Sep 24 14:52:43 2013 (r255852) > @@ -1,7 +1,7 @@ > dnl macros used for DIALOG configure script > -dnl $Id: aclocal.m4,v 1.90 2012/12/02 20:07:30 tom Exp $ > +dnl $Id: aclocal.m4,v 1.94 2013/09/22 14:26:24 tom Exp $ > dnl --------------------------------------------------------------------------- > -dnl Copyright 1999-2011,2012 -- Thomas E. Dickey > +dnl Copyright 1999-2012,2013 -- Thomas E. Dickey > dnl > dnl Permission is hereby granted, free of charge, to any person obtaining a > dnl copy of this software and associated documentation files (the > @@ -590,7 +590,7 @@ changequote([,])dnl > AC_SUBST(GENCAT) > ])dnl > dnl --------------------------------------------------------------------------- > -dnl CF_ACVERSION_CHECK version: 3 updated: 2012/10/03 18:39:53 > +dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56 > dnl ------------------ > dnl Conditionally generate script according to whether we're using a given autoconf. > dnl > @@ -599,6 +599,7 @@ dnl $2 = code to use if AC_ACVERSION is > dnl $3 = code to use if AC_ACVERSION is older than $1. > define([CF_ACVERSION_CHECK], > [ > +ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl > ifdef([m4_version_compare], > [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], > [CF_ACVERSION_COMPARE( > @@ -1125,6 +1126,27 @@ if test ".$system_name" != ".$cf_cv_syst > fi > ])dnl > dnl --------------------------------------------------------------------------- > +dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 > +dnl ------------------------ > +dnl Show the version of libtool > +dnl > +dnl Save the version in a cache variable - this is not entirely a good thing, > +dnl but the version string from libtool is very ugly, and for bug reports it > +dnl might be useful to have the original string. > +AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[ > +if test -n "$LIBTOOL" && test "$LIBTOOL" != none > +then > + AC_MSG_CHECKING(version of $LIBTOOL) > + CF_LIBTOOL_VERSION > + AC_MSG_RESULT($cf_cv_libtool_version) > + if test -z "$cf_cv_libtool_version" ; then > + AC_MSG_ERROR(This is not GNU libtool) > + fi > +else > + AC_MSG_ERROR(GNU libtool has not been found) > +fi > +])dnl > +dnl --------------------------------------------------------------------------- > dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39 > dnl ----------------- > dnl Check if the given compiler is really clang. clang's C driver defines > @@ -1293,7 +1315,7 @@ fi > AC_CHECK_HEADERS($cf_cv_ncurses_header) > ])dnl > dnl --------------------------------------------------------------------------- > -dnl CF_CURSES_LIBS version: 36 updated: 2012/07/07 21:02:48 > +dnl CF_CURSES_LIBS version: 37 updated: 2013/02/09 17:33:50 > dnl -------------- > dnl Look for the curses libraries. Older curses implementations may require > dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. > @@ -1330,7 +1352,7 @@ hpux10.*) #(vi > ac_cv_func_initscr=yes > ])]) > fi > - ;; > + ;; > linux*) > case `arch 2>/dev/null` in > x86_64) > @@ -1345,7 +1367,7 @@ linux*) > CF_ADD_LIBDIR(/lib) > ;; > esac > - ;; > + ;; > sunos3*|sunos4*) > if test "x$cf_cv_screen" = "xcurses_5lib" > then > @@ -1359,59 +1381,63 @@ sunos3*|sunos4*) > esac > > if test ".$ac_cv_func_initscr" != .yes ; then > - cf_save_LIBS="$LIBS" > - cf_term_lib="" > - cf_curs_lib="" > + cf_save_LIBS="$LIBS" > > - if test ".${cf_cv_ncurses_version:-no}" != .no > - then > - cf_check_list="ncurses curses cursesX" > - else > - cf_check_list="cursesX curses ncurses" > - fi > + if test ".${cf_cv_ncurses_version:-no}" != .no > + then > + cf_check_list="ncurses curses cursesX" > + else > + cf_check_list="cursesX curses ncurses" > + fi > > - # Check for library containing tgoto. Do this before curses library > - # because it may be needed to link the test-case for initscr. > - AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ > - for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown > - do > - AC_CHECK_LIB($cf_term_lib,tgoto,[break]) > - done > - ]) > + # Check for library containing tgoto. Do this before curses library > + # because it may be needed to link the test-case for initscr. > + if test "x$cf_term_lib" = x > + then > + AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ > + for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown > + do > + AC_CHECK_LIB($cf_term_lib,tgoto,[break]) > + done > + ]) > + fi > > - # Check for library containing initscr > - test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" > - for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown > - do > - AC_CHECK_LIB($cf_curs_lib,initscr,[break]) > - done > - test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found) > + # Check for library containing initscr > + test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" > + if test "x$cf_curs_lib" = x > + then > + for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown > + do > + AC_CHECK_LIB($cf_curs_lib,initscr,[break]) > + done > + fi > + test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found) > > - LIBS="-l$cf_curs_lib $cf_save_LIBS" > - if test "$cf_term_lib" = unknown ; then > - AC_MSG_CHECKING(if we can link with $cf_curs_lib library) > - AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], > - [initscr()], > - [cf_result=yes], > - [cf_result=no]) > - AC_MSG_RESULT($cf_result) > - test $cf_result = no && AC_MSG_ERROR(Cannot link curses library) > - elif test "$cf_curs_lib" = "$cf_term_lib" ; then > - : > - elif test "$cf_term_lib" != predefined ; then > - AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) > - AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], > - [initscr(); tgoto((char *)0, 0, 0);], > - [cf_result=no], > - [ > - LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" > - AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], > - [initscr()], > - [cf_result=yes], > - [cf_result=error]) > - ]) > - AC_MSG_RESULT($cf_result) > - fi > + LIBS="-l$cf_curs_lib $cf_save_LIBS" > + if test "$cf_term_lib" = unknown ; then > + AC_MSG_CHECKING(if we can link with $cf_curs_lib library) > + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], > + [initscr()], > + [cf_result=yes], > + [cf_result=no]) > + AC_MSG_RESULT($cf_result) > + test $cf_result = no && AC_MSG_ERROR(Cannot link curses library) > + elif test "$cf_curs_lib" = "$cf_term_lib" ; then > + : > + elif test "$cf_term_lib" != predefined ; then > + AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) > + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], > + [initscr(); tgoto((char *)0, 0, 0);], > + [cf_result=no], > + [ > + LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" > + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], > + [initscr()], > + [cf_result=yes], > + [cf_result=error]) > + ]) > + AC_MSG_RESULT($cf_result) > + fi > fi > fi > > @@ -1708,6 +1734,20 @@ if test "$cf_disable_rpath_hack" = no ; > fi > ]) > dnl --------------------------------------------------------------------------- > +dnl CF_ENABLE_RPATH version: 2 updated: 2010/03/27 18:39:42 > +dnl --------------- > +dnl Check if the rpath option should be used, setting cache variable > +dnl cf_cv_enable_rpath if so. > +AC_DEFUN([CF_ENABLE_RPATH], > +[ > +AC_MSG_CHECKING(if rpath option should be used) > +AC_ARG_ENABLE(rpath, > +[ --enable-rpath use rpath option when generating shared libraries], > +[cf_cv_enable_rpath=$enableval], > +[cf_cv_enable_rpath=no]) > +AC_MSG_RESULT($cf_cv_enable_rpath) > +])dnl > +dnl --------------------------------------------------------------------------- > dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54 > dnl --------------- > dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We > @@ -1888,6 +1928,15 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 > fi > ])dnl > dnl --------------------------------------------------------------------------- > +dnl CF_FORGET_TOOL version: 1 updated: 2013/04/06 18:03:09 > +dnl -------------- > +dnl Forget that we saw the given tool. > +AC_DEFUN([CF_FORGET_TOOL],[ > +unset ac_cv_prog_ac_ct_$1 > +unset ac_ct_$1 > +unset $1 > +])dnl > +dnl --------------------------------------------------------------------------- > dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51 > dnl ------------ > dnl Test for the presence of , 'union wait', arg-type of 'wait()' > @@ -2256,7 +2305,7 @@ test -d "$oldincludedir" && { > $1="[$]$1 $cf_header_path_list" > ])dnl > dnl --------------------------------------------------------------------------- > -dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42 > +dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05 > dnl ----------------- > dnl Check if the given compiler is really the Intel compiler for Linux. It > dnl tries to imitate gcc, but does not return an error when it finds a mismatch > @@ -2270,6 +2319,7 @@ dnl $1 = GCC (default) or GXX > dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS > dnl $3 = CFLAGS (default) or CXXFLAGS > AC_DEFUN([CF_INTEL_COMPILER],[ > +AC_REQUIRE([AC_CANONICAL_HOST]) > ifelse([$2],,INTEL_COMPILER,[$2])=no > > if test "$ifelse([$1],,[$1],GCC)" = yes ; then > @@ -2415,6 +2465,18 @@ CF_SUBDIR_PATH($1,$2,lib) > $1="$cf_library_path_list [$]$1" > ])dnl > dnl --------------------------------------------------------------------------- > +dnl CF_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 > +dnl ------------------ > +AC_DEFUN([CF_LIBTOOL_VERSION],[ > +if test -n "$LIBTOOL" && test "$LIBTOOL" != none > +then > + cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'` > +else > + cf_cv_libtool_version= > +fi > +test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version > +])dnl > +dnl --------------------------------------------------------------------------- > dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 > dnl ------------- > dnl Compute the library-prefix for the given host system > @@ -2432,6 +2494,69 @@ ifelse($1,,,[$1=$LIB_PREFIX]) > AC_SUBST(LIB_PREFIX) > ])dnl > dnl --------------------------------------------------------------------------- > +dnl CF_LIB_SUFFIX version: 22 updated: 2013/09/07 13:54:05 > +dnl ------------- > +dnl Compute the library file-suffix from the given model name > +dnl $1 = model name > +dnl $2 = variable to set (the nominal library suffix) > +dnl $3 = dependency variable to set (actual filename) > +dnl The variable $LIB_SUFFIX, if set, prepends the variable to set. > +AC_DEFUN([CF_LIB_SUFFIX], > +[ > + case X$1 in #(vi > + Xlibtool) #(vi > + $2='.la' > + $3=[$]$2 > + ;; > + Xdebug) #(vi > + $2='_g.a' > + $3=[$]$2 > + ;; > + Xprofile) #(vi > + $2='_p.a' > + $3=[$]$2 > + ;; > + Xshared) #(vi > + case $cf_cv_system_name in > + aix[[5-7]]*) #(vi > + $2='.a' > + $3=[$]$2 > + ;; > + cygwin*|msys*|mingw*) #(vi > + $2='.dll' > + $3='.dll.a' > + ;; > + darwin*) #(vi > + $2='.dylib' > + $3=[$]$2 > + ;; > + hpux*) #(vi > + case $target in > + ia64*) #(vi > + $2='.so' > + $3=[$]$2 > + ;; > + *) #(vi > + $2='.sl' > + $3=[$]$2 > + ;; > + esac > + ;; > + *) #(vi > + $2='.so' > + $3=[$]$2 > + ;; > + esac > + ;; > + *) > + $2='.a' > + $3=[$]$2 > + ;; > + esac > + test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}" > + test -n "$LIB_SUFFIX" && $3="${LIB_SUFFIX}[$]{$3}" > +])dnl > +dnl --------------------------------------------------------------------------- > dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46 > dnl ------------ > dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make' > @@ -2569,7 +2694,7 @@ if test "$cf_cv_mbstate_t" != unknown ; > fi > ])dnl > dnl --------------------------------------------------------------------------- > -dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03 > +dnl CF_MIXEDCASE_FILENAMES version: 5 updated: 2013/09/07 13:54:05 > dnl ---------------------- > dnl Check if the file-system supports mixed-case filenames. If we're able to > dnl create a lowercase name and see it as uppercase, it doesn't support that. > @@ -2578,7 +2703,7 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES], > AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[ > if test "$cross_compiling" = yes ; then > case $target_alias in #(vi > - *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi > + *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw32*|*-uwin*) #(vi > cf_cv_mixedcase=no > ;; > *) > @@ -2959,6 +3084,25 @@ case .$with_cflags in #(vi > esac > ])dnl > dnl --------------------------------------------------------------------------- > +dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49 > +dnl ---------------- > +dnl Check if the given variable is a number. If not, report an error. > +dnl $1 is the variable > +dnl $2 is the message > +AC_DEFUN([CF_NUMBER_SYNTAX],[ > +if test -n "$1" ; then > + case $1 in #(vi > + [[0-9]]*) #(vi > + ;; > + *) > + AC_MSG_ERROR($2 is not a number: $1) > + ;; > + esac > +else > + AC_MSG_ERROR($2 value is empty) > +fi > +])dnl > +dnl --------------------------------------------------------------------------- > dnl CF_OUR_MESSAGES version: 7 updated: 2004/09/12 19:45:55 > dnl --------------- > dnl Check if we use the messages included with this program > @@ -3049,6 +3193,40 @@ case ".[$]$1" in #(vi > esac > ])dnl > dnl --------------------------------------------------------------------------- > +dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22 > +dnl ------------- > +dnl Check for the package-config program, unless disabled by command-line. > +AC_DEFUN([CF_PKG_CONFIG], > +[ > +AC_MSG_CHECKING(if you want to use pkg-config) > +AC_ARG_WITH(pkg-config, > + [ --with-pkg-config{=path} enable/disable use of pkg-config], > + [cf_pkg_config=$withval], > + [cf_pkg_config=yes]) > +AC_MSG_RESULT($cf_pkg_config) > + > +case $cf_pkg_config in #(vi > +no) #(vi > + PKG_CONFIG=none > + ;; > +yes) #(vi > + CF_ACVERSION_CHECK(2.52, > + [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)], > + [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)]) > + ;; > +*) > + PKG_CONFIG=$withval > + ;; > +esac > + > +test -z "$PKG_CONFIG" && PKG_CONFIG=none > +if test "$PKG_CONFIG" != none ; then > + CF_PATH_SYNTAX(PKG_CONFIG) > +fi > + > +AC_SUBST(PKG_CONFIG) > +])dnl > +dnl --------------------------------------------------------------------------- > dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42 > dnl ----------------- > dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. > @@ -3168,6 +3346,28 @@ AC_CHECK_PROGS(LINT, tdlint lint alint s > AC_SUBST(LINT_OPTS) > ])dnl > dnl --------------------------------------------------------------------------- > +dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37 > +dnl ------------ > +dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f" > +dnl option if it is supported. > +AC_DEFUN([CF_PROG_LN_S],[ > +AC_PROG_LN_S > +AC_MSG_CHECKING(if $LN_S -f options work) > + > +rm -f conf$$.src conf$$dst > +echo >conf$$.dst > +echo first >conf$$.src > +if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then > + cf_prog_ln_sf=yes > +else > + cf_prog_ln_sf=no > +fi > +rm -f conf$$.dst conf$$src > +AC_MSG_RESULT($cf_prog_ln_sf) > + > +test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" > +])dnl > +dnl --------------------------------------------------------------------------- > dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 > dnl ---------------- > dnl Remove all -U and -D options that refer to the given symbol from a list > @@ -3185,7 +3385,7 @@ $1=`echo "$2" | \ > -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'` > ])dnl > dnl --------------------------------------------------------------------------- > -dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33 > +dnl CF_RPATH_HACK version: 11 updated: 2013/09/01 13:02:00 > dnl ------------- > AC_DEFUN([CF_RPATH_HACK], > [ > @@ -3202,8 +3402,8 @@ if test -n "$LD_RPATH_OPT" ; then > > AC_TRY_LINK([#include ], > [printf("Hello");], > - [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u` > - cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`]) > + [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq` > + cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort | uniq`]) > > # If we passed the link-test, but get a "not found" on a given library, > # this could be due to inept reconfiguration of gcc to make it only > @@ -3236,6 +3436,8 @@ AC_TRY_LINK([#include ], > CF_RPATH_HACK_2(LIBS) > > CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS) > +else > + AC_MSG_RESULT(no) > fi > AC_SUBST(EXTRA_LDFLAGS) > ])dnl > @@ -3300,6 +3502,440 @@ CF_VERBOSE(...checked $1 [$]$1) > AC_SUBST(EXTRA_LDFLAGS) > ])dnl > dnl --------------------------------------------------------------------------- > +dnl CF_SHARED_OPTS version: 83 updated: 2013/09/21 17:34:53 > +dnl -------------- > +dnl -------------- > +dnl Attempt to determine the appropriate CC/LD options for creating a shared > +dnl library. > +dnl > +dnl Notes: > +dnl a) ${LOCAL_LDFLAGS} is used to link executables that will run within > +dnl the build-tree, i.e., by making use of the libraries that are compiled in > +dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path for the > +dnl shared library since that can lead to unexpected results at runtime. > +dnl b) ${LOCAL_LDFLAGS2} has the same intention but assumes that the shared > +dnl libraries are compiled in ../../lib > +dnl > +dnl The variable 'cf_cv_do_symlinks' is used to control whether we configure > +dnl to install symbolic links to the rel/abi versions of shared libraries. > +dnl > +dnl The variable 'cf_cv_shlib_version' controls whether we use the rel or abi > +dnl version when making symbolic links. > +dnl > +dnl The variable 'cf_cv_shlib_version_infix' controls whether shared library > +dnl version numbers are infix (ex: libncurses..dylib) or postfix > +dnl (ex: libncurses.so.). > +dnl > +dnl Some loaders leave 'so_locations' lying around. It's nice to clean up. > +AC_DEFUN([CF_SHARED_OPTS], > +[ > + AC_REQUIRE([CF_LD_RPATH_OPT]) > + RM_SHARED_OPTS= > + LOCAL_LDFLAGS= > + LOCAL_LDFLAGS2= > + LD_SHARED_OPTS= > + INSTALL_LIB="-m 644" > + : ${rel_builddir:=.} > + > + cf_cv_do_symlinks=no > + cf_ld_rpath_opt= > + test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" > + > + AC_MSG_CHECKING(if release/abi version should be used for shared libs) > + AC_ARG_WITH(shlib-version, > + [ --with-shlib-version=X Specify rel or abi version for shared libs], > + [test -z "$withval" && withval=auto > + case $withval in #(vi > + yes) #(vi > + cf_cv_shlib_version=auto > + ;; > + rel|abi|auto|no) #(vi > + cf_cv_shlib_version=$withval > + ;; > + *) > + AC_MSG_ERROR([option value must be one of: rel, abi, auto or no]) > + ;; > + esac > + ],[cf_cv_shlib_version=auto]) > + AC_MSG_RESULT($cf_cv_shlib_version) > + > + cf_cv_rm_so_locs=no > + cf_try_cflags= > + > + # Some less-capable ports of gcc support only -fpic > + CC_SHARED_OPTS= > + if test "$GCC" = yes > + then > + AC_MSG_CHECKING(which $CC option to use) > + cf_save_CFLAGS="$CFLAGS" > + for CC_SHARED_OPTS in -fPIC -fpic '' > + do > + CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" > + AC_TRY_COMPILE([#include ],[int x = 1],[break],[]) > + done > + AC_MSG_RESULT($CC_SHARED_OPTS) > + CFLAGS="$cf_save_CFLAGS" > + fi > + > + cf_cv_shlib_version_infix=no > + > + case $cf_cv_system_name in #(vi > + aix4.[3-9]*|aix[[5-7]]*) #(vi > + if test "$GCC" = yes; then > + CC_SHARED_OPTS= > + MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@' > + else > + # CC_SHARED_OPTS='-qpic=large -G' > + # perhaps "-bM:SRE -bnoentry -bexpall" > + MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@' > + fi > + ;; > + beos*) #(vi > + MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0' > + ;; > + cygwin*) #(vi > + CC_SHARED_OPTS= > + MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' > + RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" > + cf_cv_shlib_version=cygdll > + cf_cv_shlib_version_infix=cygdll > + cat >mk_shared_lib.sh <<-CF_EOF > + #!/bin/sh > + SHARED_LIB=\[$]1 > + IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` > + shift > + cat <<-EOF > + Linking shared library > + ** SHARED_LIB \[$]SHARED_LIB > + ** IMPORT_LIB \[$]IMPORT_LIB > +EOF > + exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} > +CF_EOF > + chmod +x mk_shared_lib.sh > + ;; > + msys*) #(vi > + CC_SHARED_OPTS= > + MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' > + RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" > + cf_cv_shlib_version=msysdll > + cf_cv_shlib_version_infix=msysdll > + cat >mk_shared_lib.sh <<-CF_EOF > + #!/bin/sh > + SHARED_LIB=\[$]1 > + IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` > + shift > + cat <<-EOF > + Linking shared library > + ** SHARED_LIB \[$]SHARED_LIB > + ** IMPORT_LIB \[$]IMPORT_LIB > +EOF > + exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} > +CF_EOF > + chmod +x mk_shared_lib.sh > + ;; > + darwin*) #(vi > + cf_try_cflags="no-cpp-precomp" > + CC_SHARED_OPTS="-dynamic" > + MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]' > + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi > + cf_cv_shlib_version_infix=yes > + AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [ > + cf_save_LDFLAGS=$LDFLAGS > + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" > + AC_TRY_LINK(, [int i;], cf_cv_ldflags_search_paths_first=yes, cf_cv_ldflags_search_paths_first=no) > + LDFLAGS=$cf_save_LDFLAGS]) > + if test $cf_cv_ldflags_search_paths_first = yes; then > + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" > + fi > + ;; > + hpux[[7-8]]*) #(vi > + # HP-UX 8.07 ld lacks "+b" option used for libdir search-list > + if test "$GCC" != yes; then > + CC_SHARED_OPTS='+Z' > + fi > + MK_SHARED_LIB='${LD} -b -o $[@]' > + INSTALL_LIB="-m 555" > + ;; > + hpux*) #(vi > + # (tested with gcc 2.7.2 -- I don't have c89) > + if test "$GCC" = yes; then > + LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}' > + else > + CC_SHARED_OPTS='+Z' > + LD_SHARED_OPTS='-Wl,+b,${libdir}' > + fi > + MK_SHARED_LIB='${LD} +b ${libdir} -b -o $[@]' > + # HP-UX shared libraries must be executable, and should be > + # readonly to exploit a quirk in the memory manager. > + INSTALL_LIB="-m 555" > + ;; > + interix*) > + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel > + if test "$cf_cv_shlib_version" = rel; then > + cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}' > + else > + cf_shared_soname='`basename $@`' > + fi > + CC_SHARED_OPTS= > + MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@' > + ;; > + irix*) #(vi > + if test "$cf_cv_enable_rpath" = yes ; then > + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" > + fi > + # tested with IRIX 5.2 and 'cc'. > + if test "$GCC" != yes; then > + CC_SHARED_OPTS='-KPIC' > + MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]' > + else > + MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]' > + fi > + cf_cv_rm_so_locs=yes > + ;; > + linux*|gnu*|k*bsd*-gnu) #(vi > + if test "$DFT_LWR_MODEL" = "shared" ; then > + LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" > + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" > + fi > + if test "$cf_cv_enable_rpath" = yes ; then > + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" > + fi > + CF_SHARED_SONAME > + MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' > + ;; > + mingw*) #(vi > + cf_cv_shlib_version=mingw > + cf_cv_shlib_version_infix=mingw > + if test "$DFT_LWR_MODEL" = "shared" ; then > + LOCAL_LDFLAGS="-Wl,--enable-auto-import" > + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" > + EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS" > + fi > + CC_SHARED_OPTS= > + MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' > + RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" > + cat >mk_shared_lib.sh <<-CF_EOF > + #!/bin/sh > + SHARED_LIB=\[$]1 > + IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` > + shift > + cat <<-EOF > + Linking shared library > + ** SHARED_LIB \[$]SHARED_LIB > + ** IMPORT_LIB \[$]IMPORT_LIB > +EOF > + exec \[$]* -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} > +CF_EOF > + chmod +x mk_shared_lib.sh > + ;; > + openbsd[[2-9]].*|mirbsd*) #(vi > + if test "$DFT_LWR_MODEL" = "shared" ; then > + LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" > + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" > + fi > + if test "$cf_cv_enable_rpath" = yes ; then > + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" > + fi > + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" > + CF_SHARED_SONAME > + MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' > + ;; > + nto-qnx*|openbsd*|freebsd[[12]].*) #(vi > + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" > + MK_SHARED_LIB='${LD} -Bshareable -o $[@]' > + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel > + ;; > + dragonfly*|freebsd*) #(vi > + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" > + if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then > + LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" > + LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS" > + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" > + fi > + CF_SHARED_SONAME > + MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]' > + ;; > + netbsd*) #(vi > + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" > + if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then > + LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" > + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" > + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" > + if test "$cf_cv_shlib_version" = auto; then > + if test -f /usr/libexec/ld.elf_so; then > + cf_cv_shlib_version=abi > + else > + cf_cv_shlib_version=rel > + fi > + fi > + CF_SHARED_SONAME > + MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]' > + else > + MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $[@]' > + fi > + ;; > + osf*|mls+*) #(vi > + # tested with OSF/1 V3.2 and 'cc' > + # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't > + # link with shared libs). > + MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $[@]`' > + case $host_os in #(vi > + osf4*) > + MK_SHARED_LIB="${MK_SHARED_LIB} -msym" > + ;; > + esac > + MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]' > + if test "$DFT_LWR_MODEL" = "shared" ; then > + LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" > + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" > + fi > + cf_cv_rm_so_locs=yes > + ;; > + sco3.2v5*) # (also uw2* and UW7: hops 13-Apr-98 > + # tested with osr5.0.5 > + if test "$GCC" != yes; then > + CC_SHARED_OPTS='-belf -KPIC' > + fi > + MK_SHARED_LIB='${LD} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@' > + if test "$cf_cv_enable_rpath" = yes ; then > + # only way is to set LD_RUN_PATH but no switch for it > + RUN_PATH=$libdir > + fi > + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel > + LINK_PROGS='LD_RUN_PATH=${libdir}' > + LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib' > + ;; > + sunos4*) #(vi > + # tested with SunOS 4.1.1 and gcc 2.7.0 > + if test "$GCC" != yes; then > + CC_SHARED_OPTS='-KPIC' > + fi > + MK_SHARED_LIB='${LD} -assert pure-text -o $[@]' > + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel > + ;; > + solaris2*) #(vi > + # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 > + # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 > + if test "$DFT_LWR_MODEL" = "shared" ; then > + LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}" > + LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" > + fi > + if test "$cf_cv_enable_rpath" = yes ; then > + EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS" > + fi > + CF_SHARED_SONAME > + if test "$GCC" != yes; then > + cf_save_CFLAGS="$CFLAGS" > + for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O > + do > + CFLAGS="$cf_shared_opts $cf_save_CFLAGS" > + AC_TRY_COMPILE([#include ],[printf("Hello\n");],[break]) > + done > + CFLAGS="$cf_save_CFLAGS" > + CC_SHARED_OPTS=$cf_shared_opts > + MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]' > + else > + MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]' > + fi > + ;; > + sysv5uw7*|unix_sv*) #(vi > + # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc) > + if test "$GCC" != yes; then > + CC_SHARED_OPTS='-KPIC' > + fi > + MK_SHARED_LIB='${LD} -d y -G -o [$]@' > + ;; > + *) > + CC_SHARED_OPTS='unknown' > + MK_SHARED_LIB='echo unknown' > + ;; > + esac > + > + # This works if the last tokens in $MK_SHARED_LIB are the -o target. > + case "$cf_cv_shlib_version" in #(vi > + rel|abi) > + case "$MK_SHARED_LIB" in #(vi > + *'-o $[@]') #(vi > + test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes > + ;; > + *) > + AC_MSG_WARN(ignored --with-shlib-version) > + ;; > + esac > + ;; > + esac > + > + if test -n "$cf_try_cflags" > + then > +cat > conftest.$ac_ext < +#line __oline__ "${as_me:-configure}" > +#include > +int main(int argc, char *argv[[]]) > +{ > + printf("hello\n"); > + return (argv[[argc-1]] == 0) ; > +} > +EOF > + cf_save_CFLAGS="$CFLAGS" > + for cf_opt in $cf_try_cflags > + do > + CFLAGS="$cf_save_CFLAGS -$cf_opt" > + AC_MSG_CHECKING(if CFLAGS option -$cf_opt works) > + if AC_TRY_EVAL(ac_compile); then > + AC_MSG_RESULT(yes) > + cf_save_CFLAGS="$CFLAGS" > + else > + AC_MSG_RESULT(no) > + fi > + done > + CFLAGS="$cf_save_CFLAGS" > + fi > + > + > + # RPATH_LIST is a colon-separated list of directories > + test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}" > + test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}" > + > + test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations" > + > + CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS) > + CF_VERBOSE(MK_SHARED_LIB: $MK_SHARED_LIB) > + > + AC_SUBST(CC_SHARED_OPTS) > + AC_SUBST(LD_RPATH_OPT) > + AC_SUBST(LD_SHARED_OPTS) > + AC_SUBST(MK_SHARED_LIB) > + AC_SUBST(RM_SHARED_OPTS) > + > + AC_SUBST(LINK_PROGS) > + AC_SUBST(LINK_TESTS) > + > + AC_SUBST(EXTRA_LDFLAGS) > + AC_SUBST(LOCAL_LDFLAGS) > + AC_SUBST(LOCAL_LDFLAGS2) > + > + AC_SUBST(INSTALL_LIB) > + AC_SUBST(RPATH_LIST) > +])dnl > +dnl --------------------------------------------------------------------------- > +dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43 > +dnl ---------------- > +dnl utility macro for CF_SHARED_OPTS, constructs "$cf_cv_shared_soname" for > +dnl substitution into MK_SHARED_LIB string for the "-soname" (or similar) > +dnl option. > +dnl > +dnl $1 is the default that should be used for "$cf_cv_shlib_version". > +dnl If missing, use "rel". > +define([CF_SHARED_SONAME], > +[ > + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=ifelse($1,,rel,$1) > + if test "$cf_cv_shlib_version" = rel; then > + cf_cv_shared_soname='`basename $[@] .${REL_VERSION}`.${ABI_VERSION}' > + else > + cf_cv_shared_soname='`basename $[@]`' > + fi > +]) > +dnl --------------------------------------------------------------------------- > dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50 > dnl -------------- > dnl Construct a search-list for a nonstandard header/lib-file > @@ -3492,7 +4128,7 @@ AC_DEFUN([CF_VERBOSE], > CF_MSG_LOG([$1]) > ])dnl > dnl --------------------------------------------------------------------------- > -dnl CF_VERSION_INFO version: 5 updated: 2012/10/06 08:57:51 > +dnl CF_VERSION_INFO version: 6 updated: 2013/06/16 10:25:53 > dnl --------------- > dnl Define several useful symbols derived from the VERSION file. A separate > dnl file is preferred to embedding the version numbers in various scripts. > @@ -3557,7 +4193,7 @@ else > fi > > # show the actual data that we have for versions: > -CF_VERBOSE(VERSION $VERSION) > +CF_VERBOSE(ABI VERSION $VERSION) > CF_VERBOSE(VERSION_MAJOR $VERSION_MAJOR) > CF_VERBOSE(VERSION_MINOR $VERSION_MINOR) > CF_VERBOSE(VERSION_PATCH $VERSION_PATCH) > @@ -3611,6 +4247,26 @@ fi > fi > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 14:55:59 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id E32D0F3B; Fri, 27 Sep 2013 14:55:59 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF5992731; Fri, 27 Sep 2013 14:55: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 r8REtxet046387; Fri, 27 Sep 2013 14:55:59 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8REtxvk046386; Fri, 27 Sep 2013 14:55:59 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309271455.r8REtxvk046386@svn.freebsd.org> From: Peter Grehan Date: Fri, 27 Sep 2013 14:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255911 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 14:56:00 -0000 Author: grehan Date: Fri Sep 27 14:55:59 2013 New Revision: 255911 URL: http://svnweb.freebsd.org/changeset/base/255911 Log: Return 0 for a rdmsr of MSR_IA32_PLATFORM_ID. This is enough to get Ubuntu 12.0.4/13.0.4 to boot. Approved by: re@ (blanket) Modified: head/sys/amd64/vmm/vmm_msr.c Modified: head/sys/amd64/vmm/vmm_msr.c ============================================================================== --- head/sys/amd64/vmm/vmm_msr.c Fri Sep 27 13:12:47 2013 (r255910) +++ head/sys/amd64/vmm/vmm_msr.c Fri Sep 27 14:55:59 2013 (r255911) @@ -57,6 +57,7 @@ static struct vmm_msr vmm_msr[] = { { MSR_PAT, VMM_MSR_F_EMULATE | VMM_MSR_F_INVALID }, { MSR_BIOS_SIGN,VMM_MSR_F_EMULATE }, { MSR_MCG_CAP, VMM_MSR_F_EMULATE | VMM_MSR_F_READONLY }, + { MSR_IA32_PLATFORM_ID, VMM_MSR_F_EMULATE | VMM_MSR_F_READONLY }, { MSR_IA32_MISC_ENABLE, VMM_MSR_F_EMULATE | VMM_MSR_F_READONLY }, }; @@ -129,7 +130,10 @@ guest_msrs_init(struct vm *vm, int cpu) misc |= (1 << 12) | (1 << 11); misc &= ~((1 << 18) | (1 << 16)); guest_msrs[i] = misc; - break; + break; + case MSR_IA32_PLATFORM_ID: + guest_msrs[i] = 0; + break; default: panic("guest_msrs_init: missing initialization for msr " "0x%0x", vmm_msr[i].num); From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 15:17:29 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 0330D65E; Fri, 27 Sep 2013 15:17:29 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E54D82864; Fri, 27 Sep 2013 15:17: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 r8RFHSM6063892; Fri, 27 Sep 2013 15:17:28 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8RFHSrt063891; Fri, 27 Sep 2013 15:17:28 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309271517.r8RFHSrt063891@svn.freebsd.org> From: "Justin T. Gibbs" Date: Fri, 27 Sep 2013 15:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255913 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 15:17:29 -0000 Author: gibbs Date: Fri Sep 27 15:17:28 2013 New Revision: 255913 URL: http://svnweb.freebsd.org/changeset/base/255913 Log: sys/x86/xen/hvm.c: Set cpu_ops correctly for Xen hypervisors lacking the vector callback feature. Set preliminary Xen cpu_ops settings during early HVM initialization. The old location raced with the startup of APs. Submitted by: Roger Pau Monné Reviewed by: gibbs Approved by: re (blanket Xen) Modified: head/sys/x86/xen/hvm.c Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Fri Sep 27 15:10:36 2013 (r255912) +++ head/sys/x86/xen/hvm.c Fri Sep 27 15:17:28 2013 (r255913) @@ -117,7 +117,7 @@ struct xen_ipi_handler enum xen_domain_type xen_domain_type = XEN_NATIVE; struct cpu_ops xen_hvm_cpu_ops = { - .ipi_vectored = xen_ipi_vectored, + .ipi_vectored = lapic_ipi_vectored, .cpu_init = xen_hvm_cpu_init, .cpu_resume = xen_hvm_cpu_resume }; @@ -535,7 +535,7 @@ xen_setup_cpus(void) xen_cpu_ipi_init(i); /* Set the xen pv ipi ops to replace the native ones */ - cpu_ops = xen_hvm_cpu_ops; + cpu_ops.ipi_vectored = xen_ipi_vectored; } #endif @@ -699,6 +699,7 @@ xen_hvm_init(enum xen_hvm_init_type init return; setup_xen_features(); + cpu_ops = xen_hvm_cpu_ops; break; case XEN_HVM_INIT_RESUME: if (error != 0) From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 15:22:08 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id CA9FB9B4; Fri, 27 Sep 2013 15:22:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B900728BD; Fri, 27 Sep 2013 15:22: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 r8RFM8AG069603; Fri, 27 Sep 2013 15:22:08 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8RFM8NE069602; Fri, 27 Sep 2013 15:22:08 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309271522.r8RFM8NE069602@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 27 Sep 2013 15:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255914 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 15:22:08 -0000 Author: des Date: Fri Sep 27 15:22:08 2013 New Revision: 255914 URL: http://svnweb.freebsd.org/changeset/base/255914 Log: Remove duplicate entry for the host(1) man page. Approved by: re (blanket) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Sep 27 15:17:28 2013 (r255913) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Sep 27 15:22:08 2013 (r255914) @@ -296,7 +296,6 @@ OLD_FILES+=usr/share/doc/bind9/FAQ OLD_FILES+=usr/share/doc/bind9/HISTORY OLD_FILES+=usr/share/doc/bind9/README OLD_FILES+=usr/share/man/man1/dig.1.gz -OLD_FILES+=usr/share/man/man1/host.1.gz OLD_FILES+=usr/share/man/man1/nslookup.1.gz OLD_FILES+=usr/share/man/man3/lwres.3.gz OLD_FILES+=usr/share/man/man3/lwres_buffer.3.gz From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 16:02:41 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 79499329; Fri, 27 Sep 2013 16:02:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4CD292AF9; Fri, 27 Sep 2013 16:02: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 r8RG2fPu093061; Fri, 27 Sep 2013 16:02:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8RG2eY8093059; Fri, 27 Sep 2013 16:02:40 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309271602.r8RG2eY8093059@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 27 Sep 2013 16:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255915 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 16:02:41 -0000 Author: nwhitehorn Date: Fri Sep 27 16:02:40 2013 New Revision: 255915 URL: http://svnweb.freebsd.org/changeset/base/255915 Log: Make sure the CCB xflags field is initialized to zero so that CAM_EXTLUN_VALID is not erroneously set. Also add an XPORT_SRP identifier to the known SCSI transports for the SCSI RDMA protocol, as used, for example with Infiniband storage. Reviewed by: scottl Approved by: re (marius) Modified: head/sys/cam/cam_ccb.h head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Fri Sep 27 15:22:08 2013 (r255914) +++ head/sys/cam/cam_ccb.h Fri Sep 27 16:02:40 2013 (r255915) @@ -262,6 +262,7 @@ typedef enum { XPORT_SAS, /* Serial Attached SCSI */ XPORT_SATA, /* Serial AT Attachment */ XPORT_ISCSI, /* iSCSI */ + XPORT_SRP, /* SCSI RDMA Protocol */ } cam_xport; #define XPORT_IS_ATA(t) ((t) == XPORT_ATA || (t) == XPORT_SATA) @@ -1233,6 +1234,7 @@ cam_fill_csio(struct ccb_scsiio *csio, u { csio->ccb_h.func_code = XPT_SCSI_IO; csio->ccb_h.flags = flags; + csio->ccb_h.xflags = 0; csio->ccb_h.retry_count = retries; csio->ccb_h.cbfcnp = cbfcnp; csio->ccb_h.timeout = timeout; @@ -1252,6 +1254,7 @@ cam_fill_ctio(struct ccb_scsiio *csio, u { csio->ccb_h.func_code = XPT_CONT_TARGET_IO; csio->ccb_h.flags = flags; + csio->ccb_h.xflags = 0; csio->ccb_h.retry_count = retries; csio->ccb_h.cbfcnp = cbfcnp; csio->ccb_h.timeout = timeout; Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Fri Sep 27 15:22:08 2013 (r255914) +++ head/sys/cam/cam_xpt.c Fri Sep 27 16:02:40 2013 (r255915) @@ -3337,6 +3337,7 @@ xpt_setup_ccb(struct ccb_hdr *ccb_h, str } ccb_h->pinfo.index = CAM_UNQUEUED_INDEX; ccb_h->flags = 0; + ccb_h->xflags = 0; } /* Path manipulation functions */ @@ -3891,6 +3892,7 @@ xpt_bus_register(struct cam_sim *sim, de case XPORT_FC: case XPORT_USB: case XPORT_ISCSI: + case XPORT_SRP: case XPORT_PPB: new_bus->xport = scsi_get_xport(); break; From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 16:38:32 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id B6228D86; Fri, 27 Sep 2013 16:38:32 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4EAD62CC9; Fri, 27 Sep 2013 16:38:31 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.16]) by ltcfislmsgpa04.fnfis.com (8.14.5/8.14.5) with ESMTP id r8RGcSp2016713 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 27 Sep 2013 11:38:30 -0500 Received: from LTCFISWMSGMB21.FNFIS.com ([169.254.1.202]) by LTCFISWMSGHT05.FNFIS.com ([10.132.206.16]) with mapi id 14.02.0309.002; Fri, 27 Sep 2013 11:37:53 -0500 From: "Teske, Devin" To: Gavin Atkinson Subject: Re: svn commit: r255852 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/package/freebsd contrib/dialog/po contrib/dialog/samples gnu/lib/libdialog Thread-Topic: svn commit: r255852 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/package/freebsd contrib/dialog/po contrib/dialog/samples gnu/lib/libdialog Thread-Index: AQHOu5/pt5/o8wrEsEiaPFE16oSPiQ== Date: Fri, 27 Sep 2013 16:37:52 +0000 Message-ID: <13CA24D6AB415D428143D44749F57D720FC0055E@LTCFISWMSGMB21.FNFIS.com> References: <201309241452.r8OEqhlx043365@svn.freebsd.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.132.253.121] Content-Type: text/plain; charset="us-ascii" Content-ID: <6E36B43D461C5A4589777ADA147238D8@fisglobal.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794, 1.0.431, 0.0.0000 definitions=2013-09-27_06:2013-09-27,2013-09-27,1970-01-01 signatures=0 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Devin Teske , "src-committers@freebsd.org" , "Teske, Devin" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Devin Teske List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 16:38:32 -0000 On Sep 27, 2013, at 7:48 AM, Gavin Atkinson wrote: > On Tue, 24 Sep 2013, Devin Teske wrote: >=20 >> Author: dteske >> Date: Tue Sep 24 14:52:43 2013 >> New Revision: 255852 >> URL: http://svnweb.freebsd.org/changeset/base/255852 >>=20 >> Log: >> Update dialog to 1.2-20130923. >=20 > Hi, >=20 > It sounds like this is an official release, and therefore it looks like=20 > this should have been imported onto the vendor branch (vendor/dialog/)=20 > first, and copied over? >=20 > If that's the case, can this be reverted please, and imported via the=20 > vendor branch? >=20 Can fix without a backout. I'll just import to vendor and do a merge with --record-only. --=20 Devin >> Added: >> head/contrib/dialog/package/freebsd/ >> head/contrib/dialog/package/freebsd/Makefile (contents, props changed) >> head/contrib/dialog/package/freebsd/distinfo >> head/contrib/dialog/package/freebsd/pkg-descr >> head/contrib/dialog/package/freebsd/pkg-plist >> head/contrib/dialog/po/fa.po >> Modified: >> head/contrib/dialog/CHANGES >> head/contrib/dialog/VERSION >> head/contrib/dialog/aclocal.m4 >> head/contrib/dialog/arrows.c >> head/contrib/dialog/buildlist.c >> head/contrib/dialog/checklist.c >> head/contrib/dialog/config.guess >> head/contrib/dialog/config.sub >> head/contrib/dialog/configure >> head/contrib/dialog/configure.in >> head/contrib/dialog/dialog.1 >> head/contrib/dialog/dialog.3 >> head/contrib/dialog/dialog.c >> head/contrib/dialog/dialog.h >> head/contrib/dialog/formbox.c >> head/contrib/dialog/guage.c >> head/contrib/dialog/inputstr.c >> head/contrib/dialog/makefile.in >> head/contrib/dialog/menubox.c >> head/contrib/dialog/mixedform.c >> head/contrib/dialog/package/debian/changelog >> head/contrib/dialog/package/debian/copyright >> head/contrib/dialog/package/dialog.spec >> head/contrib/dialog/po/lt.po >> head/contrib/dialog/samples/inputbox6-utf8 >> head/contrib/dialog/samples/report-tempfile >> head/contrib/dialog/treeview.c >> head/contrib/dialog/util.c >> head/gnu/lib/libdialog/dlg_config.h >>=20 >> Modified: head/contrib/dialog/CHANGES >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/contrib/dialog/CHANGES Tue Sep 24 14:46:10 2013 (r255851) >> +++ head/contrib/dialog/CHANGES Tue Sep 24 14:52:43 2013 (r255852) >> @@ -1,9 +1,38 @@ >> --- $Id: CHANGES,v 1.458 2013/05/24 00:23:22 tom Exp $ >> +-- $Id: CHANGES,v 1.476 2013/09/24 00:06:47 tom Exp $ >> -- Thomas E. Dickey >>=20 >> This version of dialog was originally from a Debian snapshot. I've done= this >> to it: >>=20 >> +2013/09/23 >> + + fix samples/inputbox6-utf8, which had depended unnecessarily on bash. >> + + improve memory caching for wide-character manipulation in gauge >> + widget (report by Devin Teske). >> + + add dlg_reallocate_gauge (discussion with Devin Teske). >> + + updated configure macros to use msys changes from ncurses. >> + + update config.guess, config.sub >> + >> +2013/09/02 >> + + modify makefile rule to make the ".png" filenames created by groff >> + predictable. >> + + add option --help-tags to allow scripts to get the item's tag field >> + consistently from help- and help-item button results rather than >> + getting the item's text for the latter (discussion with Florent >> + Rougon). >> + + correct manpage discussion of DIALOG_ITEM_HELP versus --item-help, >> + as well as --help-button return status (report by Florent Rougon). >> + + correct limit used for --hline option (report by Devin Teske, >> + cf: 2011/06/30). >> + + do not print empty "[]" if a --hline option was given with an empty >> + value (report by Devin Teske). >> + + miscellaneous configure script fixes/updates. In particular, add >> + option --with-shared which builds shared libraries without a libtool >> + dependency. >> + + add FreeBSD port-files for test-builds. >> + + update lt.po, add fa.po from >> + http://translationproject.org/latest/dialog/ >> + + update config.guess, config.sub >> + >> 2013/05/23 >> + modify ifdef in arrows.c to work around packages which use the >> wide-character ncursesw headers with the ncurses library (report >> @@ -298,7 +327,7 @@ to it: >> separate ncurses' header files. >> + CF_DISABLE_RPATH_HACK, fix garbled message >> + CF_LD_RPATH_OPT, add mirbsd >> - + CF_MAKEFLAGS, filter out GNU make's entering/leaving messages.=20 >> + + CF_MAKEFLAGS, filter out GNU make's entering/leaving messages. >> This only appeared when using the macro in a dpkg script, though it >> should have in other cases. >> + CF_RPATH_HACK, add a check for libraries not found, e.g., from >>=20 >> Modified: head/contrib/dialog/VERSION >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/contrib/dialog/VERSION Tue Sep 24 14:46:10 2013 (r255851) >> +++ head/contrib/dialog/VERSION Tue Sep 24 14:52:43 2013 (r255852) >> @@ -1 +1 @@ >> -11:1:0 1.2 20130523 >> +11:1:0 1.2 20130923 >>=20 >> Modified: head/contrib/dialog/aclocal.m4 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/contrib/dialog/aclocal.m4 Tue Sep 24 14:46:10 2013 (r255851) >> +++ head/contrib/dialog/aclocal.m4 Tue Sep 24 14:52:43 2013 (r255852) >> @@ -1,7 +1,7 @@ >> dnl macros used for DIALOG configure script >> -dnl $Id: aclocal.m4,v 1.90 2012/12/02 20:07:30 tom Exp $ >> +dnl $Id: aclocal.m4,v 1.94 2013/09/22 14:26:24 tom Exp $ >> dnl --------------------------------------------------------------------= ------- >> -dnl Copyright 1999-2011,2012 -- Thomas E. Dickey >> +dnl Copyright 1999-2012,2013 -- Thomas E. Dickey >> dnl >> dnl Permission is hereby granted, free of charge, to any person obtainin= g a >> dnl copy of this software and associated documentation files (the >> @@ -590,7 +590,7 @@ changequote([,])dnl >> AC_SUBST(GENCAT) >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> -dnl CF_ACVERSION_CHECK version: 3 updated: 2012/10/03 18:39:53 >> +dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56 >> dnl ------------------ >> dnl Conditionally generate script according to whether we're using a giv= en autoconf. >> dnl >> @@ -599,6 +599,7 @@ dnl $2 =3D code to use if AC_ACVERSION is=20 >> dnl $3 =3D code to use if AC_ACVERSION is older than $1. >> define([CF_ACVERSION_CHECK], >> [ >> +ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])d= nl >> ifdef([m4_version_compare], >> [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2]= )], >> [CF_ACVERSION_COMPARE( >> @@ -1125,6 +1126,27 @@ if test ".$system_name" !=3D ".$cf_cv_syst >> fi >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> +dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 >> +dnl ------------------------ >> +dnl Show the version of libtool >> +dnl >> +dnl Save the version in a cache variable - this is not entirely a good = thing, >> +dnl but the version string from libtool is very ugly, and for bug repor= ts it >> +dnl might be useful to have the original string. >> +AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[ >> +if test -n "$LIBTOOL" && test "$LIBTOOL" !=3D none >> +then >> + AC_MSG_CHECKING(version of $LIBTOOL) >> + CF_LIBTOOL_VERSION >> + AC_MSG_RESULT($cf_cv_libtool_version) >> + if test -z "$cf_cv_libtool_version" ; then >> + AC_MSG_ERROR(This is not GNU libtool) >> + fi >> +else >> + AC_MSG_ERROR(GNU libtool has not been found) >> +fi >> +])dnl >> +dnl -------------------------------------------------------------------= -------- >> dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39 >> dnl ----------------- >> dnl Check if the given compiler is really clang. clang's C driver defin= es >> @@ -1293,7 +1315,7 @@ fi >> AC_CHECK_HEADERS($cf_cv_ncurses_header) >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> -dnl CF_CURSES_LIBS version: 36 updated: 2012/07/07 21:02:48 >> +dnl CF_CURSES_LIBS version: 37 updated: 2013/02/09 17:33:50 >> dnl -------------- >> dnl Look for the curses libraries. Older curses implementations may req= uire >> dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. >> @@ -1330,7 +1352,7 @@ hpux10.*) #(vi >> ac_cv_func_initscr=3Dyes >> ])]) >> fi >> - ;; >> + ;; >> linux*) >> case `arch 2>/dev/null` in >> x86_64) >> @@ -1345,7 +1367,7 @@ linux*) >> CF_ADD_LIBDIR(/lib) >> ;; >> esac >> - ;; >> + ;; >> sunos3*|sunos4*) >> if test "x$cf_cv_screen" =3D "xcurses_5lib" >> then >> @@ -1359,59 +1381,63 @@ sunos3*|sunos4*) >> esac >>=20 >> if test ".$ac_cv_func_initscr" !=3D .yes ; then >> - cf_save_LIBS=3D"$LIBS" >> - cf_term_lib=3D"" >> - cf_curs_lib=3D"" >> + cf_save_LIBS=3D"$LIBS" >>=20 >> - if test ".${cf_cv_ncurses_version:-no}" !=3D .no >> - then >> - cf_check_list=3D"ncurses curses cursesX" >> - else >> - cf_check_list=3D"cursesX curses ncurses" >> - fi >> + if test ".${cf_cv_ncurses_version:-no}" !=3D .no >> + then >> + cf_check_list=3D"ncurses curses cursesX" >> + else >> + cf_check_list=3D"cursesX curses ncurses" >> + fi >>=20 >> - # Check for library containing tgoto. Do this before curses library >> - # because it may be needed to link the test-case for initscr. >> - AC_CHECK_FUNC(tgoto,[cf_term_lib=3Dpredefined],[ >> - for cf_term_lib in $cf_check_list otermcap termcap tinfo termli= b unknown >> - do >> - AC_CHECK_LIB($cf_term_lib,tgoto,[break]) >> - done >> - ]) >> + # Check for library containing tgoto. Do this before curses library >> + # because it may be needed to link the test-case for initscr. >> + if test "x$cf_term_lib" =3D x >> + then >> + AC_CHECK_FUNC(tgoto,[cf_term_lib=3Dpredefined],[ >> + for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unk= nown >> + do >> + AC_CHECK_LIB($cf_term_lib,tgoto,[break]) >> + done >> + ]) >> + fi >>=20 >> - # Check for library containing initscr >> - test "$cf_term_lib" !=3D predefined && test "$cf_term_lib" !=3D unk= nown && LIBS=3D"-l$cf_term_lib $cf_save_LIBS" >> - for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown >> - do >> - AC_CHECK_LIB($cf_curs_lib,initscr,[break]) >> - done >> - test $cf_curs_lib =3D unknown && AC_MSG_ERROR(no curses library fou= nd) >> + # Check for library containing initscr >> + test "$cf_term_lib" !=3D predefined && test "$cf_term_lib" !=3D unknow= n && LIBS=3D"-l$cf_term_lib $cf_save_LIBS" >> + if test "x$cf_curs_lib" =3D x >> + then >> + for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown >> + do >> + AC_CHECK_LIB($cf_curs_lib,initscr,[break]) >> + done >> + fi >> + test $cf_curs_lib =3D unknown && AC_MSG_ERROR(no curses library found) >>=20 >> - LIBS=3D"-l$cf_curs_lib $cf_save_LIBS" >> - if test "$cf_term_lib" =3D unknown ; then >> - AC_MSG_CHECKING(if we can link with $cf_curs_lib library) >> - AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], >> - [initscr()], >> - [cf_result=3Dyes], >> - [cf_result=3Dno]) >> - AC_MSG_RESULT($cf_result) >> - test $cf_result =3D no && AC_MSG_ERROR(Cannot link curses libra= ry) >> - elif test "$cf_curs_lib" =3D "$cf_term_lib" ; then >> - : >> - elif test "$cf_term_lib" !=3D predefined ; then >> - AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib l= ibraries) >> - AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], >> - [initscr(); tgoto((char *)0, 0, 0);], >> - [cf_result=3Dno], >> - [ >> - LIBS=3D"-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" >> - AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], >> - [initscr()], >> - [cf_result=3Dyes], >> - [cf_result=3Derror]) >> - ]) >> - AC_MSG_RESULT($cf_result) >> - fi >> + LIBS=3D"-l$cf_curs_lib $cf_save_LIBS" >> + if test "$cf_term_lib" =3D unknown ; then >> + AC_MSG_CHECKING(if we can link with $cf_curs_lib library) >> + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], >> + [initscr()], >> + [cf_result=3Dyes], >> + [cf_result=3Dno]) >> + AC_MSG_RESULT($cf_result) >> + test $cf_result =3D no && AC_MSG_ERROR(Cannot link curses library) >> + elif test "$cf_curs_lib" =3D "$cf_term_lib" ; then >> + : >> + elif test "$cf_term_lib" !=3D predefined ; then >> + AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib librari= es) >> + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], >> + [initscr(); tgoto((char *)0, 0, 0);], >> + [cf_result=3Dno], >> + [ >> + LIBS=3D"-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" >> + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], >> + [initscr()], >> + [cf_result=3Dyes], >> + [cf_result=3Derror]) >> + ]) >> + AC_MSG_RESULT($cf_result) >> + fi >> fi >> fi >>=20 >> @@ -1708,6 +1734,20 @@ if test "$cf_disable_rpath_hack" =3D no ;=20 >> fi >> ]) >> dnl --------------------------------------------------------------------= ------- >> +dnl CF_ENABLE_RPATH version: 2 updated: 2010/03/27 18:39:42 >> +dnl --------------- >> +dnl Check if the rpath option should be used, setting cache variable >> +dnl cf_cv_enable_rpath if so. >> +AC_DEFUN([CF_ENABLE_RPATH], >> +[ >> +AC_MSG_CHECKING(if rpath option should be used) >> +AC_ARG_ENABLE(rpath, >> +[ --enable-rpath use rpath option when generating shared libr= aries], >> +[cf_cv_enable_rpath=3D$enableval], >> +[cf_cv_enable_rpath=3Dno]) >> +AC_MSG_RESULT($cf_cv_enable_rpath) >> +])dnl >> +dnl -------------------------------------------------------------------= -------- >> dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54 >> dnl --------------- >> dnl Look for a non-standard library, given parameters for AC_TRY_LINK. = We >> @@ -1888,6 +1928,15 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3=20 >> fi >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> +dnl CF_FORGET_TOOL version: 1 updated: 2013/04/06 18:03:09 >> +dnl -------------- >> +dnl Forget that we saw the given tool. >> +AC_DEFUN([CF_FORGET_TOOL],[ >> +unset ac_cv_prog_ac_ct_$1 >> +unset ac_ct_$1 >> +unset $1 >> +])dnl >> +dnl -------------------------------------------------------------------= -------- >> dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51 >> dnl ------------ >> dnl Test for the presence of , 'union wait', arg-type of 'wa= it()' >> @@ -2256,7 +2305,7 @@ test -d "$oldincludedir" && { >> $1=3D"[$]$1 $cf_header_path_list" >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> -dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42 >> +dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05 >> dnl ----------------- >> dnl Check if the given compiler is really the Intel compiler for Linux. = It >> dnl tries to imitate gcc, but does not return an error when it finds a m= ismatch >> @@ -2270,6 +2319,7 @@ dnl $1 =3D GCC (default) or GXX >> dnl $2 =3D INTEL_COMPILER (default) or INTEL_CPLUSPLUS >> dnl $3 =3D CFLAGS (default) or CXXFLAGS >> AC_DEFUN([CF_INTEL_COMPILER],[ >> +AC_REQUIRE([AC_CANONICAL_HOST]) >> ifelse([$2],,INTEL_COMPILER,[$2])=3Dno >>=20 >> if test "$ifelse([$1],,[$1],GCC)" =3D yes ; then >> @@ -2415,6 +2465,18 @@ CF_SUBDIR_PATH($1,$2,lib) >> $1=3D"$cf_library_path_list [$]$1" >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> +dnl CF_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 >> +dnl ------------------ >> +AC_DEFUN([CF_LIBTOOL_VERSION],[ >> +if test -n "$LIBTOOL" && test "$LIBTOOL" !=3D none >> +then >> + cf_cv_libtool_version=3D`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed= -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'` >> +else >> + cf_cv_libtool_version=3D >> +fi >> +test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version >> +])dnl >> +dnl -------------------------------------------------------------------= -------- >> dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 >> dnl ------------- >> dnl Compute the library-prefix for the given host system >> @@ -2432,6 +2494,69 @@ ifelse($1,,,[$1=3D$LIB_PREFIX]) >> AC_SUBST(LIB_PREFIX) >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> +dnl CF_LIB_SUFFIX version: 22 updated: 2013/09/07 13:54:05 >> +dnl ------------- >> +dnl Compute the library file-suffix from the given model name >> +dnl $1 =3D model name >> +dnl $2 =3D variable to set (the nominal library suffix) >> +dnl $3 =3D dependency variable to set (actual filename) >> +dnl The variable $LIB_SUFFIX, if set, prepends the variable to set. >> +AC_DEFUN([CF_LIB_SUFFIX], >> +[ >> + case X$1 in #(vi >> + Xlibtool) #(vi >> + $2=3D'.la' >> + $3=3D[$]$2 >> + ;; >> + Xdebug) #(vi >> + $2=3D'_g.a' >> + $3=3D[$]$2 >> + ;; >> + Xprofile) #(vi >> + $2=3D'_p.a' >> + $3=3D[$]$2 >> + ;; >> + Xshared) #(vi >> + case $cf_cv_system_name in >> + aix[[5-7]]*) #(vi >> + $2=3D'.a' >> + $3=3D[$]$2 >> + ;; >> + cygwin*|msys*|mingw*) #(vi >> + $2=3D'.dll' >> + $3=3D'.dll.a' >> + ;; >> + darwin*) #(vi >> + $2=3D'.dylib' >> + $3=3D[$]$2 >> + ;; >> + hpux*) #(vi >> + case $target in >> + ia64*) #(vi >> + $2=3D'.so' >> + $3=3D[$]$2 >> + ;; >> + *) #(vi >> + $2=3D'.sl' >> + $3=3D[$]$2 >> + ;; >> + esac >> + ;; >> + *) #(vi >> + $2=3D'.so' >> + $3=3D[$]$2 >> + ;; >> + esac >> + ;; >> + *) >> + $2=3D'.a' >> + $3=3D[$]$2 >> + ;; >> + esac >> + test -n "$LIB_SUFFIX" && $2=3D"${LIB_SUFFIX}[$]{$2}" >> + test -n "$LIB_SUFFIX" && $3=3D"${LIB_SUFFIX}[$]{$3}" >> +])dnl >> +dnl -------------------------------------------------------------------= -------- >> dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46 >> dnl ------------ >> dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass '= make' >> @@ -2569,7 +2694,7 @@ if test "$cf_cv_mbstate_t" !=3D unknown ;=20 >> fi >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> -dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03 >> +dnl CF_MIXEDCASE_FILENAMES version: 5 updated: 2013/09/07 13:54:05 >> dnl ---------------------- >> dnl Check if the file-system supports mixed-case filenames. If we're ab= le to >> dnl create a lowercase name and see it as uppercase, it doesn't support = that. >> @@ -2578,7 +2703,7 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES], >> AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedca= se,[ >> if test "$cross_compiling" =3D yes ; then >> case $target_alias in #(vi >> - *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi >> + *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw32*|*-uwin*) #(vi >> cf_cv_mixedcase=3Dno >> ;; >> *) >> @@ -2959,6 +3084,25 @@ case .$with_cflags in #(vi >> esac >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> +dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49 >> +dnl ---------------- >> +dnl Check if the given variable is a number. If not, report an error. >> +dnl $1 is the variable >> +dnl $2 is the message >> +AC_DEFUN([CF_NUMBER_SYNTAX],[ >> +if test -n "$1" ; then >> + case $1 in #(vi >> + [[0-9]]*) #(vi >> + ;; >> + *) >> + AC_MSG_ERROR($2 is not a number: $1) >> + ;; >> + esac >> +else >> + AC_MSG_ERROR($2 value is empty) >> +fi >> +])dnl >> +dnl -------------------------------------------------------------------= -------- >> dnl CF_OUR_MESSAGES version: 7 updated: 2004/09/12 19:45:55 >> dnl --------------- >> dnl Check if we use the messages included with this program >> @@ -3049,6 +3193,40 @@ case ".[$]$1" in #(vi >> esac >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> +dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22 >> +dnl ------------- >> +dnl Check for the package-config program, unless disabled by command-li= ne. >> +AC_DEFUN([CF_PKG_CONFIG], >> +[ >> +AC_MSG_CHECKING(if you want to use pkg-config) >> +AC_ARG_WITH(pkg-config, >> + [ --with-pkg-config{=3Dpath} enable/disable use of pkg-config], >> + [cf_pkg_config=3D$withval], >> + [cf_pkg_config=3Dyes]) >> +AC_MSG_RESULT($cf_pkg_config) >> + >> +case $cf_pkg_config in #(vi >> +no) #(vi >> + PKG_CONFIG=3Dnone >> + ;; >> +yes) #(vi >> + CF_ACVERSION_CHECK(2.52, >> + [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)], >> + [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)]) >> + ;; >> +*) >> + PKG_CONFIG=3D$withval >> + ;; >> +esac >> + >> +test -z "$PKG_CONFIG" && PKG_CONFIG=3Dnone >> +if test "$PKG_CONFIG" !=3D none ; then >> + CF_PATH_SYNTAX(PKG_CONFIG) >> +fi >> + >> +AC_SUBST(PKG_CONFIG) >> +])dnl >> +dnl -------------------------------------------------------------------= -------- >> dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42 >> dnl ----------------- >> dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if need= ed. >> @@ -3168,6 +3346,28 @@ AC_CHECK_PROGS(LINT, tdlint lint alint s >> AC_SUBST(LINT_OPTS) >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> +dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37 >> +dnl ------------ >> +dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include = "-f" >> +dnl option if it is supported. >> +AC_DEFUN([CF_PROG_LN_S],[ >> +AC_PROG_LN_S >> +AC_MSG_CHECKING(if $LN_S -f options work) >> + >> +rm -f conf$$.src conf$$dst >> +echo >conf$$.dst >> +echo first >conf$$.src >> +if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then >> + cf_prog_ln_sf=3Dyes >> +else >> + cf_prog_ln_sf=3Dno >> +fi >> +rm -f conf$$.dst conf$$src >> +AC_MSG_RESULT($cf_prog_ln_sf) >> + >> +test "$cf_prog_ln_sf" =3D yes && LN_S=3D"$LN_S -f" >> +])dnl >> +dnl -------------------------------------------------------------------= -------- >> dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 >> dnl ---------------- >> dnl Remove all -U and -D options that refer to the given symbol from a l= ist >> @@ -3185,7 +3385,7 @@ $1=3D`echo "$2" | \ >> -e 's/-[[UD]]'"$3"'\(=3D[[^ ]]*\)\?[$]//g'` >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> -dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33 >> +dnl CF_RPATH_HACK version: 11 updated: 2013/09/01 13:02:00 >> dnl ------------- >> AC_DEFUN([CF_RPATH_HACK], >> [ >> @@ -3202,8 +3402,8 @@ if test -n "$LD_RPATH_OPT" ; then >>=20 >> AC_TRY_LINK([#include ], >> [printf("Hello");], >> - [cf_rpath_oops=3D`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found= ' | sed -e 's% =3D>.*$%%' |sort -u` >> - cf_rpath_list=3D`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e = 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`]) >> + [cf_rpath_oops=3D`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found= ' | sed -e 's% =3D>.*$%%' |sort | uniq` >> + cf_rpath_list=3D`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e = 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort | uniq`]) >>=20 >> # If we passed the link-test, but get a "not found" on a given library, >> # this could be due to inept reconfiguration of gcc to make it only >> @@ -3236,6 +3436,8 @@ AC_TRY_LINK([#include ], >> CF_RPATH_HACK_2(LIBS) >>=20 >> CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS) >> +else >> + AC_MSG_RESULT(no) >> fi >> AC_SUBST(EXTRA_LDFLAGS) >> ])dnl >> @@ -3300,6 +3502,440 @@ CF_VERBOSE(...checked $1 [$]$1) >> AC_SUBST(EXTRA_LDFLAGS) >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> +dnl CF_SHARED_OPTS version: 83 updated: 2013/09/21 17:34:53 >> +dnl -------------- >> +dnl -------------- >> +dnl Attempt to determine the appropriate CC/LD options for creating a s= hared >> +dnl library. >> +dnl >> +dnl Notes: >> +dnl a) ${LOCAL_LDFLAGS} is used to link executables that will run within >> +dnl the build-tree, i.e., by making use of the libraries that are compi= led in >> +dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path fo= r the >> +dnl shared library since that can lead to unexpected results at runtime. >> +dnl b) ${LOCAL_LDFLAGS2} has the same intention but assumes that the sh= ared >> +dnl libraries are compiled in ../../lib >> +dnl >> +dnl The variable 'cf_cv_do_symlinks' is used to control whether we conf= igure >> +dnl to install symbolic links to the rel/abi versions of shared librari= es. >> +dnl >> +dnl The variable 'cf_cv_shlib_version' controls whether we use the rel = or abi >> +dnl version when making symbolic links. >> +dnl >> +dnl The variable 'cf_cv_shlib_version_infix' controls whether shared li= brary >> +dnl version numbers are infix (ex: libncurses..dylib) or postfix >> +dnl (ex: libncurses.so.). >> +dnl >> +dnl Some loaders leave 'so_locations' lying around. It's nice to clean= up. >> +AC_DEFUN([CF_SHARED_OPTS], >> +[ >> + AC_REQUIRE([CF_LD_RPATH_OPT]) >> + RM_SHARED_OPTS=3D >> + LOCAL_LDFLAGS=3D >> + LOCAL_LDFLAGS2=3D >> + LD_SHARED_OPTS=3D >> + INSTALL_LIB=3D"-m 644" >> + : ${rel_builddir:=3D.} >> + >> + cf_cv_do_symlinks=3Dno >> + cf_ld_rpath_opt=3D >> + test "$cf_cv_enable_rpath" =3D yes && cf_ld_rpath_opt=3D"$LD_RPATH_OPT" >> + >> + AC_MSG_CHECKING(if release/abi version should be used for shared libs) >> + AC_ARG_WITH(shlib-version, >> + [ --with-shlib-version=3DX Specify rel or abi version for shared lib= s], >> + [test -z "$withval" && withval=3Dauto >> + case $withval in #(vi >> + yes) #(vi >> + cf_cv_shlib_version=3Dauto >> + ;; >> + rel|abi|auto|no) #(vi >> + cf_cv_shlib_version=3D$withval >> + ;; >> + *) >> + AC_MSG_ERROR([option value must be one of: rel, abi, auto or no]) >> + ;; >> + esac >> + ],[cf_cv_shlib_version=3Dauto]) >> + AC_MSG_RESULT($cf_cv_shlib_version) >> + >> + cf_cv_rm_so_locs=3Dno >> + cf_try_cflags=3D >> + >> + # Some less-capable ports of gcc support only -fpic >> + CC_SHARED_OPTS=3D >> + if test "$GCC" =3D yes >> + then >> + AC_MSG_CHECKING(which $CC option to use) >> + cf_save_CFLAGS=3D"$CFLAGS" >> + for CC_SHARED_OPTS in -fPIC -fpic '' >> + do >> + CFLAGS=3D"$cf_save_CFLAGS $CC_SHARED_OPTS" >> + AC_TRY_COMPILE([#include ],[int x =3D 1],[break],[]) >> + done >> + AC_MSG_RESULT($CC_SHARED_OPTS) >> + CFLAGS=3D"$cf_save_CFLAGS" >> + fi >> + >> + cf_cv_shlib_version_infix=3Dno >> + >> + case $cf_cv_system_name in #(vi >> + aix4.[3-9]*|aix[[5-7]]*) #(vi >> + if test "$GCC" =3D yes; then >> + CC_SHARED_OPTS=3D >> + MK_SHARED_LIB=3D'${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}= :/usr/lib -o [$]@' >> + else >> + # CC_SHARED_OPTS=3D'-qpic=3Dlarge -G' >> + # perhaps "-bM:SRE -bnoentry -bexpall" >> + MK_SHARED_LIB=3D'${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr= /lib -o [$]@' >> + fi >> + ;; >> + beos*) #(vi >> + MK_SHARED_LIB=3D'${CC} ${CFLAGS} -o $[@] -Xlinker -soname=3D`basename= $[@]` -nostart -e 0' >> + ;; >> + cygwin*) #(vi >> + CC_SHARED_OPTS=3D >> + MK_SHARED_LIB=3D'sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]= {CFLAGS}' >> + RM_SHARED_OPTS=3D"$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dl= l.a" >> + cf_cv_shlib_version=3Dcygdll >> + cf_cv_shlib_version_infix=3Dcygdll >> + cat >mk_shared_lib.sh <<-CF_EOF >> + #!/bin/sh >> + SHARED_LIB=3D\[$]1 >> + IMPORT_LIB=3D\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll= [$]/.dll.a/'\` >> + shift >> + cat <<-EOF >> + Linking shared library >> + ** SHARED_LIB \[$]SHARED_LIB >> + ** IMPORT_LIB \[$]IMPORT_LIB >> +EOF >> + exec \[$]* -shared -Wl,--out-implib=3D\[$]{IMPORT_LIB} -Wl,--export-a= ll-symbols -o \[$]{SHARED_LIB} >> +CF_EOF >> + chmod +x mk_shared_lib.sh >> + ;; >> + msys*) #(vi >> + CC_SHARED_OPTS=3D >> + MK_SHARED_LIB=3D'sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]= {CFLAGS}' >> + RM_SHARED_OPTS=3D"$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dl= l.a" >> + cf_cv_shlib_version=3Dmsysdll >> + cf_cv_shlib_version_infix=3Dmsysdll >> + cat >mk_shared_lib.sh <<-CF_EOF >> + #!/bin/sh >> + SHARED_LIB=3D\[$]1 >> + IMPORT_LIB=3D\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.d= ll[$]/.dll.a/'\` >> + shift >> + cat <<-EOF >> + Linking shared library >> + ** SHARED_LIB \[$]SHARED_LIB >> + ** IMPORT_LIB \[$]IMPORT_LIB >> +EOF >> + exec \[$]* -shared -Wl,--out-implib=3D\[$]{IMPORT_LIB} -Wl,--export-a= ll-symbols -o \[$]{SHARED_LIB} >> +CF_EOF >> + chmod +x mk_shared_lib.sh >> + ;; >> + darwin*) #(vi >> + cf_try_cflags=3D"no-cpp-precomp" >> + CC_SHARED_OPTS=3D"-dynamic" >> + MK_SHARED_LIB=3D'${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/= `basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${AB= I_VERSION} -o $[@]' >> + test "$cf_cv_shlib_version" =3D auto && cf_cv_shlib_version=3Dabi >> + cf_cv_shlib_version_infix=3Dyes >> + AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_searc= h_paths_first, [ >> + cf_save_LDFLAGS=3D$LDFLAGS >> + LDFLAGS=3D"$LDFLAGS -Wl,-search_paths_first" >> + AC_TRY_LINK(, [int i;], cf_cv_ldflags_search_paths_first=3Dyes, cf_c= v_ldflags_search_paths_first=3Dno) >> + LDFLAGS=3D$cf_save_LDFLAGS]) >> + if test $cf_cv_ldflags_search_paths_first =3D yes; then >> + LDFLAGS=3D"$LDFLAGS -Wl,-search_paths_first" >> + fi >> + ;; >> + hpux[[7-8]]*) #(vi >> + # HP-UX 8.07 ld lacks "+b" option used for libdir search-list=20 >> + if test "$GCC" !=3D yes; then >> + CC_SHARED_OPTS=3D'+Z' >> + fi >> + MK_SHARED_LIB=3D'${LD} -b -o $[@]' >> + INSTALL_LIB=3D"-m 555" >> + ;; >> + hpux*) #(vi >> + # (tested with gcc 2.7.2 -- I don't have c89) >> + if test "$GCC" =3D yes; then >> + LD_SHARED_OPTS=3D'-Xlinker +b -Xlinker ${libdir}' >> + else >> + CC_SHARED_OPTS=3D'+Z' >> + LD_SHARED_OPTS=3D'-Wl,+b,${libdir}' >> + fi >> + MK_SHARED_LIB=3D'${LD} +b ${libdir} -b -o $[@]' >> + # HP-UX shared libraries must be executable, and should be >> + # readonly to exploit a quirk in the memory manager. >> + INSTALL_LIB=3D"-m 555" >> + ;; >> + interix*) >> + test "$cf_cv_shlib_version" =3D auto && cf_cv_shlib_version=3Drel >> + if test "$cf_cv_shlib_version" =3D rel; then >> + cf_shared_soname=3D'`basename $@ .${REL_VERSION}`.${ABI_VERSION}' >> + else >> + cf_shared_soname=3D'`basename $@`' >> + fi >> + CC_SHARED_OPTS=3D >> + MK_SHARED_LIB=3D'${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_s= hared_soname' -o $@' >> + ;; >> + irix*) #(vi >> + if test "$cf_cv_enable_rpath" =3D yes ; then >> + EXTRA_LDFLAGS=3D"${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" >> + fi >> + # tested with IRIX 5.2 and 'cc'. >> + if test "$GCC" !=3D yes; then >> + CC_SHARED_OPTS=3D'-KPIC' >> + MK_SHARED_LIB=3D'${CC} -shared -rdata_shared -soname `basename $[@]`= -o $[@]' >> + else >> + MK_SHARED_LIB=3D'${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]' >> + fi >> + cf_cv_rm_so_locs=3Dyes >> + ;; >> + linux*|gnu*|k*bsd*-gnu) #(vi >> + if test "$DFT_LWR_MODEL" =3D "shared" ; then >> + LOCAL_LDFLAGS=3D"${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" >> + LOCAL_LDFLAGS2=3D"$LOCAL_LDFLAGS" >> + fi >> + if test "$cf_cv_enable_rpath" =3D yes ; then >> + EXTRA_LDFLAGS=3D"${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" >> + fi >> + CF_SHARED_SONAME >> + MK_SHARED_LIB=3D'${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_s= oname',-stats,-lc -o $[@]' >> + ;; >> + mingw*) #(vi >> + cf_cv_shlib_version=3Dmingw >> + cf_cv_shlib_version_infix=3Dmingw >> + if test "$DFT_LWR_MODEL" =3D "shared" ; then >> + LOCAL_LDFLAGS=3D"-Wl,--enable-auto-import" >> + LOCAL_LDFLAGS2=3D"$LOCAL_LDFLAGS" >> + EXTRA_LDFLAGS=3D"-Wl,--enable-auto-import $EXTRA_LDFLAGS" >> + fi >> + CC_SHARED_OPTS=3D >> + MK_SHARED_LIB=3D'sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]= {CFLAGS}' >> + RM_SHARED_OPTS=3D"$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dl= l.a" >> + cat >mk_shared_lib.sh <<-CF_EOF >> + #!/bin/sh >> + SHARED_LIB=3D\[$]1 >> + IMPORT_LIB=3D\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` >> + shift >> + cat <<-EOF >> + Linking shared library >> + ** SHARED_LIB \[$]SHARED_LIB >> + ** IMPORT_LIB \[$]IMPORT_LIB >> +EOF >> + exec \[$]* -shared -Wl,--enable-auto-import,--out-implib=3D\[$]{IMPOR= T_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} >> +CF_EOF >> + chmod +x mk_shared_lib.sh >> + ;; >> + openbsd[[2-9]].*|mirbsd*) #(vi >> + if test "$DFT_LWR_MODEL" =3D "shared" ; then >> + LOCAL_LDFLAGS=3D"${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" >> + LOCAL_LDFLAGS2=3D"$LOCAL_LDFLAGS" >> + fi >> + if test "$cf_cv_enable_rpath" =3D yes ; then >> + EXTRA_LDFLAGS=3D"${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" >> + fi >> + CC_SHARED_OPTS=3D"$CC_SHARED_OPTS -DPIC" >> + CF_SHARED_SONAME >> + MK_SHARED_LIB=3D'${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf= _cv_shared_soname',-stats,-lc -o $[@]' >> + ;; >> + nto-qnx*|openbsd*|freebsd[[12]].*) #(vi >> + CC_SHARED_OPTS=3D"$CC_SHARED_OPTS -DPIC" >> + MK_SHARED_LIB=3D'${LD} -Bshareable -o $[@]' >> + test "$cf_cv_shlib_version" =3D auto && cf_cv_shlib_version=3Drel >> + ;; >> + dragonfly*|freebsd*) #(vi >> + CC_SHARED_OPTS=3D"$CC_SHARED_OPTS -DPIC" >> + if test "$DFT_LWR_MODEL" =3D "shared" && test "$cf_cv_enable_rpath" = =3D yes ; then >> + LOCAL_LDFLAGS=3D"${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" >> + LOCAL_LDFLAGS2=3D"${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS" >> + EXTRA_LDFLAGS=3D"${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" >> + fi >> + CF_SHARED_SONAME >> + MK_SHARED_LIB=3D'${LD} -shared -Bshareable -soname=3D`basename $[@]` = -o $[@]' >> + ;; >> + netbsd*) #(vi >> + CC_SHARED_OPTS=3D"$CC_SHARED_OPTS -DPIC" >> + if test "$DFT_LWR_MODEL" =3D "shared" && test "$cf_cv_enable_rpath" = =3D yes ; then >> + LOCAL_LDFLAGS=3D"${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" >> + LOCAL_LDFLAGS2=3D"$LOCAL_LDFLAGS" >> + EXTRA_LDFLAGS=3D"${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" >> + if test "$cf_cv_shlib_version" =3D auto; then >> + if test -f /usr/libexec/ld.elf_so; then >> + cf_cv_shlib_version=3Dabi >> + else >> + cf_cv_shlib_version=3Drel >> + fi >> + fi >> + CF_SHARED_SONAME >> + MK_SHARED_LIB=3D'${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_= soname' -o $[@]' >> + else >> + MK_SHARED_LIB=3D'${CC} -Wl,-shared -Wl,-Bshareable -o $[@]' >> + fi >> + ;; >> + osf*|mls+*) #(vi >> + # tested with OSF/1 V3.2 and 'cc' >> + # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't >> + # link with shared libs). >> + MK_SHARED_LIB=3D'${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -ex= pect_unresolved "*" -shared -soname `basename $[@]`' >> + case $host_os in #(vi >> + osf4*) >> + MK_SHARED_LIB=3D"${MK_SHARED_LIB} -msym" >> + ;; >> + esac >> + MK_SHARED_LIB=3D"${MK_SHARED_LIB}"' -o $[@]' >> + if test "$DFT_LWR_MODEL" =3D "shared" ; then >> + LOCAL_LDFLAGS=3D"${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" >> + LOCAL_LDFLAGS2=3D"$LOCAL_LDFLAGS" >> + fi >> + cf_cv_rm_so_locs=3Dyes >> + ;; >> + sco3.2v5*) # (also uw2* and UW7: hops 13-Apr-98 >> + # tested with osr5.0.5 >> + if test "$GCC" !=3D yes; then >> + CC_SHARED_OPTS=3D'-belf -KPIC' >> + fi >> + MK_SHARED_LIB=3D'${LD} -dy -G -h `basename $[@] .${REL_VERSION}`.${AB= I_VERSION} -o [$]@' >> + if test "$cf_cv_enable_rpath" =3D yes ; then >> + # only way is to set LD_RUN_PATH but no switch for it >> + RUN_PATH=3D$libdir >> + fi >> + test "$cf_cv_shlib_version" =3D auto && cf_cv_shlib_version=3Drel >> + LINK_PROGS=3D'LD_RUN_PATH=3D${libdir}' >> + LINK_TESTS=3D'Pwd=3D`pwd`;LD_RUN_PATH=3D`dirname $${Pwd}`/lib' >> + ;; >> + sunos4*) #(vi >> + # tested with SunOS 4.1.1 and gcc 2.7.0 >> + if test "$GCC" !=3D yes; then >> + CC_SHARED_OPTS=3D'-KPIC' >> + fi >> + MK_SHARED_LIB=3D'${LD} -assert pure-text -o $[@]' >> + test "$cf_cv_shlib_version" =3D auto && cf_cv_shlib_version=3Drel >> + ;; >> + solaris2*) #(vi >> + # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 >> + # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 >> + if test "$DFT_LWR_MODEL" =3D "shared" ; then >> + LOCAL_LDFLAGS=3D"-R \$(LOCAL_LIBDIR):\${libdir}" >> + LOCAL_LDFLAGS2=3D"$LOCAL_LDFLAGS" >> + fi >> + if test "$cf_cv_enable_rpath" =3D yes ; then >> + EXTRA_LDFLAGS=3D"-R \${libdir} $EXTRA_LDFLAGS" >> + fi >> + CF_SHARED_SONAME >> + if test "$GCC" !=3D yes; then >> + cf_save_CFLAGS=3D"$CFLAGS" >> + for cf_shared_opts in -xcode=3Dpic32 -xcode=3Dpic13 -KPIC -Kpic -O >> + do >> + CFLAGS=3D"$cf_shared_opts $cf_save_CFLAGS" >> + AC_TRY_COMPILE([#include ],[printf("Hello\n");],[break]) >> + done >> + CFLAGS=3D"$cf_save_CFLAGS" >> + CC_SHARED_OPTS=3D$cf_shared_opts >> + MK_SHARED_LIB=3D'${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]' >> + else >> + MK_SHARED_LIB=3D'${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $= [@]' >> + fi >> + ;; >> + sysv5uw7*|unix_sv*) #(vi >> + # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc) >> + if test "$GCC" !=3D yes; then >> + CC_SHARED_OPTS=3D'-KPIC' >> + fi >> + MK_SHARED_LIB=3D'${LD} -d y -G -o [$]@' >> + ;; >> + *) >> + CC_SHARED_OPTS=3D'unknown' >> + MK_SHARED_LIB=3D'echo unknown' >> + ;; >> + esac >> + >> + # This works if the last tokens in $MK_SHARED_LIB are the -o target. >> + case "$cf_cv_shlib_version" in #(vi >> + rel|abi) >> + case "$MK_SHARED_LIB" in #(vi >> + *'-o $[@]') #(vi >> + test "$cf_cv_do_symlinks" =3D no && cf_cv_do_symlinks=3Dyes >> + ;; >> + *) >> + AC_MSG_WARN(ignored --with-shlib-version) >> + ;; >> + esac >> + ;; >> + esac >> + >> + if test -n "$cf_try_cflags" >> + then >> +cat > conftest.$ac_ext <> +#line __oline__ "${as_me:-configure}" >> +#include >> +int main(int argc, char *argv[[]]) >> +{ >> + printf("hello\n"); >> + return (argv[[argc-1]] =3D=3D 0) ; >> +} >> +EOF >> + cf_save_CFLAGS=3D"$CFLAGS" >> + for cf_opt in $cf_try_cflags >> + do >> + CFLAGS=3D"$cf_save_CFLAGS -$cf_opt" >> + AC_MSG_CHECKING(if CFLAGS option -$cf_opt works) >> + if AC_TRY_EVAL(ac_compile); then >> + AC_MSG_RESULT(yes) >> + cf_save_CFLAGS=3D"$CFLAGS" >> + else >> + AC_MSG_RESULT(no) >> + fi >> + done >> + CFLAGS=3D"$cf_save_CFLAGS" >> + fi >> + >> + >> + # RPATH_LIST is a colon-separated list of directories >> + test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB=3D"$MK_SHARED_LIB $cf_ld_r= path_opt\${RPATH_LIST}" >> + test -z "$RPATH_LIST" && RPATH_LIST=3D"\${libdir}" >> + >> + test $cf_cv_rm_so_locs =3D yes && RM_SHARED_OPTS=3D"$RM_SHARED_OPTS so= _locations" >> + >> + CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS) >> + CF_VERBOSE(MK_SHARED_LIB: $MK_SHARED_LIB) >> + >> + AC_SUBST(CC_SHARED_OPTS) >> + AC_SUBST(LD_RPATH_OPT) >> + AC_SUBST(LD_SHARED_OPTS) >> + AC_SUBST(MK_SHARED_LIB) >> + AC_SUBST(RM_SHARED_OPTS) >> + >> + AC_SUBST(LINK_PROGS) >> + AC_SUBST(LINK_TESTS) >> + >> + AC_SUBST(EXTRA_LDFLAGS) >> + AC_SUBST(LOCAL_LDFLAGS) >> + AC_SUBST(LOCAL_LDFLAGS2) >> + >> + AC_SUBST(INSTALL_LIB) >> + AC_SUBST(RPATH_LIST) >> +])dnl >> +dnl -------------------------------------------------------------------= -------- >> +dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43 >> +dnl ---------------- >> +dnl utility macro for CF_SHARED_OPTS, constructs "$cf_cv_shared_soname"= for >> +dnl substitution into MK_SHARED_LIB string for the "-soname" (or simila= r) >> +dnl option. >> +dnl >> +dnl $1 is the default that should be used for "$cf_cv_shlib_version". >> +dnl If missing, use "rel". >> +define([CF_SHARED_SONAME], >> +[ >> + test "$cf_cv_shlib_version" =3D auto && cf_cv_shlib_version=3Difelse($= 1,,rel,$1) >> + if test "$cf_cv_shlib_version" =3D rel; then >> + cf_cv_shared_soname=3D'`basename $[@] .${REL_VERSION}`.${ABI_VERSION}' >> + else >> + cf_cv_shared_soname=3D'`basename $[@]`' >> + fi >> +]) >> +dnl -------------------------------------------------------------------= -------- >> dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50 >> dnl -------------- >> dnl Construct a search-list for a nonstandard header/lib-file >> @@ -3492,7 +4128,7 @@ AC_DEFUN([CF_VERBOSE], >> CF_MSG_LOG([$1]) >> ])dnl >> dnl --------------------------------------------------------------------= ------- >> -dnl CF_VERSION_INFO version: 5 updated: 2012/10/06 08:57:51 >> +dnl CF_VERSION_INFO version: 6 updated: 2013/06/16 10:25:53 >> dnl --------------- >> dnl Define several useful symbols derived from the VERSION file. A sepa= rate >> dnl file is preferred to embedding the version numbers in various script= s. >> @@ -3557,7 +4193,7 @@ else >> fi >>=20 >> # show the actual data that we have for versions: >> -CF_VERBOSE(VERSION $VERSION) >> +CF_VERBOSE(ABI VERSION $VERSION) >> CF_VERBOSE(VERSION_MAJOR $VERSION_MAJOR) >> CF_VERBOSE(VERSION_MINOR $VERSION_MINOR) >> CF_VERBOSE(VERSION_PATCH $VERSION_PATCH) >> @@ -3611,6 +4247,26 @@ fi >> fi >>=20 >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >>=20 _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you. From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 17:42:23 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id EC53B994; Fri, 27 Sep 2013 17:42:23 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9C842060; Fri, 27 Sep 2013 17:42: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 r8RHgN9v046838; Fri, 27 Sep 2013 17:42:23 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8RHgNco046837; Fri, 27 Sep 2013 17:42:23 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201309271742.r8RHgNco046837@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 27 Sep 2013 17:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255916 - head/contrib/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 17:42:24 -0000 Author: sjg Date: Fri Sep 27 17:42:23 2013 New Revision: 255916 URL: http://svnweb.freebsd.org/changeset/base/255916 Log: Fix Fx syntax. PR: 182269 Approved by: re@ Modified: head/contrib/bmake/make.1 Modified: head/contrib/bmake/make.1 ============================================================================== --- head/contrib/bmake/make.1 Fri Sep 27 16:02:40 2013 (r255915) +++ head/contrib/bmake/make.1 Fri Sep 27 17:42:23 2013 (r255916) @@ -730,7 +730,7 @@ even if the target is not tagged with The default is .Ql Pa yes for backwards compatability with -.Fx 9 +.Fx 9.0 and earlier. .It Va .MAKE.DEPENDFILE Names the makefile (default From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 21:33:13 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id F22C5111; Fri, 27 Sep 2013 21:33:12 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) 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 6D7882C3A; Fri, 27 Sep 2013 21:33:12 +0000 (UTC) Received: by mail-qc0-f173.google.com with SMTP id c3so2160596qcv.32 for ; Fri, 27 Sep 2013 14:33:11 -0700 (PDT) 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=oIGNgznEkMDmea9QdjV+TFJ7/kozh8Dl3ovJF56t+Qc=; b=XGm156KhWSNJ962HEWu4siMSRx7oHa3G7cLcEEhr4Fg8xyGMDXGVMu2j735VYaOIye dbkOSU+86xOECMLLpls2mWvDXRrJlmBmMkM7AJePcolV3eCQmqbunDS6xNfhcriWJKcU Z1/8EhpIxXuPxkokI9oKL97/7UgIGunQIjVdnLpd7Zev9DppF8BLoUu1ej09fIpE8fuh M0lTYVZ6bBeEcN8Ow7EGvuim3ZyPbBGqSzHFJzkKJtSQxyPQouTgBszMrC2+3zEWHUjk RxEcLJlgm+7PqpQ8PuE9tN1cIjF9Jjq7hk4yZcmmqjZScs6whSlClMg7s/Bx5Ib6tj98 /mhQ== MIME-Version: 1.0 X-Received: by 10.224.125.195 with SMTP id z3mr5109540qar.118.1380317591394; Fri, 27 Sep 2013 14:33:11 -0700 (PDT) Received: by 10.49.14.225 with HTTP; Fri, 27 Sep 2013 14:33:11 -0700 (PDT) In-Reply-To: <201309202259.r8KMxMP3084866@svn.freebsd.org> References: <201309202259.r8KMxMP3084866@svn.freebsd.org> Date: Fri, 27 Sep 2013 17:33:11 -0400 Message-ID: Subject: Re: svn commit: r255744 - in head/sys: amd64/amd64 amd64/conf amd64/include i386/conf i386/i386 i386/include kern x86/xen xen From: Benjamin Kaduk To: "Justin T. Gibbs" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , rmh@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 21:33:13 -0000 On Fri, Sep 20, 2013 at 6:59 PM, Justin T. Gibbs wrote: > Author: gibbs > Date: Fri Sep 20 22:59:22 2013 > New Revision: 255744 > URL: http://svnweb.freebsd.org/changeset/base/255744 > > Log: > Merge Xen PVHVM support into the GENERIC kernel config for both > amd64 and i386. > I confess to a poor understanding of the reason for existence of sys/i386/conf/XEN -- in particular, does this change render that configuration obsolete as well as XENHVM? Maybe -hackers would be a better place to ask... Thanks, Ben From owner-svn-src-head@FreeBSD.ORG Fri Sep 27 22:34:46 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id E8697252; Fri, 27 Sep 2013 22:34:46 +0000 (UTC) (envelope-from gibbs@freebsd.org) Received: from aslan.scsiguy.com (ns1.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4809E2F0D; Fri, 27 Sep 2013 22:34:46 +0000 (UTC) Received: from [172.17.3.133] ([78.133.112.70]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r8RMYgtd023956 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 27 Sep 2013 16:34:44 -0600 (MDT) (envelope-from gibbs@freebsd.org) Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: svn commit: r255744 - in head/sys: amd64/amd64 amd64/conf amd64/include i386/conf i386/i386 i386/include kern x86/xen xen From: "Justin T. Gibbs" In-Reply-To: Date: Sat, 28 Sep 2013 00:34:41 +0200 Message-Id: References: <201309202259.r8KMxMP3084866@svn.freebsd.org> To: Benjamin Kaduk X-Mailer: Apple Mail (2.1510) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Fri, 27 Sep 2013 16:34:45 -0600 (MDT) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , rmh@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 22:34:47 -0000 On Sep 27, 2013, at 11:33 PM, Benjamin Kaduk wrote: > On Fri, Sep 20, 2013 at 6:59 PM, Justin T. Gibbs = wrote: > Author: gibbs > Date: Fri Sep 20 22:59:22 2013 > New Revision: 255744 > URL: http://svnweb.freebsd.org/changeset/base/255744 >=20 > Log: > Merge Xen PVHVM support into the GENERIC kernel config for both > amd64 and i386. >=20 > I confess to a poor understanding of the reason for existence of = sys/i386/conf/XEN -- in particular, does this change render that = configuration obsolete as well as XENHVM? Maybe -hackers would be a = better place to ask... >=20 > Thanks, >=20 > Ben=20 sys/i386/conf/XEN is for a fully para-virtualized FreeBSD configuration. = This means that nothing is emulated and all aspects of the kernel (VM, = device drivers, etc) are using hypervisor services to do their job. = FreeBSD's full PV implementation is not production ready. However, full = PV is currently required for DOM0 support and work is currently underway = to improve it for at least amd64. HVM with PV optimizations is another guest mode for Xen. Recent changes = make it possible for FreeBSD to cleanly detect it is running on Xen and = enable these optimizations without having to build a custom kernel. For = this reason, the XENHVM config was removed. -- Justin= From owner-svn-src-head@FreeBSD.ORG Sat Sep 28 02:14:00 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 5BFD382D; Sat, 28 Sep 2013 02:14:00 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4AD622805; Sat, 28 Sep 2013 02:14: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 r8S2E0Yj020456; Sat, 28 Sep 2013 02:14:00 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8S2E0Id020450; Sat, 28 Sep 2013 02:14:00 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201309280214.r8S2E0Id020450@svn.freebsd.org> From: Justin Hibbits Date: Sat, 28 Sep 2013 02:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255921 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 02:14:00 -0000 Author: jhibbits Date: Sat Sep 28 02:13:59 2013 New Revision: 255921 URL: http://svnweb.freebsd.org/changeset/base/255921 Log: Fix powerpc/161045. ams_poll() needs to return that any data is available, not just a new packet. PR: powerpc/161045 Approved by: re(marius) MFC after: 1 week Modified: head/sys/dev/adb/adb_mouse.c Modified: head/sys/dev/adb/adb_mouse.c ============================================================================== --- head/sys/dev/adb/adb_mouse.c Sat Sep 28 00:44:59 2013 (r255920) +++ head/sys/dev/adb/adb_mouse.c Sat Sep 28 02:13:59 2013 (r255921) @@ -471,7 +471,8 @@ ams_poll(struct cdev *dev, int events, s mtx_lock(&sc->sc_mtx); if (sc->xdelta == 0 && sc->ydelta == 0 && - sc->buttons == sc->last_buttons) { + sc->buttons == sc->last_buttons && + sc->packet_read_len == 0) { selrecord(p, &sc->rsel); events = 0; } else { From owner-svn-src-head@FreeBSD.ORG Sat Sep 28 07:04:04 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 6E2E4190; Sat, 28 Sep 2013 07:04:04 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD172AE9; Sat, 28 Sep 2013 07:04: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 r8S744Mm074962; Sat, 28 Sep 2013 07:04:04 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8S743An074956; Sat, 28 Sep 2013 07:04:03 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201309280704.r8S743An074956@svn.freebsd.org> From: Ulrich Spoerlein Date: Sat, 28 Sep 2013 07:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255923 - in head/sys/modules/hyperv: netvsc stordisengage storvsc utilities vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 07:04:04 -0000 Author: uqs Date: Sat Sep 28 07:04:03 2013 New Revision: 255923 URL: http://svnweb.freebsd.org/changeset/base/255923 Log: Fix make depend, apply a bit of style. Approved by: re (marius) Reviewed by: grehan Modified: head/sys/modules/hyperv/netvsc/Makefile head/sys/modules/hyperv/stordisengage/Makefile head/sys/modules/hyperv/storvsc/Makefile head/sys/modules/hyperv/utilities/Makefile head/sys/modules/hyperv/vmbus/Makefile Modified: head/sys/modules/hyperv/netvsc/Makefile ============================================================================== --- head/sys/modules/hyperv/netvsc/Makefile Sat Sep 28 05:56:37 2013 (r255922) +++ head/sys/modules/hyperv/netvsc/Makefile Sat Sep 28 07:04:03 2013 (r255923) @@ -2,12 +2,12 @@ .PATH: ${.CURDIR}/../../../dev/hyperv/netvsc -KMOD = hv_netvsc +KMOD= hv_netvsc +SRCS= hv_net_vsc.c \ + hv_netvsc_drv_freebsd.c \ + hv_rndis_filter.c +SRCS+= bus_if.h device_if.h -SRCS = hv_net_vsc.c \ - hv_netvsc_drv_freebsd.c \ - hv_rndis_filter.c - -CFLAGS += -I${.CURDIR}/../../../dev/hyperv/netvsc +CFLAGS+= -I${.CURDIR}/../../../dev/hyperv/netvsc .include Modified: head/sys/modules/hyperv/stordisengage/Makefile ============================================================================== --- head/sys/modules/hyperv/stordisengage/Makefile Sat Sep 28 05:56:37 2013 (r255922) +++ head/sys/modules/hyperv/stordisengage/Makefile Sat Sep 28 07:04:03 2013 (r255923) @@ -2,8 +2,8 @@ .PATH: ${.CURDIR}/../../../dev/hyperv/stordisengage -KMOD= hv_ata_pci_disengage - -SRCS= hv_ata_pci_disengage.c ata_if.h +KMOD= hv_ata_pci_disengage +SRCS= hv_ata_pci_disengage.c +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include Modified: head/sys/modules/hyperv/storvsc/Makefile ============================================================================== --- head/sys/modules/hyperv/storvsc/Makefile Sat Sep 28 05:56:37 2013 (r255922) +++ head/sys/modules/hyperv/storvsc/Makefile Sat Sep 28 07:04:03 2013 (r255923) @@ -2,10 +2,10 @@ .PATH: ${.CURDIR}/../../../dev/hyperv/storvsc -KMOD= hv_storvsc - +KMOD= hv_storvsc SRCS = hv_storvsc_drv_freebsd.c \ hv_vstorage.h +SRCS+= bus_if.h device_if.h opt_cam.h CFLAGS+= -I${.CURDIR}/../../../dev/hyperv/include \ -I${.CURDIR}/../../../dev/hyperv/vmbus \ Modified: head/sys/modules/hyperv/utilities/Makefile ============================================================================== --- head/sys/modules/hyperv/utilities/Makefile Sat Sep 28 05:56:37 2013 (r255922) +++ head/sys/modules/hyperv/utilities/Makefile Sat Sep 28 07:04:03 2013 (r255923) @@ -3,8 +3,8 @@ .PATH: ${.CURDIR}/../../../dev/hyperv/utilities KMOD= hv_utils - -SRCS = hv_util.c +SRCS= hv_util.c +SRCS+= bus_if.h device_if.h CFLAGS+= -I${.CURDIR}/../../../dev/hyperv/include \ -I${.CURDIR}/../../../dev/hyperv/vmbus Modified: head/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- head/sys/modules/hyperv/vmbus/Makefile Sat Sep 28 05:56:37 2013 (r255922) +++ head/sys/modules/hyperv/vmbus/Makefile Sat Sep 28 07:04:03 2013 (r255923) @@ -3,15 +3,15 @@ .PATH: ${.CURDIR}/../../../dev/hyperv/vmbus \ ${.CURDIR}/../../../dev/hyperv/utilities -KMOD= hv_vmbus - -SRCS = hv_channel.c \ +KMOD= hv_vmbus +SRCS= hv_channel.c \ hv_channel_mgmt.c \ hv_connection.c \ hv_hv.c \ hv_ring_buffer.c \ hv_vmbus_drv_freebsd.c \ hv_vmbus_priv.h +SRCS+= bus_if.h device_if.h CFLAGS+= -I${.CURDIR}/../../../dev/hyperv/include \ -I${.CURDIR}/../../../dev/hyperv/vmbus \ From owner-svn-src-head@FreeBSD.ORG Sat Sep 28 13:58:21 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id E772B67F; Sat, 28 Sep 2013 13:58:21 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D438F2D96; Sat, 28 Sep 2013 13: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 r8SDwLeM093487; Sat, 28 Sep 2013 13:58:21 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8SDwLoB093483; Sat, 28 Sep 2013 13:58:21 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201309281358.r8SDwLoB093483@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 28 Sep 2013 13:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255925 - in head/usr.sbin: bsdconfig/share/media 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 13:58:22 -0000 Author: gavin Date: Sat Sep 28 13:58:21 2013 New Revision: 255925 URL: http://svnweb.freebsd.org/changeset/base/255925 Log: Remove ftp5.se.f.o, as per request to -hubs@ Approved by: re (glebius) MFC after: 3 days Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr head/usr.sbin/bsdinstall/scripts/mirrorselect Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/ftp.subr Sat Sep 28 07:43:36 2013 (r255924) +++ head/usr.sbin/bsdconfig/share/media/ftp.subr Sat Sep 28 13:58:21 2013 (r255925) @@ -164,7 +164,6 @@ f_dialog_menu_media_ftp() ' $msg_sweden #2' 'ftp2.se.freebsd.org' ' $msg_sweden #3' 'ftp3.se.freebsd.org' ' $msg_sweden #4' 'ftp4.se.freebsd.org' - ' $msg_sweden #5' 'ftp5.se.freebsd.org' ' $msg_sweden #6' 'ftp6.se.freebsd.org' '$msg_switzerland' 'ftp.ch.freebsd.org' '$msg_taiwan' 'ftp.tw.freebsd.org' Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- head/usr.sbin/bsdinstall/scripts/mirrorselect Sat Sep 28 07:43:36 2013 (r255924) +++ head/usr.sbin/bsdinstall/scripts/mirrorselect Sat Sep 28 13:58:21 2013 (r255925) @@ -126,7 +126,6 @@ MIRROR=`dialog --backtitle "FreeBSD Inst ftp://ftp2.se.freebsd.org "Sweden #2"\ ftp://ftp3.se.freebsd.org "Sweden #3"\ ftp://ftp4.se.freebsd.org "Sweden #4"\ - ftp://ftp5.se.freebsd.org "Sweden #5"\ ftp://ftp6.se.freebsd.org "Sweden #6"\ ftp://ftp.ch.freebsd.org "Switzerland"\ ftp://ftp.tw.freebsd.org "Taiwan"\ From owner-svn-src-head@FreeBSD.ORG Sat Sep 28 14:14:24 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 69B85990; Sat, 28 Sep 2013 14:14:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 578862E54; Sat, 28 Sep 2013 14:14: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 r8SEEO7n003447; Sat, 28 Sep 2013 14:14:24 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8SEEOnP003446; Sat, 28 Sep 2013 14:14:24 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309281414.r8SEEOnP003446@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 28 Sep 2013 14:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255926 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 14:14:24 -0000 Author: glebius Date: Sat Sep 28 14:14:23 2013 New Revision: 255926 URL: http://svnweb.freebsd.org/changeset/base/255926 Log: Fix a fallout from r241610. One enc interface must be created on startup. Pointy hat to: glebius Reported by: gavin Approved by: re (gjb) Modified: head/sys/net/if_enc.c Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Sat Sep 28 13:58:21 2013 (r255925) +++ head/sys/net/if_enc.c Sat Sep 28 14:14:23 2013 (r255926) @@ -168,7 +168,7 @@ enc_modevent(module_t mod, int type, voi case MOD_LOAD: mtx_init(&enc_mtx, "enc mtx", NULL, MTX_DEF); enc_cloner = if_clone_simple(encname, enc_clone_create, - enc_clone_destroy, 0); + enc_clone_destroy, 1); break; case MOD_UNLOAD: printf("enc module unload - not possible for this module\n"); From owner-svn-src-head@FreeBSD.ORG Sat Sep 28 15:46:04 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id AFDDF898; Sat, 28 Sep 2013 15:46:04 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8D1512291; Sat, 28 Sep 2013 15:46: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 r8SFk4Aa062039; Sat, 28 Sep 2013 15:46:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8SFk4BL062036; Sat, 28 Sep 2013 15:46:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309281546.r8SFk4BL062036@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Sep 2013 15:46:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255927 - in head/sys: conf powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 15:46:04 -0000 Author: nwhitehorn Date: Sat Sep 28 15:46:03 2013 New Revision: 255927 URL: http://svnweb.freebsd.org/changeset/base/255927 Log: Add driver for the PAPR VSCSI virtual SCSI controller. This lets FreeBSD install directly into standard POWER LPARs, as found for example in QEMU. The core of this device is the SCSI RDMA protocol as also found in Infiniband. The SRP portions of the driver will be factored out and placed /sys/cam in the future to allow them to be used for IB storage. Thanks to Scott Long for a great deal of implementation help. Reviewed by: scottl Approved by: re (kib) Added: head/sys/powerpc/pseries/phyp_vscsi.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/pseries/vdevice.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sat Sep 28 14:14:23 2013 (r255926) +++ head/sys/conf/files.powerpc Sat Sep 28 15:46:03 2013 (r255927) @@ -228,6 +228,7 @@ powerpc/ps3/ps3-hvcall.S optional ps3 sc powerpc/pseries/phyp-hvcall.S optional pseries powerpc64 powerpc/pseries/mmu_phyp.c optional pseries powerpc64 powerpc/pseries/phyp_console.c optional pseries powerpc64 +powerpc/pseries/phyp_vscsi.c optional pseries powerpc64 scbus powerpc/pseries/platform_chrp.c optional pseries powerpc/pseries/plpar_iommu.c optional pseries powerpc64 powerpc/pseries/rtas_dev.c optional pseries Added: head/sys/powerpc/pseries/phyp_vscsi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/pseries/phyp_vscsi.c Sat Sep 28 15:46:03 2013 (r255927) @@ -0,0 +1,1003 @@ +/*- + * Copyright 2013 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +struct vscsi_softc; + +/* VSCSI CRQ format from table 260 of PAPR spec 2.4 (page 760) */ +struct vscsi_crq { + uint8_t valid; + uint8_t format; + uint8_t reserved; + uint8_t status; + uint16_t timeout; + uint16_t iu_length; + uint64_t iu_data; +}; + +struct vscsi_xfer { + TAILQ_ENTRY(vscsi_xfer) queue; + struct vscsi_softc *sc; + union ccb *ccb; + bus_dmamap_t dmamap; + uint64_t tag; + + vmem_addr_t srp_iu_offset; + vmem_size_t srp_iu_size; +}; + +TAILQ_HEAD(vscsi_xferq, vscsi_xfer); + +struct vscsi_softc { + device_t dev; + struct cam_devq *devq; + struct cam_sim *sim; + struct cam_path *path; + struct mtx io_lock; + + cell_t unit; + int bus_initialized; + int bus_logged_in; + int max_transactions; + + int irqid; + struct resource *irq; + void *irq_cookie; + + bus_dma_tag_t crq_tag; + struct vscsi_crq *crq_queue; + int n_crqs, cur_crq; + bus_dmamap_t crq_map; + bus_addr_t crq_phys; + + vmem_t *srp_iu_arena; + void *srp_iu_queue; + bus_addr_t srp_iu_phys; + + bus_dma_tag_t data_tag; + + struct vscsi_xfer loginxp; + struct vscsi_xfer *xfer; + struct vscsi_xferq active_xferq; + struct vscsi_xferq free_xferq; +}; + +struct srp_login { + uint8_t type; + uint8_t reserved[7]; + uint64_t tag; + uint64_t max_cmd_length; + uint32_t reserved2; + uint16_t buffer_formats; + uint8_t flags; + uint8_t reserved3[5]; + uint8_t initiator_port_id[16]; + uint8_t target_port_id[16]; +} __packed; + +struct srp_login_rsp { + uint8_t type; + uint8_t reserved[3]; + uint32_t request_limit_delta; + uint8_t tag; + uint32_t max_i_to_t_len; + uint32_t max_t_to_i_len; + uint16_t buffer_formats; + uint8_t flags; + /* Some reserved bits follow */ +} __packed; + +struct srp_cmd { + uint8_t type; + uint8_t flags1; + uint8_t reserved[3]; + uint8_t formats; + uint8_t out_buffer_count; + uint8_t in_buffer_count; + uint64_t tag; + uint32_t reserved2; + uint64_t lun; + uint8_t reserved3[3]; + uint8_t additional_cdb; + uint8_t cdb[16]; + uint8_t data_payload[0]; +} __packed; + +struct srp_rsp { + uint8_t type; + uint8_t reserved[3]; + uint32_t request_limit_delta; + uint64_t tag; + uint16_t reserved2; + uint8_t flags; + uint8_t status; + uint32_t data_out_resid; + uint32_t data_in_resid; + uint32_t sense_data_len; + uint32_t response_data_len; + uint8_t data_payload[0]; +} __packed; + +struct srp_tsk_mgmt { + uint8_t type; + uint8_t reserved[7]; + uint64_t tag; + uint32_t reserved2; + uint64_t lun; + uint8_t reserved3[2]; + uint8_t function; + uint8_t reserved4; + uint64_t manage_tag; + uint64_t reserved5; +} __packed; + +/* Message code type */ +#define SRP_LOGIN_REQ 0x00 +#define SRP_TSK_MGMT 0x01 +#define SRP_CMD 0x02 +#define SRP_I_LOGOUT 0x03 + +#define SRP_LOGIN_RSP 0xC0 +#define SRP_RSP 0xC1 +#define SRP_LOGIN_REJ 0xC2 + +#define SRP_T_LOGOUT 0x80 +#define SRP_CRED_REQ 0x81 +#define SRP_AER_REQ 0x82 + +#define SRP_CRED_RSP 0x41 +#define SRP_AER_RSP 0x41 + +/* Flags for srp_rsp flags field */ +#define SRP_RSPVALID 0x01 +#define SRP_SNSVALID 0x02 +#define SRP_DOOVER 0x04 +#define SRP_DOUNDER 0x08 +#define SRP_DIOVER 0x10 +#define SRP_DIUNDER 0x20 + +#define MAD_SUCESS 0x00 +#define MAD_NOT_SUPPORTED 0xf1 +#define MAD_FAILED 0xf7 + +#define MAD_EMPTY_IU 0x01 +#define MAD_ERROR_LOGGING_REQUEST 0x02 +#define MAD_ADAPTER_INFO_REQUEST 0x03 +#define MAD_CAPABILITIES_EXCHANGE 0x05 +#define MAD_PHYS_ADAP_INFO_REQUEST 0x06 +#define MAD_TAPE_PASSTHROUGH_REQUEST 0x07 +#define MAD_ENABLE_FAST_FAIL 0x08 + +static int vscsi_probe(device_t); +static int vscsi_attach(device_t); +static int vscsi_detach(device_t); +static void vscsi_cam_action(struct cam_sim *, union ccb *); +static void vscsi_cam_poll(struct cam_sim *); +static void vscsi_intr(void *arg); +static void vscsi_check_response_queue(struct vscsi_softc *sc); +static void vscsi_setup_bus(struct vscsi_softc *sc); + +static void vscsi_srp_login(struct vscsi_softc *sc); +static void vscsi_crq_load_cb(void *, bus_dma_segment_t *, int, int); +static void vscsi_scsi_command(void *xxp, bus_dma_segment_t *segs, + int nsegs, int err); +static void vscsi_task_management(struct vscsi_softc *sc, union ccb *ccb); +static void vscsi_srp_response(struct vscsi_xfer *, struct vscsi_crq *); + +static devclass_t vscsi_devclass; +static device_method_t vscsi_methods[] = { + DEVMETHOD(device_probe, vscsi_probe), + DEVMETHOD(device_attach, vscsi_attach), + DEVMETHOD(device_detach, vscsi_detach), + + DEVMETHOD_END +}; +static driver_t vscsi_driver = { + "vscsi", + vscsi_methods, + sizeof(struct vscsi_softc) +}; +DRIVER_MODULE(vscsi, vdevice, vscsi_driver, vscsi_devclass, 0, 0); +MALLOC_DEFINE(M_VSCSI, "vscsi", "CAM device queue for VSCSI"); + +static int +vscsi_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "IBM,v-scsi")) + return (ENXIO); + + device_set_desc(dev, "POWER Hypervisor Virtual SCSI Bus"); + return (0); +} + +static int +vscsi_attach(device_t dev) +{ + struct vscsi_softc *sc; + struct vscsi_xfer *xp; + int error, i; + + sc = device_get_softc(dev); + if (sc == NULL) + return (EINVAL); + + sc->dev = dev; + mtx_init(&sc->io_lock, "vscsi", NULL, MTX_DEF); + + /* Get properties */ + OF_getprop(ofw_bus_get_node(dev), "reg", &sc->unit, sizeof(sc->unit)); + + /* Setup interrupt */ + sc->irqid = 0; + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid, + RF_ACTIVE); + + if (!sc->irq) { + device_printf(dev, "Could not allocate IRQ\n"); + mtx_destroy(&sc->io_lock); + return (ENXIO); + } + + bus_setup_intr(dev, sc->irq, INTR_TYPE_CAM | INTR_MPSAFE | + INTR_ENTROPY, NULL, vscsi_intr, sc, &sc->irq_cookie); + + /* Data DMA */ + error = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE, + 256, BUS_SPACE_MAXSIZE_32BIT, 0, busdma_lock_mutex, &sc->io_lock, + &sc->data_tag); + + TAILQ_INIT(&sc->active_xferq); + TAILQ_INIT(&sc->free_xferq); + + /* First XFER for login data */ + sc->loginxp.sc = sc; + bus_dmamap_create(sc->data_tag, 0, &sc->loginxp.dmamap); + TAILQ_INSERT_TAIL(&sc->free_xferq, &sc->loginxp, queue); + + /* CRQ area */ + error = bus_dma_tag_create(bus_get_dma_tag(dev), PAGE_SIZE, 0, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, 8*PAGE_SIZE, + 1, BUS_SPACE_MAXSIZE, 0, NULL, NULL, &sc->crq_tag); + error = bus_dmamem_alloc(sc->crq_tag, (void **)&sc->crq_queue, + BUS_DMA_WAITOK | BUS_DMA_ZERO, &sc->crq_map); + sc->crq_phys = 0; + sc->n_crqs = 0; + error = bus_dmamap_load(sc->crq_tag, sc->crq_map, sc->crq_queue, + 8*PAGE_SIZE, vscsi_crq_load_cb, sc, 0); + + mtx_lock(&sc->io_lock); + vscsi_setup_bus(sc); + sc->xfer = malloc(sizeof(sc->xfer[0])*sc->max_transactions, M_VSCSI, + M_NOWAIT); + for (i = 0; i < sc->max_transactions; i++) { + xp = &sc->xfer[i]; + xp->sc = sc; + + error = bus_dmamap_create(sc->data_tag, 0, &xp->dmamap); + if (error) { + device_printf(dev, "Could not create DMA map (%d)\n", + error); + break; + } + + TAILQ_INSERT_TAIL(&sc->free_xferq, xp, queue); + } + mtx_unlock(&sc->io_lock); + + /* Allocate CAM bits */ + if ((sc->devq = cam_simq_alloc(sc->max_transactions)) == NULL) + return (ENOMEM); + + sc->sim = cam_sim_alloc(vscsi_cam_action, vscsi_cam_poll, "vscsi", sc, + device_get_unit(dev), &sc->io_lock, + sc->max_transactions, sc->max_transactions, + sc->devq); + if (sc->sim == NULL) { + cam_simq_free(sc->devq); + sc->devq = NULL; + device_printf(dev, "CAM SIM attach failed\n"); + return (EINVAL); + } + + + mtx_lock(&sc->io_lock); + if (xpt_bus_register(sc->sim, dev, 0) != 0) { + device_printf(dev, "XPT bus registration failed\n"); + cam_sim_free(sc->sim, FALSE); + sc->sim = NULL; + cam_simq_free(sc->devq); + sc->devq = NULL; + mtx_unlock(&sc->io_lock); + return (EINVAL); + } + mtx_unlock(&sc->io_lock); + + return (0); +} + +static int +vscsi_detach(device_t dev) +{ + struct vscsi_softc *sc; + + sc = device_get_softc(dev); + if (sc == NULL) + return (EINVAL); + + if (sc->sim != NULL) { + mtx_lock(&sc->io_lock); + xpt_bus_deregister(cam_sim_path(sc->sim)); + cam_sim_free(sc->sim, FALSE); + sc->sim = NULL; + mtx_unlock(&sc->io_lock); + } + + if (sc->devq != NULL) { + cam_simq_free(sc->devq); + sc->devq = NULL; + } + + mtx_destroy(&sc->io_lock); + + return (0); +} + +static void +vscsi_cam_action(struct cam_sim *sim, union ccb *ccb) +{ + struct vscsi_softc *sc = cam_sim_softc(sim); + + mtx_assert(&sc->io_lock, MA_OWNED); + + switch (ccb->ccb_h.func_code) { + case XPT_PATH_INQ: + { + struct ccb_pathinq *cpi = &ccb->cpi; + + cpi->version_num = 1; + cpi->hba_inquiry = PI_TAG_ABLE; + cpi->hba_misc = PIM_EXTLUNS; + cpi->target_sprt = 0; + cpi->hba_eng_cnt = 0; + cpi->max_target = 0; + cpi->max_lun = ~(lun_id_t)(0); + cpi->initiator_id = ~0; + strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strncpy(cpi->hba_vid, "IBM", HBA_IDLEN); + strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + cpi->unit_number = cam_sim_unit(sim); + cpi->bus_id = cam_sim_bus(sim); + cpi->base_transfer_speed = 150000; + cpi->transport = XPORT_SRP; + cpi->transport_version = 0; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_SPC4; + cpi->ccb_h.status = CAM_REQ_CMP; + break; + } + case XPT_RESET_BUS: + ccb->ccb_h.status = CAM_REQ_CMP; + break; + case XPT_RESET_DEV: + ccb->ccb_h.status = CAM_REQ_INPROG; + vscsi_task_management(sc, ccb); + return; + case XPT_GET_TRAN_SETTINGS: + ccb->cts.protocol = PROTO_SCSI; + ccb->cts.protocol_version = SCSI_REV_SPC4; + ccb->cts.transport = XPORT_SRP; + ccb->cts.transport_version = 0; + ccb->cts.proto_specific.valid = 0; + ccb->cts.xport_specific.valid = 0; + ccb->ccb_h.status = CAM_REQ_CMP; + break; + case XPT_SET_TRAN_SETTINGS: + ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; + break; + case XPT_SCSI_IO: + { + struct vscsi_xfer *xp; + + ccb->ccb_h.status = CAM_REQ_INPROG; + + xp = TAILQ_FIRST(&sc->free_xferq); + if (xp == NULL) + panic("SCSI queue flooded"); + xp->ccb = ccb; + TAILQ_REMOVE(&sc->free_xferq, xp, queue); + TAILQ_INSERT_TAIL(&sc->active_xferq, xp, queue); + bus_dmamap_load_ccb(sc->data_tag, xp->dmamap, + ccb, vscsi_scsi_command, xp, 0); + + return; + } + default: + ccb->ccb_h.status = CAM_REQ_INVALID; + break; + } + + xpt_done(ccb); + return; +} + +static void +vscsi_srp_login(struct vscsi_softc *sc) +{ + struct vscsi_xfer *xp; + struct srp_login *login; + struct vscsi_crq crq; + int err; + + mtx_assert(&sc->io_lock, MA_OWNED); + + xp = TAILQ_FIRST(&sc->free_xferq); + if (xp == NULL) + panic("SCSI queue flooded"); + xp->ccb = NULL; + TAILQ_REMOVE(&sc->free_xferq, xp, queue); + TAILQ_INSERT_TAIL(&sc->active_xferq, xp, queue); + + /* Set up command */ + xp->srp_iu_size = crq.iu_length = 64; + err = vmem_alloc(xp->sc->srp_iu_arena, xp->srp_iu_size, + M_BESTFIT | M_NOWAIT, &xp->srp_iu_offset); + if (err) + panic("Error during VMEM allocation (%d)", err); + + login = (struct srp_login *)((uint8_t *)xp->sc->srp_iu_queue + + (uintptr_t)xp->srp_iu_offset); + bzero(login, xp->srp_iu_size); + login->type = SRP_LOGIN_REQ; + login->tag = (uint64_t)(xp); + login->max_cmd_length = htobe64(256); + login->buffer_formats = htobe16(0x1 | 0x2); /* Direct and indirect */ + login->flags = 0; + + /* Create CRQ entry */ + crq.valid = 0x80; + crq.format = 0x01; + crq.iu_data = xp->sc->srp_iu_phys + xp->srp_iu_offset; + bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_PREWRITE); + + err = phyp_hcall(H_SEND_CRQ, xp->sc->unit, ((uint64_t *)(&crq))[0], + ((uint64_t *)(&crq))[1]); + if (err != 0) + panic("CRQ send failure (%d)", err); +} + +static void +vscsi_task_management(struct vscsi_softc *sc, union ccb *ccb) +{ + struct srp_tsk_mgmt *cmd; + struct vscsi_xfer *xp; + struct vscsi_crq crq; + int err; + + mtx_assert(&sc->io_lock, MA_OWNED); + + xp = TAILQ_FIRST(&sc->free_xferq); + if (xp == NULL) + panic("SCSI queue flooded"); + xp->ccb = ccb; + TAILQ_REMOVE(&sc->free_xferq, xp, queue); + TAILQ_INSERT_TAIL(&sc->active_xferq, xp, queue); + + if (!(ccb->ccb_h.xflags & CAM_EXTLUN_VALID)) { + ccb->ccb_h.xflags |= CAM_EXTLUN_VALID; + ccb->ccb_h.ext_lun.lun64 = (0x1UL << 62) | + ((uint64_t)ccb->ccb_h.target_lun << 48); + } + + xp->srp_iu_size = crq.iu_length = sizeof(*cmd); + err = vmem_alloc(xp->sc->srp_iu_arena, xp->srp_iu_size, + M_BESTFIT | M_NOWAIT, &xp->srp_iu_offset); + if (err) + panic("Error during VMEM allocation (%d)", err); + + cmd = (struct srp_tsk_mgmt *)((uint8_t *)xp->sc->srp_iu_queue + + (uintptr_t)xp->srp_iu_offset); + bzero(cmd, xp->srp_iu_size); + cmd->type = SRP_TSK_MGMT; + cmd->tag = (uint64_t)xp; + cmd->lun = ccb->ccb_h.ext_lun.lun64; + + switch (ccb->ccb_h.func_code) { + case XPT_RESET_DEV: + cmd->function = 0x08; + break; + default: + panic("Unimplemented code %d", ccb->ccb_h.func_code); + break; + } + + bus_dmamap_sync(xp->sc->crq_tag, xp->sc->crq_map, BUS_DMASYNC_PREWRITE); + + /* Create CRQ entry */ + crq.valid = 0x80; + crq.format = 0x01; + crq.iu_data = xp->sc->srp_iu_phys + xp->srp_iu_offset; + + err = phyp_hcall(H_SEND_CRQ, xp->sc->unit, ((uint64_t *)(&crq))[0], + ((uint64_t *)(&crq))[1]); + if (err != 0) + panic("CRQ send failure (%d)", err); +} + +static void +vscsi_scsi_command(void *xxp, bus_dma_segment_t *segs, int nsegs, int err) +{ + struct vscsi_xfer *xp = xxp; + uint8_t *cdb; + union ccb *ccb = xp->ccb; + struct srp_cmd *cmd; + uint64_t chunk_addr; + uint32_t chunk_size; + int desc_start, i; + struct vscsi_crq crq; + + KASSERT(err == 0, ("DMA error %d\n", err)); + + mtx_assert(&xp->sc->io_lock, MA_OWNED); + + cdb = (ccb->ccb_h.flags & CAM_CDB_POINTER) ? + ccb->csio.cdb_io.cdb_ptr : ccb->csio.cdb_io.cdb_bytes; + + if (!(ccb->ccb_h.xflags & CAM_EXTLUN_VALID)) { + ccb->ccb_h.xflags |= CAM_EXTLUN_VALID; + ccb->ccb_h.ext_lun.lun64 = (0x1UL << 62) | + ((uint64_t)ccb->ccb_h.target_lun << 48); + } + + /* Command format from Table 20, page 37 of SRP spec */ + crq.iu_length = 48 + ((nsegs > 1) ? 20 : 16) + + ((ccb->csio.cdb_len > 16) ? (ccb->csio.cdb_len - 16) : 0); + xp->srp_iu_size = crq.iu_length; + if (nsegs > 1) + xp->srp_iu_size += nsegs*16; + xp->srp_iu_size = roundup(xp->srp_iu_size, 16); + err = vmem_alloc(xp->sc->srp_iu_arena, xp->srp_iu_size, + M_BESTFIT | M_NOWAIT, &xp->srp_iu_offset); + if (err) + panic("Error during VMEM allocation (%d)", err); + + cmd = (struct srp_cmd *)((uint8_t *)xp->sc->srp_iu_queue + + (uintptr_t)xp->srp_iu_offset); + bzero(cmd, xp->srp_iu_size); + cmd->type = SRP_CMD; + if (ccb->csio.cdb_len > 16) + cmd->additional_cdb = (ccb->csio.cdb_len - 16) << 2; + memcpy(cmd->cdb, cdb, ccb->csio.cdb_len); + + cmd->tag = (uint64_t)(xp); /* Let the responder find this again */ + cmd->lun = ccb->ccb_h.ext_lun.lun64; + + if (nsegs > 1) { + /* Use indirect descriptors */ + switch (ccb->ccb_h.flags & CAM_DIR_MASK) { + case CAM_DIR_OUT: + cmd->formats = (2 << 4); + break; + case CAM_DIR_IN: + cmd->formats = 2; + break; + default: + panic("Does not support bidirectional commands (%d)", + ccb->ccb_h.flags & CAM_DIR_MASK); + break; + } + + desc_start = ((ccb->csio.cdb_len > 16) ? + ccb->csio.cdb_len - 16 : 0); + chunk_addr = xp->sc->srp_iu_phys + xp->srp_iu_offset + 20 + + desc_start + sizeof(*cmd); + chunk_size = 16*nsegs; + memcpy(&cmd->data_payload[desc_start], &chunk_addr, 8); + memcpy(&cmd->data_payload[desc_start+12], &chunk_size, 4); + chunk_size = 0; + for (i = 0; i < nsegs; i++) + chunk_size += segs[i].ds_len; + memcpy(&cmd->data_payload[desc_start+16], &chunk_size, 4); + desc_start += 20; + for (i = 0; i < nsegs; i++) { + chunk_addr = segs[i].ds_addr; + chunk_size = segs[i].ds_len; + + memcpy(&cmd->data_payload[desc_start + 16*i], + &chunk_addr, 8); + /* Set handle tag to 0 */ + memcpy(&cmd->data_payload[desc_start + 16*i + 12], + &chunk_size, 4); + } + } else if (nsegs == 1) { + switch (ccb->ccb_h.flags & CAM_DIR_MASK) { + case CAM_DIR_OUT: + cmd->formats = (1 << 4); + break; + case CAM_DIR_IN: + cmd->formats = 1; + break; + default: + panic("Does not support bidirectional commands (%d)", + ccb->ccb_h.flags & CAM_DIR_MASK); + break; + } + + /* + * Memory descriptor: + * 8 byte address + * 4 byte handle + * 4 byte length + */ + + chunk_addr = segs[0].ds_addr; + chunk_size = segs[0].ds_len; + desc_start = ((ccb->csio.cdb_len > 16) ? + ccb->csio.cdb_len - 16 : 0); + + memcpy(&cmd->data_payload[desc_start], &chunk_addr, 8); + /* Set handle tag to 0 */ + memcpy(&cmd->data_payload[desc_start+12], &chunk_size, 4); + KASSERT(xp->srp_iu_size >= 48 + ((ccb->csio.cdb_len > 16) ? + ccb->csio.cdb_len : 16), ("SRP IU command length")); + } else { + cmd->formats = 0; + } + bus_dmamap_sync(xp->sc->crq_tag, xp->sc->crq_map, BUS_DMASYNC_PREWRITE); + + /* Create CRQ entry */ + crq.valid = 0x80; + crq.format = 0x01; + crq.iu_data = xp->sc->srp_iu_phys + xp->srp_iu_offset; + + err = phyp_hcall(H_SEND_CRQ, xp->sc->unit, ((uint64_t *)(&crq))[0], + ((uint64_t *)(&crq))[1]); + if (err != 0) + panic("CRQ send failure (%d)", err); +} + +static void +vscsi_crq_load_cb(void *xsc, bus_dma_segment_t *segs, int nsegs, int err) +{ + struct vscsi_softc *sc = xsc; + + sc->crq_phys = segs[0].ds_addr; + sc->n_crqs = PAGE_SIZE/sizeof(struct vscsi_crq); + + sc->srp_iu_queue = (uint8_t *)(sc->crq_queue); + sc->srp_iu_phys = segs[0].ds_addr; + sc->srp_iu_arena = vmem_create("VSCSI SRP IU", PAGE_SIZE, + segs[0].ds_len - PAGE_SIZE, 16, 0, M_BESTFIT | M_NOWAIT); +} + +static void +vscsi_setup_bus(struct vscsi_softc *sc) +{ + struct vscsi_crq crq; + struct vscsi_xfer *xp; + int error; + + struct { + uint32_t type; + uint16_t status; + uint16_t length; + uint64_t tag; + uint64_t buffer; + struct { + char srp_version[8]; + char partition_name[96]; + uint32_t partition_number; + uint32_t mad_version; + uint32_t os_type; + uint32_t port_max_txu[8]; + } payload; + } mad_adapter_info; + + bzero(&crq, sizeof(crq)); + + /* Init message */ + crq.valid = 0xc0; + crq.format = 0x01; + + do { + error = phyp_hcall(H_FREE_CRQ, sc->unit); + } while (error == H_BUSY); + + /* See initialization sequence page 757 */ + bzero(sc->crq_queue, sc->n_crqs*sizeof(sc->crq_queue[0])); + sc->cur_crq = 0; + sc->bus_initialized = 0; + sc->bus_logged_in = 0; + bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_PREWRITE); + error = phyp_hcall(H_REG_CRQ, sc->unit, sc->crq_phys, + sc->n_crqs*sizeof(sc->crq_queue[0])); + KASSERT(error == 0, ("CRQ registration success")); + + error = phyp_hcall(H_SEND_CRQ, sc->unit, ((uint64_t *)(&crq))[0], + ((uint64_t *)(&crq))[1]); + if (error != 0) + panic("CRQ setup failure (%d)", error); + + while (sc->bus_initialized == 0) + vscsi_check_response_queue(sc); + + /* Send MAD adapter info */ + mad_adapter_info.type = MAD_ADAPTER_INFO_REQUEST; + mad_adapter_info.status = 0; + mad_adapter_info.length = sizeof(mad_adapter_info.payload); + + strcpy(mad_adapter_info.payload.srp_version, "16.a"); + strcpy(mad_adapter_info.payload.partition_name, "UNKNOWN"); + mad_adapter_info.payload.partition_number = -1; + mad_adapter_info.payload.mad_version = 1; + mad_adapter_info.payload.os_type = 2; /* Claim we are Linux */ + mad_adapter_info.payload.port_max_txu[0] = 0; + /* If this fails, we get the defaults above */ + OF_getprop(OF_finddevice("/"), "ibm,partition-name", + mad_adapter_info.payload.partition_name, + sizeof(mad_adapter_info.payload.partition_name)); + OF_getprop(OF_finddevice("/"), "ibm,partition-no", + &mad_adapter_info.payload.partition_number, + sizeof(mad_adapter_info.payload.partition_number)); + + xp = TAILQ_FIRST(&sc->free_xferq); + xp->ccb = NULL; + TAILQ_REMOVE(&sc->free_xferq, xp, queue); + TAILQ_INSERT_TAIL(&sc->active_xferq, xp, queue); + xp->srp_iu_size = crq.iu_length = sizeof(mad_adapter_info); + vmem_alloc(xp->sc->srp_iu_arena, xp->srp_iu_size, + M_BESTFIT | M_NOWAIT, &xp->srp_iu_offset); + mad_adapter_info.buffer = xp->sc->srp_iu_phys + xp->srp_iu_offset + 24; + mad_adapter_info.tag = (uint64_t)xp; + memcpy((uint8_t *)xp->sc->srp_iu_queue + (uintptr_t)xp->srp_iu_offset, + &mad_adapter_info, sizeof(mad_adapter_info)); + crq.valid = 0x80; + crq.format = 0x02; + crq.iu_data = xp->sc->srp_iu_phys + xp->srp_iu_offset; + bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_PREWRITE); + phyp_hcall(H_SEND_CRQ, xp->sc->unit, ((uint64_t *)(&crq))[0], + ((uint64_t *)(&crq))[1]); + + while (TAILQ_EMPTY(&sc->free_xferq)) + vscsi_check_response_queue(sc); + + /* Send SRP login */ + vscsi_srp_login(sc); + while (sc->bus_logged_in == 0) + vscsi_check_response_queue(sc); + + error = phyp_hcall(H_VIO_SIGNAL, sc->unit, 1); /* Enable interrupts */ +} + + +static void +vscsi_intr(void *xsc) +{ + struct vscsi_softc *sc = xsc; + + mtx_lock(&sc->io_lock); + vscsi_check_response_queue(sc); + mtx_unlock(&sc->io_lock); +} + +static void +vscsi_srp_response(struct vscsi_xfer *xp, struct vscsi_crq *crq) +{ + union ccb *ccb = xp->ccb; + struct vscsi_softc *sc = xp->sc; + struct srp_rsp *rsp; + uint32_t sense_len; + + /* SRP response packet in original request */ + rsp = (struct srp_rsp *)((uint8_t *)sc->srp_iu_queue + + (uintptr_t)xp->srp_iu_offset); + ccb->csio.scsi_status = rsp->status; + if (ccb->csio.scsi_status == SCSI_STATUS_OK) + ccb->ccb_h.status = CAM_REQ_CMP; + else + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; +#ifdef NOTYET + /* Collect fast fail codes */ + if (crq->status != 0) + ccb->ccb_h.status = CAM_REQ_CMP_ERR; +#endif + + if (ccb->ccb_h.status != CAM_REQ_CMP) { + ccb->ccb_h.status |= CAM_DEV_QFRZN; + xpt_freeze_devq(ccb->ccb_h.path, /*count*/ 1); + } + + if (!(rsp->flags & SRP_RSPVALID)) + rsp->response_data_len = 0; + if (!(rsp->flags & SRP_SNSVALID)) + rsp->sense_data_len = 0; + if (!(rsp->flags & (SRP_DOOVER | SRP_DOUNDER))) + rsp->data_out_resid = 0; + if (!(rsp->flags & (SRP_DIOVER | SRP_DIUNDER))) + rsp->data_in_resid = 0; + + if (rsp->flags & SRP_SNSVALID) { + bzero(&ccb->csio.sense_data, sizeof(struct scsi_sense_data)); + ccb->ccb_h.status |= CAM_AUTOSNS_VALID; + sense_len = min(be32toh(rsp->sense_data_len), + ccb->csio.sense_len); + memcpy(&ccb->csio.sense_data, + &rsp->data_payload[be32toh(rsp->response_data_len)], + sense_len); + ccb->csio.sense_resid = ccb->csio.sense_len - + be32toh(rsp->sense_data_len); + } + + switch (ccb->ccb_h.flags & CAM_DIR_MASK) { + case CAM_DIR_OUT: + ccb->csio.resid = rsp->data_out_resid; + break; + case CAM_DIR_IN: + ccb->csio.resid = rsp->data_in_resid; + break; + } + + bus_dmamap_sync(sc->data_tag, xp->dmamap, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->data_tag, xp->dmamap); + xpt_done(ccb); + xp->ccb = NULL; +} + +static void +vscsi_login_response(struct vscsi_xfer *xp, struct vscsi_crq *crq) +{ + struct vscsi_softc *sc = xp->sc; + struct srp_login_rsp *rsp; + + /* SRP response packet in original request */ + rsp = (struct srp_login_rsp *)((uint8_t *)sc->srp_iu_queue + + (uintptr_t)xp->srp_iu_offset); + KASSERT(be16toh(rsp->buffer_formats) & 0x3, ("Both direct and indirect " + "buffers supported")); + + sc->max_transactions = be32toh(rsp->request_limit_delta); + device_printf(sc->dev, "Queue depth %d commands\n", + sc->max_transactions); + sc->bus_logged_in = 1; +} + +static void +vscsi_cam_poll(struct cam_sim *sim) +{ + struct vscsi_softc *sc = cam_sim_softc(sim); + + vscsi_check_response_queue(sc); +} + +static void +vscsi_check_response_queue(struct vscsi_softc *sc) +{ + struct vscsi_crq *crq; + struct vscsi_xfer *xp; + int code; + + mtx_assert(&sc->io_lock, MA_OWNED); + + phyp_hcall(H_VIO_SIGNAL, sc->unit, 0); + bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_POSTREAD); + + while (sc->crq_queue[sc->cur_crq].valid != 0) { + crq = &sc->crq_queue[sc->cur_crq]; + + switch (crq->valid) { + case 0xc0: + if (crq->format == 0x02) + sc->bus_initialized = 1; + break; + case 0x80: + /* IU data is set to tag pointer (the XP) */ + xp = (struct vscsi_xfer *)crq->iu_data; + + switch (crq->format) { + case 0x01: + code = *((uint8_t *)sc->srp_iu_queue + + (uintptr_t)xp->srp_iu_offset); + switch (code) { + case SRP_RSP: + vscsi_srp_response(xp, crq); + break; + case SRP_LOGIN_RSP: + vscsi_login_response(xp, crq); + break; + default: + device_printf(sc->dev, "Unknown SRP " + "response code %d\n", code); + break; + } + break; + case 0x02: + /* Ignore management datagrams */ + break; + default: + panic("Unknown CRQ format %d\n", crq->format); + break; + } + vmem_free(sc->srp_iu_arena, xp->srp_iu_offset, + xp->srp_iu_size); + TAILQ_REMOVE(&sc->active_xferq, xp, queue); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Sep 28 15:49:36 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id B4377BBA; Sat, 28 Sep 2013 15:49:36 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A182022BC; Sat, 28 Sep 2013 15:49: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 r8SFna9S064054; Sat, 28 Sep 2013 15:49:36 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8SFnamK064053; Sat, 28 Sep 2013 15:49:36 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201309281549.r8SFnamK064053@svn.freebsd.org> From: Philip Paeps Date: Sat, 28 Sep 2013 15:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255928 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 15:49:36 -0000 Author: philip Date: Sat Sep 28 15:49:36 2013 New Revision: 255928 URL: http://svnweb.freebsd.org/changeset/base/255928 Log: Use the correct EtherType for logging IPv6 packets. Reviewed by: melifaro Approved by: re (kib, glebius) MFC after: 3 days Modified: head/sys/netpfil/ipfw/ip_fw_log.c Modified: head/sys/netpfil/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_log.c Sat Sep 28 15:46:03 2013 (r255927) +++ head/sys/netpfil/ipfw/ip_fw_log.c Sat Sep 28 15:49:36 2013 (r255928) @@ -255,11 +255,18 @@ ipfw_log(struct ip_fw *f, u_int hlen, st if (args->eh) /* layer2, use orig hdr */ BPF_MTAP2(log_if, args->eh, ETHER_HDR_LEN, m); - else + else { /* Add fake header. Later we will store * more info in the header. */ - BPF_MTAP2(log_if, "DDDDDDSSSSSS\x08\x00", ETHER_HDR_LEN, m); + if (ip->ip_v == 4) + BPF_MTAP2(log_if, "DDDDDDSSSSSS\x08\x00", ETHER_HDR_LEN, m); + else if (ip->ip_v == 6) + BPF_MTAP2(log_if, "DDDDDDSSSSSS\x86\xdd", ETHER_HDR_LEN, m); + else + /* Obviously bogus EtherType. */ + BPF_MTAP2(log_if, "DDDDDDSSSSSS\xff\xff", ETHER_HDR_LEN, m); + } LOGIF_RUNLOCK(); #endif /* !WITHOUT_BPF */ return; From owner-svn-src-head@FreeBSD.ORG Sat Sep 28 16:25:21 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 5333084A; Sat, 28 Sep 2013 16:25:21 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4069A2495; Sat, 28 Sep 2013 16:25: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 r8SGPLIg090376; Sat, 28 Sep 2013 16:25:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8SGPLKT090375; Sat, 28 Sep 2013 16:25:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309281625.r8SGPLKT090375@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Sep 2013 16:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255929 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 16:25:21 -0000 Author: nwhitehorn Date: Sat Sep 28 16:25:20 2013 New Revision: 255929 URL: http://svnweb.freebsd.org/changeset/base/255929 Log: Prevent the set -e from mk-osreldate.sh from propagating into newvers.sh. This would cause detection of old versions of SVN to cause fatal errors instead of being caught and handled, which would make the build fail if the tree had been checked out with an older version of SVN (e.g. 1.6). Discussed with: gjb Approved by: re (marius) Modified: head/include/mk-osreldate.sh Modified: head/include/mk-osreldate.sh ============================================================================== --- head/include/mk-osreldate.sh Sat Sep 28 15:49:36 2013 (r255928) +++ head/include/mk-osreldate.sh Sat Sep 28 16:25:20 2013 (r255929) @@ -36,7 +36,9 @@ trap "rm -f $tmpfile" EXIT ${ECHO} creating osreldate.h from newvers.sh export PARAMFILE="${PARAM_H:=$CURDIR/../sys/sys/param.h}" -. "${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh}" +set +e +. "${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh}" || exit 1 +set -e cat > $tmpfile < Delivered-To: svn-src-head@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 ESMTP id 552D1DED; Sat, 28 Sep 2013 16:39:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2862E2564; Sat, 28 Sep 2013 16:39: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 r8SGdl9H099905; Sat, 28 Sep 2013 16:39:47 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8SGdkiT099901; Sat, 28 Sep 2013 16:39:46 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201309281639.r8SGdkiT099901@svn.freebsd.org> From: Ian Lepore Date: Sat, 28 Sep 2013 16:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255930 - in head: include 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 16:39:47 -0000 Author: ian Date: Sat Sep 28 16:39:46 2013 New Revision: 255930 URL: http://svnweb.freebsd.org/changeset/base/255930 Log: Allow the path to the system source directory to be passed in to newvers.sh. Pass it in from include/Makefile. If it isn't passed in, fall back to the old logic of using dirname $0. Using dirname $0 does not yield the path to the script if it was sourced in from another script in another directory; you end up with the parent script's path. That was causing newvers.sh to look one level below the FreeBSD src/ directory when building osreldate.h and it may find something like a git or svn repo there that has nothing to do with FreeBSD. PR: 174422 Approved by: re () MFC after: 2 weeks Modified: head/include/Makefile head/sys/conf/newvers.sh Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sat Sep 28 16:25:20 2013 (r255929) +++ head/include/Makefile Sat Sep 28 16:39:46 2013 (r255930) @@ -104,8 +104,9 @@ SHARED?= copies INCS+= osreldate.h -NEWVERS_SH= ${.CURDIR}/../sys/conf/newvers.sh -PARAM_H= ${.CURDIR}/../sys/sys/param.h +SYSDIR= ${.CURDIR}/../sys +NEWVERS_SH= ${SYSDIR}/conf/newvers.sh +PARAM_H= ${SYSDIR}/sys/param.h MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} @@ -113,6 +114,7 @@ osreldate.h vers.c: ${NEWVERS_SH} ${PARA MAKE="${MAKE}" \ NEWVERS_SH=${NEWVERS_SH} \ PARAM_H=${PARAM_H} \ + SYSDIR=${SYSDIR} \ sh ${MK_OSRELDATE_SH} .for i in ${LHDRS} Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Sat Sep 28 16:25:20 2013 (r255929) +++ head/sys/conf/newvers.sh Sat Sep 28 16:39:46 2013 (r255930) @@ -38,7 +38,10 @@ if [ "X${BRANCH_OVERRIDE}" != "X" ]; the fi RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" -SYSDIR=$(dirname $0)/.. + +if [ "X${SYSDIR}" = "X" ]; then + SYSDIR=$(dirname $0)/.. +fi if [ "X${PARAMFILE}" != "X" ]; then RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ From owner-svn-src-head@FreeBSD.ORG Sat Sep 28 23:03:41 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id A136CCBF; Sat, 28 Sep 2013 23:03:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 752032809; Sat, 28 Sep 2013 23:03: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 r8SN3fGB022675; Sat, 28 Sep 2013 23:03:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8SN3foW022674; Sat, 28 Sep 2013 23:03:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201309282303.r8SN3foW022674@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Sep 2013 23:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255931 - head/contrib/binutils/bfd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 23:03:41 -0000 Author: dim Date: Sat Sep 28 23:03:40 2013 New Revision: 255931 URL: http://svnweb.freebsd.org/changeset/base/255931 Log: Fix a bug in ld, where indirect symbols are not handled properly during linking of a shared library, leading to corrupt indexes in the dynamic symbol table. This should fix the multimedia/ffmpegthumbnailer port. Approved by: re (kib) Reported by: swills MFC after: 2 weeks Modified: head/contrib/binutils/bfd/elflink.c Modified: head/contrib/binutils/bfd/elflink.c ============================================================================== --- head/contrib/binutils/bfd/elflink.c Sat Sep 28 16:39:46 2013 (r255930) +++ head/contrib/binutils/bfd/elflink.c Sat Sep 28 23:03:40 2013 (r255931) @@ -488,12 +488,28 @@ bfd_elf_record_link_assignment (bfd *out if (h->root.u.undef.next != NULL || htab->root.undefs_tail == &h->root) bfd_link_repair_undef_list (&htab->root); } - - if (h->root.type == bfd_link_hash_new) + else if (h->root.type == bfd_link_hash_new) { bfd_elf_link_mark_dynamic_symbol (info, h, NULL); h->non_elf = 0; } + else if (h->root.type == bfd_link_hash_indirect) + { + const struct elf_backend_data *bed = get_elf_backend_data (output_bfd); + struct elf_link_hash_entry *hv = h; + do + hv = (struct elf_link_hash_entry *) hv->root.u.i.link; + while (hv->root.type == bfd_link_hash_indirect + || hv->root.type == bfd_link_hash_warning); + h->root.type = bfd_link_hash_undefined; + hv->root.type = bfd_link_hash_indirect; + hv->root.u.i.link = (struct bfd_link_hash_entry *) h; + (*bed->elf_backend_copy_indirect_symbol) (info, h, hv); + } + else if (h->root.type == bfd_link_hash_warning) + { + abort (); + } /* If this symbol is being provided by the linker script, and it is currently defined by a dynamic object, but not by a regular @@ -1417,10 +1433,10 @@ _bfd_elf_merge_symbol (bfd *abfd, case, we make the versioned symbol point to the normal one. */ const struct elf_backend_data *bed = get_elf_backend_data (abfd); flip->root.type = h->root.type; + flip->root.u.undef.abfd = h->root.u.undef.abfd; h->root.type = bfd_link_hash_indirect; h->root.u.i.link = (struct bfd_link_hash_entry *) flip; (*bed->elf_backend_copy_indirect_symbol) (info, flip, h); - flip->root.u.undef.abfd = h->root.u.undef.abfd; if (h->def_dynamic) { h->def_dynamic = 0;